query_id
stringlengths
32
32
query
stringlengths
7
5.32k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
4cf92333394685703228fe4d76894a47
Gets the course offering hierarchy design session.
[ { "docid": "546cb03b708028cb7b2757a3ef33b59d", "score": "0.8583091", "text": "public function getCourseOfferingHierarchyDesignSession() {\n \treturn $this->manager->getCourseOfferingHierarchyDesignSession();\n\t}", "title": "" } ]
[ { "docid": "4a6e0a78f8631d5476c79e91934fb7f4", "score": "0.81538063", "text": "public function getCourseOfferingHierarchySession() {\n \treturn $this->manager->getCourseOfferingHierarchySession();\n\t}", "title": "" }, { "docid": "4752b9ca35965bcfa64f62bce3c7196c", "score": "0.8086468", "text": "public function getCourseCatalogHierarchyDesignSession() {\n \treturn $this->manager->getCourseCatalogHierarchyDesignSession();\n\t}", "title": "" }, { "docid": "a008ecb1173de085cde25232fed67bbf", "score": "0.7471311", "text": "public function getCourseCatalogHierarchySession() {\n \treturn $this->manager->getCourseCatalogHierarchySession();\n\t}", "title": "" }, { "docid": "5a19b7367edb56fc02c19680c4d691d9", "score": "0.7086418", "text": "public function getTermHierarchyDesignSession() {\n \treturn $this->manager->getTermHierarchyDesignSession();\n\t}", "title": "" }, { "docid": "a7f33924d6a63d1c9b47b166e034bbed", "score": "0.69577044", "text": "public function getTopicHierarchyDesignSession() {\n \treturn $this->manager->getTopicHierarchyDesignSession();\n\t}", "title": "" }, { "docid": "73b754ca937b1a5aed0fcbcb91ca5123", "score": "0.6500634", "text": "public function getCourseOfferingCatalogSession() {\n \treturn $this->manager->getCourseOfferingCatalogSession();\n\t}", "title": "" }, { "docid": "e2fa69f1a0a3fefce05ec70dff18c9ac", "score": "0.6492284", "text": "public function getCourseOfferingSearchSession() {\n \treturn $this->manager->getCourseOfferingSearchSession();\n\t}", "title": "" }, { "docid": "42ae3270692280f3a185c870255684c5", "score": "0.62311476", "text": "public function getCourseOfferingCatalogAssignmentSession() {\n \treturn $this->manager->getCourseOfferingCatalogAssignmentSession();\n\t}", "title": "" }, { "docid": "51bcfb7d6196abea33d9cb3ae820cf16", "score": "0.6199176", "text": "public function getCourseOfferingAdminSession() {\n \treturn $this->manager->getCourseOfferingAdminSession();\n\t}", "title": "" }, { "docid": "f3d9eab9b7881922d99ff0009b275492", "score": "0.60391814", "text": "public function getCourseOfferingLookupSession() {\n \treturn new apc_course_CourseOffering_Lookup_Session($this, $this->manager->getCourseOfferingLookupSession());\n\t}", "title": "" }, { "docid": "473d3bde8f5c7b05f04abafc1e3a61c0", "score": "0.60323167", "text": "public function getTermHierarchySession() {\n \treturn $this->manager->getTermHierarchySession();\n\t}", "title": "" }, { "docid": "44070aff2e5c7a7e832325123a8a2a9e", "score": "0.59074867", "text": "public function getTopicHierarchySession() {\n \treturn $this->manager->getTopicHierarchySession();\n\t}", "title": "" }, { "docid": "9e458d5bce5e1c5e50c9cd623ea36d04", "score": "0.5828364", "text": "public function getCourseCatalogSession() {\n \treturn $this->manager->getCourseCatalogSession();\n\t}", "title": "" }, { "docid": "d26acc763621f59d36ac6e14830ee771", "score": "0.5787521", "text": "public function getCourseCatalogAssignmentSession() {\n \treturn $this->manager->getCourseCatalogAssignmentSession();\n\t}", "title": "" }, { "docid": "4f941807302e36b1c10ac431b7bb29ca", "score": "0.57364476", "text": "public function getCourseCatalogLookupSession() {\n \treturn $this->manager->getCourseCatalogLookupSession();\n\t}", "title": "" }, { "docid": "32d0bdcc23cb7042c30eb0a507013afa", "score": "0.5710597", "text": "public function getCourseOfferingNotificationSession() {\n \treturn $this->manager->getCourseOfferingNotificationSession();\n\t}", "title": "" }, { "docid": "d20b6e87dd85d4649af24986bd797199", "score": "0.5710423", "text": "public function getCourseSearchSession() {\n \treturn $this->manager->getCourseSearchSession();\n\t}", "title": "" }, { "docid": "7d658346d13043d15c0bd4112b16ee57", "score": "0.5651995", "text": "public function getCourseCatalogSearchSession() {\n \treturn $this->manager->getCourseCatalogSearchSession();\n\t}", "title": "" }, { "docid": "1e315909200993782e9b7eddb6d3ccad", "score": "0.5620461", "text": "public function getCurrentSemester()\n {\n return $this->setup->getCurrentSemester();\n }", "title": "" }, { "docid": "113fbb8d51527620b1b81fa948a0140f", "score": "0.55933297", "text": "public function get_parent_course() {\n return $this->_course;\n }", "title": "" }, { "docid": "2108c7fabae2eee315ad642ba8071e78", "score": "0.55281484", "text": "public function get_course()\n {\n return $this->get_selected_course();\n }", "title": "" }, { "docid": "79950e2b510b85f360bcb7b1e06cc8af", "score": "0.54912573", "text": "public function getEditionHierarchy() {\n if(!isset(self::$_editions)) {\n self::$_editions = require(implode(DIRECTORY_SEPARATOR,array(\n Yii::app()->basePath,\n 'data',\n 'editionHierarchy.php'\n )));\n }\n return self::$_editions;\n }", "title": "" }, { "docid": "9776e944dd29080dd5eaf252786476fe", "score": "0.54762685", "text": "public function getCourseAdminSession() {\n \treturn $this->manager->getCourseAdminSession();\n\t}", "title": "" }, { "docid": "a845de9546bd63d8906c313be9c86d0c", "score": "0.5463033", "text": "public function getCourseCatalogAdminSession() {\n \treturn $this->manager->getCourseCatalogAdminSession();\n\t}", "title": "" }, { "docid": "135a1548cc50e198ae79e5d101aad712", "score": "0.54610413", "text": "public function supportsCourseOfferingHierarchyDesign() {\n \treturn $this->manager->supportsCourseOfferingHierarchyDesign();\n\t}", "title": "" }, { "docid": "3748fae3492a2bf6d61122e49fb50360", "score": "0.5373783", "text": "public function getParent()\n\t{\n\t\t// If the request is in Live Preview mode, use the Neo-extended criteria model, which supports Live Preview mode\n\t\tif(craft()->neo->isPreviewMode() || $this->isUsingMemoized())\n\t\t{\n\t\t\tif(!isset($this->_liveCriteria['parent']))\n\t\t\t{\n\t\t\t\t$this->_liveCriteria['parent'] = $this->getAncestors(1)->status(null)->first();\n\t\t\t}\n\n\t\t\treturn $this->_liveCriteria['parent'];\n\t\t}\n\n\t\treturn parent::getParent();\n\t}", "title": "" }, { "docid": "53e9dd8810212e13d30ef743efd1a471", "score": "0.5316427", "text": "public function supportsCourseOfferingHierarchy() {\n \treturn $this->manager->supportsCourseOfferingHierarchy();\n\t}", "title": "" }, { "docid": "f43b3a87e3be1ff5e2f7bfe45e663693", "score": "0.51857245", "text": "public function getCourseLookupSession() {\n \treturn new apc_course_Course_Lookup_Session($this, $this->manager->getCourseLookupSession());\n\t}", "title": "" }, { "docid": "57dd9f462bf9fe7f98fc12bcac4cd66f", "score": "0.5185585", "text": "public function getTopicCatalogAssignmentSession() {\n \treturn $this->manager->getTopicCatalogAssignmentSession();\n\t}", "title": "" }, { "docid": "896d177cc99de72b578c9bb30321229d", "score": "0.517818", "text": "public function parentEdition()\n {\n return $this->hasOne(self::class, 'id', 'parent_id')\n ->with('childrenEditions');\n // return Event::where('id', '=', $this->parent_id)->with('childrenEditions');\n }", "title": "" }, { "docid": "68be1c73a51288cb5a2b2841d4878c6d", "score": "0.51214784", "text": "public function getCurriculum()\n {\n return Mage::registry('current_curriculum');\n }", "title": "" }, { "docid": "68be1c73a51288cb5a2b2841d4878c6d", "score": "0.51214784", "text": "public function getCurriculum()\n {\n return Mage::registry('current_curriculum');\n }", "title": "" }, { "docid": "2d83457d2273814902a45b0382ea6f84", "score": "0.51136434", "text": "public function getTermCatalogAssignmentSession() {\n \treturn $this->manager->getTermCatalogAssignmentSession();\n\t}", "title": "" }, { "docid": "0849893173e8f57d896cbaed696b1dec", "score": "0.5106395", "text": "public function getParentCateg()\n {\n return $this->parentCateg;\n }", "title": "" }, { "docid": "47bd541f99e75630bf58cae751c9a43e", "score": "0.5063102", "text": "abstract public function get_course();", "title": "" }, { "docid": "d834277f742289f3f82d2e2ded1cde0a", "score": "0.50503784", "text": "public function get_course()\n {\n return $this->get_foreign_property(self::FOREIGN_PROPERTY_COURSE, Course::class_name());\n }", "title": "" }, { "docid": "a3c2e079ebdd9a34969c4c8f0c6b2cea", "score": "0.5037147", "text": "public function getCourseOfferingAdminSessionForCatalog(osid_id_Id $courseCatalogId) {\n \treturn $this->manager->getCourseOfferingAdminSessionForCatalog($courseCatalogId);\n\t}", "title": "" }, { "docid": "f9debf5fc478fff0e921758c6af77dbd", "score": "0.5020308", "text": "function get_course()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_COURSE);\r\n }", "title": "" }, { "docid": "788e4cd961024ab389b498b1a630ba7b", "score": "0.50179625", "text": "public function getProgram()\n {\n if (array_key_exists(\"program\", $this->_propDict)) {\n if (is_a($this->_propDict[\"program\"], \"\\Beta\\Microsoft\\Graph\\Model\\EducationalActivityDetail\") || is_null($this->_propDict[\"program\"])) {\n return $this->_propDict[\"program\"];\n } else {\n $this->_propDict[\"program\"] = new EducationalActivityDetail($this->_propDict[\"program\"]);\n return $this->_propDict[\"program\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "db4b92f2e3f384005dbec60aec878683", "score": "0.4985336", "text": "public function getParentorganizationid()\n {\n return $this->parentorganizationid;\n }", "title": "" }, { "docid": "708e1b2ac668e863c36503cec98ebd33", "score": "0.4960693", "text": "protected function getRoom()\n\t{\n\t\t$this->room = $this->session->getSession('room');\n\t\treturn $this->room;\n\t}", "title": "" }, { "docid": "8f754e517866dd22496033f6a4524593", "score": "0.49349803", "text": "public function getHierarchy() {\n //if contributor is authenticated\n if ($this->isAuthenticated()) {\n //get hierarchy\n $hierarchy = $this->getGuardUser()->getProfile()->getHierarchy();\n return $hierarchy;\n }\n return '0';\n }", "title": "" }, { "docid": "6a7ba56643478af0b63736503838cfba", "score": "0.49239352", "text": "public function getSession()\r\n {\r\n return Mage::getSingleton('firstdatae4/session');\r\n }", "title": "" }, { "docid": "e52f4cf613772847ba604118bf5f5693", "score": "0.4918178", "text": "public function securityScope()\n {\n if($this->hasParent()){\n $parentRepo = ConfService::getRepositoryById($this->getParentId());\n if(!empty($parentRepo) && $parentRepo->isTemplate){\n $path = $parentRepo->getOption(\"PATH\", true);\n $container = $parentRepo->getOption(\"CONTAINER\", true);\n // If path is set in the template, compute identifier from the template path.\n if(!empty($path) || !empty($container)) return $parentRepo->securityScope();\n }\n }\n $path = $this->getOption(\"CONTAINER\", true);\n if(!empty($path)){\n if(strpos($path, \"AJXP_USER\") !== false) return \"USER\";\n if(strpos($path, \"AJXP_GROUP_PATH\") !== false) return \"GROUP\";\n if(strpos($path, \"AJXP_GROUP_PATH_FLAT\") !== false) return \"GROUP\";\n }\n $path = $this->getOption(\"PATH\", true);\n if($this->accessType == \"ajxp_conf\") return \"USER\";\n if(empty($path)) return false;\n if(strpos($path, \"AJXP_USER\") !== false) return \"USER\";\n if(strpos($path, \"AJXP_GROUP_PATH\") !== false) return \"GROUP\";\n if(strpos($path, \"AJXP_GROUP_PATH_FLAT\") !== false) return \"GROUP\";\n return false;\n }", "title": "" }, { "docid": "3f3911511ccf2f671b9319d6d89b84d6", "score": "0.4917715", "text": "public function getCourse()\n {\n return $this->hasOne(Course::className(), ['id' => 'course_id']);\n }", "title": "" }, { "docid": "bf0ec790f580582e1a47189d10de3879", "score": "0.4907765", "text": "public function getEdition() {\n\t\tif ($this->_edition === null) {\n\t\t\t$this->analyzeURL();\n\t\t}\n\t\treturn $this->_edition;\n\t}", "title": "" }, { "docid": "cdd4b85cd9aabad2124c22e2dad887fb", "score": "0.49055767", "text": "public function supportsCourseCatalogHierarchyDesign() {\n \treturn $this->manager->supportsCourseCatalogHierarchyDesign();\n\t}", "title": "" }, { "docid": "ac7eac92ea7d5aa74632811b6ab74210", "score": "0.49014997", "text": "public function parent() {\n\t\treturn $this->hasOne(Forum::getSectionClass(), \"parent_id\");\n\t}", "title": "" }, { "docid": "eb5c6a093b46df841f4f5ef030398f5f", "score": "0.48995966", "text": "public function getParentRole();", "title": "" }, { "docid": "37159c433abb1dc582edaca05511bcc5", "score": "0.48892784", "text": "function getDesignator() {\n\t\treturn $this->designator; // explicit given designator\n\t}", "title": "" }, { "docid": "573825da35c520a2864412b28427f7d5", "score": "0.4883147", "text": "public function getTopicCatalogSession() {\n \treturn $this->manager->getTopicCatalogSession();\n\t}", "title": "" }, { "docid": "2761a31c57ba617c7f5821f1f0a83aaf", "score": "0.48807254", "text": "public function getExperiment() {\n return $this->_parent;\n }", "title": "" }, { "docid": "0e6e7a1af17ba6f798e31cedd334d8e7", "score": "0.48789868", "text": "public function supportsCourseOfferingHierarchySequencing() {\n \treturn $this->manager->supportsCourseOfferingHierarchySequencing();\n\t}", "title": "" }, { "docid": "8df37cb8c625d2ecf9d715556e8f08b6", "score": "0.48714602", "text": "private function getDeliverySession() {\n\t\t$userId = $this->getPresenter()->getUser()->getId();\n\t\treturn $this->getPresenter()->getSession(self::DELIVERY_SESSION_NAME . $userId);\n\t}", "title": "" }, { "docid": "a704a87fbf061a39ef0f43f76702441c", "score": "0.486557", "text": "private function getCurrentParent()\n {\n return $this->getCurrentCategory()->getParentCategory();\n }", "title": "" }, { "docid": "5e7d82f6d74d03198b417646bcef49ef", "score": "0.48607787", "text": "public function getCourseOfferingSearchSessionForCatalog(osid_id_Id $courseCatalogId) {\n \treturn $this->manager->getCourseOfferingSearchSessionForCatalog($courseCatalogId);\n\t}", "title": "" }, { "docid": "b84a974fc9085d72b6b2acd5d5a327f9", "score": "0.48358098", "text": "public static function current()\n {\n $now = Carbon::now();\n if ($now->month >= self::START_OF_SPRING_SEMESTER && $now->month <= self::END_OF_SPRING_SEMESTER) {\n $part = 2;\n $year = $now->year - 1;\n } else {\n $part = 1;\n // This assumes that the semester ends in the new year.\n $year = $now->month <= self::END_OF_AUTUMN_SEMESTER ? $now->year - 1 : $now->year;\n }\n\n return Semester::getOrCreate($year, $part);\n }", "title": "" }, { "docid": "74376e3b96be05fb19d760210835fc1c", "score": "0.48257282", "text": "public function getParentRelationship()\n {\n return auth()->user()->ministryDiscussions();\n }", "title": "" }, { "docid": "1f15b20c75ac857f7c5ccc751375e262", "score": "0.48203298", "text": "public function getSuite()\n {\n return $this->suite;\n }", "title": "" }, { "docid": "ef38d61ee2f2ff071a636c15995fe10e", "score": "0.4815597", "text": "function getViewingCategory(){\n if(isset($_GET['shop']) AND !isset($_GET['c']) AND !isset($_GET['sc']) ){\n return $this -> transformCategoryNameToID($_GET['shop'], 'O');\n }\n \n else if(isset($_GET['shop']) AND isset($_GET['c']) AND !isset($_GET['sc']) ){\n $parent = $this -> transformCategoryNameToID($_GET['shop'], 'O');\n \n return $this -> transformCategoryNameToID($_GET['c'], $parent);\n }\n \n else{\n $pre_parent = $this -> transformCategoryNameToID($_GET['shop'], 'O');\n $parent = $this -> transformCategoryNameToID($_GET['c'], $pre_parent);\n\n return $this -> transformCategoryNameToID($_GET['sc'], $parent);\n }\n }", "title": "" }, { "docid": "d7c006b25dee9999dad80f6e070ea464", "score": "0.48092446", "text": "public function getCourseCatalogNotificationSession() {\n \treturn $this->manager->getCourseCatalogNotificationSession();\n\t}", "title": "" }, { "docid": "29e5456316f8391008f4b6db2495a474", "score": "0.4808766", "text": "protected function _getProspectOf() {\n\t\t$prospect = $this->_get('prospect_of');\n\n\t\tif(!$prospect) {\n\t\t\t$ag = Agreement::load(array('se_c_id' => $this->get('c_id')))->current();\n\t\t\tif($ag) {\n\t\t\t\t$c_id = $ag->get('ag_dealer_c_id');\n\t\t\t\tif($c_id) {\n\t\t\t\t\t$company = Company::load($c_id);\n\t\t\t\t\t$distributor = $company->people(array('p_type' => Person::TYPE_DISTRIBUTOR))->current();\n\t\t\t\t\tif($distributor)\n\t\t\t\t\t\t$prospect = $distributor->get('p_id');\n\t\t\t\t\telseif($contact = Company::load($c_id)->getContact())\n\t\t\t\t\t\t$prospect = $contact->get('p_id');\n\n\t\t\t\t\tif($prospect)\n\t\t\t\t\t\t$this->_set('prospect_of', $prospect);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $prospect;\n\t}", "title": "" }, { "docid": "44772f650eb368294eb43f01b66d1690", "score": "0.48030284", "text": "public function getParentDepartmentId()\n\t{\n\t\treturn $this->parent_department_id;\n\t}", "title": "" }, { "docid": "33a9a367b3e6a9f67b3e5273d4819b30", "score": "0.48008776", "text": "private function _getParentProduct()\n {\n return $this->_parentProduct;\n }", "title": "" }, { "docid": "3e23ec9f6de7e2feb7be00c906863d7a", "score": "0.4800328", "text": "public function getSession() {\n return Mage::getSingleton(\"core/session\", array(\"name\" => 'frontend'));\n }", "title": "" }, { "docid": "8eba33f37931bef7a1f20e704bc43e20", "score": "0.4799411", "text": "public function getParent() {}", "title": "" }, { "docid": "8eba33f37931bef7a1f20e704bc43e20", "score": "0.4799411", "text": "public function getParent() {}", "title": "" }, { "docid": "8eba33f37931bef7a1f20e704bc43e20", "score": "0.4799411", "text": "public function getParent() {}", "title": "" }, { "docid": "8eba33f37931bef7a1f20e704bc43e20", "score": "0.4799411", "text": "public function getParent() {}", "title": "" }, { "docid": "a55b6b105cd254dc47df0658848323a2", "score": "0.47941533", "text": "function get_parent_categories_listing() {\r\n global $DB;\r\n $organization_list = array();\r\n $organization_comp = $DB->get_records('course_categories', array('parent' => 0));\r\n foreach ($organization_comp as $key => $org) {\r\n $organization_list[$org->id] = $org->name;\r\n }\r\n return $organization_list;\r\n}", "title": "" }, { "docid": "75704d3b30710ad1eba5aac65fbc7957", "score": "0.4790541", "text": "function getParent();", "title": "" }, { "docid": "c113d670d45c466c3d054e29876d981d", "score": "0.47820565", "text": "public function parent()\n\t{\n\t\tif ($this->parent_id) {\n\t\t\tif (is_null($this->parent)) {\n\t\t\t\t$parent = \\PagesRepository::retrieve($this->parent_id);\n\t\t\t\t$this->parent = \\App::make('Monal\\Pages\\Models\\FrontendPage', $parent);\n\t\t\t}\n\t\t}\n\t\treturn $this->parent;\n\t}", "title": "" }, { "docid": "f2aa8ea40222f5477a08680316a39475", "score": "0.47768345", "text": "public function room()\n {\n /**\n * If the device doesn't have a room assigned (therefore it isn't in CVT),\n * then we simply return the keeper's assigned room.\n */\n if ($this->room_id !== NULL)\n return $this->belongsTo(Room::class);\n else\n return $this->keeper->belongsTo(Room::class);\n }", "title": "" }, { "docid": "94b5ee75404f5e5ecbcbf194aa1045a4", "score": "0.4775736", "text": "public function GetStricModeBySession ();", "title": "" }, { "docid": "9e447c3f868068aa0a9b5f62cbba2efb", "score": "0.4772151", "text": "function getParent () {\r\n\t\treturn $this->_parent;\r\n\t}", "title": "" }, { "docid": "9e447c3f868068aa0a9b5f62cbba2efb", "score": "0.4772151", "text": "function getParent () {\r\n\t\treturn $this->_parent;\r\n\t}", "title": "" }, { "docid": "0d5f70848e783efe7caf4d5db7f7e4e8", "score": "0.47550288", "text": "public function getSessionInPlannedTabPlanning()\n {\n $id = Yii::app()->user->idUser;\n $sessionPlanedPlanning = Yii::app()->db->createCommand(\n 'SELECT u.firstName, u.lastName, u.avatarPath, name, title, description, s.datePost, COUNT(DISTINCT(i.idUserInvited)) AS numInvitedUser,\n s.dateCreate, s.idSession, COUNT(DISTINCT(a.idArchive)) AS numArchive,s.active, s.idUserCreate\n FROM sessions AS s\n LEFT JOIN invited_session AS i ON s.idSession = i.idSession\n INNER JOIN users AS u ON s.idUserCreate = u.idUser\n INNER JOIN topics AS t ON s.idTopic = t.idTopic \n LEFT JOIN archive_session AS a ON s.idSession = a.idSession\n WHERE (s.idUserCreate = :idUserCreate) AND ((s.datePost+ INTERVAL 1 DAY) >= Now())\n AND (t.active = 1)\n GROUP BY s.idSession\n ORDER BY s.dateCreate DESC')\n ->bindValues(array(':idUserCreate' => $id))\n ->queryAll();\n return $sessionPlanedPlanning;\n }", "title": "" }, { "docid": "ee9b9e870c3f783ce2ae325d6a44b82a", "score": "0.4745777", "text": "public function get_parent() {\n\t\treturn $this->parent();\n\t}", "title": "" }, { "docid": "2dc7049c37169241b07a385e96ccc32f", "score": "0.47399536", "text": "public function getTermCatalogSession() {\n \treturn $this->manager->getTermCatalogSession();\n\t}", "title": "" }, { "docid": "51ceead7bda7e534d599643c1c1e296e", "score": "0.47398916", "text": "public function getSession(): object\n {\n return SessionTrait::sessionFromGlobal();\n }", "title": "" }, { "docid": "82712eaba98d7150b8587fb4ef632b0c", "score": "0.47161698", "text": "function getSession(){\n\t\t$roomid = (int)$_POST['roomid'];\n\t\tif($roomid < 0){ throw new Exception('Invalid player');}\n\t\tglobal $db;\n\t\t$q = $db -> prepare(\"SELECT sessionid FROM game WHERE roomid = ? LIMIT 1\");\n\t\t$q->execute(array($roomid));\n\t\t$r = $q->fetch();\n\t\t// Return current game session\n\t\treturn $r;\n\t}", "title": "" }, { "docid": "b469c7fa9795a2708f4f5001fefe6ad5", "score": "0.47075605", "text": "public function getPlan()\n {\n return Saas::getPlan($this->getPlanIdentifier());\n }", "title": "" }, { "docid": "c7f9d0e920a1bf93a3dda27353d848d5", "score": "0.4706476", "text": "public function election()\n\t{\n\t\treturn $this->hasOne('Politik\\Entities\\GovernmentElection', 'election_id');\n\t}", "title": "" }, { "docid": "5915877faeb87586fcc5ea369d7e070f", "score": "0.4703902", "text": "protected function GetParent()\r\n {\r\n $instance = IPS_GetInstance($this->InstanceID);\r\n return ($instance['ConnectionID'] > 0) ? $instance['ConnectionID'] : false;\r\n }", "title": "" }, { "docid": "07c4fa2fc3594549987c298dfbdb87fa", "score": "0.4700114", "text": "public function GetCourse()\n\t\t{\n\t\t\treturn Course::Get($this->GetAttribute('course_id'));\n\t\t}", "title": "" }, { "docid": "c434819a751916868fa971bd2cec5da9", "score": "0.46959049", "text": "public function getParent()\n {\n return $this->getParam('_parent');\n }", "title": "" }, { "docid": "321a6929c06cd14b1023e56c368161ca", "score": "0.46913615", "text": "public function getSession() {\n\t\t$msg[]=\"<details><summary>SESSION AND COOKIES</summary>\";\n\t\t$msg[]=$this->show();\n\t\t$msg[]=\"</details>\";\n\t\treturn implode(\"\\n\",$msg);\n\t}", "title": "" }, { "docid": "f314b05098ee6a7dfba108053a27151f", "score": "0.46905148", "text": "public function getGrandParent();", "title": "" }, { "docid": "4acc759ff6a6612c89fa055134772b8c", "score": "0.46900222", "text": "public function getParent() {\n return $this->__parent;\n }", "title": "" }, { "docid": "5c3a28fa9d23f1911a43a68d697494e7", "score": "0.468462", "text": "public function getParent () {\n\t\t/**\n\t\t * Return the record using already defined relationship, fall back to Yii AR handling\n\t\t */\n\t\treturn $this->getOwner()->{self::PARENT};\n\t}", "title": "" }, { "docid": "8d3c32ed3fd018ffef05380bf9d12fcb", "score": "0.4682824", "text": "protected function getSession () {\n\t\treturn $this->session;\n\t}", "title": "" }, { "docid": "2f7227de29a0459ad990eef14361c589", "score": "0.46818537", "text": "public function getDebutSession() {\n return $this->debutSession;\n }", "title": "" }, { "docid": "ed82d8c7380168f2d2eddd87a582ed0e", "score": "0.46809492", "text": "public function getDesign()\n {\n return \\Cloud::app()->getFrontController()->getDesign();\n }", "title": "" }, { "docid": "2c77246d3f916b88c3115653e291b6b3", "score": "0.46801728", "text": "public function getParent() {\r\n\t\tif ($this->pzkParentId) {\r\n\t\t\treturn pzk_store_element($this->pzkParentId);\r\n\t\t}\r\n\t\treturn NULL;\r\n\t}", "title": "" }, { "docid": "dd61a89a7abde5f20ba0c8ed3e6f7eb2", "score": "0.46785402", "text": "public function getDiscipline()\n {\n return $this->hasOne(Disciplines::className(), ['disciplines_id' => 'discipline_id']);\n }", "title": "" }, { "docid": "4429b2f6924c6947a1ff35c3f6896477", "score": "0.46781427", "text": "function getSession() {\n\t\treturn $this->get('_session', $this->get('session'));\n\t}", "title": "" }, { "docid": "f3a74115d055c91c8c0bf1632d6c792a", "score": "0.46768653", "text": "public function getCourseNotificationSession() {\n \treturn $this->manager->getCourseNotificationSession();\n\t}", "title": "" }, { "docid": "9983ca9ffd8ad50227b0783c37b9d901", "score": "0.4676534", "text": "public function getExpertiseLevels();", "title": "" }, { "docid": "5dfb5977ed232575a69ac777c9c6a041", "score": "0.46736363", "text": "public function getParent();", "title": "" }, { "docid": "5dfb5977ed232575a69ac777c9c6a041", "score": "0.46736363", "text": "public function getParent();", "title": "" } ]
7fc7a6f8cee250158809efc5d6ebc0da
Generate a vertical separator (line) between items
[ { "docid": "1a0499341171ae9cfe3231c058e2e7de", "score": "0.0", "text": "public function line($attributes = []) : Builder\n {\n //Get the variables\n $attributes['title'] = '<div class=\"dropdown-divider\"></div>';\n extract($this->getAttributes($attributes), EXTR_PREFIX_SAME, \"wddx\");\n\n //Set the raw html\n $this->constructor[] = $title;\n\n return $this;\n }", "title": "" } ]
[ { "docid": "08f8143ec829504db27110f50997a76f", "score": "0.7350354", "text": "public static function makeSeparator() {\n self::make(\"------------------------------------------------------\", array(), FALSE, 0);\n }", "title": "" }, { "docid": "a233d15b3b1ca91d52c90aeb8aac739a", "score": "0.71865994", "text": "function separator() {\n echo \"<br>\\n<hr>\";\n }", "title": "" }, { "docid": "141274ce6aa85f9b7ef95beef5c05aba", "score": "0.6935168", "text": "public function addDivider():void {\r\n\t\t$this->addHtml(new Html('<hr>'), self::COLUMN_BOTH);\r\n\t}", "title": "" }, { "docid": "5d05e58058ff0184568bbfa957992a90", "score": "0.6816251", "text": "public function get_list_item_separator()\n {\n }", "title": "" }, { "docid": "efa7d87b2dd1c7a86ad7339ac97315cc", "score": "0.67765605", "text": "function addSeperator() {\n $this->addSeparator();\n }", "title": "" }, { "docid": "fe41ee752f65f9a8b815609821cd9a1c", "score": "0.66635895", "text": "function wp_get_list_item_separator()\n {\n }", "title": "" }, { "docid": "a05ca4913f1aad99324b7c29b0b16c69", "score": "0.6647774", "text": "public function separator() {\n\n\t\t\techo '<div class=\"nomad-field-separator\"><hr /></div>';\n\n\t\t}", "title": "" }, { "docid": "aa4979821195e5bfb4129f3fc15e242f", "score": "0.6572642", "text": "function drawSeparationLines($data){\n//Top Line\n $max = maxDataLengths($data);\n echo Line_corner;\n foreach ($max as $value) {\n echo str_repeat(\"-\", $value+3) ;\n }\n echo Line_corner . Line_endline;\n //Top Line end\n}", "title": "" }, { "docid": "ea0fc3f741e3b6c11015c8a951ece46e", "score": "0.6528319", "text": "public function addSeparator()\n\t{\n\t\t$this->body .= '<hr>';\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "2a28f5f67a901e3b6c5e31c6a465c121", "score": "0.63075656", "text": "function addSeparator() {\n if (is_array($this->toolbar) && count($this->toolbar) > 0) {\n $last = end($this->toolbar);\n if (isset($last) && is_array($last)) {\n if ($last[0] != '-') {\n $this->toolbar[] = array('-', '<seperator/>');\n }\n }\n }\n }", "title": "" }, { "docid": "000e4e14427d52ef156fae7ae3e3ec10", "score": "0.62590975", "text": "public function nextDivider() {}", "title": "" }, { "docid": "959af6f455a9bbbbb82344b14acdddad", "score": "0.6162922", "text": "public function addDivider()\n\t{\n\t\t$this->items[] = new MenuItem(array('name' => 'divider'));\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "f62b18002dfc6d8000de9a47093d1d70", "score": "0.6084519", "text": "public function addSeparator() {\n $this->actions[] = array( 'separator' => true );\n }", "title": "" }, { "docid": "e5d94d7932f9e1a751d3fa3f97095036", "score": "0.59408426", "text": "function _getSeparator()\r\n\t{\r\n\t\tforeach ($this->_cell_lengths as $cl) {\r\n\t\t\t$return[] = str_repeat('-', $cl);\r\n\t\t}\r\n\r\n\t\t$row_begin = '+' . str_repeat('-', $this->_padding);\r\n\t\t$row_end = str_repeat('-', $this->_padding) . '+';\r\n\t\t$implode_char = str_repeat('-', $this->_padding) . '+' . str_repeat('-', $this->_padding);\r\n\r\n\t\t$return = $row_begin . implode($implode_char, $return) . $row_end;\r\n\t\t\r\n\t\treturn $return;\r\n\t}", "title": "" }, { "docid": "ab1a3c0eb33126b21e1db8535cedbfbf", "score": "0.57787436", "text": "function custom_hseparator() {\n\t\tadd_option( 'bcn_options', array( 'hseparator' => '' ) );\n\t}", "title": "" }, { "docid": "9fb712ebd12a4262cb313844853b45f8", "score": "0.5757688", "text": "public function separate()\n {\n $this->line('----------------------------------');\n return $this;\n }", "title": "" }, { "docid": "dc91c08c49fc4ac05d0222ebb4951bf0", "score": "0.5736201", "text": "private function addDivider(ItemInterface $menu)\n {\n $menu->addChild('divider-' . rand(1, 99999))\n ->setLabel('')\n ->setExtra('divider', true)\n ->setExtra('position', 15); // after manage report, we have 10 there\n }", "title": "" }, { "docid": "14020cef2bfab1e6fab75f10b5832c19", "score": "0.57254666", "text": "function add_separator($arr = array())\n\t{\n\t\tif (empty($arr[\"parent\"]))\n\t\t{\n\t\t\t$arr[\"parent\"] = $this->menu_id;\n\t\t}\n\n\t\tif (!isset($this->menus[$arr[\"parent\"]]))\n\t\t{\n\t\t\t$this->menus[$arr[\"parent\"]] = \"\";\n\t\t}\n\t\t\n\t\tif (!isset($this->items[$arr[\"parent\"]]))\n\t\t{\n\t\t\t$this->items[$arr[\"parent\"]] = array();\n\t\t}\n\t\t$this->items[$arr[\"parent\"]][] = array_merge($arr, array(\"separator\" => true));\n\n\t\t$this->menus[$arr[\"parent\"]] .= '<div class=\"menuItemSep\"></div>'.\"\\n\";\n\t}", "title": "" }, { "docid": "9c522488eb444239a4b046e44ad128b3", "score": "0.5694086", "text": "function add_admin_menu_separator($position) {\n\n\tglobal $menu;\n\t$index = 0;\n\n\tforeach($menu as $offset => $section) {\n\t\tif (substr($section[2],0,9)=='separator')\n\t\t\t$index++;\n\t\tif ($offset>=$position) {\n\t\t\t$menu[$position] = array('','read',\"separator{$index}\",'','wp-menu-separator');\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tksort( $menu );\n}", "title": "" }, { "docid": "4a320984143fe05c0d01a6dd1c4cd82c", "score": "0.569365", "text": "protected function get_separator_position() { ?>\n\t\t<div class=\"uael-separator-wrapper\">\n\t\t\t<span class=\"uael-separator\"></span>\n\t\t</div>\n\t\t<?php\n\t}", "title": "" }, { "docid": "d1c963151384e850ed159cb3afe80ddf", "score": "0.56243944", "text": "public function setSeparator($separator);", "title": "" }, { "docid": "8ffe038865880d509f49be73faeb4799", "score": "0.5587246", "text": "function zen_draw_separator($image = 'true', $width = '100%', $height = '1') {\n\n // set default to use from template - zen_image will translate if not found in current template\n if ($image == 'true') {\n $image = DIR_WS_TEMPLATE_IMAGES . OTHER_IMAGE_BLACK_SEPARATOR;\n } else {\n if (!strstr($image, DIR_WS_TEMPLATE_IMAGES)) {\n $image = DIR_WS_TEMPLATE_IMAGES . $image;\n }\n }\n return zen_image($image, '', $width, $height);\n }", "title": "" }, { "docid": "ef5354fc96a04ed662db84496d4cab44", "score": "0.55671597", "text": "function add_admin_menu_separator( $position ) {\n\n global $menu;\n\n $menu[ $position ] = array(\n 0 => '',\n 1 => 'read',\n 2 => 'separator' . $position,\n 3 => '',\n 4 => 'wp-menu-separator'\n );\n\n}", "title": "" }, { "docid": "6b502b6dbeb290b7f63c6c981f94b28b", "score": "0.55348104", "text": "function crumble_divider_1px_dashed($atts, $content = null) {\r\n\treturn '<div class=\"divider-1px-dashed\"></div><div class=\"clear\"></div>';\r\n}", "title": "" }, { "docid": "e439a54843ea4f47f6ebf1e0aad9aece", "score": "0.5481527", "text": "public function drawSeparationLine($options = [\n 'padding-top' => true,\n 'padding-bottom' => true,\n 'fg' => 'grey',\n 'bg' => 'black',\n 'middle' => '',\n ])\n {\n $defaultOptions = [\n 'padding-top' => true,\n 'padding-bottom' => true,\n 'fg' => 'grey',\n 'bg' => 'black',\n 'middle' => '',\n ];\n\n $options = array_merge($defaultOptions, $options);\n $padLength = 25;\n $sides = 2;\n $length = strlen($options['middle']) + ($sides * $padLength);\n $line = str_pad($options['middle'], $length, '-', STR_PAD_BOTH);\n $line = $options['padding-top'] ? \"\\n\".$line : $line;\n $line = $options['padding-bottom'] ? $line.\"\\n\" : $line;\n\n $this->writeln($line);\n }", "title": "" }, { "docid": "1072fd64368b0b012d21efe24ec2fd2d", "score": "0.54727113", "text": "public function getDividerCssClass()\r\n\t{\r\n\t\treturn 'divider';\r\n\t}", "title": "" }, { "docid": "1c2cfdb961f393bb0d14f1d3520e96d3", "score": "0.54649305", "text": "public static function navbarMenuDivider($htmlOptions = array())\n {\n\n $htmlOptions = self::addClassName('divider-vertical', $htmlOptions);\n return CHtml::tag('li', $htmlOptions);\n }", "title": "" }, { "docid": "34a6087c89963cd17dfc253ee0c9e427", "score": "0.5456604", "text": "public static function getSeparator()\n {\n return static::$sSeparator;\n }", "title": "" }, { "docid": "0cbdf0597e1e67f810827c80ae1f0dac", "score": "0.54435664", "text": "public function getSeparator()\n {\n return $this->separator;\n }", "title": "" }, { "docid": "0cbdf0597e1e67f810827c80ae1f0dac", "score": "0.54435664", "text": "public function getSeparator()\n {\n return $this->separator;\n }", "title": "" }, { "docid": "fea5c4f335760d687c2e90d9a0f7af19", "score": "0.54408807", "text": "public function getDividerWrapper()\n {\n }", "title": "" }, { "docid": "668a7f6c7753000d6a82cdac2d03c43a", "score": "0.5432013", "text": "function sectionSeparator() {\n\t\tglobal $LANG;\n\t\t$arrSeparator[] = '<table>';\n\t\t$arrSeparator[] = '<tr>';\n\t\t$strChecked = (isset($this->arrModParameters['separator']['tab']))?'checked=\"checked\"':'';\n\t\t$arrSeparator[] = '<td><input type=\"checkbox\" name=\"'.$this->pObj->strExtKey.'[separator][tab]\" value=\"1\"' . $strChecked . ' /></td><td width=\"25%\">'.$LANG->getLL('separator_tab').'</td>';\n\t\tif (!isset($this->arrModParameters['submit'])) {\n\t\t\t$strChecked = ' checked=\"checked\"';\n\t\t} else {\n\t\t\t$strChecked = (isset($this->arrModParameters['separator']['comma']))?' checked=\"checked\"':'';\n\t\t}\n\t\t$arrSeparator[] = '<td><input type=\"checkbox\" name=\"'.$this->pObj->strExtKey.'[separator][comma]\" value=\"1\"' . $strChecked . ' /></td><td width=\"25%\">'.$LANG->getLL('separator_comma').'</td>';\n\t\t$strChecked = (isset($this->arrModParameters['separator']['other']))?' checked=\"checked\"':'';\n\t\t$arrSeparator[] = '<td><input type=\"checkbox\" name=\"'.$this->pObj->strExtKey.'[separator][other]\" value=\"1\"' . $strChecked . ' /></td><td width=\"25%\">'.$LANG->getLL('separator_other').'</td>';\n\t\t$strValue = $this->arrModParameters['separator']['other_value']!=''?$this->arrModParameters['separator']['other_value']:'';\n\t\t$arrSeparator[] = '<td width=\"25%\"><input type=\"text\" name=\"'.$this->pObj->strExtKey.'[separator][other_value]\" value=\"' . $strValue . '\" /></td>';\n\t\t$arrSeparator[] = '</tr>';\n\t\t$arrSeparator[] = '<tr>';\n\t\t$strChecked = (isset($this->arrModParameters['separator']['semicolon']))?' checked=\"checked\"':'';\n\t\t$arrSeparator[] = '<td><input type=\"checkbox\" name=\"'.$this->pObj->strExtKey.'[separator][semicolon]\" value=\"1\"' . $strChecked . ' /></td><td>'.$LANG->getLL('separator_semicolon').'</td>';\n\t\t$strChecked = (isset($this->arrModParameters['separator']['space']))?' checked=\"checked\"':'';\n\t\t$arrSeparator[] = '<td><input type=\"checkbox\" name=\"'.$this->pObj->strExtKey.'[separator][space]\" value=\"1\"' . $strChecked . ' /></td><td>'.$LANG->getLL('separator_space').'</td>';\n\t\t$arrSeparator[] = '<td></td><td>'.$LANG->getLL('separator_delimiter').'</td>';\n\t\tif (!isset($this->arrModParameters['submit'])) {\n\t\t\t$strValue = '&quot;';\n\t\t} else {\n\t\t\t$strValue = $this->arrModParameters['separator']['delimiter']!=''?htmlspecialchars($this->arrModParameters['separator']['delimiter']):'';\n\t\t}\n\t\t$arrSeparator[] = '<td><input type=\"text\" name=\"'.$this->pObj->strExtKey.'[separator][delimiter]\" value=\"' . $strValue . '\" maxlength=\"1\" /></td>';\n\t\t$arrSeparator[] = '</tr>';\n\t\t$arrSeparator[] = '</table>';\n\t\t$strOutput = $this->pObj->objDoc->section($LANG->getLL('separator_options'),t3lib_BEfunc::cshItem('_MOD_'.$GLOBALS['MCONF']['name'],'export_separator',$GLOBALS['BACK_PATH'],'|<br/>').implode(chr(13),$arrSeparator),0,0);\n\t\t$strOutput .= $this->pObj->objDoc->divider(10);\n\t\treturn $strOutput;\n\t}", "title": "" }, { "docid": "744d3e6d786a0b3632e74e3d938e863f", "score": "0.5431078", "text": "public function getPartitionSeparator(): string;", "title": "" }, { "docid": "63eb665eb7af49edf4910ec9f30ee394", "score": "0.542884", "text": "function sockman_add_admin_menu_separator( $number ) {\n\n\tglobal $menu;\n\n\t$menu[] = array(\n\t\t0\t=> '',\n\t\t1\t=> 'read',\n\t\t2\t=> 'separator' . $number,\n\t\t3\t=> '',\n\t\t4\t=> 'wp-menu-separator',\n\t);\n}", "title": "" }, { "docid": "5fcabab04cd6e416fbb53a471d2a2a6b", "score": "0.5423621", "text": "public function render() {\n\t\treturn '<li class=\"uk-nav-divider\"></li>';\n\t}", "title": "" }, { "docid": "b3c2d26f7add90d83164cb4578c7a039", "score": "0.54229003", "text": "function et_bbp_breadcrumb_sep() {\n $args['sep'] = '<i class=\"et-icon et-right-arrow\"></i>';\n $args['before'] = '<div class=\"bbp-breadcrumb\">';\n $args['after'] = '</div>';\n return $args;\n}", "title": "" }, { "docid": "09291d472dae98175199e71c4e99e11f", "score": "0.5402922", "text": "function bfg_wpseo_breadcrumb_separator($sep) {\n\n\treturn bfg_get_inline_icon('angle-right');\n\n}", "title": "" }, { "docid": "224ef2269c58d9f1ff45af6509225a9a", "score": "0.5383333", "text": "public function testSeparator() {\n\t\t\t$builder = new StringBuilder('Hello');\n\n\t\t\t$builder->setSeparator(' ')->append('World');\n\t\t\t$this->assertEquals('Hello World', $builder->__toString());\n\n\t\t\t$builder->prepend('Extra');\n\t\t\t$this->assertEquals('Extra Hello World', $builder->__toString());\n\n\t\t\tunset($builder);\n\t\t}", "title": "" }, { "docid": "6380c1f967644a679e167b962cfcb6f9", "score": "0.53425527", "text": "function getDashedLine($tabSizes)\n{\n $numOfDashes = 0;\n $dashedLine = '';\n foreach ($tabSizes as $size) {\n $numOfDashes += $size * TAB_WIDTH;\n }\n for ($i=0; $i < $numOfDashes; $i++) { \n $dashedLine .= '-';\n }\n return $dashedLine;\n}", "title": "" }, { "docid": "30b495bdd5abdfcd5b5880a917338708", "score": "0.53418815", "text": "private function printSpacer(): void\n {\n for ($i = 0; $i < $this->config['spacing']; $i++) {\n fwrite(\n $this->handle,\n sprintf(\n '%s%s%s',\n $this->getIndent(),\n $this->config['trunk'],\n PHP_EOL\n )\n );\n }\n }", "title": "" }, { "docid": "614c769a04983bde0bad6e786283e31a", "score": "0.5317247", "text": "function testSeparator(){\n\t\t#mdx:Separator\n\t\t$select = new HtCklist(\"select_days\");\n\t\t$select->options([1=>'Mon',2=>'Tue',3=>'Wed',4=>'Thu',5=>'Fri',6=>'Sat'])\n\t\t\t->separator(\"&nbsp;&nbsp;\");\n\n\t\t#/mdx echo $select\n\t\t$this->expectOutputRegex(\"/input.*?select_days.*?Mon.*?\".preg_quote('&nbsp;&nbsp;').\".*?Tue/s\");\n\t\techo $select;\t\t\n\t}", "title": "" }, { "docid": "32f59934e1909c34a34ccc66358dbaba", "score": "0.5303712", "text": "public function getSeparator() {\n return $this->_separator;\n }", "title": "" }, { "docid": "4628c097d4d8e6b4e2028f333f65605a", "score": "0.52890533", "text": "public function separator($margin = 15) : Builder\n {\n //Set the raw html\n $this->constructor[] = '<li style=\"margin-right: ' . $margin . 'px;\"></li>';\n\n return $this;\n }", "title": "" }, { "docid": "9c5093ef6dbb029be310981f92e67196", "score": "0.52591777", "text": "function breadcrumb_separator( $separator ) {\n\treturn '';\n}", "title": "" }, { "docid": "da04a8b87bab5a1a5ae137b1bd53423c", "score": "0.5245075", "text": "function sc_separator( $atts, $content = NULL ) {\n\textract( shortcode_atts( array( 'style' => 'regular' ), $atts ) );\n\tif( $style == 'regular' ) return '<hr />';\n\telse return '<div class=\"separator-' . $style . '\"></div>';\n}", "title": "" }, { "docid": "6c09fbc03595833a4e0dfdd3131ed36d", "score": "0.524197", "text": "function graficoLinha() {\n $maxValue = $this->desenhaBase();\n\n $labelY = $this->margem;\n $idx = 0;\n foreach ($this->vetor as $label => $item) {\n $idx++;\n $color = $this->getColor($idx);\n $this->desenhaLinha($item, $color, $maxValue);\n $this->desenhaLabel($label, $color, $labelY);\n $labelY += ($this->margem * 2);\n }\n }", "title": "" }, { "docid": "7c3d2cd945e77c21111cf83a655cff6a", "score": "0.5236302", "text": "public function build()\n\t{\n\t\t$html = \"\";\n\n\t\t// get the HTML structure from each child of the separator\n\t\tforeach ($this->menu as $c)\n\t\t{\n\t\t\tif ($c instanceof SeparatorItemShape)\n\t\t\t{\n\t\t\t\t// get the HTML if the child is a separator\n\t\t\t\t$html .= $c->build();\n\t\t\t}\n\t\t\telse if ($c instanceof MenuItemShape)\n\t\t\t{\n\t\t\t\t// get the HTML if the child is a menu item\n\t\t\t\t$html .= $c->buildHtml();\n\t\t\t}\n\t\t}\n\n\t\t// build the structure of the separator, which will contain the evaluated $html\n\t\treturn $this->buildHtml($html);\n\t}", "title": "" }, { "docid": "02e9451cd3d09279256a27c22b492a77", "score": "0.5233412", "text": "private function divider(int $width = self::DIVIDER_WIDTH): string\r\n {\r\n return str_repeat(self::DIVIDER_CHARACTER, $width);\r\n }", "title": "" }, { "docid": "380baf70741ed56bb69a5368a506c944", "score": "0.52099496", "text": "function _getHeaderLine()\r\n\t{\r\n\t\t// Make sure column count is correct\r\n\t\tfor ($i=0; $i<$this->_max_cols; $i++) {\r\n\t\t\tif (!isset($this->_headers[$i])) {\r\n\t\t\t\t$this->_headers[$i] = '';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor ($i=0; $i<count($this->_headers); $i++) {\r\n\t\t\tif (strlen($this->_headers[$i]) < $this->_cell_lengths[$i]) {\r\n\t\t\t\t$this->_headers[$i] = str_pad($this->_headers[$i], $this->_cell_lengths[$i], ' ');\r\n\t\t\t}\r\n\t\t}\r\n\t\t\t\r\n\t\t$row_begin = '|' . str_repeat(' ', $this->_padding);\r\n\t\t$row_end = str_repeat(' ', $this->_padding) . '|';\r\n\t\t$implode_char = str_repeat(' ', $this->_padding) . '|' . str_repeat(' ', $this->_padding);\r\n\r\n\t\t$return[] = $this->_getSeparator();\r\n\t\t$return[] = $row_begin . implode($implode_char, $this->_headers) . $row_end;\r\n\r\n\t\treturn implode(\"\\r\\n\", $return);\r\n\t}", "title": "" }, { "docid": "4737649bffa0fb7ac890d03705755f63", "score": "0.51760274", "text": "function pxlz_edgtf_register_separator_widget($widgets) {\n $widgets[] = 'PxlzEdgefSeparatorWidget';\n\n return $widgets;\n }", "title": "" }, { "docid": "3a793894a7ef5862667a05d74196ff75", "score": "0.51582795", "text": "public function setTitleSeparator(string $separator);", "title": "" }, { "docid": "c9388db785849c6b4dcaf25bd137ad35", "score": "0.5158179", "text": "public function renderLineGroup(): string {\n $result = \"\";\n\n // Look ahead and get all of the line terminators.\n $terminatorIndex = 0;\n $terminators = $this->getLineTerminators();\n $terminator = $terminators[$terminatorIndex];\n\n // Grab the first line terminator and start the line.\n $result .= $terminator->renderLineStart();\n\n foreach ($this->blotsAndGroups as $index => $blot) {\n if ($blot instanceof AbstractLineTerminatorBlot) {\n // Render out the content of the line terminator (maybe nothing, maybe extra newlines).\n $result .= $terminator->render();\n\n if ($blot instanceof NestingParentRendererInterface) {\n $result .= $blot->renderNestedGroups();\n }\n\n // End the line.\n $result .= $terminator->renderLineEnd();\n\n // Start the next line.\n $terminatorIndex++;\n $terminator = $terminators[$terminatorIndex] ?? null;\n if ($terminator !== null) {\n $result .= $terminator->renderLineStart();\n }\n } else {\n // Render out inline blots.\n $result .= $blot->render();\n }\n }\n\n return $result;\n }", "title": "" }, { "docid": "10070fe53ab7cd556928f9bf5fb41450", "score": "0.5145385", "text": "private function is_table_divider($line){\n return strlen($line) && $line[0] == '+';\n }", "title": "" }, { "docid": "ae59521ad7116255c6ef3f803fc296cb", "score": "0.5141514", "text": "function separation (){\n echo '<hr>'; // fonction tirer un trait \n}", "title": "" }, { "docid": "ef1a76475e90b1142750a3f910a65cd3", "score": "0.5121989", "text": "public function emptyLine()\n\t{\n\t\t//return \"\\t\\t\\t\".'<td colspan=\"2\">&nbsp;</td>'.\"\\n\";\n\t}", "title": "" }, { "docid": "a6c3501f5423b5b6eeb3c04598f9667b", "score": "0.5115935", "text": "protected function _render_delimited($menu)\n\t{\n\t\t// filter out hidden ones first. Need to do in separate loop in case there is a hidden one at the end\n\t\t$menu = $this->_filter_hidden($menu);\n\t\t\n\t\tif ($this->container_tag !== FALSE)\n\t\t{\n\t\t\t$this->container_tag = 'div';\n\t\t}\n\t\tif (empty($this->delimiter))\n\t\t{\n\t\t\t$this->delimiter = ' &nbsp;|&nbsp; ';\n\t\t}\n\n\t\t$links = array();\n\t\tforeach($menu as $val)\n\t\t{\n\t\t\tif (!empty($this->item_id_prefix))\n\t\t\t{\n\t\t\t\tif (is_array($val['attributes']))\n\t\t\t\t{\n\t\t\t\t\tif (!in_array('id', $val['attributes']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$val['attributes']['id'] = $this->_get_id($val);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (strpos($val['id'], 'id=') === FALSE)\n\t\t\t\t{\n\t\t\t\t\t$val['attributes'] .= ' id=\"'.$this->_get_id($val).'\"';\n\t\t\t\t}\n\t\t\t}\n\t\t\t$links[] = $this->_create_link($val, $val['id']);\n\t\t}\n\t\t$str = implode($this->delimiter, $links);\n\t\t\n\t\t$return = '';\n\t\tif (!empty($str))\n\t\t{\n\t\t\tif (!empty($this->container_tag)) $return .= \"\\n<\".$this->container_tag.$this->_get_attrs($this->container_tag_attrs);\n\t\t\tif (!empty($this->container_tag_id)) $return .= \" id=\\\"\".$this->container_tag_id.\"\\\"\";\n\t\t\tif (!empty($this->container_tag_class)) $return .= \" class=\\\"\".$this->container_tag_class.\"\\\"\";\n\t\t\tif (!empty($this->container_tag)) $return .= \">\\n\";\n\t\t\t\n\t\t\t$return .= $str;\n\t\t\tif (!empty($this->container_tag)) \t$return .= \"</\".$this->container_tag.\">\\n\";\n\t\t}\n\t\t\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "efb719b85acd21ab333f5c78bd751bc8", "score": "0.5096878", "text": "function filter_wpseo_breadcrumb_separator($this_options_breadcrumbs_sep) {\n return '<i class=\"fas fa-angle-right fa-sm\"></i>';\n}", "title": "" }, { "docid": "18ee8b4426c404061b5f74961e4ddb9d", "score": "0.50724274", "text": "public function linebreak(): self\n {\n $this->glue();\n return $this;\n }", "title": "" }, { "docid": "346c273b727e3485e6d7f1560ce2a277", "score": "0.5070672", "text": "public function getCustomLineItems();", "title": "" }, { "docid": "f7de69433526f16db6d1ce3dece3cf56", "score": "0.5067857", "text": "public function getLineItems();", "title": "" }, { "docid": "f7de69433526f16db6d1ce3dece3cf56", "score": "0.5067857", "text": "public function getLineItems();", "title": "" }, { "docid": "9d1703b1c1b11e7677a66ee88fc478a8", "score": "0.5067345", "text": "public static function divider($width='100%', $margin='15px') {\n return \"<div class='x2-divider' style='width:100%;max-width:$width; margin-top: $margin; margin-bottom: $margin'></div>\";\n }", "title": "" }, { "docid": "ac58ad56acd79d59df4a615ccc378e0e", "score": "0.5066023", "text": "function addDivider(& $divider, & $parentElement) {\n\t\t$dividerElement =& $this->_document->createElement('divider');\n\t\t$parentElement->appendChild($dividerElement);\n\t\t\n\t\t// history\n\t\t$history =& $this->_document->createElement('history');\n\t\t$dividerElement->appendChild($history);\n\t\t$this->gethistory($divider, $history);\n\t\n\t\t// permissions\n\t\t$permissions =& $this->_document->createElement('permissions');\n\t\t$hasPerms = $this->getPermissions($divider, $permissions);\n\t\tif ($hasPerms)\n\t\t\t$dividerElement->appendChild($permissions);\n\t\t\n\t\tif ($divider->getField('location') == 'right')\n\t\t\t$dividerElement->setAttribute('location', 'right');\n\t\telse\n\t\t\t$dividerElement->setAttribute('location', 'left');\n\t}", "title": "" }, { "docid": "b2eef46449a7beb81bda0b963beaf900", "score": "0.50633216", "text": "public function getHeaderSeparator()\n {\n return self::HEADER_SEPARATOR;\n }", "title": "" }, { "docid": "ea14ec48e87d4e78b74722af084685ca", "score": "0.5046672", "text": "public function __construct()\n {\n parent::__construct();\n $this->setSeparator(PHP_EOL);\n }", "title": "" }, { "docid": "3c61aa712a9ce31cc0f09c5677fa08ae", "score": "0.5046664", "text": "private static function line_arrangement($data)\n {\n if ( ! empty($data))\n {\n ob_start();\n\n foreach ($data as $item)\n {\n $item_indexed = array_values($item);\n $item_indexed_size = count($item_indexed);\n $value = '';\n\n for ($i=0; $i<$item_indexed_size; $i++)\n {\n $value .= $item_indexed[$i] . ';';\n }\n\n echo $value . \"\\r\\n\";\n }\n }\n\n return FALSE;\n }", "title": "" }, { "docid": "499f0aeec7d32941bfcb760f414f1c78", "score": "0.50304157", "text": "public function addLine() {\n $this->drawLine($this->_leftMargin, $this->_yPosition, $this->_rightMargin, $this->_yPosition);\n //déplacement du curseur vers le bas de 15 pixels\n $this->_yPosition -= 15;\n }", "title": "" }, { "docid": "c4388d416030bbb0fcf07eee4dcb7ebd", "score": "0.5025052", "text": "protected function register_content_separator() {\n\t\t$this->start_controls_section(\n\t\t\t'section_separator',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Separator', 'uael' ),\n\t\t\t\t'tab' => Controls_Manager::TAB_CONTENT,\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'separator_settings',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Separator', 'uael' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::SWITCHER,\n\t\t\t\t'label_on' => __( 'Show', 'uael' ),\n\t\t\t\t'label_off' => __( 'Hide', 'uael' ),\n\t\t\t\t'return_value' => 'yes',\n\t\t\t\t'default' => 'yes',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'separator_position',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Position', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'default' => 'below_desig',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'below_name' => __( 'Below Name', 'uael' ),\n\t\t\t\t\t'below_desig' => __( 'Below Designation', 'uael' ),\n\t\t\t\t\t'below_desc' => __( 'Below Description', 'uael' ),\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'separator_settings' => 'yes',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'separator_size',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Width', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'size_units' => array( 'px', '%' ),\n\t\t\t\t'range' => array(\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 1000,\n\t\t\t\t\t),\n\t\t\t\t\t'%' => array(\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'default' => array(\n\t\t\t\t\t'size' => '20',\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .uael-separator ' => 'width: {{SIZE}}{{UNIT}};',\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'separator_settings' => 'yes',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'separator_thickness',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Thickness', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'size_units' => array( 'px', 'em', 'rem' ),\n\t\t\t\t'range' => array(\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t\t'max' => 10,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'default' => array(\n\t\t\t\t\t'size' => 2,\n\t\t\t\t\t'unit' => 'px',\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'separator_settings' => 'yes',\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .uael-separator' => 'border-top-width: {{SIZE}}{{UNIT}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'separator_color',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Color', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'scheme' => array(\n\t\t\t\t\t'type' => Scheme_Color::get_type(),\n\t\t\t\t\t'value' => Scheme_Color::COLOR_4,\n\t\t\t\t),\n\t\t\t\t'default' => '',\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .uael-separator' => 'border-top-color: {{VALUE}};',\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'separator_settings' => 'yes',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->end_controls_section();\n\t}", "title": "" }, { "docid": "449b1fec52015064e81e00c31c1b5366", "score": "0.5018198", "text": "private function createCsvLine()\n {\n $schemeId = $this->invoice->getSchemeId();\n $line = array_merge($this->createBlancos(), array(\n 'A' => 1,\n 'B' => $this->customer->getKlantcode($schemeId),\n 'E' => $this->customer->getFirmanaam(), \n 'H' => $this->customer->getStraatNummerBus(),\n 'I' => $this->customer->getPostcode(),\n 'J' => $this->customer->getGemeente(),\n 'K' => $this->customer->getLandcode(),\n 'L' => $this->customer->getLandnaam(),\n 'M' => $this->customer->getTelefoon(), \n 'N' => $this->customer->getFax(),\n 'O' => $this->customer->getEmail(),\n 'P' => $this->customer->getFactuurEmail(),\n 'Q' => $this->customer->getBtwNummer(),\n 'R' => $this->customer->getBankrekening(),\n 'S' => $this->customer->getCodeValuta(),\n 'AG' => $this->customer->getBtwStatus(),\n 'AW' => $this->customer->getOndernemingsnummer()\n ));\n \n return implode(\"\\t\", $line);\n }", "title": "" }, { "docid": "517ef57ed422c184a803a211dd0dc76c", "score": "0.50056946", "text": "public function lineThrough()\n {\n $this->label.= '9;';\n return $this;\n }", "title": "" }, { "docid": "59bd2a4d9d35f3ac1aded3fc9760bec9", "score": "0.50047207", "text": "public function renderItems()\n {\n $this->dataProvider->setPagination(false);\n\n $rows=[];\n $this->renderLevel($rows,0,0);\n\n return implode($this->separator, $rows);\n }", "title": "" }, { "docid": "1d43fa75130efee3238bf8c11d94719c", "score": "0.49951833", "text": "public function getVerticalLine() {\n\t\treturn $this->vertical_line;\n\t}", "title": "" }, { "docid": "4bdbd30b3c3e72911b4d658f7e99d07b", "score": "0.49862236", "text": "final public function lineThrough(): static\n {\n $content = sprintf(\"\\e[9m%s\\e[0m\", $this->content);\n\n return new static($this->output, $content, $this->properties);\n }", "title": "" }, { "docid": "99707425293b04bfd4cd234c1b0ee9de", "score": "0.4977051", "text": "function bp_docs_get_breadcrumb_separator( $context = 'doc' ) {\n\t// Default value is a right-facing triangle\n\treturn apply_filters( 'bp_docs_breadcrumb_separator', '&#9656;', $context );\n}", "title": "" }, { "docid": "fcf1370043819f9a5b8bc66948198404", "score": "0.49733815", "text": "public function render_delimited($items, $active = NULL, $parent_id = NULL)\n\t{\n\t\treturn $this->render($items, $active, $parent_id, 'delimited');\n\t}", "title": "" }, { "docid": "9133a6716bd991512c4e70e72db9a359", "score": "0.49659762", "text": "function listSmall_YlineDiagram($yleft, $ytop)\n{\n $sum = $yleft;\n for ($i=0; $i <= 60 ; $i++) {\n $result[] = array('y_small_margin_left' => $sum, 'y_small_margin_top' => $ytop);\n $sum += 5;\n }\n\n return $result;\n}", "title": "" }, { "docid": "bf4856a4e5a191efcfba445872aaee0c", "score": "0.49539974", "text": "public function add_separation() {\r\n\t\t$this->_separation = true;\r\n\t}", "title": "" }, { "docid": "cc98c958d4f89ee81f7f3b1598de1938", "score": "0.49454355", "text": "protected function lineBreak() {\n\n return PHP_EOL;\n }", "title": "" }, { "docid": "18daa07ab40f9dba51ca050d68dc3798", "score": "0.49404085", "text": "protected function newLine()\n {\n\n return $this->isPretty() ? \"\\n\" : '';\n }", "title": "" }, { "docid": "5f45be18a4669c83ad86876701ef3725", "score": "0.49334607", "text": "public static function menuDivider($htmlOptions = array())\n {\n\n $htmlOptions = self::addClassName('divider', $htmlOptions);\n return CHtml::tag('li', $htmlOptions);\n }", "title": "" }, { "docid": "d50e3370095fa13df5efead82ea37e42", "score": "0.4911433", "text": "protected function generateLogLine()\n {\n $values = array('%separator%' => '|');\n\n foreach ($this->error->toArray() as $key => $value)\n {\n $values[sprintf('%%%s%%', $key)] = $value;\n }\n\n return strtr($this->configuration['line_pattern'], $values) . \"\\n\";\n }", "title": "" }, { "docid": "0386f8facdcab574087261db06ce7e36", "score": "0.49101746", "text": "function bridge_qode_register_separator_widget( $widgets ) {\n $widgets[] = 'BridgeQodeSeparator';\n\n return $widgets;\n }", "title": "" }, { "docid": "37178d0b19030819284531315b5839ba", "score": "0.4891299", "text": "protected function blockDelimiter()\n\t{\n\t\treturn '';\n\t}", "title": "" }, { "docid": "ec3d50beaf98f069f2578584e7877f0c", "score": "0.4891249", "text": "public static function getRandomSeparator()\n {\n return self::SYMBOLS[mt_rand(0, count(self::SYMBOLS) - 1)];\n }", "title": "" }, { "docid": "13963e62f6b61875485d460b2f7a4ee0", "score": "0.4878897", "text": "public function ignoreVerticalSpace(): void\n {\n while (!$this->isEnd() && $this->currentAscii()->isVerticalSpace()) {\n $this->next();\n }\n }", "title": "" }, { "docid": "36c5639c0bd4081f0e776d567204f7d1", "score": "0.48745134", "text": "function drawWhiteSpace($height) {\n $this->SetY($this->GetY()+$height);\n }", "title": "" }, { "docid": "332537d569045f403ebc6e5013af7742", "score": "0.48709604", "text": "abstract function GetBatchSeperator();", "title": "" }, { "docid": "61946cafbc379337c9fd1cec511b1af7", "score": "0.4847548", "text": "public function formatBreak() {\n $this->textBuf .= $this->getParam(self::EOL);\n $this->newBreak = true;\n }", "title": "" }, { "docid": "2fc395df8a0bde2ad4a6fb37998adc9f", "score": "0.48357943", "text": "protected function drawPipesEnd()\n\t{\n\t\t$pipes = array_reverse($this->pipes);\n\n\t\tforeach ($pipes as $pipe)\n\t\t{\n\t\t\t$this->drawBordered(\n\t\t\t\t$this->geometry->getSpacedPipe($pipe, static::NOCK, 'after()')\n\t\t\t);\n\n\t\t\t$this->drawBorderBottom();\n\t\t}\n\t}", "title": "" }, { "docid": "3ab545a51a736061c5a441aee8794d49", "score": "0.483149", "text": "public function indent($count = 4);", "title": "" }, { "docid": "4eabb3e205746679bda80503883829c5", "score": "0.48279932", "text": "public function displayGridlines() {\n\t}", "title": "" }, { "docid": "c9f67952216d56af49b140dc3cc94004", "score": "0.4822123", "text": "public function getSeedSeparator()\n {\n return $this->_seedSeparator;\n }", "title": "" }, { "docid": "64f80148d908eb4c5f37bac689039928", "score": "0.48208863", "text": "function drawHorizontalLine() {\n $starting_x = $this->GetX();\n $starting_y = $this->GetY();\n \n $this->Line($this->lMargin, $starting_y, $this->lMargin + $this->PageWidth(), $starting_y);\n }", "title": "" }, { "docid": "2a8d2f2225bfc65a8ce72e4861a17e55", "score": "0.4800757", "text": "public function getSeparatorCharacter()\n\t{\n\t\treturn '_';\n\t}", "title": "" }, { "docid": "cf14f4bb3be3869ac796b88f5b9a1d71", "score": "0.47993052", "text": "public function getSubIndentLine():self\n\t{\n\t\treturn new static(ltrim($this->getContent(),' '));\n\t}", "title": "" }, { "docid": "fd24db5f525973e15f27935ea9f44487", "score": "0.4793101", "text": "public function newLine()\r\n\t{\r\n\t\t$this->_lineBody++;\r\n\t\t\r\n\t\t// on vérifie _maxCols et on reset _currentCols\r\n\t\t$this->_maxCols = max(array($this->_currentCol, $this->_maxCols));\r\n\t\t$this->_currentCol = 0;\r\n\t}", "title": "" }, { "docid": "c71ec767399ceae9eb7f6e312b749e9d", "score": "0.47868043", "text": "public function printGridlines() {\n\t}", "title": "" }, { "docid": "23c98ae6cc1174fde452fb15b8e9bffb", "score": "0.4784272", "text": "function listYLineDiagram($yleft, $ytop)\n{\n $result = array();\n $sum = $yleft;\n for ($i=0; $i < 7; $i++) {;\n $result[] = array('ymargin_left' => $sum, 'ymargin_top' => $ytop);\n $sum += 50;\n }\n\n return $result;\n}", "title": "" }, { "docid": "1a3983c34c1e0db40bc9771b036061db", "score": "0.47831243", "text": "public function test_can_create_list_with_other_marker()\n\t{\n\t\t$this->assertSame(\"* First\\n* Second\\n* Third\", Markdown::ul( $this->list, '*' ) );\n\t\t$this->assertSame(\"- First\\n- Second\\n- Third\", Markdown::ul( $this->list, '-' ) );\n\t\t$this->assertSame(\"+ First\\n+ Second\\n+ Third\", Markdown::ul( $this->list, '+' ) );\n\t\t$this->assertSame(\"* First\\n* Second\\n* Third\", Markdown::ul( $this->list, ';' ) );\n\t}", "title": "" }, { "docid": "2022241500e94bb791909ab2659e5a41", "score": "0.47784463", "text": "public function drawEndOptionsPanel()\r\n {\r\n echo ' </ul>\r\n </div>';\r\n }", "title": "" }, { "docid": "cec3f16db69af0cd830169331446176a", "score": "0.47560504", "text": "protected function _renderItemSku()\n {\n return implode('<br />', $this->helper('catalog')->splitSku($this->htmlEscape($this->getItem()->getSku())));\n }", "title": "" } ]
19cd21d42b68ded8136188028bd44ba0
Test background color of column, warning
[ { "docid": "d1d0427544b4d04b437c3391b8b0f098", "score": "0.6469112", "text": "public function testBackgroundWarning()\n {\n $view_helper = new Bootstrap4Column();\n $view_helper->__invoke('[Content]')->setBgStyle('warning')->md(6);\n $this->assertEquals('<div class=\"col-md-6 bg-warning\">[Content]</div>', $view_helper->__toString());\n }", "title": "" } ]
[ { "docid": "6e1919b69c0f02badf580a3c1c9166e1", "score": "0.6167157", "text": "function checkColor($missValide) {\n if($missValide == 'Validée ✅') {\n return $background = '#2ecc71';\n } else {\n return $background = '#f39c12';\n }\n}", "title": "" }, { "docid": "4b90c86678ee7d277d6b27abe9c6eb85", "score": "0.604817", "text": "public function hasClothcolor(){\n return $this->_has(11);\n }", "title": "" }, { "docid": "cb17d11715d75ea1cc402ca428535f4e", "score": "0.59306234", "text": "public function hasCurcolor(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "288f380870eb0e87136a20d34b88b7db", "score": "0.58352494", "text": "function apply_chequered_colors($col, $row, $cell_light, $cell_dark)\n{\n\tif ((($col % 2) && !($row % 2))\n\t\t|| (!($col % 2) && ($row % 2)))\n\t\treturn $cell_light;\n\telse\n\t\treturn $cell_dark;\n}", "title": "" }, { "docid": "06fa4a4fcd672767b2d3c61437ba7593", "score": "0.5793784", "text": "public function knowthycolor(){\n\t\t//this function would call the setbgcolor\n\n\t\t$today =strtotime(date('Y-m-d'));\n\t\tif(!$this->start){\n\t\t\treturn false;\n\t\t}\n\n\t\tif($today>strtotime($this->end)){\n\t\t\t//the test is past the Reccomended Max Storage\n\t\t\t//know if the test has been touched\n\t\t\tif($this->status==2)\n\t\t\t\t$this->setbgcolor(1);\n\t\t\telseif($this->status==1)\n\t\t\t\t$this->setbgcolor(2);\n\t\t\telseif($this->status==3)\n\t\t\t\t$this->setbgcolor(5);\n\t\t\telse\n\t\t\t\t$this->setbgcolor(4);\n\t\t\treturn false;\n\t\t}\n\n\t\tif(($today>strtotime($this->start))&&($today<strtotime($this->end))){\n\t\t\t//the test is in critical\n\t\t\t//know if the test has been touched\n\t\t\tif($this->status==2)\n\t\t\t\t$this->setbgcolor(1);\n\t\t\telseif($this->status==1)\n\t\t\t\t$this->setbgcolor(2);\n\t\t\telseif($this->status==3)\n\t\t\t\t$this->setbgcolor(5);\n\t\t\telse\n\t\t\t\t$this->setbgcolor(3);\n\n\t\t\treturn false;\n\t\t}\n\n\n\t\tif($today<strtotime($this->start)){\n\t\t\t//the test is in critical\n\t\t\t//know if the test has been touched\n\t\t\tif($this->status==2)\n\t\t\t\t$this->setbgcolor(1);\n\t\t\telseif($this->status==1)\n\t\t\t\t$this->setbgcolor(2);\n\t\t\telseif($this->status==3)\n\t\t\t\t$this->setbgcolor(5);\n\t\t\telse\n\t\t\t\t$this->setbgcolor(0);\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\n\t}", "title": "" }, { "docid": "0fd023d0d09e27983e959e984b650f68", "score": "0.5748034", "text": "public function checkColor( $value ) { \n\t\t\n\t\tif ( preg_match( '/^#[a-f0-9]{6}$/i', $value ) ) { // if user insert a HEX color with # \n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "title": "" }, { "docid": "d2b59c73a2433508abdee93404803ae0", "score": "0.5677607", "text": "public function testBackgroundLight()\n {\n $view_helper = new Bootstrap4Column();\n $view_helper->__invoke('[Content]')->setBgStyle('light')->md(6);\n $this->assertEquals('<div class=\"col-md-6 bg-light\">[Content]</div>', $view_helper->__toString());\n }", "title": "" }, { "docid": "ad848f1d0bb77d0df3896f6b813ed8cc", "score": "0.56625754", "text": "protected function validateBackgroundColor($value) {\n if (!$this->isHexColor($value)) {\n $this->triggerError('backgroundColor is not valid');\n return FALSE;\n }\n return TRUE;\n }", "title": "" }, { "docid": "385259bc8a687b3045c2f25f5267ba5d", "score": "0.5658149", "text": "public function testBackgroundDanger()\n {\n $view_helper = new Bootstrap4Column();\n $view_helper->__invoke('[Content]')->setBgStyle('danger')->md(6);\n $this->assertEquals('<div class=\"col-md-6 bg-danger\">[Content]</div>', $view_helper->__toString());\n }", "title": "" }, { "docid": "a5c6532e0fbdeceb6a99720e2d89934a", "score": "0.5657329", "text": "public function testBackgroundSuccess()\n {\n $view_helper = new Bootstrap4Column();\n $view_helper->__invoke('[Content]')->setBgStyle('success')->md(6);\n $this->assertEquals('<div class=\"col-md-6 bg-success\">[Content]</div>', $view_helper->__toString());\n }", "title": "" }, { "docid": "d65f56e61fa8504fe07122dd14017251", "score": "0.56228757", "text": "public function neckbordercolor() \n { \n $area=$this->db->query(\"SELECT * FROM \" . DB_PREFIX . \"neck_border_color\"); \n return $area->rows; \n }", "title": "" }, { "docid": "0762ae97cdbed983f2913b422ede4c1b", "score": "0.5617445", "text": "public function adpr_check_color( $value ) {\n\t\t\n\t\tif ( preg_match( '/^#[a-f0-9]{6}$/i', $value ) ) { // if user insert a HEX color with #\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "title": "" }, { "docid": "00dc0ded797d32a5d06602e097cbb1db", "score": "0.5594974", "text": "function background_color()\n {\n }", "title": "" }, { "docid": "482d3a7dd72882cb570e0fa0e215b923", "score": "0.5579063", "text": "function get_background_color()\n {\n }", "title": "" }, { "docid": "170aa576bedacaee3e3a3c5e7e8b0e18", "score": "0.5575707", "text": "public function testBackgroundDark()\n {\n $view_helper = new Bootstrap4Column();\n $view_helper->__invoke('[Content]')->setBgStyle('dark')->md(6);\n $this->assertEquals('<div class=\"col-md-6 bg-dark\">[Content]</div>', $view_helper->__toString());\n }", "title": "" }, { "docid": "e359769f42356a4d009c67ca0a9aecd0", "score": "0.5570032", "text": "function get_column_header_colour() {\n return array(\n 129, 245, 173);\n }", "title": "" }, { "docid": "dd68ac1575d4d6a9c2c0d4c96741c321", "score": "0.5491112", "text": "public function getBackgroundColor() {}", "title": "" }, { "docid": "836602902fbee1fdd9983cca3b6f141d", "score": "0.54826194", "text": "public function canStoreColor();", "title": "" }, { "docid": "4853e7a12b06d399f1cc2145cdd61003", "score": "0.5480672", "text": "public function testBackgroundPrimary()\n {\n $view_helper = new Bootstrap4Column();\n $view_helper->__invoke('[Content]')->setBgStyle('primary')->md(6);\n $this->assertEquals('<div class=\"col-md-6 bg-primary\">[Content]</div>', $view_helper->__toString());\n }", "title": "" }, { "docid": "c8cb7edd92f423c418c6522e7d19dfe1", "score": "0.54772484", "text": "public function isColor(): bool\n {\n return $this->color;\n }", "title": "" }, { "docid": "c05338c86be4ab99550ace6d182450b1", "score": "0.5433028", "text": "function verify_color($verified) {\n\t\tif($verified == 0){\n\t\t\treturn \"grey\";\n\t\t}\n\t\telse {\n\t\t\treturn \"green\";\n\t\t}\n\t}", "title": "" }, { "docid": "f81de448a7267dc09df85531b182d0bf", "score": "0.54315484", "text": "public function testPropertyBackgroundColor($value)\n {\n $object = new ConditionalTextStyle();\n $object->setBackgroundColor($value);\n\n $this->assertEquals($value, $object->getBackgroundColor());\n }", "title": "" }, { "docid": "76fc7472f77a6d74908e840b198b8e82", "score": "0.5424024", "text": "public function isPreColorized( $column ) {\n\t\tif ( is_bool( $this->_pre_colorized ) ) {\n\t\t\treturn $this->_pre_colorized;\n\t\t}\n\t\tif ( is_array( $this->_pre_colorized ) && isset( $this->_pre_colorized[ $column ] ) ) {\n\t\t\treturn $this->_pre_colorized[ $column ];\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "9ea832c71165f35f178d76df2647785f", "score": "0.5423123", "text": "public function hasClothcolorid(){\n return $this->_has(38);\n }", "title": "" }, { "docid": "32f63644241471ccf9e296d4970151ea", "score": "0.54096764", "text": "public function testPropertyBackgroundColor($value)\n {\n $object = new ConditionalComponentTextStyle();\n $object->setBackgroundColor($value);\n\n $this->assertEquals($value, $object->getBackgroundColor());\n }", "title": "" }, { "docid": "0c3069c5a6228343342dd944a1f43beb", "score": "0.5388034", "text": "public function testLoadXlsxConditionalFormattingDataBar(): void\n {\n $filename = 'tests/data/Reader/XLSX/conditionalFormattingDataBarTest.xlsx';\n $reader = IOFactory::createReader('Xlsx');\n $spreadsheet = $reader->load($filename);\n $worksheet = $spreadsheet->getActiveSheet();\n\n $this->pattern1Assertion($worksheet);\n $this->pattern2Assertion($worksheet);\n $this->pattern3Assertion($worksheet);\n $this->pattern4Assertion($worksheet);\n }", "title": "" }, { "docid": "9418bd78bbb5aec4ba507445b708ea3f", "score": "0.537591", "text": "public function testBackgroundInfo()\n {\n $view_helper = new Bootstrap4Column();\n $view_helper->__invoke('[Content]')->setBgStyle('info')->md(6);\n $this->assertEquals('<div class=\"col-md-6 bg-info\">[Content]</div>', $view_helper->__toString());\n }", "title": "" }, { "docid": "ba3173b3e32823fcfe3dd8f73a0d7a5e", "score": "0.53234905", "text": "function getColorRow($index){\n\tif($index%2==0){\t\t\n\t\t$color=array(255,255,208);\n\t\t/*$color=array(224,235,255);*/\n\t}\n\telse{\n\t\t $color=array(249,249,249);\n\t\t /*$color=array(255,255,204);*/\n\t}\n\treturn $color;\n}", "title": "" }, { "docid": "ef445f42d330e98ce133522cef9f5188", "score": "0.5285475", "text": "public function checkDraw()\n {\n for ($i = 0; $i < 6; $i ++) {\n for ($j = 0; $j < 7; $j ++) {\n if (strcasecmp($this->board[$i][$j], \"#\") == 0) {\n return false;\n }\n }\n }\n return true;\n }", "title": "" }, { "docid": "74c9e1378d2286b1b9340b6eda063e9a", "score": "0.5281948", "text": "function MyMod_Data_Field_Is_Color($data)\n {\n $res=FALSE;\n if (!empty($this->ItemData[ $data ]))\n {\n if (!empty($this->ItemData[ $data ][ \"IsColor\" ]))\n {\n $res=True;\n }\n }\n \n return $res;\n }", "title": "" }, { "docid": "e04b4febdac4e4c289f3f5a304d246b5", "score": "0.5259702", "text": "function getBackgroundColor() {\n return array_var($this->colors, 'background_color', 'cccccc');\n }", "title": "" }, { "docid": "a4308ce8f875c29f3c1eed19a83181b2", "score": "0.52416486", "text": "protected function validateColor($value) {\n if (!$this->isHexColor($value)) {\n $this->triggerError('color is not valid');\n return FALSE;\n }\n return TRUE;\n }", "title": "" }, { "docid": "67721d10b13563f7738c7547ad80d844", "score": "0.5199075", "text": "public function supportsColour()\n {\n // TODO: Implement supportsColour() method.\n }", "title": "" }, { "docid": "75f3574d0dbef08bda4ee3b5e91d3302", "score": "0.5189976", "text": "function changeRowColor($pos)\n{\n\t\n\tif($pos % 2 == 1)\n\t{\n\t\techo \"#FFFFFF\";\n\t}\n\telse\n\t{\n\t\techo \"#D6E6F3\";\n\t}\n\n}", "title": "" }, { "docid": "85e5e7488b3205c557b384af9c478268", "score": "0.51895195", "text": "public static function colortext(array $rgb) {\n \n\t\t$textcolor = '';\n\t\t$cpt=0 ;\n for($i=0; $i<3; $i++) {\n if ($rgb[$i] <= 130) {\n $textcolor = '#FFFFFF';\n\t\t\t\t$cpt = $cpt + 1 ;\n } \n }\n\t\tif ($cpt > 1) {\n \treturn $textcolor;\n\t\t\t}else{\n\t\t\t$textcolor='';\n\t\t\treturn $textcolor;\n\t\t\t}\n\t\t\t\n\t\t\n }", "title": "" }, { "docid": "ad8c227c6b09d8f7cbfc733020dc43be", "score": "0.51775503", "text": "public function hasClothcolorids(){\n return $this->_has(39);\n }", "title": "" }, { "docid": "418591cf6097d639692234d2e6295c46", "score": "0.51231045", "text": "protected function validateTextColor($value) {\n if (!$this->isHexColor($value)) {\n $this->triggerError('textColor is not valid');\n return FALSE;\n }\n return TRUE;\n }", "title": "" }, { "docid": "9bc928457e68412c201e479bae215198", "score": "0.51219165", "text": "public function neckpippingcolor() \n { \n $area=$this->db->query(\"SELECT * FROM \" . DB_PREFIX . \"neck_pipping_color\"); \n return $area->rows; \n }", "title": "" }, { "docid": "24ee86c97a04dd93d897abd4e7c89b61", "score": "0.5115333", "text": "function exibeLab($lab, $qtdLinha, $qtdColuna){\n echo '<table border=\"0\" cellspacing=\"1\" cellpadding=\"20\" align=\"center\" style=\"margin-top:20px;\" >';\n for ($l=0; $l<$qtdLinha; $l++){\n echo '<tr>';\n for ($c=0; $c<$qtdColuna; $c++){\n if ($lab[$l][$c] == 0){\n echo '<td style=\"background-color:white\"></td>';\n }elseif ($lab[$l][$c] == 1){\n echo '<td style=\"background-color:black\"></td>';\n }elseif ($lab[$l][$c] == 3){\n echo '<td style=\"background-color:red\"></td>';\n }elseif ($lab[$l][$c] == 4){\n echo '<td style=\"background-color:black\"></td>';\n }elseif ($lab[$l][$c] == 5){\n echo '<td style=\"background-color:#5F9EA0;\"></td>';\n }\n }\n echo '</tr>';\n }\n echo \"</table>\";\n }", "title": "" }, { "docid": "d56a2181aa83af78c70a9b6853c5f31e", "score": "0.51120543", "text": "function isCollision(string $row, int $currentColumn): bool\n{\n while (strlen($row) < $currentColumn + 1) {\n $row = $row . $row;\n }\n\n if ($row[$currentColumn] === '#') {\n return true;\n }\n\n return false;\n}", "title": "" }, { "docid": "94905e73e5ffc9c25e587218d7383516", "score": "0.5105913", "text": "public function colour();", "title": "" }, { "docid": "431921ea3f014e2ccc45da023423f658", "score": "0.5105277", "text": "public function hasCols();", "title": "" }, { "docid": "77923a122f8f2fa634f755549b86589d", "score": "0.5101355", "text": "public static function isValidColor($a_value)\n\t{\n\t if(preg_match(\"/^#[0-9a-f]{3}$/i\", $a_value, $match))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse if(preg_match(\"/^#[0-9a-f]{6}$/i\", $a_value, $match))\n\t\t{\n\t\t\treturn true;\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "152986e28c259d7c13762069be85d8de", "score": "0.5089122", "text": "public function backgroundColor($red, $green, $blue);", "title": "" }, { "docid": "63c08c26683bbdea0ec89363cf227c17", "score": "0.5081925", "text": "private function isValidRowColumn(): bool {\n foreach ($this->board as $row => $cols) {\n $curRow = [];\n $curCol = [];\n foreach ($cols as $col => $cellValue) {\n // check if repeated in row\n if(in_array($this->board[$row][$col], $curRow)){\n return false;\n }\n array_push($curRow, $this->board[$row][$col]);\n\n // check if repeated in column \n if(in_array($this->board[$col][$row], $curCol)){\n return false;\n }\n array_push($curCol, $this->board[$col][$row]);\n }\n }\n return true;\n }", "title": "" }, { "docid": "963a415cb488ce38ce9ab2ec17558e29", "score": "0.50804573", "text": "function checkhexcolor($color) {\n return preg_match('/^#[a-f0-9]{6}$/i', $color);\n}", "title": "" }, { "docid": "bdb62e62666904d3ed301c3187d01cfe", "score": "0.5079453", "text": "function get_grouping_row_colours() {\n return array(\n array(219, 229, 241),\n array(180, 187, 238),\n array(255, 255, 255));\n }", "title": "" }, { "docid": "34b485812ca60b803dc254a858a5495a", "score": "0.50692475", "text": "function get_color_text_class( $bg_color_class ) {\n\t\n\t$dark_colors = array('primary', 'secondary', 'black');\n\t\n\tif ( in_array( $bg_color_class, $dark_colors ) ) {\n\t\t\n\t\treturn true;\n\t\t\n\t} else {\n\t\t\n\t\treturn false;\n\t\t\n\t}\n\t\n}", "title": "" }, { "docid": "a2c1317f12868ae835708a5609d58eab", "score": "0.50639224", "text": "public function testBackgroundSecondary()\n {\n $view_helper = new Bootstrap4Column();\n $view_helper->__invoke('[Content]')->setBgStyle('secondary')->md(6);\n $this->assertEquals('<div class=\"col-md-6 bg-secondary\">[Content]</div>', $view_helper->__toString());\n }", "title": "" }, { "docid": "45aa02c428c84aba45b9ff46fb42b9d3", "score": "0.50484765", "text": "protected function _trimColor($background=0xffffff)\n {\n $width = imagesx($this->gd);\n $height = imagesy($this->gd);\n \n if($width == 0 || $height == 0) {\n return false;\n }\n \n $b_top = 0;\n $b_lft = 0;\n $b_btm = $height - 1;\n $b_rt = $width - 1;\n \n //top\n for(; $b_top < $height; ++$b_top) {\n for($x = 0; $x < $width; ++$x) {\n if(imagecolorat($this->gd, $x, $b_top) != $background) {\n break 2;\n }\n }\n }\n \n // bottom\n for(; $b_btm >= 0; --$b_btm) {\n for($x = 0; $x < $width; ++$x) {\n if(imagecolorat($this->gd, $x, $b_btm) != $background) {\n break 2;\n }\n }\n }\n \n // left\n for(; $b_lft < $width; ++$b_lft) {\n for($y = $b_top; $y <= $b_btm; ++$y) {\n if(imagecolorat($this->gd, $b_lft, $y) != $background) {\n break 2;\n }\n }\n }\n \n // right\n for(; $b_rt >= 0; --$b_rt) {\n for($y = $b_top; $y <= $b_btm; ++$y) {\n if(imagecolorat($this->gd, $b_rt, $y) != $background) {\n break 2;\n }\n }\n }\n \n $this->_crop($b_lft, $b_top, $b_rt - $b_lft, $b_btm - $b_top);\n }", "title": "" }, { "docid": "3b8537ab1f2d1f782065834480ddadf2", "score": "0.5042158", "text": "function fgridrowcolor($NameCampos,$ValorCampos,$NumCampos){\nglobal $gridrowcolor;\n$classreturn=\"\";\nif(is_array($gridrowcolor)){\n\t//recorro el arra de configuracion de color\n\tforeach ($gridrowcolor as $key => $value)\n\t\t//recorro los campos\n\t\tfor ($x = 0; $x < $NumCampos-1; $x++) {\n\t\t\tif(strcmp(trim($NameCampos[$x]),trim($value['campo'])==0) && strcmp(trim($ValorCampos[$x]),trim($value['dato']))==0){\n\t\t\t\t\t$classreturn=\"bgcolor='\".$value['color'].\"'\";\t\t\t\t\t\t\n\t\t\t\t\t$gridrowcolor[$key]['cuenta']=$value['cuenta']+1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n}\nreturn($classreturn);\n}", "title": "" }, { "docid": "4df6db20c3e285fb7f0494f57995c7be", "score": "0.50382656", "text": "public function black_or_white()\n {\n return ($this->_hsl['luminance'] > 0.5) ? '#000' : '#FFF';\n }", "title": "" }, { "docid": "65deeeaad7b764594998489a7c79ec6b", "score": "0.50343424", "text": "public function testSetColor()\n {\n // USER_JOHN's TASK_BACK_END has TASK_COLOR_2\n $this->tasks->setUserId(USER_JOHN);\n $frontEndTask = $this->tasks->findByTaskId(TASK_FRONT_END);\n\n // test that color was set\n $frontEndTask->setColor(TASK_COLOR_2);\n $this->assertEquals(TASK_COLOR_2, $frontEndTask->color);\n\n // test conflict that conflict was resolved\n $backEndTask = $this->tasks->findByTaskId(TASK_BACK_END);\n $this->assertEquals(TASK_COLOR_1, $backEndTask->color);\n\n // USER_JEN has two tasks with TASK_COLOR_1 and TASK_COLOR_2\n $this->tasks->setUserId(USER_JEN);\n $frontEndTask = $this->tasks->findByTaskId(TASK_FRONT_END);\n $frontEndTask->setColor(TASK_COLOR_3);\n $this->tasks->update($frontEndTask);\n\n // test no conflict\n $jenTasks = $this->tasks->fetchAll();\n foreach ($jenTasks as $task) {\n $this->assertFalse($task->color == TASK_COLOR_1);\n }\n }", "title": "" }, { "docid": "2264ae0a9690651367e5645c49baaf54", "score": "0.5022725", "text": "public function isTableOverlay();", "title": "" }, { "docid": "b6a4bc45fcf233a80e32231eea40bbe3", "score": "0.50151074", "text": "public static function hasContentColumn(): bool;", "title": "" }, { "docid": "7098e6c9a954f3abd75fef1348064be6", "score": "0.50143117", "text": "function su_is_valid_hex( $color ) {\n\treturn preg_match( '/^#?([a-f0-9]{3}|[a-f0-9]{6})$/i', $color ) === 1;\n}", "title": "" }, { "docid": "8b4332b5f42290f47f24360541ce4721", "score": "0.50118417", "text": "function print_array_color(&$array, $name)\n{\n $rows = count($array);\n //$columns = count($array[0]);\n\n echo $name . \":\";\n echo \"<table>\";\n echo \"<tr>\";\n\n for ($row_index = 0; $row_index < $rows; $row_index++)\n {\n //for ($column_index=0; $column_index<$columns; $column_index++){\n if ($array[$row_index] == 1)\n {\n echo \"<td style='color: blue;'>||||||</td>\";\n }\n else\n {\n echo \"<td style='color: red;'>||||||</td>\";\n }\n //}\n\n }\n echo \"</tr>\";\n echo \"</table>\";\n}", "title": "" }, { "docid": "15866a1e90af26c60819bc7f366d189c", "score": "0.5001199", "text": "protected abstract function minBorderViolation(): array;", "title": "" }, { "docid": "a68ade6104c4ea1e41a57642e343d222", "score": "0.4996863", "text": "public function testBackgroundAndTextSet()\n {\n $view_helper = new Bootstrap4Column();\n $view_helper->__invoke('[Content]')->setBgStyle('dark')->setTextStyle('light')->md(6);\n $this->assertEquals(\n '<div class=\"col-md-6 bg-dark text-light\">[Content]</div>',\n $view_helper->__toString()\n );\n }", "title": "" }, { "docid": "9a8f3cc1b317e7f5d1be237015f0951f", "score": "0.4993057", "text": "private function isFilled(): bool {\n foreach ($this->board as $row => $cols) {\n foreach ($cols as $col => $cellValue) {\n if($this->board[$row][$col] == 0 || $this->board[$row][$col] > 9 || $this->board[$row][$col] < 1) {\n return false;\n }\n }\n }\n return true;\n }", "title": "" }, { "docid": "4720620072ec7290aadcf6c50cc20e71", "score": "0.4987109", "text": "public function testBitImageColumnFormatBlack()\n {\n $this -> requireGraphicsLibrary();\n $img = EscposImage::load(dirname(__FILE__).\"/resources/canvas_black.png\");\n $this -> printer -> bitImageColumnFormat($img);\n $this -> checkOutput(\"\\x1b@\\x1b3\\x10\\x1b*!\\x01\\x00\\x80\\x00\\x00\\x0a\\x1b2\");\n }", "title": "" }, { "docid": "4874d558b21fcc14c8ec13edcb749516", "score": "0.4979377", "text": "function cellColor($cells,$color){\n\n global $objPHPExcel;\n\n\n\n $objPHPExcel->getActiveSheet()->getStyle($cells)->getFill()->applyFromArray(array(\n\n 'type' => PHPExcel_Style_Fill::FILL_SOLID,\n\n 'startcolor' => array(\n\n 'rgb' => $color\n\n )\n\n ));\n\n}", "title": "" }, { "docid": "d0c93534d60c7e5d149f5cbaab201a2c", "score": "0.49639282", "text": "public function backgroundColorProvider()\n {\n return [[\"#fff\"], [\"#000\"]];\n }", "title": "" }, { "docid": "d0c93534d60c7e5d149f5cbaab201a2c", "score": "0.49639282", "text": "public function backgroundColorProvider()\n {\n return [[\"#fff\"], [\"#000\"]];\n }", "title": "" }, { "docid": "ef237a180092b6821dfd232eda0bcfae", "score": "0.49507847", "text": "public function backgroundColor(array $color);", "title": "" }, { "docid": "89043278a1102dda2e7113a9fbc5a5f7", "score": "0.49426743", "text": "public function testPropertyTextColor($value)\n {\n $object = new ConditionalTextStyle();\n $object->setTextColor($value);\n\n $this->assertEquals($value, $object->getTextColor());\n }", "title": "" }, { "docid": "596943e2c8234411c2fbb8fc65a81500", "score": "0.49207252", "text": "protected function checkGdLibTrueColorSupport() {}", "title": "" }, { "docid": "4cb9bf98cb30cb03c35772333fcfa919", "score": "0.4917221", "text": "function get_status_column($column) {\n $status = 'ok icon-green';\n\n // Check if there is at least one 'false' in $column\n if (in_array(false, $column)) {\n $status = 'adjust icon-yellow';\n\n // Check if there is at least one 'true' in $column\n if (!in_array(true, $column)) {\n $status = 'remove icon-red';\n }\n }\n\n return $status;\n}", "title": "" }, { "docid": "326c32005eee6c44d00c9a0cfd65bbd3", "score": "0.49039602", "text": "public static function supports_custom_colors() {\n\t\t// We need Jetpack's SASS super powers.\n\t\treturn function_exists( 'jetpack_sass_css_preprocess' );\n\t}", "title": "" }, { "docid": "7389ac70bd934e70050bdfaa53c22368", "score": "0.4902458", "text": "public function testReloadXlsxConditionalFormattingDataBar(): void\n {\n $filename = 'tests/data/Reader/XLSX/conditionalFormattingDataBarTest.xlsx';\n $outfile = File::temporaryFilename();\n $reader = IOFactory::createReader('Xlsx');\n $spreadshee1 = $reader->load($filename);\n $writer = IOFactory::createWriter($spreadshee1, 'Xlsx');\n $writer->save($outfile);\n $spreadsheet = $reader->load($outfile);\n unlink($outfile);\n $worksheet = $spreadsheet->getActiveSheet();\n\n $this->pattern1Assertion($worksheet);\n $this->pattern2Assertion($worksheet);\n $this->pattern3Assertion($worksheet);\n $this->pattern4Assertion($worksheet);\n }", "title": "" }, { "docid": "46857ced84a4d0e1f9e0debf561f6391", "score": "0.48896664", "text": "function checkhexcolor($color2)\n{\n return preg_match('/^#[a-f0-9]{6}$/i', $color2);\n}", "title": "" }, { "docid": "8ce75246db18df044c7727e51c54cbec", "score": "0.4864244", "text": "function failedTableData()\n{\n global $html;\n\n $td = $html->createElement(\"td\",\"FAILED\");\n $tdStyle = $html->createAttribute(\"style\");\n $tdStyle->value = \"background-color: #ff6600\";\n $td->appendChild($tdStyle);\n\n return $td;\n}", "title": "" }, { "docid": "5a87420e732e233c83933792a758118d", "score": "0.48624465", "text": "protected function validateHexColor($attribute, $value)\n {\n return (bool)preg_match(\"/#([a-f0-9]{3}){1,2}\\b/i\", $value);\n }", "title": "" }, { "docid": "b22ff1e3cdc7240a66eef833cbf50980", "score": "0.48588622", "text": "public function testPropertyTextColor($value)\n {\n $object = new ConditionalComponentTextStyle();\n $object->setTextColor($value);\n\n $this->assertEquals($value, $object->getTextColor());\n }", "title": "" }, { "docid": "c2323e8ea2626105a16efc4db118e8e0", "score": "0.48564526", "text": "function isOver()\n\t{\n\t\t\n\t\t//top row\n\t\tif ($this->board[0][0] && $this->board[0][0] == $this->board[0][1] && $this->board[0][1] == $this->board[0][2])\n\t\t\treturn $this->board[0][0];\n\t\t\t\n\t\t//middle row\n\t\tif ($this->board[1][0] && $this->board[1][0] == $this->board[1][1] && $this->board[1][1] == $this->board[1][2])\n\t\t\treturn $this->board[1][0];\n\t\t\t\n\t\t//bottom row\n\t\tif ($this->board[2][0] && $this->board[2][0] == $this->board[2][1] && $this->board[2][1] == $this->board[2][2])\n\t\t\treturn $this->board[2][0];\n\t\t\t\n\t\t//first column\n\t\tif ($this->board[0][0] && $this->board[0][0] == $this->board[1][0] && $this->board[1][0] == $this->board[2][0])\n\t\t\treturn $this->board[0][0];\n\t\t\t\n\t\t//second column\n\t\tif ($this->board[0][1] && $this->board[0][1] == $this->board[1][1] && $this->board[1][1] == $this->board[2][1])\n\t\t\treturn $this->board[0][1];\n\t\t\t\n\t\t//third column\n\t\tif ($this->board[0][2] && $this->board[0][2] == $this->board[1][2] && $this->board[1][2] == $this->board[2][2])\n\t\t\treturn $this->board[0][2];\n\t\t\t\n\t\t//diagonal 1\n\t\tif ($this->board[0][0] && $this->board[0][0] == $this->board[1][1] && $this->board[1][1] == $this->board[2][2])\n\t\t\treturn $this->board[0][0];\n\t\t\t\n\t\t//diagonal 2\n\t\tif ($this->board[0][2] && $this->board[0][2] == $this->board[1][1] && $this->board[1][1] == $this->board[2][0])\n\t\t\treturn $this->board[0][2];\n\t\t\t\n\t\tif ($this->totalMoves >= 9)\n\t\t\treturn \"Tie\";\n\t}", "title": "" }, { "docid": "258951d7546d11410b4fdbe965ce23fa", "score": "0.48376724", "text": "private static function IsReady()\n {\n return self::$colors[0] instanceof ColorInfo;\n }", "title": "" }, { "docid": "84cc49f88e233db4cb7416d7b377683f", "score": "0.4831862", "text": "public function canAddFieldsToPaletteBeforeExistingOnes() {}", "title": "" }, { "docid": "1af4a66066f018cb165c500495c42a85", "score": "0.48196134", "text": "public function fetchWindowsPiniconBackgroundColor()\n {\n\n if ($this->owner->WindowsPiniconBackgroundColor) {\n return '#' . $this->owner->WindowsPiniconBackgroundColor;\n } else {\n return false;\n }\n\n }", "title": "" }, { "docid": "7bfae0fc22e6d9e1d81e7f25a51d6ddf", "score": "0.48130515", "text": "public function testPrintColorizedOutputSchemaEclipseDark(): void\n {\n \\putenv('PHAN_COLOR_SCHEME=eclipse_dark');\n Config::setValue('color_issue_messages', true);\n // phpcs:disable\n $expected_output = \"\\x1b[96mdim.php\\x1b[0m:\\x1b[37m10\\x1b[0m \\x1b[94mPhanUndeclaredVariableDim\\x1b[0m Variable \\x1b[33m\\$varName\\x1b[0m was undeclared, but array fields are being added to it.\" . \\PHP_EOL;\n $actual_output = self::generatePhanOutput(new IssueInstance(Issue::fromType(Issue::UndeclaredVariableDim), 'dim.php', 10, ['varName']));\n // phpcs:enable\n $this->assertSame(\\json_encode($expected_output), \\json_encode($actual_output));\n $this->assertSame($expected_output, $actual_output);\n }", "title": "" }, { "docid": "a0261b3cd472c7269ce04ab824940461", "score": "0.48098245", "text": "public function getStyle() {\r\n\t\t$query = \"SELECT `style` FROM {$this->prefix}data WHERE `sheetid`='{$this->sheetid}' AND `rowid`='{$this->row}' AND `columnid`='{$this->col}'\";\r\n\t\t$result = $this->wrapper->query($query);\r\n\t\tif (!$result) return false;\r\n\t\t$cell = $this->wrapper->next($result);\r\n\t\treturn $this->parseStyle($cell['style']);\r\n\t}", "title": "" }, { "docid": "dd7e833d577f07554fb18450b042dd43", "score": "0.48094356", "text": "protected function validateColorHex($value) {\n if (preg_match(\"/^[0-9a-f]{6}$/i\", $value))\n return true;\n $this->setError(t(\"Invalid color code\"));\n return false;\n }", "title": "" }, { "docid": "de794a8456d8b96940a0ee096893f91a", "score": "0.48075065", "text": "public function hasCell(){\n return $this->_has(1);\n }", "title": "" }, { "docid": "45054636c5401b2d936aa01aa82e1ffe", "score": "0.48060012", "text": "public function testCellRenderThemed(): void\n {\n $this->View->setTheme('TestTheme');\n $cell = $this->View->cell('Articles');\n\n $this->assertEquals($this->View->getTheme(), $cell->viewBuilder()->getTheme());\n $this->assertStringContainsString('Themed cell content.', $cell->render());\n }", "title": "" }, { "docid": "bb1370fe9fa84ac8bbbe9fd39f99dcd1", "score": "0.48057637", "text": "public function hasHaircolorid(){\n return $this->_has(16);\n }", "title": "" }, { "docid": "4826b1b9369abd4da59f4bebcf0abc3e", "score": "0.48057163", "text": "public static function color()\n {\n return null;\n }", "title": "" }, { "docid": "a42c7507653169e982de4564ceb5ede1", "score": "0.48024872", "text": "public function getColorData();", "title": "" }, { "docid": "8d4d3427b1e431cfe03fc8a64d4a1185", "score": "0.4799577", "text": "function colorExists($a_color_name)\n\t{\n\t\tglobal $ilDB;\n\t\t\n\t\t$set = $ilDB->query(\"SELECT * FROM style_color WHERE \".\n\t\t\t\"style_id = \".$ilDB->quote($this->getId(), \"integer\").\" AND \".\n\t\t\t\"color_name = \".$ilDB->quote($a_color_name, \"text\"));\n\t\tif ($rec = $ilDB->fetchAssoc($set))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "98a7b69ca31929a72a518cb419127e28", "score": "0.4796698", "text": "public function getStatusColor($compliance) {\n\n\t\t$is_yellow = Yii::app()->utility->getOption('kpi_yellow');\n\t\t$is_red = Yii::app()->utility->getOption('kpi_red');\n\n\t\tif ($compliance < $is_red) return 1;\n\t\tif ($compliance < $is_yellow) return 2;\n\t\treturn 3;\n\n\t}", "title": "" }, { "docid": "2dce9bd71c278dcc4a5abeea8277ad1e", "score": "0.4789768", "text": "public function setColorFromPixel(ImagickPixel $pixel): bool {}", "title": "" }, { "docid": "02f0b454f4c1736430321d2e22a76cdf", "score": "0.4782239", "text": "private function getWrongStyle()\n {\n $select_fields = '*';\n $from_table = 'tt_content';\n $where_clause = '\n\t\tCType=' . $GLOBALS['TYPO3_DB']->fullQuoteStr('list', $from_table) . '\n\t\tAND list_type=' . $GLOBALS['TYPO3_DB']->fullQuoteStr('jfmulticontent_pi1', $from_table) . '\n\t\tAND deleted=0';\n $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($select_fields, $from_table, $where_clause);\n if ($res) {\n $resultRows = array();\n while (($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))) {\n $ff_parsed = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::xml2array($row['pi_flexform']);\n // Check for old sheet values\n if (is_array($ff_parsed['data'])) {\n foreach ($ff_parsed['data'] as $key => $val) {\n if (array_key_exists($val['lDEF']['style']['vDEF'], $this->style_mapping)) {\n $resultRows[$row['uid']] = array(\n 'ff' => $row['pi_flexform'],\n 'ff_parsed' => $ff_parsed,\n 'title' => $row['title'],\n 'pid' => $row['pid'],\n );\n }\n }\n }\n }\n }\n return $resultRows;\n }", "title": "" }, { "docid": "7bb0f1b09180c241cff67994b59267ef", "score": "0.47650447", "text": "public function getColor();", "title": "" }, { "docid": "4754d07c2c5fe9dfe4176260065fce31", "score": "0.47574794", "text": "function print_overdue_color() {\n\techo \"rgba(255, 0, 0, 0.3);\";\n}", "title": "" }, { "docid": "d0fb030509f2dcfd127391021917f7dc", "score": "0.47564965", "text": "public function isBipartit()\n {\n try {\n $this->getColors();\n\n return true;\n } catch (UnexpectedValueException $ignore) { }\n\n return false;\n }", "title": "" }, { "docid": "d5e902161ccdf83f737e2b8cc900e756", "score": "0.47491768", "text": "function d($valor)\n{\n echo '<pre style=\"background-color: #FFF !important; color: #000 !important; \">';\n var_dump($valor);\n echo '</pre>';\n}", "title": "" }, { "docid": "204ec4bf519c81433f4484eca740d424", "score": "0.47407266", "text": "function NO2Color($val) {\n\n /**\n * a short function used to tell if an integer is in range\n * @param int $val value to check against\n * @param int $min minimum value boundary\n * @param int $max maximum value boundary\n * @return boolean true if the value was in range, false if not\n */\n $inRange = function ($val, $min, $max) { return $min <= $val && $val <= $max;};\n\n //wish there was a shorthand if statement...\n if($inRange($val, 0, 67)): return \"#9FFF8E\"; endif;\n if($inRange($val, 68, 134)): return \"#55FF00\"; endif;\n if($inRange($val, 135, 200)): return \"#48C900\"; endif;\n if($inRange($val, 201, 267)): return \"#FEFE00\"; endif;\n if($inRange($val, 268, 334)): return \"#FAC900\"; endif;\n if($inRange($val, 335, 400)): return \"#F45958\"; endif;\n if($inRange($val, 401, 467)): return \"#F30000\"; endif;\n if($inRange($val, 468, 534)): return \"#890000\"; endif;\n if($inRange($val, 535, 600)): return \"#C12EFF\"; endif;\n if($val >= 601): return \"#55FF00\"; endif;\n}", "title": "" }, { "docid": "35bcc30fcb7b3105fd93e3a80e889f67", "score": "0.4737853", "text": "protected function columnMatchCheck ( $lineColumns ) {\n }", "title": "" }, { "docid": "d627f2ab721c4509e95c68939b98b0dd", "score": "0.47369617", "text": "function isPictureColored($extract, $color) {\n\t$red = $extract[0][0]['r'];\n\t$green = $extract[0][0]['g'];\n\t$blue = $extract[0][0]['b'];\n\tswitch($color){\n\t case 'red':\n\t\t\tif ( ($red > (1.3 * $green)) & ($red > (1.3 * $blue)) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t break;\n\t case 'green':\n\t\t\tif ( ($green > (1.3 * $red)) & ($green > (1.3 * $blue)) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t break;\n\t case 'blue':\n\t\t\tif ( ($blue > (1.3 * $green)) & ($blue > (1.3 * $red)) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t break;\n\t case 'bw':\n\t \tif ( ($red==$green) & ($red==$blue) & ($green==$blue) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif ( (($red+3) > $green ) & (($red-3) < $green ) & \n\t\t\t\t (($red+3) > $blue ) & (($red-3) < $blue ) & \n\t\t\t\t (($blue+3) > $green ) & (($blue-3) < $green ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t break;\n\t case 'test':\n\t \treturn true;\n\t break;\n\t default:\n\t \treturn false;\n\t}\n\n\treturn false;\n}", "title": "" }, { "docid": "4e9be3869da1721f59e1eb21feffa816", "score": "0.47191167", "text": "public function canAddFieldsToPaletteAfterNotExistingOnes() {}", "title": "" }, { "docid": "2b4601fd354ed2c50624f50a9a14266a", "score": "0.4716087", "text": "public static function weColor($key) {\n if ($key % 2 != 0) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "8843ee79520e9e0b0c6972aa7b944620", "score": "0.47118002", "text": "private function validate_columns(){\n\n for($i=0;$i<9;$i++){\n $col = array_column($this->sudoku_array, $i);\n\n if(count($col) !=9 || count(array_unique($col)) !=9){\n return false;\n }\n }\n return true;\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": "c1a53014b3e8009982c57be36ab41329", "score": "0.75948673", "text": "public function create()\n {\n return $this->showForm('create');\n }", "title": "" }, { "docid": "c1a53014b3e8009982c57be36ab41329", "score": "0.75948673", "text": "public function create()\n {\n return $this->showForm('create');\n }", "title": "" }, { "docid": "4410c37acc7f709e86ccc730cb542643", "score": "0.75863165", "text": "public function create()\n {\n return view('admin.resources.create');\n }", "title": "" }, { "docid": "a382b311163023b1b09a9a260d21538b", "score": "0.7577412", "text": "public function create(){\n\n return view('resource.create');\n }", "title": "" }, { "docid": "2bc399e3e37eaad09b15e38f2a68e11a", "score": "0.75727344", "text": "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "title": "" }, { "docid": "200ac8848d121779daea1c7ace64cde0", "score": "0.7500887", "text": "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "title": "" }, { "docid": "4273a8d14102748486694e85db479a73", "score": "0.7434847", "text": "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "title": "" }, { "docid": "1029b6ae8b4cf5d716f0d3fc2f8598d2", "score": "0.7433956", "text": "public function create()\n {\n return view ('forms.create');\n }", "title": "" }, { "docid": "003fc3feb8b261af715ecd7bd61a619b", "score": "0.73892003", "text": "public function create ()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "91552bc8bcd006b5917956f0fb3d5b89", "score": "0.73531085", "text": "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "title": "" }, { "docid": "c7748437caeb8425cc313369131b5847", "score": "0.73364776", "text": "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "title": "" }, { "docid": "a5ad69b940d8548b37e7b6672ede609f", "score": "0.73125", "text": "public function create()\n {\n return view(\"request_form.form\");\n }", "title": "" }, { "docid": "1e90420f95533b3e78ae228f42aaa921", "score": "0.7296102", "text": "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "title": "" }, { "docid": "d9eabb6e688415b42a581fbf4d716eba", "score": "0.7281891", "text": "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "title": "" }, { "docid": "4c4280f6d84a14acb11fe84c3d533fca", "score": "0.72741455", "text": "public function create()\n {\n return view($this->forms . '.create');\n }", "title": "" }, { "docid": "72b53b9744be9b26964bb2d7df983288", "score": "0.72424185", "text": "public function create()\n {\n return view('restful.add');\n }", "title": "" }, { "docid": "ae2dae6d70174f64972f62bfef3beec9", "score": "0.7229325", "text": "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "title": "" }, { "docid": "2bd4a45e5a2f3450957e331f3c9cbe9e", "score": "0.7226713", "text": "public function create()\n {\n return view('admin.createform');\n }", "title": "" }, { "docid": "807d372107429e3ef6b5d3ace77f044e", "score": "0.7187349", "text": "public function create()\n {\n return view('admin.forms.create');\n }", "title": "" }, { "docid": "894343381f0ae42067564426b380dec6", "score": "0.7179176", "text": "public function create()\n {\n return view('backend.student.form');\n }", "title": "" }, { "docid": "54e432df7faa28bb875e58bcd9563b2b", "score": "0.7174283", "text": "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "title": "" }, { "docid": "540a53a248ba67bdca77e9032bbb635f", "score": "0.7150356", "text": "public function create()\n {\n return view('client.form');\n }", "title": "" }, { "docid": "78e0e56634b1ed16a546edefec855b52", "score": "0.71444064", "text": "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "title": "" }, { "docid": "c5c4532c985ebd9dc75cacbea31ac33b", "score": "0.71442676", "text": "public function create()\n {\n return view('Form');\n }", "title": "" }, { "docid": "76f6369e9637fe0db8316e64e7c817c4", "score": "0.713498", "text": "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "title": "" }, { "docid": "7165aade767409b1b22203b2d660635c", "score": "0.71283126", "text": "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "title": "" }, { "docid": "1f30b87a2cd300703acd38d27eff1400", "score": "0.7123691", "text": "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\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": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "51cf77cf329e4426a010f9aec4d19519", "score": "0.7112176", "text": "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "title": "" }, { "docid": "10bee9a2841dc1d7b79cb8ae2b760c18", "score": "0.7094388", "text": "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "title": "" }, { "docid": "efbcb43f0aa01d07c5a8a46e59e07c86", "score": "0.7085711", "text": "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "title": "" }, { "docid": "c27004d00e3f9afb85f74623ec456ca9", "score": "0.708025", "text": "public function create()\n {\n //\n return view('form');\n }", "title": "" }, { "docid": "b3163df34854785c2d023a013de2d94c", "score": "0.70800644", "text": "public function create()\n {\n return view('rests.create');\n }", "title": "" }, { "docid": "2b41dd9ed0cf1461dd65f8e05b0a94a1", "score": "0.70571953", "text": "public function create()\n {\n return $this->showForm();\n }", "title": "" }, { "docid": "2b41dd9ed0cf1461dd65f8e05b0a94a1", "score": "0.70571953", "text": "public function create()\n {\n return $this->showForm();\n }", "title": "" }, { "docid": "8d95ddac87d4643ea4961ea4930b97ea", "score": "0.70556754", "text": "public function create()\n {\n return view(\"Add\");\n }", "title": "" }, { "docid": "de1869625a5e3279594395f0c4afed92", "score": "0.70396435", "text": "public function create(){\n return view('form.create');\n }", "title": "" }, { "docid": "f2881024deb6722d08b618c58af9dec8", "score": "0.7039549", "text": "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "title": "" }, { "docid": "094370e5eec375072adc7d142002f7c3", "score": "0.7036275", "text": "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "title": "" }, { "docid": "90c69861985934d05478b03d16057a83", "score": "0.703468", "text": "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "title": "" }, { "docid": "b5af1b1f4980e00d0adea5611f6a16f7", "score": "0.70305896", "text": "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "title": "" }, { "docid": "6039f43b38d3c6d347e4435587e3a07f", "score": "0.7027638", "text": "public function create()\n {\n return $this->cView(\"form\");\n }", "title": "" }, { "docid": "7000c38175570bf727255c3e8e4f9cba", "score": "0.70265305", "text": "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "title": "" }, { "docid": "911798f81446b032c9928690164d1e88", "score": "0.70199823", "text": "public function create()\n {\n return view(\"dresses.form\");\n }", "title": "" }, { "docid": "a8fd04c997808f0e9dd707ba440cb9a4", "score": "0.7018007", "text": "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "title": "" }, { "docid": "4826caf3ada08e4e7f25a0b3ae74f05a", "score": "0.7004984", "text": "public function createAction()\n {\n// $this->view->form = $form;\n }", "title": "" }, { "docid": "cb6dbca8a8b26b57ddf1e738c50cfdb6", "score": "0.7003889", "text": "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "title": "" }, { "docid": "30efc97d089d7452b71923fc1325c24b", "score": "0.7000935", "text": "public function create()\n {\n return view('fish.form');\n }", "title": "" }, { "docid": "1b62c86be5f3840fa2723173eb331b82", "score": "0.69973785", "text": "public function create()\n {\n return view('users.forms.create');\n }", "title": "" }, { "docid": "f624e542157f2a5697864efa85c44908", "score": "0.6994679", "text": "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "title": "" }, { "docid": "645f7ceaa26e24597d62cd1e1f00fd57", "score": "0.6993764", "text": "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "title": "" }, { "docid": "b5274db7f223010ba13b3fb3ac5d8408", "score": "0.6989918", "text": "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "title": "" }, { "docid": "dc37ca952e5aa8737ac79892a422cfea", "score": "0.6986989", "text": "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "title": "" }, { "docid": "bff1360b669526d70f66f72de9b76539", "score": "0.6966502", "text": "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "title": "" }, { "docid": "69a0b21fb3b59fd1b7774d63afaf03c5", "score": "0.69656384", "text": "public function create()\n {\n return view('essentials::create');\n }", "title": "" }, { "docid": "ea30089b05638deecfcdcc640118738c", "score": "0.69564354", "text": "public function create()\n {\n return view('student.add');\n }", "title": "" }, { "docid": "eac67c9622712586377b66a2ff564132", "score": "0.69518244", "text": "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "title": "" }, { "docid": "be6ad27859db471093b0e5b2b09e5ffa", "score": "0.6951109", "text": "public function create()\n {\n return view('url.form');\n }", "title": "" }, { "docid": "4ee11638c71a6ea969bb422d3a513bda", "score": "0.6947306", "text": "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "83e29d54fc108190b1ca75caea24b5d6", "score": "0.69444615", "text": "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "title": "" }, { "docid": "ce097a7f86eacaa44dea17f0ad57e5af", "score": "0.69423944", "text": "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "title": "" }, { "docid": "63235ca26b90700eb46b16522a29a31a", "score": "0.6941156", "text": "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "title": "" }, { "docid": "d2dfb39011e7751d334f3b102132bcc0", "score": "0.6937871", "text": "public function create()\n {\n return view('libro.create');\n }", "title": "" }, { "docid": "d2dfb39011e7751d334f3b102132bcc0", "score": "0.6937871", "text": "public function create()\n {\n return view('libro.create');\n }", "title": "" }, { "docid": "568c63d802970802d43c670f348a8248", "score": "0.6936686", "text": "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "86b686b6be4369d69b332035b9a9579c", "score": "0.69345254", "text": "public function create()\n {\n return view('crud/add'); }", "title": "" }, { "docid": "3d16ba2e8beea5bc83a97cb880a9f9da", "score": "0.69318026", "text": "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "title": "" }, { "docid": "78e9486c325ba462b19adda0de272401", "score": "0.692827", "text": "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "94c3779c0a1265eecd22d4385bc1a934", "score": "0.69263744", "text": "public function create()\n {\n return view(\"List.form\");\n }", "title": "" }, { "docid": "c05c0fad6b86bafa1a0ffd1ca41d8a55", "score": "0.69242257", "text": "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "title": "" }, { "docid": "c51fdc706a6bfd79c2e1ca2912a1434f", "score": "0.6918349", "text": "public function create()\n {\n //load create form\n return view('products.create');\n }", "title": "" }, { "docid": "943358ea83a0abf7110deef8982f670d", "score": "0.6915889", "text": "public function create()\n {\n return view('article.addform');\n }", "title": "" }, { "docid": "5423c52c2321e0ddafbf93b55fde7689", "score": "0.6912884", "text": "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "title": "" }, { "docid": "878980bfa045be8eca4bad020abc5d6b", "score": "0.691146", "text": "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "title": "" }, { "docid": "847110acc021dbc5428f114892048164", "score": "0.69103104", "text": "public function create()\n {\n return view('saldo.form');\n }", "title": "" }, { "docid": "38dc65c51f50b512e830025272aee8c9", "score": "0.69085974", "text": "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "title": "" }, { "docid": "71762e87e905a248387bd0eac328ea8a", "score": "0.69040126", "text": "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "title": "" }, { "docid": "1bfbbb63771571819ef62035e977dcd9", "score": "0.69014287", "text": "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "0dcbd3dcfb7f80f9e64b710cfe60e77b", "score": "0.69012105", "text": "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "title": "" }, { "docid": "0ff401bbe9c3f43249bbe6cc8081a963", "score": "0.6900397", "text": "public function create()\n {\n return view('admin.inverty.add');\n }", "title": "" }, { "docid": "b026faf0a320028862c1ad2d3bb9025a", "score": "0.68951064", "text": "public function create()\n {\n return view('Libro.create');\n }", "title": "" }, { "docid": "7e9bc89349235582540fd9e5fef9dbbb", "score": "0.6893521", "text": "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "title": "" }, { "docid": "1b909d974761b249842d1adf1e84fa31", "score": "0.68932164", "text": "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "title": "" }, { "docid": "ef4a16e2e4036ea15c66bada12e01b16", "score": "0.6891899", "text": "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "title": "" }, { "docid": "a43ba09f835dbd27d4a3433e6207db17", "score": "0.6891616", "text": "public function create()\n {\n return view('admin.car.create');\n }", "title": "" }, { "docid": "a43ba09f835dbd27d4a3433e6207db17", "score": "0.6891616", "text": "public function create()\n {\n return view('admin.car.create');\n }", "title": "" }, { "docid": "2588f5840e59634edceb01654f4d7a91", "score": "0.6889246", "text": "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "title": "" }, { "docid": "bdb0161d2f2f44cdaea93bf890a4c02e", "score": "0.68880934", "text": "public function create()\n {\n return view(\"create\");\n }", "title": "" }, { "docid": "5ada95495a3e9a254b79e8c70f274d97", "score": "0.6887128", "text": "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "title": "" }, { "docid": "074b6466da7d7a38ad6f093bacefd057", "score": "0.6884732", "text": "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "title": "" }, { "docid": "ebf8f32acbc00c6c98f44086fb506407", "score": "0.68822503", "text": "public function create()\n {\n return view('forming');\n }", "title": "" }, { "docid": "b752ab61e98965233583e0eb2216d1cc", "score": "0.68809193", "text": "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "title": "" }, { "docid": "13debeb6b2f841fc73faa59d5d4d47d7", "score": "0.6875949", "text": "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "title": "" }, { "docid": "69dd4f50e962869ab773465a9b841e66", "score": "0.68739206", "text": "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "title": "" }, { "docid": "4ddd90ea14473a86e2988865e2801155", "score": "0.68739134", "text": "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "title": "" }, { "docid": "08b2184ad0a486ae1bab76e79b3a1b26", "score": "0.6870358", "text": "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "title": "" }, { "docid": "9577fbd0ebc45d0dafabfda3c9643259", "score": "0.6869779", "text": "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "title": "" }, { "docid": "bb9dd69a0a75abb92567d5f767841152", "score": "0.68696856", "text": "public function create()\n {\n return view('student::students.student.create');\n }", "title": "" }, { "docid": "7b07df9cfd457b02f48b76d7469d53e0", "score": "0.686877", "text": "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}", "title": "" } ]
1081a5dc866c16665a5ba54af8ccc3fe
getPhotoAttribute that is made with standard method (asset) whene you get Photo from database (automacly added
[ { "docid": "3d78c82e0649e94fc699611a995e4606", "score": "0.63200694", "text": "public function getPhotoAttribute($val)\n {\n return ($val !== null) ? asset('assets/' . $val) : \"\";\n\n }", "title": "" } ]
[ { "docid": "fbef396185b284bef2355de7f88a3e61", "score": "0.71558046", "text": "function getPhoto()\r\n {\r\n return $this->_photo;\r\n }", "title": "" }, { "docid": "779bf8f7a6e0da3ebccfe559d7a213dd", "score": "0.70814335", "text": "public function getPhoto()\n {\n return $this->photo;\n }", "title": "" }, { "docid": "779bf8f7a6e0da3ebccfe559d7a213dd", "score": "0.70814335", "text": "public function getPhoto()\n {\n return $this->photo;\n }", "title": "" }, { "docid": "779bf8f7a6e0da3ebccfe559d7a213dd", "score": "0.70814335", "text": "public function getPhoto()\n {\n return $this->photo;\n }", "title": "" }, { "docid": "779bf8f7a6e0da3ebccfe559d7a213dd", "score": "0.70814335", "text": "public function getPhoto()\n {\n return $this->photo;\n }", "title": "" }, { "docid": "a480735cafdc78e3157d271fbb6e8b28", "score": "0.6979935", "text": "public function getPhoto()\n {\n return $this->firstMedia(\"photo\");\n }", "title": "" }, { "docid": "e3f09717b98bae3ba16753df5404c90b", "score": "0.69775176", "text": "public function getPhoto() {\n return $this->photo;\n }", "title": "" }, { "docid": "4b0ad7757a3cb8c2d4844b0bfd8fb5c9", "score": "0.6892006", "text": "public function getCoverAttribute()\n {\n if ($this->image_id) {\n return $this->photos()\n ->where('id', $this->image_id)\n ->first();\n }\n\n if ($photo = $this->photos->first()) {\n return $photo;\n }\n\n return null;\n }", "title": "" }, { "docid": "34def50e99727b9d623a1c39e2a12a51", "score": "0.6877583", "text": "public function getPhoto()\n {\n return ($this->_get('is_photo_public') === false && !isset($this->overridePhotoAccessor))\n ? null : $this->_get('photo');\n }", "title": "" }, { "docid": "ee23f9bbe40e8c4df486f78f41018f8d", "score": "0.68632036", "text": "public function getPhotoAttribute($photo)\n {\n $photoUrl = ($photo) ? url('api/photos/'.$photo) : null;\n return $photoUrl;\n }", "title": "" }, { "docid": "6dd2d5ca62a7b810d00eb3d72ff61a87", "score": "0.68326193", "text": "public function getPhoto($photo=null)\n {\n if ($photo != null && is_array($this->fikrs) && count($this->fikrs)!=0) {\n $table_name = strtolower(get_class($this));\n $query = \"SELECT * FROM $table_name WHERE photo = ?\";\n $req = Manager::bdd()->prepare($query);\n $req->execute([$photo]);\n $data = \"\";\n if ($data = $req->fetchAll(PDO::FETCH_ASSOC)) {\n$d=$data[0];\n$this->setId($d['id']);\n$this->setTitre($d['titre']);\n$this->setLivre($d['livre']);\n$this->setCfikr($d['cfikr']);\n$this->setAuteur($d['auteur']);\n$this->setVille($d['ville']);\n$this->setDate_ajout($d['date_ajout']);\n$this->setLangue($d['langue']);\n$this->setPhoto($d['photo']);\n$this->fikrs =$data; \n return $this;\n }\n \n } else {\n return $this->photo;\n }\n \n }", "title": "" }, { "docid": "fa74b83d561c94622eeb5c9f2060245a", "score": "0.6680925", "text": "public function getImage()\n{\nreturn $this->Image;\n}", "title": "" }, { "docid": "5d4ccb31ef2685b66fd40138cf3ea7f8", "score": "0.65568143", "text": "public function getSinglePhoto() {\n $id = $this->getPhotoId();\n $this->getPhoto($id);\n }", "title": "" }, { "docid": "5dfbc9dab4bce3040b2b186247d84c1a", "score": "0.6540033", "text": "public function attributes()\n {\n return [\n 'photo' => 'picture'\n ];\n }", "title": "" }, { "docid": "e1a189f7514a3eb7e04dc874e0480c8e", "score": "0.65081525", "text": "public function getImageAttribute()\n {\n return $this->getMedia('admin.avatar')->last();\n }", "title": "" }, { "docid": "7bbad203eefc30747cdcdc2d33001266", "score": "0.64775026", "text": "public function getImagePathAttribute()\n {\n return 'walks/' . $this->photos[0]->name;\n }", "title": "" }, { "docid": "8664b6f34de5b421770a3f567e8b148d", "score": "0.644953", "text": "public function photo()\n {\n return $this->morphOne('App\\Photo', 'photoable');\n }", "title": "" }, { "docid": "c5b750ae91b61208a8221434bcaab0ae", "score": "0.64224046", "text": "public function getPictureAttribute()\n\t{\n\t\t$image = null;\n\t\tif ($this->resource) \n\t\t\t$image = 'storage/images/' . $this->resource->url . $this->resource->extension;\n\t\telse if ($this->id == 1)\n\t\t\t$image = 'img/default.png';\n\t\telse\n\t\t\t$image = 'img/animals/' . static::ANIMALS[$this->id % count(static::ANIMALS)];\n\t\tif ($image) \n\t\t\treturn asset($image);\n\t\t\treturn asset('img/toxic.png');\n\t}", "title": "" }, { "docid": "9a877e1a7584be703c5471b2b3abfbb1", "score": "0.6390491", "text": "public function photo(){\n return $this->morphMany('App\\Photo' , 'imageable');\n }", "title": "" }, { "docid": "0aeaca862d242a586bcd6605256d7713", "score": "0.63739896", "text": "public function getPhoto() : string\r\n\t{\r\n\t\treturn $this->photo;\r\n\t}", "title": "" }, { "docid": "98d94746e5ad21601172b94b53bd736a", "score": "0.6326878", "text": "public function photo()\n {\n return $this->morphOne(Photo::class, 'photoable');\n }", "title": "" }, { "docid": "fbcac9f3ba5e06183b8d927c700229c4", "score": "0.63233936", "text": "public function photo()\n {\n return $this->belongsTo(Attachment::class, 'photo_id');\n }", "title": "" }, { "docid": "80db482a53b89a98c2c3b3c44c3646a5", "score": "0.6312878", "text": "public function getPhoto(int $id): Photo;", "title": "" }, { "docid": "62ea92bc27d961562ef76e55f1ea9c03", "score": "0.63099575", "text": "public function getUrlAttribute(){\n\n\n if (substr($this->photo,0,4)==='http'){\n\n\n return $this->photo;\n }\n\n return '/images/animals/' . $this->photo;\n }", "title": "" }, { "docid": "7266d52eb70cd74ff395519e3a1aa364", "score": "0.62644863", "text": "public function getImageAttribute() {\n $defaultPath = \"/img/default-product.jpg\";\n $image = $this->images()->where( 'is_main_image', '=', 1 )->first();\n if ( null === $image ) {\n return new LocalImageFile( $defaultPath );\n }\n\n if ( $image->path instanceof LocalImageFile ) {\n return $image->path;\n }\n\n }", "title": "" }, { "docid": "c25df1edd881e788d3c326e69d1763ce", "score": "0.62541395", "text": "function getPhotoPathAttribute() \n\t{\n\n\t\t$path = self::BasePath() ;\n\n\t\tif ($this->photo) {\n\t\t\t$path .= $this->id.'/photo/'.$this->photo;\n\t\t}\n\n\t\telse {\n\t\t\t$path .= self::NoPhoto;\n\t\t}\n\n\t\treturn $path;\n\t}", "title": "" }, { "docid": "a1a09631768cf82cc3a469ef94113b16", "score": "0.6238468", "text": "public function photo($photoid);", "title": "" }, { "docid": "1910f84cbe753357dcd83f2af0b45b3e", "score": "0.6219155", "text": "public function photo_get()\n { \n if (($id = $this->get('id')) == FALSE) {\n $id = $this->get_user()->user_id; \n }\n\n $user = new User($id); \n\n if ($this->get('thumbnail') == TRUE) {\n $url = $user->getThumbnailUrl();\n } else {\n $url = $user->getPhotoUrl();\n } \n\n $response = array('url' => $url);\n\n $this->response($response, 200, 'html');\n }", "title": "" }, { "docid": "7d105b19b6de050660c58381f0bcfacd", "score": "0.6192222", "text": "protected function getImageAttribute(): Image\n {\n return $this->attributeHelper('image', Image::class);\n }", "title": "" }, { "docid": "dd0f0f2a2348254f6f96f6cc4434b8eb", "score": "0.6154757", "text": "public function getShowPhoto()\n {\n return $this->photo_url;\n }", "title": "" }, { "docid": "deaadee707f2877efdecad69ba17cedb", "score": "0.6138498", "text": "public function getAsset()\n {\n return $this->asset;\n }", "title": "" }, { "docid": "deaadee707f2877efdecad69ba17cedb", "score": "0.6138498", "text": "public function getAsset()\n {\n return $this->asset;\n }", "title": "" }, { "docid": "4abc58b2d93127fa3a4245bf76ef30b1", "score": "0.61313903", "text": "public function getImageAttribute(){\n if (!$this->hasData('image_attribute')){\n $this->setData('image_attribute', Mage::getStoreConfig(self::XML_IMAGE_ATTRIBUTE_PATH));\n }\n return $this->getData('image_attribute');\n }", "title": "" }, { "docid": "1da94db38596b3a536d35f718f2bb073", "score": "0.611671", "text": "public function getPhoto()\n {\n if ($this->photo()->count()){\n return $this->photo->path;\n }\n return false;\n }", "title": "" }, { "docid": "f8047ba67b4d778fe8fff1fcf7b054a5", "score": "0.60971874", "text": "public function getImagemAttribute($value){\n return asset($value);\n }", "title": "" }, { "docid": "24d4c0c125a279069e32740488ae09a6", "score": "0.60913163", "text": "public function getPhoto()\n {\n if ($this->photos->count() > 0)\n {\n return $this->photos->first()->url;\n }\n return \"image/defaults/no-image.png\";\n }", "title": "" }, { "docid": "decc7306785b048e974d1fcd3de51c39", "score": "0.60881186", "text": "public function getImageAttribute() {\n\t\t$defaultPath = \"/img/default-product.jpg\";\n\t\t$image = $this->images()->where( 'is_main_image', '=', 1 )->first();\n\n\t\tif ( null === $image ) {\n\t\t\treturn new LocalImageFile( $defaultPath );\n\t\t}\n\n\t\tif ( $image->path instanceof LocalImageFile ) {\n\t\t\treturn $image->path;\n\t\t}\n\n\t}", "title": "" }, { "docid": "40c1b30fab82deaf515ef0db0f29d98c", "score": "0.60874766", "text": "public function getFoto()\n {\n return $this->foto;\n }", "title": "" }, { "docid": "40c1b30fab82deaf515ef0db0f29d98c", "score": "0.60874766", "text": "public function getFoto()\n {\n return $this->foto;\n }", "title": "" }, { "docid": "40c1b30fab82deaf515ef0db0f29d98c", "score": "0.60874766", "text": "public function getFoto()\n {\n return $this->foto;\n }", "title": "" }, { "docid": "28d12eef670d784d78725cc522609c13", "score": "0.6070699", "text": "public function getRandomPhoto(){\n $photo = new Photo();\n return $photo->getRandomPhoto();\n }", "title": "" }, { "docid": "dc4f11c688ca3e83eb1594173e6cb07d", "score": "0.60490954", "text": "public function getPhotoId()\n {\n return $this->photoId;\n }", "title": "" }, { "docid": "a4ed5446e20ea1ca45ee0458eae60657", "score": "0.6040571", "text": "public function getListPhoto()\n {\n return $this->listPhoto;\n }", "title": "" }, { "docid": "64331e3f8d430f353467d33e145f4cd8", "score": "0.60370976", "text": "public function getAvatarAttribute(){\n if($this->attributes['image']){\n return $this->attributes['image'];\n }else {\n return 'default_news_avatar.jpg';\n }\n }", "title": "" }, { "docid": "e58d31a32cfb4eccc8eee106b71a8ce2", "score": "0.603545", "text": "function getPicture() {\n return $this->picture;\n }", "title": "" }, { "docid": "1b1cb34998ce1b658d28dc2e6f887409", "score": "0.6029052", "text": "public function getFoto()\n {\n return $this->Foto;\n }", "title": "" }, { "docid": "c8efe81fc1ae36363665407e71537ee0", "score": "0.60256463", "text": "public function photo()\n {\n return $this->hasMany('Fresh\\Estet\\Photo');\n }", "title": "" }, { "docid": "1846f2faac2145e282eb48e27ea30906", "score": "0.6013904", "text": "public function getImage()\n {\n return $this->get('image');\n }", "title": "" }, { "docid": "68d81cc6c6212a5b40afba01319a354d", "score": "0.6006414", "text": "public function getUrlPhotoAttribute()\n {\n if (!empty($this->photo)) {\n return Storage::url(Cropper::thumb($this->photo, 500, 500));\n }\n return '';\n }", "title": "" }, { "docid": "33905d3c8cb666260ccd973b77a5ceeb", "score": "0.59819144", "text": "public function getAllPhotoData(){\n $photo = new Photo;\n return $photo->getAllPhotoData();\n }", "title": "" }, { "docid": "d740a723b40d6037b8ef7e80a6c417e8", "score": "0.5981425", "text": "public function getPhoto($attributes = [], $type='original', $onlyUrl = false, $modelSlug = null, $relation = null)\r\n {\r\n $this->setAttributes($modelSlug,'photo');\r\n $photo = $this->getFile();\r\n\r\n if( ! is_null($photo)) {\r\n $src = $this->getFileSrc($photo, $relation, $type);\r\n } else {\r\n $type = $type === 'original' ? 'biggest' : $type;\r\n $src = config(\"{$this->module}.{$this->modelSlug}.default_img_path\") . \"/{$type}.jpg\";\r\n }\r\n\r\n $attr = $this->getHTMLAttributes($attributes);\r\n return $onlyUrl ? asset($src) : '<img src=\"'.asset($src).'\" '.$attr.'>';\r\n }", "title": "" }, { "docid": "2d90bb0a5d31a66b2b1379849493833d", "score": "0.5980444", "text": "public function getImage(){\n\t\treturn $this->image;\n\t}", "title": "" }, { "docid": "798ea13881a79d44ddf0ace0de17ebfa", "score": "0.59735066", "text": "function getImage()\r\n {\r\n return $this->_image;\r\n }", "title": "" }, { "docid": "24988a3357a356199e8ebc69c9a7c9a4", "score": "0.5963199", "text": "public function getPic()\n {\n return $this->detail;\n }", "title": "" }, { "docid": "addebf2963e5cf8c5b6dbec039467106", "score": "0.59562606", "text": "public function getPhoto() : ?string\n {\n return $this->photo;\n }", "title": "" }, { "docid": "efd30c8bf81e78fdc7511913cf8d337f", "score": "0.5942228", "text": "public function setPhoto($photo)\n {\n $this->photo = $photo;\n \n return $this;\n }", "title": "" }, { "docid": "18fd4e334e6613c9ebf3b6462cdb5633", "score": "0.5938689", "text": "function getImage() {\n\t\treturn $this->image;\n\t}", "title": "" }, { "docid": "f5f2f80ca1f387a8413bfd3f2dee0644", "score": "0.59380895", "text": "public function getPhoto100()\n {\n return $this->photo_100;\n }", "title": "" }, { "docid": "f990e44ace5163d723734201a2eda573", "score": "0.5931491", "text": "public function getImgUrlAttribute()\n {\n return Storage::url($this->attributes[\"imagen\"]);\n }", "title": "" }, { "docid": "23cdd51fb7597fd35948feb74f78a8dd", "score": "0.5925936", "text": "public function image()\n {\n \t//polimorfismo a uno\n \treturn $this->morphOne(Image::class, 'imageable');\n }", "title": "" }, { "docid": "12ce72b85f1c88fd00be205997a0114c", "score": "0.5900724", "text": "public function getAvatar()\n {\n }", "title": "" }, { "docid": "1c99a6808240a87d7bb4df8115b86cff", "score": "0.5898871", "text": "public function getImageUrlAttribute()\n {\n return asset($this->path.DIRECTORY_SEPARATOR.$this->modified_filename);\n }", "title": "" }, { "docid": "6c00c4c796ded6356f12202c4c1f612e", "score": "0.5884414", "text": "public function getPhotoUrl()\n {\n return $this->photoUrl;\n }", "title": "" }, { "docid": "a5ee27708f853406c77a63b18884a1d5", "score": "0.5870169", "text": "public function getImagesAttribute()\n {\n return HotelImage::where('hotel_id',$this->id)->get();\n }", "title": "" }, { "docid": "43ff136bf9102fce827f4e34e547ae37", "score": "0.5866646", "text": "public function getImageAttribute($image) \n { \n return ($image) ? asset('storage/' . $image) : asset('img/default.png');\n }", "title": "" }, { "docid": "9565b94dc5f73b7742f5b6fb73174bfc", "score": "0.5857653", "text": "public function photo() {\n\t\t$tagValue = Director::URLParam('ID');\n\t\t$this->Title = \"Photos tagged '\".$tagValue.\"'\";\n\t\t$tag = DataObject::get_one('Tag', \"Value='\".$tagValue.\"'\");\n\t\t$this->TagValue = $tagValue;\n\t\t$this->Tag = $tag;\n\n\t\t$result = array();\n\t\tif ($tag) {\n\t\t\t$result = $tag->FlickrPhotos();\n\t\t\t$this->FlickrPhotos = $tag->FlickrPhotos();\n\n\t\t}\n\n\t\treturn array();\n\t}", "title": "" }, { "docid": "d318276d36feafe32e811be4b7236be0", "score": "0.5856846", "text": "public function get_image() {\n return $this->image;\n }", "title": "" }, { "docid": "6daf97ed3c82cd3638604557b6a316e4", "score": "0.5847782", "text": "function rest_api_user_profile_photo() {\n\n\t\tregister_rest_field( 'user', 'um_photo', array(\n\t\t\t'get_callback' => function( $user, $field_name, $request ) {\n\t\t\t\t$size = isset( $request->params['GET']['size'] ) ? $request->params['GET']['size'] : 40;\n\t\t\t\treturn um_get_user_avatar_data( $user['id'], $size );\n\t\t\t},\n\t\t\t'update_callback' => null,\n\t\t\t'schema' => null\n\t\t) );\n\t}", "title": "" }, { "docid": "00dcb98f64ac6b966c7eac33808894a4", "score": "0.5835014", "text": "public function getPhotoAttribute($value)\n {\n return url('storage/' . $value);\n }", "title": "" }, { "docid": "f2fab5197435faebc6fdf5b8e65aa473", "score": "0.5830159", "text": "public function getPhoto($type, $id){\r\n\t\ttry {\r\n\t\t\treturn BluApplication::getObject($type . 'photo', (int) $id);\r\n\t\t} catch (NoDataException $exception){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "9b155759249d816d08aec2ca8670af63", "score": "0.5810818", "text": "function write_photo(&$row, $attribute_name, $column_name, &$repository) {\n echo ' '.$attribute_name.'=\"'.$repository->url_for_file($row[$column_name], $row['racerid'], RENDER_CROPPED).'\"';\n}", "title": "" }, { "docid": "f15fb7aca25748440452d111f7e66a67", "score": "0.5802224", "text": "public function getImage()\n {\n return $this->hasOne(Image::className(), ['id' => 'image_id']);\n }", "title": "" }, { "docid": "38460e50425e658d7062bc4ffbd5bbbf", "score": "0.5801067", "text": "public function getImage()\r\n {\r\n return $this->image;\r\n }", "title": "" }, { "docid": "38460e50425e658d7062bc4ffbd5bbbf", "score": "0.5801067", "text": "public function getImage()\r\n {\r\n return $this->image;\r\n }", "title": "" }, { "docid": "f32283d279067ffd6b0d17da2e680733", "score": "0.5795725", "text": "public function getPhotoAttribute($value)\n {\n return $value ? asset('storage/'.USER_PHOTOS_DIRECTORY.$value) : null;\n }", "title": "" }, { "docid": "3b83f7da23fdc5a5c86b5ecd7bb6720d", "score": "0.5791916", "text": "public function image(){\n // belognsTo es la relacion inversa hacia el modelo categoria\n return $this->morphOne('App\\Image', 'imageable');\n }", "title": "" }, { "docid": "927fe035daf502a43d50439b41c5f410", "score": "0.5782497", "text": "public function actionPhotoModel()\n\t{\n\t\t// also picks up a few models for display and back fill. The code is a bit more\n\t\t// then what's needed. An ugly requirement is that we still need a description for images\n\t\t// at this point as the user will be needing to see that even if default image is shown\n\t\t//\n\t\t// Will return an single element unlike the array above in PhotoMakes\n\n\n\t\tif(!isset($_POST['ajax']))\n\t\t\tthrow new CHttpException(403, 'Not authorized');\n\n\t\tif(!isset($_POST['model_id']))\n\t\t\tthrow new CHttpException(400, 'Invalid Request');\n\t\n\t\t$model_id = $_POST['model_id'];\n\t\t\n\t\tif(!is_numeric($model_id))\n\t\t\tthrow new CHttpException(400, 'Invalid Request');\n\n\t\t$photo_url = $this->GetModelImage($model_id);\n\n\t\techo CJSON::encode($photo_url);\n\t}", "title": "" }, { "docid": "ae9de1761550e43be7c03f3818cdb65c", "score": "0.5779956", "text": "public function getFileAttribute()\n {\n return $this->firstMedia(self::MEDIA_MAIN);\n }", "title": "" }, { "docid": "5a1e3a1021f571d630e38bc41d167495", "score": "0.5772789", "text": "public function image(){\n return $this->morphOne('App\\Models\\Image', 'imageable');\n }", "title": "" }, { "docid": "2752099580873207ad31fda8f5fc5cef", "score": "0.5769447", "text": "public function get_image()\n {\n return $this->_img;\n }", "title": "" }, { "docid": "b5acfdcfde60f3c73f5b0e5386782f0b", "score": "0.576668", "text": "public function getImage() {\n return $this->get(self::IMAGE);\n }", "title": "" }, { "docid": "b5acfdcfde60f3c73f5b0e5386782f0b", "score": "0.576668", "text": "public function getImage() {\n return $this->get(self::IMAGE);\n }", "title": "" }, { "docid": "64afc9db11672774aa3ae540d8d7f77d", "score": "0.5762375", "text": "public function getmediagallery() {\n /**\n * Getting entity attribute model\n */\n return Mage::getResourceModel ( 'eav/entity_attribute' )->getIdByCode ( 'catalog_product', 'media_gallery' );\n }", "title": "" }, { "docid": "1369aae87129d71bfcbc93b9b2d6ab6c", "score": "0.5761428", "text": "public function getImage()\n {\n return Yii::$app->storage->getImage($this->image_id);\n }", "title": "" }, { "docid": "1500cd6740961242ab14e95523e8fa6c", "score": "0.5752808", "text": "public function getLienPhoto()\n {\n return $this->lienPhoto;\n }", "title": "" }, { "docid": "110856c8dc429285662ad3c199590adb", "score": "0.5746121", "text": "function getPicture() {\n\t\treturn $this->data['picture'];\n\t}", "title": "" }, { "docid": "ab7b7b75dad85eaae2e5e7995093ce69", "score": "0.57358885", "text": "private function getMockPhoto()\n {\n return $this->getMockBuilder(Photo::class)\n ->disableOriginalConstructor()\n ->getMock();\n }", "title": "" }, { "docid": "763256a210043ca69eeea3d61c72def5", "score": "0.57276297", "text": "public function getUrlImagenAttribute(){\n return $this->getUrlImagen();\n }", "title": "" }, { "docid": "6876b034725b33365e69d57d0941a083", "score": "0.57154495", "text": "public function photo()\n {\n return $this->hasOne('App\\PackagePhoto');\n }", "title": "" }, { "docid": "cc4e488688396958201dbd78fbd61f4a", "score": "0.5714952", "text": "public function getPicture()\n {\n return $this->picture;\n }", "title": "" }, { "docid": "cc4e488688396958201dbd78fbd61f4a", "score": "0.5714952", "text": "public function getPicture()\n {\n return $this->picture;\n }", "title": "" }, { "docid": "cc4e488688396958201dbd78fbd61f4a", "score": "0.5714952", "text": "public function getPicture()\n {\n return $this->picture;\n }", "title": "" }, { "docid": "cc4e488688396958201dbd78fbd61f4a", "score": "0.5714952", "text": "public function getPicture()\n {\n return $this->picture;\n }", "title": "" }, { "docid": "f6b46cbe516970d5033ab7a6452c7d89", "score": "0.57128245", "text": "public function Photos() {\n return $this->getSingletonHelperObject(__FUNCTION__);\n }", "title": "" }, { "docid": "d0b17f1fd5d7dedcf3274643c6de703e", "score": "0.5711839", "text": "public function getImage()\n {\n return $this->image;\n }", "title": "" }, { "docid": "d0b17f1fd5d7dedcf3274643c6de703e", "score": "0.5711839", "text": "public function getImage()\n {\n return $this->image;\n }", "title": "" }, { "docid": "d0b17f1fd5d7dedcf3274643c6de703e", "score": "0.5711839", "text": "public function getImage()\n {\n return $this->image;\n }", "title": "" }, { "docid": "d0b17f1fd5d7dedcf3274643c6de703e", "score": "0.5711839", "text": "public function getImage()\n {\n return $this->image;\n }", "title": "" }, { "docid": "d0b17f1fd5d7dedcf3274643c6de703e", "score": "0.5711839", "text": "public function getImage()\n {\n return $this->image;\n }", "title": "" }, { "docid": "d0b17f1fd5d7dedcf3274643c6de703e", "score": "0.5711839", "text": "public function getImage()\n {\n return $this->image;\n }", "title": "" } ]
9e3d4e997a21d82e8fd3dc4a007b01ff
$session = new \Zend\Session\Container('user_session');
[ { "docid": "7c0aac769a963de68c1c08ea9675185c", "score": "0.0", "text": "public function editAction() {\n $session = $this->getServiceLocator()->get('EtaxService')->getStorage()->read();\n $frm = new \\Bphtb\\Form\\Setting\\JenisKetetapanFrm();\n $req = $this->getRequest();\n if ($req->isGet()) { \n $id = $this->params('id');\n $data = $this->getTbl()->getDataId($id); \n $frm->bind($data);\n }\n $view = new \\Zend\\View\\Model\\ViewModel(array(\n 'frm' => $frm\n ));\n $menu = new \\Zend\\View\\Model\\ViewModel(array('menu_setting' => 'active', 'role_id' => $session['s_akses']));\n $sidemenu = new \\Zend\\View\\Model\\ViewModel(array('side_setting' => 'active',\n 'side_jenisketetapan' => 'active', 'role_id' => $session['s_akses']));\n $menu->setTemplate('bphtb/menu.phtml');\n $sidemenu->setTemplate('bphtb/side_menu.phtml');\n $view->addChild($menu, 'menu');\n $view->addChild($sidemenu, 'sidemenu');\n return $view;\n }", "title": "" } ]
[ { "docid": "97a36b027037557c710f510e5e033330", "score": "0.6936907", "text": "private static function getSessionObject()\n {\n return \\Phalcon\\DI::getDefault()->getSession();\n }", "title": "" }, { "docid": "a6c8fc703d90400e102c22376aa00a2e", "score": "0.6677628", "text": "function ju_customer_session():Session {return ju_o(Session::class);}", "title": "" }, { "docid": "132254c7ff5718fa42ffb3ee78693ab8", "score": "0.6644888", "text": "private function __construct(){\n session_start();\n }", "title": "" }, { "docid": "b613e7aca5f02b5448f3b5d231fbdbae", "score": "0.66103905", "text": "function __construct() {\n session_start();\n }", "title": "" }, { "docid": "ba8bbe7fc74790ce7259266e993128f3", "score": "0.660549", "text": "private function __construct()\n {\n session_start();\n }", "title": "" }, { "docid": "08e8f8d239c4ad757e74d9249e42e17a", "score": "0.6603462", "text": "private function bootstrapSession(EventInterface $e)\r\n {\r\n $session = $e->getApplication()\r\n ->getServiceManager()\r\n ->get('SbmAuthentificationManager');\r\n try {\r\n $session->start();\r\n } catch (\\Zend\\Session\\Exception\\RuntimeException $e) {\r\n $session->expireSessionCookie();\r\n $session->start();\r\n }\r\n \r\n $container = new Container('initialized');\r\n if (! isset($container->init)) {\r\n $serviceManager = $e->getApplication()->getServiceManager();\r\n $request = $serviceManager->get('Request');\r\n try {\r\n $session->regenerateId(true);\r\n } catch (\\Exception $e) {\r\n // try catch nécessaire pour les tests unitaires avec AbstractControllerTestCase\r\n } \r\n $container->init = 1;\r\n if ($request instanceof \\Zend\\Http\\PhpEnvironment\\Request) {\r\n $container->remoteAddr = $request->getServer()->get('REMOTE_ADDR');\r\n $container->httpUserAgent = $request->getServer()->get('HTTP_USER_AGENT');\r\n }\r\n \r\n $config = $serviceManager->get('config');\r\n if (! StdLib::array_keys_exists([\r\n 'sbm_session',\r\n 'validators'\r\n ], $config)) {\r\n return;\r\n }\r\n \r\n $validators = $config['sbm_session']['validators'];\r\n $chain = $session->getValidatorChain();\r\n foreach ($validators as $validator) {\r\n switch ($validator) {\r\n case 'Zend\\Session\\Validator\\HttpUserAgent':\r\n $validator = new $validator($container->httpUserAgent);\r\n break;\r\n case 'Zend\\Session\\Validator\\RemoteAddr':\r\n $validator = new $validator($container->remoteAddr);\r\n break;\r\n default:\r\n $validator = new $validator();\r\n }\r\n $chain->attach('session.validate', array(\r\n $validator,\r\n 'isValid'\r\n ));\r\n }\r\n }\r\n }", "title": "" }, { "docid": "d59b3db53721471825059bc86a0c3141", "score": "0.657491", "text": "protected function _initSession(){\n Zend_Session::start();\n }", "title": "" }, { "docid": "51e8b9d544a3d207c8d8b2eee30b8528", "score": "0.6570878", "text": "public function getSession();", "title": "" }, { "docid": "51e8b9d544a3d207c8d8b2eee30b8528", "score": "0.6570878", "text": "public function getSession();", "title": "" }, { "docid": "51e8b9d544a3d207c8d8b2eee30b8528", "score": "0.6570878", "text": "public function getSession();", "title": "" }, { "docid": "f2e3492f84b7f573173f1dcd917f0cb6", "score": "0.6555018", "text": "public function __construct()\n {\n session_start();\n }", "title": "" }, { "docid": "cfb1f84ec8e0114809c6c04ec985adc1", "score": "0.6553716", "text": "public function init()\n {\n $session = new Zend_Session_Namespace('User_Data');\n $this->view->user = $session;\n \n \n }", "title": "" }, { "docid": "b2718b7c3946cacca8109abf37b5a6f3", "score": "0.6536266", "text": "public function getSession()\n {\n return Mage::getSingleton('cashticket/session');\n }", "title": "" }, { "docid": "b3f50eda81c81e59a8e47755c0de61d3", "score": "0.6534812", "text": "public function getSession()\n {\n return Mage::getSingleton('customer/session');\n }", "title": "" }, { "docid": "7e21445879d2bb568407a9719ef9d104", "score": "0.6523576", "text": "public function getSession()\n {\n return Mage::getSingleton('pagamentodigital/session');\n }", "title": "" }, { "docid": "fd63476aa55997aa1045d8a9a4cef405", "score": "0.6489094", "text": "protected function _getSession() \n {\n return Mage::getSingleton('customer/session');\n }", "title": "" }, { "docid": "9292e6a41d3cb02f4eb2c16a46c6682c", "score": "0.6463737", "text": "public function __construct()\n {\n $this->session = new SessionService();\n }", "title": "" }, { "docid": "9292e6a41d3cb02f4eb2c16a46c6682c", "score": "0.6463737", "text": "public function __construct()\n {\n $this->session = new SessionService();\n }", "title": "" }, { "docid": "9d415744ff3a118d31ea9817137003ed", "score": "0.6450898", "text": "public function getSession()\n {\n return $this->getService('session');\n }", "title": "" }, { "docid": "2d572f5f8920fe43c3cff4edeeee008b", "score": "0.6436059", "text": "public function __construct()\n {\n session_start();\n }", "title": "" }, { "docid": "aa6f6cf71e16bfb6d9ac7bd12bc1c95c", "score": "0.64275897", "text": "public function __construct() {\n @session_start();\n \n}", "title": "" }, { "docid": "e1517e9634db6730f01ea1300a6a88c5", "score": "0.6394794", "text": "protected static function getFacadeAccessor() { return 'session'; }", "title": "" }, { "docid": "7b6fa86783c3734bcddc6f2da2bdafd2", "score": "0.6392095", "text": "public function __construct()\n {\n parent::__construct();\n session_start();\n }", "title": "" }, { "docid": "8b13741f73c48c2e0a17bedd7f8925b8", "score": "0.6356237", "text": "protected function getSessionService()\n {\n return $this->services['session'] = new \\Symfony\\Component\\HttpFoundation\\Session\\Session($this->get('session.storage.native'), new \\Symfony\\Component\\HttpFoundation\\Session\\Attribute\\AttributeBag(), new \\Symfony\\Component\\HttpFoundation\\Session\\Flash\\FlashBag());\n }", "title": "" }, { "docid": "8b13741f73c48c2e0a17bedd7f8925b8", "score": "0.6356237", "text": "protected function getSessionService()\n {\n return $this->services['session'] = new \\Symfony\\Component\\HttpFoundation\\Session\\Session($this->get('session.storage.native'), new \\Symfony\\Component\\HttpFoundation\\Session\\Attribute\\AttributeBag(), new \\Symfony\\Component\\HttpFoundation\\Session\\Flash\\FlashBag());\n }", "title": "" }, { "docid": "8b13741f73c48c2e0a17bedd7f8925b8", "score": "0.6356237", "text": "protected function getSessionService()\n {\n return $this->services['session'] = new \\Symfony\\Component\\HttpFoundation\\Session\\Session($this->get('session.storage.native'), new \\Symfony\\Component\\HttpFoundation\\Session\\Attribute\\AttributeBag(), new \\Symfony\\Component\\HttpFoundation\\Session\\Flash\\FlashBag());\n }", "title": "" }, { "docid": "8b13741f73c48c2e0a17bedd7f8925b8", "score": "0.6356237", "text": "protected function getSessionService()\n {\n return $this->services['session'] = new \\Symfony\\Component\\HttpFoundation\\Session\\Session($this->get('session.storage.native'), new \\Symfony\\Component\\HttpFoundation\\Session\\Attribute\\AttributeBag(), new \\Symfony\\Component\\HttpFoundation\\Session\\Flash\\FlashBag());\n }", "title": "" }, { "docid": "4ecb651375a5c08a0f00144a1a1b9ce5", "score": "0.6347812", "text": "private function _getSession()\n {\n return Mage::getSingleton('payone_core/session');\n }", "title": "" }, { "docid": "ba95897d53ef76229307ed3cd65f5746", "score": "0.6323603", "text": "protected function __construct()\n {\n $this->_session = new Session();\n }", "title": "" }, { "docid": "9572a8103281ad66d1aa809a8e03b22b", "score": "0.63198614", "text": "public static function get_Auth_Storage_Session()\n\t{\n\t\t$storage = new Zend_Auth_Storage_Session();\n\t\treturn $data = $storage->read();\n\t}", "title": "" }, { "docid": "6bbebaef82ac63d590a0a35e727d9696", "score": "0.63145906", "text": "function session()\n{\n return \\Essential\\Http\\Session::getCurrent();\n}", "title": "" }, { "docid": "5125478382d06d3962e96a61fa5090c2", "score": "0.63064927", "text": "protected function _initSession(){\n\t\tZend_Session::start();\n\t\tZend_Session::setOptions( array ('strict'=> true) ); //reducing overhead by enhancing the session functionality for only pages that needs a session /\n\t\tif(!Zend_Registry::isRegistered('session'))\n\t\t{\n\t\t\t$this->session = new Zend_Session_Namespace('default');\n\t\t\tZend_Registry::set('session', $this->session);\n\t\t}\n\t\t\n\t\t\n\t\n\n\t}", "title": "" }, { "docid": "6196f7c9a9f7c0696a178021a24e72ff", "score": "0.63029844", "text": "public function __construct() {\n \n parent::__construct();\n \n $this->sessionUser = Zf_SessionHandler::zf_getSessionVariable(\"ttv_identificationCode\");\n \n \n }", "title": "" }, { "docid": "a4e0e8cdb7105dd663fc47548881ad4f", "score": "0.6295639", "text": "protected function _getSession()\n {\n return Mage::getSingleton('customer/session');\n }", "title": "" }, { "docid": "a4e0e8cdb7105dd663fc47548881ad4f", "score": "0.6295639", "text": "protected function _getSession()\n {\n return Mage::getSingleton('customer/session');\n }", "title": "" }, { "docid": "a4e0e8cdb7105dd663fc47548881ad4f", "score": "0.6295639", "text": "protected function _getSession()\n {\n return Mage::getSingleton('customer/session');\n }", "title": "" }, { "docid": "a4e0e8cdb7105dd663fc47548881ad4f", "score": "0.6295639", "text": "protected function _getSession()\n {\n return Mage::getSingleton('customer/session');\n }", "title": "" }, { "docid": "a4e0e8cdb7105dd663fc47548881ad4f", "score": "0.6295639", "text": "protected function _getSession()\n {\n return Mage::getSingleton('customer/session');\n }", "title": "" }, { "docid": "a4e0e8cdb7105dd663fc47548881ad4f", "score": "0.6295639", "text": "protected function _getSession()\n {\n return Mage::getSingleton('customer/session');\n }", "title": "" }, { "docid": "a4e0e8cdb7105dd663fc47548881ad4f", "score": "0.6295639", "text": "protected function _getSession()\n {\n return Mage::getSingleton('customer/session');\n }", "title": "" }, { "docid": "bd3476481d977c41d6ca1fc8dbe4a0ed", "score": "0.62916595", "text": "public function __construct()\n {\n if(!\\Session::has('user')) \\Session::put('user', array());\n }", "title": "" }, { "docid": "784fc607b68eda4cc84ec1888021180a", "score": "0.62891704", "text": "static public function getSession(){\n return $_SESSION;\n }", "title": "" }, { "docid": "f935cd6fba011675735e626de36b5c8f", "score": "0.62817264", "text": "public function __construct() {\r\n $this->session = new Session();\r\n $this->view = new View();\r\n $this->session->start();\r\n }", "title": "" }, { "docid": "9f28bcc5d759174659ae4bef294c6b97", "score": "0.62723535", "text": "public function create_session()\n {\n # code...\n }", "title": "" }, { "docid": "a9a37fae9564576fb4c304c0718aac52", "score": "0.6258631", "text": "public function session() {\n\t\treturn $this->getService(__FUNCTION__);\n\t}", "title": "" }, { "docid": "462035ae846d9a264f9c5ef6fb7bfda6", "score": "0.62470317", "text": "public function register(Container $container)\n {\n $container['session'] = $this;\n }", "title": "" }, { "docid": "94cbce32a414f73c98c22f73cb204671", "score": "0.6242228", "text": "public function __construct()\n {\n $this->middleware('session.manager');\n }", "title": "" }, { "docid": "9e6e35e752748e1fb334c42a81b51733", "score": "0.6235531", "text": "protected function initSession()\n\t\t{\n\t\t\t//Se inicia la sesion.\n\t\t\tsession_save_path($this->config->session_save_path);\n\t\t\tZend_Session::start(array('save_path' => $this->config->session_save_path));\n\t\t\t$this->session = new Zend_Session_Namespace ('UCID_Cedrux_UCI');\n\t\t\t\n\t\t\t//Se busca en la cache si la session se inicializo\n\t\t\t$cacheObj = ZendExt_Cache::getInstance();\n\t\t\t$cacheData = $cacheObj->load(session_id());\n\t\t\t\n\t\t\t//Se protege el id de la session contra ataques.\n\t\t\tif (!isset($cacheData->initialized))\n\t\t\t{\n\t\t\t Zend_Session::regenerateId();\n\t\t\t $sessionStd = new stdClass();\n\t\t\t $sessionStd->initialized = true;\n\t\t\t $cacheObj->save($sessionStd, session_id());\n\t\t\t}\n\t\t\t\n\t\t\t//Se guarda en el registro la session.\n\t\t\t$this->register->session = $this->session;\n\t\t}", "title": "" }, { "docid": "4910fe0bc03df28476c03560bcf7bd4d", "score": "0.6215991", "text": "protected function getSessionService()\n {\n return $this->services['TYPO3\\\\CMS\\\\Extbase\\\\Persistence\\\\Generic\\\\Session'] = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstanceForDi(\\TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Session::class, ($this->services['TYPO3\\\\CMS\\\\Extbase\\\\Object\\\\Container\\\\Container'] ?? $this->getContainerService()));\n }", "title": "" }, { "docid": "c605ccf12e36558141711bd4fb79cfb1", "score": "0.6209576", "text": "public function __construct() {\n $this->session();\n }", "title": "" }, { "docid": "06bd9724d7a83944a8cb2cf8ec4ecc2c", "score": "0.6203823", "text": "abstract protected function getSession();", "title": "" }, { "docid": "468377bfb7ec2e96495bcd39c9313b0d", "score": "0.62020975", "text": "function session_get()\n{\n $session_factory = new \\Aura\\Session\\SessionFactory;\n$session = $session_factory->newInstance($_COOKIE);\n //$session->destroy();\n $segment = $session->getSegment('Vendor\\Package\\ClassName');\n // var_dump( $segment->get('user_search'));\n return $segment->get('user_search');\n}", "title": "" }, { "docid": "dde3c0ff621f9375b64d69a17be61c7a", "score": "0.6195063", "text": "public function registerContainer( SessionContainerInterface $sessionContainer );", "title": "" }, { "docid": "9b5ade02186cfdd338f9969040245160", "score": "0.61734796", "text": "public function __construct() {\n if(!isset($_SESSION['user']) || $_SESSION['user'] == null){\n $_SESSION['user']['fuser'] = 'fuser';\n }\n $this->sessions = $_SESSION['user']; \n }", "title": "" }, { "docid": "211c6d430d186df8d7bc5c1370bf97cb", "score": "0.6171517", "text": "function get_session(){\n return $_SESSION;\n }", "title": "" }, { "docid": "9af2827f998398934a702490a28bb017", "score": "0.61623263", "text": "public function getSession()\n {\n return Mage::getSingleton('checkout/session');\n }", "title": "" }, { "docid": "df7f93082ee8d06b2c71d98b3db5cce1", "score": "0.6151506", "text": "function __construct() {\n parent::__construct();\n session_start();\n }", "title": "" }, { "docid": "df7f93082ee8d06b2c71d98b3db5cce1", "score": "0.6151506", "text": "function __construct() {\n parent::__construct();\n session_start();\n }", "title": "" }, { "docid": "1c91086e5867579f9f058c6846aca30c", "score": "0.6149567", "text": "public static function getUserSession(): ?self;", "title": "" }, { "docid": "3f4977b6e985d0483f4ff265a419607c", "score": "0.61435974", "text": "public function __construct(){\n if (!isset($_SESSION)){\n session_start();\n }\n }", "title": "" }, { "docid": "01055cddd19ab3f3a9f5b3fb8bb73016", "score": "0.61370033", "text": "protected function _getSession()\n {\n return Mage::getSingleton('adminhtml/session');\n }", "title": "" }, { "docid": "347d774dbd54348f62cbfff7d0469eeb", "score": "0.6128908", "text": "private function _setSession() {\nif (session_id() == '') {\nsession_start();\n}\n$_SESSION['id'] = $this->id;\n$_SESSION['email'] = $this->email;\n$_SESSION['firstName'] = $this->firstName;\n$_SESSION['lastName'] = $this->lastName;\n$_SESSION['phone'] = $this->phone;\n$_SESSION['isLoggedIn'] = $this->isLoggedIn;\n$_SESSION['isAdmin'] = $this->isAdmin;\n$_SESSION['isModerator'] = $this->isModerator;\n}", "title": "" }, { "docid": "2da8681e5c8899153479f9d62689f482", "score": "0.6125073", "text": "public function getSession(){\r\n return $this->session;\r\n }", "title": "" }, { "docid": "8cd7d8b641f1f4bdd9ff3d8b5e059768", "score": "0.6123108", "text": "function __construct() {\n\tsession_start();\n\tsession_set_cookie_params(3600);\n}", "title": "" }, { "docid": "fee5db63d4784e3c2f9c99ea35411c89", "score": "0.6103655", "text": "private function _getSession(){\n if(self::$_session instanceof Section) {\n return self::$_session;\n }else{\n return self::_createSession();\n }\n }", "title": "" }, { "docid": "6ca0c16bc20a68a149e0b3cc13d077dd", "score": "0.60976505", "text": "public function __construct()\n\t{\n\t\t$this->_session = Agl::getSession();\n\t}", "title": "" }, { "docid": "f4ae8f7cd888183d5e26a93bd41e289d", "score": "0.60948455", "text": "public function __construct()\n {\n $this->sessao = session();\n }", "title": "" }, { "docid": "ff271f3f4c1d74d1721e68e555b55f6b", "score": "0.60913444", "text": "public function __construct()\n {\n parent::__construct();\n $this->load->library('session');\n\n\n }", "title": "" }, { "docid": "ff271f3f4c1d74d1721e68e555b55f6b", "score": "0.60913444", "text": "public function __construct()\n {\n parent::__construct();\n $this->load->library('session');\n\n\n }", "title": "" }, { "docid": "ff271f3f4c1d74d1721e68e555b55f6b", "score": "0.60913444", "text": "public function __construct()\n {\n parent::__construct();\n $this->load->library('session');\n\n\n }", "title": "" }, { "docid": "ff271f3f4c1d74d1721e68e555b55f6b", "score": "0.60913444", "text": "public function __construct()\n {\n parent::__construct();\n $this->load->library('session');\n\n\n }", "title": "" }, { "docid": "dca49d3772d7b4d0f4aef2defe6541f6", "score": "0.60768706", "text": "function __construct()\n\n {\n\n parent::__construct();\n $this->load->library('session');\n\n\n }", "title": "" }, { "docid": "c9c5757bc14fc929a7f398f117aec8d0", "score": "0.6069068", "text": "public function initSession();", "title": "" }, { "docid": "702dab4a47519f0d6f69f25469f027c0", "score": "0.60427976", "text": "protected function _getSession() {\n\t\treturn Mage::getSingleton('blueknow_recommender/session');\n\t}", "title": "" }, { "docid": "189d850ee1193019c85e78d0f8a3a278", "score": "0.6038645", "text": "public function getContainer( string $name ) : SessionContainerInterface;", "title": "" }, { "docid": "f558823947d9c9aeda08616a6ebd43fa", "score": "0.6032117", "text": "function &getUserSession() {\n return $this->userSession;\n\t}", "title": "" }, { "docid": "e2888225a15f04299390f093fc3b812c", "score": "0.60208446", "text": "public function init(){\n $this->_em = Zend_Registry::getInstance()->entitymanager;\n $this->_defaultNamespace = new Zend_Session_Namespace('Default');\n $this->view->flashMessages = $this->_helper->flashMessenger->getMessages();\n }", "title": "" }, { "docid": "0e6991dd09b45d2c96ca9d93cc1e0d71", "score": "0.6016832", "text": "public function __construct() {\r\n parent::__construct();\r\n Session::init();\r\n }", "title": "" }, { "docid": "2f40b2885279646d20dbd25ae350c37b", "score": "0.6015583", "text": "protected function _getSession()\n\n {\n\n return Mage::getSingleton('checkout/session');\n\n }", "title": "" }, { "docid": "7bc10aae673157f35a36d8c7d537231f", "score": "0.60136074", "text": "public function initSession()\n {\n }", "title": "" }, { "docid": "dc60d8801ec3687e4c26e18314c9269c", "score": "0.6006153", "text": "public function registerSession(){\n\t\tsession_start();\n\t}", "title": "" }, { "docid": "6986cb6dbe7ae905c3566604cae83179", "score": "0.60034066", "text": "public function __construct()\n {\n \n \n /**\n * placer ici user agent pour browser \n */\n $this->_session=Zend_Registry::get(\"bzSession\");\n \n $this->_broswers=$_SERVER['HTTP_USER_AGENT'];\n \n //Zend_Debug::dump($this->_broswers,\"browser\");\n \n $this->_ip=$_SERVER['REMOTE_ADDR'];\n \n if(isset($_COOKIE['PHPSESSID'])){\n $this->_sessionId=$_COOKIE['PHPSESSID']; \n }\n \n \n \n }", "title": "" }, { "docid": "943cd6f18295f5e31ef7bb945c3119ad", "score": "0.6002091", "text": "public function __construct()\r\n {\r\n if (!self::$_session instanceof \\Zend_Session_Namespace) {\r\n\r\n self::$_session = new \\Zend_Session_Namespace($this->getName());\r\n\r\n if (self::$_session->{$this->_namespace} && is_array(self::$_session->{$this->_namespace}) &&\r\n in_array(key(self::$_session->{$this->_namespace}), self::$_allowedTypes)) {\r\n self::$_message = self::$_session->{$this->_namespace};\r\n }\r\n\r\n unset(self::$_session->{$this->_namespace});\r\n }\r\n\r\n if (\\Zend_Registry::isRegistered('Zend_Translate')) {\r\n $translator = \\Zend_Registry::get('Zend_Translate');\r\n if ($translator instanceof \\Zend_Translate_Adapter) {\r\n $this->_translator = $translator;\r\n } elseif ($translator instanceof \\Zend_Translate) {\r\n $this->_translator = $translator->getAdapter();\r\n }\r\n }\r\n }", "title": "" }, { "docid": "1387ee91e07eb2e729c4c186bed97166", "score": "0.5988458", "text": "private function registerSession()\n {\n $session = new Session($this->app, $this->app->getConfig()['session']);\n $session->start();\n\n $this->app->bind('session', $session);\n }", "title": "" }, { "docid": "c46381aa2cf6a4a53a70c5f262060f5f", "score": "0.59800404", "text": "function CI_Session()\r\n\t{\r\n\t\t$this->object =& get_instance();\r\n\t\tlog_message('debug', \"Native_session Class Initialized\");\r\n\t\t$this->_sess_run();\r\n\t}", "title": "" }, { "docid": "317df8f3fcd5d94348372c77a3f821cb", "score": "0.5976062", "text": "protected function getSession()\n {\n\n if(isset($_SESSION['auth']))\n {\n $this->session['auth'] = $_SESSION['auth'];\n }\n\n if(isset($_SESSION['userinfo']))\n {\n $this->session['userinfo'] = $_SESSION['userinfo'];\n }\n }", "title": "" }, { "docid": "8ccff1d5605d545e0af25e5c36498561", "score": "0.5971333", "text": "public function __construct($request){\n $this->session = $request->session(); \n }", "title": "" }, { "docid": "6f5bf7b5869d52007e04c1801324ba72", "score": "0.59548676", "text": "protected function getSessionUserService()\n {\n return $this->services['App\\\\Service\\\\SessionUser'] = new \\App\\Service\\SessionUser();\n }", "title": "" }, { "docid": "3fefa826566173e4ad3b30f9ce78596c", "score": "0.59404945", "text": "function __construct(){\n parent::__construct(); \n $ci->load->library('session');\n}", "title": "" }, { "docid": "4dd1df240b7835edb20d5b6ae0a391ea", "score": "0.59358424", "text": "public function __construct() {\n if ( !isset($_SESSION) ) {\n session_start();\n } \n }", "title": "" }, { "docid": "b9ef224cb57e8402ba28e84e4895a688", "score": "0.5924754", "text": "static function session();", "title": "" }, { "docid": "7f22da9706858045a80f3ebd78d9a55a", "score": "0.5921171", "text": "protected function _session()\n {\n if (self::$_sessionNamespace === NULL) {\n self::$_sessionNamespace = new Zend_Session_Namespace(__CLASS__);\n }\n $this->_validate();\n self::$_sessionNamespace->controllerClass = get_class($this->getActionController());\n return self::$_sessionNamespace;\n }", "title": "" }, { "docid": "3956c56aeb5cd8870721eff1d31c8ad6", "score": "0.5920195", "text": "public static function __init() {\n\t\tstatic::$_storage = static::$_classes['session'];\n\t}", "title": "" }, { "docid": "b410c4e9f13df4b9e815e85728d0f8a7", "score": "0.5916564", "text": "public function getCustomerSession()\n {\n return Mage::getSingleton('customer/session');\n }", "title": "" }, { "docid": "0ca58cb2a5c423e4961e2f8fcd0d40cc", "score": "0.5915568", "text": "public function setSession($input = array(),$name = ''){\n $experience_search = new Zend_Session_Namespace($name);\n $experience_search->session_array = $input;\n }", "title": "" }, { "docid": "acc89a696b3a3ecfdff50c5914fa39b0", "score": "0.5906338", "text": "protected function _getSession()\n {\n return Mage::getSingleton('checkout/session');\n }", "title": "" }, { "docid": "a38a903d8d83bae172ab1d95e5019ee6", "score": "0.5905475", "text": "function initSession( )\n\t{\n\n\t}", "title": "" }, { "docid": "ea29fd9d7d016f47fe52e64d37f6aa4b", "score": "0.5899309", "text": "public function __construct()\n {\n// print_r($_SESSION);\n// echo \"</pre>\";\n// die;\n }", "title": "" }, { "docid": "9fed73c6053a22552b5458ff656b05b5", "score": "0.58816075", "text": "public function sessions();", "title": "" }, { "docid": "594953b0bfda0d9d4a367a49b68fddb8", "score": "0.5877268", "text": "function _initSession(){\r\n\t\t\r\n\t\t$session_id = self::$session_id;\r\n\t\t\r\n\t\t$db_session = userSessionModel::getInstance()->getUserSession( $session_id );\r\n\t\tif ( isset($db_session) ) {\r\n\t\t\tself::$session = unserialize( $db_session['session_data'] );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "3944305b7e555708c8b6f346ab6976e6", "score": "0.5872452", "text": "public function __construct() {\r\n parent::__construct();\r\n @session_start(); //modelleri ilk başta almadığımızdan burada kullanıyoruz.\r\n }", "title": "" } ]
d4679a5e5e6043b12db0c5a5dba647a2
get a user level object by the given user_level_ID
[ { "docid": "c9345c4bfe8f4b4b91dacf97ccabed94", "score": "0.7274811", "text": "public static function getUserLevelByID($user_level_ID) {\r\n $conn = new mysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);\r\n if ($conn->connect_error) {\r\n die(\"Connection failed\" . $conn->error);\r\n }\r\n //retrieve user_level_type of the given user_level_ID accessing the table user_level\r\n $user_level_type = \"\";\r\n $stmt1 = $conn->prepare(\"SELECT user_level_type FROM user_level WHERE iduser_level=?\");\r\n $stmt1->bind_param(\"i\", $user_level_ID);\r\n $stmt1->execute();\r\n $stmt1->bind_result($user_level_type);\r\n $stmt1->fetch();\r\n $stmt1->close();\r\n\r\n //retrieve set of usecases of the given userlvel accessing the associate table user_use_case\r\n $usecase_ID = array();\r\n $usecase = array();\r\n $use_case_ID = null;\r\n $stmt2 = $conn->prepare(\"SELECT iduse_case FROM user_use_case WHERE iduser_level=?\");\r\n $stmt2->bind_param(\"i\", $user_level_ID);\r\n $stmt2->execute();\r\n $stmt2->bind_result($use_case_ID);\r\n while ($stmt2->fetch()) {\r\n array_push($usecase_ID, $use_case_ID);\r\n array_push($usecase, self::getUsecaseByID($use_case_ID));\r\n }\r\n $stmt2->close();\r\n\r\n //retrieve set of users of the given user level accessing the associate table person_user_level\r\n $employee_ID = array();\r\n $users = array();\r\n $emp_number = null;\r\n $stmt3 = $conn->prepare(\"SELECT emp_number FROM person_user_level WHERE iduser_level=?\");\r\n $stmt3->bind_param(\"i\", $user_level_ID);\r\n $stmt3->execute();\r\n $stmt3->bind_result($emp_number);\r\n while ($stmt3->fetch()) {\r\n array_push($employee_ID, $emp_number);\r\n array_push($users, EmployeeDBHandler::getEmployeeByID($emp_number));\r\n }\r\n $stmt3->close();\r\n\r\n $conn->close();\r\n return UserLevel::withRow($user_level_ID, $user_level_type, $usecase, $users);\r\n }", "title": "" } ]
[ { "docid": "2e4e1dce4e092c4725545a70a5e23ffd", "score": "0.7648492", "text": "function pmpro_getSpecificMembershipLevelForUser( $user_id = null, $level_id ) {\n\tif ( empty( $user_id ) ) {\n\t\tglobal $current_user;\n\t\t$user_id = $current_user->ID;\n\t}\n\n\tif ( empty( $user_id ) || empty( $level_id ) ) {\n\t\treturn false;\n\t}\n\n\t$all_levels = pmpro_getMembershipLevelsForUser( $user_id );\n\n\tforeach ( $all_levels as $level ) {\n\t\tif ( $level->id == $level_id ) {\n\t\t\treturn $level;\n\t\t}\n\t}\n\n\treturn false;\n}", "title": "" }, { "docid": "abf7efe580a36cb3567b54c5d02a3679", "score": "0.6882007", "text": "public function get_level( $level_id = 0 ) {\n\t\tglobal $wpdb;\n\n\t\t$level = wp_cache_get( 'level_' . $level_id, 'rcp' );\n\n\t\tif( false === $level ) {\n\n\t\t\t$level = $wpdb->get_row( $wpdb->prepare( \"SELECT * FROM {$this->db_name} WHERE id='%d';\", $level_id ) );\n\n\t\t\twp_cache_set( 'level_' . $level_id, $level, 'rcp' );\n\n\t\t}\n\n\t\treturn $level;\n\n\t}", "title": "" }, { "docid": "f87b9b2a7e0c49d3deb683d1b88024bd", "score": "0.67266417", "text": "function getUserLevelDetails($user_level)\n\t\t{\n\t\t\t//get values of user level\n\t\t\treturn $this->_DAL_Obj->getValue_where('member_level_info', '*', 'member_level', $user_level);\n\t\t}", "title": "" }, { "docid": "fd13ce873cbad6e403dcd5f31214de6f", "score": "0.62471765", "text": "function pmpro_getLevel( $level ) {\n\tglobal $pmpro_levels;\n\n\tif ( is_object( $level ) && ! empty( $level->id ) ) {\n\t\t$level = $level->id;\n\t}\n\n\t// was a name passed? (Todo: make sure level names have at least one non-numeric character.\n\tif ( is_numeric( $level ) ) {\n\t\t$level_id = intval( $level );\n\t\tif ( isset( $pmpro_levels[ $level_id ] ) ) {\n\t\t\treturn $pmpro_levels[ $level_id ];\n\t\t} else {\n\t\t\tglobal $wpdb;\n\t\t\t$pmpro_levels[ $level_id ] = $wpdb->get_row( \"SELECT * FROM $wpdb->pmpro_membership_levels WHERE id = '\" . $level_id . \"' LIMIT 1\" );\n\t\t}\n\t} else {\n\t\tglobal $wpdb;\n\t\t$level_obj = $wpdb->get_row( \"SELECT * FROM $wpdb->pmpro_membership_levels WHERE name = '\" . esc_sql( $level ) . \"' LIMIT 1\" );\n\n\t\tif ( ! empty( $level_obj ) ) {\n\t\t\t$level_id = $level_obj->id;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\n\t\t$pmpro_levels[ $level_id ] = $level_obj;\t\n\t}\n\t\n\t// Round prices\n\tif ( ! empty( $pmpro_levels[ $level_id ] ) ) {\n\t\t$pmpro_levels[ $level_id ]->initial_payment = pmpro_round_price( $pmpro_levels[ $level_id ]->initial_payment );\n\t\t$pmpro_levels[ $level_id ]->billing_amount = pmpro_round_price( $pmpro_levels[ $level_id ]->billing_amount );\n\t\t$pmpro_levels[ $level_id ]->trial_amount = pmpro_round_price( $pmpro_levels[ $level_id ]->trial_amount );\n\t}\n\t\n\treturn $pmpro_levels[ $level_id ];\n}", "title": "" }, { "docid": "c4c8431c3ac14bc6c28546a3cd27bc0a", "score": "0.6229176", "text": "function get_user_level($username,$usertable='users',$levelfield='level',\n $userfield='username',$db='mysql')\n{\n switch($db)\n {\n case \"mysql\":\n $result = mysql_query\n (\"select $levelfield from $usertable where $userfield='$username'\")\n or die (mysql_error());\n if(mysql_num_rows($result)==1)\n {\n $row=mysql_fetch_array($result);\n return $row[$levelfield];\n }\n break;\n case \"pgsql\":\n $result = pg_query\n (\"select $levelfield from $usertable where $userfield='$username'\");\n $row=pg_fetch_array($result,null,PGSQL_ASSOC);\n if($row)\n return $row[$levelfield];\n break;\n }\n return null;\n}", "title": "" }, { "docid": "33b6b1c546c4ce5c273588e63e8b073c", "score": "0.62098026", "text": "function get_user_level()\n {\n return $this->user_level;\n }", "title": "" }, { "docid": "faa016cc0d9fd0c0df900e46ecf791a9", "score": "0.6140935", "text": "function CurrentUserLevel()\n{\n global $Security;\n return isset($Security) ? $Security->currentUserLevelID() : @$_SESSION[SESSION_USER_LEVEL_ID];\n}", "title": "" }, { "docid": "7f9b06f634a8f84e068eb590bec45e82", "score": "0.6117788", "text": "public function Subadminaccess($userid,$userlevel) {\n\t\t\n\t\t$condition = \"UserId='\".$userid.\"' AND UserLevel='\".$userlevel.\"'\";\n\t\t$this->db->select('access_list');\n\t\t$this->db->from('arm_user_permission');\n\t\t$this->db->where($condition);\n\t\t// $this->db->limit(1);\n\t\t$query = $this->db->get();\n\n\t\tif ($query->num_rows()>0) {\n\t\t\t// print_r($query->row());exit;\n\t\t\treturn $query->row();\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "a7b5742de7ba5ad16f2f7f02d8252c8e", "score": "0.61137474", "text": "public function show($id)\n {\n $level = Level::find($id);\n return $level;\n }", "title": "" }, { "docid": "1b7c9c6b1280468a6196a6fa5cb1458d", "score": "0.609298", "text": "public function getRoleUserByUserID($id);", "title": "" }, { "docid": "39c492672fc128d9bc2d17a60e86e053", "score": "0.6047232", "text": "function userdata_get_user_level($return_as_numeric = FALSE)\n {\n global $userdata;\n \n $user_level = '';\n for ($i=10; $i >= 0;$i--)\n {\n if (current_user_can('level_' . $i) === TRUE)\n {\n $user_level = $i;\n if ($return_as_numeric === FALSE)\n $user_level = 'level_'.$i; \n break;\n } \n } \n return ($user_level);\n }", "title": "" }, { "docid": "ef8e84639d6c1ec3ac5f9e9ea0a84dc0", "score": "0.6046366", "text": "public function get_level_field( $level_id = 0, $field = '' ) {\n\n\t\tglobal $wpdb;\n\n\n\t\t$value = wp_cache_get( 'level_' . $level_id . '_' . $field, 'rcp' );\n\n\t\tif( false === $value ) {\n\n\t\t\t$value = $wpdb->get_col( $wpdb->prepare( \"SELECT {$field} FROM {$this->db_name} WHERE id='%d';\", $level_id ) );\n\n\t\t\twp_cache_set( 'level_' . $level_id . '_' . $field, $value, 'rcp', 3600 );\n\n\t\t}\n\n\t\tif( $value )\n\t\t\treturn $value[0];\n\t\treturn false;\n\t}", "title": "" }, { "docid": "b21841bdcc557da4f69ea1aa80dc2322", "score": "0.6037779", "text": "function getCurrentUserLevel()\n{\n $user_level_map = getUserLevelMap();\n if (isset($_SESSION['user_level']) && array_key_exists($_SESSION['user_level'], $user_level_map)) {\n // array_key_exists will check $_SESSION['user_level'] whether exist in array $user_level_map for not\n return $user_level_map[$_SESSION['user_level']];\n } else {\n return \"unrecognized\";\n }\n}", "title": "" }, { "docid": "e7f5e86048c57cc826e8d48314fecebf", "score": "0.60108536", "text": "function getPerm($user_id){\n\t$res=new restrictClass();\n\t$res->userInfo($user_id);\n\techo $res->getUserLevel();\n\n}", "title": "" }, { "docid": "66e9a7fd6099c7f9e4ebc2a6f9a9c051", "score": "0.59399617", "text": "function get_user_by_id($kd_id)\n\t{\n\t\t$this->db->where('id', $kd_id);\n\n\t\t$query = $this->db->get($this->table_name);\n\t\tif ($query->num_rows() > 0) return $query;\n\t\treturn NULL;\n\t}", "title": "" }, { "docid": "ef3cf7e36b9e99ee314f2e02888a0193", "score": "0.59394646", "text": "function User_level($User_id, $User_level){\n\t\t$Data = array('系統等級' => (int)$User_level);\n\t\t$this->db->where('User_id', $User_id);\n\t\t$this->db->update('user_oss', $Data);\n\t}", "title": "" }, { "docid": "8538b8ec7c9e21f4464f46e59c00b599", "score": "0.58652556", "text": "public function getLevel($uid)\n {\n $query = $this->mysqli->prepare(\"SELECT level FROM users WHERE id = ?\");\n $query->bind_param(\"i\", $uid);\n $query->bind_result($level);\n $query->execute();\n $query->store_result();\n $count = $query->num_rows;\n $query->fetch();\n $query->close();\n\n if($count == 0)\n {\n return false;\n }\n else\n {\n return $level;\n }\n }", "title": "" }, { "docid": "1f1273ede2d02cc109b1acec1dc1eb28", "score": "0.58627445", "text": "function Authstatus($user_id) {\n return \\backend\\models\\User::find()->select('level_id')->where([\"username\"=>$user_id])->asArray()->one()['level_id'];\n /*$obj = new MyCommand;\n $q = 'select level_id from user where username =\"' . $user_id . '\"';\n return $obj->get($q)[0]['level_id'];*/\n}", "title": "" }, { "docid": "0b9372b361df721895c255af8f73d45c", "score": "0.585472", "text": "function pmpro_hasMembershipLevel( $levels = null, $user_id = null ) {\n\tglobal $current_user, $wpdb;\n\n\t$return = false;\n\n\tif ( empty( $user_id ) ) {\n\t\t$user_id = $current_user->ID;\n\t}\n\n\tif ( ! empty( $user_id ) && is_numeric( $user_id ) ) { // get membership levels for given user\n\t\t$membership_levels = pmpro_getMembershipLevelsForUser( $user_id );\n\t} else {\n\t\t$membership_levels = null; // non-users don't have levels\n\t}\n\n\tif ( $levels === '0' || $levels === 0 ) {\n\t\t$return = empty( $membership_levels );\n\t} elseif ( empty( $levels ) ) {\n\t\t$return = ! empty( $membership_levels );\n\t} else {\n\t\tif ( ! is_array( $levels ) ) {\n\t\t\t$levels = array( $levels );\n\t\t}\n\n\t\tif ( empty( $membership_levels ) ) {\n\t\t\t// check for negative level\n\t\t\t$negative_level = false;\n\t\t\tforeach ( $levels as $level ) {\n\t\t\t\tif ( intval( $level ) < 0 ) {\n\t\t\t\t\t$negative_level = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// are we looking for non-members or not?\n\t\t\tif ( $negative_level ) {\n\t\t\t\treturn true; // -1/etc, negative level\n\t\t\t} elseif ( in_array( 0, $levels, true ) || in_array( '0', $levels ) ) {\n\t\t\t\t$return = true; // 0 level\n\t\t\t} elseif ( in_array( 'L', $levels ) || in_array( 'l', $levels ) ) {\n\t\t\t\t$return = ( ! empty( $user_id ) && $user_id == $current_user->ID ); // L, logged in users\n\t\t\t} elseif ( in_array( '-L', $levels ) || in_array( '-l', $levels ) ) {\n\t\t\t\t$return = ( empty( $user_id ) || $user_id != $current_user->ID ); // -L, not logged in users\n\t\t\t} elseif ( in_array( 'E', $levels ) || in_array( 'e', $levels ) ) {\n\t\t\t\t$sql = \"SELECT id FROM $wpdb->pmpro_memberships_users WHERE user_id=$user_id AND status='expired' LIMIT 1\";\n\t\t\t\t$expired = $wpdb->get_var( $sql ); // E, expired members\n\t\t\t\t$return = ! empty( $expired );\n\t\t\t}\n\t\t} else {\n\t\t\tforeach ( $levels as $level ) {\n\t\t\t\tif ( strtoupper( $level ) == 'L' ) {\n\t\t\t\t\t// checking if user is logged in\n\t\t\t\t\tif ( ! empty( $user_id ) && $user_id == $current_user->ID ) {\n\t\t\t\t\t\t$return = true;\n\t\t\t\t\t}\n\t\t\t\t} elseif ( strtoupper( $level ) == '-L' ) {\n\t\t\t\t\t// checking if user is logged out\n\t\t\t\t\tif ( empty( $user_id ) || $user_id != $current_user->ID ) {\n\t\t\t\t\t\t$return = true;\n\t\t\t\t\t}\n\t\t\t\t} elseif ( $level === '0' || $level === 0 || strtoupper( $level ) === 'E' ) {\n\t\t\t\t\tcontinue; // user with levels so not a \"non-member\" or expired\n\t\t\t\t} else {\n\t\t\t\t\t// checking a level id\n\t\t\t\t\t$level_obj = pmpro_getLevel( is_numeric( $level ) ? abs( intval( $level ) ) : $level ); // make sure our level is in a proper format\n\t\t\t\t\tif ( empty( $level_obj ) ) {\n\t\t\t\t\t\tcontinue;} //invalid level\n\t\t\t\t\t$found_level = false;\n\n\t\t\t\t\tforeach ( $membership_levels as $membership_level ) {\n\t\t\t\t\t\tif ( $membership_level->id == $level_obj->id ) {\n\t\t\t\t\t\t\t$found_level = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( is_numeric( $level ) && intval( $level ) < 0 && ! $found_level ) {\n\t\t\t\t\t\t$return = true;\n\t\t\t\t\t} elseif ( is_numeric( $level ) && intval( $level ) > 0 && $found_level ) {\n\t\t\t\t\t\t$return = true;\n\t\t\t\t\t} elseif ( ! is_numeric( $level ) ) { // if a level name was passed\n\t\t\t\t\t\t$return = $found_level;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t$return = apply_filters( 'pmpro_has_membership_level', $return, $user_id, $levels );\n\treturn $return;\n}", "title": "" }, { "docid": "3021cf7767ce312e3f73eebc3a4663b9", "score": "0.5837763", "text": "public function get_u_level($level = false)\n {\n $count = $this->findAll();\n $count = count($count);\n if (!$level) {\n return false;\n } else {\n if ($level == 1) {\n return $this->findAll();\n }\n $l = $level - 1;\n $count = $count - $l;\n if ($level == 2) {\n\n return $this->findAll($count, $l);\n }\n if ($level == 3) {\n return $this->findAll($count, $l);\n }\n }\n }", "title": "" }, { "docid": "7d05137f1cc6730c705fcb2bdf435e17", "score": "0.5825453", "text": "public function fetchByID($userID)\n {\n return $this->user->find($userID);\n }", "title": "" }, { "docid": "f4393a85bcb5d18a13c5e6c2e3dadb9f", "score": "0.5800426", "text": "function get_userdata($user_id) {\n\t$EL = EasyLogin::getInstance();\n\treturn $EL->get_userdata($user_id);\n}", "title": "" }, { "docid": "3517d9cbbdb0ebc296f2bca6ac51062b", "score": "0.5782062", "text": "function pmpro_getMembershipLevelsForUser( $user_id = null, $include_inactive = false ) {\n\tif ( empty( $user_id ) ) {\n\t\tglobal $current_user;\n\t\t$user_id = $current_user->ID;\n\t}\n\n\tif ( empty( $user_id ) ) {\n\t\treturn false;\n\t}\n\n\t// make sure user id is int for security\n\t$user_id = intval( $user_id );\n\n\tglobal $wpdb;\n\t\n\t/**\n\t * We are going to see if cache is set before doing the query and use that if it is.\n\t * \n\t * In a default environment with no external object cache, the value is cached in that request and\n\t * reduces future MySQL requests. If there is an external object cache like Redis then it will be\n\t * persisted until the user level changes.\n\t **/\n\t$cache_key = 'user_' . $user_id . '_levels';\n $levels = wp_cache_get( $cache_key, 'pmpro' );\n\t\n\tif ( $levels === false ) {\n\t\t\t\t\n\t\t$levels = $wpdb->get_results(\n\t\t\t\"SELECT\n\t\t\t\tl.id AS ID,\n\t\t\t\tl.id as id,\n\t\t\t\tmu.id as subscription_id,\n\t\t\t\tl.name,\n\t\t\t\tl.description,\n\t\t\t\tl.expiration_number,\n\t\t\t\tl.expiration_period,\n\t\t\t\tmu.initial_payment,\n\t\t\t\tmu.billing_amount,\n\t\t\t\tmu.cycle_number,\n\t\t\t\tmu.cycle_period,\n\t\t\t\tmu.billing_limit,\n\t\t\t\tmu.trial_amount,\n\t\t\t\tmu.trial_limit,\n\t\t\t\tmu.code_id as code_id,\n\t\t\t\tUNIX_TIMESTAMP(startdate) as startdate,\n\t\t\t\tUNIX_TIMESTAMP(enddate) as enddate\n\t\t\tFROM {$wpdb->pmpro_membership_levels} AS l\n\t\t\tJOIN {$wpdb->pmpro_memberships_users} AS mu ON (l.id = mu.membership_id)\n\t\t\tWHERE mu.user_id = $user_id\" . ( $include_inactive ? '' : \" AND mu.status = 'active'\n\t\t\tGROUP BY ID\" )\n\t\t);\n\t\twp_cache_set( $cache_key, $levels, 'pmpro', 3600 );\n\t}\n\t\n\t// Round off prices\n\tif ( ! empty( $levels ) ) {\n\t\tforeach( $levels as $key => $level ) {\n\t\t\t$levels[$key]->initial_payment = pmpro_round_price( $level->initial_payment );\n\t\t\t$levels[$key]->billing_amount = pmpro_round_price( $level->billing_amount );\n\t\t\t$levels[$key]->trial_amount = pmpro_round_price( $level->trial_amount );\n\t\t}\n\t}\n\t\n\t/**\n\t * pmpro_get_membership_levels_for_user filter.\n\t *\n\t * Filters the returned levels.\n\t *\n\t * @since 1.8.5.4\n\t *\n\t * @param array $levels Array of level objects.\n\t */\n\t$levels = apply_filters( 'pmpro_get_membership_levels_for_user', $levels, $user_id );\n\n\treturn $levels;\n}", "title": "" }, { "docid": "4730ae4414f21d79330d51b0ae50686d", "score": "0.5775114", "text": "function getTreeData($id, $level)\n\t\t{\n\t\t\t$baseUrl = $this->getBaseUrl();\t\n\t\t\t//getting data about the id passed\t\n\t\t\t$userData = $this->_DAL_Obj->getValue_where('user_mlm_info', '*', 'user_id', $id);\t\n\t\t\tif($userData == 0)\n\t\t\t{\n\t\t\t\theader('location:'.$baseUrl.'404/');\n\t\t\t}\n\t\t\tif($level==1)\n\t\t\t{\n\t\t\t\t$parentName = $this->_DAL_Obj->getValue_where('user_info', '*', 'user_id', $id);\t\n\t\t\t\t$user_level = $this->getUserLevelDetails($parentName[0]['member_level']);\t\n\t\t\t\techo '<div class=\"wholesaler-block pull-left wholesaler-outline\">\n\t \t\t<img src=\"'.$baseUrl.'images/user-icon.png\" class=\"img-responsive\" />\n \t\t<div class=\"text-center wholsaler-textblock\">\n \t\t\t<p class=\"wholesaler\"><b>'.$parentName[0]['f_name'].\" \".$parentName[0]['l_name'].'</b></p>\n \t\t\t<p class=\"subhead\">'.$user_level[0]['member_category'].'</p>\n \t\t\t<p class=\"user\">'.$id.'</p>\n \t\t</div>\n \t</div>';\n\t\t\t\t//echoing 1st level child starting div if parent has a 1st level child\n\t\t\t\tif(!empty($userData[0]['child_id']))\n\t\t\t\t{\n\t\t\t\t\techo '<div class=\"local-member-block left-outline pull-left\">';\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\techo '<div style =\"margin-top:8%\" class=\"local-member-block left-outline pull-left\">';\n\t\t\t\t}\t\t\n }\n\t\t\t//checking if the user has child \n\t\t\tif(!empty($userData[0]['child_id']))\n\t\t\t{\n\t\t\t\t$childIds = explode(',', $userData[0]['child_id']);\n\t\t\t\tforeach($childIds as $childId)\n\t\t\t\t{\n\t\t\t\t\t//getting data of child\n\t\t\t\t\t$childData = $this->_DAL_Obj->getValue_where('user_mlm_info', '*', 'id', $childId);\t\n\t\t\t\t\t$childName = $this->_DAL_Obj->getValue_where('user_info', '*', 'user_id', $childData[0]['user_id']);\n\t\t\t\t\t$childLevel = $this->getUserLevelDetails($childName[0]['member_level']);\n\t\t\t\t\t//if level = 1,div class local-block local-small-outline pull-left will be echoed\n\t\t\t\t\tif($level == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\techo '<div class=\"local-block local-small-outline pull-left\">\n\t \t\t\t<a href =\"'.$baseUrl.'tree/'.$childData[0]['user_id'].'\"><img src=\"'.$baseUrl.$childLevel[0]['user_icon_link'].'\" alt=\"local\" class=\"img-responsive subicon-align\" /></a>\n\t\t \t\t<div class=\"text-center local-textblock\">\n\t\t \t\t\t<p class=\"local-small\"><b>'.$childName[0]['f_name'].\" \".$childName[0]['l_name'].'</b></p>\n\t\t \t\t\t<p class=\"subhead-small\">'.$childLevel[0]['member_category'].'</p>\n\t\t \t\t\t<p class=\"user-small\">'.$childData[0]['user_id'].'</p>\n\t\t \t\t</div>\n\t \t\t</div>';\n\t\t\t\t\t}\t\n\t\t\t\t\t//if level = 2,div class member-outline-small will be echoed;all of these divs will be under div class local-block member-outline pull-left\n\t\t\t\t\tif($level == 2)\n\t\t\t\t\t{\n\t\t\t\t\t\techo '<div class=\"member-outline-small\">\n\t \t\t\t<a href = \"'.$baseUrl.'tree/'.$childData[0]['user_id'].'\"><img src=\"'.$baseUrl.$childLevel[0]['user_icon_link'].'\" alt=\"member\" class=\"img-responsive subicon-align\" /></a>\n\t\t \t\t<div class=\"text-center member-textblock\">\n\t\t \t\t\t<p class=\"local-small\"><b>'.$childName[0]['f_name'].\" \".$childName[0]['l_name'].'</b></p>\n\t\t \t\t\t<p class=\"subhead-small\">'.$childLevel[0]['member_category'].'</p>\n\t\t \t\t\t<p class=\"user-small\">'.$childData[0]['user_id'].'</p>\n\t\t \t\t</div> \n \t\t\t</div>';\n\t\t\t\t\t}\t\n\t\t\t\t\t//checking child will be discontinued if level will be equal to two\n\t\t\t\t\tif($level != 2)\n\t\t\t\t\t{\n\t\t\t\t\t\t//checking if this id has child\n\t\t\t\t\t\tif(!empty($childData[0]['child_id']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//setting level variable to two\tin case of level 2 members\n\t\t\t\t\t\t\t$level = 2;\n\t\t\t\t\t\t\techo '<div class=\"local-block member-outline pull-left\">';\n\t\t\t\t\t\t\t$this->getTreeData($childData[0]['user_id'], $level);\n\t\t\t\t\t\t\techo '</div>';\n\t\t\t\t\t\t\techo '<div class=\"clearfix\"></div>';\n\t\t\t\t\t\t\t//setting level variable to one after echoing all level two members\n\t\t\t\t\t\t\t$level = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\techo '<div class=\"local-block member-outline pull-left\" style = \"margin-top:11%\"><p class=\"wholesaler\" style = \"margin-left:5%;margin-top: 15%;margin-bottom: 10%;\"><b>'.no_child.'</b></p></div>';\n\t\t\t\t\t\t\t//echoing this div which would have been echoed if the present id had a child\t\n\t\t\t\t\t\t\techo '<div class=\"clearfix\"></div>';\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//echoing 1st level child ending div if parent has a 1st level child\n\t\t\tif(!empty($userData[0]['child_id']) && $level == 1)\n\t\t\t{\n\t\t\t\techo '</div>';\n\t\t\t}\n\t\t\tif(empty($userData[0]['child_id']) && $level == 1)\n\t\t\t{\n\t\t\t\techo '<p class=\"wholesaler\" style = \"margin-left:5%;margin-top: 5%;\"><b>'.no_child.'</b></p></div>';\n\t\t\t\t\t\t//echoing this div which would have been echoed if the present id had a child\t\n\t\t\t\t\t\techo '<div class=\"clearfix\"></div>';\n\t\t\t}\n\t\t\t\n\t\t}", "title": "" }, { "docid": "4a6c698d66282f9ce0d8602be31ccffd", "score": "0.5764363", "text": "function pmpro_getMembershipLevelForUser( $user_id = null, $force = false ) {\n\tif ( empty( $user_id ) ) {\n\t\tglobal $current_user;\n\t\t$user_id = $current_user->ID;\n\t}\n\n\tif ( empty( $user_id ) ) {\n\t\treturn false;\n\t}\n\n\t// make sure user id is int for security\n\t$user_id = intval( $user_id );\n\n\tglobal $all_membership_levels;\n\n\tif ( isset( $all_membership_levels[ $user_id ] ) && ! $force ) {\n\t\treturn $all_membership_levels[ $user_id ];\n\t} else {\n\t\tglobal $wpdb;\n\t\t$all_membership_levels[ $user_id ] = $wpdb->get_row(\n\t\t\t\"SELECT\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tl.id AS ID,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tl.id as id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmu.id as subscription_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tl.name AS name,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tl.description,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tl.expiration_number,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tl.expiration_period,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tl.allow_signups,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmu.initial_payment,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmu.billing_amount,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmu.cycle_number,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmu.cycle_period,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmu.billing_limit,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmu.trial_amount,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmu.trial_limit,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmu.code_id as code_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tUNIX_TIMESTAMP(startdate) as startdate,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tUNIX_TIMESTAMP(enddate) as enddate\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM {$wpdb->pmpro_membership_levels} AS l\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tJOIN {$wpdb->pmpro_memberships_users} AS mu ON (l.id = mu.membership_id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE mu.user_id = $user_id AND mu.status = 'active'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLIMIT 1\"\n\t\t);\n\n\t\t// if null, change to false to avoid user meta conflicts\n\t\tif ( empty( $all_membership_levels[ $user_id ] ) ) {\n\t\t\t$all_membership_levels[ $user_id ] = false;\n\t\t}\n\t\t\n\t\t// Round off prices\n\t\tif ( ! empty( $all_membership_levels[$user_id] ) ) {\n\t\t\tif ( isset( $all_membership_levels[$user_id]->initial_payment ) ) {\n\t\t\t\t$all_membership_levels[$user_id]->initial_payment = pmpro_round_price( $all_membership_levels[$user_id]->initial_payment );\n\t\t\t}\n\t\t\tif ( isset( $all_membership_levels[$user_id]->billing_amount ) ) {\n\t\t\t\t$all_membership_levels[$user_id]->billing_amount = pmpro_round_price( $all_membership_levels[$user_id]->billing_amount );\n\t\t\t}\n\t\t\tif ( isset( $all_membership_levels[$user_id]->trial_amount ) ) {\n\t\t\t\t$all_membership_levels[$user_id]->trial_amount = pmpro_round_price( $all_membership_levels[$user_id]->trial_amount );\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * pmpro_get_membership_level_for_user filter.\n\t\t *\n\t\t * Filters the returned level.\n\t\t *\n\t\t * @since 1.8.5.4\n\t\t *\n\t\t * @param object $level Level object.\n\t\t */\n\t\t$all_membership_levels[ $user_id ] = apply_filters( 'pmpro_get_membership_level_for_user', $all_membership_levels[ $user_id ], $user_id );\n\n\t\treturn $all_membership_levels[ $user_id ];\n\t}\n}", "title": "" }, { "docid": "55a6a750fc7bac9f91f390124fd5dad7", "score": "0.57543796", "text": "static function retrieveByPK($user_id) {\n\t\treturn static::retrieveByPKs($user_id);\n\t}", "title": "" }, { "docid": "d642d32c3938e01ea8c501b4da70ce76", "score": "0.57471", "text": "function qa_get_logged_in_level()\n{\n\treturn qa_get_logged_in_user_field('level');\n}", "title": "" }, { "docid": "ed333469a1657fbb06178ecf615a6df8", "score": "0.5689107", "text": "function getUser($user){\n \n if(is_int($user)){\n if($user == 0){\n return false;\n }\n \n $user_object = user_load($user);\n }\n else {\n $user_object = $user;\n }\n \n if(!$user_object OR $user_object -> uid == 0){\n return false;\n }\n \n if(isset($this -> user[$user_object -> uid])){\n return $this -> user[$user_object -> uid];\n }\n \n // Load profiles\n $user_object -> profile = profile2_load_by_user($user_object);\n \n if(lk_is_moderator($user_object)){\n $return = new Moderator($user_object, $this);\n }\n elseif(lk_is_verlags_controller($user_object)){\n $return = new VerlagController($user_object, $this);\n }\n elseif(lk_is_verlag($user_object)){\n $return = new Verlag($user_object, $this);\n }\n elseif(lk_is_mitarbeiter($user_object)){\n $return = new Mitarbeiter($user_object, $this);\n }\n elseif(lk_is_agentur($user_object)){\n $return = new Agentur($user_object, $this);\n }\n else {\n return false; \n }\n \n if(!$return) {\n return false; \n }\n \n $this -> user[$user_object -> uid] = $return;\n return $this -> user[$user_object -> uid];\n }", "title": "" }, { "docid": "27d6ba0b83a42545836e46dc590fb037", "score": "0.565916", "text": "function pmpromc_pmpro_after_change_membership_level($level_id, $user_id)\n{\n\tglobal $pmpromc_levels;\n\t$options = get_option(\"pmpromc_options\");\n\t$all_lists = get_option(\"pmpromc_all_lists\");\t\n\t\t\n\t//should we add them to any lists?\n\tif(!empty($options['level_' . $level_id . '_lists']) && !empty($options['api_key']))\n\t{\n\t\t//get user info\n\t\t$list_user = get_userdata($user_id);\t\t\n\t\t\n\t\t//subscribe to each list\n\t\t$api = new MCAPI( $options['api_key']);\n\t\tforeach($options['level_' . $level_id . '_lists'] as $list)\n\t\t{\t\t\t\t\t\n\t\t\t//echo \"<hr />Trying to subscribe to \" . $list . \"...\";\n\t\t\t\n\t\t\t//subscribe them\n\t\t\t$api->listSubscribe($list, $list_user->user_email, array(\"FNAME\" => $list_user->first_name, \"LNAME\" => $list_user->last_name), \"html\", $options['double_opt_in']);\n\t\t}\n\t\t\n\t\t//unsubscribe them from lists not selected\n\t\tforeach($all_lists as $list)\n\t\t{\n\t\t\tif(!in_array($list['id'], $options['level_' . $level_id . '_lists']))\n\t\t\t\t$api->listUnsubscribe($list['id'], $list_user->user_email);\n\t\t}\n\t}\n\telseif(!empty($options['api_key']) && count($options) > 3)\n\t{\n\t\t//now they are a normal user should we add them to any lists?\n\t\tif(!empty($options['users_lists']) && !empty($options['api_key']))\n\t\t{\n\t\t\t//get user info\n\t\t\t$list_user = get_userdata($user_id);\n\t\t\t\n\t\t\t//subscribe to each list\n\t\t\t$api = new MCAPI( $options['api_key']);\n\t\t\tforeach($options['users_lists'] as $list)\n\t\t\t{\t\t\t\t\t\n\t\t\t\t//subscribe them\n\t\t\t\t$api->listSubscribe($list, $list_user->user_email, array(\"FNAME\" => $list_user->first_name, \"LNAME\" => $list_user->last_name), \"html\", $options['double_opt_in']);\n\t\t\t}\n\t\t\t\n\t\t\t//unsubscribe from any list not assigned to users\n\t\t\tforeach($all_lists as $list)\n\t\t\t{\n\t\t\t\tif(!in_array($list['id'], $options['users_lists']))\n\t\t\t\t\t$api->listUnsubscribe($list['id'], $list_user->user_email);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//some memberships are on lists. assuming the admin intends this level to be unsubscribed from everything\n\t\t\tif(is_array($all_lists))\n\t\t\t{\n\t\t\t\t//get user info\n\t\t\t\t$list_user = get_userdata($user_id);\n\t\t\t\t\n\t\t\t\t//unsubscribe to each list\n\t\t\t\t$api = new MCAPI( $options['api_key']);\n\t\t\t\tforeach($all_lists as $list)\n\t\t\t\t{\n\t\t\t\t\t$api->listUnsubscribe($list['id'], $list_user->user_email);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "56e5d7462a5a307e8f33e38fd9473057", "score": "0.56574386", "text": "public function getUser($id) {\r\n\t\treturn self::get(intval($id));\r\n\t}", "title": "" }, { "docid": "392c1e6123c700e8f8ab7a59987a156f", "score": "0.5642171", "text": "public function checkAuth($requiredLevel, $user){\n $queryUserRole = $this->prepQuery(\"SELECT roleLevel FROM users \n INNER JOIN userRoles ON roleId = fkRole\n WHERE userId = :ID\");\n $queryUserRole->bindParam(':ID', $user, \\PDO::PARAM_INT);\n if($queryUserRole->execute() && $queryUserRole->rowCount() === 1){\n $data = $queryUserRole->fetch(\\PDO::FETCH_OBJ);\n $role = (int)$data->roleLevel;\n if((int)$role >= (int)$requiredLevel){\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "a834849d7a7d4e54d02af849a59c04ab", "score": "0.5638202", "text": "public function get(UserId $id): User;", "title": "" }, { "docid": "6c72048146db94f19f7ba0ee5ac9839c", "score": "0.5629958", "text": "function levelOne($id){\n $query = \"SELECT\n level\n FROM\n `levels`\n WHERE\n id = :idlevel\n\t\t\t\t\t\";\n \n // prepare query statement\n $stmt = $this->conn->prepare( $query );\n \n // bind id of product to be updated\n\t\t $stmt->bindParam(\":idlevel\", $id);\n \n // execute query\n $stmt->execute();\n \n // get retrieved row\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n \n // set values to object properties\n $this->level = $row['level'];\n\n }", "title": "" }, { "docid": "05a65600e2034f92cf1abbd65f7c53f0", "score": "0.5622059", "text": "public function getPartyObject($userId=-1){\n $stmt = $this->db->prepare(\n \"SELECT\n p.name as partyName,\n u.username as ownerUsername,\n u.userid as ownerId,\n concat('#',p.color) as color,\n pu.userId=:userId as isOwner\n FROM\n Party p,\n PartyUser pu,\n User u\n WHERE\n p.partyid=:partyId AND\n p.removed=0 AND\n pu.partyid=p.partyid AND\n pu.owner=1 AND\n pu.unjoined=0 AND\n u.userid=pu.userid\n ;\");\n $stmt->bindValue(':partyId', $this->partyId);\n $stmt->bindValue(':userId', $userId);\n $stmt->execute();\n return $stmt->fetch(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "d07120f76ba97b532e378f6ac9ecedd7", "score": "0.56123096", "text": "function project_get_local_user_access_level( $p_project_id, $p_user_id ) {\n\t$p_project_id = (int)$p_project_id;\n\n\tif( ALL_PROJECTS == $p_project_id ) {\n\t\treturn false;\n\t}\n\n\tdb_param_push();\n\t$t_query = 'SELECT access_level\n\t\t\t\t FROM {project_user_list}\n\t\t\t\t WHERE user_id=' . db_param() . ' AND project_id=' . db_param();\n\t$t_result = db_query( $t_query, array( (int)$p_user_id, $p_project_id ) );\n\n\t$t_level = db_result( $t_result );\n\tif( $t_level ) {\n\t\treturn (int)$t_level;\n\t} else {\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "f8cf4282f57e8e78b101d79246e4edad", "score": "0.5611657", "text": "static public function getUserLevel($user_name)\n\t{\n\t\tif ($user_name == 'none') {return 1;}\n\t\t\n\t\t$mysqli = UserHandling::GetUsersDatabaseConnection();\n\t\t$results = $mysqli->query(\"SELECT access_level FROM users WHERE user_name='$user_name'\");\n\t\treturn mysqli_fetch_assoc($results)['access_level'];\n\t}", "title": "" }, { "docid": "cefe66446eb410ace0199e954349aed7", "score": "0.560709", "text": "public function getItem($id)\n {\n return $this->memberLevelVerb->getItem($id);\n }", "title": "" }, { "docid": "c4348615bd53e866697afa1d2f47e12b", "score": "0.56037235", "text": "function get_user($id_user)\n {\n return $this->db->get_where('user',array('id_user'=>$id_user))->row_array();\n }", "title": "" }, { "docid": "5be70cac02de8aea22f4d32d3dd26f76", "score": "0.56006473", "text": "function isUserlevel($level) {\n return ($this->userlevel == $level);\n }", "title": "" }, { "docid": "0dab98e18318844a929a7185ce7c442f", "score": "0.5597654", "text": "function _getDepartmentLevel($user) {\n global $medoo;\n \n $departments = keyed_by_id($medoo->select(\"departments\", [\"id\", \"level\"]));\n $department = $departments[$user->classInfo[\"department_id\"]];\n return $department ? $department[\"level\"] : 0;\n}", "title": "" }, { "docid": "acb362c6c5e0ad9897b57188a7e8eebb", "score": "0.5596485", "text": "public function getOneById($id)\n\t{\n\t\treturn $this->user->where('id', '=', $id)->first();\n\t}", "title": "" }, { "docid": "b045b1a8e8b094f1f18326d74ca83c47", "score": "0.5595758", "text": "function pmpromh_getHomepageForLevel( $level_id = NULL ) {\n\tif(empty($level_id) && function_exists( 'pmpro_getMembershipLevelForUser' ) ) {\n\t\tglobal $current_user;\n\t\t$level = pmpro_getMembershipLevelForUser( $current_user->ID );\n\t\tif( !empty( $level ) ) {\n\t\t\t$level_id = $level->id;\n\t\t}\n\t}\n\t\n\t//look up by level\n\tif( !empty( $level_id ) ) {\n\t\t$member_homepage_id = get_option( 'pmpro_member_homepage_' . $level_id );\n\t} else {\n\t\t$member_homepage_id = false;\n\t}\n\n\t/**\n\t * Filter to allow the Member Homepage ID to be set to any post ID, including a Custom Post Type.\n\t *\n\t * @param $member_homepage_id int The level's asssigned homepage ID. False is not set for this level.\n\t * @param $level_id int The ID of the current user's membership level.\n\t *\n\t * @return $member_homepage_id int The member homepage ID.\n\t *\n\t */\n\t$member_homepage_id = apply_filters( 'pmpro_member_homepage_id', $member_homepage_id, $level_id );\n\n\treturn $member_homepage_id;\n}", "title": "" }, { "docid": "7d8a182fd6e33f535fa3202b9a7f2742", "score": "0.5593569", "text": "public function getUser($id) \n\t{\n\t\treturn $this->user->where('id', $id)->first();\n\t}", "title": "" }, { "docid": "26a650d8e1b16e330c79314ebe43ba25", "score": "0.5560654", "text": "function getUserRelatedByUserId() {\n\t\t$fk_value = $this->getuser_id();\n\t\tif (null === $fk_value) {\n\t\t\treturn null;\n\t\t}\n\t\treturn User::retrieveByPK($fk_value);\n\t}", "title": "" }, { "docid": "70457cc35bb6bbbdfa5918615a31c2da", "score": "0.5550072", "text": "function get_issue($authLevel, $id) {\n\t\t\tif ($authLevel == 1) {\n\t\t\t\t// mod level\n\t\t\t\t$query = $this->db->get_where(\"TicketIssue\", array(\"type\" => \"mod\", \"rowid\" => $id));\n\n\t\t\t} elseif ($authLevel >= 2) {\n\t\t\t\t// admin/dev level\n\t\t\t\t$query = $this->db->get_where(\"TicketIssue\", array(\"rowid\" => $id));\n\t\t\t}\n\n\t\t\tif ($query->num_rows() > 0) {\n\t\t\t\treturn $query->first_row();\n\t\t\t} else {\n\t\t\t\treturn array();\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "cde0caa89b359b0903336076273b6e79", "score": "0.55499244", "text": "public static function getUser(int $userID = null)\n {\n $user = Authorized::grantedUser();\n if ($user !==null) {\n $privilegeUser = new self();\n $privilegeUser->user_id = $user->id;\n $privilegeUser->email = $user->email;\n $privilegeUser->firstname = $user->firstname;\n $privilegeUser->lastname = $user->lastname;\n $privilegeUser->fullname = $user->firstname . ' ' . $user->lastname;\n $privilegeUser->gravatar = $user->gravatar;\n $privilegeUser->status = $user->status;\n $privilegeUser->initRoles(($userID !==null) ? $userID : $user->id);\n return $privilegeUser;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "78a7d3c6436d81994dc55a73ada90525", "score": "0.554241", "text": "public static function getById($id)\n\t{\n\t $aData = User2DAO::singleton()->getUserById($id);\n\t if (!PEAR::isError($aData)) {\n\t $ret = new SGL_User($aData);\n\t } else {\n\t $ret = $aData;\n\t }\n return $ret;\n\t}", "title": "" }, { "docid": "5337b203088bd8eff13047dd6c71623f", "score": "0.5535776", "text": "public function show(UserLevel $userlevel)\n {\n $features = Feature::all();\n return view('core::core.userlevel.show', compact('userlevel', 'features'));\n }", "title": "" }, { "docid": "65de84159e5cc9ccc40561ced22c8139", "score": "0.5531384", "text": "public function getUser($id)\n\t{\n $user = $this->usersModel->with('Company')->with('Role')->find($id);\n\t\treturn $user;\n\t}", "title": "" }, { "docid": "306b16b67e21767b92e037406e943d31", "score": "0.55249226", "text": "function user_has_view_level($view_level) {\n\n // Map access level to internal ID\n $db = JFactory::getDBO();\n $query = $db->getQuery(true);\n $query->select(array('id'))\n ->from($db->quoteName('#__viewlevels'))\n ->where(array($db->quoteName('title') . ' = ' . $db->quote($view_level)));\n $db->setQuery($query);\n\n try {\n $db->execute();\n } catch (Exception $e) {\n send_error_report('View level lookup exception', $e->getMessage());\n return false;\n }\n\n $results = $db->loadAssocList();\n if (count($results) != 1) {\n send_error_report('View level not found', $view_level);\n return false;\n }\n $level_id = $results[0]['id'];\n\n $app = JFactory::getApplication('site');\n $user = JFactory::getUser();\n return in_array($level_id, $user->getAuthorisedViewLevels());\n}", "title": "" }, { "docid": "9b0c0ec26c94e0a579d56824910f56a6", "score": "0.55243355", "text": "function findUserByUserId(int $user_id) {\n\n $db = DbClass::getInstance();\n\n $sql = 'SELECT * FROM users WHERE user_id=:user_id';\n $data = [':user_id' => $user_id];\n\n $query_st = $db->singleQueryRetStatement($sql, $data);\n\n $user = $query_st->fetchObject('User');\n\n return $user;\n}", "title": "" }, { "docid": "1b8983718a118b9859e6b4eee1d00dd8", "score": "0.550568", "text": "function get_user_by_id($id) {\r\n\t\t$this->db->where('id', $id);\r\n\t\t\r\n\t\t$query = $this->db->get($this->table_name);\r\n\t\tif ($query->num_rows() == 1) return $query->row();\r\n\t\treturn NULL;\r\n\t}", "title": "" }, { "docid": "2ed4b5be96cdc7d4642aeedb4ce45664", "score": "0.54945487", "text": "function get_user_by_id($id_user=0){\n\t\ttry\n\t\t{\n\t\t\t$result = $this->db->get_where('user', array('id' => $id_user))->row();\n\t\t\tif(!empty($result))\n\t\t\t{\n\t\t\t\treturn $result;\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}catch(Exception $e){\n\t\t\tlog_message('debug','Error al tratar de consultar a un usuario por id => get_user_by_id');\n\t\t\treturn FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "c239c2f19aae6f5ca7460d6d55a2033b", "score": "0.5491804", "text": "function get_level($id) {\n\t$nama = \"\";\n\t\n\t$sqlg = \"Select level from level where id_level = '\".$id.\"'\";\n\t//echo $sqlg;\n\t$resultg = mysql_query($sqlg);\n\tif ($resultg) {\n\t\twhile ($rowg = mysql_fetch_array($resultg)) {\n\t\t\t$nama = $rowg['level'];\t\n\t\t}\n\t}\n\treturn $nama;\n}", "title": "" }, { "docid": "a24005c09adcf6350f3259875fdada78", "score": "0.5491556", "text": "function get_user_by_id($user_id){\n $this->db->where('user_id',$user_id);\n $query = $this->db->get($this->_company_table);\n\n if($query->num_rows() == 1)\n return $query->result_array()[0];\n return null;\n\n }", "title": "" }, { "docid": "48e4f4048cddc95681211d85eeb1406c", "score": "0.5489424", "text": "public function getByUser($user_id) {\n\t\treturn $this->find('first', array(\n\t\t\t'conditions' => array('Profile.user_id' => $user_id),\n\t\t\t'contain' => array(\n\t\t\t\t'User' => array(\n\t\t\t\t\t'Moderator' => array('Forum.id', 'Forum.slug', 'Forum.title'),\n\t\t\t\t\t'Access' => array('AccessLevel')\n\t\t\t\t)\n\t\t\t)\n\t\t));\n\t}", "title": "" }, { "docid": "f1ef4f4c55218c9db12f65e4307e4db9", "score": "0.5488126", "text": "function checkElevated( int $level, string $redir ) {\n\t$user = [];\n\tcheckLogin( $user, $redir );\n\t\n\t// Send denied if minimum level not met\n\tif ( $user['status'] <= $level ) {\n\t\tsendDenied();\n\t}\n\t\n\treturn $user;\n}", "title": "" }, { "docid": "7262ccadd4b2bf35cbf2ebeddbbfc50f", "score": "0.5481131", "text": "function get_effective_access_level( $p_user_id=0, $p_project_id=-1 ) {\r\n\t\tglobal\t$g_mantis_project_user_list_table,\r\n\t\t\t\t$g_project_cookie_val;\r\n\r\n\t\t# use the current user unless otherwise specified\r\n\t\tif ( 0 == $p_user_id ) {\r\n\t\t\t$t_user_id = get_current_user_field( \"id\" );\r\n\t\t} else {\r\n\t\t\t$t_user_id = $p_user_id;\r\n\t\t}\r\n\r\n\t\t# all projects\r\n\t\tif ( -1 == $p_project_id ) {\r\n\t\t\t$query = \"SELECT access_level\r\n\t\t\t\t\tFROM $g_mantis_project_user_list_table\r\n\t\t\t\t\tWHERE user_id='$t_user_id' AND project_id='$g_project_cookie_val'\";\r\n\t\t} else if ( 0 == $p_project_id ) {\r\n\t\t\t$g_project_cookie_val = p_project_id;\r\n\t\t\t$query = \"SELECT access_level\r\n\t\t\t\t\tFROM $g_mantis_project_user_list_table\r\n\t\t\t\t\tWHERE user_id='$t_user_id'\";\r\n\t\t} else {\r\n\t\t\t$query = \"SELECT access_level\r\n\t\t\t\t\tFROM $g_mantis_project_user_list_table\r\n\t\t\t\t\tWHERE user_id='$t_user_id' AND project_id='$p_project_id'\";\r\n\t\t}\r\n\r\n\t\t$result = db_query( $query );\r\n\t\t$count = db_num_rows( $result, 0, 0 );\r\n\t\tif ( $count>0 ) {\r\n\t\t\treturn db_result( $result, 0, 0 );\r\n\t\t} else {\r\n\t\t\treturn get_user_field( $t_user_id, \"access_level\" );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "b1b2f4838439d91bbbfeda46ff4bc672", "score": "0.54690516", "text": "function get_by_user_id($user_id)\r\n {\r\n $this->db->select('member_permission.*');\r\n $this->db->from('member_permission');\r\n $this->db->join('member_permission', 'member_permission.permission_id = member_permission.id');\r\n $this->db->where(\"member_permission.user_id = $user_id AND member_permission.suspendedon IS NULL\");\r\n\r\n return $this->db->get()->result();\r\n }", "title": "" }, { "docid": "b593065c5d9d010265ea009a9f31ae4c", "score": "0.5462858", "text": "function get_user_role($user_ID ){\n\t$user = new WP_User( $user_ID );\n\tif ( !empty( $user->roles ) && is_array( $user->roles ) ) {\n\t\tforeach ( $user->roles as $role )\n\t\t\treturn $role;\n\t}}", "title": "" }, { "docid": "626567c65bbea722889f2aabc7ff235b", "score": "0.54589623", "text": "public function getLevels($classID = null){\n\n\t\t\t//If the class id exists then use it to find the levels\n\t\t\tif(!$classID){\n\t\t\t\t//Setting the class id to the current teacher's class\n\t\t\t\t$classID = $this->getClass()['class_id'];\n\t\t\t}\n\n\n\t\t\t//Grabbing the level data\n\t\t\t$data = $this->_db->get('level', array('class_id', '=', $classID));\n\t\t\t\n\t\t\t//Getting array of std objects\n\t\t\t$data = $data->results();\n\t\n\t\t\t\n\n\t\t\treturn $data;\n\t\t}", "title": "" }, { "docid": "a7ec0ea59960ccf1c8eb9540d66c2b78", "score": "0.5458721", "text": "function read($user_id)\n {\n return $this->db->get_where('users', ['id' => $user_id])->row();\n }", "title": "" }, { "docid": "a50b596c4e495f8a99e64760bfddf38b", "score": "0.54562825", "text": "public function getOne($id)\n {\n return $this->user->find($id);\n }", "title": "" }, { "docid": "79d76175e59385c2ff2da5e8b7b4a2dc", "score": "0.545042", "text": "public function user($id=0) {\n\t\tif ($id) \n\t\t\treturn User::model()->active()->safe()->findbyPk($id);\n\t\telse {\n\t\t\tif(Yii::app()->user->isGuest)\n\t\t\t\treturn false;\n\t\t\telse \n\t\t\t\treturn User::model()->active()->safe()->findbyPk(Yii::app()->user->id);\n\t\t}\n\t}", "title": "" }, { "docid": "d684e243dcd0516bbab3bac5e7180e6c", "score": "0.5446636", "text": "function find_by_groupLevel($level)\n\t{\n\t\tglobal $db;\n\t\t$sql = \"SELECT group_level FROM user_groups WHERE group_level = '{$db->escape($level)}' LIMIT 1 \";\n\t\t$result = $db->query($sql);\n\t\treturn($db->num_rows($result) === 0 ? true : false);\n\t}", "title": "" }, { "docid": "c243e5ce97ae0c28a1b5f3e63eeaa292", "score": "0.5441846", "text": "public function getUser($id) {\n return $this->userDAO->getUser($id);\n\n }", "title": "" }, { "docid": "f768dd2d9946380cef0d11a36975ec7a", "score": "0.54414994", "text": "public function getById($idUserLog)\n {\n try\n {\n $criteria = new Criteria();\n $criteria->add(UserLog::ID_USER_LOG, $idUserLog, Criteria::EQUAL);\n $newUserLog = $this->getByCriteria($criteria)->getOne();\n }\n catch(Exception $e)\n {\n throw new UserLogException(\"Can't obtain the UserLog \\n\" . $e->getMessage());\n }\n return $newUserLog;\n }", "title": "" }, { "docid": "40fac05e9a8c4602ecfa1cc4d3f217a4", "score": "0.54369813", "text": "function getUserRelatedByUserId() {\n\t\t$fk_value = $this->getuserId();\n\t\tif (null === $fk_value) {\n\t\t\treturn null;\n\t\t}\n\t\treturn User::retrieveByPK($fk_value);\n\t}", "title": "" }, { "docid": "5fe18439c4231d05bd76e1701186fb72", "score": "0.54306763", "text": "public function getItem($id)\n {\n return $this->memberLevel->getItem($id);\n }", "title": "" }, { "docid": "fba3af0279068e59a1e3a9af38cd4c36", "score": "0.54281515", "text": "public function getUserById($id){\n return $this->findOneBy(array(\n 'id' => $id\n ));\n }", "title": "" }, { "docid": "7c598c5f49f44c7f48a633d8cb4c16ed", "score": "0.5424772", "text": "function findByID($crowdID)\n {\n global $vgDB, $vgDBPrefix;\n $r = $vgDB->Execute( \"SELECT description, ownerID, name, no_members FROM {$vgDBPrefix}crowd WHERE crowdID = ?\", array($crowdID) );\n if($r->RecordCount() == 0)\n return false;\n $user = new CrowdVO();\n $user->crowdID = $crowdID;\n $user->name = $r->fields['name'];\n $user->description = $r->fields['description'];\n $user->ownerID = $r->fields['ownerID'];\n $user->no_members = $r->fields['no_members'];\n return $user;\n }", "title": "" }, { "docid": "565935718049dc8b2446e50d78d5d31d", "score": "0.5420037", "text": "function get_m_user($id_user)\n {\n return $this->db->get_where('m_users',array('id_user'=>$id_user))->row_array();\n }", "title": "" }, { "docid": "5190b887c0d9ce3d69fec008ce21dbf8", "score": "0.54198515", "text": "public function Get_by_ID($id)\n {\n return $this->createQueryBuilder('u')\n ->where('u.id=:id')\n ->setParameter('id', $id)\n ->getQuery()\n ->getOneOrNullResult();\n }", "title": "" }, { "docid": "e678031e1644d7a8d4396c9f74a513e0", "score": "0.541834", "text": "public function getById($id) {\n\t\treturn $this->find('first', array(\n\t\t\t'conditions' => array('ControlObject.id' => $id),\n\t\t\t'contain' => array('Parent', 'User'),\n\t\t\t'cache' => array(__METHOD__, $id)\n\t\t));\n\t}", "title": "" }, { "docid": "39bfae5a532b11fffb030811bb42aa0a", "score": "0.54180294", "text": "function au_get_user($user_id){\n\t\n\t// Just return the datebase object, that's all this function has to do\n\treturn au_query(\"SELECT * FROM users WHERE user_id = \" . $user_id . \" LIMIT 1;\");\n\n}", "title": "" }, { "docid": "88d144fd0e18e85ff42cbe74556e81d7", "score": "0.5414027", "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": "1cfc9371e767d2e805c1a7882a4ca1fd", "score": "0.540837", "text": "public static function getAccessLevel($level) {\n return Arr::get(self::getAccessLevels(array($level)),0);\n }", "title": "" }, { "docid": "9b4008e5e537b72d546d0ce9db247198", "score": "0.54054487", "text": "function getUserById($id){\n\t\tglobal $db;\n\t\t$query = \"SELECT * FROM signuptable WHERE id=\" . $id;\n\t\t$result = mysqli_query($db, $query);\n\n\t\t$user = mysqli_fetch_assoc($result);\n\t\treturn $user;\n\t}", "title": "" }, { "docid": "11738e798790e488e1c96559641db7f7", "score": "0.5394344", "text": "public function load($user_id);", "title": "" }, { "docid": "02fd97c7807c0314b5ae9cd061f52e73", "score": "0.5393619", "text": "public function getById($id)\n {\n $query = $this->getEntityManager()\n ->createQueryBuilder()\n ->select(\n 'jl.id AS joblevel_id,\n jl.name AS joblevel_name,\n jl.level AS joblevel_level,\n jl.status AS joblevel_status'\n )\n ->from('GatotKacaErpMainBundle:JobLevel', 'jl')\n ->where('jl.id = :id')\n ->setParameter('id', $id)\n ->getQuery();\n $this->setModelLog(\"get job level with id {$id}\");\n\n return $query->getResult();\n }", "title": "" }, { "docid": "75c5980f25bad7186132562e9e39207f", "score": "0.5393607", "text": "public function get_user_by_id($id) {\n\n return $this->db->select('id, username, level, status, first_name, last_name, phn, email, address, avatar, joined_date, online_timestamp')->where(\"id\", $id)->get(\"back_users\");\n \n }", "title": "" }, { "docid": "874c0f038a60b844ebf158ebff819366", "score": "0.53934604", "text": "public function getUserById(int $id):?User {\n $query = $this->_db->prepare('SELECT\n b.title, b.author, b.releaseDate, b.category,\n u.u_id, u.firstName, u.lastName, u.age, u.city, u.phone, u.mail, u.personnalCode\n FROM user AS u LEFT JOIN book AS b ON b.user = u.personnalCode\n WHERE u.u_id = ?');\n $query->execute([$id]);\n $data = $query->fetchAll(PDO::FETCH_ASSOC);\n //Create the user with the first row and then instanciate each book\n $user = new User($data[0]);\n // Check if user has at least one book\n if(isset($data[0][\"title\"])) {\n foreach ($data as $key => $book) {\n $book = new Book($book);\n $book->setUser($user);\n $user->addBook($book);\n }\n }\n return $user;\n }", "title": "" }, { "docid": "3881f593bbf079b2a2533d36b77d4756", "score": "0.53933764", "text": "function get($id){\n // geef gebruiker-object met opgegeven $id \n $this->db->where('id', $id);\n $query = $this->db->get('gebruiker');\n $user = $query->row();\n \n if(isset($user->typeId)){\n $this->load->model(\"gebruikertype_model\");\n \n $user->type = $this->gebruikertype_model->get($user->typeId);\n }\n \n return $user;\n }", "title": "" }, { "docid": "f104a2a573ef9517fe9f8adfb32704ec", "score": "0.53871864", "text": "public function get_user() {\n $openid = '1111111111';\n return $user = Db::table('user')->where('openid', $openid)->find(); \n }", "title": "" }, { "docid": "e4cf297acac50f72250baae586b2289a", "score": "0.5385384", "text": "function get_user_by_id($id) {\r\n\t\t$this->db->where ( 'user_id', $id );\r\n\t\t$query = $this->db->get ( 'user' );\r\n\t\treturn $query->result ();\r\n\t}", "title": "" }, { "docid": "5f602e926847b18024dacfb9facc14fc", "score": "0.5380875", "text": "public static function getUserByOpenid($openid)\n\t{\n\t\t$dbo = XP_Extension_FractaChevrolet_UserModel::dataAccess();\n\t\t$dbo->filter(XP_Extension_FractaChevrolet_UserModel::OPENID, $openid);\n\t\t$user = $dbo->findOne();\n\t\tif(empty($user)) {\n\t\t\t$user = self::getUserFromWXApiByOpenid($openid);\n\t\t\tif(empty($user) || !is_array($user) || array_key_exists('errcode', $user)) return array();\n\t\t\tself::saveUserInfoToDB($user);\n\t\t}\n\t\treturn $user;\n\t}", "title": "" }, { "docid": "03489ca73b2cfbcb81f56dda01bd3256", "score": "0.53783005", "text": "function get_role_by_user_id($userId){\n $query = $this->db->query(\"SELECT r.id, r.name\n FROM user_roles AS ur\n LEFT JOIN roles AS r ON ur.role_id = r.id\n WHERE ur.user_id = \".$userId);\n $row = $query->row();\n $num_rows = $query->num_rows();\n if ($num_rows === 1) {\n return $row;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "3815a2ea1eb6ce093c4dba0ab90bf4e3", "score": "0.537823", "text": "public function getByIdUser($idUser)\n {\n $criteria = new Criteria();\n $criteria->add(UserLog::ID_USER, $idUser, Criteria::EQUAL);\n $userLogCollection = $this->getByCriteria($criteria);\n return $userLogCollection;\n }", "title": "" }, { "docid": "934b7f4bce3f9c6e36037982079683a0", "score": "0.53724647", "text": "public static function getUserApproval($user_id = NULL, $level_id = NULL) {\r\n\t\t//default to false\r\n\t\t$user_approval = false;\t\t//false will function as a kind of N/A at times\r\n\t\t\r\n\t\t//default to the current user\r\n\t\tif(empty($user_id)) {\r\n\t\t\tglobal $current_user;\r\n\t\t\t$user_id = $current_user->ID;\r\n\t\t}\r\n\t\t\t\t\r\n\t\t//get approval status for this level from user meta\r\n\t\tif(!empty($user_id)) {\r\n\t\t\t//default to the user's current level\r\n\t\t\tif(empty($level_id)) {\r\n\t\t\t\t$level = pmpro_getMembershipLevelForUser($user_id);\t\t\t\t\r\n\t\t\t\tif(!empty($level))\r\n\t\t\t\t\t$level_id = $level->id;\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t//if we have a level, check if it requires approval and if so check user meta\r\n\t\t\tif(!empty($level_id) && PMPro_Approvals::hasMembershipLevelSansApproval($level_id, $user_id)) {\r\n\t\t\t\t//if the level doesn't require approval, then the user is approved\r\n\t\t\t\tif(!PMPro_Approvals::requiresApproval($level_id)) {\r\n\t\t\t\t\t//approval not required, so return status approved\r\n\t\t\t\t\t$user_approval = array('status'=>'approved');\r\n\t\t\t\t} else {\r\n\t\t\t\t\t//approval required, check user meta\r\n\t\t\t\t\t$user_approval = get_user_meta( $user_id, 'pmpro_approval_' . $level_id, true);\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 $user_approval;\r\n\t}", "title": "" }, { "docid": "abf701dd3e42182d2aece8e457793292", "score": "0.5369187", "text": "public function findUserByOpenid($openid){\n\t\tif (isset($_SESSION['user'])) {\n\t\t\treturn $_SESSION['user'];\n\t\t}\n\t\t$sql = \"SELECT id, openid, lottery FROM `coach_newyear_info` WHERE `openid` = ?\"; \n\t\t$res = $this->db->prepare($sql);\n\t\t$res->bind_param(\"s\", $openid);\n\t\t$res->execute();\n\t\t$res->bind_result($uid, $openid, $lottery);\n\t\tif($res->fetch()) {\n\t\t\t$user = new stdClass();\n\t\t\t$user->uid = $uid;\n\t\t\t$user->openid = $openid;\n\t\t\t$user->lottery = $lottery;\n\t\t\t$user->status = 1;\n\t\t\t$_SESSION['user'] = $user;\n\t\t\treturn $user;\n\t\t}\n\t\treturn NULL;\n\t}", "title": "" }, { "docid": "0fd932428e097267ae065f466db3d9eb", "score": "0.5365625", "text": "public function getUser($id);", "title": "" }, { "docid": "929214edad72c19df99336af9caf39ae", "score": "0.5360996", "text": "function view_user_pengguna($id_users){\n $this->db->select('*');\n $this->db->order_by('tbl_user.id_user','DESC');\n $this->db->where('level',\"user\");\n $this->db->where('id_user',$id_users);\n $query = $this->db->get('tbl_user');\n return $query->row();\n }", "title": "" }, { "docid": "5ed7e609cc789f715f762e7219b863e0", "score": "0.535073", "text": "function getCharacter($user){\n global $DBL;\n global $CHARACTERS;\n \n if(isset($CHARACTERS[$user]))\n return $CHARACTERS[$user];\n \n $query = \n\"SELECT dc.id as id,dc.game_id as gameId \nFROM `dice_characters` dc \nWHERE name = '$user'\";\n $result = mysqli_query($DBL,$query) or die(\"failed \".__FILE__.\"@\".__LINE__.\" $query \".mysql_error());\n $row = mysqli_fetch_object($result);\n $row->levels = array();//may cause trouble\n \n $CHARACTERS[$user] = $row;\n \n return $row; \n}", "title": "" }, { "docid": "8e845b9f4d402e9864a70fd879c48359", "score": "0.5349422", "text": "public function get_user_by_id($userid) {\r\n\t\t$query = $this->db->query('select * from users where userid='.$userid.'');\r\n\t\t\r\n\t\tif ($query == true && $query->num_rows() == 1) {\r\n\t\t\treturn get_object_vars($query->result()[0]);\r\n\t\t} else \r\n\t\t\treturn false;\r\n\t}", "title": "" }, { "docid": "027cb15e5732931c94330272d292318b", "score": "0.53493184", "text": "public function getByUser(User $user);", "title": "" }, { "docid": "5a025eec8088f4657b96bc14ebc4978c", "score": "0.5347217", "text": "public function getUser($id){\n return User::find($id);\n }", "title": "" }, { "docid": "9b2b2952c5384169f77685490ed0176a", "score": "0.53464854", "text": "public function get_user($id){\n return $this->db->get_where('users', array('id' => $id));\n }", "title": "" }, { "docid": "8c1e67590bbccc6e6266d4f0a4451dd3", "score": "0.53376585", "text": "public static function pmpro_has_membership_level( $haslevel, $user_id, $levels ) {\r\n\t\t\r\n\t\t//if already false, skip\r\n\t\tif(!$haslevel)\r\n\t\t\treturn $haslevel;\r\n\t\t\r\n\t\t//no user, skip\r\n\t\tif(empty($user_id))\r\n\t\t\treturn $haslevel;\r\n\t\t\r\n\t\t//no levels, skip\r\n\t\tif(empty($levels))\r\n\t\t\treturn $haslevel;\r\n\t\t\r\n\t\t//now we need to check if the user is approved for ANY of the $levels\r\n\t\t$haslevel = false;\r\n\t\tforeach($levels as $level) {\r\n\t\t\tif(PMPro_Approvals::isApproved($user_id, $level)) {\r\n\t\t\t\t$haslevel = true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $haslevel;\r\n\t}", "title": "" }, { "docid": "25618fb8e5fa2e27ed03b69454fb39b7", "score": "0.5336964", "text": "function jabGetNavItemForLevel($level)\n{\n\tglobal $jab;\n\tif (!isset($jab['nav_root_item']))\n\t\treturn false;\n\n\tif (!isset($jab['nav_sel_path']))\n\t\treturn $level===0;\n\t\t\n\tif ($level<sizeof($jab['nav_sel_path']))\n\t{\n\t\treturn $jab['nav_sel_path'][$level];\n\t}\n\telse\n\t{\n\t\treturn null;\n\t}\n}", "title": "" }, { "docid": "b2340d6dfe28aff625de9bf0aa540599", "score": "0.5335531", "text": "public function findById($id){\n return $this->user->find($id);\n }", "title": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "8e8e03727ca6544a2d009483f6d1aca9", "score": "0.0", "text": "public function destroy($id)\n {\n //\n }", "title": "" } ]
[ { "docid": "97c51cab4a2ebd0c97c646aca8926260", "score": "0.7629593", "text": "public function remove(ResourceInterface $resource);", "title": "" }, { "docid": "2b9d2c85f4c5a3ea90f0276710558864", "score": "0.73587126", "text": "public function removeResource(ResourceInterface $resource);", "title": "" }, { "docid": "f3145913d36c871004ac569d3ea3b842", "score": "0.68346053", "text": "public function remove()\n {\n /** Not needed in this storage */\n }", "title": "" }, { "docid": "4899cb69f473bc3ba1f4a04f43330487", "score": "0.67682105", "text": "public function delete($resource, $id);", "title": "" }, { "docid": "0339cc54ab464d5806494f53b7d84761", "score": "0.66848737", "text": "public function destroy(resource $resource)\n {\n //\n }", "title": "" }, { "docid": "d9f10892d48fdfd7debb2a97681f0912", "score": "0.6659381", "text": "public function destroy(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "52c1a7c30e906794e889381e09749736", "score": "0.63817745", "text": "public function delete(ResourceTypeInterface $resourceType);", "title": "" }, { "docid": "5a5e27d4baf0a8d48a3ac4cd3f04c3ed", "score": "0.6287119", "text": "function removeStorage($imgName,$storagePath){\n return Storage::delete($storagePath.\"/\".$imgName);\n }", "title": "" }, { "docid": "dbe827e5c99e979e1cb815eddd797184", "score": "0.6278533", "text": "public function destroy($id)\n {\n// Storage::delete('file.jpg');\n }", "title": "" }, { "docid": "78c3b7fd0c00f45a9e6a8a5f6ed56a7a", "score": "0.6199108", "text": "protected function removeResourceAndThumbnailsByResource(Resource $resource)\n {\n // delete from database\n $this->deleteThumbnailsByResource($resource);\n\n $resource->disableLifecycleEvents();\n $this->persistenceManager->remove($resource);\n }", "title": "" }, { "docid": "64fdd6f4d9385414cdb313161249d8ec", "score": "0.6190533", "text": "public function destroy(Resource $resource)\n {\n $resource->delete();\n return $this->showOne($resource);\n }", "title": "" }, { "docid": "d3de183319816e68e04b4ba5ab69a652", "score": "0.6125602", "text": "public function wipeStorage(): void;", "title": "" }, { "docid": "9a3fb17518efe8911c9caa31836bf58e", "score": "0.6083851", "text": "public function destroy($id)\n {\n //\n $storage = Storage::findOrFail($id);\n $storage->delete();\n return redirect()->route('admin.specificate.storage.index');\n }", "title": "" }, { "docid": "0d390882ed3b7497dc5a3ef5f578179f", "score": "0.6073157", "text": "function cleanup_resource($request_path, $created_resource)\n {\n $this->emit_detail(\"Cleaning up (DELETE) Resource {$request_path}/{$created_resource['id']}\");\n $this->assert_api_delete(\"{$request_path}/{$created_resource['id']}\");\n }", "title": "" }, { "docid": "5eb527f9c836748cdd39d6f19527a3bc", "score": "0.6071406", "text": "public function destroy(Resource $resource) {\n $resource->delete();\n return redirect()->route('admin.resources.index')->with('success', 'Resource deleted!');\n }", "title": "" }, { "docid": "2bc45e3efcdaeea24d7871374eee5196", "score": "0.606356", "text": "public function delete(): void\n {\n $absoluteFolder = __FILE_STORAGE_PATH__ . $this->file->folder;\n $absoluteFile = $absoluteFolder . '/' . $this->file->fileName;\n unlink($absoluteFile);\n }", "title": "" }, { "docid": "56ef86723a3ce311a8ed60a2c434aaba", "score": "0.60469806", "text": "private function destroyResource()\n {\n foreach ($this->events as $event) {\n $this->removeEvent($event);\n }\n\n if ($this->handle) {\n event_base_loopexit($this->handle, 1);\n event_base_free($this->handle);\n $this->handle = null;\n }\n }", "title": "" }, { "docid": "cf8f9645c05b25edb15fe5ac3b20e0d9", "score": "0.6045932", "text": "protected function delete($resource){\n $entity = $this->dataService->delete($resource);\n return $entity;\n }", "title": "" }, { "docid": "27f5fe23fb8978b59377436419e62306", "score": "0.6006565", "text": "public function destroy(Resource $resource)\n {\n $resource->delete();\n $resource = new ResourceResource($resource);\n return $this->success('Resource Deleted Successfully.', $resource);\n }", "title": "" }, { "docid": "ce2d9089bdc6105e259a8fc7435710e3", "score": "0.5969368", "text": "public function physicalRemove(){\n \n global $strings;\n\n if ($this->isOnS3()){\n if(!$this->getS3()->deleteObject($this->bucket, $this->path)){\n throw new Exception($strings['cantDeleteFileS3']);\n }\n }else{\n if (!unlink($this->getPhysicalPath())){\n throw new Exception(\"Can't delete: \" . $this->getPhysicalPath());\n }\n }\n\n }", "title": "" }, { "docid": "342298363719c61574c6860bd21aaa5c", "score": "0.5961146", "text": "public function remove($id)\n {\n $media = Media::findOrFail($id);\n // Storage::delete('storage/'.$media->filename);\n // return redirect('dashboard/media');\n $path = public_path().\"/storage/\".$media->filename;\n if(File::exists($path)){\n File::delete($path);\n } \n $media->delete();\n return redirect('dashboard/media');\n }", "title": "" }, { "docid": "256b2882eab04971d66d3cd5fe279069", "score": "0.5953901", "text": "function remove_by_resource_id($faistate_resource_id) {\n\t$db=htvcenter_get_db_connection();\n\t$rs = $db->Execute(\"delete from \".$this->_db_table.\" where fai_resource_id=\".$faistate_resource_id);\n}", "title": "" }, { "docid": "0f33fc82bbb0ee650523b55fee3fd916", "score": "0.59241194", "text": "public function deleteResource(\n Resource\\ResourceType $resourceType,\n Resource\\ResourceId $resourceId\n );", "title": "" }, { "docid": "36651b549fe41bd0664da956114a9c49", "score": "0.5921025", "text": "private function _deleteStorage($name) {\r\n\t\tunset($this->_storage[$name]);\r\n\t}", "title": "" }, { "docid": "52076dacbb2bf9f60da7deed7636119b", "score": "0.5918752", "text": "public function destroy($id)\n {\n $get=Slide::where('id',$id)->first();\n if($get->image!=null&&file_exists(\"/storage/$get->image\")){\n unlink('storage/'.$get->image);\n }\n $get->delete();\n return redirect()->route('listSlide');\n }", "title": "" }, { "docid": "f51dca1995fbb4ea013dc67c8631ad87", "score": "0.5914943", "text": "public function trash($resourceId)\n {\n $resource = $this->resourceContract->findOnlyTrashed($resourceId);\n Storage::disk('public')->delete('resources/' . $resource->document);\n\n $result = $this->resourceContract->destory($resource);\n\n $result ? Flash::success('Resource has been forcefully deleted.')\n : Flash::error('Resource could not be forcefully deleted.');\n\n return redirect()->route('admin.resources.index');\n }", "title": "" }, { "docid": "78f3fcb6a4df88ba8ea45797087a7e8d", "score": "0.59121597", "text": "public function remove($entity);", "title": "" }, { "docid": "78f3fcb6a4df88ba8ea45797087a7e8d", "score": "0.59121597", "text": "public function remove($entity);", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "a026f3ede198f3fb93bcad88386d926d", "score": "0.58884346", "text": "public function remove()\r\n\t{\r\n\t\tif ($this->id)\r\n\t\t{\r\n\t\t\t// TODO: delete\r\n\t\t\t$this->id = null;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "45d0719ac780944f2d2b2ab31d280549", "score": "0.58856535", "text": "public function remove($id, $filename = null);", "title": "" }, { "docid": "6431de611c573a19db0ba3678e104c9e", "score": "0.58781254", "text": "public function destroy($id)\n {\n //eliminar por id\n $usuario= Usuarios::findOrFail($id);\n\n if( Storage::delete('public/'.$usuario->Foto)){\n Usuarios::destroy($id);\n }\n \n return redirect('usuarios');\n\n }", "title": "" }, { "docid": "49d15f822dfd652237898762b1555ff1", "score": "0.5869462", "text": "public function onRemove()\n {\n try {\n $this->repository->getFilesystem()->delete($this->storageKey);\n } catch (FileNotFound $e) {\n if (!$this->isMissingFileIgnoredOnDelete()) {\n throw $e;\n }\n }\n }", "title": "" }, { "docid": "a5b45321d84c25ff616ce9aaffca6cb1", "score": "0.58543277", "text": "public function remove(FileInterface $media);", "title": "" }, { "docid": "6fa97a75d590a5487f6acd2521e91056", "score": "0.5812348", "text": "public function destroy($id)\n {\n $resource = $this->CourseSectionResource->find($id);\n try{\n if(!empty($resource->file)){\n deleteFileFromPrivateStorage($resource->file);\n }\n }\n catch(\\Exception $e){\n session()->flash('error_msg' , 'Couldn`t delete resource file from storage!');\n }\n $this->CourseSectionResource->delete($resource->id);\n return redirect()->back()->with('success_msg', 'Course section resource deleted successfully!');\n }", "title": "" }, { "docid": "e1628f8f31899e5e41eb946b26eb231a", "score": "0.58072346", "text": "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n// if(Storage::exists('uploads/'.$product->avatar))\n// {\n// unlink('storage/uploads/'.$product->avatar);\n// }\n if(file_exists(public_path('uploads/'.$product->avatar)))\n {\n // dd(\"yes\");\n unlink(public_path('uploads/'.$product->avatar));\n }\n $product->delete();\n return redirect()->back();\n }", "title": "" }, { "docid": "33d10a0171eabd9b8fe683d93d2886aa", "score": "0.5801854", "text": "public function destroy() {\n $this->provider->trash( $this->getData() );\n }", "title": "" }, { "docid": "c76ba5203390ca9cf0624c810c367c90", "score": "0.5798788", "text": "public function deleteResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n\n try {\n // delete() returns boolean\n $wasDeleted = $client->delete(Path::fromString($resource->getSha1()));\n } catch (FileDoesNotExistsException $exception) {\n // In some rare cases the file might be missing in the storage but is still present in the db.\n // We need to process the corresponding exception to be able to also remove the resource from the db.\n $wasDeleted = true;\n }\n\n return $wasDeleted;\n }", "title": "" }, { "docid": "221de0333cec1309efddd33a75bcb64c", "score": "0.57902867", "text": "public function remove() {\r\n self::removeById($this->id);\r\n }", "title": "" }, { "docid": "58dd1e60cf8a295194560ca90fca3669", "score": "0.57566226", "text": "public function removeFromStorage($image)\n {\n Storage::disk('public')->delete($image);\n }", "title": "" }, { "docid": "c41a8c586f3cfc39935459b577d1b862", "score": "0.575272", "text": "public function removeUpload()\n {\n if (isset($this->temp)) {\n unlink($this->temp);\n }\n }", "title": "" }, { "docid": "750ee1857a66f841616cd130d5793980", "score": "0.57492644", "text": "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "title": "" }, { "docid": "3efb4e7d01d53fcd85a29779b8a9e415", "score": "0.5737984", "text": "public function remove(): void\n\t{\n\t\t$this->start();\n\t\t$this->data = null;\n\t\t$this->meta = null;\n\t}", "title": "" }, { "docid": "1fa59c233c11ccd35321ef052c3bb1c2", "score": "0.5732476", "text": "public function destroy($id){\n $slider = Slider::findOrFail($id);\n $myfile = public_path('public/uploads/slider/'.$slider->image_name);\n if (file_exists($myfile)){\n unlink($myfile);\n $slider->delete();\n \\Session::flash('flash_msg','Slider has been successfully deleted!');\n return redirect('/admin/slider/'); \n }else{\n $slider->delete();\n \\Session::flash('flash_msg','Slider has been successfully deleted!');\n return redirect('/admin/slider/');\n }\n\n }", "title": "" }, { "docid": "ca7fb18e5d4c43e979f30bce3c8319df", "score": "0.57185286", "text": "public function clearStorage(): void\n {\n $this -> getStorage() -> clear();\n }", "title": "" }, { "docid": "366c0d7d78edfe804e2c2262e8291b78", "score": "0.57133925", "text": "public function remove(Stream $person): void;", "title": "" }, { "docid": "ed7546f0b845fa3c3353ea35a4a20a99", "score": "0.5709106", "text": "public function remove() {\n\t\t$this->read();\n\t\t$this->clearBlock();\n\t\t$this->save();\n\t}", "title": "" }, { "docid": "166e690e4f196682a2a814a6027b0db7", "score": "0.56951386", "text": "public function destroy($id)\n {\n $question=Question::find($id);\n //delete related file from storage\n $question->delete();\n return redirect()->route('questions.index');\n }", "title": "" }, { "docid": "b8c78cd19161cf7966e7567365e984a3", "score": "0.56849074", "text": "public function remove(): void;", "title": "" }, { "docid": "b8c78cd19161cf7966e7567365e984a3", "score": "0.56849074", "text": "public function remove(): void;", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "2c1af4221a72590e3cb0cd0ad912aa00", "score": "0.5676235", "text": "public function delete($key)\n {\n try{\n if ($this->fs->has($key)) {\n $this->fs->delete($key);\n }\n } catch (\\RuntimeException $ex) {\n throw StorageException::fromPrevious($ex);\n }\n }", "title": "" }, { "docid": "54cf17987ccf71e05fd4894be16724fe", "score": "0.56715244", "text": "public function destroy($id)\n {\n $result = Storage::destroy($id);\n\n if (!$result) return response(null, 404);\n\n return response(null, 200);\n }", "title": "" }, { "docid": "a1996902e0be9853d1ca44ee082f83c4", "score": "0.5652084", "text": "public function delete(StorageDeleteRequest $request)\n {\n $this->storages->remove($request->input('link'));\n\n return $this->respondJson([]);\n }", "title": "" }, { "docid": "4e1b157fd4962cd773a05c730cd6bf95", "score": "0.5639948", "text": "public function remove($payload);", "title": "" }, { "docid": "6a133bf2a539adcebeeef545cb23bdf7", "score": "0.56398225", "text": "public function removeEntity($entity);", "title": "" }, { "docid": "d8cf040d5d088baee69ea50d0218c37e", "score": "0.56377107", "text": "function delete_quiz_resource($id_quiz_resource) {\n if (!$this->ion_auth->logged_in()) {\n redirect();\n } else {\n $temp = $this->load->model_quiz->select_quiz_resource_by_id($id_quiz_resource)->row();\n if ($temp->ext != '') {\n unlink('./resource/' . $temp->file);\n $this->load->model_quiz->delete_quiz_resource($id_quiz_resource);\n } else {\n $this->load->model_quiz->delete_quiz_resource($id_quiz_resource);\n }\n $data1['resource_id'] = 0;\n $data2['summary_id'] = 0;\n $this->load->model_quiz->delete_quiz_resource_from_soal($id_quiz_resource, $data1);\n $this->load->model_quiz->delete_quiz_summary_from_soal($id_quiz_resource, $data2);\n }\n }", "title": "" }, { "docid": "6f829749f6f0cfbf567b9b89e34dcc1c", "score": "0.56330186", "text": "function external_resource_delete_delete($resource_id=null)\n\t{\t\t\n\t\t$this->load->model(\"Survey_resource_model\");\t\t\n\t\ttry{\n\t\t\tif(!is_numeric($resource_id)){\n\t\t\t\tthrow new Exception(\"MISSING_PARAM: resource_id\");\n\t\t\t}\n\n\t\t\t$this->Survey_resource_model->delete($resource_id);\n\t\t\t$this->set_response('DELETED', REST_Controller::HTTP_OK);\t\t\t\n\t\t}\n\t\tcatch(Exception $e){\n\t\t\t$this->set_response($e->getMessage(), REST_Controller::HTTP_BAD_REQUEST);\n\t\t}\n\t}", "title": "" }, { "docid": "e56ffdb12b7e8ce9ce9b709dd82f37f7", "score": "0.56325144", "text": "public function removeById($id);", "title": "" }, { "docid": "e56ffdb12b7e8ce9ce9b709dd82f37f7", "score": "0.56325144", "text": "public function removeById($id);", "title": "" }, { "docid": "23aa98c0e45a4d5bc13c5c73f9bd3dde", "score": "0.56284964", "text": "public function destroy($id)\n {\n $getpost = Post::where('slug', '=',$id)->first();\n $filename = $getpost->thumbnail;\n $filename = public_path('uploads/photos'. $filename);\n if($getpost->delete()){\n if (file_exists($filename)) {\n @unlink($filename);\n }\n }\n\n \n}", "title": "" }, { "docid": "ce4dd2b67d8a9a32540569f994a6989e", "score": "0.562772", "text": "public function destroy(Supplier $supplier)\n {\n $remove = Supplier::find($supplier->id);\n $photo = $supplier->photo;\n if($photo){\n unlink($photo);\n }\n $remove->delete();\n }", "title": "" }, { "docid": "83296d43845200428d3f972a111c72f8", "score": "0.5608048", "text": "public function remove($id)\n {\n $this->persistence->remove($id);\n }", "title": "" }, { "docid": "3d22d714e6088f6711137bbeb6db1bbb", "score": "0.5600981", "text": "public function remove($path){\n return unlink($path);\n }", "title": "" }, { "docid": "27c4016299257e94c3026a2ba2ba5c83", "score": "0.55814904", "text": "public function destroy($id)\n {\n $slider = Slider::findOrFail($id);\n /*\n * unlink('backend/Images/'.$slider->image);\n *\n * the code is delete the image but we need image don't deltete it so for that reason we will\n * make comment to this code\n */\n $slider->delete();\n return redirect()->back();\n }", "title": "" }, { "docid": "97914eb78d7cf648246f9bcd6ac69124", "score": "0.5573565", "text": "public function destroy($id)\n {\n /*\n\n = R::load( '', $id );\n R::trash( );*/\n }", "title": "" }, { "docid": "2866af9241b67fd5770b87451aa83579", "score": "0.55732435", "text": "public function delete(string $path): self;", "title": "" }, { "docid": "7c943bc0e1841b8090151d8b0b8ca4ac", "score": "0.5568121", "text": "function remove(){\n Resource::remove($_SESSION[\"object_id\"]);\n\n DB::db_query(\"delete_collection\", \"DELETE FROM resource WHERE id='\".$_SESSION[\"object_id\"].\"'\");\n if(DB::db_check_result(\"delete_collection\") > 0){\n include($GLOBALS[\"draw_includes_path\"].\"/Resource/.BookDeleted.html\");\n }\n }", "title": "" }, { "docid": "bd1f8717cf8c32b58c71fe82e627e4e1", "score": "0.55641353", "text": "public function my_delete() {\n Storage::delete($this->path);\n \\Log::info('Deleted file: ' . $this->path);\n $this->delete();\n }", "title": "" }, { "docid": "c69a6aec9441a09ecb4034c5f58d9e56", "score": "0.55601335", "text": "public function destroy($id)\n {\n $post=Post::find($id);\n\n if(File::exists('storage/'.$post->image)){\n File::delete('storage/'.$post->image);\n }\n\n $post->tags()->detach();\n $post->delete();\n return redirect('/admin/posts');\n }", "title": "" }, { "docid": "b87ec107871ee33340d2fa1536c6d83e", "score": "0.55535823", "text": "public function destroy(Request $request)\n {\n $path = $request->input('path');\n $path = preg_replace('|^https?://[^\\/]+/storage/|', '', $path);\n Storage::disk('public')->delete($path);\n return response('ok', 204);\n }", "title": "" }, { "docid": "1445f22d5bc412cd6a2e4068e0188f31", "score": "0.5553502", "text": "public function destroy($id)\n {\n $data = User::find($id);\n if ($data->image != \"default.PNG\" && $data->image != \"\" ){ \n $fileName = $data->image;\n Storage::delete($fileName);\n }\n $data->delete();\n return redirect()->route('user.index');\n }", "title": "" }, { "docid": "9306b600c172932b3726caa50eab111c", "score": "0.55530834", "text": "public function destroy($id)\n {\n $file = MediaFiles::find($id);\n /*$mediaFiles->deleted = true;\n $mediaFiles->save();*/ \n $file->delete();\n }", "title": "" }, { "docid": "25fb474df202e3c8494a2eb910e15a59", "score": "0.55449986", "text": "public function deleteResource(){\n if(parent::delete()){\n return \"ok\";\n }\n return \"error\";\n }", "title": "" }, { "docid": "39f3b4981da393b14f808c0c0b6ef46c", "score": "0.55448544", "text": "public function delete($path) {\n try {\n $status = $this->_s3->deleteObject($this->_bucket, $this->_getObjectName($path));\n } catch(S3Exception $e) {\n $this->_log($e->getMessage());\n throw new Scalar_Storage_Exception('Unable to delete file.');\n }\n }", "title": "" }, { "docid": "bcab9946ef86c53d040c2a39fa7ecb57", "score": "0.55423814", "text": "public function remove($id)\n {\n if ($this->fileSystem->fileExists($id)) {\n $this->fileSystem->delete($id);\n }\n }", "title": "" }, { "docid": "619b554e580350c34f6536df94d8d29f", "score": "0.55413246", "text": "function remove_resource($resource_id) {\n if (empty($resource_id)) return FALSE;\n\t $this->db->trans_begin();\n\n\t\t$this->db->where('resource_id',$resource_id);\n\t\t$this->db->delete($this->tables['resources']);\n\n\t\t$this->db->where('resource_id',$resource_id);\n\t\t$this->db->delete($this->tables['grants']);\n\n\t\tif ($this->db->trans_status() === FALSE)\n\t {\n\t\t\t$this->db->trans_rollback();\n\t\t\treturn FALSE;\n\t }\n\n\t $this->db->trans_commit();\n\t return TRUE;\n }", "title": "" }, { "docid": "426f594c80545265eb0a48c145c39378", "score": "0.5540242", "text": "public function destroy($id)\n {\n $get=Blog::where('id',$id)->first();\n unlink('storage/'.$get->thumbnail);\n Blog::where('id',$id)->delete();\n return redirect()->route('listBlog');\n }", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "b5b688091a31c75ff8615389051972dc", "score": "0.5539336", "text": "public function delete()\n {\n $this->removeImage();\n parent::delete();\n }", "title": "" }, { "docid": "4697a00d553d37cc8d8db652c56c76b2", "score": "0.5534565", "text": "public function remove($id)\n {\n $image = $this->image->find($id);\n\n $full_path = public_path('/images/product/'.$image->imagePath);\n\n File::delete($full_path);\n\n $image->delete();\n return redirect()->back();\n }", "title": "" }, { "docid": "2cce19e05c22aab21227d7f37af1fd4e", "score": "0.55311805", "text": "public function destroy($id)\n {\n $data=Slider::findOrFail($id);\n $img_path='public/uploads/sliders/'.$data['slider_image'];\n if($data['slider_image']!=null and file_exists($img_path)){\n unlink($img_path);\n }\n $data->delete();\n return redirect('slider')->with('msg_success','Slide Successfully Deleted!');\n }", "title": "" }, { "docid": "c63d38df163184005e90c31c619d88b8", "score": "0.5529311", "text": "public function delete()\n {\n return $this->storage->disk()->delete($this->path);\n }", "title": "" }, { "docid": "f75f489326b0b6ab4bdfe2ad0a2a4cb3", "score": "0.5527862", "text": "public function delete(): void\n {\n $this->api->delete($this);\n $this->api->getPool()->remove($this->_getPoolKeys());\n }", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" } ]
9c14d4e2eda9f352622fea64da7795f3
Rolls back store and website creation scripts because annotations use a relative path from integration tests root
[ { "docid": "38d7c7ca856beb5f623c9c664b8f2e19", "score": "0.6032047", "text": "public static function loadWebsiteFixturesRollback(): void\n {\n include __DIR__ . '/../../../../_files/websiteFixtures_rollback.php';\n }", "title": "" } ]
[ { "docid": "42352386839f8cc3be422f912b3b1b73", "score": "0.6026865", "text": "public static function loadWebsiteFixturesRollback()\n {\n include __DIR__ . '/../../_files/websiteFixtures_rollback.php';\n }", "title": "" }, { "docid": "c1fe6e856c65db7c6e13762d002781b3", "score": "0.6011099", "text": "public static function loadWebsiteFixturesRollback()\n {\n include __DIR__ . '/../../../_files/websiteFixtures_rollback.php';\n }", "title": "" }, { "docid": "3862be118e59916e1e3bf6049f759c4b", "score": "0.60057884", "text": "public static function loadWebsiteFixturesRollback()\n {\n include __DIR__ . '/../../../../../../_files/websiteFixtures_rollback.php';\n }", "title": "" }, { "docid": "7ba19d72c7a6c7dbd1bf69a33bc2457d", "score": "0.56970304", "text": "public static function loadReviewFixturesRollback()\n {\n include __DIR__ . '/../../Service/Catalog/_files/reviewFixturesWithRating_rollback.php';\n }", "title": "" }, { "docid": "f07b82684a2d67041fb3e8da7e2d68b0", "score": "0.5605022", "text": "public function setUp()\n {\n if (!is_dir(static::$cachePath)) {\n mkdir(static::$cachePath);\n }\n\n if (!is_dir(static::$filesPath)) {\n mkdir(static::$filesPath);\n }\n \n parent::setUp();\n }", "title": "" }, { "docid": "ada973af0010fe45a32ff2321266c776", "score": "0.5506613", "text": "public static function loadStockFixturesRollback(): void\n {\n include __DIR__ . '/../../../../_files/stockFixtures_rollback.php';\n }", "title": "" }, { "docid": "82f692787ed3eaf5daf0f9be854a2696", "score": "0.54935503", "text": "public function createSut()\n {\n if ($this->installed || getenv('SI_SKIP')) {\n return;\n }\n // @todo: pull db credentials from phpunit.xml configuration\n\n $this->createRequiredFiles();\n\n // Make settings.php writable again\n chmod('sut/web/sites/default/', 0755);\n @unlink('sut/web/sites/default/settings.php');\n copy('sut/web/sites/default/default.settings.php', 'sut/web/sites/default/settings.php');\n\n // Run site-install (Drupal makes settings.php unwritable)\n $this->drush('site-install', ['--yes'], ['db-url' => 'mysql://[email protected]/testdrushextensiondb']);\n\n $this->installed = true;\n }", "title": "" }, { "docid": "88ccf83b1dade96a5e204ec9dac42b60", "score": "0.5487471", "text": "public static function loadProductFixturesRollback(): void\n {\n include __DIR__ . '/_files/productFixtures_rollback.php';\n }", "title": "" }, { "docid": "3ca83955fccf8439872550f50e3260a0", "score": "0.54013705", "text": "public function testTheSuperSakeFileIsInWebRoot()\n {\n $this->assertTrue(is_file(BASE_PATH.'/supersake'));\n }", "title": "" }, { "docid": "e90b75a8c6d58ea54b789b00c1a0cf44", "score": "0.5400361", "text": "public static function loadSyncHistorySimpleFixturesRollback()\n {\n include __DIR__ . '/../../../../../../_files/syncHistoryFixtures_rollback.php';\n }", "title": "" }, { "docid": "5e6fffe06a444c0f793cbdaed22bb1b3", "score": "0.53807974", "text": "public function make_script() {\n $script_path = $this->site_path().\"/dist/site.js\";\n file_put_contents($script_path, implode(\"\", $this->scripts()));\n file_put_contents($script_path, file_get_contents(REL_ROOT.\"/apis/site-builder/auto-run-page.js\"), FILE_APPEND);\n }", "title": "" }, { "docid": "93e3091cbca0d68bab0bbcd6132a8ed0", "score": "0.5357807", "text": "private function buildTestEnv()\n {\n $fs = new Filesystem();\n \n \n if ($fs->exists(PHPUNIT_WEBROOT)) {\n $fs->remove(PHPUNIT_WEBROOT);\n } else {\n \n $fs->mkdir(PHPUNIT_WEBROOT, 0777);\n }\n \n \n // Create needed directories\n @$fs->mkdir(PHPUNIT_ROOT . '/resources/files/', 0777);\n @$fs->mkdir(PHPUNIT_ROOT . '/resources/translations/', 0777);\n @$fs->mkdir(PHPUNIT_WEBROOT . '/app/cache/', 0777);\n @$fs->mkdir(PHPUNIT_WEBROOT . '/app/config/', 0777);\n @$fs->mkdir(PHPUNIT_WEBROOT . '/app/database/', 0777);\n @$fs->mkdir(PHPUNIT_WEBROOT . '/extensions/', 0777);\n @$fs->mkdir(PHPUNIT_WEBROOT . '/extensions/local', 0777);\n @$fs->mkdir(PHPUNIT_WEBROOT . '/files/', 0777);\n @$fs->mkdir(PHPUNIT_WEBROOT . '/theme/', 0777);\n\n \n // Mirror in required assets.\n $fs->mirror(TEST_ROOT . '/app/resources/', PHPUNIT_WEBROOT . '/app/resources/', null, ['override' => true]);\n $fs->mirror(TEST_ROOT . '/app/theme_defaults/', PHPUNIT_WEBROOT . '/app/theme_defaults/', null, ['override' => true]);\n $fs->mirror(TEST_ROOT . '/app/view/', PHPUNIT_WEBROOT . '/app/view/', null, ['override' => true]);\n \n \n // System link extension to local\n $fs->symlink(BOOKME_EXTENSION_PATH,PHPUNIT_WEBROOT.'/extensions/local/icomefromthenet/bookme',false);\n \n \n // Build a clean bolt database\n $oDatabase = $this->getBoltDatabaseConnection();\n $oNow = $this->getTestDate($oDatabase);\n $aTableNames = $this->getDatabaseTableList();\n \n $this->buildTestDatabase($oDatabase, $aTableNames, $oNow);\n \n \n // Copy in config files\n foreach ($this->configs as $config) {\n $fs->copy($config, PHPUNIT_WEBROOT . '/app/config/' . basename($config), true);\n }\n \n\n // Copy in the theme\n $name = basename($this->theme);\n $fs->mirror($this->theme, PHPUNIT_WEBROOT . '/theme/' . $name);\n\n\n // done run as create folders and worng dir, we set paths when make the app\n // Set the theme name in config.yml\n //system('php ' . NUT_PATH . ' config:set theme ' . $name);\n\n // Empty the cache\n //system('php ' . NUT_PATH . ' cache:clear');\n \n \n }", "title": "" }, { "docid": "f031968e023eaaba911ea8b13e132755", "score": "0.53451973", "text": "public static function loadProductFixturesRollback()\n {\n include __DIR__ . '/../../../_files/productFixtures_rollback.php';\n }", "title": "" }, { "docid": "08c35f208a3bd71a36b352231dcfaa47", "score": "0.53297234", "text": "public function setUp()\n\t{\n\t\t$_SERVER['orchestra.install.schema-users'] = null;\n\t\t$_SERVER['orchestra.install.schema'] = null;\n\t\t$_SERVER['orchestra.install.user'] = null;\n\t\t$_SERVER['orchestra.install.acl'] = null;\n\n\t\t\\Event::listen('orchestra.install.schema: users', function()\n\t\t{\n\t\t\t$_SERVER['orchestra.install.schema-users'] = 'foo';\n\t\t});\n\n\t\t\\Event::listen('orchestra.install.schema', function()\n\t\t{\n\t\t\t$_SERVER['orchestra.install.schema'] = 'foo';\n\t\t});\n\n\t\t\\Event::listen('orchestra.install: user', function()\n\t\t{\n\t\t\t$_SERVER['orchestra.install.user'] = 'foo';\n\t\t});\n\n\t\t\\Event::listen('orchestra.install: acl', function()\n\t\t{\n\t\t\t$_SERVER['orchestra.install.acl'] = 'foo';\n\t\t});\n\n\t\t$base_path = \\Bundle::path('orchestra').'tests'.DS.'fixtures'.DS;\n\t\tset_path('app', $base_path.'application'.DS);\n\n\t\tparent::setUp();\n\t\t\n\t\t\\Orchestra\\Installer::$status = false;\n\t}", "title": "" }, { "docid": "eee904a700e54d70a09eb482a9650127", "score": "0.5325521", "text": "public function tearDown()\n\t{\n\t\tunset($_SERVER['orchestra.install.schema-users']);\n\t\tunset($_SERVER['orchestra.install.schema']);\n\t\tunset($_SERVER['orchestra.install.user']);\n\t\tunset($_SERVER['orchestra.install.acl']);\n\n\t\tset_path('app', path('base').'application'.DS);\n\n\t\tparent::tearDown();\n\t}", "title": "" }, { "docid": "528f084a7dc4d6585925a1431caca0f1", "score": "0.53214777", "text": "public static function loadSimpleProductFixturesRollback()\n {\n include __DIR__ . '/../../../../../../_files/productFixtures_rollback.php';\n }", "title": "" }, { "docid": "4dd094e747e49a352209fbd643b45292", "score": "0.5311858", "text": "public function setUp()\n {\n $this->createExample('Entity/BookDetailInfo.php');\n //Create entity test file for using subdirectories\n $this->createExample('Entity/Admin/SpecialConfiguration.php');\n parent::setUp();\n }", "title": "" }, { "docid": "6b3faebfc52dde80e88dffb060f1be27", "score": "0.53010327", "text": "protected function setUp(): void\n {\n parent::setUp();\n\n File::deleteDirectory(app_path('Renderable'));\n File::deleteDirectory(resource_path('views/renderable'));\n }", "title": "" }, { "docid": "beeaaf8d419eee366aabbad75607f22a", "score": "0.5299787", "text": "public function setUp()\n {\n $this->root = FileSystem::factory('vfs://');\n $this->root->mount();\n\n /**\n * @var Directory $rootDir\n */\n $rootDir = $this->root->get('/');\n $rootDir->add('src', new Directory([\n 'UserAccessManager' => new Directory([\n 'View' => new Directory([\n 'AdminNotice.php' => new File('<?php echo \\'AdminNotice\\';')\n ])\n ])\n ]));\n }", "title": "" }, { "docid": "03330fde894e366bf7d16e0028a4aa32", "score": "0.5292798", "text": "protected function setUpScripts()\n {\n $script = <<<EOF\n$('.table-import').click(function (e) {\n e.preventDefault();\n var moduleSlug=\"$this->moduleSlug\";\n var path = window.location.pathname;\n var paths=path.split(\"/\");\n var lastPath=paths.pop();\n window.open(\"$this->url?module_slug=\"+(moduleSlug?moduleSlug:lastPath));\n});\n\nEOF;\n\n Admin::script($script);\n }", "title": "" }, { "docid": "471851ddc8a286eaf7292ffcb4ebf8a1", "score": "0.52414405", "text": "public static function loadProductFixturesRollback()\n {\n include __DIR__ . '/../../Service/Catalog/_files/productFixtures_rollback.php';\n include __DIR__ . '/../../Service/Catalog/_files/productFixtures_ratingAttributes_rollback.php';\n }", "title": "" }, { "docid": "e3783929260fc848eaada670d787152c", "score": "0.5236821", "text": "public function setUp() {\n\t\t$this->requireEasyDeployClassesOrSkip();\n\t}", "title": "" }, { "docid": "030b4da142e67f9a4efd8de7d71fffe1", "score": "0.5230809", "text": "public static function loadKlevuSimpleSyncFixturesRollback()\n {\n include __DIR__ . '/../../../../../../_files/klevuProductSyncFixtures_rollback.php';\n }", "title": "" }, { "docid": "ced10b7c1800b3cd2f916a9e0ab3da4d", "score": "0.52141756", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Storage::deleteDirectory('products');\n Storage::deleteDirectory('articles');\n\n Storage::makeDirectory('products');\n Storage::makeDirectory('articles');\n\n Product::factory(50)->create();\n Article::factory(50)->create();\n }", "title": "" }, { "docid": "c09d0c2f335e9efeba7d449d53b51536", "score": "0.52077574", "text": "public function tearDown()\n\t{\n\t\tunset($this->stub);\n\t\tunset($this->base_path);\n\t\tunset($_SERVER['theme.start']);\n\n\t\t\\Config::set('application.index', 'index.php');\n\t\t\\Config::set('application.url', '');\n\n\t\tset_path('public', path('base').'public'.DS);\n\t}", "title": "" }, { "docid": "8d2ec168668ac85383bc2e839629c18a", "score": "0.51961994", "text": "protected function setUp():void\n {\n parent::setUp();\n \n $this->loadMigrationsFrom([\n '--realpath' => realpath(__DIR__ . '/../src/migrations'),\n ]);\n $this->artisan('webappid:airport:seed');\n \n }", "title": "" }, { "docid": "98c4eedd5bcb38463dc67b16846e1b3d", "score": "0.5192062", "text": "public function preExecute()\n {\n parent::preExecute();\n sfConfig::set('app_rt_node_title', 'Site');\n rtTemplateToolkit::setFrontendTemplateDir();\n }", "title": "" }, { "docid": "2116967e904e0be85a1f20b2cacb2eed", "score": "0.5180989", "text": "public static function setUpSite() {\n self::prepareFiles();\n self::createConfigFile();\n self::clearDatabase();\n self::installWp();\n }", "title": "" }, { "docid": "ecd1fed08a21aa075cb186d0e48634f2", "score": "0.51761436", "text": "public function setUp()\n\t{\n\t\t\\URL::$base = null;\n\t\t\\Config::set('application.index', '');\n\t\t\\Config::set('application.url', 'http://localhost/');\n\t\t$_SERVER['theme.start'] = null;\n\n\t\t$this->base_path = \\Bundle::path('orchestra').'tests'.DS.'fixtures'.DS;\n\t\tset_path('public', $this->base_path.'public'.DS);\n\n\t\t$this->stub = new \\Orchestra\\Theme\\Container('default');\n\t}", "title": "" }, { "docid": "a3186c563370ac84d216fc8f61051b8a", "score": "0.5155165", "text": "public static function setUpBeforeClass()\n {\n if (file_exists(__DIR__ . '/../../config/security.yml') == true) {\n rename(__DIR__ . '/../../config/security.yml', __DIR__ . '/../../config/security.yml.test');\n }\n }", "title": "" }, { "docid": "6fd8f82922ca6dd89df18cd4c52d874a", "score": "0.51340306", "text": "public function prepareTestFolders() {\n\t\t$dir = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'behat' . DIRECTORY_SEPARATOR . uniqid();\n\n\t\tmkdir($dir . '/features/bootstrap/i18n', 0777, true);\n\n\t\t$phpFinder = new PhpExecutableFinder();\n\t\tif (false === $php = $phpFinder->find()) {\n\t\t\tthrow new \\RuntimeException('Unable to find the PHP executable.');\n\t\t}\n\t\t$this->workingDir = $dir;\n\t\t$this->phpBin = $php;\n\t\t$this->process = new Process(null);\n\t}", "title": "" }, { "docid": "7f24078ad5693859e666b106783e7a19", "score": "0.51290923", "text": "public function run()\n {\n //\n $role_admin = [\n \"slug\" => \"admin\",\n \"name\" => \"Admin\",\n \"permissions\" => [\n \"admin\" => true\n ]\n ];\n\n Sentinel::getRoleRepository()->createModel()->fill($role_admin)->save();\n $adminrole = Sentinel::findRoleByName('Admin');\n $user_admin = [\"name\"=>\"Administrator\", \"phone\"=>\"01234567890\",\"address\"=>\"Admin Street\", \"email\"=>\"[email protected]\", \"password\"=>'admin123'];\n $adminuser = Sentinel::registerAndActivate($user_admin);\n $adminuser->roles()->attach($adminrole);\n\n $role_supplier = [\n \"slug\" => \"supplier\",\n \"name\" => \"Supplier\",\n \"permissions\" => [\n \"admin.supplier\" => true\n ]\n ];\n Sentinel::getRoleRepository()->createModel()->fill($role_supplier)->save();\n $supplierrole = Sentinel::findRoleByName('Supplier');\n $user_supplier = [\"name\"=>\"Supplier\", \"phone\"=>\"01234567890\",\"address\"=>\"Supplier Address\", \"email\"=>\"[email protected]\", \"password\"=>'supplier123'];\n $supplieruser = Sentinel::registerAndActivate($user_supplier);\n $supplieruser->roles()->attach($supplierrole);\n\n $role_buyer = [\n \"slug\" => \"buyer\",\n \"name\" => \"Buyer\",\n \"permissions\" => [\n \"admin.belanja\" => true\n ]\n ];\n Sentinel::getRoleRepository()->createModel()->fill($role_buyer)->save();\n $buyerrole = Sentinel::findRoleByName('Buyer');\n $user_buyer = [\"name\"=>\"Buyer\", \"phone\"=>\"01234567890\",\"address\"=>\"Buyer Address\", \"email\"=>\"[email protected]\", \"password\"=>'buyer123'];\n $buyeruser = Sentinel::registerAndActivate($user_buyer);\n $buyeruser->roles()->attach($buyerrole);\n }", "title": "" }, { "docid": "932ff4779075795a90740cc0f0d56cd4", "score": "0.5125595", "text": "public function testMigrateDataStore()\n {\n\n $targetPage = 'testMigrateDataStore:test';\n saveWikiText($targetPage, 'Test ', 'test summary');\n idx_addPage($targetPage);\n\n // Cleaning\n /** @var admin_plugin_404manager $redirectManager */\n $redirectManager = admin_plugin_404manager::get()\n ->setDataStoreType(admin_plugin_404manager::DATA_STORE_TYPE_SQLITE);\n $redirectManager->deleteAllRedirections();\n $filenameMigrated = admin_plugin_404manager::DATA_STORE_CONF_FILE_PATH . '.migrated';\n if (file_exists($filenameMigrated)){\n unlink($filenameMigrated);\n }\n\n // Create a conf file\n $redirectManager->setDataStoreType(admin_plugin_404manager::DATA_STORE_TYPE_CONF_FILE);\n $redirectManager->deleteAllRedirections();\n $sourcePageIdValidated = \"doesNotExistValidateRedirections\";\n $redirectManager->addRedirection($sourcePageIdValidated, $targetPage);\n $redirectManager->validateRedirection($sourcePageIdValidated);\n $sourcePageIdNotValidated = \"doesNotExistNotValidateRedirections\";\n $redirectManager->addRedirection($sourcePageIdNotValidated, $targetPage);\n\n $count = $redirectManager->countRedirections();\n $this->assertEquals(2, $count, \"The number of redirection is 2 in the conf file\");\n\n $this->assertEquals(true, file_exists(admin_plugin_404manager::DATA_STORE_CONF_FILE_PATH), \"The file was created\");\n\n // Settings the store will trigger the migration\n $redirectManager->setDataStoreType(admin_plugin_404manager::DATA_STORE_TYPE_SQLITE);\n\n $count = $redirectManager->countRedirections();\n $this->assertEquals(1, $count, \"The number of redirection is 1\");\n\n $this->assertEquals(false, file_exists(admin_plugin_404manager::DATA_STORE_CONF_FILE_PATH), \"The file does not exist anymore\");\n $this->assertEquals(true, file_exists($filenameMigrated), \"The file migrated exist\");\n\n\n\n }", "title": "" }, { "docid": "a3e4361ce5a91952e6c4ac447ec7a796", "score": "0.5125488", "text": "public function setUp()\n {\n parent::setUp();\n $this->objectManager = new ObjectManager();\n\n $this->importDataSet(__DIR__ . '/fixtures/page-livews.xml');\n $this->importDataSet(__DIR__ . '/fixtures/overlay-livews.xml');\n $this->importDataSet(__DIR__ . '/fixtures/page-ws.xml');\n $this->importDataSet(__DIR__ . '/fixtures/overlay-ws.xml');\n\n $this->initializeTsfeCharsetConverter();\n\n $this->pathgenerator = new Pathgenerator();\n $this->pathgenerator->init($this->fixture_defaultconfig());\n $this->pathgenerator->setRootPid(1);\n }", "title": "" }, { "docid": "f6a5165d992d13f05a8d495c3ee4a56a", "score": "0.51166016", "text": "public function testGetScriptPath()\n {\n }", "title": "" }, { "docid": "9df32ea497c76c9537835e66e8b1d6f6", "score": "0.5114938", "text": "public function setUp(): void\n {\n $container = Robo::createDefaultContainer();\n $this->setContainer($container);\n $this->setConfig(Robo::config());\n $this->themePath = realpath(__DIR__ . '/../testfiles/testtheme');\n }", "title": "" }, { "docid": "37aba3a520dda8c3afeb666d49269636", "score": "0.5113795", "text": "public function createUserMigrationFiles()\n {\n (new Filesystem())->ensureDirectoryExists(database_path('migrations'));\n (new Filesystem())->copyDirectory(__DIR__ . '/../../database/migrations/', database_path('migrations/'));\n }", "title": "" }, { "docid": "6c66725faa1a333125e55371c7babb4c", "score": "0.51129234", "text": "protected function setUp()\n {\n parent::setUp();\n\n $this->importDataSet('PACKAGE:tests/Functional/Fixtures/pages.xml');\n $this->importDataSet(ORIGINAL_ROOT . 'typo3/sysext/backend/Tests/Functional/Utility/Fixtures/sys_domain.xml');\n }", "title": "" }, { "docid": "3058470c28d2dd9cc5115945a8719f28", "score": "0.5100251", "text": "protected function setUp()\n {\n $this->runFilesDir = __DIR__ . '/runFiles';\n $this->runFile = $this->runFilesDir . '/' . $this->runFilename;\n if(is_file($this->runFile))\n {\n unlink($this->runFile);\n } \n }", "title": "" }, { "docid": "e304ec5907996a7127946b4c966f6123", "score": "0.50991464", "text": "public static function loadWebsiteFixtures(): void\n {\n include __DIR__ . '/../../../../_files/websiteFixtures.php';\n }", "title": "" }, { "docid": "193255e8aa90e71bed51596dec9a4714", "score": "0.5098432", "text": "protected function setUp()\n {\n $dir = getcwd();\n chdir(sfConfig::get('sf_root_dir'));\n // Rebuild DB\n $task = new sfDoctrineBuildTask(new sfEventDispatcher, new sfFormatter);\n $task->run($args = array(), $options = array(\n 'env' => 'test',\n 'no-confirmation' => true,\n 'all' => true,\n ));\n\n // Init concrete test config && autoload\n sfConfig::clear();\n $configuration = ProjectConfiguration::getApplicationConfiguration('frontend', 'test', true);\n sfContext::createInstance($configuration);\n\n // Object helper\n $this->helper = $this->makeHelper();\n\n // Begin transaction\n if ($conn = $this->getConnection()) {\n $conn->beginTransaction();\n }\n }", "title": "" }, { "docid": "914c77de13f0abbb16fc8ceb0f64a3c1", "score": "0.5079587", "text": "public function addSiteTester() {\n $this->addStyle($this->styleSiteTester, Constants::appDir() . '/public/styles/site-tester.css', false);\n $this->addUtils();\n\n $this->addScript($this->scriptSiteTester, Constants::appDir() . '/public/scripts/site-tester.js', ['jquery', $this->scriptUtils]);\n }", "title": "" }, { "docid": "7d45e41e1c04aa7d1644054183db5f57", "score": "0.5068196", "text": "public function setUp(): void\n {\n parent::setUp();\n $this->republish();\n $this->migrate();\n }", "title": "" }, { "docid": "e52e4701656478503ed20ad475b9d355", "score": "0.5045882", "text": "public function prepareTestFolders()\n {\n $dir = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'behat' . DIRECTORY_SEPARATOR;\n @mkdir($dir . 'src/', 0777, true);\n\n $this->workingDir = $dir;\n }", "title": "" }, { "docid": "5b4ceef793ce4c2c708d8a506da80a91", "score": "0.50377655", "text": "public static function loadWebsiteFixtures()\n {\n include __DIR__ . '/../../_files/websiteFixtures.php';\n }", "title": "" }, { "docid": "481ef5e7832e8cb47cfda2f1b2f1899a", "score": "0.5031034", "text": "public static function loadWebsiteFixtures()\n {\n include __DIR__ . '/../../../../../../_files/websiteFixtures.php';\n }", "title": "" }, { "docid": "d33e9295833e33e2beeefea9d2c6640d", "score": "0.50248086", "text": "public function run()\n {\n\n $files = \\Illuminate\\Support\\Facades\\Storage::disk('public')->allFiles();\n \\Illuminate\\Support\\Facades\\Storage::disk('public')->delete($files);\n\n\n \\Illuminate\\Support\\Facades\\Storage::disk('public')->put('.gitignore', '\n *\n !.gitignore');\n\n\n $user = \\App\\User::create([\n 'name' => 'Kiki',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('1q2w3e4r5t'),\n 'remember_token' => str_random(10),\n ]);\n\n \\App\\User::create([\n 'name' => 'test',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('1q2w3e4r5t'),\n 'remember_token' => str_random(10),\n ]);\n\n\n\n $site = new \\App\\Site([\n 'name' => 'Nikas Staging',\n 'store_url' => 'http://staging.tempus.media',\n 'consumer_key' => encrypt('ck_fec70ccc608dffab43ac375587183f999d3a9122'),\n 'consumer_secret' => encrypt('cs_6608e2a6f5451b168cd1c64ca4d781c338831427'),\n ]);\n\n\n $site2 = new \\App\\Site([\n 'name' => 'Nikas Production',\n 'store_url' => 'https://shop.nikas.hr',\n 'consumer_key' => encrypt('ck_174d206a6a676220e512e7136016dd1ac91db93e'),\n 'consumer_secret' => encrypt('cs_e2badc5d25370cdecb59aea407217ed9993e9897'),\n ]);\n\n $site3 = new \\App\\Site([\n 'name' => 'Nemec pharmacia',\n 'store_url' => 'https://nemecpharmacia.hr',\n 'consumer_key' => encrypt('ck_c03317301cbef1805b9a99f2b858f30060d611f4'),\n 'consumer_secret' => encrypt('cs_25181ca7a7083b75717d6a7cfd4d4ce47249fe97'),\n ]);\n\n $site4 = new \\App\\Site([\n 'name' => 'Feroflam',\n 'store_url' => 'http://feroflam.hr',\n 'consumer_key' => encrypt('ck_af3224ae1a44cabc172c280598af14fcd9c2be3a'),\n 'consumer_secret' => encrypt('cs_6f9c648cb11e21b914363b7d3c82e0db83d3b80c'),\n ]);\n\n $site5 = new \\App\\Site([\n 'name' => 'Laval',\n 'store_url' => 'http://laval.hr',\n 'consumer_key' => encrypt('ck_df886836c26c333c60bf31b7e21c3ebf2fddc320'),\n 'consumer_secret' => encrypt('cs_687cd1e021dc08ff5327cd818ecdde336906925d'),\n ]);\n\n $user->sites()->save($site);\n $user->sites()->save($site2);\n $user->sites()->save($site3);\n $user->sites()->save($site4);\n $user->sites()->save($site5);\n\n }", "title": "" }, { "docid": "64cdc660c188494e871c2f8c294a9dcb", "score": "0.5021654", "text": "protected function setUp(): void\n {\n parent::setUp();\n\n Browser::$baseUrl = $this->baseUrl();\n\n Browser::$storeScreenshotsAt = base_path('tests/Browser/screenshots');\n\n Browser::$storeConsoleLogAt = base_path('tests/Browser/console');\n\n Browser::$storeSourceAt = base_path('tests/Browser/source');\n\n Browser::$userResolver = function () {\n return $this->user();\n };\n }", "title": "" }, { "docid": "61f6ea2b60fd2dbd6c46851c91dcbf55", "score": "0.50178725", "text": "public function injectScripts()\n {\n }", "title": "" }, { "docid": "655fc037821f31c2110e19ccb0deae16", "score": "0.50175434", "text": "public static function loadWebsiteFixtures()\n {\n include __DIR__ . '/../../../_files/websiteFixtures.php';\n }", "title": "" }, { "docid": "c2d018d899f6d8dba47481aff22200dd", "score": "0.5015054", "text": "protected function setUp()\n\t{\n\t\t$this->merged = MountcontainerFilesystem::newConfig()->create();\n\t\t$this->src = LocalFilesystem::newConfig()->setBasePath(__DIR__ . '/../../../src')->create();\n\t\t$this->test = LocalFilesystem::newConfig()->setBasePath(__DIR__ . '/../../../test')->create();\n\t\t$this->nest = LocalFilesystem::newConfig(array('base' => __DIR__ . '/../../../test'))->create();\n\t}", "title": "" }, { "docid": "741a970b627a109cb823d86a6dd9161c", "score": "0.50078034", "text": "protected function setUp()\n {\n $this->publishes([\n __DIR__.'../Config/config.php' => config_path('api.php'),\n ], 'config');\n }", "title": "" }, { "docid": "28e7e3ac4a957b5bdb45f87032824a5e", "score": "0.49976143", "text": "public function testStore()\n {\n $path = __DIR__ . \"/docs/rylai\";\n\n $this->assertTrue(file_exists($path));\n $this->assertTrue(is_dir($path));\n $this->assertTrue(is_writable($path));\n /**\n * Test folder\n */\n $finder = new Finder();\n $finder->files()->in($path);\n\n $maps = [];\n foreach ($finder as $file) {\n $maps[] = str_replace(\".php\", \".html\", str_replace(\"/\", \"_\", $file->getRelativePathname()));\n }\n\n $this->assertEquals([\n \"CrystalNova.html\",\n \"Items_Courier.html\",\n ], $maps);\n }", "title": "" }, { "docid": "661e81314ff4b6dd2ef54ab2b9676026", "score": "0.49939093", "text": "public function setUp(): void\n {\n parent::setUp();\n\n $timestamp = mt_rand(1, 2147483647);\n\n Carbon::setTestNow(date(\"Y-m-d H:i:s\", $timestamp));\n\n $this->app['config']->set('juice-backups.destination', __DIR__ . '/temp');\n\n $this->artisan('backup:setup');\n\n $this->path = sprintf(\n '%s/temp/%s-%s.tar.gz',\n __DIR__,\n config('juice-backups.name'),\n date(\"Y-m-d-H-i-s\", $timestamp)\n );\n }", "title": "" }, { "docid": "c291d29e8e48d4e00992a9319a0c081d", "score": "0.4990694", "text": "public function setup()\n {\n $this->enableAllPluginsExcept(array('sfDoctrinePlugin', 'sfCompat10Plugin'));\n// $this->setWebDir(\"/home/tibia/public_html/\");\n// $this->setCacheDir(\"/home/tibia/cache/\");\n// $this->setRootDir(\"/home/tibia/\");\n }", "title": "" }, { "docid": "c057af42cd0dcb53f77515ec86d10834", "score": "0.49764025", "text": "public function addSiteTesterAssets() {\n /** @var WooCommerceAssetManager $assetManager */\n $assetManager = WooCommerceAssetManager::getInstance();\n $assetManager->addTester();\n }", "title": "" }, { "docid": "2e64b277f103d0158b22ae9376189ce5", "score": "0.49760482", "text": "function ucinews_migration() {\n //require_once 'migration/migration.php';\n}", "title": "" }, { "docid": "4b29bb74259267a65e6ce2798646adaf", "score": "0.49759448", "text": "public function setUp() {\n $this->account_file = new AccountFile();\n\n // Define\n $this->phactory->define( 'website_files', array( 'website_id' => self::WEBSITE_ID, 'file_path' => self::FILE_PATH ) );\n $this->phactory->recall();\n }", "title": "" }, { "docid": "255f6a4cb316647edb8ab40cf454b4b9", "score": "0.4973795", "text": "protected function setUp()\n\t{\n\t\t$this->aimeos = \\TestHelperJobs::getAimeos();\n\t\t$this->context = \\TestHelperJobs::getContext();\n\t\t$config = $this->context->getConfig();\n\n\t\t$config->set( 'controller/jobs/common/decorators/default', [] );\n\t\t$config->set( 'controller/jobs/admin/decorators/global', [] );\n\t\t$config->set( 'controller/jobs/admin/decorators/local', [] );\n\n\t}", "title": "" }, { "docid": "76c30397528de1aa2a94e09a08dffd7d", "score": "0.49686483", "text": "protected function setUp(): void\n {\n parent::setUp();\n\n static::initTempDirectory();\n\n copy(static::stubsDirectory('files/archive.zip'), static::tempDirectory('archive.zip'));\n\n $this->app['config']->set('backup.backup.password', self::PASSWORD);\n }", "title": "" }, { "docid": "a4e45f450c1954ee891e8617640f3030", "score": "0.49686393", "text": "public function createSiteAction(): int\n {\n $this->createdPagesIndex = [];\n $this->createdDirs = [];\n $this->createdFiles = [];\n\n // ** Create the new website\n\n // start transactions\n $this->connectionPool->getConnectionByName('Default')->beginTransaction();\n\n // keep tracks of the created folders and files to be able to remove them during a rollback\n try {\n // Create the website:\n $websiteUid = $this->insertWebsite();\n\n // Create the site pages:\n // > Root page\n $rootUid = $this->insertRootPage($websiteUid, 'Website ' . $websiteUid);\n\n $this->insertContent(\n $rootUid,\n self::CTYPE_TEXTPIC,\n '<h1>Welcome on website ' . $websiteUid . ' root page.</h1>',\n 0\n );\n\n // New pages\n foreach (range(0, 4) as $i) {\n $pageUid = $this->insertPage(\n $websiteUid,\n $rootUid,\n 'Page ' . $i,\n '/page-' . $i\n );\n $this->insertContent(\n $pageUid,\n self::CTYPE_TEXT,\n 'This is some content',\n 0\n );\n\n foreach (range(0, 4) as $j) {\n $subPageUid = $this->insertPage(\n $websiteUid,\n $pageUid,\n 'Page ' . $i . '-' . $j,\n '/page-' . $i . '-' . $j\n );\n $this->insertContent(\n $subPageUid,\n self::CTYPE_TEXT,\n 'This is some content',\n 0\n );\n }\n }\n\n // update sys_template\n\n $queryBuilder = $this->connectionPool->getQueryBuilderForTable('sys_template');\n $queryBuilder->insert('sys_template')\n ->values([\n 'pid' => $rootUid,\n 'title' => 'Website ' . $websiteUid,\n 'sitetitle' => 'Website ' . $websiteUid,\n 'root' => 1,\n 'clear' => 3,\n 'config' => \"page = PAGE\\npage.10 = TEXT\\npage.10.value = Some page of the website \" . $websiteUid\n ])\n ->execute();\n\n // ## Create the site config.yaml file\n $identifier = $this->writeConfigFile($rootUid);\n\n // Update the website identifier\n $queryBuilder = $this->connectionPool->getQueryBuilderForTable('websites');\n $queryBuilder->update('websites')\n ->set('config_identifier', $identifier)\n ->where($queryBuilder->expr()->eq('uid', $websiteUid))\n ->execute();\n\n // Create the user_upload and form_definitions directories and update the sys_filemounts table\n $uploadRelPath = \"/user_upload/\" . $websiteUid;\n $fileadminDir = $this->typo3_install_dir() . \"/fileadmin\";\n $uploadDir = $fileadminDir . $uploadRelPath;\n if (file_exists($uploadDir)) {\n throw new \\RuntimeException(\"A directory or file \" . $uploadDir . \" already exists. Abort.\");\n }\n\n\n $formsRelPath = '/form_definitions/' . $websiteUid;\n $formsDir = $fileadminDir . $formsRelPath;\n if (file_exists($formsDir)) {\n throw new \\RuntimeException(\"A directory or file \" . $formsDir . \" already exists. Abort.\");\n }\n\n $this->mkDir($uploadDir);\n $this->mkDir($formsDir);\n\n // Insert the filemounts points (sys_filemounts)\n $queryBuilder = $this->connectionPool->getQueryBuilderForTable('sys_filemounts');\n $queryBuilder->insert('sys_filemounts')\n ->values([\n 'title' => 'Documents_' . $websiteUid,\n 'path' => rtrim($uploadRelPath, '/') . '/',\n 'base' => 1\n ])\n ->execute();\n\n $queryBuilder = $this->connectionPool->getQueryBuilderForTable('sys_filemounts');\n $queryBuilder->insert('sys_filemounts')\n ->values([\n 'title' => 'Forms_' . $websiteUid,\n 'path' => rtrim($formsRelPath, '/') . '/',\n 'base' => 1\n ])\n ->execute();\n\n // Create the BE Editors group\n $beGroupUid = $this->createOrUpdateBeGroup(\n $websiteUid,\n $rootUid\n );\n\n // Create the BE User\n $beUserUid = $this->createOrUpdateBeUser(\n $websiteUid,\n $rootUid,\n $beGroupUid\n );\n\n // Update the user TsConfig\n $tsconfig = \"options.uploadFieldsInTopOfEB = 1\\n\" .\n \"options.defaultUploadFolder=1:\" . rtrim($uploadRelPath, '/') . \"/\\n\";\n $queryBuilder = $this->connectionPool->getQueryBuilderForTable('be_users');\n $queryBuilder\n ->update('be_users')\n ->where($queryBuilder->expr()->eq('uid', $beUserUid))\n ->set('TSconfig', $tsconfig)\n ->execute();\n\n // Setup user and group rights\n $this->setBeUserPerms($websiteUid, false, $beGroupUid, $beUserUid);\n\n // Try to commit the result\n $commitSuccess = $this->connectionPool->getConnectionByName('Default')->commit();\n if (!$commitSuccess) {\n throw new \\RuntimeException('Something went wrong while committing the result');\n }\n\n } catch(\\Throwable $e) {\n // rollback\n $this->connectionPool->getConnectionByName('Default')->rollback();\n\n // remove created files and dirs\n foreach (array_reverse($this->createdFiles) as $filename) {\n unlink($filename);\n }\n $this->createdFiles = [];\n\n foreach (array_reverse($this->createdDirs) as $dirname) {\n rmdir($dirname);\n }\n $this->createdDirs = [];\n\n throw $e;\n }\n\n return $rootUid;\n }", "title": "" }, { "docid": "daf8001a532f595043ddaada0ede4074", "score": "0.49660802", "text": "public function testCreation() {\n self::$manager->init();\n $file = self::DIR . self::FILE;\n $this->assertTrue(file_exists($file));\n }", "title": "" }, { "docid": "c3469e05b7783c07531d4d4cc33ebbed", "score": "0.49609947", "text": "function setUp() {\n\t\t$this->createDatabase();\n\t\t$this->useTestDatabase();\n\t\t$this->importStdDB();\n\n\t\t// order of extension-loading is important !!!!\n\t\t$this->importExtensions(array('cms', 'core', 'crawler', 'frontend', 'workspaces'));\n\n\t\t//restore old rootline\n\t\t$this->oldRootline = $GLOBALS['TYPO3_CONF_VARS']['FE']['addRootLineFields'];\n\t\t//clear rootline\n\t\t$GLOBALS['TYPO3_CONF_VARS']['FE']['addRootLineFields'] = '';\n\n\t}", "title": "" }, { "docid": "3fb5a1008895edcced3c8da24cbe925b", "score": "0.4960234", "text": "protected function setUpInstancePath() {\n\n\t\tif (!is_dir(ORIGINAL_ROOT . 'typo3temp')) {\n\t\t\tif (!mkdir(ORIGINAL_ROOT . 'typo3temp', 0777, TRUE)) {\n\t\t\t\tthrow new \\RuntimeException('Directory \"' . ORIGINAL_ROOT . 'typo3temp' . '\" could not be created', 1404038665);\n\t\t\t}\n\t\t}\n\n\t\t$this->instancePath = ORIGINAL_ROOT . 'typo3temp/acceptance-' . $this->identifier;\n\n\t}", "title": "" }, { "docid": "1fa07ccec8e1849fd8062e41b2b38936", "score": "0.49402192", "text": "public function setUp(): void\n {\n parent::setUp();\n\n $this->loadPlugins(['Assets' => []]);\n }", "title": "" }, { "docid": "abb57266eee47e590f529e0659a2b30d", "score": "0.49275497", "text": "public function setUp()\n {\n parent::setUp();\n\n $this->withFactories(__DIR__.'/../src/Database/Factories');\n $this->withFactories(__DIR__.'/../install-stubs/database/factories');\n\n $this->artisan('migrate');\n $this->artisan('migrate', [\n '--path' => '../../../../install-stubs/database/migrations',\n ]);\n\n $this->artisan('migrate', [\n '--path' => '../../laravel/passport/database/migrations',\n ]);\n\n $this->loadEnv();\n\n $this->loadCashierPlans();\n $this->loadCashierSettings();\n\n $this->loadPassportKeys();\n $this->loadPassportClients();\n }", "title": "" }, { "docid": "55b389ce7dfb1b81b51a11df06232810", "score": "0.49253306", "text": "public function setUp() {\n\t\t$this->client = static::createClient();\n\t\t$this->client->followRedirects(true);\n\n\t\t$this->container = static::$kernel->getContainer();\n\t\t$this->translator = $this->container->get('translator');\n\n\t\t$this->em = $this->container->get('doctrine')->getManager();\n\t}", "title": "" }, { "docid": "b57693b5c4588ae5ffcbaccd0d6efa40", "score": "0.49155745", "text": "public static function setUpBeforeClass() {\n self::$script = dirname(dirname(dirname(__FILE__))) . '/server/scripts/migration/opus3-migration.sh';\n self::$dump_dir = dirname(__FILE__) . '/dumps/';\n self::$fulltext_dir = dirname(__FILE__) . \"/fulltexts/\";\n self::$fulltext_restricted_dir = dirname(__FILE__) . \"/fulltexts_restricted/\";\n self::$stepsize = 10;\n }", "title": "" }, { "docid": "f2d0eb71e4f40fc71189c1f98c026940", "score": "0.4913502", "text": "public static function loadReviewFixtures()\n {\n include __DIR__ . '/../../Service/Catalog/_files/reviewFixturesWithRating.php';\n }", "title": "" }, { "docid": "2302a5e71f0df253cdc75d344ee634a3", "score": "0.49115768", "text": "function setUp() {\n\t\tSSViewer::flush_template_cache();\n\t}", "title": "" }, { "docid": "4eeb542f06aa9feaa732a37c689a2030", "score": "0.49095032", "text": "public function run()\n {\n $this->addSite('Audition Hero', 'https://auditionherohq.com', [\n 'Laravel', 'Vue.js', 'MySQL', 'Nginx', 'Redis', 'Beanstalk', 'Stylus',\n ],\n 'Tasked with the challenge to create a booking platform to connect freelancers with performers, I created a comprehensive booking solution featuring a SPA booking scheduler that includes time slot selection, file uploads, secure payment, and more.'\n );\n\n $this->addSite('Sonotes', 'https://sonotes.com', [\n 'Laravel', 'Vue.js', 'MySQL', 'TDD', 'Nginx', 'Redis', 'Beanstalk', 'S3', 'Bulma', 'Sass',\n ], 'Designing and building the sonotes.com platform from the ground up gave me the freedom and opportunity to dive deep into some of the newest technologies and frameworks available, and utilize test-driven development.');\n\n $this->addSite('ActorDash', 'https://actordash.com', [\n 'Laravel', 'Vue.js', 'MySQL', 'Nginx', 'Scss'\n ], 'Initially built as a WordPress application, but I quickly migrated it over to Laravel as soon as we wanted to expanded on the feature set.');\n\n $this->addSite('Clubhouse', 'http://clubhouse.team', [\n 'Laravel', 'Vue.js', 'Sass',\n ], 'A personal side project of mine. A SASS for soccer team management. I play in various soccer leagues and we tried a bunch of the existing solutions out there and they are either terrible or bare okay, so I thought this would be a great way to learn more about Laravel Spark and leverage that.');\n\n $this->addSite('I\\'ve Got Diamonds', '#', [\n 'Laravel', 'jQuery', 'MySQL', 'Beanstalk', 'Scss', 'External API integration'\n ], 'A completely build custom webshop for a very specific checkout flow.');\n\n $this->addSite('Boligcon', 'http://boligcon.dk', [\n 'Laravel', 'Vue.js', 'MySQL', 'Scss'\n ], 'Client needed a better CMS than their current WordPress installation, so rebuild the site up from the ground in Laravel.');\n\n $this->addSite('Cratebuddy', 'http://cratebuddy.dk', [\n 'Laravel', 'Vanila JavaScript', 'MySQL', 'Nginx', 'Redis', 'Beanstalk',\n ], 'A Danish box subscription like Lootcrate.com. Integrates with Stripe\\'s API to leverage plans, customers, subscriptions, and coupons.');\n\n $this->addSite('Free Spins Top 10', 'http://freespinstop10.com', [\n 'Laravel', 'MySQL', 'jQuery', 'Custom Ubuntu server',\n ]);\n\n $this->addSite('Mourning Light Concierce', 'https://mourninglightconcierge.com', [\n 'Laravel', 'Vanilla JavaScript'\n ]);\n\n $this->addSite('Trap Danmark', 'https://trap.dk', [\n 'WordPress',\n ]);\n\n }", "title": "" }, { "docid": "18776ebd4b8d712ec638d3bf44ec6f36", "score": "0.49091408", "text": "protected function setUp(): void\n {\n $this->container = require __DIR__ . '/../config/container.php';\n\n $this->fixturesRoot = __DIR__ . '/fixtures';\n\n // Generate phisical files.\n $generator = new Generator();\n $generator->generate();\n\n $this->virtualRoot = vfsStream::setup('virtual');\n\n $structure = [];\n $fixtures = [\n 'encoding.php',\n 'eol.php',\n 'extension.php',\n 'finalEol.php',\n 'indentation.php',\n 'leadingEol.php',\n 'middleEol.php',\n 'name.php',\n 'permissions.php',\n 'spaceBeforeTab.php',\n 'trailingWhitespace.php',\n ];\n\n $append = function ($fixture) {\n return require $this->fixturesRoot . '/' . $fixture;\n };\n\n foreach ($fixtures as $fixture) {\n $structure = array_merge_recursive($structure, $append($fixture));\n }\n\n vfsStream::create($structure);\n }", "title": "" }, { "docid": "c8a8c93031a3d9838c950ebf5ed5403d", "score": "0.49086788", "text": "protected function setUp()\n {\n Discovery::register(\n GeneratedResource::URI, '\\\\Loris\\\\Resource\\\\GeneratedResource'\n );\n\n // References used by the generated resource that don't really exist\n $fakepaths = array(\n '/array-collection/{id}',\n '/array-collection/{idLeft}/{idRight}',\n '/array-resource/{idLeft}/{idRight}',\n '/object-collection/{id}',\n '/object-collection/{idLeft}/{idRight}',\n '/object-resource/{idLeft}/{idRight}',\n '/object-resource/{id}',\n '/array-resource/{id}',\n '/collection/{id}',\n '/collection/{idLeft}/{idRight}',\n '/resource/{idLeft}/and/{idRight}',\n '/resource/{id}',\n '/resource'\n );\n\n foreach ($fakepaths as $i => $fakepath) {\n // TODO: Eventually point these to ExternalResource/RemoteResource \n Discovery::register($fakepath, '\\\\Loris\\\\Resource\\\\GeneratedResource');\n }\n }", "title": "" }, { "docid": "005d00ef96d41698cb4bbf7d16a8458a", "score": "0.49082023", "text": "public function runGenerator()\n\t{\n\t\t$vue_root_folder\t\t= 'vue_root';\n\n\t\tif ($this->files->exists($path = $this->getVuePath('vue_root' , $this->crud_section) . '/' . $this->my_folder_name)) {\n\t\t\treturn $this->error($path . ' already exists!');\n\t\t}\n\n\t\t$this->createDirectory($path);\n\n\t\tif (!$this->files->exists($common_path = $this->getVuePath('vue_common' , $this->crud_section))) {\n\t\t\t$this->createDirectory($common_path);\n\t\t}\n\n\t\t$this->createDirectory($this->getVueTreePath($path ,'components' , $this->crud_section));\n\t\t$this->createDirectory($this->getVueTreePath($path ,'controllers' , $this->crud_section));\n\t\t$this->createDirectory($this->getVueTreePath($path ,'layouts' , $this->crud_section));\n\t\t$this->createDirectory($this->getVueTreePath($path ,'pages' , $this->crud_section));\n\n\t\t$vuex_store_path = $this->getVueTreePath($path ,'store' , $this->crud_section);\n\t\t$this->createDirectory($vuex_store_path);\n\n\t\t$bootstrap_js_path = $path . '/' . 'bootstrap.js';\n\t\t$this->files->put($bootstrap_js_path, $this->files->get(__DIR__ . '/../stubs/bootstrapjs.stub'));\n\n\t\t$routes_js_path = $path . '/' . $this->my_folder_name . 'routes.js';\n\t\t$this->files->put($routes_js_path, $this->compileRoutesJs());\n\n\t\t$app_js_path = $path . '/' . $this->my_folder_name . 'app.js';\n\t\t$this->files->put($app_js_path, $this->compileAppJs());\n\n\t\t$app_router_path = $path . '/' . $this->my_folder_name . 'router.vue';\n\t\t$this->files->put($app_router_path, $this->files->get(__DIR__ . '/../stubs/vue_base_router.stub'));\n\n\t\t$vuex_index_path = $vuex_store_path . '/index.js';\n\t\t$this->files->put($vuex_index_path, $this->files->get(__DIR__ . '/../stubs/vuex_index.stub'));\n\n\t\t$vuex_helpers_path = $vuex_store_path . '/helpers';\n\t\t$this->createDirectory($vuex_helpers_path);\n\n\t\t$vuex_crudjs_path = $vuex_helpers_path . '/crud.js';\n\t\t$this->files->put($vuex_crudjs_path, $this->files->get(__DIR__ . '/../stubs/vuex_crudjs.stub'));\n\n\t\t$vuex_modules_path = $vuex_store_path . '/modules';\n\t\t$this->createDirectory($vuex_modules_path);\n\n\t\t$vuex_apicomm_path = $vuex_modules_path . '/apicomm.js';\n\t\t$this->files->put($vuex_apicomm_path, $this->files->get(__DIR__ . '/../stubs/vuex_apicomm.stub'));\n\n\t\t$this->createDemoLayout($path);\n\t\t\n\t\t$this->info('Vue tree for ' . $this->my_folder_name . ' created successfully in ' . $path);\n\t}", "title": "" }, { "docid": "8154eaff61cfd609558f6f115065018c", "score": "0.4903259", "text": "public function actionCreate()\n {\n $path = __DIR__ . '/../scripts/create.sql';\n SQLFileExecutor::execute($path);\n \\Yii::$app->cache->flush();\n }", "title": "" }, { "docid": "a117a026baecf5d47933017e0b0bc422", "score": "0.48981532", "text": "public function setup()\n {\n CRUD::setModel(\\App\\Models\\Images::class);\n CRUD::setRoute(config('backpack.base.route_prefix') . '/images');\n CRUD::setEntityNameStrings('images', 'images');\n }", "title": "" }, { "docid": "b8742786822eb3f9e258e4134276af58", "score": "0.48898482", "text": "private function preparePath()\n\t {\n $this->script = $this->request->getScriptName();\n $this->path = ROOT .'scripts' . DS . $this->script . DS . 'controller' . DS;\n\t }", "title": "" }, { "docid": "1b019a2b2920f1777e984a7151690c2d", "score": "0.48879212", "text": "public function setUp(){\n parent::setUp();\n Artisan::call('migrate');\n Artisan::call('db:seed');\n $this->setVariables();\n }", "title": "" }, { "docid": "7362a711ca888b2a27c681024e78e688", "score": "0.48858258", "text": "public function run()\n {\n $role_admin = [\n\t\t\t\"slug\" => \"admin\",\n\t\t\t\"name\" => \"Admin\",\n\t\t\t\"permissions\" => [\n\t\t\t\"admin\" => true\n\t\t]\n\t\t];\n\tSentinel::getRoleRepository()->createModel()->fill($role_admin)->save();\n\t$adminrole = Sentinel::findRoleByName('Admin');\n\t$user_admin = [\"email\"=>\"[email protected]\", \"password\"=>\"12345678\"];\n\t$adminuser = Sentinel::registerAndActivate($user_admin);\n\t$adminuser->roles()->attach($adminrole);\n\t///// this for seed data writer\n\t$role_low = [\n\t\t\"slug\" => \"low\",\n\t\t\"name\" => \"Low\",\n\t\t\"permissions\" => [\n\t\t\"detail_user.index\" => true,\n\t\t\"detail_user.create\" => true,\n\t\t\"detail_user.store\" => true,\n\t\t\"detail_user.show\" => true,\n\t\t\"detail_user.edit\" => true,\n\t\t\"detail_user.update\" => true\n\t]\n\t];\n\tSentinel::getRoleRepository()->createModel()->fill($role_low)->save();\n\t$lowrole = Sentinel::findRoleByName('Low');\n\t$user_low = [\"email\"=>\"[email protected]\", \"password\"=>\"12345678\"];\n\t$lowuser = Sentinel::registerAndActivate($user_low);\n\t$lowuser->roles()->attach($lowrole);\n }", "title": "" }, { "docid": "4c4ba78c0d6b3d54c3444d4db3751d9c", "score": "0.48853093", "text": "public function setup()\n {\n CRUD::setModel(Test::class);\n CRUD::setRoute(config('backpack.base.route_prefix') . '/test');\n CRUD::setEntityNameStrings('test', 'tests');\n }", "title": "" }, { "docid": "da7361257647f65a76e8987f43b3cffa", "score": "0.48839867", "text": "public function up()\n {\n $filename = sfConfig::get('sf_app_dir') . '/templates/_html_head.php';\n $file = file_get_contents($filename);\n \n $search = <<<EOF\n<?php /* Load default ullright html head */ ?>\n<?php include_partial('default/html_head')?>\nEOF;\n\n $replace = <<<EOF\n<?php /* Load ullright html head statements*/ ?>\n<?php /* Located in plugins/ullCorePlugin/modules/default/templates/_ullright_html_head.php */ ?>\n<?php include_partial('default/ullright_html_head')?>\nEOF;\n\n $file = str_replace($search, $replace, $file);\n \n file_put_contents($filename, $file);\n }", "title": "" }, { "docid": "5e2d34036a91ba32fc4044bdb0ca0245", "score": "0.48825458", "text": "protected function setUp(): void\n {\n parent::setUp();\n date_default_timezone_set('America/Santo_Domingo');\n Carbon::setTestNow(Carbon::parse('17:00'));\n $this->loadLaravelMigrations();\n $this->artisan('migrate');\n\n Auth::routes();\n }", "title": "" }, { "docid": "bc0ca7e8219c5e52ee192cb3e434a279", "score": "0.4879667", "text": "protected function setUp()\n {\n parent::setUp();\n\n // override this\n Browser::$storeScreenshotsAt = __DIR__ . '/Browser/screenshots';\n Browser::$storeConsoleLogAt = __DIR__ . '/Browser/console';\n }", "title": "" }, { "docid": "d00cc4020d22a974cd66833374a3ce18", "score": "0.48689216", "text": "protected function getBasePath()\n {\n return ASSETS_PATH . '/VersionedFilesMigrationTest';\n }", "title": "" }, { "docid": "283aec9804a8bda6a78385c7b4dbede2", "score": "0.48689148", "text": "public function run()\n {\n $files = Storage::disk('local')->files('to-import/resources');\n foreach ($files as $i => $file) {\n if($file != 'to-import/resources/.DS_Store') {\n echo $file . \"\\n\";\n $this->add($file);\n }\n }\n }", "title": "" }, { "docid": "27b5e09f466cb2567054038dfa03a956", "score": "0.4866396", "text": "public function execute()\n {\n $this->createWebsiteDirectory();\n $this->createWebsiteRoot();\n $this->createDatabase();\n $this->createDrushAlias();\n }", "title": "" }, { "docid": "bb57aa6a145659a54f0176c9121f07c1", "score": "0.4863473", "text": "protected function setUp() {\n $this->session = PSessionFactory::createSession(dirname(__FILE__) . \"/pdb/Feather\", \\ParrotDb\\Core\\PSession::DB_FEATHER);\n $this->pm = $this->session->createPersistenceManager();\n \n// if (file_exists(\"pdb/Feather/Feather.pdb\")) {\n// unlink(\"pdb/Feather/Feather.pdb\");\n// }\n// \n// if (file_exists(\"pdb/Feather/Author.pdb\")) {\n// unlink(\"pdb/Feather/Author.pdb\");\n// }\n// \n// if (file_exists(\"pdb/Feather/Publication.pdb\")) {\n// unlink(\"pdb/Feather/Publication.pdb\");\n// }\n }", "title": "" }, { "docid": "3c049acec6606cdf895c8318c286c9e7", "score": "0.4862124", "text": "public function run()\n {\n Meta::create([ 'type' => 'config', 'name' => 'AccessControl', 'slug' => 'accesscontrol', 'value' => FALSE]);\n\n $this->call([\n UserTableSeeder::class,\n AboutTableSeeder::class,\n ProductTableSeeder::class,\n AdawnageSeeder::class,\n ]);\n Tag::insert([['name'=>'worship'],['name'=>'faith'],['name'=>'children']]);\n\n factory(App\\Article::class, 20)->create(); \n }", "title": "" }, { "docid": "eb2098a2de77cd66512b2f9ee20a8a8d", "score": "0.4859577", "text": "protected function setUpSite() {\n // There are errors therefore there is nothing to do here.\n }", "title": "" }, { "docid": "4a96219b63ee5607eb791cf45b16b632", "score": "0.48587617", "text": "public static function setUpTestEnvironment()\n\t{\n\t\t// Check the listener initialized the test environment\n\t\tif ( ! getenv('__MULTIKERNEL_FIXTURE_DIR')) {\n\t\t\tthrow new \\Exception(sprintf('The fixtures directory for the tests was not created. Did you forget to add the listener \"%s\" to your phpunit.xml?', TestListener::class));\n\t\t}\n\t\t\n\t\t// Set the fixtures directory for the tests\n\t\tself::$fixturesDir = getenv('__MULTIKERNEL_FIXTURE_DIR') . '/generate_app';\n\t\t\n\t\t// Adjust the autoloader psr-4 fallback dirs\n\t\t$loader = current(current(spl_autoload_functions()));\n\t\tif ($loader instanceof DebugClassLoader) {\n\t\t\t$loader = current($loader->getClassLoader());\n\t\t}\n\t\t/** @var ClassLoader $loader */\n\t\tself::writeAttribute($loader, 'fallbackDirsPsr4', array_merge(self::readAttribute($loader, 'fallbackDirsPsr4'), [\n\t\t\tself::$fixturesDir . '/src',\n\t\t]));\n\t}", "title": "" }, { "docid": "d772d92115d6fe0a9fc5795e0c06f7a1", "score": "0.48540017", "text": "protected function setUp()\n {\n $this->params['folders']['file_version'] = realpath('outsource/file_version/');\n $this->params['folders']['directory_lister'] = realpath('outsource/directory_lister/');\n $this->params['files']['files'] = 'files';\n $this->params['files']['versions'] = 'versions';\n }", "title": "" }, { "docid": "dcd835ff4f5ea0538859e9447d983048", "score": "0.4853187", "text": "public function run()\n {\n\n if (!file_exists(public_path('uploads/images'))) {\n mkdir(public_path('uploads/images'), 0777, true);\n }\n $this->call(UsersTableSeeder::class);\n $this->call(PostsTableSeeder::class);\n $this->call(PagesTableSeeder::class);\n }", "title": "" }, { "docid": "3c8b50d6576554023ec61d90a0dba3e6", "score": "0.48495522", "text": "protected function setUp(): void {\n\t\t@mkdir(TOKEN_STORAGE_PATH, 0777, true);\n\t\tforeach (new DirectoryIterator(TOKEN_STORAGE_PATH) as $fileInfo) {\n\t\t\tif ($fileInfo->isFile()) {\n\t\t\t\tunlink($fileInfo->getPathname());\n\t\t\t}\n\t\t}\n\t\t@rmdir(TOKEN_STORAGE_PATH);\n\t}", "title": "" }, { "docid": "c442fe031ec892c72450ebcf2055c30f", "score": "0.4847511", "text": "protected function setUp(): void\n {\n parent::setUp();\n\n $this->loadMigrationsFrom(__DIR__.'/../src/Database/Migrations');\n }", "title": "" }, { "docid": "7911b0e5158d63508aa358b53204fd04", "score": "0.48447493", "text": "protected static function updateBootstrapping()\n {\n copy(__DIR__.'/stubs/resources/js/app.js', resource_path('js/app.js'));\n }", "title": "" }, { "docid": "67b8cec666032c1ecfd55c80c939a0d1", "score": "0.48418298", "text": "function step1(){\n //createRegisteredUsers();\n //createUsers();\n //createAdmins();\n}", "title": "" }, { "docid": "0554252f439b3dd74195946edd36f304", "score": "0.4839113", "text": "public function setUp()\n {\n $path = (string) __DIR__ . '/Weblog';\n\n $this->ci = Instance::create($path);\n\n $this->ci->load->model('post');\n }", "title": "" }, { "docid": "9713e92df190b8852940dcb6fab35c36", "score": "0.48368806", "text": "protected function workflowInitialisation() {\n\t\t$deploymentSource = $this->replaceMarkers( $this->workflowConfiguration->getDeploymentSource() );\n\t\t$localDownloadTargetFolder = rtrim($this->replaceMarkers( '/tmp/tracker_###projectname###_###environment###_###releaseversion###' ),'/').'/';\n\t\t$this->addTask('check that we are on correct deploy node',new \\EasyDeployWorkflows\\Tasks\\Common\\CheckCorrectDeployNode());\n\n\t\t$downloadTask = new \\EasyDeployWorkflows\\Tasks\\Common\\Download();\n\t\t$downloadTask->addServerByName('localhost');\n\t\t$downloadTask->setDownloadSource( $deploymentSource );\n\t\t$downloadTask->setTargetFolder( $localDownloadTargetFolder );\n\t\t$this->addTask('Download tracker war to local delivery folder', $downloadTask);\n\n\t\t$deployWarTask = new \\EasyDeployWorkflows\\Tasks\\Servlet\\DeployWarInTomcat();\n\t\t\t//the deployment is running on localhost\n\t\t$deployWarTask->addServersByName(array('localhost'));\n\t\t\t//and deployment to the tomcat host\n\t\t$deployWarTask->setTomcatHostname( $this->workflowConfiguration->getTomcatHostname() );\n\n\t\t$deployWarTask->setWarFileSourcePath( $localDownloadTargetFolder.$this->getFilenameFromPath($deploymentSource) );\n\n\t\t$deployWarTask->setTomcatPassword( $this->workflowConfiguration->getTomcatPassword() );\n\t\t$deployWarTask->setTomcatUser( $this->workflowConfiguration->getTomcatUsername() );\n\t\t$deployWarTask->setTomcatPath( $this->workflowConfiguration->getTargetPath() );\n\t\t$deployWarTask->setTomcatPort( $this->workflowConfiguration->getTomcatPort() );\n\t\t$deployWarTask->setTomcatVersion( $this->workflowConfiguration->getTomcatVersion() );\n\n\t\t$this->addTask('deploy the war file to the tomcat servers',$deployWarTask);\n\n\t\t$deleteWarFolder = new \\EasyDeployWorkflows\\Tasks\\Common\\DeleteFolder();\n\t\t$deleteWarFolder->setFolder($localDownloadTargetFolder);\n\t\t$deleteWarFolder->addServersByName(array('localhost'));\n\n\t\t$this->addTask('removing download folder',$deleteWarFolder);\n\t}", "title": "" }, { "docid": "ebed5c3ffc0dbf578e54196d86a1f631", "score": "0.483066", "text": "protected function setUp() {\n\t\tparent::setUp();\n\t\t$this->zendLog = new Zend_Log();\n\t\t$dir = dirname(__FILE__).'/resources';\n\n\t\t@unlink($dir.'/application.log');\n\t\t@unlink($dir.'/application.log.1');\n\t\t@unlink($dir.'/application.log.2');\n\t\t@unlink($dir.'/application.log.3');\n\t\t@unlink($dir.'/application.log.4');\n\t\t@unlink($dir.'/application.log.5');\n\t\t@unlink($dir.'/application.log.6');\n\t\t@unlink($dir.'/application.log.7');\n\t}", "title": "" }, { "docid": "de2312ecf41f4d5052531d767f305989", "score": "0.48304313", "text": "public function setUp() {\n\n\t\t$this->backup = new HM_Backup();\n\t\t$this->backup->set_root( dirname( __FILE__ ) . '/test-data/' );\n\t\t$this->backup->set_path( dirname( __FILE__ ) . '/tmp' );\n\n\t\thmbkp_rmdirtree( $this->backup->get_path() );\n\t\twp_mkdir_p( dirname( __FILE__ ) . '/tmp' );\n\n\t}", "title": "" } ]
db821d694c9c0c3fa54d20d0606fafe6
Get language used fot this request. Each request needs to have its own language assigned. This function tries to find the right language by searching for supported languages matching the languages given in $_SERVER['HTTP_ACCEPT_LANGUAGE']. If no language is supported it returns $default_lang. Additionally it is possible to set the language using $_GET['lang'], which puts $_GET['lang'] in front of every other language given in $_SERVER['HTTP_ACCEPT_LANGUAGE']. This way it is possible to force the language to a particular value if neccessary.
[ { "docid": "1973bbaff90be429fd81f00ba97ddf8a", "score": "0.76397645", "text": "function request_lang()\n{\n\tglobal $default_lang, $lang_rewrite;\n\tstatic $request_lang = null;\n\tif (!is_null($request_lang)) return $request_lang;\n\t$lang = $_SERVER['HTTP_ACCEPT_LANGUAGE'];\n\t$lang = preg_split('#[,;]#', $lang);\n\t$lang = array_map('lang_normalize', $lang);\n\tif (isset($_GET['lang']))\n\t{\n\t\t$lang = array_merge(array($_GET['lang']), $lang);\n\t}\n\tforeach ($lang as $ll)\n\t{\n\t\tif (file_exists(BU_LANG_PATH . $ll) && $ll!=\"\")\n\t\t{\n\t\t\t$request_lang = $ll;\n\t\t\treturn $request_lang;\n\t\t}\n\t\tif (isset($lang_rewrite[$ll]))\n\t\t{\n\t\t\t$ll = $lang_rewrite[$ll];\n\t\t\tif (file_exists(BU_LANG_PATH . $ll) && $ll!=\"\")\n\t\t\t{\n\t\t\t\t$request_lang = $ll;\n\t\t\t\treturn $request_lang;\n\t\t\t}\n\t\t}\n\t}\n\t// Second try, use only the first two chars\n\tforeach ($lang as $ll)\n\t{\n\t\tif (strlen($ll) <= 2) continue;\n\t\t$ll = substr($ll, 0, 2);\n\t\tif (file_exists(BU_LANG_PATH . $ll))\n\t\t{\n\t\t\t$request_lang = $ll;\n\t\t\treturn $request_lang;\n\t\t}\n\t\tif (isset($lang_rewrite[$ll]))\n\t\t{\n\t\t\t$ll = $lang_rewrite[$ll];\n\t\t\tif (file_exists(BU_LANG_PATH . $ll) && $ll!=\"\")\n\t\t\t{\n\t\t\t\t$request_lang = $ll;\n\t\t\t\treturn $request_lang;\n\t\t\t}\n\t\t}\n\t}\n\t$request_lang = $default_lang;\n\treturn $request_lang;\n}", "title": "" } ]
[ { "docid": "292153059c8bf446b836500f491d8ec1", "score": "0.80979896", "text": "public function get_requested_lang() {\n\t\t/**\n\t\t * @var WPML_Language_Resolution $wpml_language_resolution\n\t\t * @var WPML_Post_Translation $wpml_post_translations\n\t\t */\n\t\tglobal $wpml_language_resolution, $wpml_post_translations;\n\n\t\t$url_lang_param = '';\n\t\tif ( isset( $_GET[ 'lang' ] ) ) {\n\t\t\t$url_lang_param = filter_var( $_GET[ 'lang' ], FILTER_SANITIZE_FULL_SPECIAL_CHARS );\n\t\t}\n\n\t\t$icl_post_language = '';\n\t\tif ( isset( $_POST[ 'icl_post_language' ] ) ) {\n\t\t\t$icl_post_language = filter_var( $_POST[ 'icl_post_language' ], FILTER_SANITIZE_FULL_SPECIAL_CHARS );\n\t\t}\n\n\t\tif ( $this->force_default() === true ) {\n\t\t\t$lang = $this->default_language;\n\t\t} elseif ( $url_lang_param\n\t\t\t\t && $wpml_language_resolution->is_language_active( $url_lang_param, true )\n\t\t) {\n\t\t\t$lang = $url_lang_param;\n\t\t} elseif ( wpml_is_ajax() ) {\n\t\t\t$lang = $this->get_ajax_request_lang();\n\t\t} elseif ( $icl_post_language\n\t\t\t\t && $wpml_language_resolution->is_language_active( $icl_post_language )\n\t\t) {\n\t\t\t$lang = $icl_post_language;\n\t\t} elseif ( isset( $_GET[ 'p' ] )\n\t\t\t\t && ( $p = (int) $_GET[ 'p' ] ) > 0\n\t\t\t\t && (bool) ( $posts_lang = $wpml_post_translations->get_element_lang_code( $p ) ) === true\n\t\t) {\n\t\t\t$lang = $posts_lang;\n\t\t} else {\n\t\t\t$lang = $this->get_cookie_lang();\n\t\t}\n\n\t\treturn $lang;\n\t}", "title": "" }, { "docid": "ecfd8928338c5377588224ff78817278", "score": "0.79549176", "text": "private function _get_language()\n\t{\n\t\t// Detect URI Lang, if cannot find, then return Locale::acceptFromHttp($_SERVER['HTTP_ACCEPT_LANGUAGE']), this require PHP 5.3.x or >\n\n\t\tpreg_match('#^/([a-z]{2}[A-Z_]{0,3})#', str_replace(dirname($_SERVER['SCRIPT_NAME']),'', $_SERVER['REQUEST_URI']), $_match);\n\t\t\n\t\tif(isset($_match[1]))\n\t\t{\n\t\t\t// if into avaliable array lang?\n\t\t\tlocale_set_default($_match[1]);\n\t\t\treturn $_match[1];\n\t\t}\t\n\t\telse\n\t\t{\n\t\t\treturn Locale::acceptFromHttp($_SERVER['HTTP_ACCEPT_LANGUAGE']);\n\t\t}\t\n\t}", "title": "" }, { "docid": "a5a2c97303d0097ae3e2d2df4c2f6204", "score": "0.77627623", "text": "function getLanguage() {\n\t\tglobal $HTTP_ACCEPT_LANGUAGE;\n\t\t$returnValue = DEFAULT_LANGUAGE;\n\t\tif(isset($HTTP_ACCEPT_LANGUAGE)) {\n\t\t\t$plng = split(',', $HTTP_ACCEPT_LANGUAGE);\n\t\t\tif(count($plng) > 0) {\n\t\t\t\twhile(list($k,$v) = each($plng)) {\n\t\t\t\t\t$k = split(';', $v, 1);\n\t\t\t\t\t$k = split('-', $k[0]);\n\n\t\t\t\t\tif($k[0] == \"de\") {\n\t\t\t\t\t\t$returnValue = \"deutsch\";\n\t\t\t\t\t} else if ($k[0] == \"en\") {\n\t\t\t\t\t\t$returnValue = \"english\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $returnValue;\n\t}", "title": "" }, { "docid": "44451053c9637126fdea1aaac45b1b25", "score": "0.7723558", "text": "protected function guessLanguage() {\n\t\tif (isset($_GET[self::GET_KEY])) {\n\t\t\tif (isset(self::$AVAILABLE_LANGUAGES[$_GET[self::GET_KEY]])) {\n\t\t\t\treturn $_GET[self::GET_KEY];\n\t\t\t}\n\t\t}\n\n\t\tif (isset($_COOKIE[self::COOKIE_KEY])) {\n\t\t\treturn $_COOKIE[self::COOKIE_KEY];\n\t\t}\n\n\t\treturn $this->getBrowserLanguage(self::$AVAILABLE_LANGUAGES);\n\t}", "title": "" }, { "docid": "66a754679b355706a6e6c9928c7b7843", "score": "0.75642586", "text": "public static function find_default()\n {\n // Load configuration\n $config = Kohana::$config->load('multilanguage');\n\n // Look for cookie language first\n if($lang = Cookie::get($config['cookie']) AND isset($config['languages'][$lang])){\n // Valid language found in cookie\n return $lang;\n }else{\n // Delete unset lang\n Cookie::delete($config['cookie']);\n }\n\n // Parse HTTP Accept-Language headers\n if($config['detect_accepted_lang']){\n foreach(Request::accept_lang() as $lang => $quality){\n // Return the first language found (the language with the highest quality)\n if(isset($config['languages'][$lang])){\n return $lang;\n }\n }\n }\n\n // Return the hard-coded default language as final fallback\n return $config['default'];\n }", "title": "" }, { "docid": "b7fb2871d03355814b264897a22955f6", "score": "0.75009966", "text": "function get_lang() {\n\t$lang = null;\n\n\tif(isset($_GET[\"lang\"])) {\n\t\tswitch($_GET[\"lang\"]) {\n\t\t\tcase 'cn': $glang = 'zh'; break;\n\t\t\tcase 'cz': $glang = 'cs'; break;\n\t\t\tcase 'dk': $glang = 'da'; break;\n\t\t\tcase 'se': $glang = 'sv'; break;\n\t\t\tdefault: $glang = $_GET[\"lang\"]; break;\n\t\t}\n\t\tif((strlen($glang) == 2 || strlen($glang) == 5) && (file_exists(\"./lang/$glang.txt\"))) {\n\t\t\t$lang = $glang;\n\t\t}\n\t}\n\n\tif(is_null($lang) && isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {\n\t\t$al = $_SERVER['HTTP_ACCEPT_LANGUAGE'];\n\t\t$options = explode(',', str_replace(';', ',', $al));\n\t\tforeach($options as $option) {\n\t\t\tif(file_exists(\"./lang/$option.txt\")) {\n\t\t\t\t$lang = $option;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif(is_null($lang)) {\n\t\t$lang = \"en\";\n\t}\n\n\treturn $lang;\n}", "title": "" }, { "docid": "29c669953dfc2dcb3e26bb97241cfea8", "score": "0.7469549", "text": "private function determineLanguage(\\nre\\core\\Request $request)\n {\n // Get supported languages\n $supportedLanguages = \\nre\\configs\\AppConfig::$app['languages'];\n if(empty($supportedLanguages)) {\n return null;\n }\n\n // Get requested language\n $language = $request->getGetParam('lang', 'language');\n if(!is_null($language) && array_key_exists($language, $supportedLanguages)) {\n return $supportedLanguages[$language];\n }\n\n // Negotiate language\n return $this->negotiateLanguage($supportedLanguages, $request->getBrowserLanguages());\n }", "title": "" }, { "docid": "07800a8e54ec2355ed8125d24a015b6d", "score": "0.73867434", "text": "function negotiate_language() { \n\tglobal $LANG;\n global $default_language;\n global $supported_languages;\n\n\t$LANG = '';\n\n\tif (!empty($_REQUEST['lang'])) {\n\t\t$LANG = $_REQUEST['lang'];\n\t}\n else if (!empty($_COOKIE[LANG_COOKIE])) {\n $LANG= $_COOKIE[LANG_COOKIE];\n }\n\n\n /* If the client has sent an Accept-Language: header, \n * see if it is for a language we support. \n */ \n else if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { \n $accepted = explode( \",\", $_SERVER['HTTP_ACCEPT_LANGUAGE']); \n for ($i = 0; $i < count($accepted); $i++) { \n \t\t$LANG = $accepted[$i];\n \t\t$LANG = substr($LANG,0,2);\n } \n } \n\n\n /* One last desperate try: check for a valid language code in the \n * top-level domain of the client's source address. \n */ \n else if (preg_match('/\\\\.[^\\\\.]+$/', $_SERVER['REMOTE_HOST'], $arr)) { \n $LANG = strtolower($arr[1]); \n } \n\n\t$LANG = (!empty($supported_languages[$LANG]))?$LANG:$default_language;\n\tif (!empty($_REQUEST['lang']) || empty($_COOKIE[LANG_COOKIE])) {\n\t\tsetcookie(LANG_COOKIE, $LANG, time()+3600*24*365*5); /* expire dans 5 ans */\n\t}\n\n\n return $supported_languages[$LANG]; \n}", "title": "" }, { "docid": "ba1e8de212dd0e49bfc82104ae920b8c", "score": "0.7234939", "text": "public function getUserLocale() {\n\n \t// Default language is set\n \t$s_language = $this->am_localeConf['default'];\n\n \t// Are we receiving a preference\n \t$s_accepted = strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']);\n\n \tif (array_key_exists(substr($s_accepted, -2), $this->am_localeConf['available'])) {\n\n \t\t// Is there a specific country version available (IE US)?\n \t\t$s_language = $this->am_localeConf['available'][substr($s_accepted, -2)];\n\n \t} else {\n\n \t\t// Is there a generic language version available (IE en)?\n \t\t$s_userLocale = substr($s_accepted,0,2);\n\n \t\tif (array_key_exists($s_userLocale, $this->am_localeConf['available'])) {\n \t\t\t$s_language = $s_userLocale;\n \t\t}\n \t}\n\n \treturn $s_language;\n\n }", "title": "" }, { "docid": "4683d7a1c888625e6bb5f9fb03794ad2", "score": "0.7232981", "text": "function getCurrentLanguage() {\n $currentLanguage = getSetting('language_default');\n if (isset($_REQUEST['language'])) {\n $requestedLanguage = (string)escape($_REQUEST['language']);\n $definedLanguages = getSetting('languages');\n foreach ($definedLanguages as $id => $datas) {\n if ($definedLanguages[$id]['query'] == $requestedLanguage) {\n $currentLanguage = $requestedLanguage;\n }\n }\n }\n return $currentLanguage;\n}", "title": "" }, { "docid": "b60f2c042757a91d3ccdfb5dca9d715c", "score": "0.72190505", "text": "public static function prefered_language($available_languages, $default_lang = \"auto\", $http_accept_language = \"auto\") {\n // if $http_accept_language was left out, read it from the HTTP-Header\n if ($http_accept_language == \"auto\")\n $http_accept_language = $_SERVER['HTTP_ACCEPT_LANGUAGE'];\n\n // standard for HTTP_ACCEPT_LANGUAGE is defined under\n // http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4\n // pattern to find is therefore something like this:\n // 1#( language-range [ \";\" \"q\" \"=\" qvalue ] )\n // where:\n // language-range = ( ( 1*8ALPHA *( \"-\" 1*8ALPHA ) ) | \"*\" )\n // qvalue = ( \"0\" [ \".\" 0*3DIGIT ] )\n // | ( \"1\" [ \".\" 0*3(\"0\") ] )\n preg_match_all(\"/([[:alpha:]]{1,8})(-([[:alpha:]|-]{1,8}))?\" .\n \"(\\s*;\\s*q\\s*=\\s*(1\\.0{0,3}|0\\.\\d{0,3}))?\\s*(,|$)/i\", $http_accept_language, $hits, PREG_SET_ORDER);\n\n // default language (in case of no hits) is the first in the array\n if ($default_lang == 'auto')\n $bestlang = $available_languages[0];\n else\n $bestlang = $default_lang;\n $bestqval = 0;\n\n foreach ($hits as $arr) {\n // read data from the array of this hit\n $langprefix = strtolower($arr[1]);\n if (!empty($arr[3])) {\n $langrange = strtolower($arr[3]);\n $language = $langprefix . \"-\" . $langrange;\n } else\n $language = $langprefix;\n $qvalue = 1.0;\n if (!empty($arr[5]))\n $qvalue = floatval($arr[5]);\n\n // find q-maximal language\n if (in_array($language, $available_languages) && ($qvalue > $bestqval)) {\n $bestlang = $language;\n $bestqval = $qvalue;\n }\n // if no direct hit, try the prefix only but decrease q-value by 10% (as http_negotiate_language does)\n else if (in_array($langprefix, $available_languages) && (($qvalue * 0.9) > $bestqval)) { // CHECK!\n $bestlang = $langprefix;\n $bestqval = $qvalue * 0.9;\n }\n }\n return $bestlang;\n }", "title": "" }, { "docid": "ec74a65f98ee503bfead8c65f809504d", "score": "0.71681875", "text": "private function getLanguage()\n {\n if(!Yii::$app->user->isGuest) {\n return Yii::$app->user->identity->language_id;\n } else {\n if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {\n $langFound = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);\n if (in_array($langFound, ['ca', 'es', 'en'])) {\n return $langFound;\n }\n }\n return Language::LANG_EN;\n }\n }", "title": "" }, { "docid": "7146546da2b452a455cf465bfa7ac407", "score": "0.71276385", "text": "function i18n_get_language(){\n\t$browser_lang = Request::isset_or($_SERVER['HTTP_ACCEPT_LANGUAGE'],'en');\n\t$lang_variable = substr($browser_lang, 0, 2);\n\tif (empty($lang_variable))\n\t\t$lang_variable = 'en'; \n\treturn $lang_variable;\n}", "title": "" }, { "docid": "2f3fd0abd1e143b946892acee9a3398f", "score": "0.709915", "text": "public static function detect()\n\t{\n\t\t// Get all languages from data base\n\t\t$all = self::getAllByPriority();\n\t\tif( ! $all->count())\n\t\t\treturn new Language;\n\n\t\t// Try with previous value from session\n\t\tif(Session::has('language'))\n\t\t{\n\t\t\t$lang = Session::get('language');\n\t\t\tif(isset($lang->id) and $all->contains($lang->id))\n\t\t\t{\n\t\t\t\t$lang = $all->find($lang->id);\n\t\t\t\t$lang->detectedFrom = 'session';\n\n\t\t\t\treturn $lang;\n\t\t\t}\n\t\t}\n\n\t\t// Extract subdomain from url\n\t\t$url = Request::url();\n\t\tpreg_match('/^([a-z][a-z])\\./', parse_url($url)['host'], $matches);\n\n\t\t// If subdomain found check if it's valid\n\t\tif(isset($matches[1]) and ! is_null($lang = self::findByLocaleOrCode($matches[1], $all)))\n\t\t{\n\t\t\t$lang->detectedFrom = 'subdomain';\n\n\t\t\treturn $lang;\n\t\t}\n\n\t\t// No luck so far, prepare a default to fallback.\n\t\t$default = $all->first();\n\n\t\t// Try with the browser\n\t\tif( ! isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) or $_SERVER['HTTP_ACCEPT_LANGUAGE'] == '')\n\t\t{\n\t\t\t$default->detectedFrom = 'default (browser languages not available)';\n\n\t\t\treturn $default;\n\t\t}\n\n\t\t$browser_languages = explode(',', preg_replace('/(;q=[0-9\\.]+)/i', '', strtolower(trim($_SERVER['HTTP_ACCEPT_LANGUAGE']))));\n\t\tforeach($browser_languages as $lang)\n\t\t{\n\t\t\t$lang = self::findByLocaleOrCode($lang, $all);\n\t\t\tif( ! is_null($lang))\n\t\t\t{\n\t\t\t\t$lang->detectedFrom = 'browser';\n\n\t\t\t\treturn $lang;\n\t\t\t}\n\t\t}\n\n\t\t// Fallback to default\n\t\t$default->detectedFrom = \"default (browser doesn't have any known language)\";\n\n\t\treturn $default;\n\t}", "title": "" }, { "docid": "08c78425a4e837c4a1ef480d4ba3790c", "score": "0.696088", "text": "public function findLanguage($app = null) {\n\t\t$forceLang = $this->config->getSystemValue('force_language', false);\n\t\tif (is_string($forceLang)) {\n\t\t\t$this->requestLanguage = $forceLang;\n\t\t}\n\n\t\tif ($this->requestLanguage !== '' && $this->languageExists($app, $this->requestLanguage)) {\n\t\t\treturn $this->requestLanguage;\n\t\t}\n\n\t\t/**\n\t\t * At this point Nextcloud might not yet be installed and thus the lookup\n\t\t * in the preferences table might fail. For this reason we need to check\n\t\t * whether the instance has already been installed\n\t\t *\n\t\t * @link https://github.com/owncloud/core/issues/21955\n\t\t */\n\t\tif ($this->config->getSystemValue('installed', false)) {\n\t\t\t$userId = !is_null($this->userSession->getUser()) ? $this->userSession->getUser()->getUID() : null;\n\t\t\tif (!is_null($userId)) {\n\t\t\t\t$userLang = $this->config->getUserValue($userId, 'core', 'lang', null);\n\t\t\t} else {\n\t\t\t\t$userLang = null;\n\t\t\t}\n\t\t} else {\n\t\t\t$userId = null;\n\t\t\t$userLang = null;\n\t\t}\n\n\t\tif ($userLang) {\n\t\t\t$this->requestLanguage = $userLang;\n\t\t\tif ($this->languageExists($app, $userLang)) {\n\t\t\t\treturn $userLang;\n\t\t\t}\n\t\t}\n\n\t\ttry {\n\t\t\t// Try to get the language from the Request\n\t\t\t$lang = $this->getLanguageFromRequest($app);\n\t\t\tif ($userId !== null && $app === null && !$userLang) {\n\t\t\t\t$this->config->setUserValue($userId, 'core', 'lang', $lang);\n\t\t\t}\n\t\t\treturn $lang;\n\t\t} catch (LanguageNotFoundException $e) {\n\t\t\t// Finding language from request failed fall back to default language\n\t\t\t$defaultLanguage = $this->config->getSystemValue('default_language', false);\n\t\t\tif ($defaultLanguage !== false && $this->languageExists($app, $defaultLanguage)) {\n\t\t\t\treturn $defaultLanguage;\n\t\t\t}\n\t\t}\n\n\t\t// We could not find any language so fall back to english\n\t\treturn 'en';\n\t}", "title": "" }, { "docid": "87e030a575c8ca7981881ee158bad16a", "score": "0.69512284", "text": "public static function getUserLang()\n {\n if (isset($_SESSION['language'])) {\n return $_SESSION['language'];\n } else {\n return substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);\n }\n }", "title": "" }, { "docid": "7efefe53164c1e57191dae4fb7570529", "score": "0.6934446", "text": "public static function detect() {\n // Is there any way to force Zend_Locale('browser') to return a list of locales, as they are proposed in raw HTTP header?\n // Then we could use Zend_Locale instead of processing raw HTTP header in non-ZF style\n $httpAcceptLanguage = (isset($_SERVER['HTTP_ACCEPT_LANGUAGE']))? $_SERVER['HTTP_ACCEPT_LANGUAGE']: '';\n if (($semicolonPos = strpos($httpAcceptLanguage, ';')) !== false) {\n // Extraction: pl,en-us;q=0.7,en;q=0.3 -> pl,en-us\n $httpAcceptLanguage = substr($httpAcceptLanguage, 0, $semicolonPos);\n }\n\n $acceptedLanguages = array();\n foreach (explode(',', $httpAcceptLanguage) as $rawChunk) {\n // converting: en-us -> en_US\n $subChunks = explode('-', $rawChunk);\n if (isset($subChunks[1])) {\n $subChunks[1] = strtoupper($subChunks[1]);\n }\n $acceptedLanguages[] = implode('_', $subChunks);\n }\n\n if(count($acceptedLanguages) == 0) {\n return null;\n }\n \n // Looking for best matching locale and returning it\n foreach (array_keys(self::$locales) as $lc) {\n foreach ($acceptedLanguages as $lang) {\n // de_DE vs. de_DE, pl vs. pl_PL\n if (strpos($lc, $lang) === 0) {\n // we've got the goal\n return $lc;\n }\n }\n }\n\n // Nothing matches if we are here - locale won't be overriden\n return null;\n }", "title": "" }, { "docid": "03abebced1fcd64928838a8690419625", "score": "0.6912064", "text": "public function getLang()\n {\n return $this->request_lang;\n }", "title": "" }, { "docid": "f0e42d1037e292535954ccabc4ed1341", "score": "0.6787826", "text": "public function getPreferredLanguage();", "title": "" }, { "docid": "a7a5a14a7e8b6fc0cc3798e01e1c1c01", "score": "0.6780159", "text": "function get_browser_language( $available, $default = 'es' ) {\n if ( isset( $_SERVER[ 'HTTP_ACCEPT_LANGUAGE' ] ) ) {\n $langs = explode( ',', $_SERVER['HTTP_ACCEPT_LANGUAGE'] );\n \n foreach ( $langs as $lang ){\n $lang = substr( $lang, 0, 2 );\n if( in_array( $lang, $available ) ) {\n return $lang;\n }\n }\n }\n return $default;\n}", "title": "" }, { "docid": "ea83c8968ef67a2e0c114309f61e4053", "score": "0.67576575", "text": "public function getRequestLanguage()\n {\n return $this->app->language;\n }", "title": "" }, { "docid": "174b1991528035a90395cd884491c61b", "score": "0.66841745", "text": "protected function vLoadLanguage()\n\t{\t\n\t\t//Asking for a language change?\n\t\tif( isset($_GET[\"newlang\"]) == true )\n\t\t{\n\t\t\t// Yes, is it a valid language?\t\t\n\t\t\tif( $this->vValidateLang($_GET[\"newlang\"]) == true )\n\t\t\t{\n\t\t\t\t// Yes, save it and go back to the previous page or the homepage\n\t\t\t\t$this->setCurrentLanguage($_GET[\"newlang\"]);\n\t\t\t\t\n\t\t\t\t// Previous page in memory and valid?\n\t\t\t\tif( isset($_SERVER[\"HTTP_REFERER\"]) == true && strrpos($_SERVER[\"HTTP_REFERER\"], SITE_URL) != false )\n\t\t\t\t{\n\t\t\t\t\t// Yes, go to it\n\t\t\t\t\t$this->vChangePage($_SERVER[\"HTTP_REFERER\"]);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// No, go to the homepage\n\t\t\t\t\t$this->vChangePage(SITE_URL);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Defined in a cookie?\n\t\telseif( isset($_COOKIE[\"language\"]) == true )\n\t\t{\t\t\t\n\t\t\t// Yes, is it a valid language?\t\n\t\t\tif( $this->vValidateLang($_COOKIE[\"language\"]) == true )\n\t\t\t{\n\t\t\t\t//Yes, save it and update the cookie expiration date to 1 year later.\n\t\t\t\t$this->setCurrentLanguage($_COOKIE[\"language\"]);\n\t\t\t}\n\t\t}\n\t\t//Defined in a session var?\n\t\telseif( isset($_SESSION[\"language\"]) == true )\n\t\t{\n\t\t\t// Yes, is it a valid language?\t\n\t\t\tif( $this->vValidateLang($_SESSION[\"language\"]) == true )\n\t\t\t{\n\t\t\t\t// Yes, save it.\n\t\t\t\t$this->setCurrentLanguage($_SESSION[\"language\"]);\n\t\t\t}\n\t\t}\n\t\t// Undefined\n\t\telse\n\t\t{\n\t\t\t// Get languages preferences from the user's browser\n\t\t\t\n\t\t\t$iMatchingLanguages = 0; //Will store how many valid languages found\n\t\t\t\n\t\t\t\n\t\t\tif( isset($_SERVER[\"HTTP_ACCEPT_LANGUAGE\"]) == true )\n\t\t\t{\n\t\t\t\t$aBrowserLanguages = explode(\",\", $_SERVER[\"HTTP_ACCEPT_LANGUAGE\"]);\n\t\t\t\t\n\t\t\t\t// Go through each one of the languages to find the first one that is valid\n\t\t\t\tforeach( $aBrowserLanguages as $aBrowserLanguagesValue ) \n\t\t\t\t{\n\t\t\t\t\t$sStrippedLanguageValue = strtolower( substr( chop( $aBrowserLanguagesValue ), 0, 2 ) );\n\t\t\t\t\t\n\t\t\t\t\t// Is it a valid language?\t\n\t\t\t\t\tif( $this->vValidateLang($sStrippedLanguageValue) == true )\n\t\t\t\t\t{\n\t\t\t\t\t\t// Yes, save it.\n\t\t\t\t\t\t$this->setCurrentLanguage($sStrippedLanguageValue);\n\t\t\t\t\t\t$iMatchingLanguages++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Check if a language has finally been found or not\n\t\t\tif( $iMatchingLanguages == 0 )\n\t\t\t{\n\t\t\t\t// No language found, use the default language from the config file, is it a valid language?\t\n\t\t\t\tif( $this->vValidateLang($this->aConfig[\"lang_default\"]) == true )\n\t\t\t\t{\n\t\t\t\t\t// Yes, save it.\n\t\t\t\t\t$this->setCurrentLanguage($this->aConfig[\"lang_default\"]);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// No, we ran out of languages to show, kill the site with a fatal error.\n\t\t\t\t\tdie(\"We found out that /lang/\" . $this->aConfig[\"lang_default\"] . \".lang.php was inexistant or invalid.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Include the language file\n\t\trequire_once(ROOT_DIR . \"/lang/\" . $this->sCurrentLanguage . \".lang.php\");\n\t\t$this->aLanguageStrings = $aLangStrings;\n\t}", "title": "" }, { "docid": "cf1856db28c988d444ca7c63cdf1a2c6", "score": "0.66619116", "text": "private function processLanguage()\n {\n $appConfig = ConfigReader::getReader('app');\n $lang = $this->getRouteParam('lang');\n\n // Redirect to the default language if not set\n if (empty($lang)) {\n throw new RedirectionException($appConfig->get('languages.default'), 303);\n }\n\n // Make sure the selected language is supported\n if (!in_array($lang, $appConfig->get('languages.supported'))) {\n throw new BadRequestException('Selected language not supported');\n }\n\n return $lang;\n }", "title": "" }, { "docid": "824c8bbef84839c6aec4750c307e765d", "score": "0.6643955", "text": "public function initLanguage()\n {\n $language = Yii::$app->request->get($this->languageParam);\n if ($language) {\n if (isset($this->languages[$language])) {\n $language = $this->languages[$language];\n }\n if ($this->_isValidLanguage($language)) {\n return $this->saveLanguage($language);\n } elseif (!Yii::$app->request->isAjax) {\n return $this->_redirect();\n }\n } elseif (Yii::$app->request->cookies->has($this->cookieName)) {\n if ($this->_isValidLanguage(Yii::$app->request->cookies->getValue($this->cookieName))) {\n // Yii::$app->language = Yii::$app->request->cookies->getValue($this->cookieName);\n $this->applyLanguage(Yii::$app->request->cookies->getValue($this->cookieName));\n return;\n } else {\n Yii::$app->response->cookies->remove($this->cookieName);\n }\n }\n $this->detectLanguage();\n }", "title": "" }, { "docid": "99cf041f8b321a06cf438d7443a29f27", "score": "0.66300595", "text": "public function getLocale(LocaleManager $manager) {\n $request = $this->getRequest();\n if (!$request) {\n if ($this->log) {\n $this->log->logDebug('Can\\'t determine locale because there is no request', null, self::LOG_SOURCE);\n }\n\n return null;\n }\n\n if ($request instanceof MvcRequest) {\n $path = $request->getBasePath();\n } else {\n $path = $request->getPath();\n }\n\n $fallbackLanguages = array();\n\n $acceptedLanguages = $request->getAcceptLanguage();\n foreach ($acceptedLanguages as $acceptedLanguage => $null) {\n if (strpos($acceptedLanguage, self::SEPARATOR_TERRITORY) === false) {\n $locale = strtolower($acceptedLanguage);\n } else {\n list($language, $territory) = explode(self::SEPARATOR_TERRITORY, $acceptedLanguage);\n $language = strtolower($language);\n $locale = $language . '_' . strtoupper($territory);\n\n $fallbackLanguages[$language] = true;\n }\n\n if (isset($this->disabledLocales[$locale]) && (!$this->ignoreDisabledLocales || ($this->ignoreDisabledLocales && !StringHelper::startsWith($path, array_keys($this->ignoreDisabledLocales))))) {\n if ($this->log) {\n $this->log->logDebug('Could not use locale from Accept-Language header', $locale . ' is disabled', self::LOG_SOURCE);\n }\n\n continue;\n }\n\n if ($manager->hasLocale($locale)) {\n if ($this->log) {\n $this->log->logDebug('Loaded locale from Accept-Language header', $locale, self::LOG_SOURCE);\n }\n\n return $manager->getLocale($locale);\n }\n }\n\n foreach ($fallbackLanguages as $locale => $null) {\n if (!isset($this->disabledLocales[$locale]) && $manager->hasLocale($locale)) {\n if ($this->log) {\n $this->log->logDebug('Loaded locale from Accept-Language header (fallback)', $locale, self::LOG_SOURCE);\n }\n\n return $manager->getLocale($locale);\n }\n }\n\n if ($this->log) {\n $this->log->logDebug('No available locale in Accept-Language header', null, self::LOG_SOURCE);\n }\n\n return null;\n }", "title": "" }, { "docid": "c6aaa7e1c65fc18c9cf7074b36b7243c", "score": "0.66234", "text": "public function getLanguageFromBrowser($allowed_languages, $default_language, $lang_variable = null, $strict_mode = true) {\n \t// $_SERVER['HTTP_ACCEPT_LANGUAGE'] verwenden, wenn keine Sprachvariable mitgegeben wurde\n \tif ($lang_variable === null) {\n \t\t$lang_variable = $_SERVER['HTTP_ACCEPT_LANGUAGE'];\n \t}\n \t// wurde irgendwelche Information mitgeschickt?\n \tif (empty($lang_variable)) {\n \t\t// Nein? => Standardsprache zurueckgeben\n \t\treturn $default_language;\n \t}\n \t// Den Header auftrennen\n \t$accepted_languages = preg_split('/,\\s*/', $lang_variable);\n \t// Die Standardwerte einstellen\n \t$current_lang = $default_language;\n \t$current_q = 0;\n \t// Nun alle mitgegebenen Sprachen abarbeiten\n \tforeach ($accepted_languages as $accepted_language) {\n \t\t// Alle Infos ueber diese Sprache rausholen\n \t\t$res = preg_match ('/^([a-z]{1,8}(?:-[a-z]{1,8})*)'.\n \t\t\t\t'(?:;\\s*q=(0(?:\\.[0-9]{1,3})?|1(?:\\.0{1,3})?))?$/i', $accepted_language, $matches);\n \t\t// war die Syntax gueltig?\n \t\tif (!$res) {\n \t\t\t// Nein? Dann ignorieren\n \t\t\tcontinue;\n \t\t}\n \t\t// Sprachcode holen und dann sofort in die Einzelteile trennen\n \t\t$lang_code = explode ('-', $matches[1]);\n \t\t// Wurde eine Qualitaet mitgegeben?\n \t\tif (isset($matches[2])) {\n \t\t\t// die Qualitaet benutzen\n \t\t\t$lang_quality = (float)$matches[2];\n \t\t} else {\n \t\t\t// Kompabilitaetsmodus: Qualitaet 1 annehmen\n \t\t\t$lang_quality = 1.0;\n \t\t}\n \t\t// Bis der Sprachcode leer ist...\n \t\twhile (count ($lang_code)) {\n \t\t\t// mal sehen, ob der Sprachcode angeboten wird\n \t\t\tif (in_array (strtolower (join ('-', $lang_code)), $allowed_languages)) {\n \t\t\t\t// Qualitaet anschauen\n \t\t\t\tif ($lang_quality > $current_q) {\n \t\t\t\t\t// diese Sprache verwenden\n \t\t\t\t\t$current_lang = strtolower (join ('-', $lang_code));\n \t\t\t\t\t$current_q = $lang_quality;\n \t\t\t\t\t// Hier die innere while-Schleife verlassen\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t}\n \t\t\t// Wenn wir im strengen Modus sind, die Sprache nicht versuchen zu minimalisieren\n \t\t\tif ($strict_mode) {\n \t\t\t\t// innere While-Schleife aufbrechen\n \t\t\t\tbreak;\n \t\t\t}\n \t\t\t// den rechtesten Teil des Sprachcodes abschneiden\n \t\t\tarray_pop ($lang_code);\n \t\t}\n \t}\n \t// die gefundene Sprache zurueckgeben\n \treturn $current_lang;\n }", "title": "" }, { "docid": "d2c6687e56ebd429c4029e1d98c71243", "score": "0.6601028", "text": "static function choose_site_lang($langsAvailable = null) {\n\t\t$siteMode = Director::get_site_mode(); // either 'cms' or 'site'\n\n\t\tif(isset($_GET['lang']) && (!isset($langsAvailable) || in_array($_GET['lang'], $langsAvailable))) {\n\t\t\t// get from GET parameter\n\t\t\tself::set_reading_lang($_GET['lang']);\n\t\t} elseif(isset($_COOKIE['lang.' . $siteMode]) && $siteMode && (!isset($langsAvailable) || in_array($_COOKIE['lang.' . $siteMode], $langsAvailable))) {\n\t\t\t// get from namespaced cookie\n\t\t\tself::set_reading_lang($_COOKIE[$siteMode . '.lang']);\n\t\t} elseif(isset($_COOKIE['lang']) && (!isset($langsAvailable) || in_array($_COOKIE['lang'], $langsAvailable))) {\n\t\t\t// get from generic cookie\n\t\t\tself::set_reading_lang($_COOKIE['lang']);\n\t\t} else if(Session::get('lang.' . $siteMode) && (!isset($langsAvailable) || in_array(Session::get('lang.' . $siteMode), $langsAvailable))) {\n\t\t\t// get from namespaced session ('cms' or 'site') \n\t\t\tself::set_reading_lang(Session::get('lang.' . $siteMode));\n\t\t} else if(Session::get('lang.global') && (!isset($langsAvailable) || in_array(Session::get('lang.global'), $langsAvailable))) {\n\t\t\t// get from global session \n\t\t\tself::set_reading_lang(Session::get('lang.global'));\n\t\t} else {\n\t\t\t// get default lang stored in class\n\t\t\tself::set_reading_lang(self::default_lang());\n\t\t}\n\t\t\n\t\treturn self::$reading_lang; \n\t}", "title": "" }, { "docid": "52d3b052f71a5c3bd91f71cd15ea3979", "score": "0.65558034", "text": "public static function getDisplayLanguage() {\r\n\t\ttry {\r\n\t\t\tif (strlen(self::$displayLanguage) > 0) {\r\n\t\t\t\treturn self::$displayLanguage;\r\n\t\t\t}\r\n\t\t\t$defaultLang\t= LBoxConfigSystem::getInstance()->getParamByPath(\"multilang/default_language\");\r\n\t\t\t// check domain or return default\r\n\t\t\ttry {\r\n\t\t\t\t$host\t= str_replace(\".localhost\", \"\", LBOX_REQUEST_URL_HOST);\r\n\t\t\t\t$host\t= str_replace(\"www.\", \"\", $host);\r\n\t\t\t\tif (strlen($lang = LBoxConfigManagerLangdomains::getInstance()->getLangByDomain($host)) > 0) {\r\n\t\t\t\t\tself::$displayLanguage = $lang;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tself::$displayLanguage = $defaultLang;\r\n\t\t\t\t}\r\n if (LBoxConfigManagerFront::gpcn('langchoose') == 'cookie') {\r\n $cookies = self::getDataCookies();\r\n if (strlen($cookies['lbox']['front']['lng']) > 0) {\r\n self::$displayLanguage = $cookies['lbox']['front']['lng'];\r\n }\r\n if (strlen($_SESSION['lbox']['front']['lng']) > 0) {\r\n self::$displayLanguage = $_SESSION['lbox']['front']['lng'];\r\n }\r\n }\r\n\t\t\t}\r\n\t\t\tcatch(LBoxExceptionConfig $e) {\r\n\t\t\t\tif ($e->getCode() == LBoxExceptionConfig::CODE_TYPE_NOT_FOUND) {\r\n\t\t\t\t\tself::$displayLanguage = $defaultLang;\r\n\t\t\t\t}\r\n\t\t\t}\r\n return self::$displayLanguage;\r\n\t\t}\r\n\t\tcatch (Exception $e) {\r\n\t\t\tthrow $e;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "4cc2b0bbcdf55f3dac6aa4539dc19b11", "score": "0.6552125", "text": "function detectLanguage() \r\n\t{\r\n\t\t$language = false;\r\n\t\t// obtain language code from URI segment if available\r\n\t\t$langu = $this->_uri_lang_detect();\r\n\t\r\n\t\t\r\n\t\tif ($langu !== false)\r\n\t\t{\r\n\t\t\t// check the URI's language code\r\n\t\t\t$language = $this->_checkLang($langu);\r\n\t\t\tif ($language !== false)\r\n\t\t\t{\r\n\t\t\t\t$lang = $langu;\r\n\t\t\t\t//log_message('debug', __CLASS__.\".detectLanguage(): Use URI segment language: $langu ($language)\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t// if a language cookie available get its sanitized info\r\n\t\t$langc = $this->obj->input->cookie($this->obj->config->item('cookie_prefix').$this->obj->config->item('lang_cookie_name'), true);\r\n\t\tif ($langc !== false)\r\n\t\t{\r\n\t\t\tif (($language !== false) && ($langu !== $langc))\r\n\t\t\t{\r\n\t\t\t\t// URI has valid language but cookie has wrong language:\r\n\t\t\t\t// update cookie\r\n\t\t\t\t$this->_set_lang_cookie($langu);\r\n\t\t\t}\r\n\t\t\tif ($language === false)\r\n\t\t\t{\r\n\t\t\t\t// invalid or no URI language code: check the cookie's language\r\n\t\t\t\t$language = $this->_checkLang($langc);\r\n\t\t\t\tif ($language !== false)\r\n\t\t\t\t{\r\n\t\t\t\t\t $lang = $langc;\r\n\t\t\t\t\t//log_message('debug', __CLASS__.\".detectLanguage(): Use cookie language: $langc ($language)\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($language === false)\r\n\t\t{\r\n\t\t\t// no cookie/URI language code: check browser's languages\r\n\t\t\t$accept_langs = $this->obj->input->server('HTTP_ACCEPT_LANGUAGE');\r\n\t\t\tif ($accept_langs !== false)\r\n\t\t\t{\r\n\t\t\t\t//explode languages into array\r\n\t\t\t\t$accept_langs = strtolower($accept_langs);\r\n\t\t\t\t$accept_langs = explode(\",\", $accept_langs);\r\n\t\t\t\t//log_message('debug', __CLASS__.\".detectLanguage(): browser languages: \".print_r($accept_langs, true));\r\n\t\t\t\t// check all of them\r\n\t\t\t\tforeach ($accept_langs as $lang)\r\n\t\t\t\t{\r\n\t\t\t\t\t//log_message('debug', __CLASS__.\".detectLanguage(): Check lang: $lang\");\r\n\t\t\t\t\t// remove all after ';'\r\n\t\t\t\t\t$pos = strpos($lang,';');\r\n\t\t\t\t\tif ($pos !== false)\r\n\t\t\t\t\t{ $lang = substr($lang,0,$pos); }\r\n\t\t\t\t\t// get CI language directory\r\n\t\t\t\t\t$language = $this->_checkLang($lang);\r\n\t\t\t\t\t// finish search if we support that language\r\n\t\t\t\t\tif ($language !== false)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// set cookie\r\n\t\t\t\t\t\t$this->_set_lang_cookie($lang);\r\n\t\t\t\t\t\t//log_message('debug', __CLASS__.\".detectLanguage(): Use browser language: $lang ($language)\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif ($language === false)\r\n\t\t{\r\n\t\t\t// no base language available or no browser language match: use default\r\n\t\t\t$lang = $this->obj->config->item('lang_default');\r\n\t\t\t// XXX Of course the default language has to be supported!\r\n\t\t\t$language = $this->lang_avail[$lang];\r\n\t\t\t// set cookie\r\n\t\t\t$this->_set_lang_cookie($lang);\r\n\t\t\t//log_message('debug', __CLASS__.\".detectLanguage(): Use default language: $lang ($language)\");\r\n\t\t}\r\n\t\t\r\n\t\t// set the configuration for the CI_Language class\r\n\t\t$this->obj->config->set_item('language', $language);\r\n\t\t// store the language code too\r\n\t\t$this->obj->config->set_item('lang_selected', $lang);\r\n\t\t\r\n\t\t//Nimmitha Vidyathilaka - added august 20, 2012\r\n\t\t$lang_avail = $this->obj->config->item('lang_avail');\r\n\t\t$this->obj->config->set_item('language', $lang_avail[$lang]); \r\n\t\t$this->obj->config->set_item('lang_selected', $lang); \r\n\t\t\r\n\t\r\n\t\t//log_message('debug', __CLASS__.\".detectLanguage(): Use language: $lang ($language)\");\r\n\t\treturn $language;\r\n\t}", "title": "" }, { "docid": "a47a171e0f20a3dabdfb3658c1eea251", "score": "0.65431976", "text": "static function locale_from_http_request() {\n $http_accept_language = Input::instance()->server(\"HTTP_ACCEPT_LANGUAGE\");\n if ($http_accept_language) {\n // Parse the HTTP header and build a preference list\n // Example value: \"de,en-us;q=0.7,en-uk,fr-fr;q=0.2\"\n $locale_preferences = array();\n foreach (explode(\",\", $http_accept_language) as $code) {\n list ($requested_locale, $qvalue) = explode(\";\", $code . \";\");\n $requested_locale = trim($requested_locale);\n $qvalue = trim($qvalue);\n if (preg_match(\"/^([a-z]{2,3})(?:[_-]([a-zA-Z]{2}))?/\", $requested_locale, $matches)) {\n $requested_locale = strtolower($matches[1]);\n if (!empty($matches[2])) {\n $requested_locale .= \"_\" . strtoupper($matches[2]);\n }\n $requested_locale = trim(str_replace(\"-\", \"_\", $requested_locale));\n if (!strlen($qvalue)) {\n // If not specified, default to 1.\n $qvalue = 1;\n } else {\n // qvalue is expected to be something like \"q=0.7\"\n list ($ignored, $qvalue) = explode(\"=\", $qvalue . \"==\");\n $qvalue = floatval($qvalue);\n }\n // Group by language to boost inexact same-language matches\n list ($language) = explode(\"_\", $requested_locale . \"_\");\n if (!isset($locale_preferences[$language])) {\n $locale_preferences[$language] = array();\n }\n $locale_preferences[$language][$requested_locale] = $qvalue;\n }\n }\n\n // Compare and score requested locales with installed ones\n $scored_locales = array();\n foreach ($locale_preferences as $language => $requested_locales) {\n // Inexact match adjustment (same language, different region)\n $fallback_adjustment_factor = 0.95;\n if (count($requested_locales) > 1) {\n // Sort by qvalue, descending\n $qvalues = array_values($requested_locales);\n rsort($qvalues);\n // Ensure inexact match scores worse than 2nd preference in same language.\n $fallback_adjustment_factor *= $qvalues[1];\n }\n foreach ($requested_locales as $requested_locale => $qvalue) {\n list ($matched_locale, $match_score) =\n self::_locale_match_score($requested_locale, $qvalue, $fallback_adjustment_factor);\n if ($matched_locale &&\n (!isset($scored_locales[$matched_locale]) ||\n $match_score > $scored_locales[$matched_locale])) {\n $scored_locales[$matched_locale] = $match_score;\n }\n }\n }\n\n arsort($scored_locales);\n\n list ($locale) = each($scored_locales);\n return $locale;\n }\n\n return null;\n }", "title": "" }, { "docid": "8be8c782519276d167b4c67b830429d0", "score": "0.6528615", "text": "public function detectFromBrowser() {\n if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { //if the \"Accept-Language\" header is set...\n $acceptedLanguages = $this->parseAcceptLanguageHeader($_SERVER['HTTP_ACCEPT_LANGUAGE']);\n foreach ($acceptedLanguages as $fullLangId => $langQuality) { //for all accepted languages...\n $langId = explode('-', $fullLangId); //Split language and country ID, if exist!\n if ($this->exists($langId[0])) { //if the language exists...\n $this->_selectedLangId = $langId[0];\n return $langId[0];\n }\n }\n }\n return $this->_defaultLangId;\n }", "title": "" }, { "docid": "6c26fa16c04ac20c19736383c107f7d5", "score": "0.6516273", "text": "public abstract function get_language();", "title": "" }, { "docid": "f0d88d96a5050c2c6fa3a1141f8270ac", "score": "0.6505783", "text": "protected function getCurrentLang()\n\t{\n\t\treturn $this->getUrlParam( 0 );\n\t}", "title": "" }, { "docid": "3f5a5e1f6c62c7b190819b7e87047c81", "score": "0.6494782", "text": "protected function getCurrentLang()\n\t{\n\t\treturn $this->getUrlParam( 1 );\n\t}", "title": "" }, { "docid": "8e0b298617b07c4c98ca5ecec99fd9cc", "score": "0.64827114", "text": "public function getLocale()\n {\n $locale = null;\n $supported_locales = $this->app_settings['locale']['supported'];\n\n // Prefer user-based profile locale.\n if ($this->user !== null && !empty($this->user->getLocale()) && $this->user->getLocale() !== 'default') {\n if (isset($supported_locales[$this->user->getLocale()])) {\n $locale = $this->user->getLocale();\n }\n }\n\n // Attempt to load from browser headers.\n if (!$locale) {\n $browser_locale = \\Locale::acceptFromHttp($_SERVER['HTTP_ACCEPT_LANGUAGE']);\n\n foreach ($supported_locales as $lang_code => $lang_name) {\n if (strcmp(substr($browser_locale, 0, 2), substr($lang_code, 0, 2)) == 0) {\n $locale = $lang_code;\n break;\n }\n }\n }\n\n // Default to system option.\n if (!$locale) {\n $locale = $this->app_settings['locale']['default'];\n }\n\n return $locale;\n }", "title": "" }, { "docid": "d823b40569ecf900cee1d7861dd773ab", "score": "0.64590186", "text": "public function lang_current()\n {\n if (defined('MW_LANG') and MW_LANG != false) {\n return MW_LANG;\n }\n\n $lang = false;\n\n if (!isset($lang) or $lang == false) {\n if (isset($_COOKIE['lang'])) {\n $lang = $_COOKIE['lang'];\n }\n }\n if (!isset($lang) or $lang == false) {\n $def_language = $this->app->option_manager->get('language', 'website');\n if ($def_language != false) {\n $lang = $def_language;\n }\n }\n if (!isset($lang) or $lang == false) {\n $lang = 'en';\n }\n $lang = str_replace('..', '', $lang);\n if (!defined('MW_LANG') and isset($lang)) {\n define('MW_LANG', $lang);\n }\n\n return $lang;\n }", "title": "" }, { "docid": "6017ef75a1231b2c952642de703a9882", "score": "0.64588964", "text": "public function lang_current()\n {\n\n if (defined('MW_LANG') and MW_LANG != false) {\n return MW_LANG;\n }\n\n\n $lang = false;\n\n\n if (!isset($lang) or $lang == false) {\n if (isset($_COOKIE['lang'])) {\n $lang = $_COOKIE['lang'];\n }\n }\n if (!isset($lang) or $lang == false) {\n $def_language = $this->app->option->get('language', 'website');\n if ($def_language != false) {\n $lang = $def_language;\n }\n }\n if (!isset($lang) or $lang == false) {\n $lang = 'en';\n }\n\n if (!defined('MW_LANG') and isset($lang)) {\n define('MW_LANG', $lang);\n }\n\n\n return $lang;\n\n }", "title": "" }, { "docid": "30c214d3e01803f84860abd2510f8c01", "score": "0.6458056", "text": "static function setLanguageByBrowserSettings(){\n $userLanguage = arrayValue($_SERVER, \"HTTP_ACCEPT_LANGUAGE\");\n if($userLanguage){\n $userLanguage = preg_replace(\"~[^a-z]~i\", \" \", strtolower($userLanguage));\n $userLanguages = explode(\" \", $userLanguage);\n foreach($userLanguages as $lang){\n if(!$lang) continue;\n if(isset(self::$languages[$lang])){\n self::$language = $lang;\n return $lang;\n }\n }\n }\n }", "title": "" }, { "docid": "db8d0750ddb7813df61b63b9e347096e", "score": "0.6455121", "text": "function local() {\r\n if (Request::get('lang')) {\r\n return Request::get('lang');\r\n }elseif (isset($_SESSION[LANG]))\r\n return $_SESSION[LANG];\r\n\r\n return __lang;\r\n}", "title": "" }, { "docid": "012488ee02e2b506979a784da72a7632", "score": "0.64534974", "text": "public static function get_request_locale() {\n $locale = null;\n\n // Check controller and current request\n if(Controller::has_curr()) {\n $controller = Controller::curr();\n $request = $controller->getRequest();\n $locale = $request->requestVar(self::config()->query_param);\n }\n\n // Without controller check querystring the old fashioned way\n if(empty($locale) && isset($_REQUEST[self::config()->query_param])) {\n $locale = $_REQUEST[self::config()->query_param];\n }\n\n return $locale;\n }", "title": "" }, { "docid": "3e14dcf90635a4114e5b6ad68f8c1675", "score": "0.6449918", "text": "protected function getDefaultLang() {\n\t\tstatic $def_lang;\n\t\tif ( null === $def_lang ) {\n\t\t\t$def_lang = apply_filters( 'wpml_default_language', '' );\n\t\t}\n\t\treturn $def_lang;\n\t}", "title": "" }, { "docid": "c2ff103310ce249e2393d24910beef12", "score": "0.6442458", "text": "static function current_lang() {\n\t\tif (!self::$language_decided) self::choose_site_lang();\n\t\treturn self::$reading_lang;\n\t}", "title": "" }, { "docid": "0f981763c7705d146ea76c6e4f005a7d", "score": "0.64419717", "text": "public function getLanguage(): string\n {\n // Check the cookie for the language data.\n if ($this->cookie->fetch([\n 'use_decrypt' => \\false\n ], 'lang') && $this->validLanguage($this->cookie->fetch([\n 'use_decrypt' => \\false\n ], 'lang')))\n {\n // Return the cookie data.\n return $this->cookie->fetch([\n 'use_decrypt' => \\false\n ], 'lang');\n }\n // Check session data and if it exists return that data else return the default language.\n return $this->session->get('lang', $this->config['lang']['default_language']);\n }", "title": "" }, { "docid": "2a8b6d753d5d5581c4ca756ec9636e25", "score": "0.643234", "text": "public function getCurrentLanguage(): ?Language\n {\n try {\n // because of performance it's just parsed in the first request,\n // so otherwise it has to be taken from the db out of the session\n if (empty($this->language) && !empty($this->session)) {\n $this->language = $this->session->language;\n }\n } catch (Exception $e) {\n $this->language = NULL;\n }\n\n return $this->language;\n }", "title": "" }, { "docid": "3560fbab8f4ace088f85075d733cc9df", "score": "0.6431154", "text": "function config_app_locale()\n {\n global $request;\n\t\t$languages = config('languages');\n\n\t\tif(isset($_GET['lang']) && !empty($_GET['lang']) && in_array($_GET['lang'], $languages)) {\n\t\t\t$language = $_GET['lang'];\n\t\t} elseif(isset($_COOKIE['lang']) && !empty($_COOKIE['lang']) && in_array($_COOKIE['lang'], $languages)) {\n\t\t\t$language = $_COOKIE['lang'];\n\t\t} else {\n\t\t\t$language = config('locale');\n\t\t}\n\n setcookie('lang', $language, time()+60*60*24*30*12, config('session.cookie_path'));\n $request->setLocale($language);\n\n\t\treturn $language;\n\t}", "title": "" }, { "docid": "13f7d5fce85597cd1c8b094d4cc83711", "score": "0.6414798", "text": "public static function getLanguage($default = 'en')\n {\n return (static::getSetting(\"LANGUAGE\") ?: $default);\n }", "title": "" }, { "docid": "7908300b099c72cc66019e5a88676855", "score": "0.64094144", "text": "function getLanguage($url, $ln = null, $type = null) {\r\n\t// Type 2: Change the path for the /requests/ folder location\r\n\t// Set the directory location\r\n\tif($type == 2) {\r\n\t\t$languagesDir = '../languages/';\r\n\t} else {\r\n\t\t$languagesDir = './languages/';\r\n\t}\r\n\t// Search for pathnames matching the .png pattern\r\n\t$language = glob($languagesDir . '*.php', GLOB_BRACE);\r\n\r\n\tif($type == 1) {\r\n\t\t// Add to array the available images\r\n\t\tforeach($language as $lang) {\r\n\t\t\t// The path to be parsed\r\n\t\t\t$path = pathinfo($lang);\r\n\t\t\t\r\n\t\t\t// Add the filename into $available array\r\n\t\t\t$available .= '<a href=\"index.php?lang='.$path['filename'].'\">'.ucfirst(strtolower($path['filename'])).'</a> - ';\r\n\t\t}\r\n\t\treturn substr($available, 0, -3);\r\n\t} else {\r\n\t\t// If get is set, set the cookie and stuff\r\n\t\t$lang = 'english'; // DEFAULT LANGUAGE\r\n\t\tif($type == 2) {\r\n\t\t\t$path = '../languages/';\r\n\t\t} else {\r\n\t\t\t$path = './languages/';\r\n\t\t}\r\n\t\tif(isset($_GET['lang'])) {\r\n\t\t\tif(in_array($path.$_GET['lang'].'.php', $language)) {\r\n\t\t\t\t$lang = $_GET['lang'];\r\n\t\t\t\tsetcookie('lang', $lang, time() + (10 * 365 * 24 * 60 * 60)); // Expire in one month\r\n\t\t\t} else {\r\n\t\t\t\tsetcookie('lang', $lang, time() + (10 * 365 * 24 * 60 * 60)); // Expire in one month\r\n\t\t\t}\r\n\t\t} elseif(isset($_COOKIE['lang'])) {\r\n\t\t\tif(in_array($path.$_COOKIE['lang'].'.php', $language)) {\r\n\t\t\t\t$lang = $_COOKIE['lang'];\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tsetcookie('lang', $lang, time() + (10 * 365 * 24 * 60 * 60)); // Expire in one month\r\n\t\t}\r\n\r\n\t\tif(in_array($path.$lang.'.php', $language)) {\r\n\t\t\treturn $path.$lang.'.php';\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "be1abd39cfba50ed055daa2df6808557", "score": "0.6408861", "text": "public function localization() {\n if(env('LOCALIZE_API') == 'header') {\n return request()->header('Accept-Language');\n }\n return request()->input('language');\n }", "title": "" }, { "docid": "27bdbcada0475a0a21676daf347552a5", "score": "0.6403953", "text": "function getLanguage();", "title": "" }, { "docid": "d94938d3fd3412fff7dc8f1bfda73599", "score": "0.6398279", "text": "public function getCurrentLanguage();", "title": "" }, { "docid": "d94938d3fd3412fff7dc8f1bfda73599", "score": "0.6398279", "text": "public function getCurrentLanguage();", "title": "" }, { "docid": "28fba9dbe788dbc2ef1e849eb97d2300", "score": "0.63858265", "text": "public function getRequestedLanguage()\n {\n return $this->getValueObject('requested_language');\n }", "title": "" }, { "docid": "0b20fbc8e4625c28b9d650eef0cd46fa", "score": "0.6380106", "text": "static function determineBrowserLanguage($allowed_languages, $default_language, $strict_mode = false) {\n\t\t$lang_variable = null;\n\t\tif (! isset ($_SERVER['HTTP_ACCEPT_LANGUAGE']) || empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {\n\t\t\treturn $default_language;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$lang_variable = $_SERVER['HTTP_ACCEPT_LANGUAGE'];\n\t\t}\n\n\t\t$accepted_languages = preg_split('/,\\s*/', $lang_variable);\n\n\t\t// set default\n\t\t$current_lang = $default_language;\n\t\t$current_q = 0;\n\n\t\t// work through all specified languages\n\t\tforeach ($accepted_languages as $accepted_language) {\n\t\t\t$res = preg_match('/^([a-z]{1,8}(?:-[a-z]{1,8})*)'.\n\t\t\t'(?:;\\s*q=(0(?:\\.[0-9]{1,3})?|1(?:\\.0{1,3})?))?$/i', $accepted_language, $matches);\n\t\t\tif (!$res) {\n\t\t\t\tcontinue ;\n\t\t\t}\n\n\t\t\t$lang_code = explode('-', $matches[1]);\n\n\t\t\t// was quality given?\n\t\t\tif ( isset ($matches[2])) {\n\t\t\t\t// consider quality\n\t\t\t\t$lang_quality = (float)$matches[2];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// not given, assume 1.0\n\t\t\t\t$lang_quality = 1.0;\n\t\t\t}\n\n\t\t\t// work through all languages\n\t\t\twhile (count($lang_code)) {\n\t\t\t\t// check if language wanted\n\t\t\t\tif (in_array(strtolower(join('-', $lang_code)), $allowed_languages)) {\n\t\t\t\t\t// check if quality high enough\n\t\t\t\t\tif ($lang_quality > $current_q) {\n\t\t\t\t\t\t// use this language\n\t\t\t\t\t\t$current_lang = strtolower(join('-', $lang_code));\n\t\t\t\t\t\t$current_q = $lang_quality;\n\t\t\t\t\t\t// exit while loop\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($strict_mode) {\n\t\t\t\t\t// exit while loop\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tarray_pop($lang_code);\n\t\t\t}\n\t\t}\n\n\t\t// return language\n\t\treturn $current_lang;\n\t}", "title": "" }, { "docid": "67ef9395267afef92e86bfaf068aceaa", "score": "0.6374034", "text": "public function getLang();", "title": "" }, { "docid": "5cecae085390ea46090818700f0e08fd", "score": "0.6373504", "text": "public static function getLang(){\n if (!isset($_SESSION)) {\n return json_decode(file_get_contents(__DIR__.\"/lang/_en_.json\"), true);\n }\n $lang;\n $usr = new User($_SESSION['user_id']);\n switch ($usr->lang()) {\n case 'es':\n $lang = json_decode(file_get_contents(__DIR__.\"/lang/_es_.json\"), true);\n break;\n case 'fr':\n $lang = json_decode(file_get_contents(__DIR__.\"/lang/_fr_.json\"), true);\n break;\n case 'it':\n $lang = json_decode(file_get_contents(__DIR__.\"/lang/_it_.json\"), true);\n break;\n default:\n $lang = json_decode(file_get_contents(__DIR__.\"/lang/_en_.json\"), true);\n break;\n }\n\n return $lang;\n }", "title": "" }, { "docid": "037578e3144b0894f8e951afea4f75fd", "score": "0.6371628", "text": "public function getLanguage();", "title": "" }, { "docid": "dc5c659fd3973954053d727f34d059dc", "score": "0.6366766", "text": "protected function setLangFromRequest()\n {\n $request = $this->getRequest();\n if (!$request) {\n return;\n }\n $lang = $request->getVar('lang');\n if ($lang) {\n if (strlen($lang) == 2) {\n $lang = i18n::get_closest_translation($lang);\n }\n Cookie::set('ChosenLocale', $lang);\n i18n::set_locale($lang);\n }\n $chosenLocale = Cookie::get('ChosenLocale');\n if ($chosenLocale && preg_match('/^[a-z]{2}_[A-Z]{2}$/', $chosenLocale)) {\n i18n::set_locale($chosenLocale);\n }\n }", "title": "" }, { "docid": "2c11d24bd4f924540a1b5f61ef3a299d", "score": "0.63613576", "text": "public static function get_language() {\n $lang = shibboleth::get_language();\n $lang = strtolower(substr(trim($lang), 0, 2));\n $languages = self::get_available_languages();\n $lang = isset($languages[$lang]) ? $lang : 'en';\n return $lang;\n }", "title": "" }, { "docid": "2991a6e5a53c54ae6393f20df85b7cec", "score": "0.63550544", "text": "public static function getPreferredLanguage($locales = null){\n\t\t//Method inherited from Symfony\\Component\\HttpFoundation\\Request\n\t\treturn Illuminate\\Http\\Request::getPreferredLanguage($locales);\n\t }", "title": "" }, { "docid": "2991a6e5a53c54ae6393f20df85b7cec", "score": "0.63550544", "text": "public static function getPreferredLanguage($locales = null){\n\t\t//Method inherited from Symfony\\Component\\HttpFoundation\\Request\n\t\treturn Illuminate\\Http\\Request::getPreferredLanguage($locales);\n\t }", "title": "" }, { "docid": "baabaaa5c0438684466ddcc2930c9383", "score": "0.6340478", "text": "function find_best_locale(array $availableLangs = array('en', 'de-de', 'de'))\n{\n if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])\n && preg_match('#^('.implode('|', $availableLangs).')#is', $_SERVER['HTTP_ACCEPT_LANGUAGE'], $match)) {\n return explode('-', $match[1]);\n }\n return array();\n}", "title": "" }, { "docid": "30192da68dbac553204b4aa681f7cf75", "score": "0.6334227", "text": "public static function getLanguages(){\n\t\t//Method inherited from Symfony\\Component\\HttpFoundation\\Request\n\t\treturn Illuminate\\Http\\Request::getLanguages();\n\t }", "title": "" }, { "docid": "30192da68dbac553204b4aa681f7cf75", "score": "0.6334227", "text": "public static function getLanguages(){\n\t\t//Method inherited from Symfony\\Component\\HttpFoundation\\Request\n\t\treturn Illuminate\\Http\\Request::getLanguages();\n\t }", "title": "" }, { "docid": "f6e307b616f3e06ae101d1eb93d5b0eb", "score": "0.6329077", "text": "public static function default()\n {\n $lang = locale_accept_from_http($_SERVER[\"HTTP_ACCEPT_LANGUAGE\"]);\n return new self($lang);\n }", "title": "" }, { "docid": "1ee805568598c56fb24a3d6ab1024517", "score": "0.6328186", "text": "function getCurrentLanguage() {\n\t\tglobal $LANG, $TSFE, $TYPO3_DB;\n\n\t\tif (is_object($LANG)) {\n\t\t\t$langCodeT3 = $LANG->lang;\n\t\t\t$csConvObj = $LANG->csConvObj;\n\t\t} elseif (is_object($TSFE)) {\n\t\t\t$langCodeT3 = $TSFE->lang;\n\t\t\t$csConvObj = $TSFE->csConvObj;\n\t\t} else {\n\t\t\treturn 'EN';\n\t\t}\n\n\t\t$res = $TYPO3_DB->exec_SELECTquery(\n\t\t\t'lg_iso_2,lg_country_iso_2',\n\t\t\t'static_languages',\n\t\t\t'lg_typo3='.$TYPO3_DB->fullQuoteStr($langCodeT3,'static_languages')\n\t\t);\n\t\twhile ($row = $TYPO3_DB->sql_fetch_assoc($res)) {\n\t\t\t$lang = $row['lg_iso_2'].($row['lg_country_iso_2']?'_'.$row['lg_country_iso_2']:'');\n\t\t}\n\t\t$TYPO3_DB->sql_free_result($res);\n\n\t\t$rc = $lang ? $lang : $csConvObj->conv_case('utf-8',$langCodeT3,'toUpper');\n\t\treturn $rc;\n\t}", "title": "" }, { "docid": "03042510f13a2b2fb6d4281260d7ef05", "score": "0.63207334", "text": "public function defaultLocale() {\n if (count($this->supported) == 0)\n return null;\n $default = Cfg::get(\"default_language\");\n if (in_array($default, $this->supported))\n return $default;\n return $this->supported[0];\n }", "title": "" }, { "docid": "df0021cd21a0ec5204cc51272591604d", "score": "0.62998474", "text": "private function negotiateLanguage(RequestInterface $request, Session $session): string {\n\n // uri\n $language = self::getLanguageFromUri($request->getUri()->getPath());\n if (!empty($language)) {\n return $language;\n }\n\n // cookie\n $cookieValue = $session->get('language');\n if (!empty($cookieValue)) {\n return $cookieValue;\n }\n\n // header\n $acceptHeader = $request->getHeaderLine('Accept');\n if (!empty($acceptHeader)) {\n /** @var BaseAccept $negotiatedLanguage */\n $negotiatedLanguage = (new Negotiator())->getBest($acceptHeader, $this->languages);\n\n if (!empty($negotiatedLanguage)) {\n return $negotiatedLanguage->getType();\n }\n }\n\n return $this->fallback;\n }", "title": "" }, { "docid": "164c9e1a53e5d949beed52b791843609", "score": "0.62978214", "text": "public function getLocaleFromRequest($default = null)\n {\n return $this->request->input(static::REQUEST_KEY, $default);\n }", "title": "" }, { "docid": "6738b35dc41b9f28d36b76fb9d52dfe8", "score": "0.6296782", "text": "public function getDefaultLanguage()\n {\n return $this->getParameter('defaultLanguage');\n }", "title": "" }, { "docid": "c73aad09d85ee99318bec5d31cb1f864", "score": "0.6267163", "text": "public function detectLanguage()\n {\n $sites = Craft::$app->getSites()->getAllSites();\n $availableLanguages = [];\n foreach ($sites as $site) {\n $availableLanguages[$site->language] = (int)$site->id;\n $language = explode('-', $site->language);\n $availableLanguages[$language[0]] = (int)$site->id;\n }\n\n $acceptedLanguages = [];\n foreach (explode(\",\", $_SERVER['HTTP_ACCEPT_LANGUAGE']) as $language) {\n $lang = explode(';', $language);\n $acceptedLanguages[] = $lang[0];\n }\n\n $matchedLocales = array_intersect($acceptedLanguages, array_keys($availableLanguages));\n $sortedSites = [];\n\n foreach($matchedLocales as $locale) {\n $sortedSites[$locale] = $availableLanguages[$locale];\n }\n\n if ($sortedSites) {\n $siteId = reset($sortedSites);\n /** @var Site $site */\n $site = Craft::$app->getSites()->getSiteById($siteId);\n $this->setLanguageCookie($site);\n $this->redirectToSite($site);\n }\n }", "title": "" }, { "docid": "18a7e2580762821cb0ab840ea1bad5f5", "score": "0.62541693", "text": "public function detectLanguage()\n {\n $acceptableLanguages = Yii::$app->getRequest()->getAcceptableLanguages();\n foreach ($acceptableLanguages as $language) {\n if ($this->_isValidLanguage($language)) {\n // Yii::$app->language = $language;\n $this->applyLanguage($language);\n $this->saveLanguageIntoCookie($language);\n return;\n }\n }\n foreach ($acceptableLanguages as $language) {\n $pattern = preg_quote(substr($language, 0, 2), '/');\n foreach ($this->languages as $key => $value) {\n if (preg_match('/^' . $pattern . '/', $value) || preg_match('/^' . $pattern . '/', $key)) {\n // Yii::$app->language = $this->_isValidLanguage($key) ? $key : $value;\n $this->applyLanguage($this->_isValidLanguage($key) ? $key : $value);\n $this->saveLanguageIntoCookie(Yii::$app->language);\n return;\n }\n }\n }\n }", "title": "" }, { "docid": "72afd08c4585d0ae3e19f3fc185d562b", "score": "0.62507075", "text": "public function findLocale($lang = null) {\n\t\t$forceLocale = $this->config->getSystemValue('force_locale', false);\n\t\tif (is_string($forceLocale) && $this->localeExists($forceLocale)) {\n\t\t\treturn $forceLocale;\n\t\t}\n\n\t\tif ($this->config->getSystemValue('installed', false)) {\n\t\t\t$userId = null !== $this->userSession->getUser() ? $this->userSession->getUser()->getUID() : null;\n\t\t\t$userLocale = null;\n\t\t\tif (null !== $userId) {\n\t\t\t\t$userLocale = $this->config->getUserValue($userId, 'core', 'locale', null);\n\t\t\t}\n\t\t} else {\n\t\t\t$userId = null;\n\t\t\t$userLocale = null;\n\t\t}\n\n\t\tif ($userLocale && $this->localeExists($userLocale)) {\n\t\t\treturn $userLocale;\n\t\t}\n\n\t\t// Default : use system default locale\n\t\t$defaultLocale = $this->config->getSystemValue('default_locale', false);\n\t\tif ($defaultLocale !== false && $this->localeExists($defaultLocale)) {\n\t\t\treturn $defaultLocale;\n\t\t}\n\n\t\t// If no user locale set, use lang as locale\n\t\tif (null !== $lang && $this->localeExists($lang)) {\n\t\t\treturn $lang;\n\t\t}\n\n\t\t// At last, return USA\n\t\treturn 'en_US';\n\t}", "title": "" }, { "docid": "3637636230ce964b946a126d9fd84aa7", "score": "0.62414426", "text": "public function getPreferredLanguages()\n\t{\n\t\tif ($this->_preferredLanguages === null) {\n\t\t\tif (isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) && ($n = preg_match_all('/([\\w\\-_]+)\\s*(;\\s*q\\s*=\\s*(\\d*\\.\\d*))?/', $_SERVER['HTTP_ACCEPT_LANGUAGE'], $matches)) > 0) {\n\t\t\t\t$languages = array();\n\t\t\t\tfor ($i = 0; $i < $n; ++$i) {\n\t\t\t\t\t$languages[$matches[1][$i]] = empty($matches[3][$i]) ? 1.0 : floatval($matches[3][$i]);\n\t\t\t\t}\n\t\t\t\tarsort($languages);\n\t\t\t\t$this->_preferredLanguages = array_keys($languages);\n\t\t\t} else {\n\t\t\t\t$this->_preferredLanguages = array();\n\t\t\t}\n\t\t}\n\t\treturn $this->_preferredLanguages;\n\t}", "title": "" }, { "docid": "bc3c80570e879c21c43689a515abf0fb", "score": "0.6239626", "text": "static function getCurrentLanguage()\n {\n $current_lang = $_SESSION['lang'];\n if ($current_lang == 'ar') {\n return 'ar';\n }\n elseif ($current_lang == 'en'){\n return 'en';\n }\n }", "title": "" }, { "docid": "a7a35fdd54c8bbdca4f365bf8e09cbd9", "score": "0.6234468", "text": "function getLangCookie() {\n if (session_status() == PHP_SESSION_NONE) {\n session_start();\n }\n\n if(!isset($_COOKIE['lang'])) {\n $langHead = explode(\",\",$_SERVER['HTTP_ACCEPT_LANGUAGE']);\n $lang = substr($langHead[0],0,2);\n return $lang;\n }\n else\n return $_COOKIE['lang'];\n }", "title": "" }, { "docid": "c7b6a8e07940cbf704fedd513995e280", "score": "0.6231411", "text": "public function getLanguage()\n {\n return $this->getParameter('language');\n }", "title": "" }, { "docid": "c7b6a8e07940cbf704fedd513995e280", "score": "0.6231411", "text": "public function getLanguage()\n {\n return $this->getParameter('language');\n }", "title": "" }, { "docid": "79a9196465fb9f8ad347e219b31db9a9", "score": "0.62271905", "text": "public function getDefaultLang() {\n return $this->defl;\n }", "title": "" }, { "docid": "a0cbbe0b4c6a6751accd3482ab98b356", "score": "0.6217616", "text": "public function detect_language () {\r\n require_once PATH_LANGUAGES . '/' . $this->appConf->language . '/languages.php';\r\n \r\n $this->langConf = $langConf;\r\n \r\n // require router\r\n require_once PATH_LANGUAGES . '/' . $this->appConf->language . '/router_locale.php';\r\n \r\n $this->routerConf = $routerConf;\r\n }", "title": "" }, { "docid": "982bae6bee261010354f01f881ff5592", "score": "0.62103736", "text": "public function setLanguage()\n\t{\n Yii::app()->getUrlManager()->parseUrl(Yii::app()->getRequest());\n if(isset($_GET['_language'])) \n {\n Yii::app()->language = $_GET['_language'];\n Yii::app()->user->setState('_language', $_GET['_language']);\n $cookie = new CHttpCookie('_language', $_GET['_language']);\n $cookie->expire = time() + (3600*24*7); // 7 days\n Yii::app()->request->cookies['_language'] = $cookie; \n }\n elseif (Yii::app()->user->hasState('_language'))\n {\n Yii::app()->language = Yii::app()->user->getState('_language');\n } else {\n Yii::app()->language = $this->defaultLanguage;\n }\n\t}", "title": "" }, { "docid": "b08b0953f6516d371d6fb2481f736a4d", "score": "0.62029636", "text": "function example_current_locale(){\n static $locale;\n if( ! isset($locale) ){\n $locales = example_supported_locales();\n // ensure query string overrides cookie\n if( isset($_GET['locale']) ){\n $locale = $_GET['locale'];\n }\n // else get previous value from cookie\n else if( isset($_COOKIE['locale']) ){\n $locale = $_COOKIE['locale'];\n }\n // default to english if missing or unsupported\n if( empty($locale) || ! isset($locales[$locale]) ) {\n $locale = 'en_GB';\n }\n // set a cookie for next view without a query string\n if( empty($_COOKIE['locale']) || $_COOKIE['locale'] !== $locale ){\n setcookie('locale', $locale, 0, '/' );\n }\n }\n return $locale;\n}", "title": "" }, { "docid": "4589ef1a9210bf6af8b8e1c781e8535d", "score": "0.61878794", "text": "public static function detect()\n\t{\n\t\t// Get all languages from database\n\t\t$all = self::orderBy('is_default', 'desc')->get();\n\t\tif( ! $all->count())\n\t\t\treturn new static;\n\n\t\t// Helper function for adding information about where the language was detected from\n\t\t$addOrigin = function ($language, $origin) {\n\t\t\t$language->detectedFrom = $origin;\n\n\t\t\treturn $language;\n\t\t};\n\n\t\t// Try with previous value from session\n\t\tif($language = Session::get('language') and isset($language->id) and $all->contains($language->id))\n\t\t\treturn $addOrigin($all->find($language->id), 'session');\n\n\t\t// Try with user's browser language\n\t\t$language = with(new \\Browser\\Language)->getLanguageLocale('_');\n\t\t$type = (strlen($language) === 2) ? 'code' : 'locale';\n\t\t$languages = $all->where($type, $language);\n\t\tif($languages->count())\n\t\t\treturn $addOrigin($languages->first(), 'browser');\n\n\t\t// Browser doesn't have any known language. Fallback to default\n\t\treturn $addOrigin($all->first(), 'default');\n\t}", "title": "" }, { "docid": "5feb63131062627078fb9c0135aa3490", "score": "0.61806947", "text": "function get_lang_from_locale($l) {\r\n switch ($l) {\r\n case 'bg': $locale = 'bg.utf8'; break;\r\n case 'cs': $locale = 'cs.utf8'; break;\r\n case 'da': $locale = 'da.utf8'; break;\r\n case 'de': $locale = 'de.utf8'; break;\r\n case 'el': $locale = 'el.utf8'; break;\r\n case 'es': $locale = 'es.utf8'; break;\r\n case 'et': $locale = 'et.utf8'; break;\r\n case 'fi': $locale = 'fi.utf8'; break;\r\n case 'fr': $locale = 'fr.utf8'; break;\r\n case 'hr': $locale = 'hr.utf8'; break;\r\n case 'hu': $locale = 'hu.utf8'; break;\r\n case 'is': $locale = 'is.utf8'; break;\r\n case 'it': $locale = 'it.utf8'; break;\r\n case 'lt': $locale = 'lt.utf8'; break;\r\n case 'lv': $locale = 'lv.utf8'; break;\r\n case 'mk': $locale = 'mk.utf8'; break;\r\n case 'mt': $locale = 'mt.utf8'; break;\r\n case 'nl': $locale = 'nl.utf8'; break;\r\n case 'no': $locale = 'no.utf8'; break;\r\n case 'pl': $locale = 'pl.utf8'; break;\r\n case 'pt': $locale = 'pt.utf8'; break;\r\n case 'ro': $locale = 'ro.utf8'; break;\r\n case 'sk': $locale = 'sk.utf8'; break;\r\n case 'sl': $locale = 'sl.utf8'; break;\r\n case 'sv': $locale = 'sv.utf8'; break;\r\n case 'tr': $locale = 'tr.utf8'; break;\r\n default: $locale = 'en.utf8';\r\n }\r\n return $locale;\r\n}", "title": "" }, { "docid": "259b4c72f3ebf7f4f9a9483347e2c049", "score": "0.61750776", "text": "function http_negotiate_language (array $supported, array &$result = null ) {}", "title": "" }, { "docid": "35bf8d843954ab5bbec790b3357cabad", "score": "0.6167133", "text": "protected function getDefaultLanguage(): ?string\n {\n // English\n return 'en';\n }", "title": "" }, { "docid": "2556fffc797f306dd455f2c55d417669", "score": "0.6159263", "text": "public function getLang()\n {\n $lang = $this->session->getLocaleSettings()->language;\n $langVal = 'en';\n if($lang == 'de')\n {\n $langVal = 'de';\n }\n return $langVal;\n }", "title": "" }, { "docid": "17ab0f7191b4e4f6b38cb21c056ebf11", "score": "0.6151644", "text": "private function getLanguagesRequest()\n {\n $resourcePath = \"/info/languages\";\n\n $requestUrl = $this->config->getHost() . $resourcePath;\n $request = new Request('GET', $requestUrl);\n\n return $request;\n }", "title": "" }, { "docid": "5b78755dce53b6915fdf4af20d624dd2", "score": "0.61190987", "text": "static function default_lang() {\n\t\treturn self::$default_lang;\n\t}", "title": "" }, { "docid": "210e0652fd1654d9b8f9453b826dac74", "score": "0.6118601", "text": "public function getAcceptLanguage(): string;", "title": "" }, { "docid": "44bf0913781a59c8d34adf9d19632608", "score": "0.61160403", "text": "public function getLanguage() {\n $allowedLangs = $this->presenter->langManagerService->getLangs();\n $currentLang = $this->sessionSection->langCode ?: $this->presenter->langManagerService->getDefaultLanguage();\n return $this->sessionSection->langCode = array_key_exists($currentLang, $allowedLangs) ? $currentLang : $this->presenter->langManagerService->getDefaultLanguage();\n }", "title": "" }, { "docid": "b5c7ac13c05d4ec86cc2a657ad4d5a34", "score": "0.6099859", "text": "function get_browser_language ( $pref = false ) {\n global $browser_languages, $HTTP_ACCEPT_LANGUAGE;\n\n $ret = '';\n if ( empty ( $HTTP_ACCEPT_LANGUAGE ) &&\n isset ( $_SERVER['HTTP_ACCEPT_LANGUAGE'] ) )\n $HTTP_ACCEPT_LANGUAGE = $_SERVER['HTTP_ACCEPT_LANGUAGE'];\n\n if ( empty ( $HTTP_ACCEPT_LANGUAGE ) )\n return ( $pref ? translate ( 'Browser Language Not Found' ) : 'English-US' );\n else {\n $langs = explode ( ',', $HTTP_ACCEPT_LANGUAGE );\n for ( $i = 0, $cnt = count ( $langs ); $i < $cnt; $i++ ) {\n $l = strtolower ( trim ( preg_replace ( '/;.*/', '', $langs[$i] ) ) );\n $ret .= \"\\\"$l\\\" \";\n if ( ! empty ( $browser_languages[$l] ) )\n return $browser_languages[$l];\n }\n }\n return ( strlen ( $HTTP_ACCEPT_LANGUAGE ) && $pref == true\n ? $HTTP_ACCEPT_LANGUAGE . ' ( ' . translate ( 'not supported' ) . ' )'\n : 'English-US' );\n}", "title": "" }, { "docid": "28a5a0dc9693521fd53b51a5015929af", "score": "0.6081428", "text": "public function get_default_lang() {\n\t\t$default_lang = $this->get_option( 'default_lang' );\n\n\t\t/**\n\t\t * Filter for default language\n\t\t *\n\t\t * @since 1.0.0\n\t\t *\n\t\t * @param string $default_language The requested field for the default language\n\t\t */\n\t\treturn apply_filters( 'bppl_default_language', $default_lang );\n\t}", "title": "" }, { "docid": "0de575375a2506affee5c7b4d114fcab", "score": "0.607974", "text": "public function getAcceptLanguage()\n {\n if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {\n $acceptLanguage = $_SERVER['HTTP_ACCEPT_LANGUAGE'];\n } else {\n $acceptLanguage = Mage::app()->getLocale()->getLocaleCode();\n }\n\n return $acceptLanguage;\n }", "title": "" }, { "docid": "59190eef6566e1f0eb3c7d161728de3e", "score": "0.60601", "text": "public function findLocale(){\n\n\t\t$segment = request()->segment(1);\n\n\t\tif(!in_array(request()->getHttpHost(), ['www.nixler.pl', 'nixler.app', 'www.nixler.ge'])) {\n\t\t\theader('Location: '.config('app.url'));\n\t\t\texit();\n\t\t}\n\n\t\t$locale = null;\n\n\t\tif(Linguist::workingLocale()){\n\n\t\t\t$locale = Linguist::workingLocale();\n\n\t\t} elseif(auth()->check() && $this->isAvailableLocaleKey(auth()->user()->locale)) {\n\n\t\t\t$locale = auth()->user()->locale;\n\n\t\t} elseif(auth()->guest() && $this->isAvailableLocaleKey(Session::get('locale'))) {\n\n\t\t\t$locale = Session::get('locale');\n\t\t}\n\n\t\tif(is_null($locale) || (auth()->check() && !auth()->user()->country)){\n\t\t\t$locale = $this->setLocaleByGeo();\n\t\t}\n\n\t\tapp()->setLocale($locale);\n\n\t\tCarbon::setLocale($locale);\n\n\t\tsetlocale(LC_TIME, config('app.lang_to_locale.'.$locale));\n\n\t\t$timezone = auth()->check() ? auth()->user()->timezone : session('timezone');\n\n\t\t$currency = auth()->check() ? auth()->user()->currency : session('currency');\n\n\t\t$country = auth()->check() ? auth()->user()->country : session('country');\n\n\t\tconfig([\n\t\t\t'app.url' => url('/'),\n\t\t\t'app.currency' => $currency,\n\t\t\t'app.country' => $country,\n\t\t\t'app.timezone' => $timezone,\n\t\t]);\n\n\t\treturn $locale;\n\t}", "title": "" }, { "docid": "834187c6cb45fe148c8b013a0cfa6b12", "score": "0.6057988", "text": "public function getLanguages()\n\t{\n\t\t$accept_lang = preg_replace('/(;q=.+)/i', '', trim($_SERVER['HTTP_ACCEPT_LANGUAGE']));\n\t\t$accept_lang = explode(',', $accept_lang);\n\n\t\treturn $accept_lang;\n\t}", "title": "" }, { "docid": "427060564edc3621439f8ed7fe2a75a4", "score": "0.6057246", "text": "static function setLanguageByUri(){\n if(url()->languageInUri){\n $uri = url()->getModifiedUri(false, false, true);\n foreach(self::$languages as $lang){\n if(preg_match(\"~^/$lang(/|$)~\", $uri)){\n self::$language = $lang;\n return $lang;\n }\n }\n }else{\n error(\"Could not \".__CLASS__.\"::setLanguageByUri because languageInUri is not set in UrlManager\");\n }\n }", "title": "" }, { "docid": "38473f09868464f8f78ed2fa42c69ed9", "score": "0.605154", "text": "public static function lang()\n {\n return (isset($_POST['lang']) && filter_var(trim($_POST['lang']), FILTER_SANITIZE_STRING)) ? trim($_POST['lang']) : '';\n }", "title": "" }, { "docid": "5cc0624abec659c85d5c1b2a029b2c92", "score": "0.6046445", "text": "public static function getLanguage() : string\n {\n return self::getOption(self::OPTION_LANGUAGE);\n }", "title": "" }, { "docid": "8feb9a4cac610aa6894624457f259b1a", "score": "0.60406584", "text": "protected function actionGetLanguage() {\n\n if (session_status() == PHP_SESSION_NONE) {\n session_start();\n }\n $language_array = ['ru', 'us', 'fr', 'de'];\n /*\n * Change for language\n */\n $pageURL = 'http';\n $pageURL .= \"://\";\n if ($_SERVER[\"SERVER_PORT\"] != \"80\") {\n $pageURL .= $_SERVER[\"SERVER_NAME\"] . \":\" . $_SERVER[\"SERVER_PORT\"] . $_SERVER[\"REQUEST_URI\"];\n } else {\n $pageURL .= $_SERVER[\"SERVER_NAME\"] . $_SERVER[\"REQUEST_URI\"];\n }\n $links_array = explode(\"/\", $pageURL);\n $array = explode(\"/\", $pageURL);\n if(in_array($array[3], $language_array)){\n $_SESSION['language'] = $array[3];\n } else {\n $_SESSION['language'] = 'us';\n }\n /*\n * End\n */\n\n session_write_close();\n\n if($_SESSION['language'] !== 'us') {\n include_once $_SERVER['DOCUMENT_ROOT'] . '/Languages/lang.' . $_SESSION['language'] . '.php';\n if(isset($lang)) {\n $this->model->setLanguage($lang);\n }\n }\n $language = $_SESSION['language'];\n switch ($language) {\n case 'ru': $name_of_country = 'Россия';\n break;\n case 'us': $name_of_country = 'United States';\n break;\n case 'fr': $name_of_country = 'France';\n break;\n case 'de': $name_of_country = 'Deutschland';\n break;\n }\n foreach($language_array as $val => $assoc){\n if($assoc == $language){\n unset($language_array[$val]);\n }\n }\n sort($language_array);\n $name_of_country_array = array();\n $i = 0;\n $k = count($language_array);\n while ($i < $k){\n switch($language_array[$i]){\n case 'ru': array_push($name_of_country_array, 'Россия');\n break;\n case 'us': array_push($name_of_country_array, 'United States');\n break;\n case 'fr': array_push($name_of_country_array, 'France');\n break;\n case 'de': array_push($name_of_country_array, 'Deutschland');\n break;\n }\n $i++;\n }\n\n /*\n * Setting Model\n */\n $this->model->setCurrentLanguage( $language );\n $this->model->setCurrentCountry( $name_of_country );\n $this->model->setNameOfLanguages( $language_array );\n $this->model->setNameOfCountries( $name_of_country_array );\n }", "title": "" }, { "docid": "819b64e62b98f23357636a0169a1eed2", "score": "0.60287666", "text": "function get_site_lang() {\n //to realize if the actual php version ist newer than '5.3'\n if (strnatcmp(phpversion(),'5.3.0') >= 0) {\n $lg = strstr(get_bloginfo('language'), '-', TRUE);\n }\n else {\n $haystack = get_bloginfo('language');\n $needle = '-';\n $result = substr($haystack, 0, strpos($haystack, $needle)); // $result = php\n }\n\n $lg = $lg ? $lg : 'fr'; //if nothing is returned best to return at least 'fr'. We're assuming that default language is french...\n\n return $lg;\n}", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "b80dba96e82adcb5353861309a3d4e8f", "score": "0.0", "text": "public function adddish(){\n $mains = Main::all();\n\n return view('dishes.create', compact('mains'));\n }", "title": "" } ]
[ { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.8190437", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "e5152a75698da8d87238a93648112fcf", "score": "0.72897154", "text": "function display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->fetch($resource_name, $cache_id, $compile_id, true);\n }", "title": "" }, { "docid": "e5152a75698da8d87238a93648112fcf", "score": "0.72897154", "text": "function display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->fetch($resource_name, $cache_id, $compile_id, true);\n }", "title": "" }, { "docid": "ddf04ce79355e6393b4e16ac5ca5339b", "score": "0.72854424", "text": "public function show(Resource $resource)\n {\n return $resource;\n }", "title": "" }, { "docid": "b1f9ad094841da4c93bfc71c1fe290ee", "score": "0.7228577", "text": "function resourceAction() {\n\t\t$model = new Resources;\n\t\t$model->output( $_GET['resource'] );\n\t\texit();\n\t\tif (isset($_GET['resource'])) {\n\t\t\tResources::output();\n\t\t}\n\t}", "title": "" }, { "docid": "675560eedfc7019d4f6a3a8ccf4380ae", "score": "0.7058661", "text": "public function show($resource, $resourceId)\n {\n return view('microboard::resource.show', compact('resource', 'resourceId'));\n }", "title": "" }, { "docid": "2ef8aa5a12fe505c49b213bd0bde4d8c", "score": "0.6679027", "text": "public function show(Resource $Resource)\n {\n\t\t\t\t$Actions = Action::all()->toArray();\n return view('resource.show',compact(\"Resource\",\"Actions\"));\n }", "title": "" }, { "docid": "dfd1e41399b89992277d2f4181b60c74", "score": "0.66665685", "text": "public function index($resource)\n {\n return view('microboard::resource.index', compact('resource'));\n }", "title": "" }, { "docid": "dda8eb008b6dd683d8a6d910da413069", "score": "0.6562032", "text": "public function show(Resource $resource)\n {\n return Storage::download($resource->file);\n }", "title": "" }, { "docid": "5dbe1076e63c172c2caafb4d8a1cf41a", "score": "0.63623476", "text": "public function show($id)\n {\n $resource = MyResource::find($id);\n if ($resource != null) {\n return view('resources.show', compact('resource'));\n }\n return abort(404, 'Resource Not Found!');\n }", "title": "" }, { "docid": "45a73038dfd7440f98b74e8f017c5dbf", "score": "0.6339965", "text": "function viewItem($pResourceId = null) {\n if (isset($pResourceId) && is_numeric($pResourceId) && ($pResourceId > 0)) {\n $this->load->model('findaids/FindingAidsItemDAO');\n $data['resource'] = $this->FindingAidsItemDAO->getItem($pResourceId); //get the resource data from the database\n }\n else {\n $data['msg'] = 'Resource not found';\n }\n \n $this->display('findaids/viewItem', $data);\n }", "title": "" }, { "docid": "62fef0174aa48ad81f97f645799dda19", "score": "0.62100685", "text": "public function show($id)\n {\n //\n\t\treturn Resource::find($id);\n }", "title": "" }, { "docid": "040327f0d952b093f5c02dfe2fde04db", "score": "0.611832", "text": "public function show($id) {\n ${$this->resource} = $this->model->findOrFail($id);\n\n return view($this->view_path . '.show', compact($this->resource));\n }", "title": "" }, { "docid": "4acc522a1cb2928143f0fad96697ebf3", "score": "0.60883623", "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$resource->load('client', 'tags', 'type');\n\n\t\treturn view('resources.show', ['resource' => $resource]);\n\t}", "title": "" }, { "docid": "a8c35455a5242ccc9e930e21edd43e0b", "score": "0.6043974", "text": "function display($resource_name, $cache_id = null, $compile_id = null, $display = false) {\n\t\t\n\t\t// attempt to load the theme's requested template\n\t\tif (!is_file($this->template_dir.'/'.$resource_name) and substr($resource_name,0,5) != 'file:')\n\t\t\t// template file not existant in theme, fallback to \"default\" theme\n\t\t\tif (!is_file($this->_themeDir.'default/'.$resource_name))\n\t\t\t\t// requested template file does not exist in \"default\" theme, die.\n\t\t\t\tdie('<img src=\"'.bm_baseUrl.'themes/shared/images/icons/alert.png\" align=\"middle\">'.$resource_name.': '._T('Template file not found in default theme.'));\n\t\t\telse\n\t\t\t\t$resource_name = $this->_themeDir.'default/'.$resource_name;\n\t\t\n\t\tglobal $poMMo;\n\t\tif ($poMMo->_logger->isMsg()){ \n\t\t\t$this->assign('messages',$poMMo->_logger->getMsg(false,false));\n }\n\t\tif ($poMMo->_logger->isErr())\n\t\t\t$this->assign('errors',$poMMo->_logger->getErr(false,false));\n\t\t\n\t\treturn parent::display($resource_name, $cache_id = null, $compile_id = null, $display = false);\n\t}", "title": "" }, { "docid": "f7c05d96e66a9dcdda46564a24504d64", "score": "0.603562", "text": "public function show($id)\n {\n $model = $this->resourceModel::find($id);\n\n $this->beforeShow($model);\n\n if (!is_null($this->relatedModel) && !$model->relationLoaded($this->relatedModel)) {\n $model->load($this->relatedModel);\n }\n\n $this->viewData['resourceData'] = $model;\n\n return view(\n \"{$this->viewBaseDir}.{$this->viewFiles['show']}\",\n $this->viewData\n );\n }", "title": "" }, { "docid": "0a686d0ac05d929e084eb5f40c6c52cf", "score": "0.59964097", "text": "public function show(Restify $restify)\n {\n //\n }", "title": "" }, { "docid": "395de905ba7e4d06210c28e4bf02fc77", "score": "0.59784734", "text": "public function show( )\n\t{\n\t}", "title": "" }, { "docid": "f92fbb1cbd7db59751764b73789cea6c", "score": "0.59730935", "text": "public function actionView()\n {\n if (!Parameters::hasParam('type'))\n throw new APIException('Invalid resource TYPE (parameter name: \\'type\\')', APIResponseCode::API_INVALID_METHOD_PARAMS);\n \n if (!Parameters::hasParam('id'))\n throw new APIException('Invalid resource IDENTIFICATOR (parameter name: \\'id\\')', APIResponseCode::API_INVALID_METHOD_PARAMS);\n \n $resource_type = Parameters::get('type');\n\n $finder = new YiiResourceFinder($resource_type);\n $object = $finder->findById(Parameters::get('id'));\n\n $format = Parameters::hasParam('format') ? Parameters::get('format') : 'json';\n $coder = ObjectCodingFactory::factory()->createObject($format);\n if ($coder === null)\n throw new APIException('Invalid Coder for format', APIResponseCode::API_INVALID_CODER);\n \n $response = $coder->encode($object->getAttributes());\n die($response);\n }", "title": "" }, { "docid": "1e891653b5f4912aa409c758d50a1b98", "score": "0.5965172", "text": "function display()\n\t{\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "title": "" }, { "docid": "bdefca54eb98b7da00ba328f778b1d62", "score": "0.5963372", "text": "public function show() {\r\n $this->_handleThumbRequest();\r\n $this->_setOutputHeaders();\r\n\r\n // Show image\r\n if ($this->_cache) {\r\n // Note to developers:\r\n // If you are using some sort of _GET, _POST, _COOKIE, ... parameters to set\r\n // the cache path or the root path, make sure you sanity check the path's so\r\n // file_get_contents doesn't ouput any other file on your server!\r\n //\r\n // By default the _cachePath is created in PHP and _cachedFileName is a md5 hashed string\r\n // and normally you shouldn't run into security issues here\r\n echo file_get_contents($this->_cachePath.$this->_pathSeparator.$this->_cachedFileName);\r\n } else {\r\n $this->_toImage($this->_image);\r\n }\r\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5954321", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "3ff943e72bc423e0031ca638d0459516", "score": "0.59518224", "text": "public function Display()\n {\n // by application template)\n }", "title": "" }, { "docid": "711b3e79a897f1435b168cf31d7bbc46", "score": "0.5939425", "text": "public function show($id)\n {\n // Get the resource using the parent API\n $object = $this->api()->show($id);\n\n // Render show view\n $data = [Str::camel($this->package) => $object];\n return $this->content( 'show', $data );\n }", "title": "" }, { "docid": "10dda82513aea0f93ead687a2ff8c827", "score": "0.5917097", "text": "public function show() {\n if (!$this->resource) return false;\n header(\"Content-Type: \" . $this->mime);\n switch ($this->ext) {\n case \"jpeg\":\n imagejpeg($this->resource);\n break;\n case \"png\":\n imagesavealpha($this->resource, true);\n imagepng($this->resource);\n break;\n }\n }", "title": "" }, { "docid": "6ba059f4682aab8baf61ec9d7bd7aa2f", "score": "0.59067607", "text": "public function showAction($id){\n $data = $this->getData();\n //returns object and renders it to a Twig file\n return $this->app['twig']->render('show.twig.html', array('item' => $data[$id],'id'=>$id));\n }", "title": "" }, { "docid": "a4e858e0516451a1779fc03420ea9ca6", "score": "0.58891064", "text": "public function showAction($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 $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('DevPCultBundle:Representation:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(), ));\n }", "title": "" }, { "docid": "165e57248abdff75085b534357be6960", "score": "0.5881089", "text": "public function show() {\r\n // feel free to change this method if it is ever needed\r\n abort(404);\r\n }", "title": "" }, { "docid": "1346e215e2992fa9399bf2d0e2cefa29", "score": "0.5880812", "text": "public function showAction($id)\n {\n # code...\n }", "title": "" }, { "docid": "d6af1b1d4946c54112fc9b7ca038cb20", "score": "0.58112013", "text": "public function display()\n\t{\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "305f64db85d64f68019d2fadcd0a85d2", "score": "0.58012545", "text": "public function show()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "3561014ddd4ab65fe67a18e78c535e0f", "score": "0.57959795", "text": "public function show()\n {\n // get data\n $data = $this->model->get();\n\n // print_r($data); die();\n\n // render data\n $this->twig->render($this->template, $data);\n }", "title": "" }, { "docid": "18dc3859862f1c173af6767cfb82607b", "score": "0.5793224", "text": "public function act(Resource $resource): void;", "title": "" }, { "docid": "63925fbab89765f6ec514208a03fc871", "score": "0.5787218", "text": "public function edit(Resource $resource)\n {\n return view('resource.edit', compact('resource'));\n }", "title": "" }, { "docid": "e7bae91f4e998eac5e73657c932c48d7", "score": "0.5752467", "text": "public function show($id) {\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "e3b51ebfe04703c114ab39fc729ba43b", "score": "0.5749091", "text": "public function show(Entry $entry)\n {\n //\n }", "title": "" }, { "docid": "8f15cdd2f287675d36c7b7df028043ec", "score": "0.5736634", "text": "public function show($id)\n\t{\n\t//\n\t}", "title": "" }, { "docid": "8f15cdd2f287675d36c7b7df028043ec", "score": "0.5736634", "text": "public function show($id)\n\t{\n\t//\n\t}", "title": "" }, { "docid": "8f15cdd2f287675d36c7b7df028043ec", "score": "0.5736634", "text": "public function show($id)\n\t{\n\t//\n\t}", "title": "" }, { "docid": "9b77148c668e41a20410842157f00e5a", "score": "0.5732526", "text": "public function showAction()\r\n {\r\n $id = $this->getRequest()->getParam('id');\r\n if ($id > 0) {\r\n $post = $this->Surveys->loadData($id);\r\n $this->view->survey = $post;\r\n }\r\n else $this->view->message = 'The post ID does not exist';\r\n }", "title": "" }, { "docid": "4de13c28a63d7306cf639907e8ef1d9c", "score": "0.57274294", "text": "public function edit($resource, $resourceId)\n {\n return view('microboard::resource.edit', compact('resource', 'resourceId'));\n }", "title": "" }, { "docid": "82d1ab8dceb8c3af6887aff2ec025a2a", "score": "0.5725802", "text": "public function resolveForDisplay($resource)\n {\n if (is_callable($this->displayCallback)) {\n $this->value = call_user_func($this->displayCallback, $resource[$this->attribute]);\n } else {\n $this->value = $resource[$this->attribute];\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": "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": "d0e3eeb22ea781b9d946b9eabd93bb46", "score": "0.57204515", "text": "public function show()\n {\n $fileType = pathinfo($this->_fullPath, PATHINFO_EXTENSION);\n $contentType = '';\n switch ($fileType) {\n case 'jpg':\n $contentType = 'image/jpeg';\n break;\n case 'png':\n $contentType = 'image/png';\n break;\n }\n\n if (!$contentType) {\n return;\n }\n\n header(\"Content-Type: {$contentType}\");\n echo file_get_contents($this->_fullPath);\n }", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.5718969", "text": "public function show($id) {}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.5718969", "text": "public function show($id) {}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.5718969", "text": "public function show($id) {}", "title": "" }, { "docid": "cb9307a32f6d22a33b956aed56db49ba", "score": "0.5717934", "text": "public function show($id)\n\t{\n\t\t//\n\t\t\n\t}", "title": "" }, { "docid": "cb9307a32f6d22a33b956aed56db49ba", "score": "0.5717934", "text": "public function show($id)\n\t{\n\t\t//\n\t\t\n\t}", "title": "" }, { "docid": "f2d9ca8da2ec54369857c7069cea0429", "score": "0.57117283", "text": "public function show()\n\t{\n\t}", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.57057405", "text": "public abstract function display();", "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": "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": "560ae0fd472bad5f1d21beeed5dfbbdd", "score": "0.57012135", "text": "public function show(){}", "title": "" }, { "docid": "d5b3a480445ab1fbb2e08bd3242ca940", "score": "0.56927294", "text": "abstract public function get($resource, $id);", "title": "" }, { "docid": "70b16164ff10f28b63f2a72c5d91047b", "score": "0.56880486", "text": "public function show($id)\n\t{\n\t\t// \n\t}", "title": "" }, { "docid": "7580b6a8a70ffcf0c85b9c5fd2d164c8", "score": "0.56878597", "text": "public function show($id)\n\t{\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": "" } ]
b0e168ede94ff671b16838b0dfa190b0
Create request for operation 'balanceSheetOne'
[ { "docid": "95f583a02bd948eedeb97a4102bb7ac2", "score": "0.6552986", "text": "public function balanceSheetOneRequest($x_apideck_consumer_id = null, $x_apideck_app_id = null, $x_apideck_service_id = null, $pass_through = null, $filter = null, $raw = false)\n {\n\n $resourcePath = '/accounting/balance-sheet';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($pass_through !== null) {\n if('form' === 'deepObject' && is_array($pass_through)) {\n foreach($pass_through as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['pass_through'] = $pass_through;\n }\n }\n // query params\n if ($filter !== null) {\n if('form' === 'deepObject' && is_array($filter)) {\n foreach($filter as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['filter'] = $filter;\n }\n }\n // query params\n if ($raw !== null) {\n if('form' === 'form' && is_array($raw)) {\n foreach($raw as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['raw'] = $raw;\n }\n }\n\n // header params\n if ($x_apideck_consumer_id !== null) {\n $headerParams['x-apideck-consumer-id'] = ObjectSerializer::toHeaderValue($x_apideck_consumer_id);\n }\n // header params\n if ($x_apideck_app_id !== null) {\n $headerParams['x-apideck-app-id'] = ObjectSerializer::toHeaderValue($x_apideck_app_id);\n }\n // header params\n if ($x_apideck_service_id !== null) {\n $headerParams['x-apideck-service-id'] = ObjectSerializer::toHeaderValue($x_apideck_service_id);\n }\n\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\Query::build($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\n }\n\n $defaultHeaders = $this->config->getDefaultHeaders();\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\\Query::build($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" } ]
[ { "docid": "9f4c7a51d94d614cbf8a53021fed4a3c", "score": "0.60971504", "text": "protected function accountGetBalanceRequest()\n {\n\n $resourcePath = '/api/v1/account/balance';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\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 $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 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": "3c2e885ec6a24ffc682f19272a18d11c", "score": "0.58949995", "text": "public function balanceSheet(){\n\t\t$data = new stdClass();\n\t\t$data->title = 'Balance Statement';\n\t\t$data->username = $_SESSION['username'];\n\t\t$data->balance_data = $this->admin_model->balanceStatement();\n\t\t$this->template->load('admin/template_dashboard', 'admin/Financial State Reports/balance_statement', $data);\n\t}", "title": "" }, { "docid": "9eef7403a3fb6834947a65bbea699cff", "score": "0.560579", "text": "protected function walletBalanceRequest()\n {\n\n $resourcePath = '/v1/balance/blockchain';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\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 ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "27100585dcf91e369aa6065fdcdd48dd", "score": "0.5485464", "text": "public function actionCreate() {\r\n\t\t$vip_id = \\Yii::$app->session->get ( VipConst::LOGIN_VIP_USER )->id;\r\n\t\t\r\n\t\t$model = new RefundSheetApply ();\r\n\t\t$model->sheet_type_id = SheetType::ra;\r\n\t\t$model->apply_date = \\app\\common\\utils\\DateUtils::formatDatetime();\r\n\t\t$model->code = SheetType::getCode ( $model->sheet_type_id );\r\n\t\t$model->status = RefundSheetApply::status_need_confirm;\r\n\t\t$model->vip_id = $vip_id;\r\n\t\t\r\n\t\tif ($model->load ( Yii::$app->request->post () )/* && $model->save() */) {\r\n\t\t\t\r\n\t\t\t$transaction = RefundSheetApply::getDb ()->beginTransaction ();\r\n\t\t\ttry {\r\n\t\t\t\t\r\n\t\t\t\tif(empty($model->order_id)){\r\n\t\t\t\t\treturn CommonUtils::json_failed(\"订单编号不能为空!\");\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t$order = SoSheet::findOne($model->order_id);\r\n\t\t\t\tif(empty($order)){\r\n\t\t\t\t\treturn CommonUtils::json_failed(\"订单不存在!\");\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t$soSheetService = new SoSheetService ();\r\n\t\t\t\t$jsonObj = $soSheetService->getSoSheetRefundApplyAuth ( $order, $vip_id ); // 判断权限\r\n\t\t\t\tif (! ($jsonObj->status)) {\r\n\t\t\t\t\treturn CommonUtils::json_failed ( $jsonObj->message );\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// 重新获取订单编号\r\n// \t\t\t\t$model->code = SheetType::getCode ( $model->sheet_type_id, true );\r\n\t\t\t\t\r\n\t\t\t\t/* 保存失败处理 */\r\n\t\t\t\tif (! ($model->save ())) {\r\n\t\t\t\t\t$transaction->rollBack ();\r\n\t\t\t\t\treturn $this->renderCreate ( $model );\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$transaction->commit ();\r\n\t\t\t\t\r\n\t\t\t\treturn CommonUtils::json_success ( $model->id );\r\n\t\t\t} catch ( \\Exception $e ) {\r\n\t\t\t\t$transaction->rollBack ();\r\n\t\t\t\t$model->addError ( 'code', $e->getMessage () );\r\n\t\t\t\treturn $this->renderCreate ( $model );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn CommonUtils::json_success ( $model->id );\r\n\t\t} else {\r\n\t\t\treturn $this->renderCreate ( $model );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "d03473f3cb7d6aff9e69d7f5c1a4d46f", "score": "0.5395911", "text": "public function singleAction() {\n /**\n * AUTHENTICATE\n *\n */\n // These settings are found on google developer console\n $objClientAuth = new Google_Client ();\n $objClientAuth->setApplicationName(self::CLIENT_APP_NAME);\n $objClientAuth->setClientId(self::CLIENT_ID);\n $objClientAuth->setAssertionCredentials(new Google_Auth_AssertionCredentials(\n self::CLIENT_EMAIL, array('https://spreadsheets.google.com/feeds', 'https://docs.google.com/feeds'), file_get_contents(self::CLIENT_KEY_PATH), self::CLIENT_KEY_PW\n ));\n $objClientAuth->getAuth();\n $objClientAuth->getAuth()->refreshTokenWithAssertion();\n\n $objToken = json_decode($objClientAuth->getAccessToken());\n $accessToken = $objToken->access_token;\n\n\n //prepare result - be it error or success\n $result = array();\n\n $serviceRequest = new DefaultServiceRequest($accessToken);\n ServiceRequestFactory::setInstance($serviceRequest);\n if (!isset($serviceRequest)) {\n //echo \"service request created\";\n echo 'error<br/>';\n echo 'Could not connect to google sheets<br/>';\n die;\n }\n\n /**\n * Get spreadsheet by title\n */\n $spreadsheetTitle = $_POST['sheet_name'];\n $spreadsheetService = new SpreadsheetService();\n $spreadsheetFeed = $spreadsheetService->getSpreadsheets();\n $spreadsheet = $spreadsheetFeed->getByTitle($spreadsheetTitle);\n if (!isset($spreadsheet)) {\n //echo \"spreadsheet connected\";\n echo 'error<br/>';\n echo 'There was problem getting google sheet named ' . $_POST['sheet_name'] . '<br/>';\n die;\n }\n\n /**\n * Get particular worksheet of the selected spreadsheet\n */\n $worksheetTitle = $_POST['worksheet_name']; // it's generally named 'Sheet1'\n $worksheetFeed = $spreadsheet->getWorksheets();\n $worksheet = $worksheetFeed->getByTitle($worksheetTitle);\n if (!isset($spreadsheet)) {\n echo 'error<br/>';\n echo 'There was problem getting google sheet named' . $_POST['worksheet_name'] . '<br/>';\n die;\n //echo \"worksheet connected\";\n }\n\n /**\n * Get row lists of worksheet\n */\n $listFeed = $worksheet->getListFeed();\n\n /**\n * Print row lists\n */\n $leadsArray = array();\n foreach ($listFeed->getEntries() as $entries) {\n array_push($leadsArray, $entries->getValues());\n }\n\n try {\n /* obtain the connection manager for doctrine */\n $em = $this->getDoctrine()->getManager();\n\n /*\n * create lead list\n * */\n $date = new \\DateTime();\n $list = new \\Mautic\\LeadBundle\\Entity\\LeadList();\n $list->setName($_POST['list_name']);\n $list->setAlias(str_replace(\" \", \"-\", strtolower($_POST['list_name']).'_'.$date->getTimestamp()));\n $list->setIsGlobal(true);\n $list->setFilters(array());\n $list->setDateAdded(new \\DateTime());\n $list->setDescription($_POST['list_desc']);\n $list->setIsPublished(true);\n $em->persist($list);\n $em->flush();\n\n /**\n * Create Leads and Add them to the newly created list\n *\n **/\n //check for decoded data from the curl response and see if error or data returned proceed if data is returned\n $count = 0;\n if (count($leadsArray) == 0) {\n echo 'No data found';\n } else {\n $conn = $this->container->get('database_connection');\n $leadModel = $this->factory->getModel('lead');\n //loop over the each lead row returned\n foreach ($leadsArray as $l) {\n //proceed only if it has a valid email\n if (isset($l['email']) && strlen(trim($l['email'])) > 0) {\n //check if lead already exists in Mautic, only matches through email, assuming each lead should contain unique email, continue the loop if exists otherwise proceed normally\n $leadsFromDB = $conn->fetchAll(\"select * from \".MAUTIC_TABLE_PREFIX.\"leads where email='\" . $l['email'] . \"'\");\n if ($leadsFromDB!=null && count($leadsFromDB) > 0) {\n /*\n * Do something with lead if it is already existing,\n * with following code you can check for unsubscribed leads or\n * check against any existing lead in existing segment.\n * */\n /**\n * check for unsubscribed\n *\n $isUnsubscribed = $conn->fetchAll(\"SELECT * FROM \".MAUTIC_TABLE_PREFIX.\"lead_donotcontact WHERE lead_id IN (SELECT id FROM \".MAUTIC_TABLE_PREFIX.\"leads WHERE email LIKE '%\". $l['email'] . \"%')\");\n if($isUnsubscribed!=null && count($isUnsubscribed)>0){\n //lead has unsubscribed thus don't add\n continue;\n }\n\n /**\n * check against list based existance\n *\n if(isset($_POST['check_against']) && $_POST['check_against']!=''){\n $isinList = $conn->fetchAll(\"SELECT * FROM \".MAUTIC_TABLE_PREFIX.\"lead_lists_leads WHERE leadlist_id = \".$_POST['check_against'].\" AND lead_id IN (SELECT id FROM \".MAUTIC_TABLE_PREFIX.\"leads WHERE email LIKE '%\". $l['email'] . \"%')\");\n if($isinList!=null && count($isinList)>0){\n //lead exists in the selected list\n continue;\n }\n }*/\n } else {\n $lead = new Lead();\n /*\n * you can ad as many fields you want\n * */\n $leadFields = array(\n 'firstname' => isset($l['firstname'])?$l['firstname']:'',\n 'lastname' => isset($l['lastname'])?$l['lastname']:'',\n 'email' => isset($l['email'])?$l['email']:'',\n 'phone' => isset($l['phone'])?$l['phone']:'',\n 'company' => isset($l['company'])?$l['company']:'',\n 'address1' => isset($l['streetaddress'])?$l['streetaddress']:'',\n 'zipcode' => isset($l['zipcode'])?$l['zipcode']:'',\n 'city' => isset($l['city'])?$l['city']:'',\n 'country' => isset($l['country'])?$l['country']:'',\n 'website' => isset($l['homepage'])?$l['homepage']:''\n );\n\n // Set the lead's data\n $leadModel->setFieldValues($lead, $leadFields);\n\n // Save the entity\n $leadModel->saveEntity($lead);\n\n $leadModel->updateLeadOwner($lead,$_POST['lead_owner']);\n\n //add to list\n $leadModel->addToLists($lead, [$list->getId()]);\n $count++;\n }\n }\n }\n }\n /* adding to list ends */\n } catch (\\Exception $e) {\n $this->get('logger')->info($e->getMessage().' on '.$e->getFile().' '.$e->getLine());\n }\n return $this->redirectToRoute('mautic_segment_index', array('page'=>''));\n }", "title": "" }, { "docid": "b22e10f22ed98180e3c7af84e69aea8f", "score": "0.52035743", "text": "public function store(Request $request)\n {\n \t$this->validate($request,[\n\t\t\t'name'=>'required|max:255',\n\t\t\t'date'=>'required|max:255',\n\t\t\t'amount'=>'required|numeric',\n\t\t\t'mode'=>'required|max:255',\n\t\t]);\n\t\ttry{\n\t\t\t$shared_balance = new SharedBalance;\n\t\t\t$mode = $request->mode;\n\t\t\t\n\t\t\tif($mode == 2)\n\t\t\t{\n\t\t\t\t$this->validate($request,[\n\t\t\t\t\t'txn_date'=>'required|max:255',\n\t\t\t\t]);\n\t\t\t\t\n\t\t\t\t$date = $request->txn_date;\n\t\t\t\t$shared_balance->txn_date = date_format(date_create($date),\"Y-m-d\");\n\t\t\t\t$shared_balance->txn_no = $request->txn_no;\n\t\t\t}\n\t\t\t\n\t\t\telseif($mode == 3)\n\t\t\t{\n\t\t\t\t$date = $request->txn_date;\n\t\t\t\t$shared_balance->txn_date = date_format(date_create($date),\"Y-m-d\");\n\t\t\t\t$shared_balance->txn_no = $request->txn_no;\n\t\t\t\t$shared_balance->acc_no = $request->acc_no;\n\t\t\t\t$shared_balance->ifsc = $request->ifsc;\n\t\t\t}\n\t\t\t\n\t\t\t$date = $request->date;\n\t\t\t$shared_balance->date = date_format(date_create($date),\"Y-m-d\");\n\t\t\t$shared_balance->to_user = $request->name;\n\t\t\t$shared_balance->amount = $request->amount;\n\t\t\t$shared_balance->mode = $request->mode;\n\t\t\t$shared_balance->remark = $request->remarks;\n\t\t\t$shared_balance->user_sys = \\Request::ip();\n\t\t\t$shared_balance->updated_by = Auth::id();\n\t\t\t$shared_balance->created_by = Auth::id();\n\t\t\t$result = $shared_balance->save();\n\t\t\t\n\t\t\t$id = $shared_balance->id;\n\t\t\t$shared_balance = SharedBalance::find($id);\n\t\t\t$shared_balance->txn_id = 'DPO'.$id;\n\t\t\t$result = $shared_balance->save();\n\t\t\t\n\t\t\tif($result){\n\t\t\t\treturn back()->with('success', 'Record added successfully!');\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn back()->with('error', 'Something went wrong!');\n\t\t\t}\n\t\t}\n \tcatch(\\Exception $e){\n\t\t\t$error = $e->getMessage();\n\t\t return back()->with('error', 'Something went wrong! Please contact admin');\n\t\t}\n }", "title": "" }, { "docid": "6ca6dd72205b01f8365ad5416501fa5d", "score": "0.5196642", "text": "public function export(Request $request)\n {\n // Dates (cuen)\n $this->mergeFormDates( ['date_from', 'date_to'], $request );\n\n // abi_r( $request->all(), true );\n\n $payments = $this->payment\n ->filter( $request->all() )\n ->with('paymentable')\n ->with('paymentable.supplier')\n ->with('paymentable.supplier.bankaccount')\n ->where('payment_type', 'payable')\n ->with('bankorder')\n ->orderBy('due_date', 'desc')\n ->get();\n\n // Limit number of records\n if ( ($count=$payments->count()) > 1000 )\n return redirect()->back()\n ->with('error', l('Too many Records for this Query &#58&#58 (:id) ', ['id' => $count], 'layouts'));\n\n // Initialize the array which will be passed into the Excel generator.\n $data = []; \n\n if ( $request->input('date_from_form') && $request->input('date_to_form') )\n {\n $ribbon = 'entre ' . $request->input('date_from_form') . ' y ' . $request->input('date_to_form');\n\n } else\n\n if ( !$request->input('date_from_form') && $request->input('date_to_form') )\n {\n $ribbon = 'hasta ' . $request->input('date_to_form');\n\n } else\n\n if ( $request->input('date_from_form') && !$request->input('date_to_form') )\n {\n $ribbon = 'desde ' . $request->input('date_from_form');\n\n } else\n\n if ( !$request->input('date_from_form') && !$request->input('date_to_form') )\n {\n $ribbon = 'todas';\n\n }\n\n //\n\n $auto_direct_debit = $request->input('auto_direct_debit', -1); // Todos, por defecto!!!\n $ribbon1 = $auto_direct_debit > 0 ? 'Sí' : 'No';\n if ( $auto_direct_debit < 0 ) $ribbon1 = 'Todos';\n\n // Sheet Header Report Data\n $data[] = [Context::getContext()->company->name_fiscal];\n $data[] = ['Recibos de Proveedores -::- '.date('d M Y H:i:s'), '', '', '', '', '', '', '', '', '', '', '', '', '']; //, date('d M Y H:i:s')];\n $data[] = ['Fecha de Vencimiento: ' . $ribbon];\n $data[] = ['Estado: ' . $request->input('status')];\n $data[] = ['Proveedor: ' . '['.$request->input('supplier_id').'] ' . $request->input('autosupplier_name')];\n $data[] = ['Remesable: ' . $ribbon1];\n $data[] = [''];\n\n\n // Define the Excel spreadsheet headers\n $headers = [ \n 'id', 'document_reference', 'supplier_id', 'SUPPLIER_NAME', 'name', \n 'due_date', 'payment_date', 'amount', \n 'payment_type_id', 'PAYMENT_TYPE_NAME', 'auto_direct_debit', \n\n 'status', 'currency_id', 'CURRENCY_NAME', 'notes',\n ];\n\n $data[] = $headers;\n\n $total_amount = 0.0;\n\n // Convert each member of the returned collection into an array,\n // and append it to the payments array.\n foreach ($payments as $payment) {\n // $data[] = $line->toArray();\n $row = [];\n foreach ($headers as $header)\n {\n $row[$header] = $payment->{$header} ?? '';\n }\n// $row['TAX_NAME'] = $category->tax ? $category->tax->name : '';\n\n $row['CURRENCY_NAME'] = optional($payment->currency)->name;\n $row['PAYMENT_TYPE_NAME'] = optional($payment->paymenttype)->name;\n $row['supplier_id'] = optional($payment->supplier)->id;\n $row['SUPPLIER_NAME'] = optional($payment->supplier)->name_regular;\n $row['BANK_NAME'] = optional($payment->bank)->name;\n\n if ($payment->auto_direct_debit && $payment->bankorder )\n $row['auto_direct_debit'] = $payment->bankorder->document_reference;\n\n $row['payment_date'] = $payment->payment_date ? Date::dateTimeToExcel($payment->payment_date) : '';\n\n $row['amount'] = (float) $payment->amount;\n\n $data[] = $row;\n\n $total_amount += $payment->amount;\n }\n\n // Totals\n\n $data[] = [''];\n $data[] = ['', '', '', '', '', '', 'Total:', $total_amount * 1.0];\n\n\n $n = count($data);\n $m = $n - 1;\n\n $styles = [\n 'A8:Q8' => ['font' => ['bold' => true]],\n// \"C$n:C$n\" => ['font' => ['bold' => true, 'italic' => true]],\n \"H$n:H$n\" => ['font' => ['bold' => true]],\n ];\n\n $columnFormats = [\n// 'B' => NumberFormat::FORMAT_TEXT,\n 'F' => NumberFormat::FORMAT_DATE_DDMMYYYY,\n 'G' => NumberFormat::FORMAT_DATE_DDMMYYYY,\n 'H' => NumberFormat::FORMAT_NUMBER_00,\n ];\n\n $merges = ['A1:C1', 'A2:C2', 'A3:C3', 'A4:C4', 'A5:C5', 'A6:C6'];\n\n $sheetTitle = 'Recibos de Proveedores';\n\n $export = new ArrayExport($data, $styles, $sheetTitle, $columnFormats, $merges);\n\n $sheetFileName = $sheetTitle;\n\n // Generate and return the spreadsheet\n return Excel::download($export, $sheetFileName.'.xlsx');\n\n }", "title": "" }, { "docid": "3774f72953d1302aaea1ee3f57ad5a7e", "score": "0.51808244", "text": "protected function channelBalanceRequest()\n {\n\n $resourcePath = '/v1/balance/channels';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\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 ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "2b9581e8fa353f3c7f5f235903dca82d", "score": "0.5099051", "text": "public function casino_get_balance()\n\t{\n\t\t$endpoint = 'casino/get_balance';\n\t\t$request = $this->apirequest($endpoint, array());\n\t\treturn $request;\n\t}", "title": "" }, { "docid": "a8e549572fe81273ec901ece7cbf48fe", "score": "0.50957763", "text": "public function ac_acct_balance()\n {\n $xml = '';\n $xml .= '<?xml version=\"1.0\" encoding=\"UTF-8\"?>';\n $xml .= '<AutoCreate>';\n $xml .= '<Request>';\n $xml .= '<APIUsername>'.$this->username.'</APIUsername>';\n $xml .= '<APIPassword>'.$this->password.'</APIPassword>';\n $xml .= '<Method>acacctbalance</Method>';\n $xml .= '</Request>';\n $xml .= '</AutoCreate>';\n\n $xml_response = $this->get_xml_response($xml);\n\n $simpleXMLObject = new SimpleXMLElement($xml_response);\n $response = $simpleXMLObject->Response;\n\n $result = array();\n $result['Status'] = (string) $response->Status;\n $result['StatusCode'] = (string) $response->StatusCode;\n $balances = array();\n if(isset($response->Balance->Currency)){\n foreach($response->Balance->Currency as $currency){\n $balances[] = array('code'=>(string) $currency->Code, 'balance'=>(string) $currency->Balance); \n }\n }\n $result['balance'] = $balances;\n if (!empty($response->StatusMessage)) {\n $result['StatusMessage'] = (string) $response->StatusMessage;\n }\n if (!empty($response->ErrorMessageCode)) {\n $result['ErrorMessageCode'] = (string) $response->ErrorMessageCode;\n }\n if (!empty($response->ErrorMessage)) {\n $result['ErrorMessage'] = (string) $response->ErrorMessage;\n }\n\n return $result;\n }", "title": "" }, { "docid": "cec56afcb0840bf3d43472406a194ef5", "score": "0.5069842", "text": "protected function balancedataArray(Request $request)\n {\n $hire_accept_count = $this->search(\n $request,\n DB::table('hire')\n ->where(\"accept\", 1),\n \"matching_date\"\n )->count();\n\n $deposit_count = $this->search(\n $request,\n DB::table('payment')\n ->whereIn(\"status\", array(0, 4)),\n \"created_time\"\n )->count();\n\n $deposit_amount = $this->round(\n $this->search(\n $request,\n DB::table('payment')\n ->whereIn(\"status\", array(0, 4)),\n \"created_time\"\n )->sum('balance')\n );\n\n $deposit_nonpay_amount = $this->round(\n $this->search(\n $request,\n DB::table('payment')\n ->where(\"status\", 4),\n \"created_time\"\n )->sum('balance')\n );\n\n $deposit_payed_amount = $this->round(\n $this->search(\n $request,\n DB::table('payment')\n ->where(\"status\", 0),\n \"created_time\"\n )->sum('balance')\n );\n\n if ($deposit_amount)\n $deposit_pay_rate = $this->round($deposit_payed_amount / $deposit_amount * 100);\n else\n $deposit_pay_rate = 0;\n\n $subsidy_count = $this->search(\n $request,\n DB::table('payment')\n ->whereIn(\"status\", array(2, 5)),\n \"created_time\"\n )->count();\n\n $subsidy_amount = $this->round(\n $this->search(\n $request,\n DB::table('payment')\n ->whereIn(\"status\", array(2, 5)),\n \"created_time\"\n )->sum('balance')\n );\n\n $subsidy_nonpay_amount = $this->round(\n $this->search(\n $request,\n DB::table('payment')\n ->where(\"status\", 5),\n \"created_time\"\n )->sum('balance')\n );\n\n $subsidy_payed_amount = $this->round(\n $this->search(\n $request,\n DB::table('payment')\n ->where(\"status\", 2),\n \"created_time\"\n )->sum('balance')\n );\n\n if ($subsidy_amount)\n $subsidy_pay_rate = $this->round($subsidy_payed_amount / $subsidy_amount * 100);\n else\n $subsidy_pay_rate = 0;\n\n $freeuser_count = $this->search(\n $request,\n DB::table('users')\n ->where(\"payroll\", 0),\n \"created_at\"\n )->count();\n\n $payuser_count = $this->search(\n $request,\n DB::table('users')\n ->where(\"payroll\", 1),\n \"created_at\"\n )->count();\n\n $payuser_fee_amount = $this->round(\n $this->search(\n $request,\n DB::table('payment')\n ->where(\"sumary_id\", 0)\n ->where(\"status\", 1),\n \"created_time\"\n )->sum('balance')\n );\n\n $payoption_count = $this->search(\n $request,\n DB::table('payment')\n ->where(\"sumary_id\", 1)\n ->where(\"status\", 1),\n \"created_time\"\n )->count();\n\n $payoption_amount = $this->round(\n $this->search(\n $request,\n DB::table('payment')\n ->where(\"sumary_id\", 1)\n ->where(\"status\", 1),\n \"created_time\"\n )->sum('balance')\n );\n\n $advert_use_count = $this->search(\n $request,\n DB::table('payment')\n ->where(\"sumary_id\", 2)\n ->where(\"status\", 1),\n \"created_time\"\n )->count();\n\n $advert_use_amount = $this->round(\n $this->search(\n $request,\n DB::table('payment')\n ->where(\"sumary_id\", 2)\n ->where(\"status\", 1),\n \"created_time\"\n )->sum('balance')\n );\n\n return array(\n \"hire_accept_count\" => $hire_accept_count,\n\n \"deposit_count\" => $deposit_count,\n \"deposit_amount\" => $deposit_amount,\n \"deposit_nonpay_amount\" => $deposit_nonpay_amount,\n \"deposit_payed_amount\" => $deposit_payed_amount,\n \"deposit_pay_rate\" => $deposit_pay_rate,\n\n \"subsidy_count\" => $subsidy_count,\n \"subsidy_amount\" => $subsidy_amount,\n \"subsidy_nonpay_amount\" => $subsidy_nonpay_amount,\n \"subsidy_payed_amount\" => $subsidy_payed_amount,\n \"subsidy_pay_rate\" => $subsidy_pay_rate,\n\n \"freeuser_count\" => $freeuser_count,\n \"payuser_count\" => $payuser_count,\n \"payuser_fee_amount\" => $payuser_fee_amount,\n\n \"payoption_count\" => $payoption_count,\n \"payoption_amount\" => $payoption_amount,\n\n \"advert_use_count\" => $advert_use_count,\n \"advert_use_amount\" => $advert_use_amount,\n );\n }", "title": "" }, { "docid": "fa7faeff7514ca177c42af152282e587", "score": "0.5010204", "text": "public function balance() {\r\n\t\t$post = $this->uri_cont.\"balance?api_key=\".$this->api_key.\"&user=\".$this->user;\r\n\t\treturn $this->curl($post);\r\n\t}", "title": "" }, { "docid": "8f932a29b26ea17b5df2c7d0943cd499", "score": "0.50032836", "text": "function request_withdraw( $request){ //widthraw_request\n\n\t\tglobal $user_ID;\n\t\t$amout = (float) $request['withdraw_amout'];\n\t\t$method = $request['withdraw_method'];\n\t\t$notes = $request['withdraw_note'];\n\t\t$payment_method = $this->get_withdraw_info();\n\n\t\t$ballance = $this->get_ballance($user_ID);\n\n\t\t$method_detail = array('paypay' => '', 'bank_account' => array( 'account_name' => '', 'bank_name' => '', 'account_number' => '' ) );\n\n\t\tif( empty( $payment_method->$method ) ){\n\t\t\treturn new WP_Error( 'unset_method', __( \"Please set your payment method to withdraw\", \"boxtheme\" ) );\n\t\t}\n\n\n\n\t\tif( $amout < 10 )\n\t\t\treturn new WP_Error( 'inlimitted', __( \"Your amout must bigger than 10$\", \"boxtheme\" ) );\n\n\t\tif( $ballance->available < $amout ){\n\t\t\treturn new WP_Error( 'not_enough', sprintf(__( \"You only can withdraw less than %s.\", \"boxtheme\" ), box_get_price( $ballance->available) ) );\n\t\t}\n\t\t$this->subtract_credit_available($user_ID, $amout); //deducte in available credit of this user.\n\t\t//create order\n\t\t$curren_user = wp_get_current_user();\n\n\t\t$method_text = '';\n\t\tif( $method == 'paypal_email'){\n\t\t\t$method_text = '<p> &nbsp; &nbsp; PayPal email: '.$payment_method->paypal_email.'</p>';\n\t\t} else {\n\t\t\t// array('account_name' => 'empty', 'account_number' => '', 'bank_name'=>'' );\n\t\t\t$method_detail = (object)$payment_method->$method;\n\t\t\t$method_text = '<p> &nbsp; &nbsp; Bank name: '.$method_detail->bank_name.'</p>';\n\t\t\t$method_text .= '<p> &nbsp; &nbsp; Account name: '.$method_detail->account_name.'</p>';\n\t\t\t$method_text .= '<p> &nbsp; &nbsp; Account number: '.$method_detail->account_number.'</p>';\n\t\t}\n\t\t$mail = BX_Option::get_instance()->get_mail_settings('request_withdrawal');\n\t\t$subject = str_replace('#blog_name', get_bloginfo('name'), stripslashes($mail->subject) );\n\t\t$content = str_replace('#amount', $amout, $mail->content);\n\t\t$content = str_replace('#method', $method, $content);\n\t\t$content = str_replace('#notes', $notes, $content);\n\t\t$content = str_replace('#detail', $method_text, $content);\n\n\t\t$args_wdt = array(\n\t\t\t'post_title' => sprintf( __('%s send a request withdraw: %f ','boxtheme'), $curren_user->user_login, $amout ),\n\t\t\t'amout' => $amout,\n\t\t\t'order_type' => 'withdraw' ,\n\t\t\t'payment_type' => 'none' ,\n\t\t\t'post_content' => $content,\n\t\t);\n\n\t\t$order_id = BX_Order::get_instance()->create_custom_pending_order( $args_wdt );\n\t\t$admin_content = $content . '<p> Link to check detail: <a href=\"'.get_edit_post_link($order_id).'\">link</a></p>';\n\n\t\t$to = get_option('admin_email', true);\n\t\tbox_mail( $to, $subject, $admin_content ); // mail to admin.\n\t\t//$subject = __( 'You have just sen a requested to withdraw.','boxtheme' );\n\t\t//box_mail( $curren_user->user_email, $subject, $content ); // mail to freelancer.\n\t\treturn true;\n\t}", "title": "" }, { "docid": "c0c3b2278a1d343a839f67f7e383b890", "score": "0.4987039", "text": "function balanceSheetReport($from = null, $to = null, $is_financial = 0){\n global $conn;\n global $pharmacy_id;\n global $financial_id;\n // left array\n $data['left']['capitalAccount']['name'] = 'Capital Account';\n $data['left']['capitalAccount']['totalamount'] = 0;\n $data['left']['capitalAccount']['data'] = [];\n\n $data['left']['loansLiability']['name'] = 'Loans (Liability)';\n $data['left']['loansLiability']['totalamount'] = 0;\n $data['left']['loansLiability']['data'] = [];\n\n $data['left']['currentLiability']['name'] = 'Current Liabilities';\n $data['left']['currentLiability']['totalamount'] = 0;\n $data['left']['currentLiability']['data'] = [];\n\n $data['left']['suspenseAcc']['name'] = 'Suspense A/c';\n $data['left']['suspenseAcc']['totalamount'] = 0;\n $data['left']['suspenseAcc']['data'] = [];\n\n /*$data['left']['profitAndLossAcc']['name'] = 'Profit & Loss A/c';\n $data['left']['profitAndLossAcc']['totalamount'] = 0;\n $data['left']['profitAndLossAcc']['data'] = [];*/\n // right array\n $data['right']['fixedAssets']['name'] = 'Fixed Assets';\n $data['right']['fixedAssets']['totalamount'] = 0;\n $data['right']['fixedAssets']['data'] = [];\n\n $data['right']['investment']['name'] = 'Investments';\n $data['right']['investment']['totalamount'] = 0;\n $data['right']['investment']['data'] = [];\n\n $data['right']['currentAssets']['name'] = 'Current Assets';\n $data['right']['currentAssets']['totalamount'] = 0;\n $data['right']['currentAssets']['data'] = [];\n \n /*----------CAPITAL ACCOUNT START-------*/\n // get all capital account\n $capitalAccQ = \"SELECT id, name, opening_balance, opening_balance_type FROM ledger_master WHERE pharmacy_id = '\".$pharmacy_id.\"' AND group_id = 2 ORDER BY name\";\n $capitalAccR = mysqli_query($conn, $capitalAccQ);\n if($capitalAccR && mysqli_num_rows($capitalAccR) > 0){\n while ($capitalAccRow = mysqli_fetch_assoc($capitalAccR)) {\n $tmp1['id'] = $capitalAccRow['id'];\n $tmp1['name'] = (isset($capitalAccRow['name'])) ? $capitalAccRow['name'] : '';\n $running1 = countRunningBalance($capitalAccRow['id'], $from, $to, $is_financial);\n $tmp1['opening_balance'] = (isset($running1['opening_balance']) && $running1['opening_balance'] != '') ? $running1['opening_balance'] : 0;\n $tmp1['closing_balance'] = (isset($running1['running_balance']) && $running1['running_balance'] != '') ? $running1['running_balance'] : 0;\n $data['left']['capitalAccount']['totalamount'] += $tmp1['closing_balance'];\n $data['left']['capitalAccount']['data'][] = $tmp1;\n }\n }\n /*----------CAPITAL ACCOUNT END---------*/\n\n\n /*----------LOAN LIABILITY START-------*/\n // get all loan liability account\n $loanLiabilityQ = \"SELECT id, name, opening_balance, opening_balance_type FROM ledger_master WHERE pharmacy_id = '\".$pharmacy_id.\"' AND group_id = 21 ORDER BY name\";\n $loanLiabilityR = mysqli_query($conn, $loanLiabilityQ);\n if($loanLiabilityR && mysqli_num_rows($loanLiabilityR) > 0){\n while ($loanLiabilityRow = mysqli_fetch_assoc($loanLiabilityR)) {\n $tmp2['id'] = $loanLiabilityRow['id'];\n $tmp2['name'] = (isset($loanLiabilityRow['name'])) ? $loanLiabilityRow['name'] : '';\n $running2 = countRunningBalance($loanLiabilityRow['id'], $from, $to, $is_financial);\n $tmp2['opening_balance'] = (isset($running2['opening_balance']) && $running2['opening_balance'] != '') ? $running2['opening_balance'] : 0;\n $tmp2['closing_balance'] = (isset($running2['running_balance']) && $running2['running_balance'] != '') ? $running2['running_balance'] : 0;\n $data['left']['loansLiability']['totalamount'] += $tmp2['closing_balance'];\n $data['left']['loansLiability']['data'][] = $tmp2;\n }\n }\n /*----------LOAN LIABILITY END---------*/\n\n /*----------CURRENT LIABILITY START-------*/\n // COUNT TOTAL SUNDARY CREDITOR RUNNING BALANCE AS PER TALK TO HIRENBHAI\n $tmp3['id'] = '';\n $tmp3['name'] = 'Sundry Creditors';\n $vendorData = getGroupWiseClosingBalance(14,$from,$to,$is_financial);\n \n $tmp3['opening_balance'] = (isset($vendorData['opening_balance']) && $vendorData['opening_balance'] != '') ? $vendorData['opening_balance'] : 0;\n $tmp3['closing_balance'] = (isset($vendorData['running_balance']) && $vendorData['running_balance'] != '') ? $vendorData['running_balance'] : 0;\n $data['left']['currentLiability']['totalamount'] += $tmp3['closing_balance'];\n $data['left']['currentLiability']['data'][] = $tmp3;\n \n // get all current liability account\n /*$currentLiabilityQ = \"SELECT id, name, opening_balance, opening_balance_type FROM ledger_master WHERE pharmacy_id = '\".$pharmacy_id.\"' AND group_id = 11 ORDER BY name\";\n $currentLiabilityR = mysqli_query($conn, $currentLiabilityQ);\n if($currentLiabilityR && mysqli_num_rows($currentLiabilityR) > 0){\n while ($currentLiabilityRow = mysqli_fetch_assoc($currentLiabilityR)) {\n $tmp3['id'] = $currentLiabilityRow['id'];\n $tmp3['name'] = (isset($currentLiabilityRow['name'])) ? $currentLiabilityRow['name'] : '';\n $running3 = countRunningBalance($currentLiabilityRow['id'], $from, $to);\n $tmp3['opening_balance'] = (isset($running3['opening_balance']) && $running3['opening_balance'] != '') ? $running3['opening_balance'] : 0;\n $tmp3['closing_balance'] = (isset($running3['running_balance']) && $running3['running_balance'] != '') ? $running3['running_balance'] : 0;\n $data['left']['currentLiability']['totalamount'] += $tmp3['closing_balance'];\n $data['left']['currentLiability']['data'][] = $tmp3;\n }\n }*/\n /*----------CURRENT LIABILITY END---------*/\n\n /*----------SUNSPENSE ACCOUNT START-------*/\n // get all suspense account\n $sunspenseAccQ = \"SELECT id, name, opening_balance, opening_balance_type FROM ledger_master WHERE pharmacy_id = '\".$pharmacy_id.\"' AND group_id = 28 ORDER BY name\";\n $sunspenseAccR = mysqli_query($conn, $sunspenseAccQ);\n if($sunspenseAccR && mysqli_num_rows($sunspenseAccR) > 0){\n while ($sunspenseAccRow = mysqli_fetch_assoc($sunspenseAccR)) {\n $tmp4['id'] = $sunspenseAccRow['id'];\n $tmp4['name'] = (isset($sunspenseAccRow['name'])) ? $sunspenseAccRow['name'] : '';\n $running4 = countRunningBalance($sunspenseAccRow['id'], $from, $to, $is_financial);\n $tmp4['opening_balance'] = (isset($running4['opening_balance']) && $running4['opening_balance'] != '') ? $running4['opening_balance'] : 0;\n $tmp4['closing_balance'] = (isset($running4['running_balance']) && $running4['running_balance'] != '') ? $running4['running_balance'] : 0;\n $data['left']['suspenseAcc']['totalamount'] += $tmp4['closing_balance'];\n $data['left']['suspenseAcc']['data'][] = $tmp4;\n }\n }\n /*----------SUNSPENSE ACCOUNT END---------*/\n\n\n /*----------FIXED ASSETS START-------*/\n // get all fixed assets\n $fixedAssetsQ = \"SELECT id, name, opening_balance, opening_balance_type FROM ledger_master WHERE pharmacy_id = '\".$pharmacy_id.\"' AND group_id = 17 ORDER BY name\";\n $fixedAssetsR = mysqli_query($conn, $fixedAssetsQ);\n if($fixedAssetsR && mysqli_num_rows($fixedAssetsR) > 0){\n while ($fixedAssetsRow = mysqli_fetch_assoc($fixedAssetsR)) {\n $tmp5['id'] = $fixedAssetsRow['id'];\n $tmp5['name'] = (isset($fixedAssetsRow['name'])) ? $fixedAssetsRow['name'] : '';\n $running5 = countRunningBalance($fixedAssetsRow['id'], $from, $to, $is_financial);\n $tmp5['opening_balance'] = (isset($running5['opening_balance']) && $running5['opening_balance'] != '') ? $running5['opening_balance'] : 0;\n $tmp5['closing_balance'] = (isset($running5['running_balance']) && $running5['running_balance'] != '') ? $running5['running_balance'] : 0;\n $data['right']['fixedAssets']['totalamount'] += $tmp5['closing_balance'];\n $data['right']['fixedAssets']['data'][] = $tmp5;\n }\n }\n /*----------FIXED ASSETS END---------*/\n\n\n /*----------INVESTMENT START-------*/\n // get all investment accounts \n $investmentQ = \"SELECT id, name, opening_balance, opening_balance_type FROM ledger_master WHERE pharmacy_id = '\".$pharmacy_id.\"' AND group_id = 20 ORDER BY name\";\n $investmentR = mysqli_query($conn, $investmentQ);\n if($investmentR && mysqli_num_rows($investmentR) > 0){\n while ($investmentRow = mysqli_fetch_assoc($investmentR)) {\n $tmp6['id'] = $investmentRow['id'];\n $tmp6['name'] = (isset($investmentRow['name'])) ? $investmentRow['name'] : '';\n $running6 = countRunningBalance($investmentRow['id'], $from, $to, $is_financial);\n $tmp6['opening_balance'] = (isset($running6['opening_balance']) && $running6['opening_balance'] != '') ? $running6['opening_balance'] : 0;\n $tmp6['closing_balance'] = (isset($running6['running_balance']) && $running6['running_balance'] != '') ? $running6['running_balance'] : 0;\n $data['right']['investment']['totalamount'] += $tmp6['closing_balance'];\n $data['right']['investment']['data'][] = $tmp6;\n }\n }\n /*----------INVESTMENT END---------*/\n\n\n /*----------CURRENT ASSETS START-------*/\n \n // COUNT TOTAL CLOSING BALANCE FOR Closing Stock, Cash-in-Hand and Bank Accounts AS PER TALK TO HIRENBHAI\n $tmp7['id'] = '';\n $totalClosingStock = getTotalClosingStock($from, $to, $is_financial);\n $method = (isset($totalClosingStock['mothod']) && $totalClosingStock['mothod'] != '') ? ' ('.$totalClosingStock['mothod'].')' : '';\n $tmp7['name'] = 'Closing Stock'.$method;\n $tmp7['opening_balance'] = 0;\n $tmp7['closing_balance'] = (isset($totalClosingStock['closing_stock']) && $totalClosingStock['closing_stock'] != '') ? $totalClosingStock['closing_stock'] : 0;\n $data['right']['currentAssets']['totalamount'] += $tmp7['closing_balance'];\n $data['right']['currentAssets']['data'][] = $tmp7;\n \n $tmp77['id'] = '';\n $tmp77['name'] = 'Cash-in-Hand';\n $totalcashinhand = countCashRunningBalance($from, $to, $is_financial);\n $tmp77['opening_balance'] = (isset($totalcashinhand['opening_balance']) && $totalcashinhand['opening_balance'] != '') ? $totalcashinhand['opening_balance'] : 0;\n $tmp77['closing_balance'] = (isset($totalcashinhand['running_balance']) && $totalcashinhand['running_balance'] != '') ? $totalcashinhand['running_balance'] : 0;\n $data['right']['currentAssets']['totalamount'] += $tmp77['closing_balance'];\n $data['right']['currentAssets']['data'][] = $tmp77;\n \n $tmp777['id'] = '';\n $tmp777['name'] = 'Bank Accounts';\n $totalbankaccount = allBankRunningBalance($from, $to, $is_financial);\n $tmp777['opening_balance'] = 0;\n $tmp777['closing_balance'] = (isset($totalbankaccount) && $totalbankaccount != '') ? $totalbankaccount : 0;\n $data['right']['currentAssets']['totalamount'] += $tmp777['closing_balance'];\n $data['right']['currentAssets']['data'][] = $tmp777;\n \n // get all current assets accounts \n /*$currentAssetsQ = \"SELECT id, name, opening_balance, opening_balance_type FROM ledger_master WHERE pharmacy_id = '\".$pharmacy_id.\"' AND group_id = 4 ORDER BY name\";\n $currentAssetsR = mysqli_query($conn, $currentAssetsQ);\n if($currentAssetsR && mysqli_num_rows($currentAssetsR) > 0){\n while ($currentAssetsRow = mysqli_fetch_assoc($currentAssetsR)) {\n $tmp7['id'] = $currentAssetsRow['id'];\n $tmp7['name'] = (isset($currentAssetsRow['name'])) ? $currentAssetsRow['name'] : '';\n $running7 = countRunningBalance($currentAssetsRow['id'], $from, $to);\n $tmp7['opening_balance'] = (isset($running7['opening_balance']) && $running7['opening_balance'] != '') ? $running7['opening_balance'] : 0;\n $tmp7['closing_balance'] = (isset($running7['running_balance']) && $running7['running_balance'] != '') ? $running7['running_balance'] : 0;\n $data['right']['currentAssets']['totalamount'] += $tmp7['closing_balance'];\n $data['right']['currentAssets']['data'][] = $tmp7;\n }\n }*/\n /*----------CURRENT ASSETS END---------*/\n\n return $data;\n }", "title": "" }, { "docid": "ac8a87de7f12695f6f70574831a9f43b", "score": "0.49789926", "text": "public function create() {\n $client = new RestClient(static::ENDPOINT);\n $client->setHeader('Authorization', 'ShippoToken ' . $this->privateKey);\n $client->sendJSON(true);\n $client->set('object_purpose', 'PURCHASE');\n $client->set('address_from', $this->shipmentData->getFromAddress());\n $client->set('address_to', $this->shipmentData->getToAddress());\n $client->set('parcel', $this->shipmentData->getParcel());\n $client->set('reference_1', $this->shipmentData->reference_1);\n $client->set('reference_2', $this->shipmentData->reference_2);\n $client->set('metadata', $this->shipmentData->metadata);\n $client->set('async', 'false');\n $client->callPost('shipments');\n $this->rateList = $client->getResults();\n }", "title": "" }, { "docid": "86a7176d7569868339afbb170f972a27", "score": "0.49686456", "text": "public function createShipmentAndGetWaybill();", "title": "" }, { "docid": "77ed7a48d4c655b30cfe7f46ae62519a", "score": "0.4954339", "text": "public function store(Request $request)\n {\n if (!$request->ajax()) return abort(403);\n $rules = [\n \"salary_sheet_id\" => 'required'\n ];\n $this->validate($request, $rules);\n $id = Crypt::decrypt($request->salary_sheet_id);\n DB::connection('sd')->beginTransaction();\n try {\n $salary_sheet = SalarySheetHistory::findOrFail($id);\n $deposit = $salary_sheet->deposit;\n $append_extra = $request->append_extra;\n if ($salary_sheet->disburst_status == 'done') throw new \\Exception(\"Salary Already disburse\");\n if (!$deposit) throw new \\Exception(\"No deposit found for disbursement\");\n /*$salary_histories = $salary_sheet->salaryHistory()->with('ansar.account')->where('status','pending')->whereHas('ansar.account',function ($q){\n\n })->get();*/\n $salary_histories = $salary_sheet->salaryHistory()->with('ansar.account')->get();\n if (!count($salary_histories)) throw new \\Exception(\"No ansar account info found for disbursement\");\n if ($salary_sheet->generated_type == \"salary\") {\n $disburse_amount = $salary_histories->sum('amount') + $salary_sheet->summery[\"reg_amount\"] + $salary_sheet->summery[\"share_amount\"] + $salary_sheet->summery[\"welfare_fee\"] + $salary_sheet->summery[\"revenue_stamp\"] + ($append_extra ? $salary_sheet->summery[\"extra\"] : 0);\n } else {\n $disburse_amount = $salary_histories->sum('amount');\n }\n if ($disburse_amount > $deposit->paid_amount) throw new \\Exception(\"Not enough deposit available for disbursement\");\n $excel_sheet_data = [];\n $salary_sheet->update(['disburst_status' => 'done']);\n foreach ($salary_histories as $history) {\n $history->update(['status' => 'paid']);\n array_push($excel_sheet_data, [\n 'ansar_id' => $history->ansar_id,\n 'rank' => $history->ansar->designation->name_eng,\n 'ansar_name' => $history->ansar->ansar_name_eng,\n 'kpi_name' => $history->kpi->kpi_name,\n 'amount' => $history->amount,\n 'month' => $salary_sheet->generated_for_month,\n 'account_no' => $history->ansar->account ? $history->ansar->account->getAccountNo() : 'n\\a',\n 'account_type' => $history->ansar->account ? $history->ansar->account->getBankName() : 'n\\a',\n ]);\n }\n $salary_sheet->disburseLog()->create([\n \"kpi_id\" => $salary_sheet->kpi_id,\n \"total_disburst_amount\" => $disburse_amount,\n \"action_user_id\" => auth()->user()->id,\n \"extra_amount_include\" => $append_extra ? 1 : 0,\n \"dg_account_amount\" => $salary_sheet->generated_type == \"salary\" && $append_extra ? (($salary_sheet->summery[\"extra\"] * DemandConstantFacdes::getValue('DGEP')->cons_value) / 100) : null,\n \"rc_account_amount\" => $salary_sheet->generated_type == \"salary\" && $append_extra ? (($salary_sheet->summery[\"extra\"] * DemandConstantFacdes::getValue('RCEP')->cons_value) / 100) : null,\n \"dc_account_amount\" => $salary_sheet->generated_type == \"salary\" ? ($append_extra ? (($salary_sheet->summery[\"extra\"] * DemandConstantFacdes::getValue('DCEP')->cons_value) / 100) + $salary_sheet->summery[\"revenue_stamp\"] : $salary_sheet->summery[\"revenue_stamp\"]) : null,\n \"welfare_account_amount\" => $salary_sheet->generated_type == \"salary\" ? $salary_sheet->summery[\"welfare_fee\"] : null,\n \"share_account_amount\" => $salary_sheet->generated_type == \"salary\" ? $salary_sheet->summery[\"share_amount\"] : null,\n \"regimental_account_amount\" => $salary_sheet->generated_type == \"salary\" ? $salary_sheet->summery[\"reg_amount\"] : null,\n \"extra_amount\" => $salary_sheet->generated_type == \"salary\" ? $salary_sheet->summery[\"extra\"] : null,\n ]);\n $collection = collect($excel_sheet_data)->groupBy('account_type');\n// return $collection;\n $file_path = storage_path('exports/' . $salary_sheet->kpi->id);\n if (!File::exists($file_path)) File::makeDirectory($file_path);\n $files = [];\n foreach ($collection as $key => $value) {\n $f_name_excel = Excel::create($key == 'n\\a' ? \"no_bank_info\" : $key, function ($excel) use ($value) {\n\n $excel->sheet('sheet1', function ($sheet) use ($value) {\n $sheet->setAutoSize(false);\n $sheet->setWidth('A', 5);\n $sheet->loadView('SD::salary_disburse.export', ['datas' => $value]);\n });\n })->save('xls', $file_path, true);\n $f_name_pdf = $file_path . \"/\" . ($key == 'n\\a' ? \"no_bank_info\" : $key) . \".pdf\";\n SnappyPdf::loadView('SD::salary_disburse.export', ['datas' => $value])->save($f_name_pdf);\n array_push($files, $f_name_excel);\n array_push($files, $f_name_pdf);\n }\n $distribution_to_different_account = [];\n if ($salary_sheet->generated_type == \"salary\") {\n if ($append_extra) {\n $distribution_to_different_account[0][\"account_name\"] = \"DG`s Account\";\n $distribution_to_different_account[0][\"account_no\"] = BankAccountList::getAccount(\"DG\");\n $distribution_to_different_account[0][\"amount\"] = sprintf(\"%.2f\", (($salary_sheet->summery[\"extra\"] * DemandConstantFacdes::getValue('DGEP')->cons_value) / 100));\n $distribution_to_different_account[0][\"month\"] = $salary_sheet->generated_for_month;\n $distribution_to_different_account[0][\"branch_name\"] = \"\";\n $distribution_to_different_account[0][\"bank_name\"] = \"Dutch-Bangla Bank Limited\";\n\n $distribution_to_different_account[1][\"account_name\"] = \"RC`s Account\";\n $distribution_to_different_account[1][\"account_no\"] = $salary_sheet->kpi->division->rc->userProfile->bank_account_no;\n $distribution_to_different_account[1][\"branch_name\"] = $salary_sheet->kpi->division->rc->userProfile->branch_name;\n $distribution_to_different_account[1][\"amount\"] = sprintf(\"%.2f\", (($salary_sheet->summery[\"extra\"] * DemandConstantFacdes::getValue('RCEP')->cons_value) / 100));\n $distribution_to_different_account[1][\"month\"] = $salary_sheet->generated_for_month;\n $distribution_to_different_account[1][\"bank_name\"] = $salary_sheet->kpi->division->rc->userProfile->bank_name;\n\n $distribution_to_different_account[2][\"account_name\"] = \"DC`s Account\";\n $distribution_to_different_account[2][\"account_no\"] = $salary_sheet->kpi->unit->dc->userProfile->bank_account_no;\n $distribution_to_different_account[2][\"branch_name\"] = $salary_sheet->kpi->unit->dc->userProfile->branch_name;\n $distribution_to_different_account[2][\"bank_name\"] = $salary_sheet->kpi->unit->dc->userProfile->bank_name;\n $distribution_to_different_account[2][\"amount\"] = sprintf(\"%.2f\", (($salary_sheet->summery[\"extra\"] * DemandConstantFacdes::getValue('DCEP')->cons_value) / 100) + $salary_sheet->summery[\"revenue_stamp\"]);\n $distribution_to_different_account[2][\"month\"] = $salary_sheet->generated_for_month;\n\n $distribution_to_different_account[3][\"account_name\"] = \"WELFARE Account\";\n $distribution_to_different_account[3][\"account_no\"] = BankAccountList::getAccount(\"WELFARE\");\n $distribution_to_different_account[3][\"amount\"] = $salary_sheet->summery[\"welfare_fee\"];\n $distribution_to_different_account[3][\"branch_name\"] = '';\n $distribution_to_different_account[3][\"month\"] = $salary_sheet->generated_for_month;\n $distribution_to_different_account[3][\"bank_name\"] = \"Dutch-Bangla Bank Limited\";\n\n $distribution_to_different_account[4][\"account_name\"] = \"REGIMENTAL Account\";\n $distribution_to_different_account[4][\"account_no\"] = BankAccountList::getAccount(\"REGIMENTAL\");\n $distribution_to_different_account[4][\"amount\"] = $salary_sheet->summery[\"reg_amount\"];\n $distribution_to_different_account[4][\"month\"] = $salary_sheet->generated_for_month;\n $distribution_to_different_account[4][\"branch_name\"] = '';\n $distribution_to_different_account[4][\"bank_name\"] = 'Dutch-Bangla Bank Limited';\n\n $distribution_to_different_account[5][\"account_name\"] = \"SHARE Account\";\n $distribution_to_different_account[5][\"account_no\"] = BankAccountList::getAccount(\"SHARE\");\n $distribution_to_different_account[5][\"amount\"] = $salary_sheet->summery[\"share_amount\"];\n $distribution_to_different_account[5][\"month\"] = $salary_sheet->generated_for_month;\n $distribution_to_different_account[5][\"branch_name\"] = '';\n $distribution_to_different_account[5][\"bank_name\"] = 'Dutch-Bangla Bank Limited';\n } else {\n $distribution_to_different_account[1][\"account_name\"] = \"WELFARE Account\";\n $distribution_to_different_account[1][\"account_no\"] = BankAccountList::getAccount(\"WELFARE\");\n $distribution_to_different_account[1][\"amount\"] = $salary_sheet->summery[\"welfare_fee\"];\n $distribution_to_different_account[1][\"month\"] = $salary_sheet->generated_for_month;\n $distribution_to_different_account[1][\"branch_name\"] = '';\n $distribution_to_different_account[1][\"bank_name\"] = 'Dutch-Bangla Bank Limited';\n\n $distribution_to_different_account[2][\"account_name\"] = \"REGIMENTAL Account\";\n $distribution_to_different_account[2][\"account_no\"] = BankAccountList::getAccount(\"REGIMENTAL\");\n $distribution_to_different_account[2][\"amount\"] = $salary_sheet->summery[\"reg_amount\"];\n $distribution_to_different_account[2][\"month\"] = $salary_sheet->generated_for_month;\n $distribution_to_different_account[2][\"branch_name\"] = '';\n $distribution_to_different_account[2][\"bank_name\"] = 'Dutch-Bangla Bank Limited';\n\n $distribution_to_different_account[3][\"account_name\"] = \"SHARE Account\";\n $distribution_to_different_account[3][\"account_no\"] = BankAccountList::getAccount(\"SHARE\");\n $distribution_to_different_account[3][\"amount\"] = $salary_sheet->summery[\"share_amount\"];\n $distribution_to_different_account[3][\"month\"] = $salary_sheet->generated_for_month;\n $distribution_to_different_account[3][\"branch_name\"] = '';\n $distribution_to_different_account[3][\"bank_name\"] = 'Dutch-Bangla Bank Limited';\n\n $distribution_to_different_account[0][\"account_name\"] = \"DC`s Account\";\n $distribution_to_different_account[0][\"account_no\"] = $salary_sheet->kpi->unit->dc->userProfile->bank_account_no;\n $distribution_to_different_account[0][\"amount\"] = $salary_sheet->summery[\"revenue_stamp\"];\n $distribution_to_different_account[0][\"month\"] = $salary_sheet->generated_for_month;\n $distribution_to_different_account[0][\"branch_name\"] = $salary_sheet->kpi->unit->dc->branch_name;\n $distribution_to_different_account[0][\"bank_name\"] = $salary_sheet->kpi->unit->dc->bank_name;\n }\n\n $f_name_excel = Excel::create(\"distribution_to_different_account\", function ($excel) use ($distribution_to_different_account) {\n\n $excel->sheet('sheet1', function ($sheet) use ($distribution_to_different_account) {\n $sheet->setAutoSize(false);\n $sheet->setWidth('A', 5);\n $sheet->loadView('SD::salary_disburse.export_other', ['datas' => $distribution_to_different_account]);\n });\n })->save('xls', $file_path, true);\n $f_name_pdf = $file_path . \"/distribution_to_different_account.pdf\";\n SnappyPdf::loadView('SD::salary_disburse.export_other', ['datas' => $distribution_to_different_account])->save($f_name_pdf);\n array_push($files, $f_name_excel);\n array_push($files, $f_name_pdf);\n }\n $zip_archive_name = \"salary_sheet_\" . time() . \".zip\";\n $zip = new \\ZipArchive();\n if ($zip->open(public_path($zip_archive_name), \\ZipArchive::CREATE) === true) {\n foreach ($files as $file) {\n if (is_array($file)) $zip->addFile($file[\"full\"], $file[\"file\"]);\n else {\n $zip->addFile($file, basename($file));\n }\n }\n $zip->close();\n } else {\n throw new \\Exception(\"Can`t create file\");\n }\n foreach ($files as $file) {\n if (is_array($file)) unlink($file[\"full\"]);\n else unlink($file);\n }\n rmdir($file_path);\n $cc = null;\n// $cc = [$salary_sheet->kpi->unit->dc->userDetails->email, $salary_sheet->kpi->division->rc->userDetails->email];\n /*$this->sendEmail(\"SD::mail.salary_disburse_template\", [\n \"unit\" => $salary_sheet->kpi->unit->unit_name_eng,\n \"no_of_transaction\" => 1,\n \"total_amount\" => $append_extra ? $salary_sheet->summery[\"total_max_amount\"] : $salary_sheet->summery[\"total_min_amount\"],\n ], config('app.bank_email'), $cc,\n \"Request to disburse allowances to the Ansars of 1KPI at \" . $salary_sheet->kpi->unit->unit_name_eng,\n public_path($zip_archive_name));*/\n DB::connection('sd')->commit();\n return response()->json([\"message\" => \"Salary Disburse Successfully\", 'status' => true, 'url' => url()->route(\"SD.salary_disburse.download\", $zip_archive_name)]);\n\n } catch (\\Exception $e) {\n DB::connection('sd')->rollback();\n// return $e;\n// return redirect()->route('SD.salary_disburse.create')->with('error_message',$e->getMessage());\n return response()->json([\"message\" => $e->getMessage(), 'status' => false]);\n }\n\n }", "title": "" }, { "docid": "ca39082dbf01c66a82d6b0eff63a44eb", "score": "0.49481133", "text": "protected function ixServicesSendOutcomeByDocnumberRequest($request)\n {\n // verify the required parameter 'request' is set\n if ($request === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $request when calling ixServicesSendOutcomeByDocnumber'\n );\n }\n\n $resourcePath = '/api/IxServices/SendOutcome';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($request)) {\n $_tempBody = $request;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n []\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n [],\n ['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded']\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 API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\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": "3631b23e60a28ceeda2fa9aca709b91a", "score": "0.49473298", "text": "public function cardWithdrawal($array)\n {\n //set the endpoint for the api call\n if (!isset($array['amount'])) {\n throw new \\Exception(\"Please pass the required value for amount\", 1);\n }\n\n //set the payment handler\n $this->rave->eventHandler($this->getEventHandler())\n //set the endpoint for the api call\n ->setEndPoint(\"v3/virtual-cards/\".$array['id'].\"/withdraw\");\n\n return $this->rave->vcPostRequest($array);\n }", "title": "" }, { "docid": "acc05d6184bd0388b7bd86e69a3b21a7", "score": "0.49411276", "text": "function getSecondPageBalanceSheet($head_id)\n{\n\t\n\t$admin_id=$_SESSION['adminSession']['admin_id'];\n\t$period = getPeriodForUser($admin_id);\n\t$from=date('d/m/Y',strtotime($period[0]));\n\t$to=date('d/m/Y',strtotime($period[1]));\n\t$head=getHeadById($head_id);\n\t$to=getNextDate($to);\n\t\n $return_array=array();\n\t$i=0;\n\t\n\t\t$sundry_debtors_id=getSundryDebtorsId();\n\t\t$opening_balance_head=0;\n\t\t$opening_balance_head_array=getOpeningBalanceForHeadIdForDate($head_id,$to);\n\t\t$opening_balance_head=$opening_balance_head_array[0];\n\t\t\n\t\tif($sundry_debtors_id==$head_id)\n\t\t{\n\t\t$opening_balance_customers_array=getOpeningBalanceForCustomersForDate($to);\n\t\t$opening_balance_customers=$opening_balance_customers_array[0];\n\t\t}\n\t\t\n\t\t$opening_balance_head=$opening_balance_head+$opening_balance_customers;\n\t\t\n\t\t$child_head_array=array();\n\t\t$ledgers_array=array();\n\t\t$j=0;\n\t\t$child_heads = getSubHeadsOfHead($head_id);\n\t\tif($child_heads)\n\t\t{\n\t\tforeach($child_heads as $child_head)\n\t\t{\n\t\t\t$child_head_id=$child_head['head_id'];\n\t\t\t$opening_balance_child=0;\n\t\t\t$opening_balance_child_array=getOpeningBalanceForHeadIdForDate($child_head_id,$to);\n\t\t\t$opening_balance_child=$opening_balance_child_array[0];\n\t\t\tif($child_head_id==13)\n\t\t\t{\n\t\t\t$customer_opening_balance_array=getOpeningBalanceForCustomersForDate($to);\n\t\t\t$customer_opening_balance=$customer_opening_balance_array[0];\n\t\t\t$opening_balance_child=$opening_balance_child+$customer_opening_balance;\n\t\t\t}\n\t\t\t$child_head[]=$opening_balance_child;\n\t\t $child_head['opening_balance']=$opening_balance_child;\n\t\t\t$child_head_array[]=$child_head;\n\t\t\t$opening_balance_head=$opening_balance_head+$opening_balance_child;\n\t\t}\n\t\t}\n\t\t$ledgers_customers=listDirectCustomerAndLedgersWithBankCashForHeadId($head_id);\n\t\t$ob=0;\n\t\t\n\t\tif($ledgers_customers)\n\t\t{\n\t\tforeach($ledgers_customers as $ledgers_customer)\n\t\t{\n\t\t\t$ledger_id=$ledgers_customer['id'];\n\t\t\t$opening_balance_ledger=0;\n\t\t\t$opening_balance_ledger=getOpeningBalanceForLedgerForDate($ledger_id,$to);\n\t\t\t\n\t\t\t$ledgers_customer[]=$opening_balance_ledger;\n\t\t $ledgers_customer['opening_balance']=$opening_balance_ledger;\n\t\t\t$ob=$ob+$opening_balance_ledger;\n\t\t\t$ledgers_array[]=$ledgers_customer;\n\t\t}\n\t\t}\n\t\t\n\t\t$head['opening_balance']=$opening_balance_head;\n\t\t$head['child_heads']=$child_head_array;\n\t\t$head['ledgers']=$ledgers_array;\n\t\t$return_array=$head;\n\treturn $return_array;\n}", "title": "" }, { "docid": "f1f8de67edca665c860a817a01d7f59a", "score": "0.49351108", "text": "public function clientTransaction(Request $request, $name){\n $response = $this->validateRequest($request, [\n 'amount' => 'required|numeric',\n ]);\n if ($response) {\n return $response;\n }\n \n $wallet=ClientRepository::getWalletUncommited($name);\n return $this->createWalletTransaction($wallet, $request->amount);\n }", "title": "" }, { "docid": "2eb9db829b069496117ae9cd44eb83d9", "score": "0.49241632", "text": "public function withdrawalFunds(Request $request)\n {\n \\DB::beginTransaction();\n try {\n\n //Get model data\n $modelData = $request->input('attributes') ?? [];\n \n //Validate Request\n if (isset($this->model->requestValidation['withdrawalFunds'])) {\n $this->validateRequestApi(new $this->model->requestValidation['withdrawalFunds']($modelData));\n }\n\n \n // Process Payment Valid\n $authUser = \\Auth::user();\n $resultValidate = $this->paymentService->validateProcessPayment($authUser->id,$modelData['amount']);\n\n if(!$resultValidate['processPayment'])\n throw new \\Exception(trans(\"icredit::icredit.validation.no credit\",['creditUser' => $resultValidate['creditUser']]), 500);\n\n\n // Requestable Service\n $modelData['type'] = \"withdrawalFunds\";\n $model = app('Modules\\Requestable\\Services\\RequestableService')->create($modelData);\n\n app('Modules\\Icredit\\Services\\CreditService')->create( [\n \"amount\" => $modelData[\"amount\"]*-1 ?? 0,\n \"customerId\" => $authUser->id ?? null,\n \"description\" => trans(\"icredit::credits.descriptions.WithdrawalFundsRequestWasCreated\",[\"requestableId\" => $model->id]) ?? \"\",\n \"status\" => 1,\n \"relatedId\" => $model->id,\n \"relatedType\" => get_class($model)\n ]);\n \n //Response type Requestable Transformer\n $response = [\"data\" => new RequestableTransformer($model)];\n \n \\DB::commit(); //Commit to Data Base\n\n } catch (\\Exception $e) {\n\n \\Log::error('Icredit: CreditApiController|withdrawalFunds|Message: '.$e->getMessage());\n\n \\DB::rollback();//Rollback to Data Base\n $status = $this->getStatusError($e->getCode());\n $response = [\"messages\" => [[\"message\" => $e->getMessage(), \"type\" => \"error\"]]];\n \n }\n //Return response\n return response()->json($response, $status ?? 200);\n }", "title": "" }, { "docid": "0c55e4bcffda3319b0954648a35d7b9c", "score": "0.49068135", "text": "public function createTransaction(Request $request, $id) {\n\n // Check/sanitize ID param and forbid user from making a transfer to themselves (to same account)\n // Return a generic error message if no ID was passed\n if(!(int)$id || (int)$id === (int)$request->input('to')) {\n return response()->json(['message' => 'Error, please try again.'], 403);\n }\n\n // Validate createTransaction request\n $request->validate([\n 'to' => 'required|integer|exists:accounts,id',\n 'amount' => 'required|numeric|gt:0|between:1,100000', // for security purposes, the acceptable transferable amount must be between 1 and 100,000 (usd)\n 'details' => 'nullable|max:250'\n ]);\n\n /**\n * TODO (Improvement)::Properly validate $id route param for more robustness\n */\n\n // Extract necessary fields from the request inputs\n $to = $request->input('to');\n $amount = $request->input('amount');\n $details = $request->input('details');\n\n // Fetch account with provide account ID or fail if not found\n $account_to_be_debited = Account::findOrFail((int)$id);\n\n /**\n * yBank needs to verify and make sure user is not overspending their balance \n */ \n // If account balance is less than amount to be sent then we must forbid and prevent\n // overspending of account balance by stopping and sending a 403 error message\n if($account_to_be_debited->isOverspendingBalance((float)$amount)){\n return response()->json(['message' => 'Error, insufficient balance!'], 403);\n }\n\n /**\n * Initiate a Database Transaction to ensure Data Integrity: \n * If an exception is thrown within the transaction Closure, \n * the transaction will automatically be rolled back. \n */\n DB::transaction(function () use($account_to_be_debited, $id, $to, $amount, $details) {\n\n // Deduct balance from the \"from\" debit account\n $account_to_be_debited->debitAccountBalance((float)$amount);\n\n // Fetch credit account from DB\n $account_to_be_credited = Account::findOrFail((int)$to);\n\n // Top-up (increment) balance of the \"to\" credit account\n $account_to_be_credited->creditAccountBalance((float)$amount);\n\n Transaction::create([\n 'from' => $id,\n 'to' => $to,\n 'amount' => $amount,\n 'details' => $details\n ]);\n\n });\n\n return response()->json(null, 200); \n }", "title": "" }, { "docid": "d24e911c994573fc32ead9edbf106e56", "score": "0.48767442", "text": "public function clientSettlementBalanceUpdate($data)\n {\n\n // Determine variables for use\n $order_number = array_values($data)[1];\n $side = array_values($data)[7];\n $sender_sub_id = array_values($data)[17];\n $price = array_values($data)[14];\n $quantity = array_values($data)[10];\n $status = array_values($data)[6];\n $jcsd_num = array_values($data)[13];\n\n // JSE NEW RELEASE AUGUST 29,2020\n $original_order_number = array_values($data)[2];\n $last_order_quantity = array_values($data)[19];\n $last_order_price = array_values($data)[18];\n\n\n\n if ($original_order_number) {\n // this is a cancel request\n //Update DMA Records to acurately mathch the cancellation request new order number : initial order number\n BrokerOrderExecutionReport::updateOrCreate(\n ['clordid' => $order_number],\n ['clordid' => $original_order_number]\n );\n\n $order_number = $original_order_number;\n } else {\n $order_number = array_values($data)[1];\n }\n\n\n // Define the clients jcsd number\n $jcsd = str_replace('JCSD', \"\", $jcsd_num);\n //Find the broker order linked to this execution report (account number)\n $order = BrokerClientOrder::where('clordid', $order_number)->first();\n\n // // Define The broker client\n $broker_client = BrokerClient::where('jcsd', $jcsd)->first();\n if ($order) {\n //Trading Account Information\n $trading = BrokerTradingAccount::find((int)$order->trading_account_id);\n\n //Find the broker settlement account linked to this execution report (account number (senderSubID)\n $settlement_account = BrokerSettlementAccount::find($trading->broker_settlement_account_id);\n\n if ($order && $broker_client) {\n $original_order = $order;\n $trader = $broker_client;\n\n if ($original_order->id) {\n // $order_status = $this->orderStatus($original_order->id);\n $broker_settlement_account = $settlement_account;\n\n $order_value = $quantity * $price; //ER Order Value\n\n // Allocated Value of order [Release what was initially allocated per stock]\n $allocated_value_of_order = $quantity * $original_order['price'];\n $filled_value = $quantity * $price;\n\n //Determine If The Order Is A Buy Or Sell\n $side = json_decode($order->side, true);\n if ($side['fix_value'] === '1') {\n //Only Update account Balances if this is a buy order\n if (\n $status === $this->OrderStatus->Expired() ||\n $status === $this->OrderStatus->_New()\n ) {\n // UPDATE ORDER STATUS ONLY\n BrokerClientOrder::updateOrCreate(\n\n ['id' => $original_order->id],\n ['order_status' => $status]\n\n );\n } else if ($status === $this->OrderStatus->Cancelled()) {\n BrokerClientOrder::updateOrCreate(\n\n ['id' => $original_order->id],\n ['order_status' => $status, 'remaining' => $original_order['remaining'] - $allocated_value_of_order]\n\n );\n\n // Update Settlement Account Balances\n $broker_settlement = BrokerSettlementAccount::updateOrCreate(\n ['id' => $broker_settlement_account['id']],\n ['amount_allocated' => $broker_settlement_account['amount_allocated'] - $allocated_value_of_order]\n );\n\n\n // Update Broker Clients Open Orders\n $broker_client_account = BrokerClient::updateOrCreate(\n ['id' => $trader->id],\n ['open_orders' => $trader['open_orders'] - $allocated_value_of_order]\n );\n } else if ($status === $this->OrderStatus->Failed() || $status === $this->OrderStatus->Rejected()) {\n BrokerClientOrder::updateOrCreate(\n\n ['id' => $original_order->id],\n ['order_status' => $status, 'remaining' => $original_order['remaining'] - $allocated_value_of_order]\n\n );\n\n // Update Settlement Account Balances\n $broker_settlement = BrokerSettlementAccount::updateOrCreate(\n ['id' => $broker_settlement_account['id']],\n ['amount_allocated' => $broker_settlement_account['amount_allocated'] - $allocated_value_of_order]\n );\n\n\n // Update Broker Clients Open Orders\n $broker_client_account = BrokerClient::updateOrCreate(\n ['id' => $trader->id],\n ['open_orders' => $trader['open_orders'] - $allocated_value_of_order]\n );\n } else if ($status === $this->OrderStatus->Filled()) {\n\n $allocated_value_of_order = $last_order_quantity * $original_order['price'];\n $filled_value = $last_order_quantity * $last_order_price;\n\n // UPDATE THE ORDER STATUS \n $broker_client_order = BrokerClientOrder::updateOrCreate(\n ['id' => $original_order->id],\n ['order_status' => $status, 'remaining' => $original_order['remaining'] - $allocated_value_of_order]\n\n );\n\n // Update Settlement Account Balances\n $broker_settlement = BrokerSettlementAccount::updateOrCreate(\n ['id' => $broker_settlement_account['id']],\n ['amount_allocated' => $broker_settlement_account['amount_allocated'] - $allocated_value_of_order, 'filled_orders' => $broker_settlement_account['filled_orders'] + $filled_value]\n );\n\n\n // Update Broker Clients Open Orders\n $broker_client_account = BrokerClient::updateOrCreate(\n ['id' => $trader->id],\n ['open_orders' => $trader['open_orders'] - $allocated_value_of_order, 'filled_orders' => $trader->filled_orders + $filled_value]\n );\n } else if ($status === $this->OrderStatus->PartialFilled()) {\n $allocated_value_of_order = $last_order_quantity * $original_order['price'];\n $filled_value = $last_order_quantity * $last_order_price;\n // UPDATE THE ORDER STATUS \n $broker_client_order = BrokerClientOrder::updateOrCreate(\n ['id' => $original_order->id],\n ['order_status' => $status, 'remaining' => $original_order['remaining'] - $allocated_value_of_order]\n\n );\n\n // Update Settlement Account Balances\n $broker_settlement = BrokerSettlementAccount::updateOrCreate(\n ['id' => $broker_settlement_account['id']],\n ['amount_allocated' => $broker_settlement_account['amount_allocated'] - $allocated_value_of_order, 'filled_orders' => $broker_settlement_account['filled_orders'] + $filled_value]\n );\n\n\n // Update Broker Clients Open Orders\n $broker_client_account = BrokerClient::updateOrCreate(\n ['id' => $trader->id],\n ['open_orders' => $trader['open_orders'] - $allocated_value_of_order, 'filled_orders' => $trader->filled_orders + $filled_value]\n );\n }\n } else {\n // If the order side is a sell\n // UPDATE ORDER STATUS ONLY\n BrokerClientOrder::updateOrCreate(\n\n ['id' => $original_order->id],\n ['order_status' => $status]\n\n );\n }\n }\n }\n }\n }", "title": "" }, { "docid": "bb2b6a7a6a298640744580c50e044fcc", "score": "0.48714307", "text": "function cipsJSONSend_requestVoucher($myQuery,$id)\n{\n\t$qry = \"select \n\t\t\t\ta.account_process_id as no_transaksi,\n\t\t\t\ta.reference_datetime as tarikh_transaksi,\n\t\t\t\ta.reference_no as no_resit,\n\t\t\t\ta.amaun as jumlah,\n\t\t\t\tb.collection_code as kod_akaun\n\t\t\tfrom\n\t\t\t\tcips_user.dbo.cips_tra_account_process a,\n\t\t\t\tcips_user.dbo.cips_tra_account_ledger b\n\t\t\twhere \n\t\t\t\ta.account_process_id = b.account_process_id\n\t\t\t\tand a.account_process_code in ('030204','030304','030404','030504','030604')\n\t\t\t\tand a.no_account_process_id = \".$id.\";\";\n\t\n\t//receive acknowledge, octransactionid, cipstransactionno\n\t$result = OCWebSvcPost($myQuery,$qry,TARGET_WEBSERVICE_URL);\n}", "title": "" }, { "docid": "dc1c20737de4c9f592265ef1eb2bdfc8", "score": "0.48508847", "text": "public function CreateBillingAgreement($request){\r\n return $this->sendRequest($request, \"CreateBillingAgreement\");\r\n }", "title": "" }, { "docid": "a40da97e0a29880e11cbf06b75c44187", "score": "0.48508495", "text": "public function addAccount(Request $request)\n{\n $new_account = Account::create($request->all());\n\n $response = array(\n 'status' => 'success',\n 'new_id' => 'a'.$new_account->id,\n 'opening_value' => number_format($request['opening_value'], 2, \".\", \"'\"),\n 'budget_value' => number_format($request['budget_value'], 2, \".\", \"'\"),\n );\n\n return \\Response::json( $response );\n}", "title": "" }, { "docid": "b95a2b38dea266d1b3a768e2ec3a0ef5", "score": "0.48441193", "text": "public function insertTransaction($params)\n {\n $request['date'] = $params['date'];\n $request['amount'] = (float)$params['amount'];\n $request['transaction_type'] = $params['transaction_type']; // (0= Withdrawal, 1= Deposit, 3= Transfer)\n $request['account_id'] = (isset($params['account_id']) && $params['account_id'] != 0) ? (int)$params['account_id'] : 0;\n $request['category_id'] = (isset($params['category_id']) && $params['category_id'] != 0) ? (int)$params['category_id'] : 0;\n if (isset($params['description']) && $params['description'] != '') $request['description'] = $params['description'];\n $request['jive'] = (isset($params['jive']) && $params['jive'] != 0) ? $params['jive'] : 0;\n if (isset($params['from_account_id']) && $params['from_account_id'] != 0) $request['from_account_id'] = $params['from_account_id'];\n if (isset($params['to_account_id']) && $params['to_account_id'] != 0) $request['to_account_id'] = $params['to_account_id'];\n if (isset($params['check_num']) && $params['check_num'] != '') $request['check_num'] = $params['check_num'];\n if (isset($params['memo']) && $params['memo'] != '') $request['memo'] = $params['memo'];\n// $request['file_attachment'] = ''; // @todo make this work\n if (isset($params['payee']) && $params['payee'] != '') $request['payee'] = $params['payee'];\n// $request['split_amounts'] = '' // @todo make this work\n// $request['split_categories'] = '' // @todo make this work\n// $request['split_descriptions'] = '' // @todo make this work\n $return = $this->apiRequest(__FUNCTION__, $request);\n return $return;\n }", "title": "" }, { "docid": "1cd5dc8a575edba11df10254cc668f62", "score": "0.4844098", "text": "public function createDepositPickupRequest(Request $request)\n {\n $amount = $request['amount'];\n $cash = $request['cash'];\n\n //If they hold enough cash\n if ($amount <= $cash) {\n $deposit = new Transaction();\n $deposit->user_id = Auth::user()->id;\n $deposit->type = 'oc';\n $deposit->amount = $amount;\n $deposit->approved = 0;\n $deposit->save();\n } else {\n return redirect(route('checkin.funds.createRequest.show'));\n }\n\n\n return redirect(route('checkin.funds'));\n }", "title": "" }, { "docid": "6758114706415df74b0251223045779e", "score": "0.48303887", "text": "public function exportExcel()\n {\n // get all wallets\n $wallets = $this->walletRepository->findAll();\n $spreadsheet = new Spreadsheet();\n $sheet = $spreadsheet->getActiveSheet();\n $sheet->setTitle(\"iBanFirst Wallets\");\n $this->excelService->buildSheetHeader($sheet);\n $this->excelService->buildSheetData($sheet, $wallets);\n // Create your Office 2007 Excel (XLSX Format)\n $writer = new Xlsx($spreadsheet);\n\n // Create a Temporary file in the system\n $fileName = 'my_first_excel_symfony4.xlsx';\n $temp_file = tempnam(sys_get_temp_dir(), $fileName);\n\n // Create the excel file in the tmp directory of the system\n $writer->save($temp_file);\n\n // Return the excel file as an attachment\n return $this->file($temp_file, $fileName, ResponseHeaderBag::DISPOSITION_INLINE);\n }", "title": "" }, { "docid": "4d46d9c2c685550d05d4149f7eca0b61", "score": "0.48214537", "text": "public function queryBalance()\n {\n $username = env(\"PAYMENT_GATEWAY_USERNAME\");\n $password = env(\"PAYMENT_GATEWAY_PASSWORD\");\n\n\n $balance = Http::post(\n \"$this->endPoint/balance/query\",\n [\n 'username' => $username,\n 'password' => $password,\n ]\n );\n\n // if ($balance->status() != 200) {\n // return false;\n // }\n return [\n 'status' => $balance->status(),\n 'body' => $balance->body()\n ];\n // return $balance->body();\n\n }", "title": "" }, { "docid": "ee32ac2f6bfc2447cce5e84981202766", "score": "0.48174736", "text": "public function generateExcel() \n {\n $response = $this->post('/generateExcel'.[]);\n $response->assertStatus(200);\n\n }", "title": "" }, { "docid": "16e8c376aea2b4b40e9bed1be5fbe79f", "score": "0.4800732", "text": "public function createSinglePersonExcelSheetAction(array $array = NULL){\r\n $this->__viewStackFlow();\r\n \r\n $styleArray = array(\r\n 'alignment' => array(\r\n 'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER\r\n )\r\n );\r\n\r\n $styleArray2 = array(\r\n 'borders' => array(\r\n 'allborders' => array(\r\n 'style' => PHPExcel_Style_Border::BORDER_THIN\r\n )\r\n )\r\n );\r\n \r\n $objectPHPExcel = $this->getDI()->get('PHPExcel');\r\n \r\n $objectPHPExcel->getDefaultStyle()->applyFromArray($styleArray2);\r\n \r\n $objectPHPExcel->getProperties()->setCreator(\"Examiner\")\r\n ->setLastModifiedBy(\"Examiner\")->setTitle(\"Student Transcript\")\r\n ->setSubject(\"Student Transcript\")->setKeywords(\"office 2007 openxml php\")\r\n ->setCategory(\"Result Sheet\");\r\n \r\n //PHPExcel_Shared_Font::setAutoSizeMethod(PHPExcel_Shared_Font::AUTOSIZE_METHOD_EXACT);\r\n $objectPHPExcel->getActiveSheet()->mergeCells('A1:Z1');\r\n $objectPHPExcel->getActiveSheet()->mergeCells('A2:Z2');\r\n $objectPHPExcel->getActiveSheet()->mergeCells('A3:Z3');\r\n $objectPHPExcel->getActiveSheet()->mergeCells('A4:Z4');\r\n \r\n foreach(range('A','Z') as $column_id){\r\n $objectPHPExcel->getActiveSheet()->getColumnDimension($column_id)->setAutoSize(true);\r\n }\r\n \r\n $objectPHPExcel->getActiveSheet()->getStyle('A1')->getAlignment()->setIndent(1);\r\n \r\n $objectPHPExcel->getActiveSheet()->getRowDimension(1)->setRowHeight(-1);\r\n \r\n //Get students Programs, Department and Faculty details\r\n if($this->_studentFlow != false){\r\n $programFlow = Programs::findFirstByPrograms_id($this->_studentFlow->programs_id);\r\n }\r\n else{\r\n echo 'Student Looks Like Not registered. Kindly check Registration details';\r\n exit;\r\n }\r\n $objectPHPExcel->setActiveSheetIndex(0);\r\n $objectPHPExcel->getActiveSheet()\r\n ->setCellValue('A1','OLABISI ONABANJO UNIVERSITY AGO-IWOYE')\r\n ->setCellValue('A2', 'DEPARTMENT OF '.strtoupper($this->_studentFlow->department)\r\n .'('.strtoupper($programFlow->description).')')\r\n ->setCellValue('A3','TRANSCRIPT');\r\n \r\n $objectPHPExcel->getActiveSheet()->setCellValue('A5','Matric NO:')\r\n ->setCellValue('B5',$this->_studentFlow->matric)->setCellValue('A6','Student Names:')\r\n ->setCellValue('B6',strtoupper($this->_studentFlow->surname.' '.$this->_studentFlow->othernames))\r\n ->setCellValue('A7', 'Year of Entry:')->setCellValue('B7', $this->_studentFlow->entry)\r\n ->setCellValue('A8', 'Mode of Entry:')->setCellValue('B8', $this->_studentFlow->mode);\r\n \r\n $objectPHPExcel->getActiveSheet()->getStyle('A1:G1')->getFont()->setBold(true);\r\n $objectPHPExcel->getActiveSheet()->getStyle('A2:G2')->getFont()->setBold(true);\r\n $objectPHPExcel->getActiveSheet()->getStyle('A3:G3')->getFont()->setBold(true);\r\n $objectPHPExcel->getActiveSheet()->getStyle('A4:G4')->getFont()->setBold(true);\r\n \r\n $objectPHPExcel->getActiveSheet()->getPageSetup()\r\n ->setOrientation(PHPExcel_Worksheet_PageSetup::ORIENTATION_PORTRAIT);\r\n $objectPHPExcel->getActiveSheet()->getPageSetup()\r\n ->setPaperSize(PHPExcel_Worksheet_PageSetup::PAPERSIZE_A4);\r\n \r\n $objectPHPExcel->getActiveSheet()->getStyle('A11:J11')->getFont()->setBold(true);\r\n \r\n $objectPHPExcel->getActiveSheet()->mergeCells('A10:Z10');\r\n $objectPHPExcel->getActiveSheet()->setCellValue('A10','Any Alteration Noticed on the Marks Makes Document Invalid');\r\n $objectPHPExcel->getActiveSheet()->getStyle('A10')->getFont()->setSize(10);\r\n $objectPHPExcel->getActiveSheet()->setCellValue('A11','Course Code');\r\n $objectPHPExcel->getActiveSheet()->setCellValue('B11','Course Title');\r\n $objectPHPExcel->getActiveSheet()->setCellValue('C11','Unit');\r\n $objectPHPExcel->getActiveSheet()->setCellValue('D11','Semester');\r\n $objectPHPExcel->getActiveSheet()->setCellValue('E11','Session');\r\n $objectPHPExcel->getActiveSheet()->setCellValue('F11','Level');\r\n $objectPHPExcel->getActiveSheet()->setCellValue('G11','Status');\r\n $objectPHPExcel->getActiveSheet()->setCellValue('H11','Score');\r\n $objectPHPExcel->getActiveSheet()->setCellValue('I11','Grade');\r\n $objectPHPExcel->getActiveSheet()->setCellValue('J11','Remark');\r\n \r\n $counter = 12;\r\n $rangers = $this->__charIncStart('A','Z');\r\n foreach($this->_excelSingleResult as $keys => $values){\r\n $semester = $values['semester'] == 1 ? 'Harmattan' : 'Rain';\r\n $remarkFlow = ($values['score'] + $values['ca']) > GradePoints::DEFAULT_LIMIT ? 'PASSED' : 'FAILED';\r\n $objectPHPExcel->getActiveSheet()->setCellValue($rangers[0].$counter, strtoupper($values['code']));\r\n $objectPHPExcel->getActiveSheet()->setCellValue($rangers[1].$counter, ucwords($values['title']));\r\n $objectPHPExcel->getActiveSheet()->setCellValue($rangers[2].$counter, $values['units']);\r\n $objectPHPExcel->getActiveSheet()->setCellValue($rangers[3].$counter, $semester);\r\n $objectPHPExcel->getActiveSheet()->setCellValue($rangers[4].$counter, $values['session']);\r\n $objectPHPExcel->getActiveSheet()->setCellValue($rangers[5].$counter, $values['level']);\r\n $objectPHPExcel->getActiveSheet()->setCellValue($rangers[6].$counter, $values['status']);\r\n $objectPHPExcel->getActiveSheet()->setCellValue($rangers[7].$counter, $values['score'] + $values['ca']);\r\n $objectPHPExcel->getActiveSheet()->setCellValue($rangers[8].$counter, $values['grade'] * $values['units']);\r\n $objectPHPExcel->getActiveSheet()->setCellValue($rangers[9].$counter, $remarkFlow);\r\n $objectPHPExcel->getActiveSheet()->getStyle('A'.$counter.':J'.$counter)->getFont()->setSize(10);\r\n $objectPHPExcel->getActiveSheet()->getStyle('D'.$counter.':G'.$counter)->applyFromArray($styleArray);\r\n $counter++;\r\n }\r\n \r\n $highestCol = $objectPHPExcel->getActiveSheet()->getHighestRow() + 2;\r\n \r\n if(!empty($this->_carryOver) || !is_null($this->_carryOver)){\r\n $objectPHPExcel->getActiveSheet()->setCellValue('B'.$highestCol, 'Carry Overs');\r\n foreach($this->_carryOver as $keys => $values){\r\n $int = $highestCol+$keys+1;\r\n $remarkFlow = ($values['scoreCO'] + $values['caCO']) > GradePoints::DEFAULT_LIMIT ? 'PASSED' : 'FAILED';\r\n $objectPHPExcel->getActiveSheet()->setCellValue($rangers[0].$int, strtoupper($values['code']));\r\n $objectPHPExcel->getActiveSheet()->setCellValue($rangers[1].$int, ucwords($values['title']));\r\n $objectPHPExcel->getActiveSheet()->setCellValue($rangers[2].$int, $values['units']);\r\n $objectPHPExcel->getActiveSheet()->setCellValue($rangers[3].$int, $semester);\r\n $objectPHPExcel->getActiveSheet()->setCellValue($rangers[4].$int, $values['session']);\r\n $objectPHPExcel->getActiveSheet()->setCellValue($rangers[5].$int, $values['level']);\r\n $objectPHPExcel->getActiveSheet()->setCellValue($rangers[6].$int, $values['status']);\r\n $objectPHPExcel->getActiveSheet()->setCellValue($rangers[7].$int, $values['scoreCO'] + $values['caCO']);\r\n $objectPHPExcel->getActiveSheet()->setCellValue($rangers[8].$int, $values['grade'] * $values['units']);\r\n $objectPHPExcel->getActiveSheet()->setCellValue($rangers[9].$int, $remarkFlow);\r\n $objectPHPExcel->getActiveSheet()->getStyle('A'.$int.':J'.$int)->getFont()->setSize(10);\r\n }\r\n }\r\n \r\n $highestCol = $objectPHPExcel->getActiveSheet()->getHighestRow() + 2;\r\n //Setting the last floor variables \r\n $objectPHPExcel->getActiveSheet()->setCellValue('B'.$highestCol, 'Units Taken');\r\n $objectPHPExcel->getActiveSheet()->setCellValue('C'.$highestCol, GradePoints::__getTotalUnits());\r\n $objectPHPExcel->getActiveSheet()->getStyle('B'.$highestCol,'C'.$highestCol)->getFont()->setBold(true);\r\n $objectPHPExcel->getActiveSheet()->getStyle('C'.$highestCol)->applyFromArray($styleArray);\r\n $highestCol = $highestCol+1;\r\n $objectPHPExcel->getActiveSheet()->setCellValue('B'.$highestCol, 'Units Passed');\r\n $objectPHPExcel->getActiveSheet()->setCellValue('C'.$highestCol, GradePoints::__getTotalUnitPass());\r\n $objectPHPExcel->getActiveSheet()->getStyle('B'.$highestCol,'C'.$highestCol)->getFont()->setBold(true);\r\n $objectPHPExcel->getActiveSheet()->getStyle('C'.$highestCol)->applyFromArray($styleArray);\r\n $highestCol = $highestCol+1;\r\n $objectPHPExcel->getActiveSheet()->setCellValue('B'.$highestCol, 'Units Failed');\r\n $objectPHPExcel->getActiveSheet()->setCellValue('C'.$highestCol, GradePoints::__getTotalUnitFail());\r\n $objectPHPExcel->getActiveSheet()->getStyle('B'.$highestCol,'C'.$highestCol)->getFont()->setBold(true);\r\n $objectPHPExcel->getActiveSheet()->getStyle('C'.$highestCol)->applyFromArray($styleArray);\r\n $highestCol = $highestCol+1;\r\n $objectPHPExcel->getActiveSheet()->setCellValue('B'.$highestCol, 'WPG');\r\n $objectPHPExcel->getActiveSheet()->setCellValue('C'.$highestCol, GradePoints::__getTotalGrade());\r\n $objectPHPExcel->getActiveSheet()->getStyle('B'.$highestCol,'C'.$highestCol)->getFont()->setBold(true);\r\n $objectPHPExcel->getActiveSheet()->getStyle('C'.$highestCol)->applyFromArray($styleArray);\r\n $highestCol = $highestCol+1;\r\n $objectPHPExcel->getActiveSheet()->setCellValue('B'.$highestCol, 'CGPA');\r\n $objectPHPExcel->getActiveSheet()->setCellValue('C'.$highestCol, GradePoints::__weightedGradeAvr());\r\n $objectPHPExcel->getActiveSheet()->getStyle('B'.$highestCol,'C'.$highestCol)->getFont()->setBold(true);\r\n $objectPHPExcel->getActiveSheet()->getStyle('C'.$highestCol)->applyFromArray($styleArray);\r\n \r\n //Creating the file with the write method\r\n $objectWriter = PHPExcel_IOFactory::createWriter($objectPHPExcel, 'Excel5');\r\n $objectWriter->save('../excel_sheet/'.$this->__strReplace($this->request->getQuery('matric')).'_'.\r\n $this->request->getQuery('level').'.xls');\r\n $filePath = '../excel_sheet/'. $this->__strReplace($this->request->getQuery('matric')).'_'.\r\n $this->request->getQuery('level').'.xls';\r\n // Redirect output to a client’s web browser (Excel5)\r\n header('Content-Type: application/vnd.ms-excel');\r\n header(\"Content-Disposition: attachment;filename=\\\"\".basename($filePath).\"\\\"\");\r\n header('Cache-Control: max-age=0');\r\n // If you're serving to IE 9, then the following may be needed\r\n header('Cache-Control: max-age=1');\r\n\r\n // If you're serving to IE over SSL, then the following may be needed\r\n header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past\r\n header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); // always modified\r\n header('Cache-Control: cache, must-revalidate'); // HTTP/1.1\r\n header('Pragma: public'); // HTTP/1.0\r\n ob_clean(); flush(); \r\n readfile($filePath);\r\n $this->view->setRenderLevel(Phalcon\\Mvc\\View::LEVEL_NO_RENDER);\r\n }", "title": "" }, { "docid": "d7cb457066b70c404a70bd72c435f34d", "score": "0.4783947", "text": "public function bankByOneAction(Request $request)\n {\n $field = $request->query->get('field');\n $dependent = $request->query->get('dependent');\n $result = array();\n if (strpos($dependent, 'isNew_') !== false) {\n $dependent = '';\n } else {\n $object = $this->getDoctrine()\n ->getRepository('ListsOrganizationBundle:OrganizationCurrentAccount')\n ->find($dependent);\n $bank = $object->getBank();\n $methodGet = 'get' . ucfirst($field);\n\n if ($bank) {\n $result = $this->serializeObject($bank, null, $methodGet);\n }\n }\n\n return new Response(json_encode($result));\n }", "title": "" }, { "docid": "9f0edcaee82ac5076c70c78fb1135748", "score": "0.47823334", "text": "function getBankAccountObj($dataService) {\n\n $accountArray = $dataService->Query(\"select * from Account where AccountType='\" . 'Bank' . \"' and AccountSubType='\" . 'Checking' . \"'\");\n $error = $dataService->getLastError();\n if ($error) {\n logError($error);\n } else {\n if (is_array($accountArray) && sizeof($accountArray) > 0) {\n return current($accountArray);\n }\n }\n\n\n // Create Expense Account\n $bankAccountRequestObj = Account::create([\n \"AccountType\" => 'Bank',\n \"AccountSubType\" => 'Checking',\n \"Name\" => \"BankAccount-\" . getGUID()\n ]);\n $bankAccountObj = $dataService->Add($bankAccountRequestObj);\n $error = $dataService->getLastError();\n if ($error) {\n logError($error);\n } else {\n echo \"Created Expense Account with Id={$bankAccountObj->Id}.\\n\\n\";\n return $bankAccountObj;\n }\n\n}", "title": "" }, { "docid": "27641e8c08275f1f511ebcada8d09856", "score": "0.4778098", "text": "public function payWithCash($request)\n {\n\n try {\n if (!PayerData::PayerExist($request['email'])) {\n $payerId = ResourcesController::storePayer($request);\n } else {\n $payerId = PayerData::GetId($request['email']);\n foreach ($payerId as $data) {\n $payerId = $data['id'];\n }\n }\n\n if (!RequestInfo::RequestExist($request['reference'])) {\n $requestId = ResourcesController::storeRequestInfo($request, $payerId);\n } else {\n $requestId = RequestInfo::getId($request['reference']);\n foreach ($requestId as $data) {\n $requestId = $data['id'];\n }\n }\n\n $data = array(\n PayUParameters::ACCOUNT_ID => Payments::getAccountId(),\n PayUParameters::REFERENCE_CODE => $request['reference'],\n PayUParameters::DESCRIPTION => $request['description'],\n PayUParameters::CURRENCY => $request['currency'],\n PayUParameters::VALUE => $request['amount'],\n PayUParameters::BUYER_EMAIL => $request['email'],\n PayUParameters::PAYER_NAME => $request['name'],\n PayUParameters::PAYER_DNI => $request['dni'],\n PayUParameters::PAYMENT_METHOD => $request['payment_method'],\n PayUParameters::COUNTRY => Payments::getCountry(),\n PayUParameters::EXPIRATION_DATE => substr(date_format(Carbon::now()->addHours(19)->addMinutes(5), 'c'), 0, -6),\n PayUParameters::IP_ADDRESS => Helpers::getUserIP(),\n PayUParameters::NOTIFY_URL => 'https://api.rodason.com/api/v1/notify/' . $requestId,\n );\n\n $response = PayUPayments::doAuthorizationAndCapture($data);\n\n if ($response) {\n Helpers::logResponse($response, 'payWithCash', 'payWithCash', $data);\n if ($response->transactionResponse->state == 'PENDING') {\n $resJSON['status'] = $response->transactionResponse->state;\n $resJSON['orderId'] = $response->transactionResponse->orderId;\n $resJSON['transactionId'] = $response->transactionResponse->transactionId;\n $resJSON['pendingReason'] = $response->transactionResponse->pendingReason;\n $resJSON['responseCode'] = $response->transactionResponse->responseCode;\n if (array_key_exists($response->transactionResponse->responseCode, Payments::$pendingResponseCode)) {\n $resJSON['message'] = Payments::$pendingResponseCode[$response->transactionResponse->responseCode];\n }\n if (array_key_exists('extraParameters', $response->transactionResponse)) {\n if (array_key_exists('URL_PAYMENT_RECEIPT_HTML', $response->transactionResponse->extraParameters)) {\n $resJSON['urlPaymentReceiptHtml'] = $response->transactionResponse->extraParameters->URL_PAYMENT_RECEIPT_HTML;\n }\n }\n if (array_key_exists('extraParameters', $response->transactionResponse)) {\n if (array_key_exists('URL_PAYMENT_RECEIPT_PDF', $response->transactionResponse->extraParameters)) {\n $resJSON['urlPaymentReceiptPdf'] = $response->transactionResponse->extraParameters->URL_PAYMENT_RECEIPT_PDF;\n }\n }\n $resJSON['operationDate'] = $response->transactionResponse->operationDate;\n $resJSON['expirationDate'] = $response->transactionResponse->extraParameters->EXPIRATION_DATE;\n } else if ($response->transactionResponse->state == 'DECLINED') {\n $resJSON['status'] = $response->transactionResponse->state;\n $resJSON['orderId'] = $response->transactionResponse->orderId;\n $resJSON['transactionId'] = $response->transactionResponse->transactionId;\n $resJSON['responseCode'] = $response->transactionResponse->responseCode;\n if (array_key_exists($response->transactionResponse->responseCode, Payments::$declinedResponseCode)) {\n $resJSON['message'] = Payments::$declinedResponseCode[$response->transactionResponse->responseCode];\n }\n if (array_key_exists('responseMessage', $response->transactionResponse)) {\n $resJSON['responseMessage'] = $response->transactionResponse->responseMessage;\n }\n } else if ($response->transactionResponse->state == 'ERROR') {\n $resJSON['status'] = $response->transactionResponse->state;\n $resJSON['responseCode'] = $response->transactionResponse->responseCode;\n if (array_key_exists('responseMessage', $response->transactionResponse)) {\n $resJSON['responseMessage'] = $response->transactionResponse->responseMessage;\n }\n if (array_key_exists($response->transactionResponse->responseCode, Payments::$errorResponseCode)) {\n $resJSON['message'] = Payments::$errorResponseCode[$response->transactionResponse->responseCode];\n }\n } else if ($response->transactionResponse->state == 'EXPIRED') {\n $resJSON['status'] = $response->transactionResponse->state;\n $resJSON['responseCode'] = $response->transactionResponse->responseCode;\n $resJSON['errorCode'] = $response->transactionResponse->errorCode;\n if (array_key_exists($response->transactionResponse->errorCode, Payments::$expiredResponseCode)) {\n $resJSON['errorResponse'] = Payments::$expiredResponseCode[$response->transactionResponse->errorCode];\n }\n } else if ($response->transactionResponse->state == 'APPROVED') {\n $resJSON['status'] = $response->transactionResponse->state;\n $resJSON['orderId'] = $response->transactionResponse->orderId;\n $resJSON['transactionId'] = $response->transactionResponse->transactionId;\n $resJSON['responseCode'] = $response->transactionResponse->responseCode;\n }\n\n if (!PaymentInfo::PaymentExist($requestId)) {\n $expiration = null;\n if (array_key_exists('extraParameters', $response->transactionResponse)) {\n $expiration = (array_key_exists('EXPIRATION_DATE', $response->transactionResponse->extraParameters)) ? $response->transactionResponse->extraParameters->EXPIRATION_DATE : null;\n }\n\n ResourcesController::storePaymentInfo($request, $requestId, $expiration);\n }\n\n ResourcesController::storeTransaction($response, $requestId);\n\n } else {\n $resJSON['status'] = 'error';\n $resJSON['message'] = 'Lo sentimos algo salio mal';\n\n return response()->json($resJSON, 409);\n }\n\n return response()->json($resJSON, 200);\n } catch (Exception $e) {\n Helpers::logResponse($e->getMessage(), 'payWithCash', 'log', $data);\n\n $resJSON['errorMessage'] = $e->getMessage();\n return response()->json($resJSON, 409);\n }\n }", "title": "" }, { "docid": "bca329328069e12af7d58dcb3ce3b394", "score": "0.4768869", "text": "function createRequest();", "title": "" }, { "docid": "42f7cc55cd65d9ace76ba2d8c1191b53", "score": "0.4765292", "text": "public function bankedAction() {\n\n $this->view->disable();\n $response = NULL;\n\n \n try {\n $token = $this->config->endpoints->token;\n $sortCriteria = $this->request->get('sort') ? $this->request->get('sort') : '';\n $filter = $this->request->get('filter') ? $this->request->get('filter') : '';\n $start = $this->request->get('start') ? $this->request->get('start') : '';\n $end = $this->request->get('end') ? $this->request->get('end') : '';\n $page = (int) $this->request->get('page') ? $this->request->get('page') : 1;\n $limit = (int) $this->request->get('per_page') ? $this->request->get('per_page') : 10;\n $isExport = $this->request->get('isExport') ? $this->request->get('isExport') : FALSE;\n\n\n if ($sortCriteria) {\n list($sort, $order) = explode('|', $sortCriteria);\n } else {\n $sort = '';\n $order = '';\n }\n \n $lastPage = 1;\n $from = 1;\n $to = 1;\n $totalItems = 0;\n\n $countQuery = \"SELECT count(DISTINCT b.bankedId) as totalBanked \";\n $totalQuery = \"SELECT sum(b.amount) as totalAmount \";\n $selectQuery = \"SELECT b.bankedId,b.transactionReference,b.description,m.memberName,b.amount,b.memberId,b.createdAt,b.userId,um.memberName as officialName\";\n $baseQuery = \" FROM banked b join member m on b.memberId=m.memberId join users u on b.userId=u.userId join member um on u.memberId=um.memberId \";\n\n\n $whereArray = [\n 'filter' => $filter,\n 'b.bankedId' => $bankedId,\n 'b.memberId' => $memberId,\n 'date' => [$start, $end]\n ];\n\n $whereQuery = \"\";\n\n foreach ($whereArray as $key => $value) {\n\n if ($key == 'filter') {\n $searchColumns = ['m.memberName', 'e.amount','m.memberPhoneNumber'];\n\n $valueString = \"\";\n foreach ($searchColumns as $searchColumn) {\n $valueString .= $value ? \"\" . $searchColumn . \" REGEXP '\" . $value . \"' ||\" : \"\";\n }\n $valueString = chop($valueString, \" ||\");\n if ($valueString) {\n $valueString = \"(\" . $valueString;\n $valueString .= \") AND\";\n }\n $whereQuery .= $valueString;\n } else if ($key == 'date') {\n if (!empty($value[0]) && !empty($value[1])) {\n $valueString = \" DATE(b.createdAt) BETWEEN '$value[0]' AND '$value[1]'\";\n $whereQuery .= $valueString;\n }\n } else {\n $valueString = $value ? \" \" . $key . \"=\" . $value . \" AND \" : \"\";\n $whereQuery .= $valueString;\n }\n }\n \n if ($whereQuery) {\n $whereQuery = chop($whereQuery, \" AND \");\n }\n\n $whereQuery = $whereQuery ? \"WHERE $whereQuery \" : \"\";\n\n $countQuery = $countQuery . $baseQuery . $whereQuery;\n $totalQuery .=$baseQuery . $whereQuery;\n $selectQuery = $selectQuery . $baseQuery . $whereQuery;\n $exportQuery = $selectQuery;\n\n $queryBuilder = $this->tableQueryBuilder($sort, $order, $page, $limit);\n $selectQuery .= $queryBuilder;\n\n\n $count = $this->rawSelect($countQuery);\n $items = $this->rawSelect($selectQuery);\n $totalBankedAmount = $this->rawSelect($totalQuery);\n\n if($isExport){\n $exportTransactions = $this->rawSelect($exportQuery);\n \n }\n else{\n \n $exportTransactions= [];\n }\n \n\n if ($items) {\n \n $totalItems = $count[0]['totalBanked'];\n $data = $items;\n\n $from = ($page - 1) * $limit + 1;\n\n $rem = (int) ($totalItems % $limit);\n if ($rem !== 0) {\n $lastPage = (int) ($totalItems / $limit) + 1;\n } else {\n $lastPage = (int) ($totalItems / $limit);\n }\n\n if ($page == $lastPage) {\n $to = $totalItems;\n } else {\n $to = ($from + $limit) - 1;\n }\n\n $response = [\n 'total' => $totalItems,\n 'totalBankedAmount'=>$totalBankedAmount[0]['totalAmount'],\n 'per_page' => $limit,\n 'current_page' => $page,\n 'last_page' => $lastPage,\n 'from' => $from,\n 'to' => $to,\n 'data' => $data,\n 'exportTransactions'=>$exportTransactions\n ];\n } else {\n $response = [\n 'total' => $totalItems,\n 'totalBankedAmount'=>$totalBankedAmount[0]['totalAmount'],\n 'per_page' => $limit,\n 'current_page' => $page,\n 'last_page' => $lastPage,\n 'from' => $from,\n 'to' => $to,\n 'data' => [],\n 'exportTransactions'=>[]\n ];\n }\n\n $this->curlRequestInstance->sendHttpResponse($response);\n } catch (Exception $e) {\n\n $this->logger->logMessage('getTransactions', 'Server response: ' . json_encode($e), 0); \n\n $response = [\n 'total' => 0,\n 'totalBankedAmount'=>0,\n 'per_page' => 10,\n 'current_page' => 1,\n 'last_page' => 1,\n 'from' => 1,\n 'to' => 1,\n 'data' => [],\n 'exportTransactions'=>[]\n ];\n $this->curlRequestInstance->sendHttpResponse($response);\n }\n }", "title": "" }, { "docid": "27c19191c8de16b2eef0abd1a412b59e", "score": "0.4760877", "text": "function createSheetTravel(Request $data): string\n {\n $values = [\n $data->id, // separately cause it takes last inserted id\n $data->creator_record_id,\n $data->requested_record_id,\n $data->created_at,\n 'в ожидании', // default status\n ];\n\n $service = new \\Google_Service_Sheets($this->client);\n $valueRange = new Google_Service_Sheets_ValueRange();\n $valueRange->setValues(['values' => $values]);\n $result = $service->spreadsheets_values->append(\n env('TRAVEL_SHEET_ID'),\n 'A1:P1',\n $valueRange,\n ['valueInputOption' => 'raw']\n );\n return substr($result['updates']['updatedRange'], -1);\n }", "title": "" }, { "docid": "7eb4ab753903f194bf9f3fa2f2de1830", "score": "0.4754869", "text": "public function create_bill($attrs) {\r\n\r\n if ( ! isset($attrs['amount'])) {\r\n throw new GoCardless_ArgumentsException('Amount required');\r\n }\r\n\r\n $params = array(\r\n 'bill' => array(\r\n 'amount' => $attrs['amount'],\r\n 'pre_authorization_id' => $this->id\r\n )\r\n );\r\n\r\n if (isset($attrs['name'])) {\r\n $params['bill']['name'] = $attrs['name'];\r\n }\r\n\r\n if (isset($attrs['description'])) {\r\n $params['bill']['description'] = $attrs['description'];\r\n }\r\n\r\n $endpoint = GoCardless_Bill::$endpoint;\r\n\r\n return new GoCardless_Bill($this->client, $this->client->request('post',\r\n $endpoint, $params));\r\n\r\n }", "title": "" }, { "docid": "59c5767f55b0e1f24694170c14ed3f4e", "score": "0.47461528", "text": "public function bkk_bkm() {\n\t\trequire_once(MODEL . \"master/company.php\");\n\t\trequire_once(MODEL . \"accounting/opening_balance.php\");\n\n\t\tif (count($this->getData) > 0) {\n\t\t\t$accountId = $this->GetGetValue(\"account\");\n\t\t\t$start = strtotime($this->GetGetValue(\"start\"));\n\t\t\t$end = strtotime($this->GetGetValue(\"end\"));\n\t\t\t$output = $this->GetGetValue(\"output\", \"web\");\n\t\t\t$orientation = strtoupper($this->GetGetValue(\"orientation\", \"p\"));\n\t\t\t$status = $this->GetGetValue(\"status\", \"\");\n\t\t\tif (!in_array($orientation, array(\"P\", \"L\"))) {\n\t\t\t\t$orientation = \"P\";\n\t\t\t}\n\n\t\t\tif ($accountId == \"\") {\n\t\t\t\t$obal = null;\n\t\t\t\t$obalTransaction = null;\n\t\t\t\t$report = null;\n\t\t\t\t$this->Set(\"error\", \"Mohon pilih akun terlebih dahulu.\");\n\t\t\t} else {\n\t\t\t\t$info = array();\n\t\t\t\t// OK kasi tahu user kalau status dokumen bukan POSTED akan mempengaruhi saldo akhir\n\t\t\t\tif ($status != 4) {\n\t\t\t\t\t$this->Set(\"info\", \"Perhitungan Saldo Awal menggunakan semua voucher yang berstatus POSTED.\");\n\t\t\t\t}\n\n\t\t\t\t// Cari data Opening balance\n\t\t\t\t$obal = new OpeningBalance();\n\t\t\t\t$obal->LoadByAccount($accountId, date(\"Y\", $start));\n\t\t\t\tif ($obal->Id == null && $obal->GetCoa()->IsOpeningBalanceRequired()) {\n\t\t\t\t\t$info[] = \"Akun yang dipilih diharuskan memiliki Opening Balance tetapi data Tidak ditemukan !\";\n\t\t\t\t}\n\t\t\t\t$temp = $start - 86400;\n\t\t\t\tif ($status != 4) {\n\t\t\t\t\t$obalTransaction = $obal->CalculateTransaction($temp, -1);\n\t\t\t\t\t$info[] = \"Perhitungan Saldo Awal menggunakan semua voucher karena anda tidak memilih status POSTED\";\n\t\t\t\t} else {\n\t\t\t\t\t$obalTransaction = $obal->CalculateTransaction($temp);\n\t\t\t\t}\n\t\t\t\tif (count($info) > 0) {\n\t\t\t\t\t$this->Set(\"info\", implode(\"<br />\", $info));\n\t\t\t\t}\n\n\t\t\t\t$query =\n\"SELECT a.id, a.voucher_date, a.doc_no, a.doc_type_id, b.note, e.entity_cd, b.acc_debit_id, c.acc_name AS acc_debit, c.acc_no AS acc_no_debit, b.amount, b.acc_credit_id, d.acc_name AS acc_credit, d.acc_no AS acc_no_credit, g.dept_code,g.dept_name,f.act_code,f.act_name,h.project_cd,h.project_name\nFROM ac_voucher_master AS a\n\tJOIN ac_voucher_detail AS b ON a.id = b.voucher_master_id\n\tJOIN cm_acc_detail AS c ON b.acc_debit_id = c.id\n\tJOIN cm_acc_detail AS d ON b.acc_credit_id = d.id\n\tJOIN cm_company AS e ON a.entity_id = e.entity_id\n\tLEFT JOIN cm_activity AS f ON b.activity_id = f.id\n\tLEFT JOIN cm_dept AS g ON b.dept_id = g.id\n\tLEFT JOIN cm_project AS h ON b.project_id = h.id\nWHERE a.is_deleted = 0 AND (b.acc_debit_id = ?acc OR b.acc_credit_id = ?acc) AND a.entity_id = ?sbu AND a.voucher_date BETWEEN ?start AND ?end AND a.doc_type_id IN (1, 2, 3, 12, 14) %s\nORDER BY a.voucher_date, a.doc_no\";\n\t\t\t\t$this->connector->AddParameter(\"?sbu\", $this->userCompanyId);\n\n\t\t\t\tif ($status == \"\") {\n\t\t\t\t\t$this->connector->CommandText = sprintf($query, \"\");\n\t\t\t\t} else {\n\t\t\t\t\t$this->connector->CommandText = sprintf($query, \" AND a.status = ?status\");\n\t\t\t\t\t$this->connector->AddParameter(\"?status\", $status);\n\t\t\t\t}\n\t\t\t\t$this->connector->AddParameter(\"?start\", date(SQL_DATETIME, $start));\n\t\t\t\t$this->connector->AddParameter(\"?end\", date(SQL_DATETIME, $end));\n\t\t\t\t$this->connector->AddParameter(\"?acc\", $accountId);\n\t\t\t\t$rs = $this->connector->ExecuteQuery();\n\t\t\t\t$report = array();\n\t\t\t\t$prevId = null;\n\t\t\t\t$master = null;\n\t\t\t\twhile ($row = $rs->FetchAssoc()) {\n\t\t\t\t\t// Convert to native format\n\t\t\t\t\t$row[\"voucher_date\"] = strtotime($row[\"voucher_date\"]);\n\n\t\t\t\t\tif ($prevId != $row[\"id\"]) {\n\t\t\t\t\t\tif ($master != null) {\n\t\t\t\t\t\t\t// -_-a... ini array seharunya refernce tetapi si PHP tidak meng-treat sebagai reference ketika di assign malah copy by value instead of by refernce\n\t\t\t\t\t\t\t$report[] = $master;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$prevId = $row[\"id\"];\n\t\t\t\t\t\t$tokens = explode(\"/\", $row[\"doc_no\"]);\n\t\t\t\t\t\t$master = array(\n\t\t\t\t\t\t\t\"id\" => $row[\"id\"],\n\t\t\t\t\t\t\t\"date\" => $row[\"voucher_date\"],\n\t\t\t\t\t\t\t\"counter\" => (int)end($tokens),\n\t\t\t\t\t\t\t\"debit\" => 0,\n\t\t\t\t\t\t\t\"credit\" => 0,\n\t\t\t\t\t\t\t\"details\" => array()\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\t// Proses data\n\t\t\t\t\tif ($accountId == $row[\"acc_debit_id\"]) {\n\t\t\t\t\t\t// Akun yang diminta ada pada posisi debit\n\t\t\t\t\t\t$master[\"debit\"] += $row[\"amount\"];\n\t\t\t\t\t\t$row[\"debit\"] = $row[\"amount\"];\n\t\t\t\t\t\t$row[\"credit\"] = 0;\n\t\t\t\t\t\t$row[\"opposite_no\"] = $row[\"acc_no_credit\"];\n\t\t\t\t\t\t$row[\"opposite_name\"] = $row[\"acc_credit\"];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Karena bukan pada posisi debit maka kita asumsikan ada pada posisi credit\n\t\t\t\t\t\t$master[\"credit\"] += $row[\"amount\"];\n\t\t\t\t\t\t$row[\"debit\"] = 0;\n\t\t\t\t\t\t$row[\"credit\"] = $row[\"amount\"];\n\t\t\t\t\t\t$row[\"opposite_no\"] = $row[\"acc_no_debit\"];\n\t\t\t\t\t\t$row[\"opposite_name\"] = $row[\"acc_debit\"];\n\t\t\t\t\t}\n\t\t\t\t\t// Tambahkan detail ke master harus paling akhir karena PHP TIDAK meng-treat array dengan copy by reference ! AHO !\n\t\t\t\t\t$master[\"details\"][] = $row;\n\t\t\t\t}\n\t\t\t\t// Ia yang terakhir lupa di add... -_-a...\n\t\t\t\tif ($master != null) {\n\t\t\t\t\t// -_-a... ini array seharunya refernce tetapi si PHP tidak meng-treat sebagai reference ketika di assign malah copy by value instead of by refernce\n\t\t\t\t\t$report[] = $master;\n\t\t\t\t}\n\n\t\t\t\t// OK disini harusnya datanya sudah beres mari kita sorting\n\t\t\t\tusort($report, function($lhs, $rhs) {\n\t\t\t\t\t// Sorting utama hanya dilakukan jika tanggal sama\n\t\t\t\t\tif ($lhs[\"date\"] == $rhs[\"date\"]) {\n\t\t\t\t\t\t// Tanggal sama mari kita mulai logic sorting dimana debet harus muncul diatas dan akan kita urut berdasarkan nomor\n\t\t\t\t\t\tif ($lhs[\"debit\"] > 0) {\n\t\t\t\t\t\t\t// OK debet ada nilainya\n\t\t\t\t\t\t\tif ($rhs[\"debit\"] > 0) {\n\t\t\t\t\t\t\t\t// OK pada sisi kanan juga ada debet. Jika counter lebih kecil maka harus naik\n\t\t\t\t\t\t\t\treturn $lhs[\"counter\"] < $rhs[\"counter\"] ? -1 : 1;\n\t\t\t\t\t\t\t} else if ($rhs[\"credit\"] > 0) {\n\t\t\t\t\t\t\t\t// Sisi kanan tidak memiliki debet harusnya punya kredit. Harus naik\n\t\t\t\t\t\t\t\treturn -1;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthrow new Exception(\"DEBUG 1\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// OK Debet kosong mari kita lihat dari sisi kredit\n\t\t\t\t\t\t\tif ($rhs[\"credit\"] > 0) {\n\t\t\t\t\t\t\t\t// OK pada sisi kanan juga ada kredit. Jika counter lebih kecil maka harus naik\n\t\t\t\t\t\t\t\treturn $lhs[\"counter\"] < $rhs[\"counter\"] ? -1 : 1;\n\t\t\t\t\t\t\t} else if ($rhs[\"debit\"] > 0) {\n\t\t\t\t\t\t\t\t// Sisi kanan memiliki debit sehingga ini harus turun\n\t\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthrow new Exception(\"DEBUG 2\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else if ($lhs[\"date\"] < $rhs[\"date\"]) {\n\t\t\t\t\t\t// Tanggal kiri lebih kecil... ya uda bearti harus ber ada di atas...\n\t\t\t\t\t\treturn -1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Sisanya tanggal kiri lebih besar daripada kanan ya harus diturunin\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t} else {\n\t\t\t$obal = null;\n\t\t\t$obalTransaction = null;\n\n\t\t\t$accountId = null;\n\t\t\t$end = time();\n\t\t\t$start = mktime(0, 0, 0, date(\"m\"), 1, date(\"Y\"));\n\t\t\t$status = \"\";\n\t\t\t$report = null;\n\t\t\t$output = \"web\";\n\t\t\t$orientation = \"p\";\n\t\t}\n\n\t\t// Cari data login companynya\n\t\t$company = new Company();\n\t\tif ($this->userCompanyId == 7 || $this->userCompanyId == null) {\n\t\t\t$company = $company->LoadById(7);\n\t\t} else {\n\t\t\t$company = $company->LoadById($this->userCompanyId);\n\t\t}\n\t\t// OK cari data CoA\n\t\trequire_once(MODEL . \"master/coa.php\");\n\t\t$account = new Coa();\n\n\t\t$this->Set(\"obal\", $obal);\n\t\t$this->Set(\"obalTransaction\", $obalTransaction);\n\t\t$this->Set(\"accountId\", $accountId);\n\t\t$this->Set(\"accounts\", $account->LoadLevel3ByLevel2($this->userCompanyId,array(40, 41)));\n\t\t$this->Set(\"start\", $start);\n\t\t$this->Set(\"end\", $end);\n\t\t$this->Set(\"status\", $status);\n\t\t$this->Set(\"report\", $report);\n\t\t$this->Set(\"output\", $output);\n\t\t$this->Set(\"orientation\", $orientation);\n\t\t$this->Set(\"company\", $company);\n\t}", "title": "" }, { "docid": "046ea13359c2178af390af42ed8f4232", "score": "0.4738669", "text": "public function compute_send_money_transaction_post(){\r\n $source = $this->post('R1');\r\n $destination = $this->post('R2');\r\n $amount = $this->post('R3');\r\n $transaction_type = $this->post('R4'); // 1 if wallet to wallet and 2 if wallet to store\r\n\r\n $source_info = $this->customer_model->get_customer($source);\r\n $destination_info = $this->customer_model->get_customer($destination);\r\n\r\n \r\n\r\n if(empty($source_info) || empty($destination_info)){\r\n $this->response([\r\n 'status' => FALSE,\r\n 'message' => 'invalid customer reference.',\r\n 'response_code' => REST_Controller::HTTP_NOT_FOUND\r\n ], REST_Controller::HTTP_NOT_FOUND);\r\n }\r\n\r\n if($transaction_type==\"1\"){ // wallet to wallet\r\n\r\n $return_fee = get_akisi_fee($amount);\r\n $fee_array = $return_fee['message'];\r\n if($fee_array['responseCode']==\"00\"){\r\n $total_amount = $amount + $fee_array['feepronet'];\r\n\r\n $data = array(\"amount\"=>$amount,\r\n \"receipient\"=>$destination_info['fname'].\" \".$source_info['lname'],\r\n \"transaction_type\"=>$transaction_type,\r\n \"fee\"=>$fee_array['feepronet'],\r\n \"total\"=>$total_amount\r\n );\r\n if($source_info['balance']<$total_amount){\r\n $this->response([\r\n 'status' => FALSE,\r\n 'message' => 'insufficient balance',\r\n 'response_code' => REST_Controller::HTTP_BAD_REQUEST\r\n ], REST_Controller::HTTP_BAD_REQUEST);\r\n }else{\r\n $this->response($data, REST_Controller::HTTP_OK);\r\n }\r\n\r\n }else{\r\n $this->response([\r\n 'status' => FALSE,\r\n 'message' => 'Cannot retrieve akisi fee',\r\n 'response_code' => REST_Controller::HTTP_BAD_REQUEST\r\n ], REST_Controller::HTTP_BAD_REQUEST);\r\n }\r\n\r\n }else{ // wallet to store\r\n // not yet done ( need to add a fee if meron)\r\n\r\n $return_fee = get_akisi_fee($amount);\r\n $fee_array = $return_fee['message'];\r\n if($fee_array['responseCode']==\"00\"){\r\n $total_amount = $amount + $fee_array['feepronet'];\r\n $data = array(\"amount\"=>$amount,\r\n \"receipient\"=>$destination_info['fname'].\" \".$source_info['lname'],\r\n \"transaction_type\"=>$transaction_type,\r\n \"fee\"=>$fee_array['feepronet'],\r\n \"total\"=>$total_amount\r\n );\r\n $this->response($data, REST_Controller::HTTP_OK);\r\n }else{\r\n $this->response([\r\n 'status' => FALSE,\r\n 'message' => 'Cannot retrieve akisi fee',\r\n 'response_code' => REST_Controller::HTTP_BAD_REQUEST\r\n ], REST_Controller::HTTP_BAD_REQUEST);\r\n }\r\n \r\n \r\n }\r\n }", "title": "" }, { "docid": "f24b8796d5ac5736194890a2857010d1", "score": "0.47363234", "text": "protected function getAccountRequest($address)\n {\n // verify the required parameter 'address' is set\n if ($address === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $address when calling getAccount'\n );\n }\n if (!preg_match(\"/^(0x)?[0-9a-fA-F]{40}$/\", $address)) {\n throw new \\InvalidArgumentException(\"invalid value for \\\"address\\\" when calling SemuxApi.getAccount, must conform to the pattern /^(0x)?[0-9a-fA-F]{40}$/.\");\n }\n\n\n $resourcePath = '/account';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($address !== null) {\n $queryParams['address'] = ObjectSerializer::toQueryValue($address);\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 ['application/x-www-form-urlencoded']\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 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "afa218bb3f2e904329827975b4776b54", "score": "0.47252145", "text": "public function makeDeposit(Request $request)\n\t{\t\n\t\t// return $request->pmethod;\n\t\t$depositAmount = $request->deposit;\n\t\tif($depositAmount)\n\t\t{\n\t\t\tif($request->pmethod == 'pm')\n\t\t\t{\n\t\t\t\treturn \"Processing with Perfect Money\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$account = Account::where('user_id',Auth::user()->id)->first();\n\t\t\t\tif($account->balance<$depositAmount)\n\t\t\t\t{\n\t\t\t\t\treturn redirect()->back()->with('message','You do not have sufficient balance');\n\t\t\t\t}else\n\t\t\t\t{\n\t\t\t\t\tDeposit::insert([\n\t\t\t\t\t\t'user_id' => Auth::user()->id,\n\t\t\t\t\t\t'amount' => $depositAmount,\n\t\t\t\t\t\t'pmnt_method' => $request->pmethod,\n\t\t\t\t\t\t'pmnt_account' => 'Wallet Balance',\n\t\t\t\t\t\t'rcvd_date' => Carbon::now()\n\t\t\t\t\t\t]);\n\n\t\t\t\t\t// return \"Successfully deposited\";\n\t\t\t\t\t$newDepBalance = $account->balance-$depositAmount;\n\t\t\t\t\tAccount::where('user_id',Auth::user()->id)\n\t\t\t\t\t\t\t->update(['balance'=>$newDepBalance]);\n\t\t\t\t\t\n\t\t\t\t\t// return \"Successfully updated\";\n\n\t\t\t\t\tTransaction::insert(\n\t\t\t\t\t[\n\t\t\t\t\t'tnx_id' => 'nd_'.rand(1,99999999),\n\t\t\t\t\t'amount' => $depositAmount,\n\t\t\t\t\t'sign' => '-',\n\t\t\t\t\t'purpose' => 11,\n\t\t\t\t\t'date' => Carbon::now(), \n\t\t\t\t\t'user_id' => Auth::user()->id,\n\t\t\t\t\t// 'related_id' =>22\n\t\t\t\t\t]);\t\n\n\t\t\t\t\t// return \"Successfully transaction inserted\";\t\n\n\t\t\t\t\t// Create ROI (Return of Income) Schedule\n\n\t\t\t\t\t$depositTableRow = Deposit::where('user_id',Auth::user()->id)->first();\n\t\t\t\t\t\n\t\t\t\t\t$roiAmount = ($depositAmount * 20)/100;\n\t\t\t\t\t\n\t\t\t\t\tfor($i = 1; $i<=10; $i++){\n\t\t\t\t\t\tRoirecord::insert([\n\t\t\t\t\t\t\t\t'deposit_id' => $depositTableRow->id,\n\t\t\t\t\t\t\t\t'amount'\t=> $roiAmount,\n\t\t\t\t\t\t\t\t'pmnt_date'=> Carbon::now()->addMonths($i),\n\t\t\t\t\t\t\t\t'terms'\t\t=> $i,\n\t\t\t\t\t\t\t\t'status'\t=> 0\t\n\t\t\t\t\t\t\t]);\n\t\t\t\t\t} \n\t\t\t\t\t// end for loop\n\t\t\t\t\t// Create ROI (Return of Income) Schedule End\n\n\n\t\t\t\t\t// Add Referrar's Comission \n\n\t\t\t\t\t$referrarId = Auth::user()->referrar_id;\n\t\t\t\t\t$comissionAmount = (10*$depositAmount)/100;\n\t\t\t\t\t$referrarBalance = Account::where('user_id',$referrarId)->first()->balance;\n\t\t\t\t\t$newRefBalance = $referrarBalance+$comissionAmount;\n\t\t\t\t\tAccount::where('user_id', $referrarId)->update(['balance' => $newRefBalance]);\n\t\t\t\t\t\n\t\t\t\t\t// Add Referrar's Comission End\n\n\n\t\t\t\t\t//Insert Transaction Table Start\n\n\t\t\t\t\tTransaction::insert(\n\t\t\t\t\t[\n\t\t\t\t\t'tnx_id' => 'drc_'.rand(1,99999999),\n\t\t\t\t\t'amount' => $comissionAmount,\n\t\t\t\t\t'sign' => '+',\n\t\t\t\t\t'purpose' => 12,\n\t\t\t\t\t'date' => Carbon::now(), \n\t\t\t\t\t'user_id' => $referrarId,\n\t\t\t\t\t'related_id' =>Auth::user()->id\n\t\t\t\t\t]);\n\n\t\t\t\t\t//Insert Transaction Table End\n\t\t\t\t\t\n\t\t\t\t\t$this->carry(Auth::user()->id, Auth::user()->upline_id, $depositAmount);\n\n\t\t\t\t\t$this->updateMatchingQualify();\n\n\t\t\t\t\treturn redirect()->back()->with('message', \"Successfully Deposited\");\n\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn redirect()->back()->with('message','Request could not processd');\n\t\t}\n\t}", "title": "" }, { "docid": "0a59c170c3fca3e65cb1895035836d7f", "score": "0.47206095", "text": "public function store(Request $request)\n {\n $celular = '844552968';\n $valor = 10;\n $reference = '7y7y7y37t3g';\n// $recharge = Recharge::create($request->only(['reference', 'value','code']));\n// $recharge->save();\n $client = new Client ([\n 'apiKey' =>'5rqh0hssv2qtmp9648ys9nt83l0w65o2',\n 'publicKey' => 'MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAmptSWqV7cGUUJJhUBxsMLonux24u+FoTlrb+4Kgc6092JIszmI1QUoMohaDDXSVueXx6IXwYGsjjWY32HGXj1iQhkALXfObJ4DqXn5h6E8y5/xQYNAyd5bpN5Z8r892B6toGzZQVB7qtebH4apDjmvTi5FGZVjVYxalyyQkj4uQbbRQjgCkubSi45Xl4CGtLqZztsKssWz3mcKncgTnq3DHGYYEYiKq0xIj100LGbnvNz20Sgqmw/cH+Bua4GJsWYLEqf/h/yiMgiBbxFxsnwZl0im5vXDlwKPw+QnO2fscDhxZFAwV06bgG0oEoWm9FnjMsfvwm0rUNYFlZ+TOtCEhmhtFp+Tsx9jPCuOd5h2emGdSKD8A6jtwhNa7oQ8RtLEEqwAn44orENa1ibOkxMiiiFpmmJkwgZPOG/zMCjXIrrhDWTDUOZaPx/lEQoInJoE2i43VN/HTGCCw8dKQAwg0jsEXau5ixD0GUothqvuX3B9taoeoFAIvUPEq35YulprMM7ThdKodSHvhnwKG82dCsodRwY428kg2xM/UjiTENog4B6zzZfPhMxFlOSFX4MnrqkAS+8Jamhy1GgoHkEMrsT5+/ofjCx0HjKbT5NuA2V/lmzgJLl3jIERadLzuTYnKGWxVJcGLkWXlEPYLbiaKzbJb2sYxt+Kt5OxQqC1MCAwEAAQ==',\n 'serviceProviderCode' => '171717'\n ]);\n\n if(!empty($celular) || !empty($valor) || !empty($reference)){\n $paymentData = [\n 'from' => '258' . $celular, // input_CustomerMSISDN\n 'reference' => $reference, // input_ThirdPartyReference\n 'transaction' => 'T12344CC', // input_TransactionReference\n 'amount' => $valor // input_Amount\n ];\n\n $result = $client->receive($paymentData);\n\n if ($result->success) {\n dd( \"Pagamento efectuado!\");\n } else {\n dd(\"Falha ao processar pagamento\");\n }\n }else{\n dd(\"Preencha todos os campos do formulário\");\n }\n }", "title": "" }, { "docid": "67c12eb1ed9ae2b9adb7fdbf72b807b8", "score": "0.4716327", "text": "public function balance()\n {\n// https://trade.zb.cn/api/getAccountInfo?accesskey=youraccesskey&method=getAccountInfo\n// &sign=请求加密签名串&reqTime=当前时间毫秒数\n $parameters = [\n \"accesskey\" => $this->key,\n \"method\" => \"getAccountInfo\"\n ];\n $url = $this->privateUrl . 'getAccountInfo';\n $post = $this->createSign($parameters);\n $res = $this->httpRequest($url,$post);\n $res = $res['result']['coins'];\n\n $balance = [];\n foreach ($res as $k => $v)\n {\n $enName = $v['enName'];\n $balance[$enName] = $v['available'];\n }\n $coin = explode('_', strtoupper($this->pair));\n $coinGoods = $coin[0];\n $coinMarket = $coin[1];\n $data[$coinGoods] = $balance[$coinGoods];\n $data[$coinMarket] = $balance[$coinMarket];\n return $data;\n }", "title": "" }, { "docid": "8a7d14638765b8e6293208b554a23294", "score": "0.47128952", "text": "public function __invoke(Request $request): Response\n {\n $context = [];\n $today = date('Y-m-d');\n\n if ($request->isMethod('post')) {\n $beginning_date = trim($request->input('BEGINNING'));\n $end_date = trim($request->input('END'));\n } else {\n $beginning_date = $today;\n $end_date = $today;\n }\n\n $context['beginning_date'] = $beginning_date;\n $context['end_date'] = $end_date;\n if (!empty($beginning_date) && !empty($end_date) && $this->BookKeeping->validatePeriod($beginning_date, $end_date)) {\n $context['statements'] = $this->BookKeeping->retrieveStatements($beginning_date, $end_date);\n $end_date_of_previous_period = date('Y-m-d', strtotime($beginning_date) - 86400);\n $context['previous_balance_sheet'] = $this->BookKeeping->retrieveStatements('1970-01-01', $end_date_of_previous_period);\n $context['balance_sheet'] = $this->BookKeeping->retrieveStatements('1970-01-01', $end_date);\n $context['slips'] = $this->BookKeeping->retrieveSlips($beginning_date, $end_date, null, null, null, null);\n $context['message'] = null;\n $context['display_statements'] = true;\n } else {\n $context['message'] = __('There is no item to be shown.');\n $context['display_statements'] = false;\n }\n\n return $this->responder->response($context);\n }", "title": "" }, { "docid": "a551d92f0df29c424777c93048cb501c", "score": "0.47097182", "text": "public function transferIn(Request $request){\n\n \t\t$user = Auth::user();\n\t\t\n\t\t$mt4Account_id = $request->mt4Account_id;\n\t\t$value = $request->transferIn;\n\t\t// $eoffice_id = $request->profile['eoffice_id'];\n\n\t\t$params['login'] = $mt4Account_id;\n\t\t$params['value'] = $value;\t\n\t\t$params['comment'] = 'Intactfx deposit';\t\n\n\t\t\t\n\t\t$answer = $this->mt4->MakeRequest(\"changebalance\", $params);\n\n\t\tif($answer['result']!=1){\n\t\t\t\n\t\t\tprint \"<p style='background-color:#FFEEEE'>An error occured: <b>\".$answer['reason'].\"</b>.</p>\";\n\t\t\n\t\t}else{\n\n\t\t\t$mt4 = Mt4Account::where('mt4login_id', $mt4Account_id)->first();\n\t\t\t$mt4->balance = $answer['newbalance'];\n\t\t\t$mt4->save();\n\n\t\t\tPayment::create([\n 'id' => Faker::create()->randomNumber($nbDigits = 9),\n 'payment_id' => Faker::create()->randomNumber($nbDigits = 8),\n 'funding_service' => 'mt4Transfer',\n 'type' => 'transferIn',\n 'payment_amount' => $value,\n 'payment_units' => 'USD',\n 'payor_account' => $mt4Account_id,\n 'email' => $user->email,\n 'confirm' => 2,\n ]);\n\n\t\t\treturn $answer;\n\t\t}\n\t\t\n }", "title": "" }, { "docid": "076782453315a169fa89bb1b405a5c4b", "score": "0.46987098", "text": "protected function feeReportRequest()\n {\n\n $resourcePath = '/v1/fees';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\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 ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "8dc3ef9724cadd58441cb86e959c3740", "score": "0.46957624", "text": "public function withdrawFromOtherAccount(Request $request){\n // validation\n $this->validate($request,[\n 'accountId' => 'required | numeric',\n 'amount' => 'required | numeric',\n ]);\n\n\n $user = auth('api')->user();\n $amount = $request->amount;\n $withdrawAccount = Account::where([['id',$request->accountId]])->first();\n $depositAccount = Account::where([['CustomerID',$user->id],['AccountCode',200]])->first();\n \n if($withdrawAccount->AccountCode == 201){\n $groupUser = GroupAccount::where([['accountId' ,$request->accountId],['userId',$user->id]])->first();\n\n if($groupUser->role != 'admin'){\n return response()->json([\n 'status' => false,\n 'message' => \"Sorry, you are unauthorized to withdraw from this account\"\n ]);\n }\n }\n\n\n if($withdrawAccount->CurrentBalance < $amount){\n return response()->json([\n \"status\" => false,\n \"message\" => \"You have insufficient funds to complete this transaction\"\n ]);\n }\n\n $withdrawAccount->CurrentBalance -= $amount;\n\n if($withdrawAccount->save()){\n $data = [\n 'TransactionType' => 'transfer',\n 'TransactionDescription' => 'withdraw to'.$depositAccount->AccountName,\n 'TransID' => rand(100000,999999),\n 'UserId' => $user->id,\n 'AccountNumber' => $withdrawAccount->AccountNumber,\n 'MSISDN' => $user->PhoneNumber,\n 'FirstName' => $user->FirstName,\n 'MiddleName' => $user->MiddleName,\n 'LastName' => $user->LastName,\n 'TransAmount' => $amount,\n 'OrgAccountBalance' => $withdrawAccount->CurrentBalance+$amount,\n 'CrtAccountBalance' => $withdrawAccount->CurrentBalance\n ];\n $transaction = new TransactionController;\n $trans = $transaction->transact($data);\n\n if($trans != null){\n $depositAccount->CurrentBalance += $amount;\n if($depositAccount->save()){\n $data = [\n 'TransactionType' => 'deposit',\n 'TransactionDescription' => 'recieved from'.$withdrawAccount->AccountName,\n 'TransID' => rand(100000,999999),\n 'UserId' => $user->id,\n 'AccountNumber' => $depositAccount->AccountNumber,\n 'MSISDN' => $user->PhoneNumber,\n 'FirstName' => $user->FirstName,\n 'MiddleName' => $user->MiddleName,\n 'LastName' => $user->LastName,\n 'TransAmount' => $amount,\n 'OrgAccountBalance' => $depositAccount->CurrentBalance - $amount,\n 'CrtAccountBalance' => $depositAccount->CurrentBalance\n ];\n $transaction = new TransactionController;\n $trans = $transaction->transact($data);\n\n if($trans != null){\n return response()->json([\n \"status\" => true,\n \"message\" => \"Transaction was completed successfully.\"\n\n ]);\n }\n }\n }\n }\n\n }", "title": "" }, { "docid": "d59ba9efda53610a5a9bf362bb1eccaa", "score": "0.46919", "text": "public function create() {\n return view('balance.create');\n }", "title": "" }, { "docid": "611a78ad820142c5a400ecd68fc43763", "score": "0.46810746", "text": "public function otherbankConfirm(Request $request){\n \n\n // DB transfer info here \n $transfer_credentials = Bank::findOrFail($request->bank);\n $currency = Term::findOrFail($request->currency); \n $amount = $request->amount; // transfer amount\n\n $user_balance = User::where('id', Auth::id())->pluck('balance')->first();\n\n //if balance amount not empty\n if ($user_balance == '') {\n return redirect()->back()->with('error', \"Balance is empty!\")->withInput();\n }\n\n //if balance amount is valid\n if ($amount >= $user_balance) {\n return redirect()->back()->with('error', \"Cannot transfer more than: \" . $user_balance)->withInput();\n }\n //if amount is valid\n if ($amount < (double) $transfer_credentials->min_amount) {\n return redirect()->back()->with('error', \"Cannot be less than \" . $transfer_credentials->min_amount)->withInput();\n }elseif ($amount > (double) $transfer_credentials->max_amount) {\n return redirect()->back()->with('error', \"Cannot be greater than \" . $transfer_credentials->max_amount)->withInput();\n }\n\n //Charge type check and calculate\n $charge = 0;\n if ($transfer_credentials->charge_type == 'fixed') {\n // calculate fixed\n $charge = (double) $transfer_credentials->fix_charge;\n $amount = $amount - $charge;\n }elseif ($transfer_credentials->charge_type == 'percentage') {\n // calculate percentage\n $charge = (($amount / 100) * (double) $transfer_credentials->percent_charge);\n $amount = $amount - $charge;\n }elseif ($transfer_credentials->charge_type == 'both'){\n //If both: minus the charge then calculate the percentage \n $charge = (double) $transfer_credentials->fix_charge;\n $charge += ($amount / 100) * (double) $transfer_credentials->percent_charge;\n // calculate percentage\n $amount = $amount - $charge;\n }\n $data = [\n 'bank' => $request->bank,\n 'branch' => $request->branch,\n 'account_holder_name' => $request->account_holder_name,\n 'currency_id' => $request->currency,\n 'currency_name' => $currency->title,\n 'currency_rate' => (double) $currency->slug,\n 'amount' => abs($request->amount),\n 'final_amount' => abs($amount * (double) $currency->slug),\n 'account_no' => $request->account_no,\n 'charge_type' => $transfer_credentials->charge_type,\n 'total_charge' => $charge\n ];\n \n session($data);\n\n $data['usd'] = abs($request->amount);\n $data['bank_name'] = $transfer_credentials->name;\n\n $data = json_decode(json_encode($data), false);\n\n return view('user.transfer.otherbankConfirm', compact('data'));\n }", "title": "" }, { "docid": "9e11034a8f28ee39bb7f644bbfdb17ab", "score": "0.46803", "text": "public function save_bill_voucher(Request $request)\n {\n $date = $request -> date;\n $descriptions = $request -> descriptions;\n $amounts = $request -> amounts;\n $bill_voucher = new VoucherMaster();\n $bill_voucher -> type = 6;\n $bill_voucher -> voucher_no = $this -> get_voucher_no(6);\n $bill_voucher -> date = $date;\n $bill_voucher -> voucher_by = Auth :: user() -> name;\n $bill_voucher -> submitted_by = 'N/A';\n $bill_voucher -> status = HelperController :: Pending;\n $bill_voucher -> transaction_method_id = HelperController :: NotApplicable;\n $bill_voucher -> transaction_coa_account = NULL;\n $bill_voucher -> cheque_no = NULL;\n $bill_voucher -> save();\n\n //save the voucher detail\n\n for($i = 0; $i < count($amounts); $i++)\n {\n \n //Transaction for payee account\n $voucher_details = new VoucherDetails();\n $voucher_details -> voucher_master_id = $bill_voucher -> id;\n $voucher_details -> description = $descriptions[$i];\n $voucher_details -> credit_amount = $amounts[$i];\n $voucher_details -> debit_amount = 0;\n $voucher_details -> save();\n \n //Transaction for reciever account\n $voucher_details = new VoucherDetails();\n $voucher_details -> voucher_master_id = $bill_voucher -> id;\n $voucher_details -> description = $descriptions[$i];\n $voucher_details -> credit_amount = 0;\n $voucher_details -> debit_amount = $amounts[$i];\n $voucher_details -> save();\n }\n }", "title": "" }, { "docid": "91adc93aa46e6a106a319184dfe9057f", "score": "0.46759096", "text": "public function store(Request $request)\n {\n\n\n $save_values = array();\n $update_balance = array();\n $current_balance = 0;\n $new_balance = 0;\n \n $this->validate($request,[\n 'tran_date' => 'required',\n 'desctiption' => 'required',\n 'amount' => 'required',\n ]);\n $input = $request->all();\n $account = BankAccount::findORFail($input['bank_id']);\n $current_balance = $account->balance_amount;\n\n\n $save_values['_token'] = $input['_token'];\n $save_values['bank_id'] = $input['bank_id'];\n $save_values['tran_date'] = $input['tran_date'];\n $save_values['desctiption'] = $input['desctiption'];\n\n if($input['tran_type'] == 'credit')\n {\n $save_values['credit'] = $input['amount'];\n $new_balance = $current_balance + $input['amount'];\n }\n else if($input['tran_type'] == 'debit')\n {\n $save_values['debit'] = $input['amount'];\n $new_balance = $current_balance - $input['amount'];\n }\n\n\n Transaction::create($save_values);\n $update_balance = array(\n 'balance_amount' => $new_balance,\n );\n\n $account->fill($update_balance)->save();\n\n Session::flash('flash_message','Data successfully added!');\n return redirect()->back();\n\n }", "title": "" }, { "docid": "7fb1a0f535ce8a2462a8e44ec0d72816", "score": "0.46728933", "text": "public function store(Request $request)\n {\n // Validation\n $data = $request->validate([\n 'budget_id' => 'required|exists:budgets,id|integer',\n 'bill_id' => 'required_if:type,bill|exists:bills,id|integer',\n 'type' => 'required',\n 'from_account' => 'required|exists:accounts,id|integer',\n 'to_account' => 'required_if:type,transfer|exists:accounts,id|integer',\n 'name' => 'required',\n 'amount' => 'required|numeric'\n ]);\n\n // Authorization\n $this->authorize('update', Budget::find($data['budget_id']));\n $this->authorize('owns', Account::find($data['from_account']));\n \n if( $data['type'] == 'transfer' ) {\n $this->authorize('owns', Account::find($data['to_account']));\n } else {\n $data['to_account'] = null;\n }\n\n if( $data['type'] == 'bill' ) {\n $this->authorize('owns', Bill::find($data['bill_id']));\n } else {\n $data['bill_id'] = null;\n }\n \n // Create\n $transaction = Transaction::create($data);\n \n $from_account = Account::find($data['from_account']);\n\n if( $data['type'] == 'deposit' )\n $from_account->add($data['amount']);\n else\n $from_account->subtract($data['amount']);\n\n if( $data['type'] == 'transfer' ) {\n $to_account = Account::find($data['to_account']);\n $to_account->add($data['amount']);\n }\n\n // Response\n $budget = Budget::find($data['budget_id']);\n $accounts = auth()->user()->accounts;\n $transactions = $budget->transactions()->orderBy('created_at', 'desc')->get();\n $bills = auth()->user()->bills;\n\n return response()->json([\n 'message' => 'Transaction added successfully.',\n 'html' => [\n '.card__accounts' => view('accounts.list', compact('accounts'))->render(),\n '.card__transactions' => view('transactions.list', compact('budget', 'accounts', 'transactions'))->render(),\n '.card__bills' => view('bills.list', compact('budget', 'bills'))->render()\n ]\n ]);\n }", "title": "" }, { "docid": "8adbf4c113060ec22954929780df521a", "score": "0.4671458", "text": "public function downloadExcel()\n {\n $objPHPExcel = new \\PhpOffice\\PhpSpreadsheet\\Spreadsheet();\n // Set document properties\n $objPHPExcel->getProperties()->setCreator(\"Stalavista System\")\n ->setLastModifiedBy(\"Stalavista System\")\n ->setTitle(\"Office 2007 XLSX Product Database\")\n ->setSubject(\"Reinsurance Premium\")\n ->setDescription(\"Reinsurance Premium.\")\n ->setKeywords(\"office 2007 openxml php\")\n ->setCategory(\"Income\");\n\n $objPHPExcel->setActiveSheetIndex(0)->setCellValue('A1', 'Reinsurance Premium');\n $objPHPExcel->getActiveSheet()->getStyle('A1')->getFont()->setSize(16);\n $objPHPExcel->getActiveSheet()->getStyle('A1')->getAlignment()->setWrapText(false);\n \n $objPHPExcel->setActiveSheetIndex(0)\n ->setCellValue('A3', 'No')\n ->setCellValue('B3', 'Status')\n ->setCellValue('C3', 'No Voucher')\n ->setCellValue('D3', 'Payment Date')\n ->setCellValue('E3', 'Voucher Date')\n ->setCellValue('F3', 'Reference Date')\n ->setCellValue('G3', 'Debit Note / Kwitansi')\n ->setCellValue('H3', 'Policy Number / Policy Holder')\n ->setCellValue('I3', 'Total')\n ->setCellValue('J3', 'From Bank Account')\n ->setCellValue('K3', 'To Bank Account')\n ->setCellValue('L3', 'Bank Charges')\n ->setCellValue('M3', 'Outstanding Balance')\n ->setCellValue('N3', 'Payment Amount')\n ;\n\n $objPHPExcel->getActiveSheet()->getStyle('A3:N3')->getAlignment()->setVertical(\\PhpOffice\\PhpSpreadsheet\\Style\\Alignment::VERTICAL_CENTER);\n $objPHPExcel->getActiveSheet()->getStyle('A3:N3')->getAlignment()->setHorizontal(\\PhpOffice\\PhpSpreadsheet\\Style\\Alignment::HORIZONTAL_CENTER);\n //$objPHPExcel->getActiveSheet()->getStyle('A3:I3')->getFill()\n //->setFillType(\\PhpOffice\\PhpSpreadsheet\\Style\\Fill::FILL_SOLID)\n //->getStartColor()->setRGB('e2efd9')\n // ;\n $objPHPExcel->getActiveSheet()->getRowDimension('3')->setRowHeight(34);\n $objPHPExcel->getActiveSheet()->getColumnDimension('A')->setWidth(5);\n $objPHPExcel->getActiveSheet()->getColumnDimension('B')->setAutoSize(true);\n $objPHPExcel->getActiveSheet()->getColumnDimension('C')->setAutoSize(true);\n $objPHPExcel->getActiveSheet()->getColumnDimension('D')->setAutoSize(true);\n $objPHPExcel->getActiveSheet()->getColumnDimension('E')->setAutoSize(true);\n $objPHPExcel->getActiveSheet()->getColumnDimension('F')->setWidth(20);\n $objPHPExcel->getActiveSheet()->getColumnDimension('G')->setWidth(20);\n $objPHPExcel->getActiveSheet()->getColumnDimension('H')->setWidth(20);\n $objPHPExcel->getActiveSheet()->getColumnDimension('I')->setAutoSize(true);\n $objPHPExcel->getActiveSheet()->getColumnDimension('J')->setAutoSize(true);\n $objPHPExcel->getActiveSheet()->getColumnDimension('K')->setAutoSize(true);\n $objPHPExcel->getActiveSheet()->getColumnDimension('L')->setAutoSize(true);\n $objPHPExcel->getActiveSheet()->getColumnDimension('M')->setAutoSize(true);\n $objPHPExcel->getActiveSheet()->getColumnDimension('N')->setAutoSize(true);\n $objPHPExcel->getActiveSheet()->freezePane('A4');\n $objPHPExcel->getActiveSheet()->setAutoFilter('B3:N3');\n $num=4;\n $data = \\App\\Models\\Expenses::orderBy('id','desc')->where('reference_type','Reinsurance Premium');\n if($this->keyword) $data = $data->where(function($table){\n $table->where('description','LIKE', \"%{$this->keyword}%\")\n ->orWhere('no_voucher','LIKE',\"%{$this->keyword}%\")\n ->orWhere('reference_no','LIKE',\"%{$this->keyword}%\")\n ->orWhere('recipient','LIKE',\"%{$this->keyword}%\")\n ;\n });\n if($this->status) $data = $data->where('status',$this->status);\n if($this->unit) $data = $data->where('type',$this->unit);\n foreach($data->get() as $k => $i){\n $objPHPExcel->setActiveSheetIndex(0)\n ->setCellValue('A'.$num, ($k+1))\n ->setCellValue('B'.$num, strip_tags(status_income($i->status)))\n ->setCellValue('C'.$num,$i->no_voucher .' ['.($i->type==1?'K':'S').']')\n ->setCellValue('D'.$num,$i->payment_date)\n ->setCellValue('E'.$num,$i->created_at)\n ->setCellValue('F'.$num,$i->reference_date)\n ->setCellValue('G'.$num,$i->reference_no)\n ->setCellValue('H'.$num,$i->recipient)\n ->setCellValue('I'.$num,$i->nominal)\n ->setCellValue('J'.$num,isset($i->from_bank_account->no_rekening) ? $i->from_bank_account->no_rekening .'- '.$i->from_bank_account->bank.' an '. $i->from_bank_account->owner : '-')\n ->setCellValue('K'.$num,isset($i->bank_account->no_rekening) ? $i->bank_account->no_rekening .'- '.$i->bank_account->bank.' an '. $i->bank_account->owner : '-')\n ->setCellValue('L'.$num,$i->outstanding_balance)\n ->setCellValue('M'.$num,$i->bank_charges)\n ->setCellValue('N'.$num,$i->payment_amount)\n ;\n $objPHPExcel->getActiveSheet()->getStyle('I'.$num)->getNumberFormat()->setFormatCode('#,##0');\n $objPHPExcel->getActiveSheet()->getStyle('L'.$num)->getNumberFormat()->setFormatCode('#,##0');\n $objPHPExcel->getActiveSheet()->getStyle('M'.$num)->getNumberFormat()->setFormatCode('#,##0');\n $objPHPExcel->getActiveSheet()->getStyle('N'.$num)->getNumberFormat()->setFormatCode('#,##0');\n \n $num++;\n }\n\n // Rename worksheet\n //$objPHPExcel->getActiveSheet()->setTitle('Iuran-'. date('d-M-Y'));\n\n // Set active sheet index to the first sheet, so Excel opens this as the first sheet\n $objPHPExcel->setActiveSheetIndex(0);\n\n $writer = \\PhpOffice\\PhpSpreadsheet\\IOFactory::createWriter($objPHPExcel, \"Xlsx\");\n\n // Redirect output to a client’s web browser (Excel5)\n header('Content-Type: application/vnd.ms-excel');\n header('Content-Disposition: attachment;filename=\"reinsurance-premium' .date('d-M-Y') .'.xlsx\"');\n header('Cache-Control: max-age=0');\n // If you're serving to IE 9, then the following may be needed\n //header('Cache-Control: max-age=1');\n\n // If you're serving to IE over SSL, then the following may be needed\n header ('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past\n header ('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); // always modified\n header ('Cache-Control: cache, must-revalidate'); // HTTP/1.1\n header ('Pragma: public'); // HTTP/1.0\n return response()->streamDownload(function() use($writer){\n $writer->save('php://output');\n },'reinsurance-premium' .date('d-M-Y') .'.xlsx');\n }", "title": "" }, { "docid": "9b5b231c795d4cf32f5ddccbb69f0d11", "score": "0.46704626", "text": "public function store(Request $request)\n {\n $admin_id=Auth::user()->id;\n $input=$request->all();\n $created=Voucher::create($request->all());\n if($input['type']==\"Income\")\n {\n $paymentSheet=Paymentsheet::create([\n 'admin_id' => $admin_id,\n 'uid' => $created->id,\n 'type' => 'incomingVoucher',// incoming is profit, outgoing expense, due => due for supplier , due for customer \n 'paymentFor'=> 'voucher',// customer mean, I am selling to customer, supllier mean buying from suplier \n 'amount' => $input['amount'],\n 'paymentMethod' => $input['ledgerName'],\n 'remarks' => 'Voucher : '.$input['ledgerName'],\n 'voucher_id' => $created->id,\n 'date' => $input['date'],\n ]);\n \n }\n else if($input['type']==\"Investment\")\n {\n $paymentSheet=Paymentsheet::create([\n 'admin_id' => $admin_id,\n 'uid' => $created->id,\n 'type' => 'investmentVoucher',// incoming is profit, outgoing expense, due => due for supplier , due for customer \n 'paymentFor'=> 'voucher',// customer mean, I am selling to customer, supllier mean buying from suplier \n 'amount' => $input['amount'],\n 'paymentMethod' => $input['ledgerName'],\n 'remarks' => 'Voucher : '.$input['ledgerName'],\n 'voucher_id' => $created->id,\n 'date' => $input['date'],\n ]);\n \n }\n else\n {\n $paymentSheet=Paymentsheet::create([\n 'admin_id' => $admin_id,\n 'uid' => $created->id,\n 'type' => 'outgoingVoucher',// incoming is profit, outgoing expense, due => due for supplier , due for customer \n 'paymentFor'=> 'voucher',// customer mean, I am selling to customer, supllier mean buying from suplier \n 'amount' => $input['amount']*-1,\n 'paymentMethod' => $input['ledgerName'],\n 'remarks' => 'Voucher : '.$input['ledgerName'],\n 'voucher_id' => $created->id,\n 'date' => $input['date'],\n ]);\n }\n return response()->json([\n 'msg' => 'Inserted',\n 'status' => $created\n ],200);\n\n }", "title": "" }, { "docid": "4ff3d21be96f1348e17049f88812bd36", "score": "0.46697542", "text": "public function export(Request $request) \n {\n $variables = new variables();\n $reporting_date = $variables->orderBy('created_at', 'desc')->pluck('reporting_date')->first();\n \n $first_day_of_the_year = date('Y-m-d', strtotime('first day of January this year'));\n \n //$no_of_days_in_the_year = $this->GetNumDays(date('Y', strtotime($request->reporting_date)));\n \n $excel = new \\PHPExcel();\n $excel->setActiveSheetIndex(0);\n\n $table = new cashflowLocalBankPlacement();\n $data= $table->where('end_date','>=',$first_day_of_the_year)->where('start_date','<=', $reporting_date)->orderBy('start_date', 'asc')->get();\n $i = 13;\n foreach ($data as $data) {\n $excel->getActiveSheet()\n ->setCellvalue('A'.$i, $data->cpty)\n ->setCellvalue('B'.$i, $data->trade_id)\n ->setCellvalue('C'.$i, $data->unique_id)\n ->setCellvalue('D'.$i, doubleval($data->rate))\n ->setCellvalue('E'.$i, $this->ExportDateFormat($data->start_date))\n ->setCellvalue('F'.$i, $this->ExportDateFormat($data->end_date))\n ->setCellvalue('G'.$i, $this->ExportDateFormatMatured($data->maturity_date, $data->end_date, $reporting_date))\n ->setCellvalue('H'.$i, $this->GetTenor($data->start_date, $data->end_date, $reporting_date))\n ->setCellvalue('I'.$i, $data->open_nominal)\n //->setCellvalue('J'.$i, '=I'.$i.'*(H'.$i.'/'.$no_of_days_in_the_year.')*(D'.$i.'/100)')\n //->setCellvalue('K'.$i, '=I'.$i.'*(H'.$i.'/'.$no_of_days_in_the_year.')*(D'.$i.'/100)')\n ->setCellvalue('J'.$i, $this->GetInterest($data->open_nominal, $this->GetTenor($data->start_date, $data->end_date, $reporting_date), doubleval($data->rate), $data->end_date))\n ->setCellvalue('K'.$i, $this->GetInterest($data->open_nominal, $this->GetTenor($data->start_date, $data->end_date, $reporting_date), doubleval($data->rate), $data->end_date))\n ->setCellvalue('L'.$i, $this->GetStatus($data->end_date, $reporting_date));\n $i++;\n }\n $sum_cell = $i + 2;\n\n \n //FOOTER SUMS\n $excel->getActiveSheet()\n ->setCellvalue('I'.$sum_cell, '=SUMIF(L13:L'.$i.', \"Active\", I13:I'.$i.')')\n ->setCellvalue('J'.$sum_cell, '=SUMIF(L13:L'.$i.', \"Active\", J13:J'.$i.')')\n ->setCellvalue('K'.$sum_cell, '=SUM(K13:K'.$i.')');\n \n //THE HEADER STYLES & TEXTS\n\n $excel->getActiveSheet()\n ->getStyle('A1:L10000')->applyFromArray(\n array(\n 'fill'=>array(\n 'type'=>\\PHPExcel_Style_Fill::FILL_SOLID,\n 'color'=>array('rgb'=>'B9CEA4')\n )\n )\n );\n $excel->getActiveSheet()->getColumnDimension('A')->setWidth('15');\n $excel->getActiveSheet()->getColumnDimension('B')->setWidth('10');\n $excel->getActiveSheet()->getColumnDimension('C')->setWidth('15');\n $excel->getActiveSheet()->getColumnDimension('D')->setWidth('5');\n $excel->getActiveSheet()->getColumnDimension('E')->setWidth('15');\n $excel->getActiveSheet()->getColumnDimension('F')->setWidth('15');\n $excel->getActiveSheet()->getColumnDimension('G')->setWidth('15');\n $excel->getActiveSheet()->getColumnDimension('H')->setWidth('8');\n $excel->getActiveSheet()->getColumnDimension('I')->setWidth('18');\n $excel->getActiveSheet()->getColumnDimension('J')->setWidth('17'); \n $excel->getActiveSheet()->getColumnDimension('K')->setWidth('18'); \n $excel->getActiveSheet()->getColumnDimension('L')->setWidth('15'); \n\n $excel->getActiveSheet()->mergeCells('A6:C6');\n \n $excel->getActiveSheet()\n ->setCellvalue('A6', 'PLACEMENT WITH LOCAL BANKS')\n ->setCellvalue('A7', 'Reporting Date')\n ->setCellvalue('B7', $reporting_date)\n ->setCellvalue('A8', '366/365 app.')\n ->setCellvalue('B8', '01-Jan-'.date(\"y\"))\n ->setCellvalue('A12', 'CPTY')\n ->setCellvalue('B12', 'Trade ID')\n ->setCellvalue('C12', 'Unique ID')\n ->setCellvalue('D12', 'Rate')\n ->setCellvalue('E12', 'Start Date')\n ->setCellvalue('F12', 'End Date')\n ->setCellvalue('G12', 'Maturity Date')\n ->setCellvalue('H12', 'Tenor')\n ->setCellvalue('I12', 'Open Nominal')\n ->setCellvalue('J12', 'Accrued interest')\n ->setCellvalue('K12', 'Interest income')\n ->setCellvalue('L12', 'Status');\n\n $excel->getActiveSheet()\n ->setCellvalue('C11', 'Trade ID & Start date')\n ->setCellvalue('I11', '1021')\n ->setCellvalue('J11', '2183')\n ->setCellvalue('K11', '8296');\n \n \n\n\n $excel->getActiveSheet()\n ->getStyle('A1:L12')->applyFromArray(\n array(\n 'font'=>array(\n 'bold'=>true,\n 'size'=>11,\n )\n )\n );\n\n $excel->getActiveSheet()\n ->getStyle('C11:L11')->applyFromArray(\n array(\n 'font'=>array(\n 'size'=>10,\n )\n )\n );\n\n $excel->getActiveSheet()\n ->getStyle('A13:L10000')->applyFromArray(\n array(\n 'font'=>array(\n 'size'=>10,\n )\n )\n );\n $excel->getActiveSheet()->getStyle('A12:L10000')->getAlignment()->setHorizontal('right');\n \n \n $excel->getActiveSheet()\n ->getStyle('I'.$sum_cell.':K'.$sum_cell)->applyFromArray(\n array(\n 'font'=>array(\n 'bold'=>true,\n )\n )\n );\n $excel->getActiveSheet()\n ->getStyle('I13:K'.$sum_cell)->getNumberFormat()->setFormatCode('#,##0.00');\n \n $excel->getActiveSheet()->freezePane('M13');\n //DESIGNING\n $objDrawing = new \\PHPExcel_Worksheet_Drawing();\n $objDrawing->setName('GTBank Logo');\n $objDrawing->setDescription('GTBank Logo');\n $objDrawing->setPath('images/logo.png');\n $objDrawing->setCoordinates('A1'); \n //setOffsetX works properly\n $objDrawing->setOffsetX(0); \n $objDrawing->setOffsetY(0); \n //set width, height\n $objDrawing->setWidth(120); \n $objDrawing->setHeight(80); \n $objDrawing->setWorksheet($excel->getActiveSheet()); \n \n\n \n header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n header('Content-Disposition: attachment; filename= \"Pacement with Local Banks\"'.$reporting_date.'\".xlsx\"');\n header('Cache-Control: max-age=0');\n //ob_end_clean();\n $file = \\PHPExcel_IOFactory::createWriter($excel, 'Excel2007');\n $file->setPreCalculateFormulas(true);\n $file->save('php://output');\n \n }", "title": "" }, { "docid": "51e8074ca7187bb62dddb9d9f4139ca7", "score": "0.46536863", "text": "public function getBalanceAction(Request $request)\n {\n $requestParams = $request->query->all();\n\n if (($response = $this->checkParameters($requestParams, \"getBalanceAction\")) !== true)\n return $response;\n\n $user = $request->get('user');\n $since = $request->get('since');\n $until = $request->get('until');\n\n $transactionService = $this->container->get('db.transaction_service');\n\n return new Response($transactionService->getBalance($user, $since, $until));\n }", "title": "" }, { "docid": "f5bdf3fbb9b64092fd02e449ef7a1596", "score": "0.46394733", "text": "function manage_set_withdraw(){\n include_once 'util_hyd_log.php';\n include_once 'util_update_account.php';\n\n $todayStr = date(\"Y-m-d\");\n $today = new DateTime($todayStr);// date_create_from_format('Y-m-d', $todayStr);\n $now = new DateTime;\n $nowStr = $now->format(\"Y-m-d\\TH:i:sP\");\n\n if ($user->uid <= 0)\n {\n echo \"{\\\"result\\\":0}\";\n exit;\n }\n $usr_id = $user->uid;\n\n if (!is_accountant($user) && !is_administrator($user))\n {\n echo \"{\\\"result\\\":0}\";\n exit;\n }\n\n // check current time between 9am - 11pm\n if (!is_now_valid($time_user_start, $time_user_end))\n {\n echo \"{\\\"result\\\":0}\";\n exit;\n }\n\n $type = str2int($_GET['type']);\n $id = str2int($_GET['id']);\n if ($id <= 0)\n {\n echo \"{\\\"result\\\":0}\";\n exit;\n }\n $time = str2datetime($_GET['time']);\n if (is_null($time))\n {\n echo \"{\\\"result\\\":0}\";\n exit;\n }\n $number = $_GET['number'];\n if (!is_valid_bank_card_number($number))\n {\n echo \"{\\\"result\\\":0}\";\n exit;\n }\n $amount = str2float($_GET['amount']);\n if ($amount <= 0)\n {\n echo \"{\\\"result\\\":0}\";\n exit;\n }\n $fee = str2float($_GET['fee']);\n if ($fee <= 0)\n {\n echo \"{\\\"result\\\":0}\";\n exit;\n }\n\n switch ($type)\n {\n case 1: // granted\n hyd_log($now, $usr_id, \"提现申请审批\", \"转账: 提现用户, 提现申请时间, 用户银行卡号, 金额, 费用\", \"type=1&id=\".strval($id).\"&time=\".$_GET['time'].\"&number=\".$number.\"&amount=\".strval($amount).\"&fee=\".strval($fee));\n break;\n default: // rejected\n hyd_log($now, $usr_id, \"提现申请审批\", \"拒绝: 提现用户, 提现申请时间, 用户银行卡号, 金额, 费用\", \"type=0&id=\".strval($id).\"&time=\".$_GET['time'].\"&number=\".$number.\"&amount=\".strval($amount).\"&fee=\".strval($fee));\n break;\n }\n\n update_account($id);\n\n $con=mysqli_connect($db_host, $db_user, $db_pwd, $db_name);\n // Check connection\n if (mysqli_connect_errno())\n {\n echo \"{\\\"result\\\":0}\";\n exit;\n }\n mysqli_set_charset($con, \"UTF8\");\n\n $flag = false;\n mysqli_autocommit($con, false);\n\n switch ($type)\n {\n case 1: // granted\n mysqli_query($con, \"LOCK TABLES account_withdraws_act_wths WRITE, account_withdraw_act_wth WRITE, account_money_act_mny WRITE, account_transactions_act_trn WRITE\");\n\n $query = \"SELECT act_wths_usr_id FROM account_withdraws_act_wths WHERE act_wths_usr_id = \".strval($id).\" AND act_wths_time = \".sqlstr($time->format(\"Y-m-d\\TH:i:s\")).\" AND act_wths_bnk_number = \".sqlstr($number).\" AND act_wths_amount = \".strval($amount).\" AND act_wths_fee = \".strval($fee).\" AND act_wths_is_done IS NULL AND act_wths_done IS NULL\";\n $result = mysqli_query($con, $query);\n if ($row = mysqli_fetch_array($result))\n {\n mysqli_free_result($result);\n\n $query = \"SELECT act_wth_amount, act_wth_fee, act_wth_bnk_times FROM account_withdraw_act_wth WHERE act_wth_usr_id = \".strval($id);\n $result = mysqli_query($con, $query);\n if ($row = mysqli_fetch_array($result))\n {\n $act_wth_amount = $row['act_wth_amount'];\n $act_wth_fee = $row['act_wth_fee'];\n $act_wth_bnk_times = $row['act_wth_bnk_times'];\n $act_wth_amount += $amount;\n $act_wth_fee += $fee;\n $act_wth_bnk_times += 1;\n mysqli_free_result($result);\n\n $query = \"SELECT act_mny_available, act_mny_frozen, act_mny_investment, act_mny_loaned, act_mny_interest, act_mny_owned, act_mny_fine FROM account_money_act_mny WHERE act_mny_usr_id = \".strval($id);\n $result = mysqli_query($con, $query);\n if ($row = mysqli_fetch_array($result))\n {\n $act_mny_available = $row['act_mny_available'];\n $act_mny_frozen = $row['act_mny_frozen'];\n $act_mny_investment = $row['act_mny_investment'];\n $act_mny_loaned = $row['act_mny_loaned'];\n $act_mny_interest = $row['act_mny_interest'];\n $act_mny_owned = $row['act_mny_owned'];\n $act_mny_fine = $row['act_mny_fine'];\n mysqli_free_result($result);\n\n if ($act_mny_frozen >= ($amount + $fee))\n {\n $query = \"UPDATE account_withdraws_act_wths SET act_wths_is_done = 1, act_wths_done = \".sqlstr($nowStr).\", act_wths_mng_usr_id = \".sqlstrval($usr_id).\" WHERE act_wths_usr_id = \".strval($id).\" AND act_wths_time = \".sqlstr($time->format(\"Y-m-d\\TH:i:s\")).\" AND act_wths_bnk_number = \".sqlstr($number).\" AND act_wths_amount = \".strval($amount).\" AND act_wths_fee = \".strval($fee).\" AND act_wths_is_done IS NULL AND act_wths_done IS NULL\";\n $flag = mysqli_query($con, $query) != false;\n\n $query = \"UPDATE account_withdraw_act_wth SET act_wth_amount = \".sqlstrval($act_wth_amount).\", act_wth_fee = \".sqlstrval($act_wth_fee).\", act_wth_bnk_times = \".sqlstrval($act_wth_bnk_times).\", act_wth_updated = \".sqlstr($nowStr).\" WHERE act_wth_usr_id = \".strval($id);\n $flag = $flag && (mysqli_query($con, $query) != false);\n\n $act_mny_frozen = $act_mny_frozen - $amount - $fee;\n $act_mny_total = compute_money_total($act_mny_available, $act_mny_frozen, $act_mny_investment, $act_mny_loaned, $act_mny_interest, $act_mny_owned, $act_mny_fine);\n $query = \"UPDATE account_money_act_mny SET act_mny_frozen = \".sqlstrval($act_mny_frozen).\", act_mny_total = \".sqlstrval($act_mny_total).\", act_mny_updated = \".sqlstr($nowStr).\" WHERE act_mny_usr_id = \".strval($id);\n $flag = $flag && (mysqli_query($con, $query) != false);\n\n $total = $amount + $fee;\n $act_trn_available = $act_mny_available + $act_mny_frozen;\n $query = \"INSERT INTO account_transactions_act_trn (act_trn_usr_id, act_trn_time, act_trn_type, act_trn_amount, act_trn_available, act_trn_owned, act_trn_fine, act_trn_note) VALUES (\".sqlstrval($id).\",\".sqlstr($nowStr).\",2,\".sqlstrval($total).\",\".sqlstrval($act_trn_available).\",\".sqlstrval($act_mny_owned).\",\".sqlstrval($act_mny_fine).\",\".sqlstr(sqlstrval($fee)).\")\";\n $flag = $flag && (mysqli_query($con, $query) != false);\n }\n }\n }\n }\n break;\n default: // rejected\n mysqli_query($con, \"LOCK TABLES account_withdraws_act_wths WRITE, account_money_act_mny WRITE, account_transactions_act_trn WRITE, loans_lns WRITE, hyd_loans_hyd_ln WRITE, investments_inv WRITE, account_investments_act_invs WRITE, account_investment_act_inv WRITE, account_loan_act_ln WRITE\");\n\n $query = \"SELECT act_wths_usr_id FROM account_withdraws_act_wths WHERE act_wths_usr_id = \".strval($id).\" AND act_wths_time = \".sqlstr($time->format(\"Y-m-d\\TH:i:s\")).\" AND act_wths_bnk_number = \".sqlstr($number).\" AND act_wths_amount = \".strval($amount).\" AND act_wths_fee = \".strval($fee).\" AND act_wths_is_done IS NULL AND act_wths_done IS NULL\";\n $result = mysqli_query($con, $query);\n if ($row = mysqli_fetch_array($result))\n {\n mysqli_free_result($result);\n\n $query = \"SELECT act_mny_available, act_mny_frozen, act_mny_investment, act_mny_loaned, act_mny_interest, act_mny_owned, act_mny_fine FROM account_money_act_mny WHERE act_mny_usr_id = \".strval($id);\n $result = mysqli_query($con, $query);\n if ($row = mysqli_fetch_array($result))\n {\n $act_mny_available = $row['act_mny_available'];\n $act_mny_frozen = $row['act_mny_frozen'];\n $act_mny_investment = $row['act_mny_investment'];\n $act_mny_loaned = $row['act_mny_loaned'];\n $act_mny_interest = $row['act_mny_interest'];\n $act_mny_owned = $row['act_mny_owned'];\n $act_mny_fine = $row['act_mny_fine'];\n mysqli_free_result($result);\n\n if ($act_mny_frozen >= ($amount + $fee))\n {\n $query = \"UPDATE account_withdraws_act_wths SET act_wths_is_done = 0, act_wths_done = \".sqlstr($nowStr).\", act_wths_mng_usr_id = \".sqlstrval($usr_id).\" WHERE act_wths_usr_id = \".strval($id).\" AND act_wths_time = \".sqlstr($time->format(\"Y-m-d\\TH:i:s\")).\" AND act_wths_bnk_number = \".sqlstr($number).\" AND act_wths_amount = \".strval($amount).\" AND act_wths_fee = \".strval($fee).\" AND act_wths_is_done IS NULL AND act_wths_done IS NULL\";\n $flag = mysqli_query($con, $query) != false;\n\n $amount += $fee;\n $act_mny_frozen = $act_mny_frozen - $amount;\n\n if ($act_mny_owned == 0) // not owned\n {\n $act_mny_available += $amount;\n $query = \"UPDATE account_money_act_mny SET act_mny_available = \".sqlstrval($act_mny_available).\", act_mny_frozen = \".sqlstrval($act_mny_frozen).\", act_mny_updated = \".sqlstr($nowStr).\" WHERE act_mny_usr_id = \".strval($id);\n $flag = $flag && (mysqli_query($con, $query) != false);\n }\n else // owned money\n {\n $query = \"SELECT lns_app_id, lns_fine FROM loans_lns WHERE lns_usr_id = \".strval($id).\" AND lns_is_done = 0\";\n $result = mysqli_query($con, $query);\n $row = mysqli_fetch_array($result);\n $lns_app_id = $row['lns_app_id'];\n $lns_fine = $row['lns_fine'];\n mysqli_free_result($result);\n\n $act_trn_fine = ($act_mny_fine - $amount) <= 0 ? 0 : ($act_mny_fine - $amount);\n $act_trn_owned = $act_trn_fine > 0 ? $act_mny_owned : (($act_mny_owned + $act_mny_fine - $amount) <= 0 ? 0 : ($act_mny_owned + $act_mny_fine - $amount));\n $act_trn_available = $act_trn_owned > 0 ? $act_mny_frozen : ($amount - $act_mny_owned - $act_mny_fine + $act_mny_frozen);\n \n $lns_fine += ($act_trn_fine > 0 ? $amount : $act_mny_fine);\n $query = \"UPDATE loans_lns SET lns_fine = \".sqlstrval($lns_fine).\", lns_updated = \".sqlstr($nowStr).\" WHERE lns_app_id = \".strval($lns_app_id).\" AND lns_usr_id = \".strval($id);\n $flag = $flag && (mysqli_query($con, $query) != false);\n\n $query = \"SELECT hyd_ln_n_date, hyd_ln_w_owned, hyd_ln_w_fine, hyd_ln_updated FROM hyd_loans_hyd_ln WHERE hyd_ln_app_id = \".strval($lns_app_id);\n $result = mysqli_query($con, $query);\n $row = mysqli_fetch_array($result);\n $hyd_ln_n_date = $row['hyd_ln_n_date'];\n $hyd_ln_w_owned = $row['hyd_ln_w_owned'];\n $hyd_ln_w_fine = $row['hyd_ln_w_fine'];\n $hyd_ln_updated = $row['hyd_ln_updated'];\n mysqli_free_result($result);\n\n $query = \"SELECT inv_investment, inv_interest_rate, inv_duration, inv_start, inv_end, inv_fine_rate, inv_fine_rate_is_single, inv_fine FROM investments_inv WHERE inv_app_id = \".strval($lns_app_id);\n $result = mysqli_query($con, $query);\n $row = mysqli_fetch_array($result);\n $inv_investment = $row['inv_investment'];\n $inv_interest_rate = $row['inv_interest_rate'];\n $inv_duration = $row['inv_duration'];\n $inv_start = $row['inv_start'];\n $inv_end = $row['inv_end'];\n $inv_fine_rate = $row['inv_fine_rate'];\n $inv_fine_rate_is_single = $row['inv_fine_rate_is_single'];\n $inv_fine = $row['inv_fine'];\n mysqli_free_result($result);\n\n $days = str2date($hyd_ln_updated)->diff($today)->days;\n if ($days > 0)\n {\n $fine_new = compute_fine($hyd_ln_w_owned, $hyd_ln_w_fine, $inv_fine_rate, $inv_fine_rate_is_single, $days);\n $hyd_ln_w_fine += $fine_new;\n }\n\n if ($act_trn_fine > 0 && $amount < $hyd_ln_w_fine) // hyd will owe fines to investors. $amount is used to repay fines\n {\n $inv_fine += $amount;\n $query = \"UPDATE investments_inv SET inv_fine = \".sqlstrval($inv_fine).\", inv_updated = \".sqlstr($nowStr).\" WHERE inv_app_id = \".strval($lns_app_id);\n $flag = $flag && (mysqli_query($con, $query) != false);\n\n $hyd_ln_w_fine = $hyd_ln_w_fine - $amount;\n $query = \"UPDATE hyd_loans_hyd_ln SET hyd_ln_w_fine = \".sqlstrval($hyd_ln_w_fine).\", hyd_ln_updated = \".sqlstr($nowStr).\" WHERE hyd_ln_app_id = \".strval($lns_app_id);\n $flag = $flag && (mysqli_query($con, $query) != false);\n\n $query = \"SELECT inv_act_usr_id, inv_act_amount, inv_act_ratio FROM investment_accounts_inv_act WHERE inv_act_app_id = \".strval($lns_app_id);\n $result = mysqli_query($con, $query);\n while ($row = mysqli_fetch_array($result))\n {\n $inv_act_usr_id = $row['inv_act_usr_id'];\n $inv_act_amount = $row['inv_act_amount'];\n $inv_act_ratio = $row['inv_act_ratio'];\n\n $delta_amount = round($amount * $inv_act_ratio, 2);\n if ($delta_amount > 0)\n {\n $query = \"SELECT act_invs_r_fine, act_invs_w_owned, act_invs_w_fine, act_invs_updated FROM account_investments_act_invs WHERE act_invs_usr_id = \".strval($inv_act_usr_id).\" AND act_invs_app_id = \".strval($lns_app_id);\n $result1 = mysqli_query($con, $query);\n $row1 = mysqli_fetch_array($result1);\n $act_invs_r_fine = $row1['act_invs_r_fine'];\n $act_invs_w_owned = $row1['act_invs_w_owned'];\n $act_invs_w_fine = $row1['act_invs_w_fine'];\n $act_invs_updated = $row1['act_invs_updated'];\n mysqli_free_result($result1);\n\n $days = str2date($act_invs_updated)->diff($today)->days;\n if ($days > 0)\n {\n $delta_fine_new = compute_fine($act_invs_w_owned, $act_invs_w_fine, $inv_fine_rate, $inv_fine_rate_is_single, $days);\n $act_invs_w_fine += $delta_fine_new;\n }\n\n $query = \"SELECT act_mny_available, act_mny_frozen, act_mny_investment, act_mny_loaned, act_mny_interest, act_mny_owned, act_mny_fine, act_mny_total, act_mny_updated FROM account_money_act_mny WHERE act_mny_usr_id = \".strval($inv_act_usr_id);\n $result1 = mysqli_query($con, $query);\n $row1 = mysqli_fetch_array($result1);\n $inv_act_mny_available = $row1['act_mny_available'];\n $inv_act_mny_frozen = $row1['act_mny_frozen'];\n $inv_act_mny_investment = $row1['act_mny_investment'];\n $inv_act_mny_loaned = $row1['act_mny_loaned'];\n $inv_act_mny_interest = $row1['act_mny_interest'];\n $inv_act_mny_owned = $row1['act_mny_owned'];\n $inv_act_mny_fine = $row1['act_mny_fine'];\n $inv_act_mny_total = $row1['act_mny_total'];\n $inv_act_mny_updated = $row1['act_mny_updated'];\n mysqli_free_result($result1);\n\n $delta_r_fine = $act_invs_w_fine > $delta_amount ? $delta_amount : $act_invs_w_fine;\n\n $inv_act_trn_available = $inv_act_mny_available + $inv_act_mny_frozen + $delta_r_fine;\n $query = \"INSERT INTO account_transactions_act_trn (act_trn_usr_id, act_trn_time, act_trn_type, act_trn_amount, act_trn_available, act_trn_owned, act_trn_fine, act_trn_note) VALUES (\".sqlstrval($inv_act_usr_id).\", \".sqlstr($nowStr).\", 6, \".sqlstrval($delta_r_fine).\", \".sqlstrval($inv_act_trn_available).\", 0, 0, NULL)\";\n $flag = $flag && (mysqli_query($con, $query) != false);\n\n $inv_act_mny_available += $delta_r_fine;\n $inv_act_mny_total = compute_money_total($inv_act_mny_available, $inv_act_mny_frozen, $inv_act_mny_investment, $inv_act_mny_loaned, $inv_act_mny_interest, $inv_act_mny_owned, $inv_act_mny_fine);\n $query = \"UPDATE account_money_act_mny SET act_mny_available = \".sqlstrval($inv_act_mny_available).\", act_mny_total = \".sqlstrval($inv_act_mny_total).\", act_mny_updated = \".sqlstr($nowStr).\" WHERE act_mny_usr_id = \".strval($inv_act_usr_id);\n $flag = $flag && (mysqli_query($con, $query) != false);\n\n $act_invs_r_fine += $delta_r_fine;\n $act_invs_w_fine = $act_invs_w_fine - $delta_r_fine;\n $query = \"UPDATE account_investments_act_invs SET act_invs_r_fine = \".sqlstrval($act_invs_r_fine).\", act_invs_w_fine = \".sqlstrval($act_invs_w_fine).\", act_invs_updated = \".sqlstr($nowStr).\" WHERE act_invs_usr_id = \".strval($inv_act_usr_id).\" AND act_invs_app_id = \".strval($lns_app_id);\n $flag = $flag && (mysqli_query($con, $query) != false);\n }\n }\n mysqli_free_result($result);\n }\n else // hyd repays all fines to investors\n {\n $inv_fine += $hyd_ln_w_fine;\n $query = \"UPDATE investments_inv SET inv_fine = \".sqlstrval($inv_fine).\", inv_updated = \".sqlstr($nowStr).\" WHERE inv_app_id = \".strval($lns_app_id);\n $flag = $flag && (mysqli_query($con, $query) != false);\n\n $query = \"UPDATE hyd_loans_hyd_ln SET hyd_ln_w_fine = 0, hyd_ln_updated = \".sqlstr($nowStr).\" WHERE hyd_ln_app_id = \".strval($lns_app_id);\n $flag = $flag && (mysqli_query($con, $query) != false);\n\n $query = \"SELECT inv_act_usr_id, inv_act_amount, inv_act_ratio FROM investment_accounts_inv_act WHERE inv_act_app_id = \".strval($lns_app_id);\n $result = mysqli_query($con, $query);\n while ($row = mysqli_fetch_array($result))\n {\n $inv_act_usr_id = $row['inv_act_usr_id'];\n $inv_act_amount = $row['inv_act_amount'];\n $inv_act_ratio = $row['inv_act_ratio'];\n\n $query = \"SELECT act_invs_r_fine, act_invs_w_owned, act_invs_w_fine, act_invs_updated FROM account_investments_act_invs WHERE act_invs_usr_id = \".strval($inv_act_usr_id).\" AND act_invs_app_id = \".strval($lns_app_id);\n $result1 = mysqli_query($con, $query);\n $row1 = mysqli_fetch_array($result1);\n $act_invs_r_fine = $row1['act_invs_r_fine'];\n $act_invs_w_owned = $row1['act_invs_w_owned'];\n $act_invs_w_fine = $row1['act_invs_w_fine'];\n $act_invs_updated = $row1['act_invs_updated'];\n mysqli_free_result($result1);\n\n $days = str2date($act_invs_updated)->diff($today)->days;\n if ($days > 0)\n {\n $delta_fine_new = compute_fine($act_invs_w_owned, $act_invs_w_fine, $inv_fine_rate, $inv_fine_rate_is_single, $days);\n $act_invs_w_fine += $delta_fine_new;\n }\n\n $query = \"SELECT act_mny_available, act_mny_frozen, act_mny_investment, act_mny_loaned, act_mny_interest, act_mny_owned, act_mny_fine, act_mny_total, act_mny_updated FROM account_money_act_mny WHERE act_mny_usr_id = \".strval($inv_act_usr_id);\n $result1 = mysqli_query($con, $query);\n $row1 = mysqli_fetch_array($result1);\n $inv_act_mny_available = $row1['act_mny_available'];\n $inv_act_mny_frozen = $row1['act_mny_frozen'];\n $inv_act_mny_investment = $row1['act_mny_investment'];\n $inv_act_mny_loaned = $row1['act_mny_loaned'];\n $inv_act_mny_interest = $row1['act_mny_interest'];\n $inv_act_mny_owned = $row1['act_mny_owned'];\n $inv_act_mny_fine = $row1['act_mny_fine'];\n $inv_act_mny_total = $row1['act_mny_total'];\n $inv_act_mny_updated = $row1['act_mny_updated'];\n mysqli_free_result($result1);\n\n if ($act_invs_w_fine > 0)\n {\n $inv_act_trn_available = $inv_act_mny_available + $inv_act_mny_frozen + $act_invs_w_fine;\n $query = \"INSERT INTO account_transactions_act_trn (act_trn_usr_id, act_trn_time, act_trn_type, act_trn_amount, act_trn_available, act_trn_owned, act_trn_fine, act_trn_note) VALUES (\".sqlstrval($inv_act_usr_id).\", \".sqlstr($nowStr).\", 6, \".sqlstrval($act_invs_w_fine).\", \".sqlstrval($inv_act_trn_available).\", 0, 0, NULL)\";\n $flag = $flag && (mysqli_query($con, $query) != false);\n }\n\n $inv_act_mny_available += $act_invs_w_fine;\n $inv_act_mny_total = compute_money_total($inv_act_mny_available, $inv_act_mny_frozen, $inv_act_mny_investment, $inv_act_mny_loaned, $inv_act_mny_interest, $inv_act_mny_owned, $inv_act_mny_fine);\n $query = \"UPDATE account_money_act_mny SET act_mny_available = \".sqlstrval($inv_act_mny_available).\", act_mny_total = \".sqlstrval($inv_act_mny_total).\", act_mny_updated = \".sqlstr($nowStr).\" WHERE act_mny_usr_id = \".strval($inv_act_usr_id);\n $flag = $flag && (mysqli_query($con, $query) != false);\n\n $act_invs_r_fine += $act_invs_w_fine;\n $query = \"UPDATE account_investments_act_invs SET act_invs_r_fine = \".sqlstrval($act_invs_r_fine).\", act_invs_w_fine = 0, act_invs_updated = \".sqlstr($nowStr).\" WHERE act_invs_usr_id = \".strval($inv_act_usr_id).\" AND act_invs_app_id = \".strval($lns_app_id);\n $flag = $flag && (mysqli_query($con, $query) != false);\n }\n mysqli_free_result($result);\n }\n if ($act_trn_owned > 0 && ($act_mny_owned - $act_trn_owned) < $hyd_ln_w_owned) // hyd will owe to investors. ($act_mny_owned - $act_trn_owned) is used to repay hyd-owned-money\n {\n $r_amount = $act_mny_owned - $act_trn_owned;\n $query = \"UPDATE hyd_loans_hyd_ln SET hyd_ln_w_owned = \".sqlstrval($act_trn_owned).\", hyd_ln_updated = \".sqlstr($nowStr).\" WHERE hyd_ln_app_id = \".strval($lns_app_id);\n $flag = $flag && (mysqli_query($con, $query) != false);\n\n $query = \"SELECT inv_act_usr_id, inv_act_amount, inv_act_ratio FROM investment_accounts_inv_act WHERE inv_act_app_id = \".strval($lns_app_id);\n $result = mysqli_query($con, $query);\n while ($row = mysqli_fetch_array($result))\n {\n $inv_act_usr_id = $row['inv_act_usr_id'];\n $inv_act_amount = $row['inv_act_amount'];\n $inv_act_ratio = $row['inv_act_ratio'];\n\n $delta_amount = round($r_amount * $inv_act_ratio, 2);\n if ($delta_amount > 0)\n {\n $query = \"SELECT act_invs_r_amount, act_invs_r_interest, act_invs_a_amount, act_invs_a_interest FROM account_investments_act_invs WHERE act_invs_usr_id = \".strval($inv_act_usr_id).\" AND act_invs_app_id = \".strval($lns_app_id);\n $result1 = mysqli_query($con, $query);\n $row1 = mysqli_fetch_array($result1);\n $act_invs_r_amount = $row1['act_invs_r_amount'];\n $act_invs_r_interest = $row1['act_invs_r_interest'];\n $act_invs_a_amount = $row1['act_invs_a_amount'];\n $act_invs_a_interest = $row1['act_invs_a_interest'];\n mysqli_free_result($result1);\n\n $query = \"SELECT act_mny_available, act_mny_frozen, act_mny_investment, act_mny_loaned, act_mny_interest, act_mny_owned, act_mny_fine, act_mny_total, act_mny_updated FROM account_money_act_mny WHERE act_mny_usr_id = \".strval($inv_act_usr_id);\n $result1 = mysqli_query($con, $query);\n $row1 = mysqli_fetch_array($result1);\n $inv_act_mny_available = $row1['act_mny_available'];\n $inv_act_mny_frozen = $row1['act_mny_frozen'];\n $inv_act_mny_investment = $row1['act_mny_investment'];\n $inv_act_mny_loaned = $row1['act_mny_loaned'];\n $inv_act_mny_interest = $row1['act_mny_interest'];\n $inv_act_mny_owned = $row1['act_mny_owned'];\n $inv_act_mny_fine = $row1['act_mny_fine'];\n $inv_act_mny_total = $row1['act_mny_total'];\n $inv_act_mny_updated = $row1['act_mny_updated'];\n mysqli_free_result($result1);\n\n $delta_r_interest = ($act_invs_r_interest - $act_invs_a_interest) > $delta_amount ? $delta_amount : ($act_invs_r_interest - $act_invs_a_interest);\n $delta_r_amount = $delta_amount > $delta_r_interest ? (($act_invs_r_amount - $act_invs_a_amount) > ($delta_amount - $delta_r_interest) ? ($delta_amount - $delta_r_interest) : ($act_invs_r_amount - $act_invs_a_amount)) : 0;\n\n if ($delta_r_interest > 0)\n {\n $inv_act_trn_available = $inv_act_mny_available + $inv_act_mny_frozen + $delta_r_interest;\n $query = \"INSERT INTO account_transactions_act_trn (act_trn_usr_id, act_trn_time, act_trn_type, act_trn_amount, act_trn_available, act_trn_owned, act_trn_fine, act_trn_note) VALUES (\".sqlstrval($inv_act_usr_id).\", \".sqlstr($nowStr).\", 5, \".sqlstrval($delta_r_interest).\", \".sqlstrval($inv_act_trn_available).\", 0, 0, NULL)\";\n $flag = $flag && (mysqli_query($con, $query) != false);\n }\n if ($delta_r_amount > 0)\n {\n $inv_act_trn_available = $inv_act_mny_available + $inv_act_mny_frozen + $delta_r_interest + $delta_r_amount;\n $query = \"INSERT INTO account_transactions_act_trn (act_trn_usr_id, act_trn_time, act_trn_type, act_trn_amount, act_trn_available, act_trn_owned, act_trn_fine, act_trn_note) VALUES (\".sqlstrval($inv_act_usr_id).\", \".sqlstr($nowStr).\", 4, \".sqlstrval($delta_r_amount).\", \".sqlstrval($inv_act_trn_available).\", 0, 0, NULL)\";\n $flag = $flag && (mysqli_query($con, $query) != false);\n }\n\n $inv_act_mny_available += $delta_r_interest + $delta_r_amount;\n $inv_act_mny_total = compute_money_total($inv_act_mny_available, $inv_act_mny_frozen, $inv_act_mny_investment, $inv_act_mny_loaned, $inv_act_mny_interest, $inv_act_mny_owned, $inv_act_mny_fine);\n $query = \"UPDATE account_money_act_mny SET act_mny_available = \".sqlstrval($inv_act_mny_available).\", act_mny_total = \".sqlstrval($inv_act_mny_total).\", act_mny_updated = \".sqlstr($nowStr).\" WHERE act_mny_usr_id = \".strval($inv_act_usr_id);\n $flag = $flag && (mysqli_query($con, $query) != false);\n\n $act_invs_a_amount += $delta_r_amount;\n $act_invs_a_interest += $delta_r_interest;\n $act_invs_w_owned = $act_invs_w_owned - ($delta_r_amount + $delta_r_interest);\n $query = \"UPDATE account_investments_act_invs SET act_invs_a_amount = \".sqlstrval($act_invs_a_amount).\", act_invs_a_interest = \".sqlstrval($act_invs_a_interest).\", act_invs_w_owned = \".sqlstrval($act_invs_w_owned).\", act_invs_updated = \".sqlstr($nowStr).\" WHERE act_invs_usr_id = \".strval($inv_act_usr_id).\" AND act_invs_app_id = \".strval($lns_app_id);\n $flag = $flag && (mysqli_query($con, $query) != false);\n }\n }\n mysqli_free_result($result);\n }\n else // hyd repays all owned money to investors\n {\n $query = \"UPDATE hyd_loans_hyd_ln SET hyd_ln_w_owned = 0, hyd_ln_updated = \".sqlstr($nowStr).\" WHERE hyd_ln_app_id = \".strval($lns_app_id);\n $flag = $flag && (mysqli_query($con, $query) != false);\n\n $query = \"SELECT inv_act_usr_id, inv_act_amount, inv_act_ratio FROM investment_accounts_inv_act WHERE inv_act_app_id = \".strval($lns_app_id);\n $result = mysqli_query($con, $query);\n while ($row = mysqli_fetch_array($result))\n {\n $inv_act_usr_id = $row['inv_act_usr_id'];\n $inv_act_amount = $row['inv_act_amount'];\n $inv_act_ratio = $row['inv_act_ratio'];\n\n $query = \"SELECT act_invs_r_amount, act_invs_r_interest, act_invs_r_fine, act_invs_a_amount, act_invs_a_interest FROM account_investments_act_invs WHERE act_invs_usr_id = \".strval($inv_act_usr_id).\" AND act_invs_app_id = \".strval($lns_app_id);\n $result1 = mysqli_query($con, $query);\n $row1 = mysqli_fetch_array($result1);\n $act_invs_r_amount = $row1['act_invs_r_amount'];\n $act_invs_r_interest = $row1['act_invs_r_interest'];\n $act_invs_r_fine = $row1['act_invs_r_fine'];\n $act_invs_a_amount = $row1['act_invs_a_amount'];\n $act_invs_a_interest = $row1['act_invs_a_interest'];\n mysqli_free_result($result1);\n\n $query = \"SELECT act_mny_available, act_mny_frozen, act_mny_investment, act_mny_loaned, act_mny_interest, act_mny_owned, act_mny_fine, act_mny_total, act_mny_updated FROM account_money_act_mny WHERE act_mny_usr_id = \".strval($inv_act_usr_id);\n $result1 = mysqli_query($con, $query);\n $row1 = mysqli_fetch_array($result1);\n $inv_act_mny_available = $row1['act_mny_available'];\n $inv_act_mny_frozen = $row1['act_mny_frozen'];\n $inv_act_mny_investment = $row1['act_mny_investment'];\n $inv_act_mny_loaned = $row1['act_mny_loaned'];\n $inv_act_mny_interest = $row1['act_mny_interest'];\n $inv_act_mny_owned = $row1['act_mny_owned'];\n $inv_act_mny_fine = $row1['act_mny_fine'];\n $inv_act_mny_total = $row1['act_mny_total'];\n $inv_act_mny_updated = $row1['act_mny_updated'];\n mysqli_free_result($result1);\n\n $delta_r_interest = $act_invs_r_interest - $act_invs_a_interest;\n $delta_r_amount = $act_invs_r_amount - $act_invs_a_amount;\n\n if ($delta_r_interest > 0)\n {\n $inv_act_trn_available = $inv_act_mny_available + $inv_act_mny_frozen + $delta_r_interest;\n $query = \"INSERT INTO account_transactions_act_trn (act_trn_usr_id, act_trn_time, act_trn_type, act_trn_amount, act_trn_available, act_trn_owned, act_trn_fine, act_trn_note) VALUES (\".sqlstrval($inv_act_usr_id).\", \".sqlstr($nowStr).\", 5, \".sqlstrval($delta_r_interest).\", \".sqlstrval($inv_act_trn_available).\", 0, 0, NULL)\";\n $flag = $flag && (mysqli_query($con, $query) != false);\n }\n if ($delta_r_amount > 0)\n {\n $inv_act_trn_available = $inv_act_mny_available + $inv_act_mny_frozen + $delta_r_interest + $delta_r_amount;\n $query = \"INSERT INTO account_transactions_act_trn (act_trn_usr_id, act_trn_time, act_trn_type, act_trn_amount, act_trn_available, act_trn_owned, act_trn_fine, act_trn_note) VALUES (\".sqlstrval($inv_act_usr_id).\", \".sqlstr($nowStr).\", 4, \".sqlstrval($delta_r_amount).\", \".sqlstrval($inv_act_trn_available).\", 0, 0, NULL)\";\n $flag = $flag && (mysqli_query($con, $query) != false);\n }\n\n $inv_act_mny_available += $delta_r_interest + $delta_r_amount;\n $inv_act_mny_total = compute_money_total($inv_act_mny_available, $inv_act_mny_frozen, $inv_act_mny_investment, $inv_act_mny_loaned, $inv_act_mny_interest, $inv_act_mny_owned, $inv_act_mny_fine);\n $query = \"UPDATE account_money_act_mny SET act_mny_available = \".sqlstrval($inv_act_mny_available).\", act_mny_total = \".sqlstrval($inv_act_mny_total).\", act_mny_updated = \".sqlstr($nowStr).\" WHERE act_mny_usr_id = \".strval($inv_act_usr_id);\n $flag = $flag && (mysqli_query($con, $query) != false);\n\n if (is_null($hyd_ln_n_date)) // hyd investment project is finished\n {\n $query = \"UPDATE account_investments_act_invs SET act_invs_is_done = 1, act_invs_a_amount = \".sqlstrval($act_invs_r_amount).\", act_invs_a_interest = \".sqlstrval($act_invs_r_interest).\", act_invs_w_owned = 0, act_invs_updated = \".sqlstr($nowStr).\" WHERE act_invs_usr_id = \".strval($inv_act_usr_id).\" AND act_invs_app_id = \".strval($lns_app_id);\n $flag = $flag && (mysqli_query($con, $query) != false);\n\n $query = \"SELECT act_inv_amount, act_inv_interest, act_inv_fine, act_inv_interest_rate, act_inv_duration, act_inv_total, act_inv_holdings FROM account_investment_act_inv WHERE act_inv_usr_id = \".strval($inv_act_usr_id);\n $result1 = mysqli_query($con, $query);\n $row1 = mysqli_fetch_array($result1);\n $inv_act_inv_amount = $row1['act_inv_amount'];\n $inv_act_inv_interest = $row1['act_inv_interest'];\n $inv_act_inv_fine = $row1['act_inv_fine'];\n $inv_act_inv_interest_rate = $row1['act_inv_interest_rate'];\n $inv_act_inv_duration = $row1['act_inv_duration'];\n $inv_act_inv_total = $row1['act_inv_total'];\n $inv_act_inv_holdings = $row1['act_inv_holdings'];\n mysqli_free_result($result1);\n\n $new_interest_rate = compute_average_interest_rate($inv_act_inv_amount, $inv_act_inv_interest_rate, $inv_act_inv_duration, $act_invs_r_amount, $inv_interest_rate, $inv_duration);\n\n $inv_act_inv_amount += $act_invs_r_amount;\n $inv_act_inv_interest += $act_invs_r_interest;\n $inv_act_inv_fine += $act_invs_r_fine;\n $inv_act_inv_total += 1;\n $inv_act_inv_holdings = $inv_act_inv_holdings - 1;\n $query = \"UPDATE account_investment_act_inv SET act_inv_amount = \".sqlstrval($inv_act_inv_amount).\", act_inv_interest = \".sqlstrval($inv_act_inv_interest).\", act_inv_fine = \".sqlstrval($inv_act_inv_fine).\", act_inv_interest_rate = \".sqlstrval($new_interest_rate->cr1).\", act_inv_duration = \".sqlstrval($new_interest_rate->cd1).\", act_inv_total = \".sqlstrval($act_inv_total).\", act_inv_holdings = \".sqlstrval($inv_act_inv_holdings).\", act_inv_updated = \".sqlstr($nowStr).\" WHERE act_inv_usr_id = \".strval($inv_act_usr_id);\n $flag = $flag && (mysqli_query($con, $query) != false);\n }\n else // hyd investment project is not finished yet\n {\n $query = \"UPDATE account_investments_act_invs SET act_invs_a_amount = \".sqlstrval($act_invs_r_amount).\", act_invs_a_interest = \".sqlstrval($act_invs_r_interest).\", act_invs_w_owned = 0, act_invs_updated = \".sqlstr($nowStr).\" WHERE act_invs_usr_id = \".strval($inv_act_usr_id).\" AND act_invs_app_id = \".strval($lns_app_id);\n $flag = $flag && (mysqli_query($con, $query) != false);\n }\n }\n mysqli_free_result($result);\n }\n\n $query = \"SELECT act_ln_amount, act_ln_interest, act_ln_fine, act_ln_interest_rate, act_ln_duration, act_ln_loans, act_ln_r_amount, act_ln_r_interest, act_ln_n_date FROM account_loan_act_ln WHERE act_ln_usr_id = \".strval($id);\n $result = mysqli_query($con, $query);\n $row = mysqli_fetch_array($result);\n $act_ln_amount = $row['act_ln_amount'];\n $act_ln_interest = $row['act_ln_interest'];\n $act_ln_fine = $row['act_ln_fine'];\n $act_ln_interest_rate = $row['act_ln_interest_rate'];\n $act_ln_duration = $row['act_ln_duration'];\n $act_ln_loans = $row['act_ln_loans'];\n $act_ln_r_amount = $row['act_ln_r_amount'];\n $act_ln_r_interest = $row['act_ln_r_interest'];\n $act_ln_n_date = $row['act_ln_n_date'];\n mysqli_free_result($result);\n\n if ($act_trn_owned <= 0 && is_null($act_ln_n_date)) // loan finished\n {\n $query = \"UPDATE loans_lns SET lns_is_done = 1, lns_finished = \".sqlstr($todayStr).\", lns_updated = \".sqlstr($nowStr).\" WHERE lns_app_id = \".strval($lns_app_id).\" AND lns_usr_id = \".strval($id);\n $flag = $flag && (mysqli_query($con, $query) != false);\n\n $new_interest_rate = compute_average_interest_rate($act_ln_amount, $act_ln_interest_rate, $act_ln_duration, $act_ln_r_amount, $lns_interest_rate, $lns_duration);\n $act_ln_amount += $act_ln_r_amount;\n $act_ln_interest += $act_ln_r_interest;\n $act_ln_fine += $lns_fine;\n $act_ln_loans += 1;\n $query = \"UPDATE account_loan_act_ln SET act_ln_amount = \".sqlstrval($act_ln_amount).\", act_ln_interest = \".sqlstrval($act_ln_interest).\", act_ln_fine = \".sqlstrval($act_ln_fine).\", act_ln_interest_rate = \".sqlstrval($new_interest_rate->cr1).\", act_ln_duration = \".sqlstrval($new_interest_rate->cd1).\", act_ln_loans = \".sqlstrval($act_ln_loans).\", act_ln_app_id = NULL, act_ln_w_amount = 0, act_ln_w_fine = 0, act_ln_updated = \".sqlstr($nowStr).\" WHERE act_ln_usr_id = \".strval($id);\n $flag = $flag && (mysqli_query($con, $query) != false);\n }\n else // loan is not finished yet\n {\n $query = \"UPDATE account_loan_act_ln SET act_ln_w_owned = \".sqlstrval($act_trn_owned).\", act_ln_w_fine = \".sqlstrval($act_trn_fine).\", act_ln_updated = \".sqlstr($nowStr).\" WHERE act_ln_usr_id = \".strval($id);\n $flag = $flag && (mysqli_query($con, $query) != false);\n }\n\n $act_mny_available = $act_trn_available - $act_mny_frozen;\n $act_mny_is_owned = $act_trn_owned > 0 ? 1 : 0;\n $act_mny_owned = $act_trn_owned;\n $act_mny_fine = $act_trn_fine;\n $act_mny_total = compute_money_total($act_mny_available, $act_mny_frozen, $act_mny_investment, $act_mny_loaned, $act_mny_interest, $act_mny_owned, $act_mny_fine);\n $query = \"UPDATE account_money_act_mny SET act_mny_available = \".sqlstrval($act_mny_available).\", act_mny_is_owned = \".sqlstrval($act_mny_is_owned).\", act_mny_owned = \".sqlstrval($act_mny_owned).\", act_mny_fine = \".sqlstrval($act_mny_fine).\", act_mny_total = \".sqlstrval($act_mny_total).\", act_mny_updated = \".sqlstr($nowStr).\" WHERE act_mny_usr_id = \".strval($id);\n $flag = $flag && (mysqli_query($con, $query) != false);\n }\n }\n }\n }\n break;\n }\n\n if ($flag)\n {\n mysqli_commit($con);\n echo \"{\\\"result\\\":1}\";\n }\n else\n {\n mysqli_rollback($con);\n echo \"{\\\"result\\\":0, \\\"message\\\":\\\"DB write failure\\\"}\";\n }\n mysqli_query($con, \"UNLOCK TABLES\");\n\n mysqli_kill($con, mysqli_thread_id($con));\n mysqli_close($con);\n}", "title": "" }, { "docid": "9eab854327187628ec64a8033a720d88", "score": "0.46377447", "text": "public function accountStatement(AccountStatementRequest $request, TransactionRepository $transactionRepo, AccountRepository $accountRepo)\n {\n $accountWhereParam = [];\n\n $subTotalDebit = 0;\n $subTotalCredit = 0;\n $obDebit = 0;\n $obCredit = 0;\n\n $noOfRecords = $request->get('no_of_records') ?? config('settings.no_of_record_per_page');\n\n //date format conversion\n $fromDate = !empty($request->get('from_date')) ? Carbon::createFromFormat('d-m-Y', $request->get('from_date'))->format('Y-m-d') : null;\n $toDate = !empty($request->get('to_date')) ? Carbon::createFromFormat('d-m-Y', $request->get('to_date'))->format('Y-m-d') : null;\n $accountId = $request->get('account_id');\n\n $whereParams = [\n 'from_date' => [\n 'paramName' => 'transaction_date',\n 'paramOperator' => '>=',\n 'paramValue' => $fromDate,\n ],\n 'to_date' => [\n 'paramName' => 'transaction_date',\n 'paramOperator' => '<=',\n 'paramValue' => $toDate,\n ],\n ];\n\n $obWhereParams = [\n 'ob_up_to_date' => [\n 'paramName' => 'transaction_date',\n 'paramOperator' => '<',\n 'paramValue' => $fromDate,\n ]\n ];\n\n if(!empty($accountId)) {\n $accountWhereParam = [\n 'account_id' => [\n 'paramName' => 'id',\n 'paramOperator' => '=',\n 'paramValue' => $accountId,\n ]\n ];\n } else {\n $accountWhereParam = [\n 'account_name' => [\n 'paramName' => 'account_name',\n 'paramOperator' => '=',\n 'paramValue' => \"Cash\",\n ],\n ];\n }\n\n try {\n $account = $accountRepo->getAccounts($accountWhereParam, [], [], ['by' => 'id', 'order' => 'asc', 'num' => 1], [], [], true);\n $accountId = $accountId ?? $account->id; //setting default to cash if no account is selected\n\n $debitParam = [\n 'account_id_debit' => [\n 'paramName' => 'debit_account_id',\n 'paramOperator' => '=',\n 'paramValue' => $accountId,\n ]\n ];\n\n $creditParam = [\n 'account_id_credit' => [\n 'paramName' => 'credit_account_id',\n 'paramOperator' => '=',\n 'paramValue' => $accountId,\n ]\n ];\n\n $transactions = $transactionRepo->getTransactions($whereParams, array_merge($debitParam, $creditParam), [], ['by' => 'transaction_date', 'order' => 'asc', 'num' => $noOfRecords], [], [], null, true);\n if($transactions->lastPage() == $transactions->currentPage()) {\n $subTotalDebit = $transactionRepo->getTransactions($whereParams, $debitParam, [], [], ['key' => 'sum', 'value' => 'amount'], [], null, true);\n $subTotalCredit = $transactionRepo->getTransactions($whereParams, $creditParam, [], [], ['key' => 'sum', 'value' => 'amount'], [], null, true);\n\n //old balance values\n if(!empty($fromDate)) {\n $obDebit = $transactionRepo->getTransactions($obWhereParams, $debitParam, [], [], ['key' => 'sum', 'value' => 'amount'], [], null, true);\n $obCredit = $transactionRepo->getTransactions($obWhereParams, $creditParam, [], [], ['key' => 'sum', 'value' => 'amount'], [], null, true);\n }\n }\n } catch (\\Exception $e) {\n $errorCode = (($e->getMessage() == \"CustomError\") ? $e->getCode() : 1);\n\n return redirect(route('dashboard'))->with(\"message\",\"An unexpected error occured! Please try after sometime. #\". $this->errorHead. \"/\". $errorCode)->with(\"alert-class\", \"error\");\n }\n\n //params passing for auto selection\n $params['from_date']['paramValue'] = $request->get('from_date');\n $params['to_date']['paramValue'] = $request->get('to_date');\n $params['account_id']['paramValue'] = $accountId;\n\n return view('reports.account-statement',\n compact('account', 'transactions', 'subTotalDebit', 'subTotalCredit', 'obDebit', 'obCredit', 'params', 'noOfRecords')\n );\n }", "title": "" }, { "docid": "4648d0bb3567f2a9ebe7a9cbc330fa53", "score": "0.46357656", "text": "public function store(Request $request)\n {\n $service_sheet = new FormServiceSheet();\n\n $service_sheet->job_no = $request->get('job_no');\n $service_sheet->dt_form = is_null($request->get('dt_form')) ? null : Carbon::createFromFormat('d/m/Y', $request->get('dt_form'));\n $service_sheet->customer_name = $request->get('customer_name');\n $service_sheet->customer_address = $request->get('customer_address');\n $service_sheet->requested_by = $request->get('requested_by');\n $service_sheet->contact_no = $request->get('contact_no');\n //Job\n $service_sheet->job_description = $request->get('job_description');\n $service_sheet->job_address = $request->get('job_address');\n $service_sheet->site_contact = $request->get('site_contact');\n $service_sheet->site_contact_no = $request->get('site_contact_no');\n\n //Authority\n $service_sheet->read_understood = $request->get('read_understood');\n $service_sheet->authority_name = $request->get('authority_name');\n $service_sheet->authority_dt = is_null($request->get('authority_dt')) ? null : Carbon::createFromFormat('d/m/Y', $request->get('authority_dt'));\n\n $service_sheet->description = $request->get('description');\n\n //Materials\n $service_sheet->purchase_no_1 = $request->get('purchase_no_1');\n $service_sheet->purchase_no_2 = $request->get('purchase_no_2');\n $service_sheet->purchase_no_3 = $request->get('purchase_no_3');\n\n $service_sheet->material_no_1 = $request->get('material_no_1');\n $service_sheet->material_no_2 = $request->get('material_no_2');\n $service_sheet->material_no_3 = $request->get('material_no_3');\n\n //Time Sheet\n $service_sheet->time_sheet_dt_1 = is_null($request->get('time_sheet_dt_1')) ? null : Carbon::createFromFormat('d/m/Y', $request->get('time_sheet_dt_1'));\n $service_sheet->time_sheet_dt_2 = is_null($request->get('time_sheet_dt_2')) ? null : Carbon::createFromFormat('d/m/Y', $request->get('time_sheet_dt_2'));\n $service_sheet->time_sheet_dt_3 = is_null($request->get('time_sheet_dt_3')) ? null : Carbon::createFromFormat('d/m/Y', $request->get('time_sheet_dt_3'));\n $service_sheet->time_sheet_dt_4 = is_null($request->get('time_sheet_dt_4')) ? null : Carbon::createFromFormat('d/m/Y', $request->get('time_sheet_dt_4'));\n $service_sheet->time_sheet_dt_5 = is_null($request->get('time_sheet_dt_5')) ? null : Carbon::createFromFormat('d/m/Y', $request->get('time_sheet_dt_5'));\n\n $service_sheet->time_sheet_start_1 = $request->get('time_sheet_start_1');\n $service_sheet->time_sheet_start_2 = $request->get('time_sheet_start_2');\n $service_sheet->time_sheet_start_3 = $request->get('time_sheet_start_3');\n $service_sheet->time_sheet_start_4 = $request->get('time_sheet_start_4');\n $service_sheet->time_sheet_start_5 = $request->get('time_sheet_start_5');\n\n $service_sheet->time_sheet_end_1 = $request->get('time_sheet_end_1');\n $service_sheet->time_sheet_end_2 = $request->get('time_sheet_end_2');\n $service_sheet->time_sheet_end_3 = $request->get('time_sheet_end_3');\n $service_sheet->time_sheet_end_4 = $request->get('time_sheet_end_4');\n $service_sheet->time_sheet_end_5 = $request->get('time_sheet_end_5');\n\n $service_sheet->time_sheet_total_1 = $request->get('time_sheet_total_1');\n $service_sheet->time_sheet_total_2 = $request->get('time_sheet_total_2');\n $service_sheet->time_sheet_total_3 = $request->get('time_sheet_total_3');\n $service_sheet->time_sheet_total_4 = $request->get('time_sheet_total_4');\n $service_sheet->time_sheet_total_5 = $request->get('time_sheet_total_5');\n\n $service_sheet->time_sheet_initial_1 = $request->get('time_sheet_initial_1');\n $service_sheet->time_sheet_initial_2 = $request->get('time_sheet_initial_2');\n $service_sheet->time_sheet_initial_3 = $request->get('time_sheet_initial_3');\n $service_sheet->time_sheet_initial_4 = $request->get('time_sheet_initial_4');\n $service_sheet->time_sheet_initial_5 = $request->get('time_sheet_initial_5');\n\n //Costings\n $service_sheet->service_call = $request->get('service_call');\n $service_sheet->labour = $request->get('labour');\n $service_sheet->materials = $request->get('materials');\n $service_sheet->equipments = $request->get('equipments');\n $service_sheet->as_per_quote = $request->get('as_per_quote');\n\n $service_sheet->service_call_value = $request->get('service_call_value');\n $service_sheet->labour_value = $request->get('labour_value');\n $service_sheet->materials_value = $request->get('materials_value');\n $service_sheet->equipments_value = $request->get('equipments_value');\n $service_sheet->as_per_quote_value = $request->get('as_per_quote_value');\n $service_sheet->gst = $request->get('gst');\n $service_sheet->total = $request->get('total');\n\n //Payment\n $service_sheet->pay_type = $request->get('pay_type');\n $service_sheet->card_cheque_no = $request->get('card_cheque_no');\n $service_sheet->card_expiry_dt = is_null($request->get('card_expiry_dt')) ? null : Carbon::createFromFormat('d/m/Y', $request->get('card_expiry_dt'));\n $service_sheet->card_name = $request->get('card_name');\n $service_sheet->card_id = $request->get('card_id');\n\n //Signatures\n $service_sheet->authority_signature = $request->get('authority_signature_hidden');\n $service_sheet->tradesman_signature = $request->get('signature_2_hidden');\n $service_sheet->customer_signature = $request->get('signature_3_hidden');\n\n\n $service_sheet->save();\n\n\n\n\n return redirect('/form_service_sheet')->with('success', 'Service Sheet added with success');\n }", "title": "" }, { "docid": "79ed59fede5ce6521d6f478851bc237e", "score": "0.46298543", "text": "public function create()\n {\n return view('account.balance.create');\n }", "title": "" }, { "docid": "45adb9b56d15a780e1ce7c65486c8a18", "score": "0.46234778", "text": "public function bankpayment(Request $request,$id)\n {\n DB::beginTransaction();\n $invoice=PaymentHelper::generate_invoice_number();\n $subscription_data=Session::get('subscription_details');\n $accountvalues=$subscription_data['accountids'];\n $user=User::find($id);\n $accounts=Accounts::where('fk_user_id','=',$id)->whereIn('acct_id',$accountvalues)->get();\n $account_count=count($accounts);\n $balance=0;\n if (Transactions::where('invoice_number', '=', $invoice)->count() > 0) \n {\n return abort(406);\n }\n\n if($subscription_data['total_amount'] < $subscription_data['subscription_fee'])\n {\n $wallet= new WalletTransaction();\n $wallet->id=PaymentHelper::generate_wallet_id();\n $wallet->fk_user_id=$id;\n $wallet->amount=$subscription_data['total_amount'];\n $wallet->date=date('Y-m-d');\n $wallet->type=\"Credit\";\n $wallet->remarks=\"Transferred from bank payment balance\";\n $wallet->status=\"Paid\";\n $wallet->save();\n \n }\n\n else\n {\n \n $transaction= new Transactions();\n $transaction->invoice_number=$invoice;\n $transaction->fk_user_id=$id;\n $transaction->subscription_fee=$subscription_data['total_subscription_fee'];\n $transaction->sgst=$subscription_data['sgst'];\n $transaction->cgst=$subscription_data['cgst'];\n $transaction->cess=$subscription_data['cess'];\n $transaction->gst=$subscription_data['total_gst_amount'];\n $transaction->amount=$subscription_data['total_amount'];\n $transaction->date=$subscription_data['date'];\n $transaction->paid_from=\"Bank\";\n $transaction->status=\"Paid\";\n $transaction->save();\n $transactions=DB::select(\"select * from transactions where fk_user_id = '$id'\");\n \n foreach($transactions as $transaction1)\n {\n $trans_id=$transaction1->transaction_id;\n $amount=$transaction1->amount;\n } \n \n $balance=PaymentHelper::save_to_subscription_fee($accounts,$amount,$trans_id);\n \n if($balance > 0)\n {\n $wallet= new WalletTransaction();\n $wallet->id=PaymentHelper::generate_wallet_id();\n $wallet->fk_user_id=$id;\n $wallet->amount=$balance;\n $wallet->date=date('Y-m-d');\n $wallet->type=\"Credit\";\n $wallet->remarks=\"Transferred from bank payment balance\";\n $wallet->status=\"Paid\";\n $wallet->save();\n }\n $message = \"Your Payment is successfull. You can download your invoice here.\";\n $data = array(\n 'name' => $user->name,\n 'email' => $user->email,\n 'message' => $message,\n 'id' => $trans_id\n );\n\n Mail::to($data['email'])->send(new PaymentMail($data));\n }\n DB::commit();\n return redirect()->route('adminuserview',$id)->with('status','Payment Successfull !!!'); \n }", "title": "" }, { "docid": "cbcf24000eb59940ec4023e3f2a8edb0", "score": "0.46192637", "text": "public function create($request, $response, $args)\n {\n // Get the alert message stream\n $ms = $this->ci->alerts;\n // Request POST data\n $post = $request->getParsedBody();\n // Load the request schema\n $schema = new RequestSchema(\"schema://requests/ufexcel-create.json\");\n // Whitelist and set parameter defaults\n $transformer = new RequestDataTransformer($schema);\n\n $data = $transformer->transform($post);\n\n // Validate, and halt on validation errors.\n $validator = new ServerSideValidator($schema, $this->ci->translator);\n if (!$validator->validate($data)) {\n $ms->addValidationErrors($validator);\n return $response->withStatus(400);\n }\n\n\n /** @var UserFrosting\\Sprinkle\\Account\\Database\\Models\\User $currentUser */\n $currentUser = $this->ci->currentUser;\n\n /** @var UserFrosting\\Sprinkle\\Account\\Authorize\\AuthorizationManager $authorizer */\n $authorizer = $this->ci->authorizer;\n\n // Access-controlled page\n if (!$authorizer->checkAccess($currentUser, 'ufexcel_dashboard')) {\n throw new ForbiddenException();\n }\n if ($error) {\n return $response->withStatus(400);\n }\n\n /** @var UserFrosting\\Sprinkle\\Core\\Util\\ClassMapper $classMapper */\n $classMapper = $this->ci->classMapper;\n\n Capsule::transaction( function() use ($classMapper, $data, $ms, $config, $currentUser)\n {\n $newTable = $classMapper->createInstance('ufexcel_table', $data);\n\n //save the new configuration\n $newTable->save();\n $ms->addMessage('success', 'New table configuration created successfully.', $data);\n });\n\n return $response->withStatus(200);\n }", "title": "" }, { "docid": "731d70e122ec49d448154bb1ad7bcb97", "score": "0.461742", "text": "public function adjust()\n {\n $balanceData = $this->get();\n\n $currentBalance = 0;\n if (count($balanceData) > 0) {\n $currentBalance = $balanceData[0]['currencies'][0]['amount'];\n }\n\n return $this->createTransaction($currentBalance);\n }", "title": "" }, { "docid": "693d2729b699ecc03fa61a44202ad7d2", "score": "0.46113566", "text": "private function createBulkRequest(\\Infobip\\Model\\CallBulkRequest $callBulkRequest): Request\n {\n $allData = [\n 'callBulkRequest' => $callBulkRequest,\n ];\n\n $validationConstraints = [];\n\n $this\n ->addParamConstraints(\n [\n 'callBulkRequest' => [\n new Assert\\NotNull(),\n ],\n ],\n $validationConstraints\n );\n\n $this->validateParams($allData, $validationConstraints);\n\n $resourcePath = '/calls/1/bulks';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n\n $headers = [\n 'Accept' => 'application/json',\n 'Content-Type' => 'application/json',\n ];\n\n // for model (json/xml)\n if (isset($callBulkRequest)) {\n $httpBody = ($headers['Content-Type'] === 'application/json')\n ? $this->objectSerializer->serialize($callBulkRequest)\n : $callBulkRequest;\n } elseif (count($formParams) > 0) {\n $formParams = \\json_decode($this->objectSerializer->serialize($formParams), true);\n\n if ($headers['Content-Type'] === 'multipart/form-data') {\n $boundary = '----' . hash('sha256', uniqid('', true));\n $headers['Content-Type'] .= '; boundary=' . $boundary;\n $multipartContents = [];\n\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = (\\is_array($formParamValue)) ? $formParamValue : [$formParamValue];\n\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents, $boundary);\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = $this->objectSerializer->serialize($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = Query::build($formParams);\n }\n }\n\n $apiKey = $this->config->getApiKey();\n\n if ($apiKey !== null) {\n $headers[$this->config->getApiKeyHeader()] = $apiKey;\n }\n\n $defaultHeaders = [];\n\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 foreach ($queryParams as $key => $value) {\n if (\\is_array($value)) {\n continue;\n }\n\n $queryParams[$key] = $this->objectSerializer->toString($value);\n }\n\n $query = Query::build($queryParams);\n\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "5e530be5b456991b00f391b12ca8ab78", "score": "0.46031684", "text": "public function ownbankConfirm(Request $request){\n\n $user = User::find(Auth::id());\n if($user->is_fund_blocked){\n return redirect()->back()->withErrors(\"You are not allowed to transfer. Pleases contact to our support.\");\n }\n if(!$user->transaction_pin)\n {\n return redirect()->back()->withErrors(\"Please, generate your transaction pin to proceed\");\n }\n\n $request->validate([\n 'account_no' => 'required',\n 'amount' => 'required',\n 'transaction_pin' => 'required',\n ]);\n\n if($request->transaction_pin != \\Auth::user()->transaction_pin)\n {\n return redirect()->back()->withErrors(\"Your transaction pin is incorrect,please try again\");\n }\n\n // DB transfer info here \n $transfer_credentials = Option::where('key','ownbank_charge')->get()->first();\n $transfer_credentials = json_decode($transfer_credentials->value);\n\n $amount = $request->amount; // transfer amount\n\n $user_balance = User::where('id', Auth::id())->pluck('balance')->first();\n $account_check = User::where([\n ['account_number', $request->account_no],\n ['id','!=',Auth::id()],\n ])->exists();\n\n //check if account exists\n if (!$account_check) {\n return redirect()->back()->withErrors(\"Invalid Account Number!\");\n }\n\n //if balance amount not empty\n if ($user_balance == '') {\n return redirect()->back()->withErrors(\"Insufficient Balance!\");\n }\n\n //if balance amount is valid\n if ($amount >= $user_balance) {\n return redirect()->back()->withErrors(\"Insufficient Balance!\");\n // return redirect()->back()->with('error', \"Cannot transfer more than: \" . $user_balance)->withInput();\n }\n\n //if amount is valid\n if ($amount < (double) $transfer_credentials->min_amount) {\n return redirect()->back()->withErrors(\"Amount Cannot be less than \" . $transfer_credentials->min_amount);\n /* return redirect()->back()->with('error', \")->withInput();*/\n }elseif ($amount > (double) $transfer_credentials->max_amount) {\n return redirect()->back()->withErrors(\"Amount Cannot be greater than \" . $transfer_credentials->max_amount);\n // return redirect()->back()->with('error', \"Cannot be greater than \" . $transfer_credentials->max_amount)->withInput();\n }\n\n $charge = 0;\n //Charge type check and calculate\n /* if ($transfer_credentials->charge_type == 'fixed') {\n // calculate fixed\n $charge = (double) $transfer_credentials->fix_charge;\n $amount = $amount - (double) $transfer_credentials->fixed_charge;\n }elseif ($transfer_credentials->charge_type == 'percentage') {\n // calculate percentage\n $charge = (($amount / 100) * (double) $transfer_credentials->percent_charge);\n $amount = $amount - $charge;\n }elseif ($transfer_credentials->charge_type == 'both'){\n //If both: minus the charge then calculate the percentage \n $charge = (double) $transfer_credentials->fixed_charge;\n $charge += ($amount / 100) * (double) $transfer_credentials->percent_charge;\n // calculate percentage\n $amount = $amount - $charge;\n }*/\n\n $data = [\n 'amount' => abs($request->amount),\n 'total_amount' => abs($amount),\n 'account_no' => $request->account_no,\n 'account_title' => $request->account_title,\n 'charge_type' => $transfer_credentials->charge_type,\n 'total_charge' => $charge\n ];\n\n session($data);\n\n $data = json_decode(json_encode($data), false);\n\n return view('user.transfer.ownbankConfirm', compact('data'));\n }", "title": "" }, { "docid": "75ecbcab91eb09ff8d2407317d253b06", "score": "0.46005106", "text": "public function massimportAction(){\n $logger = $this->get('logger');\n $success = true;\n /**\n * AUTHENTICATE\n *\n */\n // These settings are found on google developer console\n //echo '1';\n $objClientAuth = new Google_Client ();\n //echo '2';\n $objClientAuth->setApplicationName(self::CLIENT_APP_NAME);\n //echo '3';\n $objClientAuth->setClientId(self::CLIENT_ID);\n //echo '4';\n $objClientAuth->setAssertionCredentials(new Google_Auth_AssertionCredentials(\n self::CLIENT_EMAIL, array('https://spreadsheets.google.com/feeds', 'https://docs.google.com/feeds'), file_get_contents(self::CLIENT_KEY_PATH), self::CLIENT_KEY_PW\n ));\n //echo '5';\n $objClientAuth->getAuth();\n //echo '6';\n $objClientAuth->getAuth()->refreshTokenWithAssertion();\n\n //echo '7';\n $objToken = json_decode($objClientAuth->getAccessToken());\n //var_dump($objToken);\n //echo '8';\n $accessToken = $objToken->access_token;\n\n\n //prepare result - be it error or success\n $result = array();\n\n $serviceRequest = new DefaultServiceRequest($accessToken);\n ServiceRequestFactory::setInstance($serviceRequest);\n if (!isset($serviceRequest)) {\n //echo \"service request created\";\n $logger->info('Could not connect to google sheets');\n die;\n }\n\n /**\n * Get spreadsheet by title\n */\n $spreadsheetTitle = $_POST['sheet_name'];\n $spreadsheetService = new SpreadsheetService();\n $spreadsheetFeed = $spreadsheetService->getSpreadsheets();\n $spreadsheet = $spreadsheetFeed->getByTitle($spreadsheetTitle);\n if (!isset($spreadsheet)) {\n //echo \"spreadsheet connected\";\n $logger->info('There was problem getting google sheet named ' . $_POST['sheet_name']);\n die;\n }\n\n\n /**\n * Get All worksheest of the selected spreadsheet\n */\n $worksheetFeed = $spreadsheet->getWorksheets();\n $worksheets = $worksheetFeed->getAllWorksheets();\n if (!isset($worksheets) || count($worksheets)==0) {\n $logger->info('There was problem getting WorkSheets');\n die;\n //echo \"worksheet connected\";\n }\n else{\n $factory = $this->factory;\n $em = $this->getDoctrine()->getManager();\n try {\n if(isset($_POST['existing_segment']) && $_POST['existing_segment']!=\"\"){\n foreach($worksheets as $worksheet){\n $worksheetTitle = $worksheet->getTitle();\n if(strpos($worksheetTitle,'Guide')!==false || strpos($worksheetTitle,'Template')!==false || strpos($worksheetTitle,'Expocheck')!==false){\n continue;\n }\n try{\n $impSegment = new ImportSegment();\n $impSegment->setSheetName($_POST['sheet_name']);\n $impSegment->setWorkSheetName($worksheetTitle);\n $impSegment->setImportedOn(new \\DateTime());\n $impSegment->setImportedBy($_POST['lead_owner']);\n $impSegment->setSegment(trim($_POST['existing_segment']));\n $impSegment->setSegmentOwner($_POST['lead_owner']);\n if(isset($_POST['check_against']) && $_POST['check_against']!=''){\n $impSegment->setCheckAgainst($_POST['check_against']);\n }\n else{\n $impSegment->setCheckAgainst(0);\n }\n if(isset($_POST['fallback_list']) && $_POST['fallback_list']!=''){\n $impSegment->setFallbackSegment($_POST['fallback_list']);\n }\n else{\n $impSegment->setFallbackSegment(0);\n }\n $impSegment->setCreateCampaign(false);\n $impSegment->setCloneFromCampaign(0);\n $impSegment->setImportDone(false);\n $em->persist($impSegment); \n $em->flush();\n }\n catch(\\Exception $e){\n $logger->info($e->getMessage());\n $success = false;\n }\n }\n }\n else if(isset($_POST['multiple_segment'])){\n foreach($worksheets as $worksheet){\n $worksheetTitle = $worksheet->getTitle();\n if(strpos($worksheetTitle,'Template')!==false){\n continue;\n }\n try{\n /*\n * create lead list for each worksheet\n *\n */\n $date = new \\DateTime();\n $list = new \\Mautic\\LeadBundle\\Entity\\LeadList();\n $list->setName($worksheet->getTitle().'-'.$_POST['sheet_name']);\n $list->setAlias(str_replace(\" \", \"-\", strtolower($worksheet->getTitle().'-'.$_POST['sheet_name']).'_'.$date->getTimestamp()));\n $list->setIsGlobal(true);\n $list->setFilters(array());\n $list->setDateAdded(new \\DateTime());\n $list->setDescription($worksheet->getTitle().' Imported via Mass import form submission');\n $list->setIsPublished(true);\n $em->persist($list);\n $em->flush();\n \n\n $impSegment = new ImportSegment();\n $impSegment->setSheetName($_POST['sheet_name']);\n $impSegment->setWorkSheetName($worksheet->getTitle());\n $impSegment->setImportedOn(new \\DateTime());\n $impSegment->setImportedBy($_POST['lead_owner']);\n $impSegment->setSegment($list->getId());\n $impSegment->setSegmentOwner($_POST['lead_owner']);\n if(isset($_POST['check_against']) && $_POST['check_against']!=''){\n $impSegment->setCheckAgainst($_POST['check_against']);\n }\n else{\n $impSegment->setCheckAgainst(0);\n }\n if(isset($_POST['fallback_list']) && $_POST['fallback_list']!=''){\n $impSegment->setFallbackSegment($_POST['fallback_list']);\n }\n else{\n $impSegment->setFallbackSegment(0);\n }\n $impSegment->setCreateCampaign(false);\n $impSegment->setCloneFromCampaign(0);\n $impSegment->setImportDone(false);\n $em->persist($impSegment); \n $em->flush();\n }\n catch(\\Exception $e){\n $logger->info($e->getMessage());\n $success = false;\n }\n }\n }\n else{\n /*\n * create lead list\n * */\n $date = new \\DateTime();\n $list = new \\Mautic\\LeadBundle\\Entity\\LeadList();\n $list->setName($_POST['list_name']);\n $list->setAlias(str_replace(\" \", \"-\", strtolower($_POST['list_name']).'_'.$date->getTimestamp()));\n $list->setIsGlobal(true);\n $list->setFilters(array());\n $list->setDateAdded(new \\DateTime());\n $list->setDescription($_POST['list_name'].' Imported via Mass import form submission.');\n $list->setIsPublished(true);\n $em->persist($list);\n $em->flush();\n\n foreach($worksheets as $worksheet){\n $worksheetTitle = $worksheet->getTitle();\n if(strpos($worksheetTitle,'Guide')!==false || strpos($worksheetTitle,'Template')!==false || strpos($worksheetTitle,'Expocheck')!==false){\n continue;\n }\n try{\n $impSegment = new ImportSegment();\n $impSegment->setSheetName($_POST['sheet_name']);\n $impSegment->setWorkSheetName($worksheet->getTitle());\n $impSegment->setImportedOn(new \\DateTime());\n $impSegment->setImportedBy($_POST['lead_owner']);\n $impSegment->setSegment($list->getId());\n $impSegment->setSegmentOwner($_POST['lead_owner']);\n if(isset($_POST['check_against']) && $_POST['check_against']!=''){\n $impSegment->setCheckAgainst($_POST['check_against']);\n }\n else{\n $impSegment->setCheckAgainst(0);\n }\n if(isset($_POST['fallback_list']) && $_POST['fallback_list']!=''){\n $impSegment->setFallbackSegment($_POST['fallback_list']);\n }\n else{\n $impSegment->setFallbackSegment(0);\n }\n $impSegment->setCreateCampaign(false);\n $impSegment->setCloneFromCampaign(0);\n $impSegment->setImportDone(false);\n $em->persist($impSegment); \n }\n catch(\\Exception $e){\n $logger->info($e->getMessage().' on '.$e->getFile().' '.$e->getLine());\n $success = false;\n }\n } \n $em->flush();\n } \n } catch (\\Exception $e) {\n $logger->info($e->getMessage().' on '.$e->getFile().' '.$e->getLine());\n $success = false;\n } \n }\n\n return $this->delegateView(array(\n 'contentTemplate' => 'MauticGSBundle:Default:result.html.php',\n 'viewParameters' => [\"message\"=>$success?'Success':\"There was some problem, operation was not successfull\"],\n ));\n }", "title": "" }, { "docid": "9f288c8d811a2d73f7bad4a8b6c2dc14", "score": "0.46000934", "text": "public function timesheetsPostRequest($timesheet)\n {\n // Verify the required parameter 'timesheet' is set\n\n if ($timesheet === null || (is_array($timesheet) && count($timesheet) === 0)) {\n throw new InvalidArgumentException(sprintf(\n 'Missing the required parameter $%s when calling %s',\n 'timesheet',\n 'timesheetsPost'\n ));\n }\n\n $resourcePath = '/Timesheets';\n $formParams = [];\n $queryParams = [];\n $httpBody = null;\n $multipart = false;\n\n \n\n\n\n // Body parameter\n $_tempBody = null;\n if (isset($timesheet)) {\n $_tempBody = $timesheet;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['text/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['text/xml', 'application/json'],\n ['text/xml', 'application/json']\n );\n }\n\n \n // For model (json/xml)\n\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present.\n\n if ($headers['Content-Type'] === 'application/json') {\n $httpBodyText = $this->jsonEncode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBodyText = $_tempBody;\n }\n\n $httpBody = $this->createStream($httpBodyText);\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\n // FIXME: how do we do multiparts with PSR-7?\n // MultipartStream() is a Guzzle tool.\n\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = $this->createStream($this->jsonEncode($formParams));\n\n } else {\n // for HTTP post (form)\n $httpBody = $this->createStream($this->buildQuery($formParams));\n }\n }\n\n\n return $this->buildHttpRequest(\n $headers,\n $queryParams,\n $httpBody,\n 'POST',\n $resourcePath\n );\n }", "title": "" }, { "docid": "d9e3dae6e32b510665a89f08292f3a70", "score": "0.4596384", "text": "public function create(Request $request)\n {\n if ($request->ajax()) {\n// return $request->all();\n $rules = [\n \"disburseType\" => ['regex:/^(salary)|(bonus)$/'],\n ];\n $this->validate($request, $rules, [\n 'disburseType.regex' => \"Please select a valid sheet type:salary or bonus\",\n ]);\n $division_id = ($request->range && $request->range == 'all') || !$request->range ? null : $request->range;\n $unit_id = ($request->unit && $request->unit == 'all') || !$request->unit ? null : $request->unit;\n $thana_id = ($request->thana && $request->thana == 'all') || !$request->thana ? null : $request->thana;\n $kpi_id = ($request->kpi && $request->kpi == 'all') || !$request->kpi ? null : $request->kpi;\n $generated_for_month = $request->month_year;\n $generated_type = $request->disburseType;\n $sheet = SalarySheetHistory::with('kpi.details')\n ->whereHas('kpi', function ($q) use ($division_id, $unit_id, $thana_id) {\n if ($division_id) $q->where(compact('division_id'));\n if ($unit_id) $q->where(compact('unit_id'));\n if ($thana_id) $q->where(compact('thana_id'));\n });\n if ($kpi_id) {\n $sheet->where(compact('kpi_id'));\n }\n if ($generated_for_month) {\n $sheet->where(compact('generated_for_month'));\n }\n if ($generated_type) {\n $sheet->where(compact('generated_type'));\n }\n $sheets = $sheet->where('disburst_status', 'pending')->orderBy('created_at','desc')->paginate($request->limit ? $request->limit : 30);\n// return $sheets;\n return view('SD::salary_disburse.view_data', compact('sheets'));\n }\n return view(\"SD::salary_disburse.create\");\n }", "title": "" }, { "docid": "840cde8d189de33afae1a2da84abb8d8", "score": "0.45956177", "text": "public function request($id) {\n try {\n $book = Book::findOrFail($id);\n\n // check if the book quantity is enough\n if ($book->current_qty > 0) {\n $user_requests = BorrowTransaction::where('user_id', Auth::user()->id)\n ->where(function($q) {\n $q->where('status', 'Requested')\n ->orWhere('status', 'On Loan');\n })\n ->get();\n\n // get the age of the member to determine the a book limit\n $age = Carbon::now()->diffInYears(Auth::user()->date_of_birth);\n if ($age <= 12) {\n $book_limit = Parameter::where('name', 'ageLimit')->first()->value;;\n } else {\n $book_limit = Parameter::where('name', 'maxLoan')->first()->value;;\n }\n\n // check if the member hit the borrow limit\n if (count($user_requests) < $book_limit) {\n $is_already_requested = BorrowTransaction::where('user_id', Auth::user()->id)\n ->where('book_id', $book->id)\n ->where('status', 'Requested')\n ->get();\n\n // check if the book being requested already\n if (count($is_already_requested) === 0) {\n\n DB::transaction(function ($book) use ($book) {\n // simple token generation to be used when borrowing and returning a book\n // current date time (with mili seconds) + random number from 1 to 100\n $token = strtotime(Carbon::now()->format('d-M-Y H:m:s.mi')) * 1000 + rand(1, 100);\n\n $borrow_transaction = new BorrowTransaction();\n $borrow_transaction->request_number = $token;\n $borrow_transaction->user_id = Auth::user()->id;\n $borrow_transaction->book_id = $book->id;\n $borrow_transaction->borrowed_at = Carbon::now();\n $borrow_transaction->to_be_returned_at = Carbon::now()->addWeeks(2);\n $borrow_transaction->status = 'Requested';\n $borrow_transaction->save();\n\n // reduce current book qty by one\n $book->current_qty -= 1;\n $book->save();\n });\n\n flash()->success('Book has been successfully requested');\n Log::info('User '.Auth::user()->doc_id.' my_request -> request : success '.$book->id);\n\n } else {\n flash()->warning('You have already requested / loan this book');\n Log::info('User '.Auth::user()->doc_id.' my_request -> request : already requested / on loan '.$book->id);\n } // book already requested or already on loan\n\n } else {\n flash()->error('You can only request up to '.$book_limit.' books');\n Log::info('User '.Auth::user()->doc_id.' my_request -> request : hit limit'.$book->id);\n } // hit the limit of book requests\n\n } else {\n flash()->error('Sorry, the book is currently not available');\n Log::info('User '.Auth::user()->doc_id.' my_request -> request : not enough quantity'.$book->id);\n } // book is not available\n\n return redirect('/book/'.$book->id);\n\n } catch (ModelNotFoundException $e) {\n flash()->error('Such book does not exist');\n Log::error('User '.Auth::user()->doc_id.' my_request -> request : book not exist '.$id);\n return redirect('/book');\n }\n }", "title": "" }, { "docid": "b41fc816382c1fb5da5b7f9a98c06906", "score": "0.45848832", "text": "public function getLedgerWiseAccountStatement()\n {\n\t\t$post = $this->input->post();\n\t\tif(!empty($post['start_date']) && !empty($post['end_date'])){\n if (!empty($post['start_date']) && !empty($post['end_date']) && !empty($post['ledger_id']) && $post['ledger_id'] != 'Select Ledger') {\n $start_date = date('Y-m-d', strtotime($post['start_date']));\n $end_date = date('Y-m-d', strtotime($post['end_date']));\n $ledger_id = $post['ledger_id'];\n\t\t\t\t$statement = $this->admin_model->getLedgerWiseAccountStatement($start_date, $end_date, $ledger_id);\n//\t\t\t\t\techo '<pre>';\n//\t\t\t\t\tprint_r($statement);\n if (!empty($statement['ledger_wise_statement'])) {\n \tif(!empty($statement['ledger_wise_before_date_statement'])){\n\t\t\t\t\t\t$pre_debit = array_sum(array_column(call_user_func_array('array_merge', $statement['ledger_wise_before_date_statement']),'debit_amount'));\n\t\t\t\t\t\t$pre_credit = array_sum(array_column(call_user_func_array('array_merge', $statement['ledger_wise_before_date_statement']),'credit_amount'));\n\t\t\t\t\t\t$arr = call_user_func_array('array_merge', $statement['ledger_wise_statement']);\n\t\t\t\t\t\t$op_notation = '';\n\t\t\t\t\t\tif(!empty($arr)){\n\t\t\t\t\t\t\tif($arr[0][\"balance_type\"] == 'C'){\n\t\t\t\t\t\t\t\t$pre_balance = ($arr[0][\"op_balance\"] + $pre_credit) - $pre_debit;\n\t\t\t\t\t\t\t\t$op_notation = 'Cr';\n\t\t\t\t\t\t\t}elseif($arr[0][\"balance_type\"] == 'D'){\n\t\t\t\t\t\t\t\t$pre_balance = ($arr[0][\"op_balance\"] + $pre_debit) - $pre_credit;\n\t\t\t\t\t\t\t\t$op_notation = 'Dr';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$pre_balance = 0;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$pre_balance = 0;\n\t\t\t\t\t}\n\t\t\t\t\t$i = 1;\n echo '<thead>\n <tr>\n <th>SL</th>\n <th>Date</th>\n <th>Voucher No</th>\n <th>Type</th>\n <th>Notes</th>\n <th>Debit Amount</th>\n <th>Credit Amount</th>\n <th>Balance</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td></td>\n <td></td>\n <td></td>\n <td></td>\n <td></td>\n <td></td>\n <td style=\"text-align: right\">Opening Balance</td>\n <td style=\"text-align: right\">'.number_format(abs($pre_balance)).' '.$op_notation.'</td>\n </tr>';\n $debit_total = 0;\n $credit_total = 0;\n\t\t\t\t\t$balance = 0;\n\t\t\t\t\t$aar = call_user_func_array('array_merge', $statement['ledger_wise_statement']);\n\t\t\t\t\tfunction sortFunction( $a, $b ) {\n\t\t\t\t\t\treturn strtotime($a[\"voucher_date\"]) - strtotime($b[\"voucher_date\"]);\n\t\t\t\t\t}\n\t\t\t\t\tusort($aar,\"sortFunction\");\n\t\t\t\t\t$notation = '';\n foreach ($aar as $val) {\n\n \t$debit_total+=$val[\"debit_amount\"];\n $credit_total+=$val[\"credit_amount\"];\n $balance += ($pre_balance + $val[\"debit_amount\"]) - $val[\"credit_amount\"];\n\n if($balance > $val[\"credit_amount\"]){\n\t\t\t\t\t\t\t$notation = 'Dr';\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$notation = 'Cr';\n\t\t\t\t\t\t}\n echo '<tr>\n <td>' . $i . '</td>\n <td>' . $val[\"voucher_date\"].'</td>\n <td>' .$val[\"voucher_type\"].' '.$val[\"id\"].'</td>';\n if($val[\"voucher_type\"] == 'RV'){\n echo ' <td>Receive</td>;';\n }elseif($val[\"voucher_type\"] == 'PV'){\n echo ' <td>Payment</td>;';\n }elseif($val[\"voucher_type\"] == 'JV'){\n echo ' <td>Journal</td>;';\n }elseif($val[\"voucher_type\"] == 'CV'){\n echo ' <td>Contra</td>';\n }\n echo'\n\t\t\t\t\t\t\t\t\t<td>' . $val[\"narration\"].'</td> \n\t\t\t\t\t\t\t\t\t<td style=\"text-align: right\">' . number_format($val[\"debit_amount\"]) . '</td>\n\t\t\t\t\t\t\t\t\t<td style=\"text-align: right\">' . number_format($val[\"credit_amount\"]) . '</td>\n\t\t\t\t\t\t\t\t\t<td style=\"text-align: right\">' . number_format(abs($balance)).' '.$notation.'</td>\n \t</tr>';\n $i++;\n\t\t\t\t\t\t$pre_balance=0;\n }\n echo '</tbody>\n\t\t\t\t\t\t <tfoot>\n <tr>\n <td></td>\n <td></td>\n <td></td>\n <td></td>\n <td style=\"text-align: right\">Grand Total</td>\n <td style=\"text-align: right\">'.number_format($debit_total).'</td>\n <td style=\"text-align: right\">'.number_format($credit_total).'</td>\n <td style=\"text-align: right\">'.number_format(abs($balance)).' '.$notation.'</td>\n \t\t</tr>\n </tfoot>';\n }\n }\n }\n }", "title": "" }, { "docid": "fddaf5bdf6103c49eac961ea7b0bb892", "score": "0.45748818", "text": "public function depositOtherAccounts(Request $request){\n // validation\n $this->validate($request,[\n 'accountId' => 'required | numeric',\n 'amount' => 'required | numeric', \n ]);\n\n $amount = $request->amount;\n $user = auth('api')->user();\n $depositAccount = Account::find($request->accountId);\n $withdrawAccount = Account::where([['CustomerID',$user->id],['AccountCode',200]])->first();\n\n if($withdrawAccount->CurrentBalance < $amount){\n return response()->json([\n \"status\" => false,\n \"message\" => \"You have insufficient funds to complete this transaction\"\n ]);\n }\n\n $withdrawAccount->CurrentBalance -= $amount;\n\n if($withdrawAccount->save()){\n $data = [\n 'TransactionType' => 'transfer',\n 'TransactionDescription' => 'transfer to'.$depositAccount->AccountName,\n 'TransID' => rand(100000,999999),\n 'UserId' => $user->id,\n 'AccountNumber' => $withdrawAccount->AccountNumber,\n 'MSISDN' => $user->PhoneNumber,\n 'FirstName' => $user->FirstName,\n 'MiddleName' => $user->MiddleName,\n 'LastName' => $user->LastName,\n 'TransAmount' => $amount,\n 'OrgAccountBalance' => $withdrawAccount->CurrentBalance+$amount,\n 'CrtAccountBalance' => $withdrawAccount->CurrentBalance\n ];\n $transaction = new TransactionController;\n $trans = $transaction->transact($data);\n\n if($trans != null){\n $depositAccount->CurrentBalance += $amount;\n if($depositAccount->save()){\n $data = [\n 'TransactionType' => 'deposit',\n 'TransactionDescription' => 'recieved from'.$withdrawAccount->AccountName,\n 'TransID' => rand(100000,999999),\n 'UserId' => $user->id,\n 'AccountNumber' => $depositAccount->AccountNumber,\n 'MSISDN' => $user->PhoneNumber,\n 'FirstName' => $user->FirstName,\n 'MiddleName' => $user->MiddleName,\n 'LastName' => $user->LastName,\n 'TransAmount' => $amount,\n 'OrgAccountBalance' => $depositAccount->CurrentBalance - $amount,\n 'CrtAccountBalance' => $depositAccount->CurrentBalance\n ];\n $transaction = new TransactionController;\n $trans = $transaction->transact($data);\n\n if($trans != null){\n return response()->json([\n \"status\" => true,\n \"message\" => \"Transaction was completed successfully.\"\n\n ]);\n }\n }\n }\n }\n \n }", "title": "" }, { "docid": "1fd2e2b9a53ac1de2b16fd8df7f3922b", "score": "0.45727178", "text": "public function generateRequest($id = null)\n {\n \n \n $this->request->allowMethod(['post', 'confirmBorrow']);\n $user_id = $this->request->session()->read('Auth.User.id');\n $book = $this->Books->get($id, [\n 'contain' => ['Users', 'Reviews']\n ]);\n $owner_id = $book->user_id;\n $Weeks = $this->request->data['Weeks'];\n \n $this->loadModel('requests');\n $request = $this->requests->newEntity();\n $request->set(array(\n 'book_id' => \"$id\",\n 'user_id_borrower' => \"$user_id\",\n 'user_id_owner' => \"$owner_id\",\n 'Weeks' => \"$Weeks\",\n 'ownerAck' => 1,\n 'rentPaid' => 1\n ));\n \n if($this->requests->save($request))\n { \n $this->Flash->success('Request successfully saved');\n return $this->redirect(['action' => 'index']);\n }\n else\n {\n $this->Flash->error('Something went wrong!');\n return $this->redirect(['action' => 'index']);\n }\n \n \n }", "title": "" }, { "docid": "55d2712281ea82bd4d737a933bd5bed9", "score": "0.4572383", "text": "private function createTransferTransaction($wallet_from, $wallet_to, $request){\n if(is_null($wallet_from)){\n return $this->response_400('Wallet_from not exists');\n }\n if(is_null($wallet_to)){\n return $this->response_400('Wallet_to not exists');\n }\n if($wallet_from->wallet_id == $wallet_to->wallet_id){\n return $this->response_400('Transfer himself');\n }\n if($request->currency_use!='FROM' && $request->currency_use!='TO'){\n return $this->response_400('Set currency_use FROM or TO');\n }\n \n $tran = new Transaction;\n $tran->wallet_id_from = $wallet_from->wallet_id;\n $tran->wallet_id_to = $wallet_to->wallet_id;\n $tran->currency_id = ($request->currency_use=='FROM' ? $wallet_from->currency_id : $wallet_to->currency_id);\n $tran->amount = $request->amount;\n $tran->operation = 'TRANSFER';\n $tran->tran_date = date('Y-m-d H:i:s');\n \n if(!ExchangeRateRepository::rateExists($tran->currency_id, $tran->tran_date)){\n return $this->response_400('Exchange rate not exists');\n }\n \n DB::beginTransaction();\n $tran->save();\n DB::commit();\n \n return response('Transactions ' . $tran->operation . ' created', 200)\n ->header('Content-Type', 'text/plain');\n }", "title": "" }, { "docid": "14b06ae9333d982ac8b03a0ae0e35136", "score": "0.4571541", "text": "public function clientTransferTransaction(Request $request, $name_from, $name_to){\n $response = $this->validateRequest($request, [\n 'amount' => 'required|numeric',\n 'currency_use' => 'required|max:4',\n ]);\n if ($response) {\n return $response;\n }\n \n $wallet_from = ClientRepository::getWalletUncommited($name_from);\n $wallet_to = ClientRepository::getWalletUncommited($name_to);\n return $this->createTransferTransaction($wallet_from, $wallet_to, $request);\n }", "title": "" }, { "docid": "817ffef35f0a746869ff74644f5c4bdb", "score": "0.45690063", "text": "public function balance() : int;", "title": "" }, { "docid": "191e446d513ba4a1291887c4feaeb57c", "score": "0.45677254", "text": "public function single_sheet_WO()\n {\n $pi_icode = $this->uri->segment(3);\n $data['invoice'] = $this->admin_model->Get_Single_Invoice($pi_icode);\n $data['invoice_item'] = $this->user_model->Get_Single_Invoice_Item_Sheet($pi_icode);\n $data['invoice_Charges'] = $this->admin_model->Get_Single_Invoice_Charges($pi_icode);\n $data['invoice_total'] = $this->user_model->Get_Single_Invoice_Item_Sheet_Total($pi_icode);\n $data['sheet'] = $this->user_model->Get_Single_Sheet($pi_icode);\n $data['tax']= $this->admin_model->get_Tax();\n $data['st']= $this->admin_model->get_ST();\n $data['stock']= $this->admin_model->get_all_item();\n $data['wo'] = $this->user_model->Get_Single_wo($pi_icode);\n $data['charges']= $this->admin_model->get_all_charges();\n $this->load->view('User/header');\n $this->load->view('User/top');\n $this->load->view('User/left');\n $this->load->view('User/View_Single_Sheet_WO',$data,false);\n $this->load->view('User/footer');\n }", "title": "" }, { "docid": "4fcef176a51e17c22bf83294912fd3d2", "score": "0.45662957", "text": "public function create(Request $request)\n {\n $this->validate($request, [\n 'id_book' => 'required',\n 'id_user' => 'required'\n ]);\n\n $newBorrow = new Borrow([\n 'id_user' => $request->id_user,\n 'id_book' => $request->id_book\n ]);\n \n $newBorrow->save();\n\n return response()->json('OK');\n }", "title": "" }, { "docid": "1daffa5c27dfa0c149809f3277d68b77", "score": "0.45648378", "text": "public function executeContractsByMonthYear(sfWebRequest $request)\n {\n $month_contracts = $request->getParameter('month_contracts', date('m'));\n $year_contracts = $request->getParameter('year_contracts', date('Y'));\n $array_data = array('', 0, '', 0, '');\n \n \n $contracts = ContractsIntermediationTable::getInstance()->findByMonthAndYear($month_contracts, $year_contracts);\n \n if(count($contracts)>0)\n { \n $index = 0;\n $array_data = array();\n foreach ($contracts AS $v_contract){\n $index++; \n $array_data[$index][1] = $v_contract->getCustomer();\n $array_data[$index][2] = $v_contract->getBusinessAmount()?(double)$v_contract->getBusinessAmount():0;\n $array_data[$index][3] = '<div style=\"padding: 10px;\">&nbsp;<b>Fecha de entrega:</b>&nbsp;'.sprintf(\"%02d\",$v_contract->getDay()).'/'.sprintf(\"%02d\",$v_contract->getMonth()).'/'.$v_contract->getYear().'&nbsp;<br/>&nbsp;<b>Cliente:</b>&nbsp;'.$v_contract->getCustomer().'&nbsp;<br/>&nbsp;<b>Volumen negocio:</b>&nbsp;'.($v_contract->getBusinessAmount()?$v_contract->getBusinessAmount():0).'</div>';\n $array_data[$index][4] = $v_contract->getFinalCommission()?(double)$v_contract->getFinalCommission():0;\n $array_data[$index][5] = '<div style=\"padding: 10px;\">&nbsp;<b>Fecha de entrega:</b>&nbsp;'.sprintf(\"%02d\",$v_contract->getDay()).'/'.sprintf(\"%02d\",$v_contract->getMonth()).'/'.$v_contract->getYear().'&nbsp;<br/>&nbsp;<b>Socio:</b>&nbsp;'.$v_contract->getAppUser()->getTitle().' '.$v_contract->getAppUser()->getName().' '.$v_contract->getAppUser()->getLastName().'&nbsp;<br/>&nbsp;<b>Comisión final:</b>&nbsp;'.($v_contract->getFinalCommission()?$v_contract->getFinalCommission():0).'</div>';\n \n }\n }\n \n $date_1 = array($array_data[1][1],$array_data[1][2],$array_data[1][3],$array_data[1][4],$array_data[1][5]);\n \n echo json_encode($date_1);\n exit();\n }", "title": "" }, { "docid": "274ebc594b7117eb3d780aa6cce679c5", "score": "0.45647532", "text": "public function withdraw(Request $request){\n $this->validate($request, [\n 'amount' => 'required|numeric',\n 'account_type' => 'required',\n ]);\n return validateWithdrawal($request) ? \n user()->withdraw($request) : \n invalidRequest(message('withdrawal_failed'));\n //the initial_balance must be greater than the withdrawal amount \n // the initial balance \n }", "title": "" }, { "docid": "11ea80ecb8b9b34fd80924b587b01d16", "score": "0.4563936", "text": "public function actionCreate()\n {\n $model = new ContractPayment();\n if ($model->load(Yii::$app->request->post())) {\n if ($model->validate()) {\n\n $dd = Contract::find()->where(['contractID'=>$model->contractID])->asArray()->one();\n $qq = $dd['amount'];\n $result = $model->createOrUpdateOne(ContractPaymentController::MODULE_NAME);\n //修改状态\n $status = new ContractPayment();\n $name = 'ZX';\n $status->atuoCreateStatus($name, $model->contractPaymentID);\n //获取待付款金额\n $status->atuoCreateAmount($qq,$model->contractPaymentID);\n Yii::$app->session->setFlash($result['type'], $result['msg']);\n return $this->redirect(['index', 'id' => $model->contractPaymentID]);\n }\n }\n return $this->render('create-update', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "d30b95a6d663b63669692e0b4915ad0b", "score": "0.45637327", "text": "public function editTransaction($params)\n {\n $request['id'] = $params['id'];\n $request['date'] = $params['date'];\n $request['amount'] = (float)$params['amount'];\n $request['transaction_type'] = $params['transaction_type']; // (0= Withdrawal, 1= Deposit, 3= Transfer)\n $request['account_id'] = (isset($params['account_id']) && $params['account_id'] != 0) ? (int)$params['account_id'] : 0;\n $request['category_id'] = (isset($params['category_id']) && $params['category_id'] != 0) ? (int)$params['category_id'] : 0;\n if (isset($params['description']) && $params['description'] != '') $request['description'] = $params['description'];\n $request['jive'] = (isset($params['jive']) && $params['jive'] != 0) ? $params['jive'] : 0;\n if (isset($params['from_account_id']) && $params['from_account_id'] != 0) $request['from_account_id'] = $params['from_account_id'];\n if (isset($params['to_account_id']) && $params['to_account_id'] != 0) $request['to_account_id'] = $params['to_account_id'];\n if (isset($params['check_num']) && $params['check_num'] != '') $request['check_num'] = $params['check_num'];\n if (isset($params['memo']) && $params['memo'] != '') $request['memo'] = $params['memo'];\n// $request['file_attachment'] = ''; // @todo make this work\n if (isset($params['payee']) && $params['payee'] != '') $request['payee'] = $params['payee'];\n// $request['split_amounts'] = '' // @todo make this work\n// $request['split_categories'] = '' // @todo make this work\n// $request['split_descriptions'] = '' // @todo make this work\n $return = $this->apiRequest(__FUNCTION__, $request);\n return $return;\n }", "title": "" }, { "docid": "41734101dedd37a358d220601f8eec8e", "score": "0.45625007", "text": "public function balance()\n {\n return $this->apiCall('balance/', [], true);\n }", "title": "" }, { "docid": "9553784913408d3c28272d76eea589e0", "score": "0.45614427", "text": "function new_withdraw_request( $user, $amount, $method ) {\n $template = DOKAN_INC_DIR . '/emails/withdraw-new.php';\n ob_start();\n include $template;\n $body = ob_get_clean();\n\n $subject = sprintf( __( '[%s] New Withdraw Request', 'dokan' ), $this->get_from_name() );\n $body = $this->prepare_withdraw( $body, $user, $amount, $method );\n\n $this->send( $this->admin_email(), $subject, $body );\n }", "title": "" }, { "docid": "f087d83a7db80baa0c01231f42b2b2c8", "score": "0.45591033", "text": "protected function addressBookGetForInsertRequest()\n {\n\n $resourcePath = '/api/AddressBook/newinstance';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\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 API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\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": "4115ced40499358888b1427fa5059492", "score": "0.45536757", "text": "public function fundCard($array)\n {\n if (!isset($array['id'])) {\n throw new \\Exception(\"Missing value for id in your payload\", 1);\n }\n\n if (gettype($array['amount']) !== 'integer') {\n $array['amount'] = (int) $array['amount'];\n }\n\n if (!isset($array['currency'])) {\n $array['currency'] = 'NGN';\n }\n\n //set the payment handler\n $this->rave->eventHandler($this->getEventHandler())\n //set the endpoint for the api call\n ->setEndPoint(\"v3/virtual-cards/\".$array['id'].\"/fund\");\n\n $data = array(\n \"amount\"=> $array['amount'],\n \"debit_currency\"=> $array['currency']\n );\n\n return $this->rave->vcPostRequest($data);\n }", "title": "" }, { "docid": "a083793173cbfedecddafaa02f48b015", "score": "0.4548149", "text": "public function actionCreate()\n {\n $model = new Income();\n $ref_id = new RefId();\n $bal_model = new Balance();\n $balance = Balance::find()->orderBy(['id' => SORT_DESC])->one();\n if ($model->load(Yii::$app->request->post())) {\n if($model->save() && $model->validate()){\n\n //handling out for json string\n $ref_id->table = Helper::INCOME;\n $ref_id->id = $model->id;\n //update balance table for new update\n $bal_model->bank_amount = $balance['bank_amount']+$model->amount;\n $bal_model->cash_amount = $balance['cash_amount'];\n $bal_model->ref_id = json_encode($ref_id);\n $bal_model->save();\n }\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "7d92d02a60a96d02e8259f46c544dfb3", "score": "0.45435667", "text": "function wallet_to_bank()\n{\n\tif ($this->session->userdata('user_id') == FALSE) {\n redirect('web');\n }\n\t$user_id= $this->session->userdata('user_id'); \n\t$data\t\t\t\t=\t$this->input->post();\n\tif(!empty($data))\n\t{\n\t\t$account_name = $data['account_holder_name'];\n\t\t$account_number = $data['user_ac_no'];\n\t\t$user_bank_code = $data['user_bank_code'];\n\t\t$transfer_amt = $data['transfer_amount'];\n\t\t$apiURL \t\t= base_url('webservices/api.php');\n\t\t$postField=\"------WebKitFormBoundary7MA4YWxkTrZu0gW\\r\\nContent-Disposition: form-data; name=\\\"rquest\\\"\\r\\n\\r\\nwallet_to_bank\\r\\n------WebKitFormBoundary7MA4YWxkTrZu0gW\\r\\nContent-Disposition: form-data; name=\\\"user_id\\\"\\r\\n\\r\\n$user_id\\r\\n------WebKitFormBoundary7MA4YWxkTrZu0gW\\r\\nContent-Disposition: form-data; name=\\\"transfer_amount\\\"\\r\\n\\r\\n$transfer_amt\\r\\n------WebKitFormBoundary7MA4YWxkTrZu0gW\\r\\nContent-Disposition: form-data; name=\\\"bankcode\\\"\\r\\n\\r\\n$user_bank_code\\r\\n------WebKitFormBoundary7MA4YWxkTrZu0gW\\r\\nContent-Disposition: form-data; name=\\\"account_number\\\"\\r\\n\\r\\n$account_number\\r\\n------WebKitFormBoundary7MA4YWxkTrZu0gW\\r\\nContent-Disposition: form-data; name=\\\"account_holder_name\\\"\\r\\n\\r\\n$account_name\\r\\n------WebKitFormBoundary7MA4YWxkTrZu0gW--\";\n\t\t$curl = curl_init();\n\n\t\tcurl_setopt_array($curl, array(\n\t\t CURLOPT_URL => $apiURL,\n\t\t CURLOPT_RETURNTRANSFER => true,\n\t\t CURLOPT_ENCODING => \"\",\n\t\t CURLOPT_MAXREDIRS => 10,\n\t\t CURLOPT_TIMEOUT => 30,\n\t\t CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n\t\t CURLOPT_CUSTOMREQUEST => \"POST\",\n\t\t CURLOPT_POSTFIELDS => $postField,\n\t\t CURLOPT_HTTPHEADER => array(\n\t\t \"cache-control: no-cache\",\n\t\t \"content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW\",\n\t\t \"postman-token: 0a1bf1c2-32ab-cfa4-3e40-18c49dea0c8f\"\n\t\t ),\n\t\t));\n\n\t\t$response = curl_exec($curl); \n\t\t$err = curl_error($curl);\n\t\tcurl_close($curl);\n\n\t\tif ($err) {\n\t\t $this->toastr->error($err,'Error');\n\t\t\t\n\t\t} else {\n\n\t\t \t\t$result \t\t\t\t\t=\tjson_decode($response);\n\n\t\t \t\tif(isset($result) && !empty($result)){\n\n\t\t\t\t\t$data1['status'] \t\t\t=\t$result->status;\n\t\t\t\t\t$data1['message']\t\t\t=\t$result->message;\n\t\t\t\t\t$data1['transaction_ref']\t=\t$result->transaction_ref;\n\t\t\t\t\t$data1['trans_date']\t\t=\t$result->transaction_date;\n\n\t\t\t\t}else{\n\n\t\t\t\t\t$data1['status'] \t\t\t=\tfalse;\n\t\t\t\t\t$data1['message']\t\t\t=\t'Transaction Failed. Please try again.';\n\t\t\t\t\t$data1['transaction_ref']\t=\t'';\n\t\t\t\t\t$data1['trans_date']\t\t=\tdate('F-d-Y h:i A',strtotime(\"Y-m-d\"));\n\n\t\t\t\t}\n\n\t\t\t\t$data1['transaction_via']\t=\t\"Wallet to Bank Transfer\";\n\t\t\t\t$data1['wt_category'] \t\t=\t 17;\n\t\t\t\t$data1['amount']\t\t\t=\t$transfer_amt;\n\t\t\t\t$data1['account_name']\t\t=\t$account_name;\n\t\t\t\t$data1['account_number']\t=\t$account_number;\n\t\t\t\t$data1['user_bank_code']\t=\t$user_bank_code;\n\n\t\t\t\t//print_r($data1); exit;\n\t\t\t\tif($result->status=='true')\n\t\t\t\t{\n\t\t\t\t\t$this->toastr->success($result->message,'Success');\n\t\t\t\t}else{\n\t\t\t\t\t$this->toastr->error($result->message,'Error');\n\t\t\t\t}\n\t\t\t\t$this->session->set_userdata('array',$data1);\n\t\t\t\tredirect('Payment-Response');\n\t\t}\n\t\t\n\t}\n}", "title": "" }, { "docid": "0be43bfefd29579bb6f837937532cbf3", "score": "0.45417738", "text": "public function actionBalance($number)\n {\n $account = $this->_currentAccount($number);\n\n $totalBalance = $account->totalBalance();\n $message = \"{$account->user_name} has \\n balance : {$account->balance}\\n\";\n $message .= \" Overdraft limit : {$account->overdraft}\\n\\r\";\n $message .= \" Total Balance : {$totalBalance}\\n\\r\";\n\n return $this->_exitMessage(Controller::EXIT_CODE_NORMAL, $message);\n }", "title": "" }, { "docid": "2d542e9a9cc04df5d600276a029df349", "score": "0.45417526", "text": "public function addWithdraw() {\n\t\t$account = Input::get('account');\n\t\t$branch = Input::get('branch');\n\t\t$atm = Input::get('atm');\n\t\t$evidence = Input::get('evidence');\n\n\t\tif (Input::get('sourceDestination') == null)\n\t\t\t$sourceDestination = \"atm\";\n\t\telse\n\t\t\t$sourceDestination = \"spare\";\n\n\t\t$C1 = Input::get('C1');\n\t\t$C2 = Input::get('C2');\n\t\t\n\t\t$TotalAmountWithdrawn = Input::get('TotalAmountWithdrawn');\n\t\t\n\t if (Input::server(\"REQUEST_METHOD\") == \"POST\"){\n\t \t$rules = array( \n\t\t\t\t'account' => 'required',\n 'branch' => 'required',\n\t\t\t\t'atm' => 'required',\n\t\t\t\t'evidence' => 'image'\n \t\t\t);\n \t\t\t$validator = Validator::make(Input::all(), $rules);\n\n\t if ($validator->fails()){\t\t\n\t\t \t\treturn Redirect::route('admin/withdraw_new')->withErrors($validator);\n\t } else {\n // validation ok\n\t try {\n\t //save on db/*\n\t\t $withdraw = new BankTransaction;\n\t\t\t\t\t$withdraw->bankAccount_id = $account;\n\t\t $withdraw->bankBranch_id = $branch;\n\t\t $withdraw->atm_id = $atm;\n\t\t\t\t\t$withdraw->sourceDestination = $sourceDestination;\n\t\t\t\t\t$withdraw->C2 = $C2;\n\t\t\t\t\t$withdraw->C1 = $C1;\n\t\t $withdraw->TotalAmountWithdrawn = $TotalAmountWithdrawn;\n\t\t\t\t\t$image_pos = strripos($evidence, \"/\");\n\t\t\t\t\t$image_path = substr($evidence, 0, $image_pos + 1);\n\t\t\t\t\t$image_file = substr($evidence, $image_pos + 1);\n\t\t\t\t\t$withdraw->filename = $image_file;\n\t\t\t\t\t$withdraw->filepath = $image_path;\t\t\t \n\t\t $withdraw->type = 'withdraw';\n\n\t\t\t\t\t$withdraw->created_at = date(\"Y-m-d H:i:s\");\n\t\t\t\t\t$withdraw->updated_at = date(\"Y-m-d H:i:s\");\n\n\t\t $transaction->save();\n\n\t\t\t\t\t$id = DB::getPdo()->lastInsertId();\n\n\t\t\t\t\tSession::flash('status_success', 'Successfully Updated.');\n\t\t\t\t\t//return Redirect::route('admin/withdraws');\n\t } catch( Exception $e ) {\n\t\t\t\t\techo $e;\n\t Session::flash('status_error', 'An error occurred while creating a new withdraw transaction - please try again.');\n\t //return Redirect::route('admin/withdraw_new');\n\t }\n\t }\n\t\t}\n\t}", "title": "" }, { "docid": "ae2391444fad4f3b3de0bdeb1e83710d", "score": "0.45352107", "text": "public function cashFlow()\n {\n if (!auth()->user()->can('account.access')) {\n abort(403, 'Unauthorized action.');\n }\n\n $business_id = request()->session()->get('user.business_id');\n\n if (request()->ajax()) {\n $accounts = AccountTransaction::join(\n 'accounts as A',\n 'account_transactions.account_id',\n '=',\n 'A.id'\n )\n ->leftjoin(\n 'transaction_payments as TP',\n 'account_transactions.transaction_payment_id',\n '=',\n 'TP.id'\n )\n ->where('A.business_id', $business_id)\n ->with(['transaction', 'transaction.contact', 'transfer_transaction'])\n ->select(['account_transactions.type', 'account_transactions.amount', 'operation_date',\n 'account_transactions.sub_type', 'transfer_transaction_id',\n DB::raw(\"(SELECT SUM(IF(AT.type='credit', AT.amount, -1 * AT.amount)) from account_transactions as AT JOIN accounts as ac ON ac.id=AT.account_id WHERE ac.business_id= $business_id AND AT.operation_date <= account_transactions.operation_date AND AT.deleted_at IS NULL) as balance\"),\n 'account_transactions.transaction_id',\n 'account_transactions.id',\n 'A.name as account_name',\n 'TP.payment_ref_no as payment_ref_no'\n ])\n ->groupBy('account_transactions.id')\n ->orderBy('account_transactions.operation_date', 'desc');\n if (!empty(request()->input('type'))) {\n $accounts->where('type', request()->input('type'));\n }\n\n if (!empty(request()->input('account_id'))) {\n $accounts->where('A.id', request()->input('account_id'));\n }\n\n $start_date = request()->input('start_date');\n $end_date = request()->input('end_date');\n \n if (!empty($start_date) && !empty($end_date)) {\n $accounts->whereBetween(DB::raw('date(operation_date)'), [$start_date, $end_date]);\n }\n\n return DataTables::of($accounts)\n ->addColumn('debit', function ($row) {\n if ($row->type == 'debit') {\n return '<span class=\"display_currency\" data-currency_symbol=\"true\">' . $row->amount . '</span>';\n }\n return '';\n })\n ->addColumn('credit', function ($row) {\n if ($row->type == 'credit') {\n return '<span class=\"display_currency\" data-currency_symbol=\"true\">' . $row->amount . '</span>';\n }\n return '';\n })\n ->editColumn('balance', function ($row) {\n return '<span class=\"display_currency\" data-currency_symbol=\"true\">' . $row->balance . '</span>';\n })\n ->editColumn('operation_date', function ($row) {\n return $this->commonUtil->format_date($row->operation_date, true);\n })\n ->editColumn('sub_type', function ($row) {\n $details = '';\n if (!empty($row->sub_type)) {\n $details = __('account.' . $row->sub_type);\n if (in_array($row->sub_type, ['fund_transfer', 'deposit']) && !empty($row->transfer_transaction)) {\n if ($row->type == 'credit') {\n $details .= ' ( ' . __('account.from') .': ' . $row->transfer_transaction->account->name . ')';\n } else {\n $details .= ' ( ' . __('account.to') .': ' . $row->transfer_transaction->account->name . ')';\n }\n }\n } else {\n if (!empty($row->transaction->type)) {\n if ($row->transaction->type == 'purchase') {\n $details = '<b>' . __('purchase.supplier') . ':</b> ' . $row->transaction->contact->name . '<br><b>'.\n __('purchase.ref_no') . ':</b> ' . $row->transaction->ref_no;\n } elseif ($row->transaction->type == 'sell') {\n $details = '<b>' . __('contact.customer') . ':</b> ' . $row->transaction->contact->name . '<br><b>'.\n __('sale.invoice_no') . ':</b> ' . $row->transaction->invoice_no;\n }\n }\n }\n\n if (!empty($row->payment_ref_no)) {\n if (!empty($details)) {\n $details .= '<br/>';\n }\n\n $details .= '<b>' . __('lang_v1.pay_reference_no') . ':</b> ' . $row->payment_ref_no;\n }\n\n return $details;\n })\n ->removeColumn('id')\n ->rawColumns(['credit', 'debit', 'balance', 'sub_type'])\n ->make(true);\n }\n $accounts = Account::forDropdown($business_id, false);\n\n $accounts->prepend(__('messages.all'), '');\n \n return view('account.cash_flow')\n ->with(compact('accounts'));\n }", "title": "" }, { "docid": "1c56b8813fdfc0ae069eef56736d6d9a", "score": "0.4533928", "text": "public function createACH(Request $request) {\n\n /**\n * There is a work flow for adding an ACH Account\n * https://stripe.com/docs/ach#ach-payments-workflow\n * \n * 1) they add the bank information\n * 2) stripe deposits 2 small amounts in their account 1-2 days\n * 3) they verify those deposit amounts\n * 4) authorize the account to be charged NEED TO CHECK THIS STEP\n * 5) charge the account\n * \n * later you will want to be able to set a payment method as the default system. \n */\n\n $user = User::find(Auth::user()->id);\n \\Stripe\\Stripe::setApiKey(config('services.stripe.secret'));\n //$token = $request->request->get('stripeToken');\n\n $bank_account = \\Stripe\\Customer::createSource(\n $user->stripe_id,\n [\n 'bank_account' => [\n 'account_holder_name' => $request->input('account_holder_name'),\n 'routing_number' => $request->input('routing_number'),\n 'account_number' => $request->input('account_number'),\n 'account_holder_type' => $request->input('account_holder_type'),\n 'country' => 'US',\n 'currency' => 'usd', \n ],\n ]\n );\n\n // store payment details and consent\n $account_setup = new PaymentDetail([\n 'name' => $user->name, \n 'consent' => $request->input('first_name'), \n 'ip' => request()->ip(), \n 'country' => 'US', \n 'frequency' , \n 'user_id' => $user->id, \n ]);\n $account_setup->save(); \n\n $customer = \\Stripe\\Customer::retrieve($user->stripe_id);\n\n $cards = \\Stripe\\Customer::allSources(\n $user->stripe_id,\n [\n 'object' => 'card',\n ]\n );\n\n $invoices = \\Stripe\\Invoice::all(\n [\n \"limit\" => 15,\n \"customer\" => $user->stripe_id,\n ]\n );\n\n $subscriptions = \\Stripe\\Subscription::all([\n \"customer\" => $user->stripe_id,\n\n ]);\n\n return redirect()\n ->route('billing.overview', [\n 'customer' => $customer, \n 'cards' => $cards, \n 'invoices' => $invoices,\n 'subscriptions' => $subscriptions,\n ])->with('info', 'Your default payment has be set successfully!');\n }", "title": "" }, { "docid": "556bbe23bc844c8117d6eee560bb9946", "score": "0.4533885", "text": "private function createSheet(): ?\\Google_Service_Sheets_Spreadsheet\n {\n $client = $this->sheetsService->getClient();\n\n if( $client ){\n $this->service = new \\Google_Service_Sheets($client);\n\n $spreadsheet = new \\Google_Service_Sheets_Spreadsheet([\n 'properties' => [\n 'title' => \"COTIZACIÓN \" . strtoupper($this->data['title'])\n ]\n ]);\n\n $this->spreadsheet = @$this->service->spreadsheets->create($spreadsheet);\n\n $this->setHeaders()\n ->setItems()\n ->setTotal()\n ->format();\n\n return $this->spreadsheet;\n }\n\n return null;\n }", "title": "" }, { "docid": "26c68374f280212efd371e7952ae7019", "score": "0.45301887", "text": "public function actionAddNewWasher() {\n\n if (Yii::app()->request->getParam('key') != API_KEY) {\n echo \"Invalid api key\";\n die();\n }\n\n $api_token = Yii::app()->request->getParam('api_token');\n $t1 = Yii::app()->request->getParam('t1');\n $t2 = Yii::app()->request->getParam('t2');\n $user_type = Yii::app()->request->getParam('user_type');\n $user_id = Yii::app()->request->getParam('user_id');\n\n $token_check = $this->verifyapitoken($api_token, $t1, $t2, $user_type, $user_id, AES256CBC_API_PASS);\n\n if (!$token_check) {\n $json = array(\n 'result' => 'false',\n 'response' => 'Invalid request'\n );\n echo json_encode($json);\n die();\n }\n\n $user_idMax = Yii::app()->db->createCommand(\"SELECT MAX(user_id) AS MaxUserId FROM active_washers \")->queryAll();\n $userid = $user_idMax[0]['MaxUserId'] + 1;\n $user_email = Yii::app()->request->getParam('user_email');\n $first_name = Yii::app()->request->getParam('first_name');\n $last_name = Yii::app()->request->getParam('last_name');\n $phone = Yii::app()->request->getParam('phone');\n $address = Yii::app()->request->getParam('address');\n $city = Yii::app()->request->getParam('city');\n $state = Yii::app()->request->getParam('state');\n $zip = Yii::app()->request->getParam('zip');\n $ID_number = Yii::app()->request->getParam('ID_number');\n $DL_ID_exp = Yii::app()->request->getParam('DL_ID_exp');\n $insurance_exp = Yii::app()->request->getParam('insurance_exp');\n $payment_due_d_ins = Yii::app()->request->getParam('payment_due_d_ins');\n $account_name = Yii::app()->request->getParam('account_name');\n $SSN_ITIN_TAX_ID = Yii::app()->request->getParam('SSN_ITIN_TAX_ID');\n $routing_number = Yii::app()->request->getParam('routing_number');\n $account_number = Yii::app()->request->getParam('account_number');\n $trash_status = Yii::app()->request->getParam('trash_status');\n $active_status = '0';\n\n $insertuser = Yii::app()->db->createCommand(\"INSERT INTO `active_washers` (`user_id`, `user_email`, `first_name`, `last_name`, `phone`, `address`, `city`, `state`, `zip`, `ID_number`, `DL_ID_exp`, `insurance_exp`, `payment_due_d_ins`, `account_name`, `SSN_ITIN_TAX_ID`, `routing_number`, `account_number`, `trash_status`, `active_status`) VALUES ('$userid', '$user_email', '$first_name', '$last_name', '$phone', '$address', '$city', '$state', '$zip', '$ID_number', '$DL_ID_exp', '$insurance_exp', '$payment_due_d_ins', '$account_name', '$SSN_ITIN_TAX_ID', '$routing_number', '$account_number', '$trash_status', '$active_status') \")->execute();\n $insertid = Yii::app()->db->getLastInsertID();\n $json = array(\n 'result' => 'true',\n 'response' => 'insert successfully'\n );\n\n echo json_encode($json);\n die();\n }", "title": "" }, { "docid": "f4c915890af1dc663075828bbe3f0109", "score": "0.45251927", "text": "public function getMethod()\n {\n return 'Balance';\n }", "title": "" }, { "docid": "7c2759ad5ebf1b9c19de1a03dcb9439b", "score": "0.45229173", "text": "public function store(Request $request)\n {\n if ($request->opening_value == '') $request['opening_value'] = '0';\n if ($request->budget_value == '') $request['budget_value'] = '0';\n\n $this->validate($request, [\n 'account_period_id' => 'required|numeric',\n 'account_group_id' => 'required|numeric',\n 'number' => 'digits_between:1,6',\n 'name' => 'required|max:255',\n 'opening_value' => 'numeric|max:9999999999999999|min:-9999999999999999',\n 'budget_value' => 'numeric|max:9999999999999999|min:-9999999999999999',\n ]);\n\n Account::create($request->all());\n return back()->with('success','created successfully');\n }", "title": "" }, { "docid": "10499a934d7f2e31d36f23d625775bd2", "score": "0.45222068", "text": "protected function createBalance(): BalanceContract\n {\n return (new Factory($this->app))->make(array_merge(\n [\n '__class' => BalanceDb::class,\n ],\n $this->app->get('config')->get('balance', [])\n ));\n }", "title": "" }, { "docid": "0f036cb4c330fb74ad1458d853e2489e", "score": "0.45220008", "text": "public function validatecheckBalanceParams()\n {\n\t\t$bean \t= \t$this->bean;\n\t \t$rules \t= \t[\n\t\t\t\t\t\t'required' => [\n\t\t\t\t\t\t\t ['PaymentAmount'],['UsersId']\n\t\t\t\t\t\t]\n\t\t\t\t\t];\n\t\t\n $v \t\t= \tnew Validator($this->bean);\n $v->rules($rules);\n if (!$v->validate()) {\n $errors = $v->errors();\n\t\t\t// check UsersId and PaymentAmount field\n throw new ApiException(\"Please check UsersId and PaymentAmount field.\" , ErrorCodeType::SomeFieldsRequired, $errors);\n }\n\t}", "title": "" } ]
8ef242df6ad03ea33f54ee76ecc344c0
Bootstrap any application services.
[ { "docid": "9c2a089ccedfa0004cea00e983ea1387", "score": "0.0", "text": "public function boot()\n {\n $this->publishes([\n __DIR__.'/Config/lapcs-command.php' => config_path('lapcs-command.php')\n ], 'config');\n\n }", "title": "" } ]
[ { "docid": "78dd65a9617c6a1088e92c764fc19b05", "score": "0.7341217", "text": "public function bootstrap(): void\n {\n if ( ! $this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n \n $this->app->loadDeferredProviders();\n }", "title": "" }, { "docid": "315d1511ff071aa3d03ea10edc7d4e29", "score": "0.7223426", "text": "public function boot()\n {\n \n $oProviders = $this->getServiceProviders();\n \n foreach($oProviders as $oProvider){\n $this->register($oProvider);\n }\n \n }", "title": "" }, { "docid": "5c020095c1339518c474f06eeafbb4b7", "score": "0.7169242", "text": "public function bootstrap()\n {\n // In the CreatesApplication trait the HTTP application/bootstrappers were initialized.\n // When doing an HTTP test (Ex. `->get`), in order to simulate the request,\n // it will be necessary to \"reload\" the bootstrappers because they have already\n // been initialized in the trait above, hence the removal of the `$this- check >app->hasBeenBootstrapped()`.\n // This is not necessary in production `nginx->php->index.php` as the `index.php` file is correct!\n $this->app->bootstrapWith($this->bootstrappers());\n\n $this->app->register(RouteServiceProvider::class, true);\n }", "title": "" }, { "docid": "17c7f49b01e53b1781c9077dd049b3d4", "score": "0.7143681", "text": "public function boot(): void\n {\n AnzuApp::init(\n appNamespace: $this->appNamespace,\n appSystem: $this->appSystem,\n appVersion: $this->appVersion,\n appReadOnlyMode: $this->appReadOnlyMode,\n projectDir: $this->getProjectDir(),\n appEnv: $this->getEnvironment(),\n userIdAdmin: $this->userIdAdmin,\n userIdConsole: $this->userIdConsole,\n userIdAnonymous: $this->userIdAnonymous,\n contextId: $this->contextId\n );\n\n parent::boot();\n\n $trustedProxies = Request::getTrustedProxies();\n if ($this->loadBalancerIp && $trustedProxies) {\n $trustedProxies[] = $this->loadBalancerIp;\n Request::setTrustedProxies($trustedProxies, Request::getTrustedHeaderSet());\n }\n }", "title": "" }, { "docid": "b5673981b5d0eaf2897499326e8c50bc", "score": "0.714105", "text": "protected function bootServiceProviders()\n {\n $config = $this->get('config');\n\n if (! $config->has('app.providers')) {\n return;\n }\n\n foreach ($config->get('app.providers') as $provider) {\n $this->addServiceProvider($provider);\n }\n }", "title": "" }, { "docid": "b866e2b06f9c0f7b75f1b7e1dfd607d4", "score": "0.71317947", "text": "public function boot()\n {\n $this->loadServiceProviders();\n $this->loadAliases();\n }", "title": "" }, { "docid": "f6a562927bd68d23e634e476b7362afa", "score": "0.7091688", "text": "public function boot()\n {\n $this->_processConfiguration();\n foreach(array_keys($this->_services) as $service)\n {\n $this->_bindService($service);\n }\n\n //Loop over all aliases to make sure the service is registered\n foreach($this->_aliases as $alias => $service)\n {\n $this->getCubex()->bind(\n $alias,\n function (Cubex $cubex) use ($alias, $service)\n {\n //Destroy the alias binding\n $cubex->forgetInstance($alias);\n\n //Force the service to register\n $cubex->make($service);\n\n //Make the service defined binding\n return $cubex->make($alias);\n }\n );\n }\n }", "title": "" }, { "docid": "cc6b3527797869f9bb0e208deefbc555", "score": "0.7082232", "text": "public function bootstrap()\n {\n if (! $this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n }", "title": "" }, { "docid": "b78992d410becd3fb5a5fc4121d794de", "score": "0.7076101", "text": "public function boot()\n {\n // 如果在后台运行, 启动后台服务\n if (request()->is('admin*')) {\n\n $this->registerEditorService();\n $this->registerAdminService();\n } elseif (request()->is('yxx*')) {\n\n $this->registerEditorService();\n } elseif (request()->is('api*')) {\n\n config(['auth.defaults.guard' => 'api']);\n $this->registerJwtService();\n } elseif ($this->app->runningInConsole()) {\n\n Schema::defaultStringLength(191);\n $this->registerJwtService();\n $this->registerAdminService();\n }\n }", "title": "" }, { "docid": "81a502766e97a0325d6a2f0262ed4377", "score": "0.70463765", "text": "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__.'/../config/services.php' => config_path('services.php'),\n ]);\n }\n }", "title": "" }, { "docid": "06371c4e0a9a3dc50f807d8b18a0c5d8", "score": "0.7032425", "text": "public function boot()\n {\n $this->bootMiddlewares();\n $this->bootGuards();\n }", "title": "" }, { "docid": "fd140f0511344d92fcf078c540996441", "score": "0.70194554", "text": "public function bootstrap(): void\n {\n if (!$this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n }", "title": "" }, { "docid": "375e20e4f66429580c26c92cec8d1d5e", "score": "0.7011949", "text": "public function boot(): void\n {\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "b7b0b33ffad70846d98e0ca1e40d7f01", "score": "0.70042497", "text": "public function boot()\n {\n $this->app->bind(ICalculateService::class, CalculateService::class);\n }", "title": "" }, { "docid": "0489d2ade67681a91b8d75052908a1eb", "score": "0.7003907", "text": "public function boot(): void\n {\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "ec317e55c8e6c50d6fab3d56907c0e01", "score": "0.6984825", "text": "public function boot()\n {\n $this->registerResources();\n $this->registerServiceProviders();\n $this->registerAliases();\n $this->registerModuleRegistry();\n $this->registerCommands();\n $this->registerRoutesAndMiddlewares();\n $this->registerFields();\n $this->registerGeneratorStubs();\n $this->registerLocales();\n $this->registerViewComposers();\n $this->registerValidationRules();\n $this->registerAssets();\n\n $this->app->singleton( SecurityStrategy::class, function()\n {\n return $this->app->make( SessionSecurityService::class );\n } );\n\n $this->loadTranslationsFrom( __DIR__ . '/resources/lang', 'arbory' );\n }", "title": "" }, { "docid": "a10905d61904c9ae15808fdc65d3f7fd", "score": "0.69615155", "text": "public function boot()\n {\n $this->app->bind('zendesk', function () {\n $driver = config('zendesk-laravel.driver', 'api');\n if (is_null($driver) || $driver === 'log') {\n return new NullService($driver === 'log');\n }\n\n return new ZendeskService;\n });\n }", "title": "" }, { "docid": "83b5316864a6849c4a6f57ca2799cfe4", "score": "0.6961223", "text": "public function boot()\n {\n /** template service **/\n $this->app->register('Adtech\\Templates\\TemplatesServiceProvider');\n\n /** register optional **/\n if (($moduleConfigs = Config::get('site.modules'))) {\n foreach ($moduleConfigs as $package => $modules) {\n if ($modules) {\n foreach ($modules as $module) {\n $moduleData = explode('-', $module);\n $moduleNamespace = null;\n foreach ($moduleData as $k => $v) {\n $moduleNamespace .= ucfirst($v);\n }\n $namespace = ucfirst($package) . '\\\\' . $moduleNamespace . '\\\\' . $moduleNamespace . 'ServiceProvider';\n $this->app->register($namespace);\n }\n }\n }\n }\n }", "title": "" }, { "docid": "8ff3a37d8ea964a02d920c45f63bba1e", "score": "0.6955807", "text": "public function boot()\n {\n $this->setupConfig($this->app);\n }", "title": "" }, { "docid": "8ff3a37d8ea964a02d920c45f63bba1e", "score": "0.6955807", "text": "public function boot()\n {\n $this->setupConfig($this->app);\n }", "title": "" }, { "docid": "861867c84f1785c621da70d7d3dc12a4", "score": "0.69522125", "text": "public static function boot()\n {\n static::container()->boot();\n }", "title": "" }, { "docid": "5ef6d8a8ccc4ef06b693bead7f8a6340", "score": "0.69228876", "text": "public function boot()\n\t{\n\t\t$this->setupConfig($this->app);\n\t\t$this->setupMigrations($this->app);\n\t}", "title": "" }, { "docid": "f239ac2a6bbb86a3da6648c8eb71707c", "score": "0.6914684", "text": "public function boot()\n {\n \\add_filter('mimicry_service_array', function ($services) {\n foreach ($services as $service) {\n if ($this->serviceNneeded($service)) {\n $this->neededServices[] = $service;\n }\n }\n\n return $this->neededServices;\n });\n }", "title": "" }, { "docid": "c815a94b9ddf541b8e89dc8e816ef101", "score": "0.6903436", "text": "public function boot()\n {\n $this->registerHelpers();\n\n if ($this->app->runningInConsole()) {\n $this->commands([\n Console\\InitializeCommand::class,\n Console\\InitializeGitHooksCommand::class,\n Console\\AbstractionMakeCommand::class,\n Console\\BusinessMakeCommand::class,\n Console\\BusinessServiceMakeCommand::class,\n Console\\ConsoleMakeCommand::class,\n Console\\ControllerMakeCommand::class,\n Console\\ApiControllerMakeCommand::class,\n Console\\DependencyMakeCommand::class,\n Console\\DomainModelMakeCommand::class,\n Console\\EloquentMakeCommand::class,\n Console\\ExceptionMakeCommand::class,\n Console\\RequestMakeCommand::class,\n Console\\ResourceMakeCommand::class,\n ]);\n }\n }", "title": "" }, { "docid": "97d3778f159e756b5510c753029b5585", "score": "0.6896277", "text": "public function boot()\n {\n $this->app->instance(MessageService::class,\n new MessageService(\n new MessageBaseRepository($this->app)\n )\n );\n }", "title": "" }, { "docid": "9936c6cb2094e72cdc7d4ef00b05de04", "score": "0.68957835", "text": "public function boot()\n {\n \\add_action('mimicry_handle_service', function ($service) {\n if (\\method_exists($service, 'init')) {\n $this->app->call(array($service, 'init'));\n }\n });\n }", "title": "" }, { "docid": "b42f252457a7422d7ae2406eb704f6aa", "score": "0.68862295", "text": "public function boot(): void\n {\n if (in_array($this->app->environment(), ['local', 'testing'], true)) {\n $this->registerProviders();\n $this->registerFacadeAliases();\n }\n }", "title": "" }, { "docid": "cee9f5f46dfbe326e2aea24d4ce90f09", "score": "0.68846315", "text": "public function boot()\n {\n $app = $this->app;\n }", "title": "" }, { "docid": "fc8746b63efc8ba920f2ea2bb1dbfbd5", "score": "0.6861902", "text": "public function boot()\n {\n // Add dirs where to find modules from config\n foreach (config('modules.dirs') as $dir)\n {\n Modules::addDir(base_path($dir));\n }\n\n // Boot installed modules\n foreach (Modules::installed() as $module)\n {\n // Register module service providers\n $providers = $module->getProviders();\n\n if (is_array($providers))\n {\n foreach($providers as $provider)\n {\n $this->app->register($provider);\n }\n }\n\n // Require files (relative to the module route path)\n $files = $module->getFiles();\n\n if (is_array($files))\n {\n foreach ($files as $file)\n {\n require_once $module->getPath() . '/' . $file;\n }\n }\n }\n }", "title": "" }, { "docid": "e4fb87e1b9af3191fceee5ffbc16d4b5", "score": "0.685902", "text": "public function boot()\n {\n (new Environment())->setEnvironment();\n \n if ($this->app->runningInConsole()) {\n $this->commands([\n Console\\Commands\\CiviDbBackup::class,\n Console\\Commands\\CiviMakeDb::class,\n Console\\Commands\\CiviMakeMigration::class,\n Console\\Commands\\CiviMakeModel::class,\n Console\\Commands\\CiviMakeSeeder::class,\n ]);\n }\n }", "title": "" }, { "docid": "6e82a537c65028c3623de6c9e22da5a7", "score": "0.6857054", "text": "public function boot()\n {\n\n if($this->app->runningInConsole()) {\n\n $this->commands([\n\n GenerateBoilerplate::class,\n GenerateSubsystem::class,\n GenerateFormatter::class,\n GenerateService::class,\n GenerateValidator::class,\n GenerateResource::class,\n GenerateVueComponent::class,\n\n ]);\n\n }\n\n }", "title": "" }, { "docid": "a574cdbc989c4d07fe3793c8a8f9720f", "score": "0.6853389", "text": "public function boot()\n {\n // Bring in the routes\n require __DIR__ . '/routes.php';\n require __DIR__ . '/transformers.php';\n }", "title": "" }, { "docid": "7673a2c662ab2c1215d391f2f5c63a61", "score": "0.68512523", "text": "public function boot()\n {\n if ($this->app->runningInConsole()) {\n // Registering package commands.\n $this->commands([\n Commands\\AppInstall::class,\n Commands\\UserCreate::class\n ]);\n }\n }", "title": "" }, { "docid": "58e21145f777cea555afbee8cb108c29", "score": "0.6843697", "text": "public function boot()\n {\n require __DIR__ . '/../../../autoload.php';\n }", "title": "" }, { "docid": "cfc70a05eae36eef39a60d92e25fab9d", "score": "0.6840489", "text": "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands($this->commands);\n }\n }", "title": "" }, { "docid": "dad7f82f39587cfc46e8afcc2044068a", "score": "0.6815152", "text": "protected function boot()\n {\n $this->addServiceProvider('Skaffold\\Console\\Filesystem\\FilesystemServiceProvider');\n $this->addServiceProvider('Skaffold\\Console\\Configuration\\ConfigurationServiceProvider');\n }", "title": "" }, { "docid": "b7135fa7ba2ec35ecc1fc8be7e0b9f9b", "score": "0.68118626", "text": "public function boot()\n {\n $this->app->bind(ITokenService::class, TokenService::class);\n $this->app->bind(IUserRegisterService::class, UserRegisterService::class);\n $this->app->bind(INotificationService::class, NotificationService::class);\n }", "title": "" }, { "docid": "cdaf449a8a2e340ae9e0859e85a97cfe", "score": "0.679358", "text": "public function boot()\n {\n $this->loadConsole();\n $this->loadConfig();\n \n $this->publishConfig();\n }", "title": "" }, { "docid": "bf3c82b78f83ccdb1ed66050ba025958", "score": "0.6785484", "text": "public function boot()\n {\n $this->app->singleton('wechatservice', function(){\n return new WechatService();\n }); \n $this->app->singleton('uploadservice', function(){\n return new UploadService();\n });\n }", "title": "" }, { "docid": "4567b8ee01d797792c6937bdfabe71a6", "score": "0.6783953", "text": "public function boot()\n\t{\n\t\tif ($this->booted) return;\n\n\t\t// To boot the application we will simply spin through each service provider\n\t\t// and call the boot method, which will give them a chance to override on\n\t\t// something that was registered by another provider when it registers.\n\t\tforeach ($this->serviceProviders as $provider)\n\t\t{\n\t\t\t$provider->boot();\n\t\t}\n\n\t\t$this->fireAppCallbacks($this->bootingCallbacks);\n\n\t\t// Once the application has booted we will also fire some \"booted\" callbacks\n\t\t// for any listeners that need to do work after this initial booting gets\n\t\t// finished. This is useful when ordering the boot-up processes we run.\n\t\t$this->booted = true;\n\n\t\t$this->fireAppCallbacks($this->bootedCallbacks);\n\t}", "title": "" }, { "docid": "a2cab9b4de0678549699843b74cc55f3", "score": "0.67816013", "text": "public function boot()\n {\n //Load the StationService service into the service container\n $this->app->bind(\\App\\Services\\StationService::class, function($app){\n return new \\App\\Services\\StationServiceImpl();\n });\n }", "title": "" }, { "docid": "f381f5eed4d94b12fab1eb6dff6e2056", "score": "0.6772533", "text": "public function boot()\n {\n $this->registerPublishes();\n $this->overwriteAppConfig();\n }", "title": "" }, { "docid": "4f3d0488acec0584ac0aaa8de26397a1", "score": "0.67656577", "text": "public function boot()\n {\n\t\t$this->app->configure('api');\n\t\t$this->app->register(\\MoeenBasra\\LaravelPassportMongoDB\\PassportServiceProvider::class);\n\n $this->app->singleton(Connection::class, function() {\n return $this->app['db.connection'];\n });\n\n if ($this->app->runningInConsole()) {\n $this->commands([\n Purge::class\n ]);\n }\n\n $this->registerRoutes();\n $this->registerAuthorizationServer();\n\n $this->registerResourceServer();\n }", "title": "" }, { "docid": "7ba4cff9bbecd5e4ee0194013e6c9d29", "score": "0.6765468", "text": "public function boot()\n {\n View::composer('*', AppComposer::class);\n }", "title": "" }, { "docid": "690c80f289cd1d20592e80e3f3155b41", "score": "0.67651725", "text": "public function boot()\n {\n $this->app->bind(ManagesCustomer::class, CustomerManager::class);\n $this->app->bind(ManagesOrders::class, OrderManager::class);\n }", "title": "" }, { "docid": "00201dd2fc59bbb50f061fe0e734941f", "score": "0.67639524", "text": "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n CrudCommand::class,\n CrudControllerCommand::class,\n CrudModelCommand::class,\n CrudMigrationCommand::class,\n CrudViewCommand::class,\n CrudLangCommand::class,\n CrudApiCommand::class,\n CrudApiControllerCommand::class,\n InstallRootsCommand::class,\n ]);\n }\n }", "title": "" }, { "docid": "e76a7a7ed9600d9189e8e2df90afc111", "score": "0.67554927", "text": "public function boot()\n {\n $this->bootCommands();\n $this->bootDirectives();\n $this->bootPublishing();\n $this->bootRoutes();\n }", "title": "" }, { "docid": "343cc5bd7c92bf1704d527161b58ae6e", "score": "0.67388827", "text": "public function boot()\n {\n // php artisan vendor:publish --tag=api\n $this->publishes([\n __DIR__ . '/config/api.php' => config_path('api.php'),\n __DIR__ . '/Http/Controllers/stubs/ApiController.stub' => app_path('Http/Controllers/ApiController.php'),\n __DIR__ . '/Policies/stubs/Policy.stub' => app_path('Policies/Policy.php'),\n ], 'api');\n\n if ($this->app->runningInConsole()) {\n $this->commands([\n ApiAllMakeCommand::class,\n ApiControllerMakeCommand::class,\n ApiMakeCommand::class,\n ApiPolicyMakeCommand::class,\n ApiResourceMakeCommand::class,\n ApiRequestMakeCommand::class,\n ApiServiceMakeCommand::class,\n ApiCreatePersonalAccessToken::class,\n ApiMediaCacheClean::class,\n ]);\n }\n\n $this->registerMiddlewareAliases();\n $this->registerPolicies();\n $this->registerRouterMacro();\n }", "title": "" }, { "docid": "562ddee785376ca64fc35a84b2a72736", "score": "0.6738323", "text": "public function boot(): void\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__.'/../config/config.php' => config_path('insular.php'),\n ], 'config');\n\n // Registering package commands.\n $this->commands([\n GenerateModuleCommand::class,\n GenerateOperationCommand::class,\n GenerateControllerCommand::class,\n GenerateMigrationCommand::class,\n GenerateModelCommand::class,\n GenerateTypeCommand::class,\n GenerateResourceCommand::class,\n GenerateRequestCommand::class,\n GenerateFeatureCommand::class,\n GenerateJobCommand::class,\n GenerateExceptionCommand::class,\n ]);\n }\n }", "title": "" }, { "docid": "4ce65be9f6c52fa7f7faaaba7ec00694", "score": "0.67373276", "text": "public function boot()\n {\n $this->setupEventFiring($this->app);\n $this->setupEventListening($this->app);\n }", "title": "" }, { "docid": "931f9f700b62b029be22c37286a6ac12", "score": "0.6731532", "text": "public function boot()\n {\n $this->registerResources();\n\n //加载核心辅助函数\n require_once __DIR__ . '/Helper/Helper.php';\n\n //是否有设置代理,有则获取设置为代理\n if (!empty(config('app.proxy_ips'))) {\n Request()->setTrustedProxies(config('app.proxy_ips'));\n }\n\n //调试模式\n // if (config('app.debug') === true) {\n // //注册路由\n // if (!$this->app->routesAreCached()) {\n // require __DIR__ . '/routes/debug.php';\n // }\n // new \\Yashon\\Laravel\\Core\\Debuger();\n // }\n\n //注册自动生成命令\n if ($this->app->runningInConsole()) {\n $this->commands([\n 'Yashon\\Laravel\\Core\\Console\\CreateModel',\n 'Yashon\\Laravel\\Core\\Console\\CreateModelDoc',\n 'Yashon\\Laravel\\Core\\Console\\CreateController',\n 'Yashon\\Laravel\\Core\\Console\\CreateLogic',\n 'Yashon\\Laravel\\Core\\Console\\CreateTest',\n 'Yashon\\Laravel\\Core\\Console\\CreateSeeder',\n 'Yashon\\Laravel\\Core\\Console\\CreateMigration',\n 'Yashon\\Laravel\\Core\\Console\\CreateInit',\n\n 'Yashon\\Laravel\\Core\\Console\\Config',\n 'Yashon\\Laravel\\Core\\Console\\Supervisor'\n\n ]);\n }\n\n }", "title": "" }, { "docid": "d468166b7e689571633acfeff7810b37", "score": "0.6727984", "text": "public function boot()\n {\n // If we configured the package to boot its services immediately after\n // the registration phase (auto-boot), don't boot the provider again:\n if ($this->isBooted) {\n return;\n }\n\n $this->bootComponentDrivers();\n\n // If we want Laravel's Redis API to use Sentinel, we'll remove the\n // \"redis\" service from the deferred services in the container:\n if ($this->config->shouldOverrideLaravelRedisApi) {\n $this->removeDeferredRedisServices();\n }\n\n if ($this->config->shouldIntegrateHorizon) {\n $horizon = new HorizonServiceProvider($this->app, $this->config);\n $horizon->register();\n $horizon->boot();\n }\n\n $this->isBooted = true;\n }", "title": "" }, { "docid": "44b6d399481468a53330e1bf9a7c91d4", "score": "0.67271423", "text": "public function boot()\n {\n app()->booted(function () {\n $this->booted();\n });\n }", "title": "" }, { "docid": "44b6d399481468a53330e1bf9a7c91d4", "score": "0.67271423", "text": "public function boot()\n {\n app()->booted(function () {\n $this->booted();\n });\n }", "title": "" }, { "docid": "44b6d399481468a53330e1bf9a7c91d4", "score": "0.67271423", "text": "public function boot()\n {\n app()->booted(function () {\n $this->booted();\n });\n }", "title": "" }, { "docid": "44b6d399481468a53330e1bf9a7c91d4", "score": "0.67271423", "text": "public function boot()\n {\n app()->booted(function () {\n $this->booted();\n });\n }", "title": "" }, { "docid": "dd26d6cc74b1dfc17bfa45e03c3046a8", "score": "0.67250526", "text": "public function boot()\n {\n $this->app->when(HooksChannel::class)\n ->needs(Hooks::class)\n ->give(function () {\n $hooksKey = config('services.hooks.key');\n\n return new Hooks($hooksKey, new HttpClient());\n });\n }", "title": "" }, { "docid": "b45fc533df2a3df2380e7e8f1b476551", "score": "0.6724427", "text": "private function boot(): void\n\t{\n\t\t// First check if the application is already booted\n\t\tif ($this->isBooted) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Boot all registered providers\n\t\tforeach ($this->registeredProviders as $provider) {\n\t\t\t$this->bootServiceProvider($provider);\n\t\t}\n\n\t\t$this->isBooted = true;\n\t}", "title": "" }, { "docid": "c55a67639a3afb04b530b9c8a57d3069", "score": "0.6720209", "text": "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands($this->commands);\n $this->publishMigrations();\n }\n }", "title": "" }, { "docid": "30ba9ee972df7877d6544a5b2f18cd22", "score": "0.6714308", "text": "public function boot()\n {\n $this->app->bind('GuzzleClient', function () {\n $logger = new Logger('laravel');\n $stack = HandlerStack::create();\n $stack->push(new LogMiddleware($logger, new DatabaseHandler()));\n return function ($config) use ($stack){\n return new Client(array_merge($config, ['handler' => $stack]));\n };\n });\n }", "title": "" }, { "docid": "a8982a9de26ad92c5b324c91dc159229", "score": "0.67141414", "text": "public function boot()\n {\n $this->app->instance(ApiGateway::class, new ApiGatewayManager());\n }", "title": "" }, { "docid": "76fcc4ba20cee00dcbe23ec7fec37287", "score": "0.67091525", "text": "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n GenerateDocsCommand::class,\n AccountChangePasswordCommand::class,\n AccountCreateCommand::class,\n LoginSanctumCommand::class,\n AccountCreateCommand::class,\n AccountAssignRoleCommand::class,\n JdlxInstallCommand::class,\n JdlxCreateAdminCommand::class,\n ]);\n }\n\n\n $this->publishes([\n __DIR__ . '/../publish/app' => base_path('app'),\n __DIR__ . '/../publish/routes' => base_path('routes'),\n __DIR__ . '/../publish/tests' => base_path('tests'),\n __DIR__ . '/../publish/config' => base_path('config'),\n __DIR__ . '/../publish/database/seeders' => base_path('database/seeders'),\n __DIR__ . '/../publish/.githooks' => base_path('.githooks'),\n ]);\n\n $this->loadViewsFrom(__DIR__ . '/../resources/views', 'jdlx');\n $this->loadRoutesFrom(__DIR__ . '/../routes/docs.php');\n\n }", "title": "" }, { "docid": "27b05f3be437044164382fb87b59cbea", "score": "0.6707637", "text": "public function boot()\n {\n $this->loadAutoloader(base_path('packages'));\n }", "title": "" }, { "docid": "ae1dc350aedf2bf9205bffae2e6b2e23", "score": "0.670334", "text": "public function boot(): void\n {\n if ($this->packageDirectoryExistsAndIsNotEmpty('bootstrap') &&\n file_exists($helpers = $this->packageHelpersFile())) {\n require $helpers;\n }\n\n if ($this->packageDirectoryExistsAndIsNotEmpty('resources/lang')) {\n $this->loadTranslationsFrom($this->packageLangsPath(), $this->vendorNameDotPackageName());\n }\n\n if ($this->packageDirectoryExistsAndIsNotEmpty('resources/views')) {\n // Load published views\n $this->loadViewsFrom($this->publishedViewsPath(), $this->vendorNameDotPackageName());\n\n // Fallback to package views\n $this->loadViewsFrom($this->packageViewsPath(), $this->vendorNameDotPackageName());\n }\n\n if ($this->packageDirectoryExistsAndIsNotEmpty('database/migrations')) {\n $this->loadMigrationsFrom($this->packageMigrationsPath());\n }\n\n if ($this->packageDirectoryExistsAndIsNotEmpty('routes')) {\n $this->loadRoutesFrom($this->packageRoutesFile());\n }\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n\n // Set app locale to default\n $this->app->setLocale(config($this->vendorNameDotPackageName())['default_locale']);\n\n // Register Facade\n $loader = AliasLoader::getInstance();\n $loader->alias('LocalizeRoute', LocalizeRoute::class);\n }", "title": "" }, { "docid": "dee11bee823f0333a203ec0940da9ca7", "score": "0.6700985", "text": "public function boot()\n {\n $this->app->bind(IUserService::class,UserService::class);\n $this->app->bind(IJsonReader::class,JsonReader::class);\n $this->app->bind(IFilterUsers::class,FilterUsers::class);\n }", "title": "" }, { "docid": "f694fd34b0461ace138748add6c24490", "score": "0.66987807", "text": "public function boot()\n {\n Inertia::share('flash', function () {\n return ['success' => FacadesSession::get('success')];\n });\n Inertia::share('errors', function () {\n return FacadesSession::get('errors') ? FacadesSession::get('errors')->getBag('default')->getMessages() : (object)[];\n });\n $this->app->singleton('App\\Youtube\\YoutubeServices', function () {\n return new YoutubeServices (env('YOUTUBE_API_KEY'));\n });\n }", "title": "" }, { "docid": "6db36813ce4520337a22d84e951d430f", "score": "0.66975754", "text": "public function boot()\n {\n $registryServiceName = 'service_provider_registry_' . $this->id;\n $this->container->set($registryServiceName, $this->getRegistry($this->container));\n }", "title": "" }, { "docid": "c2f9ce3f191c2f3c31903fbca4684a6a", "score": "0.66904914", "text": "public function boot()\n {\n $packagePath = __DIR__.'/../';\n\n $this->app->router->group([\n 'middleware' => 'web',\n 'namespace' => $this->getAppNamespace() . 'Http\\Controllers'\n ], function() use($packagePath) {\n require $packagePath . 'routes/web.php';\n });\n\n $this->loadTranslationsFrom($packagePath.'resources/lang', 'auth');\n\n $this->app->singleton('command.nwo.auth.migrations', function ($app) {\n return $app['NewJapanOrders\\Auth\\Commands\\PublishMigrations'];\n }); \n $this->commands('command.nwo.auth.migrations');\n $this->app->singleton('command.nwo.auth.views', function ($app) {\n return $app['NewJapanOrders\\Auth\\Commands\\PublishViews'];\n }); \n $this->commands('command.nwo.auth.views');\n\n\n $this->loadViewsFrom($packagePath . 'resources/views', 'auth');\n }", "title": "" }, { "docid": "420db9e5f66158b41498d6dc64ec716d", "score": "0.6690358", "text": "public function boot()\n {\n $this->bootAuthen();\n\n $path = \\realpath(__DIR__.'/../../');\n\n $this->addConfigComponent('orchestra/foundation', 'orchestra/foundation', \"{$path}/config\");\n $this->addLanguageComponent('orchestra/foundation', 'orchestra/foundation', \"{$path}/resources/lang\");\n $this->addViewComponent('orchestra/foundation', 'orchestra/foundation', \"{$path}/resources/views\");\n }", "title": "" }, { "docid": "0c9e27b28056b5b4626c3569974dcf1f", "score": "0.6688052", "text": "public function boot()\n {\n Schema::defaultStringLength(191);\n\n $this->app->bind(RekognitionClient::class, function () {\n $client = new RekognitionClient([\n 'credentials' => [\n 'key' => config('services.aws.key'),\n 'secret' => config('services.aws.secret'),\n ],\n 'region' => \"us-east-1\",\n \"version\" => \"latest\"\n ]);\n\n return $client;\n });\n\n $this->elasticSearchRegister();\n }", "title": "" }, { "docid": "f097fd5624b1a90769a48ff1dafd116b", "score": "0.6685961", "text": "public function boot(): void\n {\n if ($this->app->runningInConsole()) {\n $this->registerConfiguration();\n }\n\n $this->registerRoutes();\n }", "title": "" }, { "docid": "49af1cc342aa15052132712a4bca7b13", "score": "0.66807675", "text": "public function boot()\n {\n // Commands & Config\n if ($this->app->runningInConsole()) {\n $this->commands([\n AliasCommand::class,\n MakeAllCommand::class,\n MakeControllerCommand::class,\n MakeModelCommand::class,\n MakeResourceCommand::class,\n MakeResourcesCommand::class,\n MakeRequestCommand::class,\n RouteCommand::class,\n ]);\n\n $this->publishes([\n __DIR__ . '/config/jsonapi.php' => config_path('jsonapi.php'),\n __DIR__ . '/config/jsonapi-alias.php' => config_path('jsonapi-alias.php'),\n ], 'config');\n }\n\n // Config\n $this->mergeConfigFrom(\n __DIR__ . '/config/jsonapi.php',\n 'jsonapi'\n );\n\n // Middlewares\n // Add middlewares to router\n $router = $this->app['router'];\n if (!$router->hasMiddlewareGroup('jsonapi')) {\n $router->middlewareGroup('jsonapi', []);\n }\n // $router->aliasMiddleware('jsonapi.addHeaders', AddResponseHeaders::class);\n // $router->pushMiddlewareToGroup('jsonapi', 'jsonapi.addHeaders');\n $router->aliasMiddleware('jsonapi.checkHeaders', CheckRequestHeaders::class);\n $router->pushMiddlewareToGroup('jsonapi', 'jsonapi.checkHeaders');\n $router->aliasMiddleware('jsonapi.checkQuery', CheckQueryParameters::class);\n $router->pushMiddlewareToGroup('jsonapi', 'jsonapi.checkQuery');\n\n // Add middlewares to kernel (globally)\n $this->app->make('Illuminate\\Contracts\\Http\\Kernel')->prependMiddleware(AddResponseHeaders::class);\n\n // Macros\n foreach (glob(__DIR__ . '/macro/*.php') as $file) {\n require_once $file;\n }\n\n // Routes\n app('router')->patterns(['id' => '[0-9]+', 'parentId' => '[0-9]+']);\n }", "title": "" }, { "docid": "590e97d327dd2777866b1262af492f2b", "score": "0.6679752", "text": "public function boot()\n {\n $this->app->singleton(CustomerAuthenticator::class, function (Application $app) {\n return new CustomerAuthenticator(\n $app->make(CustomerRepository::class),\n $app->make(Cookie::class)\n );\n });\n }", "title": "" }, { "docid": "5297f5bff15c963ded87272f7ff2f2ae", "score": "0.66797066", "text": "public function boot(): void\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n StartServelCommand::class\n ]);\n\n $this->publishes([\n $this->packageBasePath('config/servel.php') => config_path('servel.php')\n ], 'servel-config');\n }\n }", "title": "" }, { "docid": "0ea1523ec3e0dc7aa7c7e3dc5c8b71fb", "score": "0.6674666", "text": "public function boot(Application $app)\n {}", "title": "" }, { "docid": "6d2d40493a377dd923daaf85429d6e40", "score": "0.6673334", "text": "public function boot()\n {\n $this->registerTranslations();\n $this->registerConfig();\n $this->registerViews();\n $this->registerFactories();\n $this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');\n $this->commands(\n [\n \\Modules\\Analytics\\Console\\AnalyticsCompute::class,\n \\Modules\\Analytics\\Console\\ComputeInvoices::class,\n \\Modules\\Analytics\\Console\\ComputePayments::class,\n \\Modules\\Analytics\\Console\\ComputeCredits::class,\n \\Modules\\Analytics\\Console\\ComputeExpenses::class,\n \\Modules\\Analytics\\Console\\ComputeEstimates::class,\n \\Modules\\Analytics\\Console\\ComputeDeals::class,\n \\Modules\\Analytics\\Console\\ComputeLeads::class,\n \\Modules\\Analytics\\Console\\ComputeProjects::class,\n \\Modules\\Analytics\\Console\\ComputeTasks::class,\n \\Modules\\Analytics\\Console\\ComputeTickets::class,\n \\Modules\\Analytics\\Console\\ComputeTimesheets::class,\n ]\n );\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" } ]
cc5495205c539ae95339bec8a98a5059
Retrieves the revision's schema, conforming to JSON Schema.
[ { "docid": "eb45411da736b0eede57e84ae2f04d08", "score": "0.7573803", "text": "public function get_item_schema() {\n\t\t$schema = array(\n\t\t\t'$schema' => 'http://json-schema.org/draft-04/schema#',\n\t\t\t'title' => \"{$this->parent_post_type}-revision\",\n\t\t\t'type' => 'object',\n\t\t\t// Base properties for every Revision.\n\t\t\t'properties' => array(\n\t\t\t\t'author' => array(\n\t\t\t\t\t'description' => __( 'The ID for the author of the object.' ),\n\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t'context' => array( 'view', 'edit', 'embed' ),\n\t\t\t\t),\n\t\t\t\t'date' => array(\n\t\t\t\t\t'description' => __( \"The date the object was published, in the site's timezone.\" ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'format' => 'date-time',\n\t\t\t\t\t'context' => array( 'view', 'edit', 'embed' ),\n\t\t\t\t),\n\t\t\t\t'date_gmt' => array(\n\t\t\t\t\t'description' => __( 'The date the object was published, as GMT.' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'format' => 'date-time',\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t),\n\t\t\t\t'guid' => array(\n\t\t\t\t\t'description' => __( 'GUID for the object, as it exists in the database.' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t),\n\t\t\t\t'id' => array(\n\t\t\t\t\t'description' => __( 'Unique identifier for the object.' ),\n\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t'context' => array( 'view', 'edit', 'embed' ),\n\t\t\t\t),\n\t\t\t\t'modified' => array(\n\t\t\t\t\t'description' => __( \"The date the object was last modified, in the site's timezone.\" ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'format' => 'date-time',\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t),\n\t\t\t\t'modified_gmt' => array(\n\t\t\t\t\t'description' => __( 'The date the object was last modified, as GMT.' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'format' => 'date-time',\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t),\n\t\t\t\t'parent' => array(\n\t\t\t\t\t'description' => __( 'The ID for the parent of the object.' ),\n\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t'context' => array( 'view', 'edit', 'embed' ),\n\t\t\t\t\t),\n\t\t\t\t'slug' => array(\n\t\t\t\t\t'description' => __( 'An alphanumeric identifier for the object unique to its type.' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'context' => array( 'view', 'edit', 'embed' ),\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\n\t\t$parent_schema = $this->parent_controller->get_item_schema();\n\n\t\tif ( ! empty( $parent_schema['properties']['title'] ) ) {\n\t\t\t$schema['properties']['title'] = $parent_schema['properties']['title'];\n\t\t}\n\n\t\tif ( ! empty( $parent_schema['properties']['content'] ) ) {\n\t\t\t$schema['properties']['content'] = $parent_schema['properties']['content'];\n\t\t}\n\n\t\tif ( ! empty( $parent_schema['properties']['excerpt'] ) ) {\n\t\t\t$schema['properties']['excerpt'] = $parent_schema['properties']['excerpt'];\n\t\t}\n\n\t\tif ( ! empty( $parent_schema['properties']['guid'] ) ) {\n\t\t\t$schema['properties']['guid'] = $parent_schema['properties']['guid'];\n\t\t}\n\n\t\treturn $this->add_additional_fields_schema( $schema );\n\t}", "title": "" } ]
[ { "docid": "df56e61138d4ac9fdec105c945271a98", "score": "0.6750032", "text": "protected function get_schema() {\n\n\t\t$schema_file = TSFEM_E_LOCAL_DIR_PATH . 'lib' . DIRECTORY_SEPARATOR . 'schema' . DIRECTORY_SEPARATOR . 'schema.json';\n\t\t$timeout = stream_context_create( [ 'http' => [ 'timeout' => 3 ] ] );\n\n\t\treturn json_decode( file_get_contents( $schema_file, false, $timeout ) );\n\t}", "title": "" }, { "docid": "6c600f4e1ab336bb64e9b9fb5d72a8c1", "score": "0.6625929", "text": "public function get_schema(){\n\t\t$schema = array(\n\t\t\t'$schema' => 'http://json-schema.org/draft-04/schema#',\n\t\t\t'title' => 'core',\n\t\t\t'type' => 'object',\n\t\t\t/*\n\t\t\t * Base properties for Core\n\t\t\t */\n\t\t\t'properties' => array(\n\t\t\t\t'version' => array(\n\t\t\t\t\t'description' => 'bbPress plugin version.',\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'context' => array( 'view' ),\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\t\treturn $this->add_additional_fields_schema( $schema );\n\t}", "title": "" }, { "docid": "49b387bb3fe02ecb6727008aef1a2381", "score": "0.64581835", "text": "public function getJsonSchema()\n {\n return $this->json_schema;\n }", "title": "" }, { "docid": "ebd2feb064a140863a92fe9c136bea95", "score": "0.63002604", "text": "public function getSchema();", "title": "" }, { "docid": "ebd2feb064a140863a92fe9c136bea95", "score": "0.63002604", "text": "public function getSchema();", "title": "" }, { "docid": "ebd2feb064a140863a92fe9c136bea95", "score": "0.63002604", "text": "public function getSchema();", "title": "" }, { "docid": "eb80ef3a4996a554607912b283b5c83b", "score": "0.6228385", "text": "public static function getSchema()\n {\n return [\n '$id' => route('zzgo.api.sys-db-field-definitions.schema'),\n '$schema' => 'http://json-schema.org/draft-07/schema#',\n 'title' => 'SysDbFieldDefinition',\n 'description' => 'Definition of a column in a table',\n 'type' => 'object',\n 'required' => ['name', 'type'],\n 'properties' => [\n 'id' => [\n 'title' => 'ID',\n 'type' => 'integer',\n \"readOnly\" => true,\n 'description' => 'ID of the column definition',\n ],\n 'name' => [\n 'title' => 'Name',\n 'type' => 'string',\n 'description' => 'Name of the column',\n ],\n 'type' => [\n 'title' => 'Type',\n 'type' => 'string',\n 'description' => 'Use timestamp columns in table',\n ],\n 'index' => [\n 'title' => 'Index',\n 'type' => 'string',\n 'description' => 'Add index to column',\n ],\n 'unsigned' => [\n 'title' => 'Unsigned',\n 'type' => 'boolean',\n 'default' => false,\n 'description' => 'Only valid for numeric columns',\n ],\n 'nullable' => [\n 'title' => 'Nullable',\n 'type' => 'boolean',\n 'default' => false,\n 'description' => 'Defines if a column may be null',\n ],\n 'default' => [\n 'title' => 'Default',\n 'type' => 'string',\n 'default' => null,\n 'description' => 'Default value for column',\n ],\n 'created_at' => [\n 'title' => 'Creation Date',\n 'type' => 'string',\n 'format' => 'date-time',\n \"readOnly\" => true,\n 'description' => 'Date/Time when object was created',\n ],\n 'updated_at' => [\n 'title' => 'Update Date',\n 'type' => 'string',\n 'format' => 'date-time',\n \"readOnly\" => true,\n 'description' => 'Date/Time when object was last updated',\n ],\n ],\n ];\n }", "title": "" }, { "docid": "c30297522b302da94767b064a266556e", "score": "0.61117387", "text": "public function getSchema(): string;", "title": "" }, { "docid": "c30297522b302da94767b064a266556e", "score": "0.61117387", "text": "public function getSchema(): string;", "title": "" }, { "docid": "f5d45af1143b8d4e128fd205d1d46768", "score": "0.6086254", "text": "public function getSchema()\n {\n return $this->schema;\n }", "title": "" }, { "docid": "f5d45af1143b8d4e128fd205d1d46768", "score": "0.6086254", "text": "public function getSchema()\n {\n return $this->schema;\n }", "title": "" }, { "docid": "f5d45af1143b8d4e128fd205d1d46768", "score": "0.6086254", "text": "public function getSchema()\n {\n return $this->schema;\n }", "title": "" }, { "docid": "f5d45af1143b8d4e128fd205d1d46768", "score": "0.6086254", "text": "public function getSchema()\n {\n return $this->schema;\n }", "title": "" }, { "docid": "f5d45af1143b8d4e128fd205d1d46768", "score": "0.6086254", "text": "public function getSchema()\n {\n return $this->schema;\n }", "title": "" }, { "docid": "f5d45af1143b8d4e128fd205d1d46768", "score": "0.6086254", "text": "public function getSchema()\n {\n return $this->schema;\n }", "title": "" }, { "docid": "f5d45af1143b8d4e128fd205d1d46768", "score": "0.6086254", "text": "public function getSchema()\n {\n return $this->schema;\n }", "title": "" }, { "docid": "f5d45af1143b8d4e128fd205d1d46768", "score": "0.6086254", "text": "public function getSchema()\n {\n return $this->schema;\n }", "title": "" }, { "docid": "48c96dfe5afaf323e6cb218248d81e72", "score": "0.6082613", "text": "static function jsonSchema(string $uri): ?array {\n if (!preg_match(\n '!^https://dido.geoapi.fr/id/(referentiels|nomenclatures)/([^/]+)/json-schema$!',\n $uri,\n $matches\n )) {\n return null;\n }\n $id = $matches[2];\n $swagger = file_get_contents(__DIR__.'/import/swagger.json');\n $swagger = json_decode($swagger, true);\n $schema = $swagger['components']['schemas'][\"item_$id\"];\n $schema['type'] = 'object';\n return [\n '$schema'=> 'http://json-schema.org/draft-07/schema#',\n '$id'=> $uri,\n 'description'=> $schema['description'],\n 'type'=> 'object',\n 'properties'=> $schema['properties'],\n ];\n }", "title": "" }, { "docid": "b80199d94f269a2ed6d10d4b4d883df0", "score": "0.6037974", "text": "public function getSchema(): ISchema;", "title": "" }, { "docid": "a6fa8c4f3e6a2c9e8a4aee087895f742", "score": "0.6025056", "text": "public function getSchema(){\n\t\t\treturn $this->schema;\n\t\t}", "title": "" }, { "docid": "c2b605830e30e09218bd0ac0fc2a85a3", "score": "0.60240835", "text": "protected function schema_revision_fields() {\n $data = array();\n if (!empty($this->info['revision table'])) {\n $schema = drupal_get_schema($this->info['revision table']);\n $properties = entity_get_property_info($this->type) + array('properties' => array());\n\n foreach ($properties['properties'] as $name => $property_info) {\n if (isset($property_info['schema field']) && isset($schema['fields'][$property_info['schema field']])) {\n if ($views_info = $this->map_from_schema_info($name, $schema['fields'][$property_info['schema field']], $property_info)) {\n $data[$name] = $views_info;\n }\n }\n }\n }\n return $data;\n }", "title": "" }, { "docid": "fb0b5747f86a7dca46cad34c815c411b", "score": "0.60116076", "text": "public function get_item_schema() {\n\t\t\t$schema = array(\n\t\t\t\t'$schema' => 'http://json-schema.org/draft-04/schema#',\n\t\t\t\t'title' => 'course',\n\t\t\t\t'type' => 'object',\n\t\t\t\t'properties' => array(\n\t\t\t\t\t'id' => array(\n\t\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t\t'description' => __( 'A unique alphanumeric ID for the object.', 'wplms' ),\n\t\t\t\t\t\t'readonly' => true,\n\t\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t),\n\t\t\t\t\t'author' => array(\n\t\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t\t'description' => __( 'The ID for the creator of the object.', 'wplms' ),\n\t\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t),\n\t\t\t\t\t'link' => array(\n\t\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t\t'description' => __( 'The permalink to this object on the site.', 'wplms' ),\n\t\t\t\t\t\t'format' => 'url',\n\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t),\n\t\t\t\t\t'component' => array(\n\t\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t\t'description' => __( 'The vibe component the object relates to.', 'wplms' ),\n\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t'enum' => array_keys( bp_core_get_components() ),\n\t\t\t\t\t),\n\t\t\t\t\t'type' => array(\n\t\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t\t'description' => __( 'The activity type of the object.', 'wplms' ),\n\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t'enum' => (function_exists('bp_activity_get_types')?array_keys( bp_activity_get_types()):''),\n\t\t\t\t\t),\n\t\t\t\t\t'title' => array(\n\t\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t\t'description' => __( 'HTML title of the object.', 'wplms' ),\n\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t),\n\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t\t'description' => __( 'HTML content of the object.', 'wplms' ),\n\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t),\n\t\t\t\t\t'date' => array(\n\t\t\t\t\t\t'description' => __( \"The date the object was published, in the site's timezone.\", 'wplms' ),\n\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t'format' => 'date-time',\n\t\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t),\n\t\t\t\t\t'status' => array(\n\t\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t\t'description' => __( 'Whether the object has been marked as spam or not.', 'wplms' ),\n\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t'enum' => array( 'published', 'spam' ),\n\t\t\t\t\t),\n\t\t\t\t\t'parent' => array(\n\t\t\t\t\t\t'description' => __( 'The ID of the parent of the object.', 'wplms' ),\n\t\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\t\t\treturn $schema;\n\t\t}", "title": "" }, { "docid": "59c8b3eb90f4b0dc15906dfa5ebe4103", "score": "0.58679426", "text": "public function schema()\n {\n $schema = new Support\\DefaultSchema();\n\n return $schema->toGraphQLSchema();\n }", "title": "" }, { "docid": "400242dd8d77757457b138b628b0346c", "score": "0.5813958", "text": "public function get_item_schema(): array {\n\t\tif ( $this->schema ) {\n\t\t\t/**\n\t\t\t * Schema.\n\t\t\t *\n\t\t\t * @phpstan-var Schema $schema\n\t\t\t */\n\t\t\t$schema = $this->add_additional_fields_schema( $this->schema );\n\t\t\treturn $schema;\n\t\t}\n\n\t\t$schema = [\n\t\t\t'$schema' => 'http://json-schema.org/draft-04/schema#',\n\t\t\t// This must not be an actually existing post type like \"product\".\n\t\t\t// See https://github.com/GoogleForCreators/web-stories-wp/issues/12735.\n\t\t\t'title' => 'web-story-product',\n\t\t\t'type' => 'object',\n\t\t\t'properties' => [\n\t\t\t\t'productId' => [\n\t\t\t\t\t'description' => __( 'Product ID.', 'web-stories' ),\n\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t'context' => [ 'view', 'edit', 'embed' ],\n\t\t\t\t\t'readonly' => true,\n\t\t\t\t],\n\t\t\t\t'productUrl' => [\n\t\t\t\t\t'description' => __( 'Product URL.', 'web-stories' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'format' => 'uri',\n\t\t\t\t\t'context' => [ 'view', 'edit', 'embed' ],\n\t\t\t\t\t'readonly' => true,\n\t\t\t\t],\n\t\t\t\t'productTitle' => [\n\t\t\t\t\t'description' => __( 'Product title.', 'web-stories' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'context' => [ 'view', 'edit', 'embed' ],\n\t\t\t\t\t'readonly' => true,\n\t\t\t\t],\n\t\t\t\t'productBrand' => [\n\t\t\t\t\t'description' => __( 'Product brand.', 'web-stories' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'context' => [ 'view', 'edit', 'embed' ],\n\t\t\t\t\t'readonly' => true,\n\t\t\t\t],\n\t\t\t\t'productPrice' => [\n\t\t\t\t\t'description' => __( 'Product price.', 'web-stories' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'context' => [ 'view', 'edit', 'embed' ],\n\t\t\t\t\t'readonly' => true,\n\t\t\t\t],\n\t\t\t\t'productPriceCurrency' => [\n\t\t\t\t\t'description' => __( 'Product currency.', 'web-stories' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'context' => [ 'view', 'edit', 'embed' ],\n\t\t\t\t\t'readonly' => true,\n\t\t\t\t],\n\t\t\t\t'productImages' => [\n\t\t\t\t\t'description' => __( 'Product brand.', 'web-stories' ),\n\t\t\t\t\t'type' => 'array',\n\t\t\t\t\t'items' => [\n\t\t\t\t\t\t'type' => 'object',\n\t\t\t\t\t\t'properties' => [\n\t\t\t\t\t\t\t'url' => [\n\t\t\t\t\t\t\t\t'description' => __( 'Product image URL', 'web-stories' ),\n\t\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t\t'format' => 'uri',\n\t\t\t\t\t\t\t\t'context' => [ 'view', 'edit', 'embed' ],\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t'alt' => [\n\t\t\t\t\t\t\t\t'description' => __( 'Product image alt text', 'web-stories' ),\n\t\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t\t'context' => [ 'view', 'edit', 'embed' ],\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'context' => [ 'view', 'edit', 'embed' ],\n\t\t\t\t\t'readonly' => true,\n\t\t\t\t],\n\t\t\t\t'aggregateRating' => [\n\t\t\t\t\t'description' => __( 'Product rating.', 'web-stories' ),\n\t\t\t\t\t'type' => 'object',\n\t\t\t\t\t'properties' => [\n\t\t\t\t\t\t'ratingValue' => [\n\t\t\t\t\t\t\t'description' => __( 'Average rating.', 'web-stories' ),\n\t\t\t\t\t\t\t'type' => 'number',\n\t\t\t\t\t\t\t'context' => [ 'view', 'edit', 'embed' ],\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'reviewCount' => [\n\t\t\t\t\t\t\t'description' => __( 'Number of reviews.', 'web-stories' ),\n\t\t\t\t\t\t\t'type' => 'number',\n\t\t\t\t\t\t\t'context' => [ 'view', 'edit', 'embed' ],\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'reviewUrl' => [\n\t\t\t\t\t\t\t'description' => __( 'Product review URL.', 'web-stories' ),\n\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t'format' => 'uri',\n\t\t\t\t\t\t\t'context' => [ 'view', 'edit', 'embed' ],\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t\t'context' => [ 'view', 'edit', 'embed' ],\n\t\t\t\t\t'readonly' => true,\n\t\t\t\t],\n\t\t\t\t'productDetails' => [\n\t\t\t\t\t'description' => __( 'Product description.', 'web-stories' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'context' => [ 'view', 'edit', 'embed' ],\n\t\t\t\t\t'readonly' => true,\n\t\t\t\t],\n\t\t\t],\n\t\t];\n\n\t\t$this->schema = $schema;\n\n\t\t/**\n\t\t * Schema.\n\t\t *\n\t\t * @phpstan-var Schema $schema\n\t\t */\n\t\t$schema = $this->add_additional_fields_schema( $this->schema );\n\t\treturn $schema;\n\t}", "title": "" }, { "docid": "5403474508a3a57a99246a0c405e8c78", "score": "0.5811065", "text": "public function getSchema()\n {\n if ($this->schema === null) {\n $this->addSchemaTypeSection();\n }\n return $this->schema;\n }", "title": "" }, { "docid": "8d6a224a6b7ceea4e62246d9c36711ed", "score": "0.58026886", "text": "public function getSchemaVersion()\n {\n return '0.1.0';\n }", "title": "" }, { "docid": "147b417c750b6e6bae88bab59d7f041d", "score": "0.57970494", "text": "public function getSchema() {\n $useCache = $this->config['cache'];\n $language = $this->languageManager->getCurrentLanguage();\n if ($useCache && $schema = $this->schemaCache->get($language->getId())) {\n return $schema->data;\n }\n\n $schemaClass = $this->config['schema_class'];\n $query = $this->schemaProvider->getQuerySchema();\n $mutation = $this->schemaProvider->getMutationSchema();\n $types = $this->typeResolver->collectTypes();\n\n $schema = new $schemaClass($query, $mutation, $types);\n\n if ($useCache) {\n // Cache the generated schema in the configured cache backend.\n $tags = array_unique($this->schemaProvider->getCacheTags() ?: []);\n $this->schemaCache->set($language->getId(), $schema, Cache::PERMANENT, $tags);\n }\n\n return $schema;\n }", "title": "" }, { "docid": "ba275167c76d1411c85fdca90d48ce72", "score": "0.57955796", "text": "public function getSchema()\n {\n return isset($this->schema) ? $this->schema : null;\n }", "title": "" }, { "docid": "3b75681357ef085bdfc72a71fd9ba1cc", "score": "0.577178", "text": "public function get_field_schema() {}", "title": "" }, { "docid": "2fd713ba1ee70fbdcc956176447cd518", "score": "0.5754506", "text": "public function getVisitorsSchema() {\n\n \t\t//parse inputs\n \t\t$resourcePath = \"/visitors/visitorSchema\";\n \t\t$resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n \t\t$method = \"GET\";\n $queryParams = array();\n $headerParams = array();\n $headerParams['Accept'] = 'application/json';\n $headerParams['Content-Type'] = 'application/json';\n\n //make the API Call\n if (! isset($body)) {\n $body = null;\n }\n \t\t$response = $this->apiClient->callAPI($resourcePath, $method,\n \t\t $queryParams, $body,\n \t\t $headerParams);\n\n\n if(! $response){\n return null;\n }\n\n \t\t$responseObject = $this->apiClient->deserialize($response,\n \t\t 'object');\n \t\treturn $responseObject;\n\n }", "title": "" }, { "docid": "e3fdcea2a9d73ba327333bda4cdbf363", "score": "0.57482475", "text": "public function get_item_schema() {\n\t\tif ( $this->schema ) {\n\t\t\treturn $this->add_additional_fields_schema( $this->schema );\n\t\t}\n\n\t\t$this->schema = array(\n\t\t\t'$schema' => 'http://json-schema.org/draft-04/schema#',\n\t\t\t'title' => 'plugin',\n\t\t\t'type' => 'object',\n\t\t\t'properties' => array(\n\t\t\t\t'plugin' => array(\n\t\t\t\t\t'description' => __( 'The plugin file.' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'pattern' => self::PATTERN,\n\t\t\t\t\t'readonly' => true,\n\t\t\t\t\t'context' => array( 'view', 'edit', 'embed' ),\n\t\t\t\t),\n\t\t\t\t'status' => array(\n\t\t\t\t\t'description' => __( 'The plugin activation status.' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'enum' => is_multisite() ? array( 'inactive', 'active', 'network-active' ) : array( 'inactive', 'active' ),\n\t\t\t\t\t'context' => array( 'view', 'edit', 'embed' ),\n\t\t\t\t),\n\t\t\t\t'name' => array(\n\t\t\t\t\t'description' => __( 'The plugin name.' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'readonly' => true,\n\t\t\t\t\t'context' => array( 'view', 'edit', 'embed' ),\n\t\t\t\t),\n\t\t\t\t'plugin_uri' => array(\n\t\t\t\t\t'description' => __( 'The plugin\\'s website address.' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'format' => 'uri',\n\t\t\t\t\t'readonly' => true,\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t),\n\t\t\t\t'author' => array(\n\t\t\t\t\t'description' => __( 'The plugin author.' ),\n\t\t\t\t\t'type' => 'object',\n\t\t\t\t\t'readonly' => true,\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t),\n\t\t\t\t'author_uri' => array(\n\t\t\t\t\t'description' => __( 'Plugin author\\'s website address.' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'format' => 'uri',\n\t\t\t\t\t'readonly' => true,\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t),\n\t\t\t\t'description' => array(\n\t\t\t\t\t'description' => __( 'The plugin description.' ),\n\t\t\t\t\t'type' => 'object',\n\t\t\t\t\t'readonly' => true,\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t'properties' => array(\n\t\t\t\t\t\t'raw' => array(\n\t\t\t\t\t\t\t'description' => __( 'The raw plugin description.' ),\n\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'rendered' => array(\n\t\t\t\t\t\t\t'description' => __( 'The plugin description formatted for display.' ),\n\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'version' => array(\n\t\t\t\t\t'description' => __( 'The plugin version number.' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'readonly' => true,\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t),\n\t\t\t\t'network_only' => array(\n\t\t\t\t\t'description' => __( 'Whether the plugin can only be activated network-wide.' ),\n\t\t\t\t\t'type' => 'boolean',\n\t\t\t\t\t'readonly' => true,\n\t\t\t\t\t'context' => array( 'view', 'edit', 'embed' ),\n\t\t\t\t),\n\t\t\t\t'requires_wp' => array(\n\t\t\t\t\t'description' => __( 'Minimum required version of WordPress.' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'readonly' => true,\n\t\t\t\t\t'context' => array( 'view', 'edit', 'embed' ),\n\t\t\t\t),\n\t\t\t\t'requires_php' => array(\n\t\t\t\t\t'description' => __( 'Minimum required version of PHP.' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'readonly' => true,\n\t\t\t\t\t'context' => array( 'view', 'edit', 'embed' ),\n\t\t\t\t),\n\t\t\t\t'textdomain' => array(\n\t\t\t\t\t'description' => __( 'The plugin\\'s text domain.' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'readonly' => true,\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\n\t\treturn $this->add_additional_fields_schema( $this->schema );\n\t}", "title": "" }, { "docid": "fd50d3040d5657cd5ad6fdd398758e32", "score": "0.5738446", "text": "protected function fetchSchemaDefinition($path) {\n\t\t$def = NULL;\n\t\tif (in_array($path, self::$types)) {\n\t\t\t$def = new \\stdClass();\n\t\t\t$def->type = $path;\n\t\t\treturn $def;\n\t\t}\n\n\t\t$JSON = $this->schemaLoader->loadSchema($path);\n\t\t$schemaDefinition = json_decode($JSON);\n\t\treturn $schemaDefinition;\n\t}", "title": "" }, { "docid": "ef37f636ef870071a61be0e2a6b149d6", "score": "0.5732697", "text": "public function getSchema()\n {\n if (null === $this->schema) {\n $this->schema = static::getDefaultSchema();\n }\n\n return $this->schema;\n }", "title": "" }, { "docid": "5d53469df4ab9a3b64f46f5ef361e6bf", "score": "0.5726012", "text": "public function get_item_schema() {\n\t\t$schema = array(\n\t\t\t'$schema' => 'http://json-schema.org/draft-04/schema#',\n\t\t\t'title' => 'customer_download',\n\t\t\t'type' => 'object',\n\t\t\t'properties' => array(\n\t\t\t\t'download_id' => array(\n\t\t\t\t\t'description' => __( 'Download ID.', 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'context' => array( 'view' ),\n\t\t\t\t\t'readonly' => true,\n\t\t\t\t),\n\t\t\t\t'download_url' => array(\n\t\t\t\t\t'description' => __( 'Download file URL.', 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'context' => array( 'view' ),\n\t\t\t\t\t'readonly' => true,\n\t\t\t\t),\n\t\t\t\t'product_id' => array(\n\t\t\t\t\t'description' => __( 'Downloadable product ID.', 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t'context' => array( 'view' ),\n\t\t\t\t\t'readonly' => true,\n\t\t\t\t),\n\t\t\t\t'product_name' => array(\n\t\t\t\t\t'description' => __( 'Product name.', 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'context' => array( 'view' ),\n\t\t\t\t\t'readonly' => true,\n\t\t\t\t),\n\t\t\t\t'download_name' => array(\n\t\t\t\t\t'description' => __( 'Downloadable file name.', 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'context' => array( 'view' ),\n\t\t\t\t\t'readonly' => true,\n\t\t\t\t),\n\t\t\t\t'order_id' => array(\n\t\t\t\t\t'description' => __( 'Order ID.', 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t'context' => array( 'view' ),\n\t\t\t\t\t'readonly' => true,\n\t\t\t\t),\n\t\t\t\t'order_key' => array(\n\t\t\t\t\t'description' => __( 'Order key.', 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'context' => array( 'view' ),\n\t\t\t\t\t'readonly' => true,\n\t\t\t\t),\n\t\t\t\t'downloads_remaining' => array(\n\t\t\t\t\t'description' => __( 'Number of downloads remaining.', 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'context' => array( 'view' ),\n\t\t\t\t\t'readonly' => true,\n\t\t\t\t),\n\t\t\t\t'access_expires' => array(\n\t\t\t\t\t'description' => __( \"The date when download access expires, in the site's timezone.\", 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'context' => array( 'view' ),\n\t\t\t\t\t'readonly' => true,\n\t\t\t\t),\n\t\t\t\t'access_expires_gmt' => array(\n\t\t\t\t\t'description' => __( 'The date when download access expires, as GMT.', 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'context' => array( 'view' ),\n\t\t\t\t\t'readonly' => true,\n\t\t\t\t),\n\t\t\t\t'file' => array(\n\t\t\t\t\t'description' => __( 'File details.', 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'object',\n\t\t\t\t\t'context' => array( 'view' ),\n\t\t\t\t\t'readonly' => true,\n\t\t\t\t\t'properties' => array(\n\t\t\t\t\t\t'name' => array(\n\t\t\t\t\t\t\t'description' => __( 'File name.', 'woocommerce-rest-api' ),\n\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t'context' => array( 'view' ),\n\t\t\t\t\t\t\t'readonly' => true,\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'file' => array(\n\t\t\t\t\t\t\t'description' => __( 'File URL.', 'woocommerce-rest-api' ),\n\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t'context' => array( 'view' ),\n\t\t\t\t\t\t\t'readonly' => true,\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\n\t\treturn $this->add_additional_fields_schema( $schema );\n\t}", "title": "" }, { "docid": "342c1b09c0d30f8b40234b33d60ecb53", "score": "0.5720253", "text": "public function get_creation_schema();", "title": "" }, { "docid": "f6233dd01a5295fb77c631e7dc0714df", "score": "0.5668197", "text": "public function getSchemaVersion()\n {\n return '1.1.0';\n }", "title": "" }, { "docid": "c2d156eefeaf41eb271a727dce7322ed", "score": "0.56318647", "text": "public function getRouteSchema(): array\n\t{\n\t\treturn [\n\t\t\t// This tells the spec of JSON Schema we are using which is draft 4.\n\t\t\t'$schema' => 'https://json-schema.org/draft-04/schema#',\n\t\t\t// The title property marks the identity of the resource.\n\t\t\t'title' => 'solo-order',\n\t\t\t'type' => 'object',\n\t\t\t// In JSON Schema you can specify object properties in the properties attribute.\n\t\t\t'properties' => [\n\t\t\t\t'id' => [\n\t\t\t\t\t'description' => 'Unique identifier for the solo order object.',\n\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t'readonly' => true,\n\t\t\t\t\t'context' => ['view'],\n\t\t\t\t],\n\t\t\t\t'order_id' => [\n\t\t\t\t\t'description' => 'The id of the WooCommerce order object.',\n\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t'context' => ['view'],\n\t\t\t\t],\n\t\t\t\t'solo_id' => [\n\t\t\t\t\t'description' => 'The id of the Solo order object.',\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'context' => ['view'],\n\t\t\t\t],\n\t\t\t\t'customer_email' => [\n\t\t\t\t\t'description' => 'The email of the customer who made the order.',\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'context' => ['view'],\n\t\t\t\t],\n\t\t\t\t'is_sent_to_api' => [\n\t\t\t\t\t'description' => 'Flag that notifies if the order was sent to API.',\n\t\t\t\t\t'type' => 'boolean',\n\t\t\t\t\t'context' => ['view'],\n\t\t\t\t],\n\t\t\t\t'is_sent_to_user' => [\n\t\t\t\t\t'description' => esc_html__(\n\t\t\t\t\t\t'Flag that notifies if the PDF bill was sent to customer.',\n\t\t\t\t\t\t'woo-solo-api'\n\t\t\t\t\t),\n\t\t\t\t\t'type' => 'boolean',\n\t\t\t\t\t'context' => ['view'],\n\t\t\t\t],\n\t\t\t\t'pdf_url' => [\n\t\t\t\t\t'description' => esc_html__(\n\t\t\t\t\t\t'URL of the sent PDF. Used to resend the PDF in case there was some failure with the request.',\n\t\t\t\t\t\t'woo-solo-api'\n\t\t\t\t\t),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'context' => ['view'],\n\t\t\t\t],\n\t\t\t\t'error_message' => [\n\t\t\t\t\t'description' => 'Error message send by the Solo API.',\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'context' => ['view'],\n\t\t\t\t],\n\t\t\t\t'created_at' => [\n\t\t\t\t\t'description' => 'The date and time of the solo order creation.',\n\t\t\t\t\t'type' => 'date-time',\n\t\t\t\t\t'context' => ['view'],\n\t\t\t\t],\n\t\t\t\t'updated_at' => [\n\t\t\t\t\t'description' => 'The date and time when the order was last updated.',\n\t\t\t\t\t'type' => 'date-time',\n\t\t\t\t\t'context' => ['view'],\n\t\t\t\t],\n\t\t\t],\n\t\t];\n\t}", "title": "" }, { "docid": "90c70f5208bf8d6066dca80a968c24eb", "score": "0.56073827", "text": "public function buildSchema(): Schema\n {\n $documentAST = $this->documentAST();\n\n return (new SchemaBuilder())->build($documentAST);\n }", "title": "" }, { "docid": "aa45e6df2fbb78056cbbc48b2d8a4af2", "score": "0.55982804", "text": "public function getSchemaVersion()\n {\n return '0.0.0';\n }", "title": "" }, { "docid": "d10ae324a7c157ba2d6afc89a17d6adc", "score": "0.5582617", "text": "public function json()\n {\n return $this->schemaObject->toString();\n }", "title": "" }, { "docid": "f3ec66a125a57a6a61333bec322739af", "score": "0.55718917", "text": "public function get_field_schema()\n {\n }", "title": "" }, { "docid": "2177ec560a212599f26fe98b81c50d74", "score": "0.5562124", "text": "public function get_item_schema() {\n\t\t$weight_unit = get_option( 'woocommerce_weight_unit' );\n\t\t$dimension_unit = get_option( 'woocommerce_dimension_unit' );\n\t\t$schema = array(\n\t\t\t'$schema' => 'http://json-schema.org/draft-04/schema#',\n\t\t\t'title' => 'product_variation',\n\t\t\t'type' => 'object',\n\t\t\t'properties' => array(\n\t\t\t\t'id' => array(\n\t\t\t\t\t'description' => __( 'Unique identifier for the resource.', 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t'readonly' => true,\n\t\t\t\t),\n\t\t\t\t'name' => array(\n\t\t\t\t\t'description' => __( 'Product parent name.', 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t),\n\t\t\t\t'type' => array(\n\t\t\t\t\t'description' => __( 'Product type.', 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'default' => 'variation',\n\t\t\t\t\t'enum' => array( 'variation' ),\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t),\n\t\t\t\t'parent_id' => array(\n\t\t\t\t\t'description' => __( 'Product parent ID.', 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t),\n\t\t\t\t'date_created' => array(\n\t\t\t\t\t'description' => __( \"The date the variation was created, in the site's timezone.\", 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'date-time',\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t'readonly' => true,\n\t\t\t\t),\n\t\t\t\t'date_modified' => array(\n\t\t\t\t\t'description' => __( \"The date the variation was last modified, in the site's timezone.\", 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'date-time',\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t'readonly' => true,\n\t\t\t\t),\n\t\t\t\t'description' => array(\n\t\t\t\t\t'description' => __( 'Variation description.', 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t'arg_options' => array(\n\t\t\t\t\t\t'sanitize_callback' => 'wp_filter_post_kses',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'permalink' => array(\n\t\t\t\t\t'description' => __( 'Variation URL.', 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'format' => 'uri',\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t'readonly' => true,\n\t\t\t\t),\n\t\t\t\t'sku' => array(\n\t\t\t\t\t'description' => __( 'Unique identifier.', 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t'arg_options' => array(\n\t\t\t\t\t\t'sanitize_callback' => 'wc_clean',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'price' => array(\n\t\t\t\t\t'description' => __( 'Current variation price.', 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'number',\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t'readonly' => true,\n\t\t\t\t),\n\t\t\t\t'regular_price' => array(\n\t\t\t\t\t'description' => __( 'Variation regular price.', 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'number',\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t),\n\t\t\t\t'sale_price' => array(\n\t\t\t\t\t'description' => __( 'Variation sale price.', 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'number',\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t),\n\t\t\t\t'date_on_sale_from' => array(\n\t\t\t\t\t'description' => __( \"Start date of sale price, in the site's timezone.\", 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'date-time',\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t),\n\t\t\t\t'date_on_sale_from_gmt' => array(\n\t\t\t\t\t'description' => __( 'Start date of sale price, as GMT.', 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'date-time',\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t),\n\t\t\t\t'date_on_sale_to' => array(\n\t\t\t\t\t'description' => __( \"End date of sale price, in the site's timezone.\", 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'date-time',\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t),\n\t\t\t\t'date_on_sale_to_gmt' => array(\n\t\t\t\t\t'description' => __( \"End date of sale price, in the site's timezone.\", 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'date-time',\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t),\n\t\t\t\t'on_sale' => array(\n\t\t\t\t\t'description' => __( 'Shows if the variation is on sale.', 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'boolean',\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t'readonly' => true,\n\t\t\t\t),\n\t\t\t\t'status' => array(\n\t\t\t\t\t'description' => __( 'Variation status.', 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'default' => 'publish',\n\t\t\t\t\t'enum' => array_keys( get_post_statuses() ),\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t),\n\t\t\t\t'purchasable' => array(\n\t\t\t\t\t'description' => __( 'Shows if the variation can be bought.', 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'boolean',\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t'readonly' => true,\n\t\t\t\t),\n\t\t\t\t'virtual' => array(\n\t\t\t\t\t'description' => __( 'If the variation is virtual.', 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'boolean',\n\t\t\t\t\t'default' => false,\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t),\n\t\t\t\t'downloadable' => array(\n\t\t\t\t\t'description' => __( 'If the variation is downloadable.', 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'boolean',\n\t\t\t\t\t'default' => false,\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t),\n\t\t\t\t'downloads' => array(\n\t\t\t\t\t'description' => __( 'List of downloadable files.', 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'array',\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t'items' => array(\n\t\t\t\t\t\t'type' => 'object',\n\t\t\t\t\t\t'properties' => array(\n\t\t\t\t\t\t\t'id' => array(\n\t\t\t\t\t\t\t\t'description' => __( 'File ID.', 'woocommerce-rest-api' ),\n\t\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'name' => array(\n\t\t\t\t\t\t\t\t'description' => __( 'File name.', 'woocommerce-rest-api' ),\n\t\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'file' => array(\n\t\t\t\t\t\t\t\t'description' => __( 'File URL.', 'woocommerce-rest-api' ),\n\t\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t\t'context' => array( 'view', 'edit' ),\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),\n\t\t\t\t'download_limit' => array(\n\t\t\t\t\t'description' => __( 'Number of times downloadable files can be downloaded after purchase.', 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t'default' => -1,\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t),\n\t\t\t\t'download_expiry' => array(\n\t\t\t\t\t'description' => __( 'Number of days until access to downloadable files expires.', 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t'default' => -1,\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t),\n\t\t\t\t'tax_status' => array(\n\t\t\t\t\t'description' => __( 'Tax status.', 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'default' => 'taxable',\n\t\t\t\t\t'enum' => array( 'taxable', 'shipping', 'none' ),\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t),\n\t\t\t\t'tax_class' => array(\n\t\t\t\t\t'description' => __( 'Tax class.', 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t),\n\t\t\t\t'manage_stock' => array(\n\t\t\t\t\t'description' => __( 'Stock management at variation level.', 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'boolean',\n\t\t\t\t\t'default' => false,\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t),\n\t\t\t\t'stock_quantity' => array(\n\t\t\t\t\t'description' => __( 'Stock quantity.', 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t),\n\t\t\t\t'stock_status' => array(\n\t\t\t\t\t'description' => __( 'Controls the stock status of the product.', 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'default' => 'instock',\n\t\t\t\t\t'enum' => array_keys( wc_get_product_stock_status_options() ),\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t),\n\t\t\t\t'backorders' => array(\n\t\t\t\t\t'description' => __( 'If managing stock, this controls if backorders are allowed.', 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'default' => 'no',\n\t\t\t\t\t'enum' => array( 'no', 'notify', 'yes' ),\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t),\n\t\t\t\t'backorders_allowed' => array(\n\t\t\t\t\t'description' => __( 'Shows if backorders are allowed.', 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'boolean',\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t'readonly' => true,\n\t\t\t\t),\n\t\t\t\t'backordered' => array(\n\t\t\t\t\t'description' => __( 'Shows if the variation is on backordered.', 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'boolean',\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t'readonly' => true,\n\t\t\t\t),\n\t\t\t\t'weight' => array(\n\t\t\t\t\t/* translators: %s: weight unit */\n\t\t\t\t\t'description' => sprintf( __( 'Variation weight (%s).', 'woocommerce-rest-api' ), $weight_unit ),\n\t\t\t\t\t'type' => 'number',\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t),\n\t\t\t\t'dimensions' => array(\n\t\t\t\t\t'description' => __( 'Variation dimensions.', 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'object',\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t'properties' => array(\n\t\t\t\t\t\t'length' => array(\n\t\t\t\t\t\t\t/* translators: %s: dimension unit */\n\t\t\t\t\t\t\t'description' => sprintf( __( 'Variation length (%s).', 'woocommerce-rest-api' ), $dimension_unit ),\n\t\t\t\t\t\t\t'type' => 'number',\n\t\t\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'width' => array(\n\t\t\t\t\t\t\t/* translators: %s: dimension unit */\n\t\t\t\t\t\t\t'description' => sprintf( __( 'Variation width (%s).', 'woocommerce-rest-api' ), $dimension_unit ),\n\t\t\t\t\t\t\t'type' => 'number',\n\t\t\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'height' => array(\n\t\t\t\t\t\t\t/* translators: %s: dimension unit */\n\t\t\t\t\t\t\t'description' => sprintf( __( 'Variation height (%s).', 'woocommerce-rest-api' ), $dimension_unit ),\n\t\t\t\t\t\t\t'type' => 'number',\n\t\t\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'shipping_class' => array(\n\t\t\t\t\t'description' => __( 'Shipping class slug.', 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t),\n\t\t\t\t'shipping_class_id' => array(\n\t\t\t\t\t'description' => __( 'Shipping class ID.', 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t'readonly' => true,\n\t\t\t\t),\n\t\t\t\t'image' => array(\n\t\t\t\t\t'description' => __( 'Variation image data.', 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'object',\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t'properties' => array(\n\t\t\t\t\t\t'id' => array(\n\t\t\t\t\t\t\t'description' => __( 'Image ID.', 'woocommerce-rest-api' ),\n\t\t\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'date_created' => array(\n\t\t\t\t\t\t\t'description' => __( \"The date the image was created, in the site's timezone.\", 'woocommerce-rest-api' ),\n\t\t\t\t\t\t\t'type' => 'date-time',\n\t\t\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t\t\t'readonly' => true,\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'date_created_gmt' => array(\n\t\t\t\t\t\t\t'description' => __( 'The date the image was created, as GMT.', 'woocommerce-rest-api' ),\n\t\t\t\t\t\t\t'type' => 'date-time',\n\t\t\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t\t\t'readonly' => true,\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'date_modified' => array(\n\t\t\t\t\t\t\t'description' => __( \"The date the image was last modified, in the site's timezone.\", 'woocommerce-rest-api' ),\n\t\t\t\t\t\t\t'type' => 'date-time',\n\t\t\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t\t\t'readonly' => true,\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'date_modified_gmt' => array(\n\t\t\t\t\t\t\t'description' => __( 'The date the image was last modified, as GMT.', 'woocommerce-rest-api' ),\n\t\t\t\t\t\t\t'type' => 'date-time',\n\t\t\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t\t\t'readonly' => true,\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'src' => array(\n\t\t\t\t\t\t\t'description' => __( 'Image URL.', 'woocommerce-rest-api' ),\n\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t'format' => 'uri',\n\t\t\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'name' => array(\n\t\t\t\t\t\t\t'description' => __( 'Image name.', 'woocommerce-rest-api' ),\n\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'alt' => array(\n\t\t\t\t\t\t\t'description' => __( 'Image alternative text.', 'woocommerce-rest-api' ),\n\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'attributes' => array(\n\t\t\t\t\t'description' => __( 'List of attributes.', 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'array',\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t'items' => array(\n\t\t\t\t\t\t'type' => 'object',\n\t\t\t\t\t\t'properties' => array(\n\t\t\t\t\t\t\t'id' => array(\n\t\t\t\t\t\t\t\t'description' => __( 'Attribute ID.', 'woocommerce-rest-api' ),\n\t\t\t\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'name' => array(\n\t\t\t\t\t\t\t\t'description' => __( 'Attribute name.', 'woocommerce-rest-api' ),\n\t\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'option' => array(\n\t\t\t\t\t\t\t\t'description' => __( 'Selected attribute term name.', 'woocommerce-rest-api' ),\n\t\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t\t'context' => array( 'view', 'edit' ),\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),\n\t\t\t\t'menu_order' => array(\n\t\t\t\t\t'description' => __( 'Menu order, used to custom sort products.', 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t),\n\t\t\t\t'meta_data' => array(\n\t\t\t\t\t'description' => __( 'Meta data.', 'woocommerce-rest-api' ),\n\t\t\t\t\t'type' => 'array',\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t'items' => array(\n\t\t\t\t\t\t'type' => 'object',\n\t\t\t\t\t\t'properties' => array(\n\t\t\t\t\t\t\t'id' => array(\n\t\t\t\t\t\t\t\t'description' => __( 'Meta ID.', 'woocommerce-rest-api' ),\n\t\t\t\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t\t\t\t'readonly' => true,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'key' => array(\n\t\t\t\t\t\t\t\t'description' => __( 'Meta key.', 'woocommerce-rest-api' ),\n\t\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'value' => array(\n\t\t\t\t\t\t\t\t'description' => __( 'Meta value.', 'woocommerce-rest-api' ),\n\t\t\t\t\t\t\t\t'type' => 'mixed',\n\t\t\t\t\t\t\t\t'context' => array( 'view', 'edit' ),\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),\n\t\t\t),\n\t\t);\n\t\treturn $this->add_additional_fields_schema( $schema );\n\t}", "title": "" }, { "docid": "9df5eaefa26f997470ab21bb8c1e7ca6", "score": "0.55164236", "text": "protected function _schema(): Schema\n {\n $this->_verifyRelatable();\n\n // Load the Schemas service\n $schemas = service('schemas');\n\n if (empty($schemas)) {\n throw new RuntimeException(lang('Relations.noSchemas'));\n }\n\n // Check for a schema using the defaults\n $schema = $schemas->get();\n\n if (null === $schema) {\n // Try reading an archived schema\n $schema = $schemas->read()->get();\n\n if (null === $schema) {\n // Give up\n throw new RuntimeException(lang('Relations.noSchemas'));\n }\n }\n\n return $schema;\n }", "title": "" }, { "docid": "ba76f5f73acc0619228f4ac3d25fb302", "score": "0.5515006", "text": "public function getResourceSchema()\n {\n return $this->resource_schema;\n }", "title": "" }, { "docid": "991d5e7a1bce2744c3586a5b17e32afc", "score": "0.5458201", "text": "public function get_check_schema()\n{\n // check PHP version\n if (PHP_VERSION_ID < 50400)\n throw new RESTException('Minium required PHP version is 5.4, found ' . PHP_VERSION, 500);\n\n // check database layout\n $db = new DataStore();\n $res = $db->checkSchema();\n $res['protocolVersion'] = 2;\n\n header('Content-Type: text/json');\n echo(json_encode($res));\n}", "title": "" }, { "docid": "bfe552e91f183df9139d9c79b856e92f", "score": "0.5455976", "text": "public function get_item_schema(): array {\n\t\tif ( $this->schema ) {\n\t\t\treturn $this->add_additional_fields_schema( $this->schema );\n\t\t}\n\n\t\t$schema = [\n\t\t\t'$schema' => 'http://json-schema.org/draft-04/schema#',\n\t\t\t'title' => 'lock',\n\t\t\t'type' => 'object',\n\t\t\t'properties' => [\n\t\t\t\t'time' => [\n\t\t\t\t\t'description' => __( 'Unix time of lock', 'web-stories' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'context' => [ 'view', 'edit', 'embed' ],\n\t\t\t\t],\n\t\t\t\t'nonce' => [\n\t\t\t\t\t'description' => __( 'Nonce value', 'web-stories' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'context' => [ 'view', 'edit' ],\n\t\t\t\t],\n\t\t\t\t'locked' => [\n\t\t\t\t\t'description' => __( 'If the current object is locked or not.', 'web-stories' ),\n\t\t\t\t\t'type' => 'boolean',\n\t\t\t\t\t'context' => [ 'view', 'edit', 'embed' ],\n\t\t\t\t],\n\t\t\t\t'user' => [\n\t\t\t\t\t'description' => __( 'User', 'web-stories' ),\n\t\t\t\t\t'type' => 'object',\n\t\t\t\t\t'properties' => [\n\t\t\t\t\t\t'id' => [\n\t\t\t\t\t\t\t'description' => __( 'The ID for the author of the lock.', 'web-stories' ),\n\t\t\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t\t\t'readonly' => true,\n\t\t\t\t\t\t\t'context' => [ 'view', 'edit', 'embed' ],\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'name' => [\n\t\t\t\t\t\t\t'description' => __( 'Display name for the user.', 'web-stories' ),\n\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t'readonly' => true,\n\t\t\t\t\t\t\t'context' => [ 'embed', 'view', 'edit' ],\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t],\n\t\t];\n\n\t\tif ( get_option( 'show_avatars' ) ) {\n\t\t\t$avatar_properties = [];\n\n\t\t\t$avatar_sizes = rest_get_avatar_sizes();\n\n\t\t\tforeach ( $avatar_sizes as $size ) {\n\t\t\t\t$avatar_properties[ $size ] = [\n\t\t\t\t\t/* translators: %d: Avatar image size in pixels. */\n\t\t\t\t\t'description' => sprintf( __( 'Avatar URL with image size of %d pixels.', 'web-stories' ), $size ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'format' => 'uri',\n\t\t\t\t\t'context' => [ 'embed', 'view', 'edit' ],\n\t\t\t\t];\n\t\t\t}\n\n\t\t\t$schema['properties']['user']['properties']['avatar'] = [\n\t\t\t\t'description' => __( 'Avatar URLs for the user.', 'web-stories' ),\n\t\t\t\t'type' => 'object',\n\t\t\t\t'context' => [ 'embed', 'view', 'edit' ],\n\t\t\t\t'readonly' => true,\n\t\t\t\t'properties' => $avatar_properties,\n\t\t\t];\n\t\t}\n\n\t\t$this->schema = $schema;\n\n\t\treturn $this->add_additional_fields_schema( $this->schema );\n\t}", "title": "" }, { "docid": "16324086720e115951637fd44d71e3f5", "score": "0.5452871", "text": "public function get_item_schema() {\n\n\t\t$schema = parent::get_item_schema();\n\n\t\t$meta = utils\\get_registered_movie_meta();\n\n\t\t// Some meta should not be visible, although they may be editable.\n\t\t$protected = wp_filter_object_list( $meta, array( 'protected' => true ) );\n\t\tforeach ( $protected as $key => $value ) {\n\t\t\tif ( isset( $schema['properties'][ $key ] ) ) {\n\t\t\t\tunset( $schema['properties'][ $key ] );\n\t\t\t}\n\t\t}\n\n\t\t$schema['properties']['year'] = array(\n\t\t\t'type' => 'integer',\n\t\t\t'description' => __( 'The Movie release year.', 'wpmovielibrary' ),\n\t\t\t'context' => array( 'view' ),\n\t\t\t'readonly' => true,\n\t\t);\n\n\t\t$schema['properties']['poster'] = array(\n\t\t\t'type' => 'object',\n\t\t\t'description' => __( 'The Movie Poster object.', 'wpmovielibrary' ),\n\t\t\t'context' => array( 'view' ),\n\t\t\t'readonly' => true,\n\t\t);\n\n\t\t$schema['properties']['posters'] = array(\n\t\t\t'type' => 'array',\n\t\t\t'description' => __( 'The Movie Posters collection.', 'wpmovielibrary' ),\n\t\t\t'context' => array( 'view' ),\n\t\t\t'readonly' => true,\n\t\t);\n\n\t\t$schema['properties']['backdrop'] = array(\n\t\t\t'type' => 'object',\n\t\t\t'description' => __( 'The Movie Backdrop object.', 'wpmovielibrary' ),\n\t\t\t'context' => array( 'view' ),\n\t\t\t'readonly' => true,\n\t\t);\n\n\t\t$schema['properties']['backdrops'] = array(\n\t\t\t'type' => 'array',\n\t\t\t'description' => __( 'The Movie Backdrops collection.', 'wpmovielibrary' ),\n\t\t\t'context' => array( 'view' ),\n\t\t\t'readonly' => true,\n\t\t);\n\n\t\t$schema['properties']['permalink'] = array(\n\t\t\t'type' => 'string',\n\t\t\t'format' => 'uri',\n\t\t\t'description' => __( 'The Movie permalink.', 'wpmovielibrary' ),\n\t\t\t'context' => array( 'view' ),\n\t\t\t'readonly' => true,\n\t\t);\n\n\t\treturn $schema;\n\t}", "title": "" }, { "docid": "f0ce7c9ce9141e9fa9f6c0433a17c356", "score": "0.54479545", "text": "public function &getSchema()\n {\n return $this->schema;\n }", "title": "" }, { "docid": "c020f84f17394aa919daa906335a9489", "score": "0.5441442", "text": "public function getSchema($computerid )\n {\n\n return FileSystem::readJson( Settings::getSetting('syscrack_schema_filepath') . $computerid . '.json' );\n }", "title": "" }, { "docid": "99f93a9ec5370b862535dbb7b589f855", "score": "0.5425922", "text": "public function getRevision();", "title": "" }, { "docid": "99f93a9ec5370b862535dbb7b589f855", "score": "0.5425922", "text": "public function getRevision();", "title": "" }, { "docid": "99f93a9ec5370b862535dbb7b589f855", "score": "0.5425922", "text": "public function getRevision();", "title": "" }, { "docid": "3c06d91fc31a0662469c7db16f672fe5", "score": "0.5408994", "text": "public static function getUpdateSchema()\n {\n CacheCommand::clearDoctrine();\n\n $tool = new \\Doctrine\\ORM\\Tools\\SchemaTool(Kernel::getService('em'));\n $meta = Kernel::getService('em')->getMetadataFactory()->getAllMetadata();\n\n return $tool->getUpdateSchemaSql($meta, true);\n }", "title": "" }, { "docid": "2bdec2d499614252dbc3f3781060d2ae", "score": "0.5389255", "text": "public function schema(): string\n {\n return $this->_config['schema'];\n }", "title": "" }, { "docid": "e8b0b17aa822dc6a0d81c9d5b1453a42", "score": "0.5382649", "text": "protected function schema()\n {\n return $this->connection()->getSchemaBuilder();\n }", "title": "" }, { "docid": "e8b0b17aa822dc6a0d81c9d5b1453a42", "score": "0.5382649", "text": "protected function schema()\n {\n return $this->connection()->getSchemaBuilder();\n }", "title": "" }, { "docid": "6148069c9182de6646c17a5f2f4116ff", "score": "0.53790843", "text": "public function getSchema()\n\t{\n\t\tif(empty($this->schema))\n\t\t{\n\t\t\t$result = Core::getQuery()->showFields($this->getName());\n\t\t\tforeach($result->fetchAll() as $field)\n\t\t\t{\n\t\t\t\t$this->schema[] = $field;\n\t\t\t}\n\t\t}\n\t\treturn $this->schema;\n\t}", "title": "" }, { "docid": "1ff35ace68de1a653d29daf622af4288", "score": "0.5378662", "text": "public function get_item_schema(): array {\n\t\tif ( $this->schema ) {\n\t\t\treturn $this->add_additional_fields_schema( $this->schema );\n\t\t}\n\n\t\t$schema = parent::get_item_schema();\n\n\t\tunset(\n\t\t\t$schema['properties']['permalink_template'],\n\t\t\t$schema['properties']['generated_slug'],\n\t\t\t$schema['properties']['description']\n\t\t);\n\n\t\t$schema['properties']['original_id'] = [\n\t\t\t'description' => __( 'Unique identifier for original attachment id.', 'web-stories' ),\n\t\t\t'type' => 'integer',\n\t\t\t'context' => [ 'view', 'edit', 'embed' ],\n\t\t];\n\n\t\t$this->schema = $schema;\n\n\t\treturn $this->add_additional_fields_schema( $this->schema );\n\t}", "title": "" }, { "docid": "cf4f7d9a3dc835c6309aa8c391beb48f", "score": "0.5363986", "text": "function schema($_schema)\n {\n $stitcher = new SchemaStitcher($_schema);\n return $stitcher->getSchemaString();\n }", "title": "" }, { "docid": "fb976bb10d6013a7017963265672b800", "score": "0.5362676", "text": "public function schema();", "title": "" }, { "docid": "fb976bb10d6013a7017963265672b800", "score": "0.5362676", "text": "public function schema();", "title": "" }, { "docid": "0142c474ca8cac17bed3a449e361bd54", "score": "0.5360706", "text": "public function get_instance_schema() {}", "title": "" }, { "docid": "0142c474ca8cac17bed3a449e361bd54", "score": "0.5360706", "text": "public function get_instance_schema() {}", "title": "" }, { "docid": "0142c474ca8cac17bed3a449e361bd54", "score": "0.5360706", "text": "public function get_instance_schema() {}", "title": "" }, { "docid": "0142c474ca8cac17bed3a449e361bd54", "score": "0.5360706", "text": "public function get_instance_schema() {}", "title": "" }, { "docid": "0142c474ca8cac17bed3a449e361bd54", "score": "0.5360706", "text": "public function get_instance_schema() {}", "title": "" }, { "docid": "f391188b449e4c4959550b1d1797f82f", "score": "0.53358215", "text": "public function get_item_schema() {\n\t\t$schema = array(\n\t\t\t'$schema' => 'http://json-schema.org/draft-04/schema#',\n\t\t\t'title' => 'pewc_group',\n\t\t\t'type' => 'object',\n\t\t\t'properties' => array(\n\t\t\t\t'group_id' => array(\n\t\t\t\t\t'description' => __( \"Unique identifier for the add-on field's group.\", 'pewc' ),\n\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t'readonly' => true,\n\t\t\t\t),\n\t\t\t\t'field_id' => array(\n\t\t\t\t\t'description' => __( 'Unique identifier for the add-on field.', 'pewc' ),\n\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t'readonly' => true,\n\t\t\t\t),\n\t\t\t\t'field_type' => array(\n\t\t\t\t\t'description' => __( 'Type of product add-on field', 'pewc' ),\n\t\t\t\t\t'type' \t\t => 'string',\n\t\t\t\t\t'enum'\t\t => array_keys( pewc_field_types() ),\n\t\t\t\t\t'context'\t => array( 'view', 'edit' )\n\t\t\t\t),\n\t\t\t\t'field_label' => array(\n\t\t\t\t\t'description' => __( 'Field label', 'pewc' ),\n\t\t\t\t\t'type' \t\t => 'string',\n\t\t\t\t\t'context'\t => array( 'view', 'edit' )\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\t// get all valid field input, but they won't have descriptions and type?\n\t\t// field with checkboxes can accept a string or numeric 1\n\t\t// e.g. \"field_required\":1 and \"field_flatrate\":\"1\" works\n\t\t$params = pewc_get_field_params();\n\n\t\tforeach ( $params as $param ) {\n\t\t\tif ( 'id' === $param )\n\t\t\t\tcontinue; // skip\n\t\t\tif ( ! isset( $schema['properties'][$param] ) ) {\n\t\t\t\t$schema['properties'][$param] = array(\n\t\t\t\t\t'description' => ucwords( str_replace( '_', ' ', $param ) ),\n\t\t\t\t\t'type'\t\t => array( 'string', 'number', 'array' ), // WordPress throws a PHP Warning if this is missing\n\t\t\t\t\t'context' \t => array( 'view', 'edit' )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn $schema;\n\t}", "title": "" }, { "docid": "91d4465a8432dd42fbf068c0da165221", "score": "0.53326976", "text": "public static function schema();", "title": "" }, { "docid": "57cfbe6c9d598a02c39c282178644089", "score": "0.5317098", "text": "private function getSchema()\n {\n return $this->db->getConf('schema');\n }", "title": "" }, { "docid": "390efb558ddea2b4ed44da55e35f5093", "score": "0.5311809", "text": "function _get_schema_version() {\n\n\t\tif ( !is_dir($this->migrations_path . \".info\") )\n\t\t\tmkdir($this->migrations_path . \".info\");\n\n\t\tif ( !file_exists($this->migrations_path . '.info/version') ) {\n\n\t\t\t$fversion = fopen($this->migrations_path . '.info/version','w');\n\t\t\tfwrite($fversion,'0');\n\t\t\tfclose($fversion);\n\t\t\treturn 0;\n\n\t\t} else {\n\n\t\t\t$fversion = fopen($this->migrations_path . '.info/version','r');\n\t\t\t$version = fread($fversion,11);\n\t\t\tfclose($fversion);\n\t\t\treturn $version;\n\n\t\t}\n\n\t\treturn 0;\n\n\t}", "title": "" }, { "docid": "d92af78efeff6a5fa8497535319ddd95", "score": "0.5269121", "text": "public function getSchema($schemaName) {\r\n if (array_key_exists($schemaName, $this->_versionData)) {\r\n return $this->_versionData[$schemaName];\r\n } \r\n return NULL;\r\n }", "title": "" }, { "docid": "c05f6892511fd05551315099cde63095", "score": "0.5268962", "text": "public static function schema() {\r\n return new ValidationType(\"SCHEMA\", 3);\r\n }", "title": "" }, { "docid": "70fb4039e98a1367f93097444b911fba", "score": "0.5264533", "text": "function getSchema($filename)\r\n{\r\n return getConfig($filename, '', APP . 'schemas');\r\n}", "title": "" }, { "docid": "074581b67de4abe455a9e840016da93e", "score": "0.52485085", "text": "public function generateSchema() {\n\t\t$this->loadSchema();\n\t\treturn $this->getSchema();\n\t}", "title": "" }, { "docid": "ac5bb98425287afd3fddd612497e3dc7", "score": "0.52474254", "text": "public function get_item_schema() {}", "title": "" }, { "docid": "ac5bb98425287afd3fddd612497e3dc7", "score": "0.52474254", "text": "public function get_item_schema() {}", "title": "" }, { "docid": "ac5bb98425287afd3fddd612497e3dc7", "score": "0.52474254", "text": "public function get_item_schema() {}", "title": "" }, { "docid": "ac5bb98425287afd3fddd612497e3dc7", "score": "0.52474254", "text": "public function get_item_schema() {}", "title": "" }, { "docid": "ac5bb98425287afd3fddd612497e3dc7", "score": "0.5247421", "text": "public function get_item_schema() {}", "title": "" }, { "docid": "ac5bb98425287afd3fddd612497e3dc7", "score": "0.5247421", "text": "public function get_item_schema() {}", "title": "" }, { "docid": "ac5bb98425287afd3fddd612497e3dc7", "score": "0.5247421", "text": "public function get_item_schema() {}", "title": "" }, { "docid": "ac5bb98425287afd3fddd612497e3dc7", "score": "0.5247421", "text": "public function get_item_schema() {}", "title": "" }, { "docid": "ac5bb98425287afd3fddd612497e3dc7", "score": "0.5247421", "text": "public function get_item_schema() {}", "title": "" }, { "docid": "ac5bb98425287afd3fddd612497e3dc7", "score": "0.5247421", "text": "public function get_item_schema() {}", "title": "" }, { "docid": "ac5bb98425287afd3fddd612497e3dc7", "score": "0.5247421", "text": "public function get_item_schema() {}", "title": "" }, { "docid": "ac5bb98425287afd3fddd612497e3dc7", "score": "0.5247421", "text": "public function get_item_schema() {}", "title": "" }, { "docid": "ac5bb98425287afd3fddd612497e3dc7", "score": "0.5247421", "text": "public function get_item_schema() {}", "title": "" }, { "docid": "ac5bb98425287afd3fddd612497e3dc7", "score": "0.5247421", "text": "public function get_item_schema() {}", "title": "" }, { "docid": "ac5bb98425287afd3fddd612497e3dc7", "score": "0.5247421", "text": "public function get_item_schema() {}", "title": "" }, { "docid": "ac5bb98425287afd3fddd612497e3dc7", "score": "0.5247421", "text": "public function get_item_schema() {}", "title": "" }, { "docid": "ac5bb98425287afd3fddd612497e3dc7", "score": "0.5247421", "text": "public function get_item_schema() {}", "title": "" }, { "docid": "ac5bb98425287afd3fddd612497e3dc7", "score": "0.5247421", "text": "public function get_item_schema() {}", "title": "" }, { "docid": "ac5bb98425287afd3fddd612497e3dc7", "score": "0.5247421", "text": "public function get_item_schema() {}", "title": "" }, { "docid": "8ba5550e2af28d56abe5d35dadbca417", "score": "0.52227867", "text": "public function getSchemaObject($name);", "title": "" }, { "docid": "29cda7bc8eba15b0ce8adf53b57c9f68", "score": "0.5211488", "text": "public function getSchema(): array\n {\n return $this->result;\n }", "title": "" }, { "docid": "0fe416274cce2ffe5b0dbce0798e90bc", "score": "0.5205985", "text": "public function schemaAsString()\n {\n $this->throwNoSchemaException();\n return $this->rawSchema;\n }", "title": "" }, { "docid": "f844cc844ee56da3c5d6120fad491bc8", "score": "0.5203059", "text": "public function get_public_item_schema() {}", "title": "" }, { "docid": "7d2bccf5f01539fcd44a9af82277967a", "score": "0.51706177", "text": "public function getSchemaCollection(): SchemaCollection;", "title": "" }, { "docid": "2ecbdfc4af41b2b0fa3b2f354b65c664", "score": "0.51557773", "text": "public function get_rest_schema( array $field ) {\n\t\t\t$schema = parent::get_rest_schema( $field );\n\t\t\t$schema['format'] = 'uri';\n\n\t\t\treturn $schema;\n\t\t}", "title": "" }, { "docid": "98cdc055ab4421e3757f4810dcce8576", "score": "0.5154875", "text": "public function getSchemaByType($type);", "title": "" } ]
17ddd308d5db0d303416a61e0288651f
Fetches embed informations from the given URL. This method now supports an array of options that can be interpreted at will by the providers. Thanks to Peter Niederlag ( for his request (
[ { "docid": "0ac69b013e0b69cb5b1ea46a22e33f57", "score": "0.6379525", "text": "public function embed( $url, array $options = [ ]) {\n\n\t\treturn $this->_cached( '_embed', $url, $options );\n\t}", "title": "" } ]
[ { "docid": "fec6606a5ff99c40865b2f70d472f947", "score": "0.66432554", "text": "protected function _embed( $url, array $options ) {\n\n\t\t$providers = $this->_Collection->providers( $url );\n\t\t$Media = null;\n\n\t\tforeach ( $providers as $Provider ) {\n\t\t\tif ( $Media = $Provider->embed( $url, $options )) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn $Media;\n\t}", "title": "" }, { "docid": "28988a62ecaa181421b2ade7bfef6383", "score": "0.5967329", "text": "public static function oembed_fetch_url($provider, $url, $args) {\n if (strpos($url, 'facebook.com')) {\n $provider = add_query_arg('maxwidth', '100%', $provider);\n }\n return $provider;\n }", "title": "" }, { "docid": "6122c00785cd0648ed7b793eaacc331a", "score": "0.5886846", "text": "function uncode_admin_get_oembed()\n{\n\t$code = $mime = '';\n\t$width = 1;\n\t$height = 1;\n\t$urlEnterd = isset($_REQUEST['urlOembed']) ? urldecode($_REQUEST['urlOembed']) : die();\n\t$onlycode = isset($_REQUEST['onlycode']) ? $_REQUEST['onlycode'] : false;\n\n\t$urlEnterd = str_replace('https://instagram.com', 'http://instagram.com', $urlEnterd);\n\t$WP_oembed = new WP_oEmbed();\n\t$raw_provider = parse_url($WP_oembed->get_provider($urlEnterd));\n\n\tif (isset($raw_provider['host']))\n\t{\n\t\t$host = $raw_provider['host'];\n\t\t$strip = array(\n\t\t\t\"www.\",\n\t\t\t\"api.\",\n\t\t\t\"embed.\",\n\t\t\t\"publish.\",\n\t\t);\n\t\t$bare_host = str_replace($strip, \"\", $host);\n\t\t$bare_host = explode('.', $bare_host);\n\n\t\t$key = '=A';\n\t\t$key .= 'Iza';\n\t\t$key .= 'SyA9PE';\n\t\t$key .= 'tdNGSwzuM';\n\t\t$key .= '8QtaDbZvkc';\n\t\t$key .= 'Slkh_UG2HI';\n\t\t$key = 'key' . $key;\n\n\t\t$mime = 'oembed/' . $bare_host[0];\n\n\t\t$code = wp_oembed_get($urlEnterd);\n\t\tpreg_match_all('/(width|height)=(\"[^\"]*\")/i', $code, $img_attr);\n\t\tif (isset($img_attr[2][0])) {\n\t\t\t$width = preg_replace('/\\D/', '', $img_attr[2][0]);\n\t\t}\n\t\tif (isset($img_attr[2][1])) {\n\t\t\t$height = preg_replace('/\\D/', '', $img_attr[2][1]);\n\t\t}\n\n\t\tif ($bare_host[0] === 'youtube') {\n\t\t\t$parts = parse_url($urlEnterd);\n\t\t\tif (isset($parts['query'])) {\n\t\t\t\tparse_str($parts['query'], $query);\n\t\t\t\tif (isset($query['v'])) {\n\t\t\t\t\t$idvideo = $query['v'];\n\t\t\t\t} else {\n\t\t\t\t\t$idvideo = $parts['path'];\n\t\t\t\t\t$idvideo = str_replace('/', '', $idvideo);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$idvideo = $parts['path'];\n\t\t\t\t$idvideo = str_replace('/', '', $idvideo);\n\t\t\t}\n\t\t\t$data = wp_remote_fopen(\"https://www.googleapis.com/youtube/v3/videos?part=snippet%2CcontentDetails&id=\" . $idvideo . \"&\" . $key);\n\t\t\t$json = json_decode($data);\n\t\t\t$code = '<img src=\"' . $json->items[0]->snippet->thumbnails->default->url . '\" />';\n\t\t} else if ($bare_host[0] === 'vimeo') {\n\t\t\t$urlEnterd = preg_replace('/#.*/', '', $urlEnterd);\n\t\t\t$vimeo = unserialize(wp_remote_fopen(\"http://vimeo.com/api/v2/video/\".basename(strtok($urlEnterd, '?')).\".php\"));\n\t\t\t$code = '<img src=\"' . $vimeo[0]['thumbnail_large'] . '\" />';\n\t\t} else if ($bare_host[0] === 'flickr') {\n\t\t\t$code = preg_replace('/<\\/?a[^>]*>/','',$code);\n\t\t}\n\t}\n\telse\n\t{\n\t\tif (preg_match('/(\\.jpg|\\.jpeg|\\.png|\\.bmp)$/i', $urlEnterd) || preg_match('/(\\.jpg?|\\.jpeg?|\\.png?|\\.bmp?)/i', $urlEnterd) || strpos($urlEnterd, 'imgix') !== false)\n\t\t{\n\t\t\t$code = '<img src=\"' . $urlEnterd . '\" />';\n\t\t\t$mime = 'image/url';\n\t\t\tif ($onlycode == 'false')\n\t\t\t{\n\t\t\t\tif ($getsize = @getimagesize($urlEnterd))\n\t\t\t\t{\n\t\t\t\t\tif (isset($getsize[0])) {\n\t\t\t\t\t\t$width = $getsize[0];\n\t\t\t\t\t}\n\t\t\t\t\tif (isset($getsize[1])) {\n\t\t\t\t\t\t$height = $getsize[1];\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$width = 'indefinit';\n\t\t\t\t\t$height = 'indefinit';\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif( strpos( strtolower($urlEnterd), '<iframe' ) !== false ) {\n\t\t\t\t$mime = 'oembed/iframe';\n\t\t\t\tpreg_match_all('/(width|height)=(\"[^\"]*\")/i',$urlEnterd, $iframe_size);\n\t\t\t\tif (isset($iframe_size[2][0])) {\n\t\t\t\t\tpreg_match(\"|\\d+|\", $iframe_size[2][0], $width);\n\t\t\t\t\t$width = $width[0];\n\t\t\t\t}\n\t\t\t\tif (isset($iframe_size[2][1])) {\n\t\t\t\t\tpreg_match(\"|\\d+|\", $iframe_size[2][1], $height);\n\t\t\t\t\t$height = $height[0];\n\t\t\t\t}\n\t\t\t} else if( strpos( strtolower($urlEnterd), '<svg' ) !== false ) {\n\t\t\t\t$mime = 'oembed/svg';\n\t\t\t\tpreg_match_all('/(width|height)=(\"[^\"]*\")/i',$urlEnterd, $svg_size);\n\t\t\t\tif (isset($svg_size[2][0])) {\n\t\t\t\t\tpreg_match(\"|\\d+|\", $svg_size[2][0], $width);\n\t\t\t\t\t$width = $width[0];\n\t\t\t\t}\n\t\t\t\tif (isset($svg_size[2][1])) {\n\t\t\t\t\tpreg_match(\"|\\d+|\", $svg_size[2][1], $height);\n\t\t\t\t\t$height = $height[0];\n\t\t\t\t}\n\t\t\t} else $mime = 'oembed/html';\n\t\t\t$code = esc_html($urlEnterd);\n\t\t}\n\t}\n\n\tif ($code == '' && $urlEnterd != '') {\n\t\t$code = 'null';\n\t}\n\n\techo json_encode(array(\n\t\t'code' => $code,\n\t\t'mime' => $mime,\n\t\t'width' => $width,\n\t\t'height' => $height\n\t));\n\n\tdie();\n}", "title": "" }, { "docid": "569b63b21ea7bfdb8a369ab550c139a6", "score": "0.58564687", "text": "private function getOEmbedInfo($url = '')\n {\n if (isset($this->oembed)) {\n return $this->oembed;\n }\n\n $info = file_get_contents('https://www.youtube.com/oembed?url=' . urlencode($url) . '&format=json');\n\n $this->oembed = json_decode($info);\n\n return $this->oembed;\n }", "title": "" }, { "docid": "2e5a65cdaf0dde474415bad90f9d4153", "score": "0.5721741", "text": "function iwc_sendargs_oembed( $provider, $url, $args ) {\n if (strpos($provider, 'vimeo')!==FALSE) {\n $provider = add_query_arg(array(\n 'title' => 0,\n 'portrait' => 0,\n 'byline' => 0,\n ), $provider);\n }\n return $provider;\n}", "title": "" }, { "docid": "0dcec9458f4794ceb28f394d9331afc7", "score": "0.56387556", "text": "public static function sq_remote_get($url, $param = array()) {\r\n $cookies = '';\r\n $post_preview = false;\r\n $cookies = array();\r\n $cookie_string = '';\r\n\r\n $url_domain = parse_url($url);\r\n $url_domain = $url_domain['host'];\r\n\r\n\r\n if (isset($param['timeout']))\r\n $timeout = $param['timeout'];\r\n else\r\n $timeout = 30;\r\n\r\n if ($url_domain == $_SERVER['HTTP_HOST'] && strpos($url, 'preview=true') !== false)\r\n $post_preview = true;\r\n\r\n if ($post_preview) {\r\n foreach ($_COOKIE as $name => $value) {\r\n\r\n if (strpos($name, 'wordpress') !== false || strpos($name, 'wpta') !== false) {\r\n $cookies[] = new WP_Http_Cookie(array('name' => $name, 'value' => $value));\r\n $cookie_string .= \"$name=$value;\";\r\n }\r\n }\r\n $cookies[] = new WP_Http_Cookie(array('name' => 'sq_snippet', 'value' => 1));\r\n $cookie_string .= \"sq_snippet=1;\";\r\n }\r\n\r\n if (function_exists('curl_init')) {\r\n return self::sq_curl($url, array('timeout' => $timeout, 'cookies' => $cookies, 'cookie_string' => $cookie_string));\r\n } else {\r\n return self::sq_wpcall($url, array('timeout' => $timeout, 'cookies' => $cookies));\r\n }\r\n }", "title": "" }, { "docid": "aba70b873bc52b838b643a4c92bdea78", "score": "0.5616688", "text": "public function getMedia(array $options = []);", "title": "" }, { "docid": "e36fca908bf3a2a5c13b2fcde74b00e1", "score": "0.55588454", "text": "public static function oembed($url) {\n $oembed_endpoint = '';\n $json_url = '';\n $output = FALSE;\n if (strpos($url, 'youtube') !== FALSE) {\n $oembed_endpoint = 'http://www.youtube.com/oembed';\n $json_url = $oembed_endpoint . '?url=' . rawurlencode($url). '&format=json';\n }\n if (strpos($url, 'vimeo') !== FALSE) {\n $oembed_endpoint = 'http://vimeo.com/api/oembed';\n $json_url = $oembed_endpoint . '.json?url=' . rawurlencode($url);\n }\n\n if ($url && $oembed_endpoint) {\n $curl = curl_init($json_url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($curl, CURLOPT_TIMEOUT, 30);\n curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);\n $output = json_decode(curl_exec($curl));\n curl_close($curl);\n }\n return ($output) ? html_entity_decode($output->html) : '';\n }", "title": "" }, { "docid": "f9325e33d70871b4d14c92388ef699e8", "score": "0.55491745", "text": "function smash_filter_oembed_fetch_url_vimeo( $provider, $url, $args ) {\n\n\tif ( ! ! stristr( $url, 'vimeo' ) ) {\n\t\t$provider = add_query_arg( 'width', (int) $args[ 'width' ], $provider );\n\t\t$provider = add_query_arg( 'height', (int) $args[ 'height' ], $provider );\n\t}\n\n\treturn $provider;\n}", "title": "" }, { "docid": "426a61a481fb8df334f351b51968fad7", "score": "0.5525089", "text": "public function find( $args, $assoc_args ) {\n\t\tif ( Utils\\wp_version_compare( '4.9', '<' ) ) {\n\t\t\tWP_CLI::error( 'Requires WordPress 4.9 or greater.' );\n\t\t}\n\n\t\t/** @var \\WP_Embed $wp_embed */\n\t\tglobal $wp_embed;\n\n\t\t$url = $args[0];\n\t\t$width = Utils\\get_flag_value( $assoc_args, 'width' );\n\t\t$height = Utils\\get_flag_value( $assoc_args, 'height' );\n\t\t$discover = Utils\\get_flag_value( $assoc_args, 'discover' );\n\n\t\t// The `$key_suffix` used for caching is part based on serializing the attributes array without normalizing it first so need to try to replicate that.\n\t\t$oembed_args = array();\n\n\t\tif ( null !== $width ) {\n\t\t\t$oembed_args['width'] = $width; // Keep as string as if from a shortcode attribute.\n\t\t}\n\t\tif ( null !== $height ) {\n\t\t\t$oembed_args['height'] = $height; // Keep as string as if from a shortcode attribute.\n\t\t}\n\t\tif ( null !== $discover ) {\n\t\t\t$discovers = array( ( $discover ) ? '1' : '0' );\n\t\t} else {\n\t\t\t$discovers = array( null, '1', '0' );\n\t\t}\n\n\t\t$attr = wp_parse_args( $oembed_args, wp_embed_defaults( $url ) );\n\n\t\tforeach ( $discovers as $discover ) {\n\t\t\tif ( null !== $discover ) {\n\t\t\t\t$attr['discover'] = $discover;\n\t\t\t}\n\t\t\t// phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.serialize_serialize -- needed to mimic WP Core behavior. See: \\WP_Embed::shortcode.\n\t\t\t$key_suffix = md5( $url . serialize( $attr ) );\n\n\t\t\t$cached_post_id = $wp_embed->find_oembed_post_id( $key_suffix );\n\n\t\t\tif ( $cached_post_id ) {\n\t\t\t\tWP_CLI::line( $cached_post_id );\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tWP_CLI::error( 'No cache post ID found!' );\n\t}", "title": "" }, { "docid": "a4c6d9ec164527772ecfe9dbf56a7f62", "score": "0.55106425", "text": "function get_oembed_result($data, $url, $args) {\n\t// write_log('get_oembed_result-----------------------');\n\t// write_log('$data: ');\n\t// write_log($data);\n\t// write_log('$url: ');\n\t// write_log($url);\n\t// write_log('$args: ');\n\t// write_log($args);\n\treturn $data;\n}", "title": "" }, { "docid": "0ce25a034df1ca31922192fa776c0d7b", "score": "0.54350847", "text": "private function slideshare_req(){\n\t\treturn \"https://www.slideshare.net/api/oembed/2?format=json&amp;url=\".$this->slideshare_url();\n\t}", "title": "" }, { "docid": "4e53c7de0bbb5852abd149874c8a9705", "score": "0.5418573", "text": "function src($file, $url , $w=480 , $h=272){\n\t\t\n\t\t$emtype = $this->get_embed_type($file);\n\t\t\n\t\t$html = <<<__HTML__\n<div style=\"text-align:center;margin:10px;\">\n <object classid=\"clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95\" width=\"$w\" height=\"$h\">\n <PARAM NAME=\"Filename\" VALUE=\"$url\">\n <param name=\"ClickToPlay\" value=\"true\">\n <param name=\"AutoSize\" value=\"true\">\n <param name=\"AutoStart\" value=\"true\">\n <param name=\"ShowControls\" value=\"true\">\n <param name=\"ShowAudioControls\" value=\"true\">\n <param name=\"ShowDisplay\" value=\"false\">\n <param name=\"ShowTracker\" value=\"true\">\n <param name=\"ShowStatusBar\" value=\"false\">\n <param name=\"EnableContextMenu\" value=\"false\">\n <param name=\"ShowPositionControls\" value=\"false\">\n <param name=\"ShowCaptioning\" value=\"false\">\n <param name=\"AutoRewind\" value=\"true\">\n <param name=\"Enabled\" value=\"true\">\n <param name=\"EnablePositionControls\" value=\"true\">\n <param name=\"EnableTracker\" value=\"true\">\n <param name=\"PlayCount\" value=\"1\">\n <param name=\"SendWarningEvents\" value=\"true\">\n <param name=\"SendErrorEvents\" value=\"true\">\n <param name=\"SendKeyboardEvents\" value=\"false\">\n <param name=\"SendMouseClickEvents\" value=\"false\">\n <param name=\"SendMouseMoveEvents\" value=\"false\">\n <param name=\"ShowGotoBar\" value=\"false\">\n <param name=\"TransparentAtStart\" value=\"false\">\n <param name=\"Volume\" value=\"0\">\n\t<embed src=\"$url\" type=\"$emtype\" width=\"$w\" height=\"$h\" showtracker=\"1\" showcontrols=\"1\" showpositioncontrols=\"1\" showdisplay=\"1\" showstatusbar=\"1\"></embed>\n </object>\n</div>\n__HTML__;\n\t\t\treturn $html;\n\t\t}", "title": "" }, { "docid": "7520a95e825636383c53d87a67997eae", "score": "0.5407065", "text": "function get_video_embed($video_tag, $provider){\r\n\r\n\tif( $provider == \"youtube\" ){\r\n\t\treturn \"https://www.youtube.com/embed/\".$video_tag.\"?autoplay=1\";\r\n\t}\r\n\r\n\tif( $provider == \"vimeo\" ){\r\n\t\treturn \"https://player.vimeo.com/video/\".$video_tag.\"?autoplay=1\";\r\n\t}\r\n\r\n\tif( $provider == \"dailymotion\" ){\r\n\t\treturn \"//www.dailymotion.com/embed/video/\".$video_tag.\"&related=1&autoplay=1\";\r\n\t}\r\n\r\n}", "title": "" }, { "docid": "31f58bd51f8c69d8a6179311149b4cd9", "score": "0.53424025", "text": "function http_get($url, array $options = null, array &$info = null)\n {\n }", "title": "" }, { "docid": "e7570ca4b870fba27508d34843553a76", "score": "0.53090084", "text": "public function get($url, $content = null, array $headers = array(), array $options = array());", "title": "" }, { "docid": "efb650a280b5b351bfd7993e502e11b9", "score": "0.52478", "text": "private function flickr_req(){\n\t\treturn \"https://www.flickr.com/services/oembed/?format=json&url=\".$this->flickr_url();\n\t}", "title": "" }, { "docid": "d90d7c5621f4f7c5783147b8e22ecc7d", "score": "0.5225204", "text": "function getUrl(Request $req,$url){\n $url=$this->addField($url,\"part\",\"snippet\");\n $url=$this->addField($url,\"maxResults\",50);\n $url=$this->addField($url,\"pageToken\",$req->pageToken);\n $url=$this->addField($url,\"channelId\",$req->channelId);\n $url=$this->addField($url,\"channelType\",$req->channelType);\n $url=$this->addField($url,\"location\",$req->location);\n $url=$this->addField($url,\"locationRadius\",$req->locationRadius);\n $url=$this->addField($url,\"onBehalfOfContentOwner\",$req->onBehalfOfContentOwner);\n $url=$this->addField($url,\"order\",$req->order);\n $url=$this->addField($url,\"publishedAfter\",$req->publishedAfter);\n $url=$this->addField($url,\"publishedBefore\",$req->publishedBefore);\n $url=$this->addField($url,\"regionCode\",$req->regionCode);\n $url=$this->addField($url,\"relatedToVideoId\",$req->relatedToVideoId);\n $url=$this->addField($url,\"relevanceLanguage\",$req->relevanceLanguage);\n $url=$this->addField($url,\"safeSearch\",$req->safeSearch);\n $url=$this->addField($url,\"topicId\",$req->topicId);\n $url=$this->addField($url,\"type\",$req->type);\n $url=$this->addField($url,\"videoCaption\",$req->videoCaption);\n $url=$this->addField($url,\"videoCategoryId\",$req->videoCategoryId);\n $url=$this->addField($url,\"videoDefinition\",$req->videoDefinition);\n $url=$this->addField($url,\"videoDimension\",$req->videoDimension);\n $url=$this->addField($url,\"videoDuration\",$req->videoDuration);\n $url=$this->addField($url,\"videoEmbeddable\",$req->videoEmbeddable);\n $url=$this->addField($url,\"videoLicense\",$req->videoLicense);\n $url=$this->addField($url,\"videoSyndicated\",$req->videoSyndicated);\n $url=$this->addField($url,\"videoType\",$req->videoType);\n return $url;\n }", "title": "" }, { "docid": "9d4236058fe178ac626035fa1b274ec5", "score": "0.52104706", "text": "function get_video_embed($url) {\n $is_youtube = (strpos($url, \"youtu\") !== FALSE);\n $is_vimeo = (strpos($url, \"vimeo\") !== FALSE);\n if ($is_youtube) {\n $youtube_id = get_youtube_id($url);\n $video = 'http://www.youtube.com/embed/'.$youtube_id.'?rel=0&showinfo=0&color=white&iv_load_policy=3&autoplay=1';\n }\n else if ($is_vimeo) {\n $vimeo_id = get_vimeo_id($url);\n $video = 'http://player.vimeo.com/video/'.$vimeo_id.'?title=0&byline=0&portrait=0&autoplay=1';\n }\n return $video;\n}", "title": "" }, { "docid": "6f8d59a0dd53f30fae5f8fdb57c4ea9f", "score": "0.5208534", "text": "function od_embed_html( $html, $url, $attr ) {\n\n\t// ugly version load oembed class\n\trequire_once('wp-includes/class-oembed.php');\n\n\t// slow process to check data type\n\t$oEmbed = new WP_oEmbed();\n\t$provider = $oEmbed->get_provider( $url, $args );\n\t$data = $oEmbed->fetch( $provider, $url, $args );\n\n\t// if type is video\n\tif( $data->type == 'video' ) {\n\n\t\t// check if class already exists\n\t\tif( strpos($html, 'class=\"') ) {\n\t\t\t// add class\n\t\t\t$html = str_replace( 'class=\"', 'class=\"embed-responsive-item ', $html );\n\t\t} else {\n\t\t\t// dirty string replace to add class\n\t\t\t$html = str_replace( '<iframe', '<iframe class=\"embed-responsive-item\"', $html );\n\t\t}\n\n\t\treturn <<<EOHTML\n\t<div class=\"embed-responsive embed-responsive-16by9\">\n\t\t{$html}\n\t</div>\n\nEOHTML;\n\t}\n\n\treturn $html;\n\n}", "title": "" }, { "docid": "2d8cedc21a3f00286d8cda10e94025b0", "score": "0.5203227", "text": "public function load($url, $config = [])\n {\n if (!is_string($url)) {\n throw new \\InvalidArgumentException('The url argument must be of type string');\n }\n if (!is_array($config)) {\n throw new \\InvalidArgumentException('The config argument must be of type array');\n }\n $this->url = $url;\n\n // Converts PHP errors and warnings to Exceptions\n set_error_handler(function () {\n throw new \\Exception(func_get_arg(1));\n });\n\n $errorReason = '';\n try {\n $urlData = parse_url($this->url);\n if (isset($urlData['host'])) {\n $hostname = $urlData['host'];\n if (substr($hostname, 0, 4) === 'www.') {\n $hostname = substr($hostname, 4);\n }\n foreach (self::$providers as $name => $domains) {\n $done = false;\n foreach ($domains as $domain) {\n if (preg_match('/^' . str_replace(['.', '*'], ['\\.', '.*'], $domain) . '$/', $hostname)) {\n include_once __DIR__ . DIRECTORY_SEPARATOR . 'VideoEmbed' . DIRECTORY_SEPARATOR . 'Internal' . DIRECTORY_SEPARATOR . 'Providers' . DIRECTORY_SEPARATOR . $name . '.php';\n call_user_func(['\\IvoPetkov\\VideoEmbed\\Internal\\Providers\\\\' . $name, 'load'], $this->url, $this, $config);\n $done = true;\n break;\n }\n }\n if ($done) {\n break;\n }\n }\n }\n } catch (\\Exception $e) {\n $errorReason = $e->getMessage();\n }\n\n restore_error_handler();\n if ($this->html === null) {\n throw new \\Exception('Cannot retrieve information about ' . $this->url . ' (reason: ' . (isset($errorReason[0]) ? $errorReason : 'unknown') . ')');\n }\n }", "title": "" }, { "docid": "63608736bc28f9f04066ae886159365f", "score": "0.5200409", "text": "function geometry_website_get_embedded_media( $type = array() ){\n\n $content = do_shortcode( apply_filters( 'the_content', get_the_content() ) );\n $embed = get_media_embedded_in_content( $content, $type );\n if( in_array( 'audio', $type ) ){\n $output = str_replace( '?visual=true', '?visual=false', $embed[0] );\n } else {\n $output = $embed[0];\n }\n\n return $output;\n\n }", "title": "" }, { "docid": "273fbda17a855b2ea390e537669f623a", "score": "0.5180831", "text": "public function use_embed_api() {\n\t\t\t\tglobal $fusion_settings;\n\n\t\t\t\t$html = '';\n\t\t\t\t$api_key = apply_filters( 'fusion_google_maps_api_key', $fusion_settings->get( 'gmap_api' ) );\n\t\t\t\t$embed_address = str_replace( ' ', '+', $this->args['embed_address'] );\n\t\t\t\t$lang_code = fusion_get_google_maps_language_code();\n\n\t\t\t\t$html .= '<iframe width=\"' . $this->args['width'] . '\" height=\"' . $this->args['height'] . '\" frameborder=\"0\" style=\"border:0\" src=\"https://www.google.com/maps/embed/v1/place?key=' . $api_key . '&language=' . $lang_code . '&q=' . $embed_address . '&maptype=' . $this->args['embed_map_type'] . '&zoom=' . $this->args['zoom'] . '\" allowfullscreen></iframe>';\n\n\t\t\t\t$html = '<div ' . FusionBuilder::attributes( 'google-map-shortcode' ) . '>' . $html . '</div>';\n\n\t\t\t\treturn $html;\n\t\t\t}", "title": "" }, { "docid": "3ad428582c0b9bcfc0bb2d282c2cb23b", "score": "0.5164293", "text": "public function fetchInstagramEmbed($shortcode, $hidecaption = FALSE, $maxWidth = NULL);", "title": "" }, { "docid": "4ce53e29b9bed2dcd3e28b54dce8f197", "score": "0.51601976", "text": "public function embed($urls, $name, $width, $height, $options) {\n self::pick_video_size($width, $height);\n $contents = \"\\ntestsource=\". join(\"\\ntestsource=\", $urls) .\n \"\\ntestname=$name\\ntestwidth=$width\\ntestheight=$height\\n<!--FALLBACK-->\\n\";\n return html_writer::span($contents, 'mediaplugin mediaplugin_test');\n }", "title": "" }, { "docid": "7d1a77bedb993c0db7c0ad74d47a874e", "score": "0.51384383", "text": "function fetch_quizlet($quizletid, $quizlettitle=\"\", $mode=\"flashcards\", $width=\"100%\",$height=\"\"){\n\n\t//massage mode, other options are as is \"learn\" or \"scatter\"\t\n\tif($mode==\"\")$mode=\"flashcards\";\n\n\t//set default heights\n\t$dh = \"410\";\n\tif($height==''){$height=$dh;}\n\t\n\t//only do scrolling for test\n\tif ($mode == \"test\"){\n\t\t$scroll=\"yes\";\n\t}else{\n\t\t$scroll=\"no\";\n\t}\n\n\t//return iframe\t\n\t$ret=\t\"<div style=\\\"background:#fff;padding:3px\\\">\n\t\t\t<iframe src=\\\"//quizlet.com/$quizletid/$mode/embedv2/?hideLinks\\\" height=\\\"$height\\\" width=\\\"$width\\\" style=\\\"border:0;\\\" scrolling=\\\"$scroll\\\"></iframe>\n\t\t\t</div>\";\n\treturn $ret;\n\n}", "title": "" }, { "docid": "e96708ba6c65b439fdca9599d3ab2a38", "score": "0.51130664", "text": "public function embed($name, $options = null)\n\t{\n\t\tif ($this->options && !$options)\n\t\t{\n\t\t\t$options = $this->options;\n\t\t}\n\t\tswitch ($name)\n\t\t{\n\t\t\tcase 'maps':\n\t\t\tcase 'Maps':\n\t\t\t\treturn new JGoogleEmbedMaps($options);\n\t\t\tcase 'analytics':\n\t\t\tcase 'Analytics':\n\t\t\t\treturn new JGoogleEmbedAnalytics($options);\n\t\t\tdefault:\n\t\t\t\treturn null;\n\t\t}\n\t}", "title": "" }, { "docid": "dd9cbe8b78c3effefd4a0e05a707d1c9", "score": "0.5110898", "text": "public function getEmbed()\n {\n $iframeUrl = Oembed::getEmbedUrl();\n $parsedUrl = parse_url($iframeUrl);\n $provider = strtolower(static::getProviderByUrl($this->url));\n $query = $provider === 'soundcloud' ? \"auto_play=1\" : \"autoplay=1\";\n if (array_key_exists('path', $parsedUrl) && $parsedUrl['path'] == null) {\n $iframeUrl .= '/';\n }\n $separator = (!array_key_exists('query', $parsedUrl) || $parsedUrl['query'] == null) ? '?' : '&';\n $iframeUrl .= $separator . $query;\n $iframeHtml = Html::tag('iframe', [], ['data-src' => $iframeUrl]);\n $thumbnailHtml = Html::tag('div', [Html::img($this->getThumbnailUrl())], array('class' => 't-oembed-thumbnail'));\n return Html::tag('div', [$iframeHtml, $thumbnailHtml], array('class' => 't-oembed'));\n }", "title": "" }, { "docid": "4fb26ca6354cc57491e64ef6f09977c0", "score": "0.5095605", "text": "function glome_get($query, $params = false)\n{\n if (! $params)\n {\n $params = array();\n }\n $domain = get_api_domain();\n $uid = get_option('glome_api_uid');\n $key = get_option('glome_api_key');\n $url = $domain . $query;\n $url .= \"?application[uid]={$uid}&application[apikey]={$key}\";\n foreach ($params as $key => $value)\n {\n $url .= '&' . $key . '=' . $value;\n }\n $response = wp_remote_get($url);\n\n return $response;\n}", "title": "" }, { "docid": "1bfe41d677ac73b2ff0edef560608e21", "score": "0.5094152", "text": "public function fetch(string $url, array $params = []);", "title": "" }, { "docid": "b658178deda73308f8ae426cd1d91ab7", "score": "0.5079936", "text": "public static function fetch($url = \"\", $parameters = array(), $options = array()) {\n\n\t\treturn self::getFetcher()->fetch($url, $parameters, $options);\n\n\t}", "title": "" }, { "docid": "1bf52cf1a1e3a8f4e1bf907558c5becc", "score": "0.5039638", "text": "public function getEmbedHTML($options = [])\n {\n $defaultOptions = ['width' => 560, 'height' => 349];\n $options = array_merge($defaultOptions, $options);\n\n // convert options into\n $htmlOptions = '';\n if (count($options) > 0) {\n foreach ($options as $key => $value) {\n $htmlOptions .= '&'.$key.'='.$value;\n }\n }\n\n return \"<object type='application/x-shockwave-flash'\n width='{$options['width']}' height='{$options['height']}'\n data='http://www.flickr.com/apps/video/stewart.swf?v=63881'\n classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'>\n <param name='movie' value='{$this->getEmbedUrl()}'></param>\n <param name='bgcolor' value='#000000'></param>\n <param name='allowFullScreen' value='true'></param>\n <embed type='application/x-shockwave-flash'\n src='{$this->getEmbedUrl()}'\n bgcolor='#000000' allowfullscreen='true'\n width='{$options['width']}' height='{$options['height']}'>\n </embed>\n </object>\";\n }", "title": "" }, { "docid": "cdf3f99ac331d1356c77d102c3ac13f6", "score": "0.50270045", "text": "public abstract function parseOembed();", "title": "" }, { "docid": "1bcfb9a716233c498b82c18b5db4f591", "score": "0.4994989", "text": "function embed_oembed($html, $url, $attr, $post_id) {\n\treturn '<div class=\"flex-video\">' . $html . '</div>';\n}", "title": "" }, { "docid": "e802243842593a8ebfad14276c3851b8", "score": "0.49905774", "text": "function embed_video( $atts ) {\r\n\r\n\textract( shortcode_atts(\r\n\t\tarray(\r\n\t\t\t'url' => '',\r\n\t\t\t'ratio' => '',\r\n\t\t), $atts )\r\n\t);\r\n\t\r\n\tif ( $ratio ) :\r\n\r\n\t\t$res = explode( \"|\", $ratio );\r\n\r\n\t\t$res = intdiv( intval( $res[0] ), intval( $res[1] ) );\r\n\r\n\tendif;\r\n\r\n\t// http://stackoverflow.com/questions/3136425/get-the-get-variables-from-a-url-string\r\n\tparse_str( parse_url( $url, PHP_URL_QUERY ), $u );\r\n\r\n\t$html = '<div class=\"video-container\"';\r\n\t$html .= ( $res ) ? ' style=\"padding-bottom: ' . $res . '%;\">' : '>';\r\n\t$html .= '<iframe src=\"https://www.youtube.com/embed/' . $u[ 'v' ] . '?';\r\n\tif( $u[ 'list' ] ) $html .= 'list=' . $u[ 'list' ] . '&';\r\n\t$html .= 'enablejsapi=1&rel=0&controls=1&showinfo=0autoplay=0origin=http://legendhomes.com\" data-test=\"test\" frameborder=\"0\" allowfullscreen=\"\"></iframe>';\r\n\t$html .= '</div>';\r\n\r\n\treturn $html;\t\r\n\r\n}", "title": "" }, { "docid": "6d90f02d4e8cd3c1dff6429170886fdb", "score": "0.49764362", "text": "function theme_responsive_embeds( $html, $url, $attr, $post_id=0 ) {\n\t\n\t// Apply only to some embeds\n\t$patterns = [\n\t\t'#^https?://(?:www\\.)?(?:youtube\\.com/watch|youtu\\.be/)#',\n\t\t'#^https?://(.+\\.)?vimeo\\.com/.*#',\n\t];\n\t\n\t// Add div\n\tforeach( $patterns as $pattern ) {\n\t\tif( preg_match( $pattern, $url ) ) {\n\t\t\treturn \"<div class=\\\"ratio-16-9 margin-1\\\">{$html}</div>\";\n\t\t}\n\t}\n\treturn $html;\n}", "title": "" }, { "docid": "d15ff4ff3ab08c7b209ce2eee6afa44f", "score": "0.49679226", "text": "public function wrap_embeds( $return, $data, $url ) {\n\t\tif ( ! is_object( $data ) || empty( $data->type ) ) {\n\t\t\treturn $return;\n\t\t}\n\n\t\t$classes = [\n\t\t\t'embed',\n\t\t\t'embed--' . sanitize_html_class( $data->provider_name ),\n\t\t];\n\n\t\t$ratio_style = '';\n\n\t\tif ( 'video' === $data->type ) {\n\t\t\t$classes[] = 'embed--video';\n\n\t\t\t// Set intrinsic ratio.\n\t\t\tif ( isset( $data->width ) && isset( $data->height ) ) {\n\t\t\t\t$ratio = ( $data->height / $data->width ) * 100;\n\t\t\t\t$ratio_style = ' style=\"padding-bottom:' . esc_attr( $ratio ) . '%;\"';\n\t\t\t}\n\t\t}\n\n\t\treturn sprintf(\n\t\t\t'<div class=\"%1$s\"><div class=\"embed-ratio\"%2$s>%3$s</div></div>',\n\t\t\tesc_attr( implode( ' ', $classes ) ),\n\t\t\t$ratio_style,\n\t\t\t$return\n\t\t);\n\t}", "title": "" }, { "docid": "2c84a589aec5396f463278e94518087a", "score": "0.49455634", "text": "function bp_activity_embed_media() {\n\t// Bail if oEmbed request explicitly hides media.\n\tif ( isset( $_GET['hide_media'] ) && true == wp_validate_boolean( $_GET['hide_media'] ) ) {\n\t\t/**\n\t\t * Do something after media is rendered for an activity oEmbed item.\n\t\t *\n\t\t * @since 2.6.0\n\t\t */\n\t\tdo_action( 'bp_activity_embed_after_media' );\n\n\t\treturn;\n\t}\n\n\t/**\n\t * Should we display media in the oEmbed template?\n\t *\n\t * @since 2.6.0\n\t *\n\t * @param bool $retval Defaults to true.\n\t */\n\t$allow_media = apply_filters( 'bp_activity_embed_display_media', true );\n\n\t// Find oEmbeds from only WP registered providers.\n\tbp_remove_all_filters( 'oembed_providers' );\n\t$media = bp_core_extract_media_from_content( $GLOBALS['activities_template']->activity->content, 'embeds' );\n\tbp_restore_all_filters( 'oembed_providers' );\n\n\t// oEmbeds have precedence over inline video / audio.\n\tif ( isset( $media['embeds'] ) && true === $allow_media ) {\n\t\t// Autoembed first URL.\n\t\t$oembed_defaults = wp_embed_defaults();\n\t\t$oembed_args = array(\n\t\t\t'width' => $oembed_defaults['width'],\n\t\t\t'height' => $oembed_defaults['height'],\n\t\t\t'discover' => true\n\t\t);\n\t\t$url = $media['embeds'][0]['url'];\n\t\t$cachekey = '_oembed_response_' . md5( $url . serialize( $oembed_args ) );\n\n\t\t// Try to fetch oEmbed response from meta.\n\t\t$oembed = bp_activity_get_meta( bp_get_activity_id(), $cachekey );\n\n\t\t// No cache, so fetch full oEmbed response now!\n\t\tif ( '' === $oembed ) {\n\t\t\t$o = _wp_oembed_get_object();\n\t\t\t$oembed = $o->fetch( $o->get_provider( $url, $oembed_args ), $url, $oembed_args );\n\n\t\t\t// Cache oEmbed response.\n\t\t\tbp_activity_update_meta( bp_get_activity_id(), $cachekey, $oembed );\n\t\t}\n\n\t\t$content = '';\n\n\t\t/**\n\t\t * Filters the default embed display max width.\n\t\t *\n\t\t * This is used if the oEmbed response does not return a thumbnail width.\n\t\t *\n\t\t * @since 2.6.0\n\t\t *\n\t\t * @param int $width.\n\t\t */\n\t\t$width = (int) apply_filters( 'bp_activity_embed_display_media_width', 550 );\n\n\t\t// Set thumbnail.\n\t\tif ( 'photo' === $oembed->type ) {\n\t\t\t$thumbnail = $oembed->url;\n\t\t} elseif ( isset( $oembed->thumbnail_url ) ) {\n\t\t\t$thumbnail = $oembed->thumbnail_url;\n\n\t\t/* Non-oEmbed standard attributes */\n\t\t// Mixcloud.\n\t\t} elseif ( isset( $oembed->image ) ) {\n\t\t\t$thumbnail = $oembed->image;\n\t\t// ReverbNation.\n\t\t} elseif ( isset( $oembed->{'thumbnail-url'} ) ) {\n\t\t\t$thumbnail = $oembed->{'thumbnail-url'};\n\t\t}\n\n\t\t// Display thumb and related oEmbed meta.\n\t\tif ( true === isset ( $thumbnail ) ) {\n\t\t\t$play_icon = $caption = '';\n\n\t\t\t// Add play icon for non-photos.\n\t\t\tif ( 'photo' !== $oembed->type ) {\n\t\t\t\t/**\n\t\t\t\t * ion-play icon from Ionicons.\n\t\t\t\t *\n\t\t\t\t * @link http://ionicons.com/\n\t\t\t\t * @license MIT\n\t\t\t\t */\n\t\t\t\t$play_icon = <<<EOD\n<svg id=\"Layer_1\" style=\"enable-background:new 0 0 512 512;\" version=\"1.1\" viewBox=\"0 0 512 512\" xml:space=\"preserve\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"><path d=\"M405.2,232.9L126.8,67.2c-3.4-2-6.9-3.2-10.9-3.2c-10.9,0-19.8,9-19.8,20H96v344h0.1c0,11,8.9,20,19.8,20 c4.1,0,7.5-1.4,11.2-3.4l278.1-165.5c6.6-5.5,10.8-13.8,10.8-23.1C416,246.7,411.8,238.5,405.2,232.9z\"/></svg>\nEOD;\n\n\t\t\t\t$play_icon = sprintf( '<a rel=\"nofollow\" class=\"play-btn\" href=\"%1$s\" onclick=\"top.location.href=\\'%1$s\\'\">%2$s</a>', esc_url( $url ), $play_icon );\n\t\t\t}\n\n\t\t\t// Thumb width.\n\t\t\t$thumb_width = isset( $oembed->thumbnail_width ) && 'photo' !== $oembed->type && (int) $oembed->thumbnail_width < 550 ? (int) $oembed->thumbnail_width : $width;\n\n\t\t\t$float_width = 350;\n\n\t\t\t// Set up thumb.\n\t\t\t$content = sprintf( '<div class=\"thumb\" style=\"max-width:%1$spx\">%2$s<a href=\"%3$s\" rel=\"nofollow\" onclick=\"top.location.href=\\'%3$s\\'\"><img src=\"%4$s\" /></a></div>', $thumb_width, $play_icon, esc_url( $url ), esc_url( $thumbnail ) );\n\n\t\t\t// Show title.\n\t\t\tif ( isset( $oembed->title ) ) {\n\t\t\t\t$caption .= sprintf( '<p class=\"caption-title\"><strong>%s</strong></p>', apply_filters( 'single_post_title', $oembed->title ) );\n\t\t\t}\n\n\t\t\t// Show description (non-oEmbed standard).\n\t\t\tif ( isset( $oembed->description ) ) {\n\t\t\t\t$caption .= sprintf( '<div class=\"caption-description\">%s</div>', apply_filters( 'bp_activity_get_embed_excerpt', $oembed->description ) );\n\t\t\t}\n\n\t\t\t// Show author info.\n\t\t\tif ( isset( $oembed->provider_name ) && isset( $oembed->author_name ) ) {\n\t\t\t\t/* translators: 1: oEmbed author. 2: oEmbed provider. eg. By BuddyPress on YouTube. */\n\t\t\t\t$anchor_text = sprintf( __( 'By %1$s on %2$s', 'buddypress' ), $oembed->author_name, $oembed->provider_name );\n\n\t\t\t} elseif ( isset( $oembed->provider_name ) ) {\n\t\t\t\t/* translators: %s: oEmbed provider. */\n\t\t\t\t$anchor_text = sprintf( __( 'View on %s', 'buddypress' ), $oembed->provider_name );\n\t\t\t}\n\n\t\t\tif ( true === isset( $anchor_text ) ) {\n\t\t\t\t$caption .= sprintf( '<a rel=\"nofollow\" href=\"%1$s\" onclick=\"top.location.href=\\'%1$s\\'\">%2$s</a>', esc_url( $url ), apply_filters( 'the_title', $anchor_text ) );\n\t\t\t}\n\n\t\t\t// Set up caption.\n\t\t\tif ( '' !== $caption ) {\n\t\t\t\t$css_class = isset( $oembed->provider_name ) ? sprintf( ' provider-%s', sanitize_html_class( strtolower( $oembed->provider_name ) ) ) : '';\n\t\t\t\t$caption = sprintf( '<div class=\"caption%1$s\" style=\"width:%2$s\">%3$s</div>',\n\t\t\t\t\t$css_class,\n\t\t\t\t\t$thumb_width > $float_width ? 100 . '%' : round( ( $width - (int) $thumb_width ) / $width * 100 ) . '%',\n\t\t\t\t\t$caption\n\t\t\t\t);\n\n\t\t\t\t$content .= $caption;\n\t\t\t}\n\t\t}\n\n\t\t// Print rich content.\n\t\tif ( '' !== $content ) {\n\t\t\tprintf( '<div class=\"bp-activity-embed-display-media %s\" style=\"max-width:%spx\">%s</div>',\n\t\t\t\t$thumb_width < $float_width ? 'two-col' : 'one-col',\n\t\t\t\t$thumb_width < $float_width ? $width : $thumb_width,\n\t\t\t\t$content\n\t\t\t);\n\t\t}\n\n\t// Video / audio.\n\t} elseif ( true === $allow_media ) {\n\t\t// Call BP_Embed if it hasn't already loaded.\n\t\tbp_embed_init();\n\n\t\t// Run shortcode and embed routine.\n\t\t$content = buddypress()->embed->run_shortcode( $GLOBALS['activities_template']->activity->content );\n\t\t$content = buddypress()->embed->autoembed( $content );\n\n\t\t// Try to find inline video / audio.\n\t\t$media = bp_core_extract_media_from_content( $content, 96 );\n\n\t\t// Video takes precedence. HTML5-only.\n\t\tif ( isset( $media['videos'] ) && 'shortcodes' === $media['videos'][0]['source'] ) {\n\t\t\tprintf( '<video controls preload=\"metadata\"><source src=\"%1$s\"><p>%2$s</p></video>',\n\t\t\t\tesc_url( $media['videos'][0]['url'] ),\n\t\t\t\tesc_html__( 'Your browser does not support HTML5 video', 'buddypress' )\n\t\t\t);\n\n\t\t// No video? Try audio. HTML5-only.\n\t\t} elseif ( isset( $media['audio'] ) && 'shortcodes' === $media['audio'][0]['source'] ) {\n\t\t\tprintf( '<audio controls preload=\"metadata\"><source src=\"%1$s\"><p>%2$s</p></audio>',\n\t\t\t\tesc_url( $media['audio'][0]['url'] ),\n\t\t\t\tesc_html__( 'Your browser does not support HTML5 audio', 'buddypress' )\n\t\t\t);\n\t\t}\n\n\t}\n\n\t/** This hook is documented in /bp-activity/bp-activity-embeds.php */\n\tdo_action( 'bp_activity_embed_after_media' );\n}", "title": "" }, { "docid": "a3da853cceefb36b79d712784076ce2c", "score": "0.4929926", "text": "public function embed() {\n return '<iframe frameborder=\"0\" allowfullscreen src=\"'.$this->getLink().'\"></iframe>';\n }", "title": "" }, { "docid": "2ab1876ccc6fff1590bb7cab5de4e7ff", "score": "0.49221954", "text": "public static function get($url = null, $options = null) {\n if (is_null($url)) {\n return false;\n }\n\n $defaults = array(\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_URL => $url,\n CURLOPT_FRESH_CONNECT => true,\n CURLOPT_TIMEOUT => 60,\n CURLOPT_USERAGENT => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.43 Safari/537.31',\n );\n\n // caution: donot use array_merge\n if ($options) {\n foreach ($options as $key=>$value) {\n $defaults[$key] = $value;\n }\n }\n\n array_filter($defaults);\n\n $ch = curl_init();\n curl_setopt_array($ch, $defaults);\n $out = curl_exec($ch);\n $err = curl_error($ch);\n curl_close($ch);\n\n if ($err) {\n // print_r($url);\n // print_r($defaults);\n trigger_error($err, E_USER_ERROR);\n } else {\n return $out;\n }\n }", "title": "" }, { "docid": "e227f038e35ba2dcccde3491bf843fc1", "score": "0.48910573", "text": "public function embedCodeProvider() {\n return [\n 'valid CARTO URL' => ['https://plopesc.carto.com/builder/dc610160-30b0-11e7-b058-0e233c30368f/embed', 0],\n 'valid CARTO embed code' => ['<iframe width=\"100%\" height=\"520\" frameborder=\"0\" src=\"https://plopesc.carto.com/builder/dc610160-30b0-11e7-b058-0e233c30368f/embed\" allowfullscreen webkitallowfullscreen mozallowfullscreen oallowfullscreen msallowfullscreen></iframe>', 0],\n 'invalid URL' => ['https://drupal.org/project/media_entity_carto', 1],\n 'invalid text' => ['I want my Map!', 1],\n ];\n }", "title": "" }, { "docid": "50eb9ed7c055cafe644fb71b1cd92ce8", "score": "0.48902097", "text": "public static function getEmbedContent($url)\r\n\t{\r\n\t\t$output = '';\r\n\t\t$handle = fopen( $url, 'r' );\r\n\t\t\r\n\t\tif ( ! $handle )\r\n\t\t{\r\n\t\t\treturn \"Error: Could not open content at $url\";\r\n\t\t}\r\n\t\t\r\n\t\twhile ( ! feof( $handle ) )\r\n\t\t{\r\n\t\t\t//read file line by line into variable\r\n\t\t\t$output = $output . fgets( $handle, 4096 );\r\n\t\t}\r\n\t\tfclose( $handle );\r\n\t\treturn $output;\r\n\t}", "title": "" }, { "docid": "36841c20b28c77a1b96c1c7263216fe1", "score": "0.48641738", "text": "public function embedURL($matches) {\n\t\t$result = array();\n\t\t$srcset = explode(',', str_replace(', ', ',', $matches[0]));\n\t\tforeach ($srcset as $url)\n\t\t\t$result[] = preg_replace_callback('#^(http://|//)[^\\'\"&\\? ]+#i', array(&$this, 'contentURL'), trim($url));\n\t\treturn implode(', ', $result);\n\t}", "title": "" }, { "docid": "0c1084924f45622bb95c06a69dba8477", "score": "0.4863662", "text": "function opinionstage_get_contents($url) {\n $response = wp_remote_get($url, array('header' => array('Accept' => 'application/json; charset=utf-8')));\n\n return opinionstage_parse_response($response);\n}", "title": "" }, { "docid": "8ea058a4d8dbc2b6620a8501e181f5f8", "score": "0.4843948", "text": "public function get_video_from_url()\n {\n $url = $this->input->post('url', true);\n $this->load->model('video_model');\n $data = array(\n 'video_embed_code' => $this->video_model->get_video_embed_code($url),\n 'video_thumbnail' => $this->video_model->get_video_thumbnail($url),\n );\n echo json_encode($data);\n }", "title": "" }, { "docid": "218c9ea926f640ad2087ce65ed5d5382", "score": "0.48429567", "text": "public function play($listUrl) {\n $this->SclService->setCurlOptions(array(CURLOPT_FOLLOWLOCATION => 1));\n\n $embedInfo = json_decode($this\n ->SclService\n ->get('oembed', array('url' => $listUrl)));\n\n return $embedInfo;\n }", "title": "" }, { "docid": "84f3b9318e3a4e3a92c097db253a0ebb", "score": "0.4839584", "text": "protected function querySpotify($url,$options) {\n\t\t//Ensure Zend_Rest_Client is instantiated for the current URL\n\t\tif($this->_restClient == null || $this->_currentURL != $url) {\n\t\t\trequire_once 'Zend/Rest/Client.php';\n\n\t\t\t$this->_restClient = new Zend_Rest_Client(self::URI_BASE . $url);\n\t\t}\n\t\t\n\t\t//Set 'accept' headers so proper response format is set\n\t\tif($this->_responseFormat != null) {\n\t\t\tswitch($this->_responseFormat) {\n\t\t\t\tcase 'JSON':\n\t\t\t\t\t$this->_restClient->getHttpClient()->setHeaders(array(\n\t\t\t\t\t\t'Accept' => self::JSON_ACCEPT_HEADER\n\t\t\t\t\t));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'XML':\n\t\t\t\t\t$this->_restClient->getHttpClient()->setHeaders(array(\n\t\t\t\t\t\t'Accept' => self::XML_ACCEPT_HEADER\n\t\t\t\t\t));\n\t\t\t\t\tbreak;\n\t\t\t}\t\t\t\t\t\t\n\t\t} else {\n\t\t\t/**\n * @see Zend_Service_Exception\n */\n require_once 'Zend/Service/Exception.php';\n throw new Zend_Service_Exception('Response format is not set. Unable to query Spotify API.');\n\t\t}\n\t\t\n\t\t//Reset Zend_Rest_Client\n\t\t$this->_restClient->getHttpClient()->resetParameters();\n\t\t$response = $this->_restClient->restGet($url,$options);\n\t\t\n\t\t//Ensure code is acceptable\n\t\tswitch($response->getStatus()) {\n\t\t\tcase 200: //OK\n\t\t\tcase 304: //Not Modified\n\t\t\t\treturn $this->parseResponse($response->getBody());\n\t\t\t\tbreak;\n\t\t\tcase 403: //Forbidden - rate limiting\n\t\t\t\t/**\n\t * @see Zend_Service_Exception\n\t */\n\t require_once 'Zend/Service/Exception.php';\n\t throw new Zend_Service_Exception('Spotify rate limiting has kicked in');\n\t\t\t\tbreak;\n\t\t\tcase 404: //Unable to locate - or you changed the URI.. in which case.. NO DATA FOR YOU!\n\t\t\t\treturn false;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t/**\n\t * @see Zend_Service_Exception\n\t */\n\t require_once 'Zend/Service/Exception.php';\n\t throw new Zend_Service_Exception('Invalid request. Response code: ' . $response->getStatus());\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "ddba2f5e9349da8eaf553800f0bc680c", "score": "0.48374698", "text": "function fetch_miniplayer($runtime, $src,$protocol=\"http\",$imageurl=\"\",$width=0,$height=0,$iframe=false){\nglobal $CFG, $COURSE;\n\n\t\t//support legacy files, just in case we have an old timer ...\n\t\tif($protocol=='rtmp' || $protocol=='legacy'){\n\t\t\t$src= $CFG->wwwroot . \"/file.php/\" . $COURSE->id . \"/\" . $src;\n\t\t\t$type = 'http';\n\t\t}\n\t\t\n\t\tif($width==0){\n\t\t\t$width=$CFG->filter_poodll_miniplayerwidth;\n\t\t}\n\t\tif($height==0){\n\t\t\t$height=$CFG->filter_poodll_miniplayerwidth;\n\t\t}\n\t\n\t\t$params = array();\n\n\t\t$params['src']= $src;//urlencode($src);\n\t\n\n\t\t//for html5 players we can make a picture link to play the audio\n\t\t//the default is in the poodll filter directory\n\t\tif($imageurl==\"\"){\n\t\t\t$imageurl = $CFG->wwwroot . \"/filter/poodll/pix/MiniPlayIcon32.png\";\n\t\t}\n \t\t\t\t\t\t\n \t\n\t//depending on runtime, we show a SWF or html5 player\t\t\t\n\tif($runtime==\"js\" || ($runtime==\"auto\" && isMobile($CFG->filter_poodll_html5play))){\n\t\n\t\t//the $src url as it comes from assignment and questions, is urlencoded,\n\t\t//unlikely to arrive here encoded, but lets just be safe \n\t\t//or html 5 playback will fail Justin 20121016\n\t\t$src= urldecode($src);\n\t\n\t\t$returnString= \"<a onclick=\\\"this.firstChild.play()\\\"><audio src=\\\"$src\\\"></audio><img height=\\\"$height\\\" width=\\\"$width\\\" src=\\\"\" . \n\t\t\t\t$imageurl . \n\t\t\t\t\"\\\"/></a>\";\n\t\t\n\t}else{\n\t\t//in the autolinked glossary popup, JS is not run and embed fails. In that case we use an iframe justin 20120814 \n\t\tif($iframe){\n\t\t\t\t$returnString= fetchIFrameSWFWidgetCode('poodllminiplayer.lzx.swf9.swf',\n\t\t\t\t\t\t\t$params,$width,$height,'#FFFFFF');\n\t\t}else{\t\t\n \t\t\t$returnString= fetchSWFWidgetCode('poodllminiplayer.lzx.swf9.swf',\n\t\t\t\t\t\t\t$params,$width,$height,'#FFFFFF');\n\t\t}\n\t}\n\t\t\n\t\t\n\t\treturn $returnString;\n\n\n}", "title": "" }, { "docid": "d44d293cb492beeb0cd92a1f3594b85e", "score": "0.48344398", "text": "public static function usage()\r\n\t{\r\n\t\tob_start();\r\n?>\r\nAntenna is a plugin that will generate the exact, most up-to-date YouTube, Vimeo, Wistia, or Viddler embed code available. It also gives you access to the video’s title, its author, the author’s YouTube/Vimeo URL, and a thumbnail. All you have to do is pass it a single URL.\r\n\r\nYou can also output various pieces of metadata about the YouTube video.\r\n\r\n{exp:antenna url='{the_youtube_or_vimeo_url}' max_width=\"232\" max_height=\"323\" cache_minutes=\"120\" wmode=\"transparent|opaque|window\"}\r\n {embed_code}\r\n {video_title}\r\n {video_author}\r\n {video_author_url}\r\n {video_thumbnail}\r\n\r\n {!-- For Vimeo Only --}\r\n {video_description}\r\n\r\n\t{if embed_code}\r\n\t\tIt worked! {embed_code}\r\n\t{if:else}\r\n\t\tNo video to display here.\r\n\t{/if}\r\n\r\n{/exp:antenna}\r\n\r\nSet the max_width and/or max_height for whatever size your website requires. The video will be resized to be within those dimensions, and will stay at the correct proportions.\r\n\r\nThe optional wmode parameter can be used if you're experiencing issues positioning HTML content in front of the embedded media. It accepts values of transparent, opaque and window.\r\n\r\nIf used as a single tag, it returns the HTML embed/object code for the video. If used as a pair, you get access to the 5 variables above and can use them in conditionals.\r\n\r\nThe cache defaults to 1 week. It can be completely disabled by setting cache_minutes=\"0\".\r\n\r\nNote for Wistia users: Wistia doesn’t return as much data as the other providers, so not all of the above variables will work. Also, you may need to contact Wistia and ask them to enable \"oEmbed support\" on your account for this to work.\r\n\r\n<?php\r\n\t\t$buffer = ob_get_contents();\r\n\r\n\t\tob_end_clean();\r\n\r\n\t\treturn $buffer;\r\n\t}", "title": "" }, { "docid": "2a503e6777509b6d56233c57f30af15b", "score": "0.4833415", "text": "function clickfunnels_embed( $atts ) {\n $a = shortcode_atts( array(\n 'height' => '650',\n 'scroll' => 'on',\n 'url' => '<?php echo CF_API_URL ?>',\n ), $atts );\n\n return \"<iframe src='{$a['url']}' width='100%' height='{$a['height']}' frameborder='0' scrolling='{$a['scroll']}'></iframe>\";\n}", "title": "" }, { "docid": "d83d17aa883a412b38fb429bbf266bb8", "score": "0.48293358", "text": "public function your_theme_embed_filter( $output, $data, $url ) {\n\t\t\tif ( $data->type == 'video' ) {\n\t\t\t\t$return = '<figure class=\"box box-video\">'.$output.'</figure>';\n\t\t\t\treturn $return;\n\t\t\t}\n\t\t\tif ( $data->provider_name == 'Twitter' ) {\n\t\t\t\t$return = '<figure class=\"box box-tweet\">'.$output.'</figure>';\n\t\t\t\treturn $return;\t\t\n\t\t\t\t//echo print_r($data);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "5ad9ffacd4af2c4fc34285dc3d3cd871", "score": "0.48238906", "text": "function mace_download_embed_featured_media( $post_id ) {\n\t$embed_post = get_post( $post_id );\n\t$url = mace_get_first_url_in_content( $embed_post );\n\t$max_width = 1000; // Max thumbnail width.\n\tremove_filter( 'oembed_providers', '__return_empty_array' );\n\t$wp_oembed = new WP_oEmbed();\n\tadd_filter( 'oembed_providers', '__return_empty_array' );\n\t$provider_url = $wp_oembed->get_provider( $url );\n\t$img_url = '';\n\t$max_res_set = false;\n\n\tif ( ! empty( $provider_url ) ) {\n\t\t$json = file_get_contents( $provider_url . '?url=' . $url . '&maxwidth=' . $max_width . '&format=json' );\n\t\t$json = json_decode( $json );\n\t\t$img_url = $json->thumbnail_url;\n\t}\n\n\t// Special treatment for YT to try to get maxresdefault.jpg.\n\tif ( strpos( $url, 'youtube' ) || strpos( $url, 'youtu.be' ) ) {\n\t\t$max_res_yt_img_url = str_replace( 'hqdefault', 'maxresdefault', $img_url );\n\t\t$max_res_set = mace_sideload_featured_media( $max_res_yt_img_url, $post_id );\n\t}\n\n\tif ( ! empty( $img_url ) && ! $max_res_set ) {\n\t\tmace_sideload_featured_media( $img_url, $post_id );\n\t}\n}", "title": "" }, { "docid": "f47c69a2f68f0886925c23d62ac7a8fa", "score": "0.48221537", "text": "function the_comic_embed( $size = 'medium', $format = false ) {\n if ( !in_comic_category() )\n return; //Not a comic post\n \n $comic = get_the_comic();\n $object = get_comic_object( $comic, $size, true );\n \n switch ( $format ) {\n case 'bbcode': if ( !$comic->flash ) $output = '[url=' . $comic->link . '][img]' . get_option( 'home' ) . '?comic_object=' . $comic->ID . '/' . $size . '[/img][/url]'; else return; break;\n case 'html' : \n default : $output = htmlspecialchars( '<div class=\"embedded-comic\"><p>' . $object . '</p><p><cite><a href=\"' . $comic->link . '\" title=\"' . $comic->description . '\">' . $comic->title . '</a> | <a href=\"' . get_option( 'home' ) . '\" title=\"' . get_option( 'blogdescription' ) . '\">' . get_option( 'blogname' ) . '</a></cite></p></div>' ); break;\n }\n \n echo '<input class=\"comic-embed-code\" typ=\"text\" readonly=\"readonly\" value=\"' . $output . '\" />';\n}", "title": "" }, { "docid": "22dfddcaa86c07be11e1f560e44f6be2", "score": "0.48134363", "text": "public static function getEmbedCodeByUrl(string $url)\n {\n try {\n $data = static::getOembedJsonByUrl($url);\n if (array_key_exists('html', $data)) {\n return $data['html'];\n } else {\n throw new \\Exception(\"no_embed_code_found\", 1);\n }\n } catch (\\Exception $e) {\n throw $e;\n }\n }", "title": "" }, { "docid": "18717e08391305d381d9bec7a252040b", "score": "0.4810952", "text": "public function get($url, $options = array())\n {\n return $this->client->get($url, $options);\n }", "title": "" }, { "docid": "f0417a55d146ae56e92e871547193e03", "score": "0.4803623", "text": "function oet_display_medium_embed($attributes, $ajax = false){\n $html = \"\";\n $shortcodeText = \"\";\n \n if (!empty($attributes)) {\n extract($attributes);\n\n $shortcodeText = \"[oet_medium\";\n if (isset($attributes['url']) && $attributes['url']!==\"\")\n $shortcodeText .= sprintf(\" url='%s'\",esc_url($attributes['url']));\n if (isset($attributes['title']) && $attributes['title']!==\"\")\n $shortcodeText .= sprintf(\" title='%s'\",$attributes['title']);\n if (isset($attributes['description']) && $attributes['description']!==\"\")\n $shortcodeText .= sprintf(\" description='%s'\",$attributes['description']);\n if (isset($attributes['align']) && $attributes['align']!==\"\")\n $shortcodeText .= sprintf(\" align='%s'\",$attributes['align']);\n if (isset($attributes['textalign']) && $attributes['textalign']!==\"\")\n $shortcodeText .= sprintf(\" textalign='%s'\",$attributes['textalign']);\n if (isset($attributes['bgImage']) && $attributes['bgImage']!==\"\")\n $shortcodeText .= sprintf(\" image='%s'\",$attributes['bgImage']);\n if (isset($attributes['bgcolor']) && $attributes['bgcolor']!==\"\")\n $shortcodeText .= sprintf(\" bgcolor='%s'\",str_replace('#','',$attributes['bgcolor']));\n if (isset($attributes['authorurl']) && $attributes['authorurl']!==\"\")\n $shortcodeText .= sprintf(\" authorurl='%s'\",$attributes['authorurl']);\n if (isset($attributes['authorname']) && $attributes['authorname']!==\"\")\n $shortcodeText .= sprintf(\" authorname='%s'\",$attributes['authorname']);\n if (isset($attributes['authorlogo']) && $attributes['authorlogo']!==\"\")\n $shortcodeText .= sprintf(\" authorlogo='%s'\",$attributes['authorlogo']);\n if (isset($attributes['heading']) && $attributes['heading']!==\"\")\n $shortcodeText .= sprintf(\" heading='%s'\",$attributes['heading']);\n else\n $shortcodeText .= sprintf(\" heading='%s'\",\"h2\");\n $shortcodeText .= \"]\";\n\n if (isset($shortcodeText)){\n $html .= do_shortcode($shortcodeText);\n }\n }\n \n return $html;\n}", "title": "" }, { "docid": "3241f1bee8146838c0cfbc053824a7a6", "score": "0.47960806", "text": "protected function _get( $url, $vars = null ){\n \n $this->_curl($url, $vars, 'GET');\n \n }", "title": "" }, { "docid": "2884e12fbc70b0c78d08a108487f29fc", "score": "0.47807768", "text": "public function getEmbedUrl()\n {\n $this->embedUrl = '';\n if (empty($this->embedUrl)) {\n $oembed = $this->getOEmbedInfo($this->url);\n\n $this->embedUrl = (string) $oembed->html;\n\n $matched = preg_match('@src=\"([^\"\"]*)\"@', $oembed->html, $matches);\n\n $this->embedUrl = $matches[1];\n }\n\n return $this->embedUrl;\n }", "title": "" }, { "docid": "8c6887a2ff311454329f28ee9d974528", "score": "0.4766662", "text": "public function filter_embed_oembed_html( $return, $url, $attr ) {\n\t\t$parsed_url = wp_parse_url( $url );\n\t\tif ( false !== strpos( $parsed_url['host'], 'gfycat.com' ) ) {\n\t\t\tif ( preg_match( '/width=[\"\\']?(\\d+)/', $return, $matches ) ) {\n\t\t\t\t$attr['width'] = $matches[1];\n\t\t\t}\n\t\t\tif ( preg_match( '/height=[\"\\']?(\\d+)/', $return, $matches ) ) {\n\t\t\t\t$attr['height'] = $matches[1];\n\t\t\t}\n\n\t\t\tif ( empty( $attr['height'] ) ) {\n\t\t\t\treturn $return;\n\t\t\t}\n\n\t\t\t$attributes = wp_array_slice_assoc( $attr, [ 'width', 'height' ] );\n\n\t\t\tif ( empty( $attr['width'] ) ) {\n\t\t\t\t$attributes['layout'] = 'fixed-height';\n\t\t\t\t$attributes['width'] = 'auto';\n\t\t\t}\n\n\t\t\t$pieces = explode( '/detail/', $parsed_url['path'] );\n\t\t\tif ( ! isset( $pieces[1] ) ) {\n\t\t\t\tif ( ! preg_match( '/\\/([A-Za-z0-9]+)/', $parsed_url['path'], $matches ) ) {\n\t\t\t\t\treturn $return;\n\t\t\t\t}\n\t\t\t\t$attributes['data-gfyid'] = $matches[1];\n\t\t\t} else {\n\t\t\t\t$attributes['data-gfyid'] = $pieces[1];\n\t\t\t}\n\n\t\t\t$return = AMP_HTML_Utils::build_tag(\n\t\t\t\t'amp-gfycat',\n\t\t\t\t$attributes\n\t\t\t);\n\t\t}\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "a99237110ed08440b184dfb2f9bcc3ff", "score": "0.47661275", "text": "function fetch_sliderocket($id,$width=\"400\",$height=\"326\"){\n\t$ret=\"<iframe src=\\\"http://portal.sliderocket.com:80/app/fullplayer.aspx?id=$id\\\" \n\t\t\twidth=\\\"$width\\\" height=\\\"$height\\\" scrolling=no frameBorder=\\\"1\\\" style=\\\"border:1px solid #333333;border-bottom-style:none\\\">\n\t\t\t</iframe>\";\n\t\n\treturn $ret;\n}", "title": "" }, { "docid": "5d3ae4fa5e6baac9c31e520c5fcfa540", "score": "0.4758193", "text": "public function embeddedVideo($options = []) {\n\t\t$options = array_merge([\n\t\t\t'href' => '',\n\t\t\t'width' => 500\n\t\t\t\t], $_);\n\n\t\treturn <<<EOT\n\t<div class=\"fb-video\" \n\t data-href=\"{$options['href']}\" \n\t\tdata-width=\"{$options['width']}\">\n\t\t </div>\nEOT;\n\t}", "title": "" }, { "docid": "d01d7f26ddd1b33ee8a2be442a3a4998", "score": "0.47488898", "text": "function sp_add_video ($url, $width = 620, $height = 349) {\n\n\t$video_url = @parse_url($url);\n\t$output = '';\n\n\tif ( $video_url['host'] == 'www.youtube.com' || $video_url['host'] == 'youtube.com' ) {\n\t\tparse_str( @parse_url( $url, PHP_URL_QUERY ), $my_array_of_vars );\n\t\t$video = $my_array_of_vars['v'] ;\n\t\t$output .='<iframe width=\"'.$width.'\" height=\"'.$height.'\" src=\"http://www.youtube.com/embed/'.$video.'?rel=0\" frameborder=\"0\" allowfullscreen></iframe>';\n\t}\n\telseif( $video_url['host'] == 'www.youtu.be' || $video_url['host'] == 'youtu.be' ){\n\t\t$video = substr(@parse_url($url, PHP_URL_PATH), 1);\n\t\t$output .='<iframe width=\"'.$width.'\" height=\"'.$height.'\" src=\"http://www.youtube.com/embed/'.$video.'?rel=0\" frameborder=\"0\" allowfullscreen></iframe>';\n\t}\n\telseif( $video_url['host'] == 'www.vimeo.com' || $video_url['host'] == 'vimeo.com' ){\n\t\t$video = (int) substr(@parse_url($url, PHP_URL_PATH), 1);\n\t\t$output .='<iframe src=\"http://player.vimeo.com/video/'.$video.'\" width=\"'.$width.'\" height=\"'.$height.'\" frameborder=\"0\" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';\n\t}\n\telseif( $video_url['host'] == 'www.dailymotion.com' || $video_url['host'] == 'dailymotion.com' ){\n\t\t$video = substr(@parse_url($url, PHP_URL_PATH), 7);\n\t\t$video_id = strtok($video, '_');\n\t\t$output .='<iframe frameborder=\"0\" width=\"'.$width.'\" height=\"'.$height.'\" src=\"http://www.dailymotion.com/embed/video/'.$video_id.'\"></iframe>';\n\t}\n\n\treturn $output;\n}", "title": "" }, { "docid": "a3bf3baa0f34da90549aefd43a1c4928", "score": "0.47402263", "text": "function wrap_oembed_dataparse($return, $data, $url) {\n\t// write_log('get_oembed_dataparse-----------------------');\n\t// write_log('$data: ');\n\t// write_log($data);\n\t// write_log('$url: ');\n\t// write_log($url);\n\t// write_log('$return: ');\n\t// write_log($return);\n\n\t$mod = '';\n\n\tif ( ( $data->type == 'video' ) &&\n\t\t\t( isset($data->width) ) && ( isset($data->height) ) &&\n\t\t\t( round($data->height/$data->width, 2) == round( 3/4, 2) )\n\t\t)\n\t{\n\t\t$mod = 'embed-responsive--4-3';\n\t}\n\n\treturn '<div class=\"embed-responsive ' . $mod . '\">' . $return . '</div>';\n}", "title": "" }, { "docid": "a95821fa22abfcfb906bd880af6d4362", "score": "0.47389838", "text": "public function getArtwork(){\n $lookupURL = \"https://itunes.apple.com/lookup?id=\".$this->podcast_id.\"&entity=podcast\";\n \n $curl = curl_init();\n\n curl_setopt_array($curl, array(\n CURLOPT_URL => 'https://itunes.apple.com/lookup?id=1105760780&entity=podcast',\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => '',\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 0,\n CURLOPT_FOLLOWLOCATION => true,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => 'GET',\n ));\n\n $response = $this->object_to_array(json_decode(curl_exec($curl)));\n\n curl_close($curl);\n \n //Get the largest size image that iTunes will allow here\n $artworkURL = $response['results'][0]['artworkUrl600'];\n //return artwork url;\n return $artworkURL;\n \n }", "title": "" }, { "docid": "50d1d5ebc7475f289bc10eb39386a4b7", "score": "0.47380033", "text": "function get_page($options) {\n\n\t\t//Set options\n\t\tforeach($options AS $key=>$value) {\n\t\t\t$$key = $value;\n\t\t}\n\n\t\t$ch = curl_init();\n\t\t$ch = $this->init_curl($ch,$url);\n\t\t$page = curl_exec($ch);\n\t\tcurl_close($ch);\n\t\treturn $page;\n\n\n\t}", "title": "" }, { "docid": "4a2cc5021e1dd877b2fa74336bec397a", "score": "0.47363713", "text": "public function fetch_youtube_player($videoid,$size) {\n\t\tglobal $PAGE, $CFG;\n\t\t\n\t\t//if we don't have a video id, we return an empty string\n\t\tif(empty($videoid)){return \"\";}\n\t\t\n\t\t$PAGE->requires->js(new moodle_url('http://www.youtube.com/iframe_api'));\n\t\t\n\t\t//$playerid = \"ytplayer_\" . rand(100000, 999999);\n\t\t$playerid = $videoid;\n\n\t\t//get our size profile\n\t\tswitch($size){\n\t\t\tcase \"0\": $width=320;$height=240;break;\n\t\t\tcase \"160\": $width=160;$height=120;break;\n\t\t\tcase \"320\": $width=320;$height=240;break;\n\t\t\tcase \"480\": $width=480;$height=360;break;\n\t\t\tcase \"640\": $width=640;$height=480;break;\n\t\t\tcase \"800\": $width=800;$height=600;break;\n\t\t\tcase \"1024\": $width=1024;$height=768;break;\n\t\t\tdefault:$width=320;$height=240;\n\t\t}\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t//We need this so that we can require the JSON , for json stringify\n\t\t$jsmodule = array(\n\t\t\t'name' => 'assignsubmission_youtube',\n\t\t\t'fullpath' => '/mod/assign/submission/youtube/module.js',\n\t\t\t'requires' => array('json')\n\t\t);\n\t\t\n\t\t//configure our options array\n\t\t$opts = array(\n\t\t\t\"playerid\"=> $playerid,\n\t\t\t\"videoid\"=> $videoid,\n\t\t\t\"width\"=> $width,\n\t\t\t\"height\"=> $height\n\t\t);\n\t\t\n\t\t//setup our JS call\n\t\t\n\t\tif($size ==\"0\"){\n\t\t\t$PAGE->requires->js(new moodle_url($CFG->httpswwwroot . '/mod/assign/submission/youtube/module.js'));\n\t\t\t$callfunc = \"directLoadYTPlayer(\\\"$playerid\\\",$width,$height,\\\"$playerid\\\")\";\n\t\t\treturn \"<div id='$playerid' onclick='$callfunc'><a href='#$playerid'>\" . \n\t\t\t\tget_string('clicktoplayvideo', 'assignsubmission_youtube') \n\t\t\t\t. \"</a></div>\";\n\t\t\n //rely on Moodle to display it properly\n }elseif($size=='1'){\n \n $returnString = '<a href=\"http://www.youtube.com/v/' . $playerid . '\">youtube video</a>';\n return format_text($returnString, FORMAT_HTML, array('overflowdiv' => true, 'context' => $this->assignment->get_context()));\n\n }else{\n\t\t\t$PAGE->requires->js_init_call('M.assignsubmission_youtube.loadytplayer', array($opts),false,$jsmodule);\n\t\t\treturn \"<div id='$playerid'></div>\";\n\t\t}\n\t}", "title": "" }, { "docid": "f5cc729e9e54549d657ff9a3cd06315a", "score": "0.47336897", "text": "public function fetchFeedback(array $options = []) {\n // Gets NIDs for fetching corresponding feedback.\n $nids = [];\n if (!empty($options['filter_by_page'])) {\n $nids[] = $options['filter_by_page'];\n }\n else {\n $nids = $this->fetchFlaggedContent();\n }\n\n if (empty($nids)) {\n // Don't fetch anything, if no NIDs are given.\n return [\n 'results' => [],\n 'total' => 0,\n 'per_page' => $this->config->get('per_page'),\n // User is not watching content.\n 'is_watching_content' => FALSE,\n ];\n }\n else {\n // Fetches feedback from external API.\n try {\n // Looks up any sorting options, if available.\n if (!empty($options['sort_by'])) {\n $order_by = self::SORTING_VARIANTS[$options['sort_by']]['order_by'];\n $desc = self::SORTING_VARIANTS[$options['sort_by']]['desc'];\n }\n // Provides default sorting variant, if none is specified.\n else {\n $order_by = 'submit_date';\n $desc = 'true';\n }\n\n // Looks up filter_by_info_found option.\n $info_found = NULL;\n if (isset($options['filter_by_info_found'])) {\n if ($options['filter_by_info_found'] == 1) {\n $info_found = 'true';\n }\n elseif ($options['filter_by_info_found'] == 0) {\n $info_found = 'false';\n }\n }\n\n $request = $this->httpClient->get(self::EXTERNAL_API_CONFIG['api_endpoints']['feedback_endpoint'], [\n 'json' => [\n 'node_id' => $nids,\n // Filters by tag, if available.\n 'tag_id' => (!empty($options['filter_by_tag'])) ? $options['filter_by_tag'] : NULL,\n // Sorts results, if order is specified.\n 'order_by' => $order_by,\n 'desc' => $desc,\n // Filters by info_found, if available.\n 'info_found' => $info_found,\n // Logs current user ID as the requester.\n 'author_id' => $this->currentUser->id(),\n // Per-page amount is set in config.\n 'per_page' => $this->config->get('per_page'),\n // Page needs to be incremented by 1.\n // Drupal indexes starting at 0, whereas API indexes starting at 1.\n 'page' => (!empty($options['page'])) ? $options['page'] + 1 : 1,\n ],\n ]);\n return Json::decode($request->getBody()) + [\n 'per_page' => $this->config->get('per_page'),\n // User is watching content.\n 'is_watching_content' => TRUE,\n ];\n }\n catch (RequestException $e) {\n $this->handleRequestException($e);\n return [];\n }\n }\n }", "title": "" }, { "docid": "c65ee35251d4ec030451567d340f3dc8", "score": "0.47320834", "text": "public static function getOembedUrl(string $url, string $format = 'json', string $protocol = 'https')\n {\n switch (static::getProviderByUrl($url)) {\n case 'soundcloud':\n return option('tasinttttttt.oembed.oembedApis.soundcloud') . \"?format=${format}&url=${url}\";\n case 'twitch':\n return option('tasinttttttt.oembed.oembedApis.twitch') . \"format=${format}&url=${url}\";\n case 'vimeo':\n return option('tasinttttttt.oembed.oembedApis.vimeo') . \"?format=${format}&url=${url}\";\n case 'youtube':\n return option('tasinttttttt.oembed.oembedApis.youtube') . \"?format=${format}&url=${url}\";\n default:\n return '';\n }\n }", "title": "" }, { "docid": "e43f00fc66e8f2665f84fe59e6a3860b", "score": "0.4728671", "text": "function custom_feed_url_get_options() {\n\t$options = get_option( 'custom_feed_url' );\n\treturn custom_feed_url_sanitize_options($options);\n}", "title": "" }, { "docid": "82edf85c4867eb708b03f59bf6bbd6e5", "score": "0.47221515", "text": "public function twitter_oembed($a) {\n\t\t $a['#http(s)?://(www\\.)?twitter.com/.+?/status(es)?/.*#i'] = array( 'http://api.twitter.com/1/statuses/oembed.{format}', true);\n\t\t return $a;\n\t\t}", "title": "" }, { "docid": "6637d617ae64abc5636f3eb995a35e39", "score": "0.47202194", "text": "function su_youtube_advanced_func( $atts ) {\r\n\r\n $a = shortcode_atts( array( \r\n 'url' => 'url',\r\n 'autohide' => 'autohide',\r\n 'https' => 'https',\r\n 'class' => 'class',\r\n ), $atts );\r\n // $a['url'], $a['autohide'], $a['https'], $a['class']\r\n $vid = explode( \"/\", $a['url'] );\r\n $video_id = count($vid) - 1;\r\n \r\n $exp_vid = explode( \"=\", $vid[$video_id] );\r\n if( count( $exp_vid ) > 1 ) {\r\n // not using the embed URL\r\n $youtubeid = $exp_vid[count( $exp_vid ) - 1];\r\n } else {\r\n // using the embed URL\r\n $youtubeid = $vid[$video_id];\r\n }\r\n\r\n // check if site requested is secured\r\n if( $a['https'] == 'yes' ) {\r\n $secured = 'https';\r\n } else {\r\n $secured = 'http';\r\n }\r\n\r\n // download thumbnail\r\n spk_download_youtube_thumb( $youtubeid );\r\n\r\n // NOTE: browser caching retains the same image even after replacement\r\n $ytthumb_w_ver = plugins_url( \"../images/youtubethumbs/0/\".$youtubeid.\".jpg\", __FILE__ ); //.\"?\".date( 'YmdHis', filemtime( plugin_dir_path( __FILE__ ).\"../images/youtubethumbs/0/\".$youtubeid.\".jpg\" ) );\r\n // <!--img src=\"'.$secured.'://img.youtube.com/vi/'.$youtubeid.'/0.jpg\" class=\"thumbnail\" id=\"thumbnail_'.$youtubeid.'\" / -->\r\n $return = '<div class=\"module-video\" id=\"'.$youtubeid.'\">\r\n <div class=\"video-image\" id=\"video_image_'.$youtubeid.'\"><div class=\"module-wrap\">\r\n <div class=\"video-play\" id=\"video_play_'.$youtubeid.'\"></div>\r\n <img src=\"'.$ytthumb_w_ver.'\" class=\"thumbnail\" id=\"thumbnail_'.$youtubeid.'\" />\r\n </div></div>\r\n </div>';\r\n \r\n return $return;\r\n \r\n}", "title": "" }, { "docid": "6a3e6c516ebaf4e1c59294ec3eb29f91", "score": "0.47194123", "text": "function fetchSimpleAudioPlayer($runtime, $rtmp_file, $protocol=\"\", $width=\"450\",$height=\"25\",\n\t\t\t\t\t\t\t\t\t\t$embed=false, $embedstring=\"Play\",$permitfullscreen=false,\n\t\t\t\t\t\t\t\t\t\t$usepoodlldata=false, $splashurl=''){\nglobal $CFG, $USER, $COURSE;\n\n//Set our servername .\n$flvserver = $CFG->poodll_media_server;\n$courseid= $COURSE->id;\n$useplayer=$CFG->filter_poodll_defaultplayer;\n\n//determine if we are on a mobile device or not\n $ismobile = isMobile($CFG->filter_poodll_html5play);\n\n\t//Set our use protocol type\n\t//if one was not passed, then it may have been tagged to the url\n\t//this was the old way.\n\tif ($protocol==\"\"){\n\t\t$type = \"rtmp\";\n\t\tif (strlen($rtmp_file) > 5){\n\t\t\t$protocol = substr($rtmp_file,0,5);\n\t\t\tswitch ($protocol){\n\t\t\t\tcase \"yutu:\":\n\t\t\t\t\t$rtmp_file = substr($rtmp_file,5);\n\t\t\t\t\t$rtmp_file = getYoutubeLink($rtmp_file);\n\t\t\t\t\t$type=\"http\";\n\t\t\t\t\tbreak;\t\t\t\n\t\t\t\tcase \"http:\":\n\t\t\t\t\t$rtmp_file = substr($rtmp_file,5);\n\t\t\t\t\t$type=\"http\";\n\t\t\t\t\tbreak;\t\t\n\t\t\t\tcase \"rtmp:\":\n\t\t\t\t\t$rtmp_file = substr($rtmp_file,5);\n\t\t\t\tdefault:\n\t\t\t\t\t$type=\"rtmp\";\t\t\t\t\n\n\t\t\t}\n\t\t\n\t\t}//end of if strlen(rtmpfile) > 4\n\n\t//If we have one passed in, lets set it to our type\n\t}else{\n\t\tswitch ($protocol){\n\t\t\t\tcase \"yutu\":\n\t\t\t\t\t$rtmp_file = getYoutubeLink($rtmp_file);\n\t\t\t\t\t$type=\"http\";\n\t\t\t\t\tbreak;\t\t\t\n\t\t\t\tcase \"http\":\n\t\t\t\tcase \"rtmp\":\n\t\t\t\tcase \"legacy\":\n\t\t\t\tdefault:\n\t\t\t\t\t$type=$protocol;\t\t\t\t\n\n\t\t\t}\n\t}\n\n\t//some common variables for the embedding stage.\t\n\t//$playerLoc = $CFG->wwwroot . '/filter/poodll/flash/poodllaudioplayer.lzx.swf9.swf';\n\n\t//If we are using the legacy coursefiles, we want to fall into this code\n\t//this is just a temporary fix to achieve this. Justin 20111213\n\tif($protocol=='rtmp' || $protocol=='legacy'){\n\t\t$rtmp_file= $CFG->wwwroot . \"/file.php/\" . $courseid . \"/\" . $rtmp_file;\n $type = 'http';\n\t//if using poodlldata, take stub from base dir + poodlldatadir then add file name/path\t\n\t}else if($usepoodlldata){\n\t\t$baseURL = $CFG->{'wwwroot'} . \"/\" . $CFG->{'filter_poodll_datadir'} . \"/\" ;\n\t\t$rtmp_file = $baseURL . $rtmp_file;\n\t}\n\t\n\t//If we want to avoid loading many players per page, this loads the player only after a text link is clicked\n\t//it uses the poodll player and only works if the file is an flv, otherwise it just proceeds as usual\n\t\n\t//I quit loading javascript.php in head, so loadAudioPlayer won't work. I think noone uses it anyway. hence added if \"false\"\n\t//Justin 20130406\n\tif (false && $embed && substr($rtmp_file,-4)=='.flv'){\n\t\t$lzid = \"lzapp_audioplayer_\" . rand(100000, 999999) ;\n\t\t$returnString=\"\t\t\n\t\t <div id='$lzid' class='player'>\n <a href='#' onclick=\\\"javascript:loadAudioPlayer('$rtmp_file', '$lzid', 'sample_$lzid', '$width', '$height'); return false;\\\">$embedstring </a>\n </div>\t\t\n\t\t\";\n\t\treturn $returnString;\n\t}\n\t//if we are using javascript to detect and insert (probably best..?)\t\n\t\n\t\t$params = array();\n\t\t$params['red5url'] = urlencode($flvserver);\n\t\t$params['playertype'] = $type;\n\t\t$params['mediapath'] = $rtmp_file;\n\t\t$params['permitfullscreen'] = $permitfullscreen;\n\t\t\n\t\t\n\t\t//establish the fileextension\n\t\t$ext = substr($rtmp_file,-3);\n\t\n\t\t//if we are on mobile we want to play mp3 using html5 tags\n\t\t//if we have a file type that flash wont play, default to runtime = js\n\t\tif($runtime=='auto' ){\n\t\t\tif($ismobile){\t\t\n\t\t\t\t\t$runtime='js';\n\t\t\t}else if($ext=='3gp' || $ext=='ebm' || $ext=='3g2'){\n\t\t\t\t\t$runtime='js';\n\t\t\t}else{\n\t\t\t\t\t$runtime='swf';\n\t\t\t}\n\t\t}//end of if runtime=auto\n\n\t\n\t\n\t\tif($runtime=='js' && ($CFG->filter_poodll_html5controls=='native')){\n\t\t\t\t$returnString=\"\";\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//the $rtmp_file as it comes from assignment and questions, is urlencoded, we need to decode \n\t\t\t\t//or html 5 playback will fail Justin 20121016\n\t\t\t\t$rtmp_file = urldecode($rtmp_file);\n\t\t\t\t\n\t\t\t\t//figure out the mime type by the extension\n\t\t\t\t$mime = \"\";\n\t\t\t\tswitch($ext){\n\t\t\t\t\tcase \"mov\":\n\t\t\t\t\tcase \"mp4\": $mime = \"video/mp4\"; break;\n\t\t\t\t\tcase \"3gp\": $mime = \"video/3gpp\"; break;\n\t\t\t\t\tcase \"3g2\": $mime = \"video/3gpp2\"; break;\n\t\t\t\t\tcase \"ebm\": $mime = \"video/webm\"; break;\n\t\t\t\t\tdefault: $mime = \"video/mp4\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//The HTML5 Code (can be used on its own OR with the mediaelement code below it\n\t\t\t\t$returnString .=\"<audio controls width='\" . $width . \"' height='\" . $height . \"'>\n\t\t\t\t\t\t\t\t<source type='\" . $mime . \"' src='\" .$rtmp_file . \"'/>\n\t\t\t\t\t\t\t\t</audio>\";\n\t\t\t\t\n\t\t\t\t//=======================\n\t\t\t\t//if we are using mediaelement js use this. We use JQuery which is not ideal, in moodle yui environment\n\t\t\t\t/*\n\t\t\t\t$mediajsroot = $CFG->wwwroot . '/filter/poodll/js/mediaelementjs/';\n\t\t\t\t$returnString .=\"<script src='\" . $mediajsroot . \"jquery.js'></script>\";\n\t\t\t\t$returnString .=\"<script src='\" . $mediajsroot . \"mediaelement-and-player.min.js'></script>\";\n\t\t\t\t$returnString .=\"<link rel='stylesheet' href='\" . $mediajsroot . \"mediaelementplayer.css' />\t\";\n\t\t\t\t$returnString .=\"<script src='\" . $mediajsroot . \"mep-feature-loop.js'></script>\";\n\t\t\t\t$returnString .=\"<script src='\" . $mediajsroot . \"mep-feature-speed.js'></script>\";\n\t\t\t\t$returnString .=\"<script src='\" . $mediajsroot . \"mep-feature-progress.js'></script>\";\n\t\t\t\t//$returnString .=\"<script>$('audio,video').mediaelementplayer({features:['playpause','loop','speed','progess','volume']});</script>\";\n\t\t\t\t$returnString .=\"<script>$('audio,video').mediaelementplayer();</script>\";\n\t\t\t\t*/\n\t\t\t//=======================\n\t\t\t\n\t\t\t\n\t\t\t\t//=======================\n\t\t\t\t//If we use Kaltura, use this\t\t\t\n\t\t\t\t//$returnString .=\"<script src='http://html5.kaltura.org/js'></script>\";\n\t\t\t\t//=======================\n\t\t\n\t\t//if we are using SWF\t\t\n\t\t}else{\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//Flowplayer\n\t\t\t\tif($useplayer==\"fp\" || $CFG->filter_poodll_html5controls==\"js\"){\n\t\t\t\t\t\n\t\t\t\t\t$returnString= fetchFlowPlayerCode($width,$height,$rtmp_file,\"audio\",$ismobile,\"\",false,$splashurl);\n\t\t\t\t\n\t\t\t\t//JW player\n\t\t\t\t} else if($useplayer==\"jw\"){\n\t\t\t\t\t$flashvars = array();\n\t\t\t\t\t$flashvars['file'] = $rtmp_file;\n\t\t\t\t\t$flashvars['autostart'] = 'false';\n\t\t\t\t\t$returnString= fetchSWFObjectWidgetCode('jwplayer.swf',\n\t\t\t\t\t\t\t\t$flashvars,$width,$height,'#FFFFFF');\n\t\t\t\t\n\t\t\t\t//if the file is an mp3, and we are using poodll player, don't handle it\n\t\t\t\t//either pass it to multi media plugin filter or pass it flowplayer\n\t\t\t\t// PoodLL player can't mp3 without RTMP\n\t\t\t\t}else if(substr($rtmp_file,-4)=='.mp3'){\n\t\t\t\t\t\n\t\t\t\t\t$returnString= fetchFlowPlayerCode($width,$height,$rtmp_file,\"audio\",$ismobile);\n\t\t\t\t\t//$returnString= \"<a href=\\\"$rtmp_file\\\">$rtmp_file</a>\";\n\t\t\t\t\n\t\t\t\t//PoodLL Player\n\t\t\t\t}else{\n\t\t\t\t\t\n\t\t\t\t\t$returnString= fetchSWFWidgetCode('poodllaudioplayer.lzx.swf9.swf',\n\t\t\t\t\t\t\t\t$params,$width,$height,'#FFFFFF');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//regardless of swf player, add a download icon if appropriate\n\t\t\t\t$context = context_course::instance($COURSE->id);\n\t\t\t\t$has_permission = has_capability('filter/poodll:candownloadmedia', $context);\n\t\t\t\tif($CFG->filter_poodll_download_media_ok && $has_permission){\n\t\t\t\t\t$returnString .= \"<a href='\" . urldecode($rtmp_file) . \"'>\" \n\t\t\t\t\t\t\t\t\t\t\t\t\t. \"&nbsp;<img src='\" . $CFG->{'wwwroot'} . \"/filter/poodll/pix/download.gif' alt='download' />\" \n\t\t\t\t\t\t\t\t\t\t\t\t\t.\"</a>\";\n\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t}\n \t\t\t\t\t\t\n \treturn $returnString;\n}", "title": "" }, { "docid": "f9272722dcd1a6191210363d0ba46b7c", "score": "0.4714873", "text": "function embed_yt_func(array $atts) {\n $out = '';\n $a = shortcode_atts( array(\n 'id' => '',\n ), $atts );\n $opts = implode(\"&\", array(\n \"color=white\",\n \"rel=0\",\n \"showinfo=0\"\n ));\n $id = $a['id'];\n $src = \"https://www.youtube.com/embed/{$id}?{$opts}\";\n \n $out .= '<div class=\"iframe-container\">';\n $out .= \"<iframe class=\\\"iframe\\\" src={$src} frameborder=\\\"0\\\" allow=\\\"autoplay; encrypted-media\\\" allowfullscreen></iframe>\";\n $out .= '</div>';\n\n return $out;\n }", "title": "" }, { "docid": "52f5b25032a49b919716d766da9b0ed9", "score": "0.47148067", "text": "public function options($url, array $headers = array(), $datas = array(), array $files = array());", "title": "" }, { "docid": "6b20132d85ccfd94117e49bb97768813", "score": "0.47100335", "text": "function wrap_embed_with_div($html, $url, $attr) {\n return '<div class=\"video_container\">' . $html . '</div>';\n}", "title": "" }, { "docid": "85e1b97722fea756609b423a09e31314", "score": "0.46993592", "text": "public function embedAll( array $urls, array $options = [ ]) {\n\n\t\t$medias = [ ];\n\n\t\tforeach ( $urls as $url ) {\n\t\t\t$medias[ $url ] = $this->embed( $url, $options );\n\t\t}\n\n\t\treturn $medias;\n\t}", "title": "" }, { "docid": "a16a7f3eadda4c039a50d6078ac842d9", "score": "0.4699312", "text": "function remote_request_wikipage( $url, $update ) {\n\n if ( ! $this->pass_url_check( $url ) ) {\n return \"This url does not meet the site security guidelines.\";\n }\n\n $wikiembed_id = $this->get_page_id( $url, false, false, false, false, false ); // just the url gets converted to the id \n $wiki_page_body = (empty($update) || !is_numeric($update))? false : $this->get_cache( $wikiembed_id );\n // grab the content from the cache\n \n $isExpired = true;\n if(is_array($this->wikiembeds)){\n if(array_key_exists($wikiembed_id,$this->wikiembeds)){\n if(is_array($this->wikiembeds[$wikiembed_id])){\n try{\n $isExpired = ($this->wikiembeds[$wikiembed_id]['expires_on'] < time());\n }catch (Exception $e) {\n //ignore error\n }\n } \n } \n }\n\n if ( false === $wiki_page_body || $isExpired ) {\n // else return the \n $wiki_page = wp_remote_request( $this->action_url( $url ) );\n\n if ( ! is_wp_error( $wiki_page ) ) {\n $wiki_page_body = $this->rudermentory_check( $wiki_page );\n\n if ( ! $wiki_page_body ) {\n return false;\n }\n } else {\n // an error occured try getting the content again\n $wiki_page = wp_remote_request( $this->action_url($url) );\n if ( ! is_wp_error( $wiki_page ) ) {\n $wiki_page_body = $this->rudermentory_check( $wiki_page );\n\n if ( ! $wiki_page_body ) {\n return false;\n }\n } else {\n return false;// error occured while fetching content \n }\n }\n\n // make sure that we are UTF-8\n if ( function_exists('mb_convert_encoding') ) {\n $wiki_page_body = mb_convert_encoding( $wiki_page_body, 'HTML-ENTITIES', \"UTF-8\" ); \n }\n\n // cache the result\n $wiki_page_body = $this->make_safe( $wiki_page_body );\n $this->update_cache( $wikiembed_id, $wiki_page_body, $update );\n }\n\n return $wiki_page_body;\n }", "title": "" }, { "docid": "feb9520c42eec268df171fe9b79f6bf3", "score": "0.46932802", "text": "public function actionOembed()\n {\n $providers = UrlOembed::getProviders();\n return $this->render('oembed', array('providers' => $providers));\n }", "title": "" }, { "docid": "2475e62ff7d795033f4c7bb3223bffbf", "score": "0.46907708", "text": "public function getEmbedByID($embedID, $options = []) {\n $params = [\":embedID\" => $embedID];\n $sql = \"SELECT * from \".$this->tables['treeEmbed'].\" WHERE\n embedID = :embedID\";\n\n // if a treeID was passed, append it to the params and sql statement\n if(isset($options['treeID']) && Utility\\isID($options['treeID'])) {\n $params[\":treeID\"] = $options['treeID'];\n $sql .= \" AND treeID = :treeID\";\n }\n\n // if a siteID was passed, append it to the params and sql statement\n if(isset($options['siteID']) && Utility\\isID($options['siteID'])) {\n $params[\":siteID\"] = $options['siteID'];\n $sql .= \" AND siteID = :siteID\";\n }\n // return the found state type row\n return $this->fetchOne($sql, $params);\n }", "title": "" }, { "docid": "af401216e790d630b3887180e56a68d2", "score": "0.46837607", "text": "function media_get_details(&$media, $width = '110', $height = '110', $mode = 'constrain')\r\n{\r\n // Set source_path, source_url\r\n $media['source_url'] = media_url($media['media_id'], $media['path'], $media['type'], '', '', 'original');\r\n\r\n // Get dimensions\r\n list($dest_x, $dest_y) = media_dimensions($media['width'], $media['height'], $width, $height, $mode);\r\n\r\n // Set thumb_path and thumb_url\r\n switch ($GLOBALS['PROPS_MEDIA_TYPES'][$media['type']]['group_id']) {\r\n case PROPS_MEDIA_GRAPHICS:\r\n\r\n $media['thumb_url'] = media_url($media['media_id'], $media['path'], $media['type'], $width, $height, $mode);\r\n \r\n $media['thumb_html'] = $media['embedded'] =\r\n sprintf('<img src=\"%s\" width=\"%s\" height=\"%s\" alt=\"%s\" />',\r\n $media['thumb_url'], $dest_x, $dest_y,\r\n htmlspecialchars($media['caption']));\r\n \r\n break;\r\n\r\n case PROPS_MEDIA_AUDIO:\r\n\r\n $media['thumb_url'] = props_getkey('config.url.media').$GLOBALS['PROPS_MEDIA_TYPES'][$media['type']]['icon'];\r\n \r\n $media['thumb_html'] =\r\n sprintf('<img src=\"%s\" width=\"%s\" height=\"%s\" alt=\"%s\" />',\r\n $media['thumb_url'], $dest_x, $dest_y,\r\n htmlspecialchars($media['caption']));\r\n\r\n $media['embedded'] =\r\n '<p id=\"media'.$media['media_id'].'\"><a href=\"http://www.macromedia.com/go/getflashplayer\">Get the Flash Player</a> to see this player.</p>'.LF\r\n .'<script type=\"text/javascript\">'.LF\r\n .' var playerObj'.$media['media_id'].' = new SWFObject(\"'.props_getkey('config.url.scripts').'mediaplayer.swf\",\"single\",\"'.$dest_x.'\",\"'.$dest_y.'\",\"7\");'.LF\r\n .' playerObj'.$media['media_id'].'.addVariable(\"file\",\"'.$media['source_url'].'\");'.LF\r\n .' playerObj'.$media['media_id'].'.addVariable(\"image\",\"'.$media['thumb_url'].'\");'.LF\r\n .' playerObj'.$media['media_id'].'.addVariable(\"displayheight\",\"'.$dest_y.'\");'.LF\r\n .' playerObj'.$media['media_id'].'.addParam(\"allowfullscreen\",\"false\");'.LF\r\n .' playerObj'.$media['media_id'].'.addVariable(\"showeq\",\"true\");'.LF\r\n .' playerObj'.$media['media_id'].'.addVariable(\"backcolor\",\"0x000000\");'.LF\r\n .' playerObj'.$media['media_id'].'.addVariable(\"frontcolor\",\"0xCCCCCC\");'.LF\r\n .' playerObj'.$media['media_id'].'.addVariable(\"lightcolor\",\"0x996600\");'.LF\r\n .' playerObj'.$media['media_id'].'.write(\"media'.$media['media_id'].'\");'.LF\r\n .'</script>'.LF;\r\n\r\n break;\r\n\r\n case PROPS_MEDIA_VIDEO:\r\n\r\n // Construct locations\r\n $media['thumb_url'] = media_url($media['media_id'], $media['path'], $media['type'], $width, $height, $mode);\r\n\r\n $media['thumb_html'] = \r\n sprintf('<img src=\"%s\" width=\"%s\" height=\"%s\" alt=\"%s\" />',\r\n $media['thumb_url'], $dest_x, $dest_y,\r\n htmlspecialchars($media['caption']));\r\n\r\n $media['embedded'] =\r\n '<p id=\"media'.$media['media_id'].'\"><a href=\"http://www.macromedia.com/go/getflashplayer\">Get the Flash Player</a> to see this player.</p>'.LF\r\n .'<script type=\"text/javascript\">'.LF\r\n .' var playerObj'.$media['media_id'].' = new SWFObject(\"'.props_getkey('config.url.scripts').'mediaplayer.swf\",\"single\",\"'.$dest_x.'\",\"'.$dest_y.'\",\"7\");'.LF\r\n .' playerObj'.$media['media_id'].'.addVariable(\"file\",\"'.$media['source_url'].'\");'.LF\r\n .' playerObj'.$media['media_id'].'.addVariable(\"image\",\"'.$media['thumb_url'].'\");'.LF\r\n .' playerObj'.$media['media_id'].'.addVariable(\"displayheight\",\"'.$dest_y.'\");'.LF\r\n .' playerObj'.$media['media_id'].'.addVariable(\"backcolor\",\"0x000000\");'.LF\r\n .' playerObj'.$media['media_id'].'.addVariable(\"frontcolor\",\"0xCCCCCC\");'.LF\r\n .' playerObj'.$media['media_id'].'.addVariable(\"lightcolor\",\"0x996600\");'.LF\r\n .' playerObj'.$media['media_id'].'.write(\"media'.$media['media_id'].'\");'.LF\r\n .'</script>'.LF;\r\n\r\n break;\r\n }\r\n}", "title": "" }, { "docid": "9f0d0b258dc6eea4b42124bd11932469", "score": "0.46797636", "text": "function blipTvGetThumbnail($option)\r\n\t{\r\n\t\tif (isset($option)) {\r\n\r\n\t\t\t$url = \"http://blip.tv/file/\".$option.\"?skin=rss\";\r\n\t\t\t$url = hwd_vs_tools::get_final_url( $url );\r\n\r\n\t\t\tif (function_exists('curl_init')) {\r\n\r\n\t\t\t\t$curl_handle=curl_init();\r\n\t\t\t\tcurl_setopt($curl_handle,CURLOPT_URL,$url);\r\n\t\t\t\tcurl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,2);\r\n\t\t\t\tcurl_setopt($curl_handle,CURLOPT_RETURNTRANSFER,1);\r\n\t\t\t\t$buffer = curl_exec($curl_handle);\r\n\t\t\t\tcurl_close($curl_handle);\r\n\r\n\t\t\t\tif (empty($buffer))\t{\r\n\t\t\t\t\t$code = \"\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$pos_e_search = strpos($buffer, $option[0]);\r\n\r\n\t\t\t\t\tif ($pos_e_search === false) {\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t} else if ($pos_e_search) {\r\n\t\t\t\t\t\t$pos_tn_start = strpos($buffer, \"<blip:smallThumbnail>\", $pos_e_search);\r\n\t\t\t\t\t\t$pos_tn_start = $pos_tn_start+21;\r\n\t\t\t\t\t\t$pos_tn_end = strpos($buffer, '</blip:smallThumbnail>', $pos_tn_start);\r\n\t\t\t\t\t\tif ($pos_tn_end === false) {\r\n\t\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$length = $pos_tn_end - $pos_tn_start;\r\n\r\n\t\t\t\t\t\t$code = substr($buffer, $pos_tn_start, $length);\r\n\t\t\t\t\t\t$code = strip_tags($code);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if (function_exists('get_meta_tags')) {\r\n\t\t\t\t$code = \"\";\r\n\t\t\t} else {\r\n\t\t\t\t$code = \"\";\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t$thumbnail = $code;\r\n\t\t$thumbnail = trim(strip_tags($thumbnail));\r\n\t\treturn $thumbnail;\r\n\t}", "title": "" }, { "docid": "f7046b86c1e67e79723e6994ff3fd745", "score": "0.4679579", "text": "function getHbeMusicFileYoutubeEmbedUrl($url){\n\tpreg_match('![?&]{1}v=([^&]+)!', $url . '&', $m);\n\treturn \"https://www.youtube.com/embed/\".$m[1].\"?autoplay=1&wmode=transparent\";\n}", "title": "" }, { "docid": "630c06f18581d36c269ff87b52009952", "score": "0.4676109", "text": "function wrap_embed_with_div($html, $url, $attr) {\n return '<div class=\"video-container\">' . $html . '</div>';\n}", "title": "" }, { "docid": "6790a91477263176572a34976e033834", "score": "0.467537", "text": "function get($url, $vars = array()) {\n if (!empty($vars)) {\n $url .= (stripos($url, '?') !== false) ? '&' : '?';\n $url .= (is_string($vars)) ? $vars : http_build_query($vars, '', '&');\n }\n return $this->request('GET', $url);\n }", "title": "" }, { "docid": "219d780003798263f9174650026669fd", "score": "0.46751702", "text": "public function getEmbedByPath($embedPath, $options = []) {\n $params = [\n \":embedPath\" => $embedPath,\n ];\n $sql = \"SELECT * from \".$this->tables['treeEmbed'].\" WHERE\n embedPath = :embedPath\";\n\n // if a treeID was passed, append it to the params and sql statement\n if(isset($options['treeID']) && Utility\\isID($options['treeID'])) {\n $params[\":treeID\"] = $options['treeID'];\n $sql .= \" AND treeID = :treeID\";\n }\n\n // if a treeID was passed, append it to the params and sql statement\n if(isset($options['siteID']) && Utility\\isID($options['siteID'])) {\n $params[\":siteID\"] = $options['siteID'];\n $sql .= \" AND siteID = :siteID\";\n }\n // return the found interaction type row\n return $this->fetchOne($sql, $params);\n }", "title": "" }, { "docid": "7eb28335a5d8b0f21172dfb2719ed273", "score": "0.46730882", "text": "public static function get(string $url, array $options = []) : Promise {\n\n $ops = $options;\n $ops['url'] = $url;\n\n return http::request($ops);\n }", "title": "" }, { "docid": "8dbeea292ff760a235ab7a20986ada0c", "score": "0.467195", "text": "function fetch_wordplayer($runtime, $src,$word,$fontsize, $protocol=\"http\", $width=\"0\",$height=\"0\",$iframe=false){\n\nglobal $CFG, $COURSE;\n\n\t\t//support legacy files, just in case we have an old timer ...\n\t\tif($protocol=='rtmp' || $protocol=='legacy'){\n\t\t\t$src= $CFG->wwwroot . \"/file.php/\" . $COURSE->id . \"/\" . $src;\n\t\t\t$type = 'http';\n\t\t}\n\n\t\t//fontsize if not passed in is set to the filtersettings default\n\t\tif ($fontsize==0){\n\t\t\t$fontsize = $CFG->filter_poodll_wordplayerfontsize;\n\t\t}\n\t\t\n\t\tif($width ==0 || $height == 0){\n\t\t\t$height=$fontsize + (int)($fontsize * 0.5);\n\t\t\t$width=(int)($fontsize * 0.8) * strlen($word);\n\t\t}\n\t\t\n\t\t$params = array();\n\t\t//$params['red5url'] = urlencode($flvserver);\n\t\t$params['src']=urlencode($src);\n\t\t$params['word']= $word;\n\t\t$params['fontsize']= $fontsize;\n\t\n\t\t//depending on runtime, we show a SWF or html5 player\t\t\t\t\t\n\t\tif($runtime==\"js\" || ($runtime==\"auto\" && isMobile($CFG->filter_poodll_html5play))){\n\t\t\n\t\t\t//the $src url as it comes from assignment and questions, is urlencoded,\n\t\t\t//unlikely to arrive here encoded, but lets just be safe \n\t\t\t//or html 5 playback will fail Justin 20121016\n\t\t\t$src= urldecode($src);\n\t\t\n\t\t\t$returnString= \"<a onclick=\\\"this.firstChild.play()\\\"><audio src=\\\"$src\\\"></audio>$word</a>\";\n\t\t\n\t\t}else{\n\t\t\t//in the autolinked glossary popup, JS is not run and embed fails. In that case we use an iframe justin 20120814 \n\t\t\tif($iframe){\n\t\t\t\t$returnString= fetchIFrameSWFWidgetCode('poodllwordplayer.lzx.swf9.swf',\n\t\t\t\t\t\t\t$params,$width,$height,'#FFFFFF');\n\t\t\t}else{\n\t\t\t\t$returnString= fetchSWFWidgetCode('poodllwordplayer.lzx.swf9.swf',\n\t\t\t\t\t\t\t$params,$width,$height,'#FFFFFF');\n\t\t\t}\n\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n \t\t\t\t\t\t\n \treturn $returnString;\n\n\n}", "title": "" }, { "docid": "61788cc189f2ae4538821707460677bb", "score": "0.4663918", "text": "public function embedVideo($song_url, $type = 'iframe', $width = null, $height = null){\n\n\t\t$app = JFactory::getApplication();\n\t\t$params \t= $app->getParams();\n\t\t$document \t= JFactory::getDocument();\n\n\t\t$rel\t\t= null;\n\t\t$iframe \t= null;\n\t\t$html \t\t= false;\n\t\t$width \t\t= ($width != null) ? $width : $params->get('modalWidth');\n\t\t$height\t\t= ($height != null) ? $height : $params->get('modalHeight');\n\t\t//find the width and height from the settings for iframes\n\t\tif ($type == 'iframe'):\n\t\t\t$width \t\t= ($width != null) ? $width : $params->get('iframeWidth');\n\t\t\t$height\t\t= ($height != null) ? $height : $params->get('iframeHeight');\n\t\tendif;\n\n\t\tif (!$song_url && JDEBUG):\n\t\t\tJError::raiseNotice(null, JText::_('COM_VOMBIEMUSIC_EMBEDVIDEO-FUNCTION_URL')); \n\t\t\treturn;\n\t\tendif;\n\n\t\tif ($type != 'iframe'):\n\t\t\tJHTML::_('behavior.modal');\n\t\tendif;\n\n\t\t$urltovideo = self::getDomain($song_url);\t\n\n\t\tjimport('joomla.filesystem.file');\n\n\t\t//If a plugin for the url exits, will it be loaded, else uses a normal iframe.\n\t\tif (JFile::exists(JPATH_SITE.DS.'components'.DS.'com_vombiemusic'.DS.'plugin'.DS.'video'.DS.$urltovideo.'.php')) {\n\n\t\t\tinclude_once(JPATH_SITE.DS.'components'.DS.'com_vombiemusic'.DS.'plugin'.DS.'video'.DS.$urltovideo.'.php');\n\t\t\t$vid = explode(\".\", $urltovideo);\n\t\t\t\n\t\t\t$html = VombieMusicEmbedVideo::$vid[0]($song_url,$app->getParams(),$type,$width,$height);\n\n\t\t}\t\t\n\t\n\t\telse{\n\n\t\t\t//uses the standard iframe/popup structure\n\t\t\t//you can add your own players from a different website.\n\t\t\t$rel \t\t= \"rel=\\\"{url: '\".$song_url.\"',handler:'iframe',size:{x:\".$width.\",y:\".$height.\"}}\\\"\";\n\t\t\t$iframe \t= \"<iframe width=\\\"\".$width.\"\\\" height=\\\"\".$height.\"\\\" src=\\\"\".$song_url.\"\\\" frameborder=\\\"0\\\" allowfullscreen></iframe>\";\n\n\t\t\t$html \t\t\t= ($type == 'popup') ? $rel : $iframe;\n\t\t\n\t\t}\n\t\tif(!$html):\n\t\t\tJError::raiseError(500, JText::sprintf('COM_VOMBIEMUSIC_NO_HTML_EMBEDVIDEO', $song_url) );\n\t\t\treturn false;\n\t\tendif;\n\n\treturn $html;\n\t}", "title": "" }, { "docid": "7effabcb3ecf359550ae5201c0a4f429", "score": "0.46624655", "text": "public function getVideos(array $options = [])\n {\n $deferred = new Deferred();\n\n $options = Options::buildOptions(Options::$defaultOptions, $options, $this->tidal);\n\n $this->http->get(\n Options::replace(Endpoints::ARTIST_VIDEOS, ['id' => $this->id]).$options\n )->then(function ($response) use ($deferred) {\n $videos = new Collection();\n\n foreach ($response['items'] as $video) {\n $videos->push(new Video(\n $this->http,\n $this->tidal,\n $video\n ));\n }\n\n $deferred->resolve($videos);\n }, function ($e) use ($deferred) {\n $deferred->reject($e);\n });\n\n return $deferred->promise();\n }", "title": "" }, { "docid": "a6bcc48dfc3bbeafc91cf82733a2029e", "score": "0.4659861", "text": "function youtube_id( $url ) {\n\t$id = jetpack_get_youtube_id( $url );\n\n\tif ( ! $id ) {\n\t\treturn '<!--YouTube Error: bad URL entered-->';\n\t}\n\n\t$url = youtube_sanitize_url( $url );\n\t$url = wp_parse_url( $url );\n\n\t$qargs = array();\n\tif ( ! empty( $url['query'] ) ) {\n\t\twp_parse_str( $url['query'], $qargs );\n\t} else {\n\t\treturn false;\n\t}\n\n\t$fargs = array();\n\tif ( ! empty( $url['fragment'] ) ) {\n\t\twp_parse_str( $url['fragment'], $fargs );\n\t}\n\n\t$qargs = array_merge( $fargs, $qargs );\n\n\t// calculate the width and height, taking content_width into consideration.\n\tglobal $content_width;\n\n\t$input_w = ( isset( $qargs['w'] ) && intval( $qargs['w'] ) ) ? intval( $qargs['w'] ) : 0;\n\t$input_h = ( isset( $qargs['h'] ) && intval( $qargs['h'] ) ) ? intval( $qargs['h'] ) : 0;\n\n\t// If we have $content_width, use it.\n\tif ( ! empty( $content_width ) ) {\n\t\t$default_width = $content_width;\n\t} else {\n\t\t// Otherwise get default width from the old, now deprecated embed_size_w option.\n\t\t$default_width = get_option( 'embed_size_w' );\n\t}\n\n\t// If we don't know those 2 values use a hardcoded width.\n\tif ( empty( $default_width ) ) {\n\t\t$default_width = 640;\n\t}\n\n\tif ( $input_w > 0 && $input_h > 0 ) {\n\t\t$w = $input_w;\n\t\t$h = $input_h;\n\t} elseif ( 0 === $input_w && 0 === $input_h ) {\n\t\tif ( isset( $qargs['fmt'] ) && intval( $qargs['fmt'] ) ) {\n\t\t\t$w = ( ! empty( $content_width ) ? min( $content_width, 480 ) : 480 );\n\t\t} else {\n\t\t\t$w = ( ! empty( $content_width ) ? min( $content_width, $default_width ) : $default_width );\n\t\t\t$h = ceil( ( $w / 16 ) * 9 );\n\t\t}\n\t} elseif ( $input_w > 0 ) {\n\t\t$w = $input_w;\n\t\t$h = ceil( ( $w / 16 ) * 9 );\n\t} else {\n\t\tif ( isset( $qargs['fmt'] ) && intval( $qargs['fmt'] ) ) {\n\t\t\t$w = ( ! empty( $content_width ) ? min( $content_width, 480 ) : 480 );\n\t\t} else {\n\t\t\t$w = ( ! empty( $content_width ) ? min( $content_width, $default_width ) : $default_width );\n\t\t\t$h = $input_h;\n\t\t}\n\t}\n\n\t/**\n\t * Filter the YouTube player width.\n\t *\n\t * @module shortcodes\n\t *\n\t * @since 1.1.0\n\t *\n\t * @param int $w Width of the YouTube player in pixels.\n\t */\n\t$w = (int) apply_filters( 'youtube_width', $w );\n\n\t/**\n\t * Filter the YouTube player height.\n\t *\n\t * @module shortcodes\n\t *\n\t * @since 1.1.0\n\t *\n\t * @param int $h Height of the YouTube player in pixels.\n\t */\n\t$h = (int) apply_filters( 'youtube_height', $h );\n\n\t$rel = ( isset( $qargs['rel'] ) && '0' === $qargs['rel'] ) ? 0 : 1;\n\t$search = ( isset( $qargs['showsearch'] ) && '1' === $qargs['showsearch'] ) ? 1 : 0;\n\t$info = ( isset( $qargs['showinfo'] ) && '0' === $qargs['showinfo'] ) ? 0 : 1;\n\t$iv = ( isset( $qargs['iv_load_policy'] ) && '3' === $qargs['iv_load_policy'] ) ? 3 : 1;\n\n\t$fmt = ( isset( $qargs['fmt'] ) && intval( $qargs['fmt'] ) ) ? '&fmt=' . (int) $qargs['fmt'] : '';\n\n\tif ( ! isset( $qargs['autohide'] ) || ( $qargs['autohide'] < 0 || 2 < $qargs['autohide'] ) ) {\n\t\t$autohide = '&autohide=2';\n\t} else {\n\t\t$autohide = '&autohide=' . absint( $qargs['autohide'] );\n\t}\n\n\t$start = 0;\n\tif ( isset( $qargs['start'] ) ) {\n\t\t$start = intval( $qargs['start'] );\n\t} elseif ( isset( $qargs['t'] ) ) {\n\t\t$time_pieces = preg_split( '/(?<=\\D)(?=\\d+)/', $qargs['t'] );\n\n\t\tforeach ( $time_pieces as $time_piece ) {\n\t\t\t$int = (int) $time_piece;\n\t\t\tswitch ( substr( $time_piece, -1 ) ) {\n\t\t\t\tcase 'h':\n\t\t\t\t\t$start += $int * 3600;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'm':\n\t\t\t\t\t$start += $int * 60;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 's':\n\t\t\t\t\t$start += $int;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t$start = $start ? '&start=' . $start : '';\n\t$end = ( isset( $qargs['end'] ) && intval( $qargs['end'] ) ) ? '&end=' . (int) $qargs['end'] : '';\n\t$hd = ( isset( $qargs['hd'] ) && intval( $qargs['hd'] ) ) ? '&hd=' . (int) $qargs['hd'] : '';\n\n\t$vq = ( isset( $qargs['vq'] ) && in_array( $qargs['vq'], array( 'hd720', 'hd1080' ), true ) ) ? '&vq=' . $qargs['vq'] : '';\n\n\t$cc = ( isset( $qargs['cc_load_policy'] ) ) ? '&cc_load_policy=1' : '';\n\t$cc_lang = ( isset( $qargs['cc_lang_pref'] ) ) ? '&cc_lang_pref=' . preg_replace( '/[^_a-z0-9-]/i', '', $qargs['cc_lang_pref'] ) : '';\n\n\t$wmode = ( isset( $qargs['wmode'] ) && in_array( strtolower( $qargs['wmode'] ), array( 'opaque', 'window', 'transparent' ), true ) ) ? $qargs['wmode'] : 'transparent';\n\n\t$theme = ( isset( $qargs['theme'] ) && in_array( strtolower( $qargs['theme'] ), array( 'dark', 'light' ), true ) ) ? '&theme=' . $qargs['theme'] : '';\n\n\t$autoplay = '';\n\t/**\n\t * Allow YouTube videos to start playing automatically.\n\t *\n\t * @module shortcodes\n\t *\n\t * @since 2.2.2\n\t *\n\t * @param bool false Enable autoplay for YouTube videos.\n\t */\n\tif ( apply_filters( 'jetpack_youtube_allow_autoplay', false ) && isset( $qargs['autoplay'] ) ) {\n\t\t$autoplay = '&autoplay=' . (int) $qargs['autoplay'];\n\t}\n\n\tif (\n\t\t( isset( $url['path'] ) && '/videoseries' === $url['path'] )\n\t\t|| isset( $qargs['list'] )\n\t) {\n\t\t$html = \"<iframe class='youtube-player' type='text/html' width='$w' height='$h' src='\" . esc_url( \"https://www.youtube.com/embed/videoseries?list=$id&hl=en_US\" ) . \"' allowfullscreen='true' style='border:0;'></iframe>\";\n\t} else {\n\t\t$html = \"<iframe class='youtube-player' type='text/html' width='$w' height='$h' src='\" . esc_url( \"https://www.youtube.com/embed/$id?version=3&rel=$rel&fs=1$fmt$autohide&showsearch=$search&showinfo=$info&iv_load_policy=$iv$start$end$hd&wmode=$wmode$theme$autoplay$vq{$cc}{$cc_lang}\" ) . \"' allowfullscreen='true' style='border:0;'></iframe>\";\n\t}\n\n\t// Let's do some alignment wonder in a span, unless we're producing a feed.\n\tif ( ! is_feed() ) {\n\t\t$alignmentcss = 'text-align:center;';\n\t\tif ( isset( $qargs['align'] ) ) {\n\t\t\tswitch ( $qargs['align'] ) {\n\t\t\t\tcase 'left':\n\t\t\t\t\t$alignmentcss = \"float:left; width:{$w}px; height:{$h}px; margin-right:10px; margin-bottom: 10px;\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'right':\n\t\t\t\t\t$alignmentcss = \"float:right; width:{$w}px; height:{$h}px; margin-left:10px; margin-bottom: 10px;\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t$html = sprintf(\n\t\t\t'<span class=\"embed-youtube\" style=\"%s display: block;\">%s</span>',\n\t\t\tesc_attr( $alignmentcss ),\n\t\t\t$html\n\t\t);\n\n\t}\n\n\t/**\n\t * Filter the YouTube video HTML output.\n\t *\n\t * @module shortcodes\n\t *\n\t * @since 1.2.3\n\t *\n\t * @param string $html YouTube video HTML output.\n\t */\n\t$html = apply_filters( 'video_embed_html', $html );\n\n\treturn $html;\n}", "title": "" }, { "docid": "15687aa256c8c3c14a5fa7b0dd63906d", "score": "0.4657238", "text": "function fetch_onceplayer($runtime, $src,$protocol=\"http\",$width=0,$height=0,$iframe=false){\nglobal $CFG, $COURSE;\n\n\t\t//support legacy files, just in case we have an old timer ...\n\t\tif($protocol=='rtmp' || $protocol=='legacy'){\n\t\t\t$src= $CFG->wwwroot . \"/file.php/\" . $COURSE->id . \"/\" . $src;\n\t\t\t$type = 'http';\n\t\t}\n\t\t\n\t\tif($width==0){\n\t\t\t$width=250;\n\t\t}\n\t\tif($height==0){\n\t\t\t$height=100;\n\t\t}\n\t\n\t\t$params = array();\n\n\t\t$params['src']= $src;//urlencode($src);\n\t\n\t\t\t\t\n \t\n\t//depending on runtime, we show a SWF or html5 player\n\t//currently no js implementation\t\n\tif(false){\n\t//if($runtime==\"js\" || ($runtime==\"auto\" && isMobile($CFG->filter_poodll_html5play))){\n\t\n\t\t//the $src url as it comes from assignment and questions, is urlencoded,\n\t\t//unlikely to arrive here encoded, but lets just be safe \n\t\t//or html 5 playback will fail Justin 20121016\n\t\t$src= urldecode($src);\n\t\n\t\t$returnString= \"<a onclick=\\\"this.firstChild.play()\\\"><audio src=\\\"$src\\\"></audio><img height=\\\"$height\\\" width=\\\"$width\\\" src=\\\"\" . \n\t\t\t\t$imageurl . \n\t\t\t\t\"\\\"/></a>\";\n\t\t\n\t}else{\n\t\t//use iframe or not\n\t\tif($iframe){\n\t\t\t\t$returnString= fetchIFrameSWFWidgetCode('onceplayer.lzx.swf9.swf',\n\t\t\t\t\t\t\t$params,$width,$height,'#FFFFFF');\n\t\t}else{\t\t\n \t\t\t$returnString= fetchSWFWidgetCode('onceplayer.lzx.swf9.swf',\n\t\t\t\t\t\t\t$params,$width,$height,'#FFFFFF');\n\t\t}\n\t}\n\t\t\n\t\t\n\t\treturn $returnString;\n\n\n}", "title": "" }, { "docid": "4905cb0f73664ef69b332850654ec5db", "score": "0.46570474", "text": "function http_get_request( $url ) {\n\n\t$url = esc_url_raw( $url );\n\n\t$args = array( 'user-agent' => 'Plugin Demo: HTTP API; '. home_url() );\n\n\treturn wp_safe_remote_get( $url, $args );\n\n}", "title": "" }, { "docid": "7facd6ec8d4e4dae001f3a3f2433c9c2", "score": "0.46391723", "text": "function wrap_embed_with_div($html, $url, $attr) {\n return '<div class=\"video-container\">' . $html . '</div>';\n}", "title": "" }, { "docid": "2bd00c4e2f93ad89de67dabd26cdcb68", "score": "0.46337456", "text": "public function get_byUrl(array $query) {\n $this->permission('Garden.SignIn.Allow');\n\n $in = $this->schema(['url:s' => 'Full URL to the item.'], 'in')->setDescription('Get a media item, using its URL.');\n $out = $this->schema($this->fullSchema(), 'out');\n\n $query = $in->validate($query);\n\n $row = $this->mediaByUrl($query['url']);\n if ($row['InsertUserID'] !== $this->getSession()->UserID) {\n $this->permission('Garden.Community.Manage');\n }\n\n $row = $this->normalizeOutput($row);\n $result = $out->validate($row);\n return $result;\n }", "title": "" }, { "docid": "bdcaa56bd1961f070c01af58977a5900", "score": "0.46332273", "text": "public function fetch_comic( $id = false ) {\n $cached = get_option( 'xkcd_embed' );\n\n if( ! $id || ! array_key_exists( $id, $cached ) ) {\n $url = 'http://xkcd.com/' . ( $id ? $id . '/' : '' ) . 'info.0.json';\n $args = array(\n 'timeout' => 5,\n 'sslverify' => false\n );\n\n $data = wp_remote_retrieve_body( wp_remote_get( $url, $args ) );\n\n if( ! is_wp_error( $data ) ) {\n $cached[$id] = $return = $data;\n\n update_option( 'xkcd_embed', $cached );\n } else {\n $return = false;\n $this->is_error = true;\n }\n } else {\n $return = $cached[$id];\n }\n\n return $return;\n }", "title": "" }, { "docid": "c7fcb73e15a68c00f37497e8fc3f2f92", "score": "0.4630331", "text": "function fetchAudioListPlayer($runtime, $playlist, $filearea=\"content\",$protocol=\"\", $width=\"400\",$height=\"350\",$sequentialplay=\"true\",$useplayer,$showplaylist,$usepoodlldata=false){\nglobal $CFG, $USER, $COURSE;\n\n$moduleid = optional_param('id', 0, PARAM_INT); // The ID of the current module (eg moodleurl/view.php?id=X )\n\n\n//determine if we are on a mobile device or not\n $ismobile = isMobile($CFG->filter_poodll_html5play);\n\n\t//if its a poodll player we want an xml feed\n\t//if its jw or fp we want an rss feed\n\t//if we are ipads or html playlists + fp, we wont use a data feed, we will use a list of links\n\t//so in that case we pass a \"\" and just spit out the links.\n\tswitch($useplayer){\n\t\tcase \"pd\": \t$datatype = \"poodllaudiolist\";break;\n\t\tcase \"jw\":\t$datatype = \"poodllrsslist\";break;\n\t\tcase \"fp\": if($showplaylist) {\n\t\t\t\t\t\t$datatype=\"\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$datatype = \"poodllrsslist\";\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t}\n\t\n\t//if we are using poodll data, flag that in the filearea param\n\tif($usepoodlldata){$filearea=\"poodlldata\";}\n\t\n\t\n\t//determine playlist url if necessary, if we are using fp player and a visible list we don't need this\n\t$fetchdataurl=\"\";\n\tif($datatype!=\"\"){\n\t\t//get the url to the automated medialist maker\n\t\t//$fetchdataurl= $CFG->wwwroot . '/filter/poodll/poodlllogiclib.php?datatype=poodllaudiolist'\n\t\t$fetchdataurl= $CFG->wwwroot . '/filter/poodll/poodlllogiclib.php?datatype=' . $datatype \n\t\t\t. '&courseid=' . $COURSE->id\n\t\t\t. '&moduleid=' . $moduleid\n\t\t\t. '&paramone=' . $playlist \n\t\t\t. '&paramtwo=' . $protocol \n\t\t\t. '&paramthree=' . $filearea\n\t\t\t. '&cachekiller=' . rand(10000,999999);\n\t}\n\t\n\n\t//If poodll player is not default, use flowplayer it will handle mobile and flash\n\tif($useplayer!=\"pd\"){\n\t\t$returnString=\"\";\n\t\t //if html playlist use links as list\n\t\t if ($showplaylist){\n\t\t\t$returnString = fetch_poodllaudiolist($moduleid,$COURSE->id,$playlist, \"http\", $filearea,\"alist\");\n\t\t\t$returnString .= \"<br clear='all'/>\";\n\t\t\t//get a flowplayer without a datafeed\n\t\t\t//size is hardcoded to match images pulled from styles.css in pooodll filter\n\t\t\t$returnString .= fetchFlowPlayerCode($width,40,\"/\",\"audiolist\", $ismobile, \"\", $sequentialplay);\n\t\t\t\n\t\t //if rss playlist use url of datafeed and pass to flowplayer\n\t\t }else{\n\t\t\t//get a flowplayer using the data feed\n\t\t\t//size is hardcoded to match images pulled from styles.css in pooodll filter\n\t\t\t$returnString .= fetchFlowPlayerCode($width,40,\"/\",\"audiolist\", $ismobile, $fetchdataurl, $sequentialplay);\n\t\t }\n\t\t \n\t\t return $returnString;\n\t\n\t//If this is a poodll player playlist \n\t}else{\n\t\t//Set our servername .\n\t\t$flvserver = $CFG->poodll_media_server;\n\n\n\t\n\t\t\n\t\t$params = array();\n\t\t\t$params['red5url'] = urlencode($flvserver);\n\t\t\t$params['playertype'] = $protocol;\n\t\t\t$params['sequentialplay'] = $sequentialplay;\n\t\t\t$params['playlist']=urlencode($fetchdataurl);\n\t\t\n\t\t\t$returnString= fetchSWFWidgetCode('poodllaudiolistplayer.lzx.swf9.swf',\n\t\t\t\t\t\t\t\t$params,$width,$height,'#FFFFFF');\n\t\t\t\t\t\t\t\t\n\t\t\treturn $returnString;\n\t}\n}", "title": "" }, { "docid": "52f9b01264e891687d3c77e9ca7f88e9", "score": "0.46298757", "text": "public function get($url = null, Array $options = [])\n {\n $this->getHttpClient();\n try {\n $response = $this->httpClient->get($url, $options);\n return $response;\n } catch (RequestException $e) {\n throw $e;\n } catch (Exception $e) {\n throw $e;\n }\n }", "title": "" }, { "docid": "3aa0a1ab6436da429ff9f16dfcca1d3f", "score": "0.4628587", "text": "public function get($url = '', $options = array()) {\n\t\t\n\t\t// If a URL is provided, create new session\n\t\tif (! empty ( $url ))\n\t\t\t$this->create ( $url );\n\t\t\t\n\t\t\t// Add in the specific options provided\n\t\t$this->options ( $options );\n\t\t\n\t\treturn $this->execute ();\n\t}", "title": "" }, { "docid": "2b0d2d7e962d4e25beb8ca43c164f88e", "score": "0.46231902", "text": "function tc_limit_oembed_providers( $providers ) {\n $allowed_providers = array(\n 'YouTube' => 'https://www.youtube.com/oembed',\n 'Vimeo' => 'https://vimeo.com/api/oembed.{format}',\n 'Daylimotion' => 'https://www.dailymotion.com/services/oembed',\n 'Flickr' => 'https://www.flickr.com/services/oembed',\n 'Instagram' => 'https://api.instagram.com/oembed',\n 'Slideshare' => 'https://www.slideshare.net/api/oembed/2',\n 'SoundCloud' => 'https://soundcloud.com/oembed',\n 'Spotify' => 'https://embed.spotify.com/oembed/',\n 'Speaker Deck' => 'https://speakerdeck.com/oembed.{format}',\n 'Facebook (post)' => 'https://www.facebook.com/plugins/post/oembed.json/',\n 'Facebook (video)' => 'https://www.facebook.com/plugins/video/oembed.json/',\n 'Twitter' => 'https://publish.twitter.com/oembed',\n 'Giphy' => 'https://giphy.com/services/oembed'\n );\n\n $providers = array_filter( $providers, function( $p ) use( $allowed_providers ) {\n return in_array( $p[0], $allowed_providers );\n } );\n\n return $providers;\n}", "title": "" }, { "docid": "76235f1abc8f0175e02a8c5b9c6816ae", "score": "0.46179613", "text": "function url_get_contents ($Url) {\n if (!function_exists('curl_init')){ \n die('CURL is not installed!');\n }\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $Url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_HTTPHEADER, ['Accept: application/sparql-results+json','User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36']);\n $output = curl_exec($ch);\n curl_close($ch);\n return $output;\n}", "title": "" } ]
6c56e7dd435c7c42a2a40cbb597b2084
The method which used to make relaitonship between designation and employee
[ { "docid": "b1ff3b8710ceb10909f6da84042816d3", "score": "0.0", "text": "public function designation() {\n return $this->belongsTo(Designation::class);\n }", "title": "" } ]
[ { "docid": "93e318c580a840f972b13905be395c8e", "score": "0.578515", "text": "public function employee()\n\t{\n\t\treturn $this->belongsTo('App\\Model\\Organization\\Employee','employee_id', 'employee_id');\n\t}", "title": "" }, { "docid": "173362b0bc22b16ee7ab40a0bc03c157", "score": "0.5771074", "text": "function createDefaultEmployee(){\n $dept = $this->add('xepan\\hr\\Model_Department')\n ->addCondition('is_system',true)\n ->addCondition('name','Company')\n ->addCondition('production_level',1)\n ->tryLoadAny()\n ->save();\n\n $this->app->db->dsql()->table('department')\n ->set('production_level',0)\n ->where('document_id',$dept->id)\n ->execute();\n\n // Create default CEO/Owner Post\n $post = $this->add('xepan\\hr\\Model_Post')\n ->addCondition('name','CEO')\n ->addCondition('department_id',$dept->id)\n ->addCondition('in_time','10:00:00')\n ->addCondition('out_time','18:00:00')\n ->tryLoadAny()\n ->save();\n\n $user = $this->add('xepan\\base\\Model_User_SuperUser')\n // ->addCondition('epan_id',$this->app->epan->id)\n ->loadAny();\n\n // Create One Default Employee as CEO/Owner\n $emp = $this->add('xepan\\hr\\Model_Employee');\n $emp->set('type','Employee')\n ->addCondition('first_name','Super')\n ->addCondition('last_name','User')\n ->addCondition('department_id',$dept->id)\n ->addCondition('post_id',$post->id)\n ->addCondition('user_id',$user->id)\n ->tryLoadAny()\n ->save();\n }", "title": "" }, { "docid": "6c8fe68c5eef3ab9dac5fd774e3ffb66", "score": "0.57499856", "text": "function createDefaultEmployee(){\n $dept = $this->add('xepan\\hr\\Model_Department')\n ->addCondition('is_system',true)\n ->addCondition('name','Company')\n ->addCondition('production_level',1)\n ->tryLoadAny()\n ->save();\n\n $this->app->db->dsql()->table('department')\n ->set('production_level',0)\n ->where('document_id',$dept->id)\n ->execute();\n\n // Create default CEO/Owner Post\n $post = $this->add('xepan\\hr\\Model_Post')\n ->addCondition('name','CEO')\n ->addCondition('department_id',$dept->id)\n ->addCondition('in_time','10:00:00')\n ->addCondition('out_time','18:00:00')\n ->addCondition('permission_level','Global')\n ->tryLoadAny()\n ->save();\n\n $user = $this->add('xepan\\base\\Model_User_SuperUser')\n // ->addCondition('epan_id',$this->app->epan->id)\n ->loadAny();\n\n // Create One Default Employee as CEO/Owner\n $emp = $this->add('xepan\\hr\\Model_Employee');\n $emp->set('type','Employee')\n ->addCondition('first_name','Super')\n ->addCondition('last_name','User')\n ->addCondition('department_id',$dept->id)\n ->addCondition('post_id',$post->id)\n ->addCondition('user_id',$user->id)\n ->tryLoadAny()\n ->save();\n\n return $emp;\n }", "title": "" }, { "docid": "6866aeca1247d38551001d88fad154c7", "score": "0.5723688", "text": "public function createNewEmployee()\n\t{\n\t\t$rest_json\t=\tfile_get_contents(\"php://input\");\n $postData\t=\tjson_decode($rest_json, true);\n\t\t\n if(!empty($postData))\n\t\t{\n\t\t\t$userType \t = $this->common->getUserTypeByDesignationRef($postData['designation']);\n\t\t\t$userDetail['id'] \t\t\t= isset( $postData['id'] ) ? $postData['id'] : '';\n\t\t\t$userDetail['userType']\t\t= $userType;\n\t\t\t$userDetail['emailId']\t\t= $postData['emailId'];\n\t\t\t\n\t\t\t$userDetail['createdDate'] = $postData['createdDate'];\n\t\t\t$userDetail['status'] \t\t= $postData['status'];\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$userProfile['firstName'] \t\t= $postData['firstName'];\n\t\t\t$userProfile['lastName'] \t\t= $postData['lastName'];\n\t\t\t$userProfile['mobile'] \t\t\t= $postData['mobile'];\n\t\t\t$userProfile['department'] \t\t= $postData['department'];\n\t\t\t$userProfile['designation'] \t= $postData['designation'];\n\t\t\tif( $userDetail['id'] <= 0 )\n\t\t\t{\n\t\t\t\t$password\t \t\t\t= str_pad(mt_rand(111111, 999999), 6, '0', STR_PAD_LEFT);\n\t\t\t\t$salt\t\t\t\t\t= \tmcrypt_create_iv(22, MCRYPT_DEV_URANDOM);\n\t\t\t\t$salt \t\t\t\t\t= \tbase64_encode($salt);\n\t\t\t\t$salt \t\t\t\t\t= \tstr_replace('+', '.', $salt);\n\t\t\t\t$hash \t\t\t\t\t= \tcrypt($password, '$2y$10$'.$salt.'$');\n\t\t\t\t$userDetail['password']\t=\t$hash;\n\t\t\t}\n\t\t\t$output \t\t\t\t= $this->common->createEmployee($userDetail,$userProfile);\n\t\t\tif($output == 0)\n\t\t\t{\n\t\t\t\t$result[\"error\"] \t= 'Data not insert.Please fill detail properly.';\n\t\t\t}\n\t\t\tif($output == 1)\n\t\t\t{\n\t\t\t\t$emailTemplate = $this->common->getEmailTemplate(3);\n\t\t\t\t$variables = array\n\t\t\t\t\t(\n\t\t\t\t\t\t'receiver_name' \t=> ucfirst($userProfile['firstName']).' '.ucfirst($userProfile['lastName']),\n\t\t\t\t\t\t'email'\t\t\t\t=> $userDetail['emailId'],\n\t\t\t\t\t\t'password'\t\t\t=> $userDetail['password'],\n\t\t\t\t\t\t'to'\t\t\t\t=> $userDetail['emailId'],\n\t\t\t\t\t);\n\t\t\t\t$this->common->sendEmail($variables,$emailTemplate);\n\t\t\t\t$result[\"success\"] \t= 'Employee created successfully.';\n\t\t\t}\n\t\t\tif($output == 2)\n\t\t\t{\n\t\t\t\t$result[\"error\"] \t= 'Email already exist.';\n\t\t\t}\n\t\t\tif($output == 3)\n\t\t\t{\n\t\t\t\t$result[\"success\"] \t= 'Employee updated successfully.';\n\t\t\t}\n\t\t\theader('Content-Type: application/json');\n\t\t\techo json_encode($result);exit;\n\t\t}\n\t}", "title": "" }, { "docid": "a9a0f11d284857a0e1d0b3432043c339", "score": "0.5711165", "text": "public function employee()\n {\n return $this->belongsTo(Employee::class, 'salesRepEmployeeNumber');\n }", "title": "" }, { "docid": "ba3a226a5b4eb50c55424e4d1d1e2e3b", "score": "0.57077223", "text": "public function responsible()\n {\n return $this->belongsTo('App\\Models\\Employee');\n }", "title": "" }, { "docid": "209f25a0a9925ccf2f1aa0b1102b479f", "score": "0.56741697", "text": "public function isEmployee();", "title": "" }, { "docid": "dbc49acc091e6de46574a91dce68e731", "score": "0.5622516", "text": "public function calculateEmployee() {\r\n $this->employee = $this->wages +\r\n $this->severance +\r\n $this->otherEarnings +\r\n $this->provisionServices;\r\n }", "title": "" }, { "docid": "c5be6641d7b2ad3fceb05e498464c4e0", "score": "0.56114477", "text": "public static function employ(){}", "title": "" }, { "docid": "6204f9b2f483b7014995d41bdd786a7e", "score": "0.5591252", "text": "function employerRatesManager()\n{\n\t\n}", "title": "" }, { "docid": "3119732b8d74413c714af48190c8805f", "score": "0.555339", "text": "public function employeeAction() {\r\n \t$this->_helper->layout->setLayout('html');\r\n \t$this->view->grid = $this->_components['emp'];\r\n \t$this->view->empId = $this->_getParam('_parent');\r\n }", "title": "" }, { "docid": "04aad5dd09fc645fa02fdd57b5082d67", "score": "0.55401295", "text": "function ea_update17(){\n $structure = \n array(\n\t 'Directors' =>array('Nordita Director',\n\t\t\t\t\t 'Deputy Director'),\n\t 'Faculty' =>array('Nordita Professor',\n\t\t\t\t\t 'Nordita Affiliate Professor',\n\t\t\t\t\t 'Nordita Professor Emeritus'),\n\t 'Junior Faculty' =>array('Nordita Assistant Professor',\n\t\t\t\t\t 'Nordic Associate Professor',\n\t\t\t\t\t 'Nordic Assistant Professor'),\n\t 'Postdocs and Researchers'=>array('Nordita Fellow',\n\t\t\t\t\t 'Nordita Postdoc',\n\t\t\t\t\t 'Nordic Fellow'),\n\t 'Corresponding Fellows'=> array('Corresponding Fellow'),\n\t 'PhD Students' => array('PhD Student'),\n\t 'Masters Students' => array('Masters Student',\n\t\t\t\t\t 'Visiting Masters Student'),\n\t 'Visitors'=> \t array('Guest Researcher',\n\t\t\t\t\t 'Visiting PhD Student'),\n\t 'Administration' => array('Head of Administration',\n\t\t\t\t\t 'Head of Computing',\n\t\t\t\t\t 'Web and Computing',\n\t\t\t\t\t 'HR Officer',\n\t\t\t\t\t 'Scientific Program Coordinator',\n\t\t\t\t\t 'Administrative Assistant',\n\t\t\t\t\t 'Building Caretaker'),\n\t 'Board' => \t\t array('Board Chairman',\n\t\t\t\t\t 'Board Member'),\n\t );\n \n // Delete old emp. types\n\n \n // Create new emp. types / titles\n foreach($structure as $empType=>$empTitles){\n $lm_option = array();\n foreach($empTitles as $title) $lm_option[myOrg('nordita')->orgEmpTypes()->create_textKey($title,$empType)] = $title;\n \n myOrg('nordita')->orgEmpTypes()->updateMember(array('lm_key' =>myOrg('nordita')->orgEmpTypes()->create_textKey($empType),\n\t\t\t\t\t\t\t'lm_value' =>$empType,\n\t\t\t\t\t\t\t'lm_option' =>serialize($lm_option)));\n }\n \n}", "title": "" }, { "docid": "7d96945e2cbff8e0b9537d6be00e6669", "score": "0.5536236", "text": "abstract protected function enjoyVacation(): string;", "title": "" }, { "docid": "770aaa06b19820f1f58543f55f4d23eb", "score": "0.5523067", "text": "public function employee()\n {\n \treturn $this->belongsTo('App\\Employee');\n }", "title": "" }, { "docid": "770aaa06b19820f1f58543f55f4d23eb", "score": "0.5523067", "text": "public function employee()\n {\n \treturn $this->belongsTo('App\\Employee');\n }", "title": "" }, { "docid": "f78f85a543c2cd6e3f48a22f449b8ea9", "score": "0.5511762", "text": "function cresponsable_consultoria_edit() {\n\t\tglobal $conn;\n\n\t\t// Initialize table object\n\t\t$GLOBALS[\"responsable_consultoria\"] = new cresponsable_consultoria();\n\n\t\t// Initialize other table object\n\t\t$GLOBALS['usuario'] = new cusuario();\n\n\t\t// Intialize page id (for backward compatibility)\n\t\tif (!defined(\"EW_PAGE_ID\"))\n\t\t\tdefine(\"EW_PAGE_ID\", 'edit', TRUE);\n\n\t\t// Initialize table name (for backward compatibility)\n\t\tif (!defined(\"EW_TABLE_NAME\"))\n\t\t\tdefine(\"EW_TABLE_NAME\", 'responsable_consultoria', TRUE);\n\n\t\t// Open connection to the database\n\t\t$conn = ew_Connect();\n\t}", "title": "" }, { "docid": "5b6db21081314077a4b8c7097fc48cd7", "score": "0.55057335", "text": "public function create(Employee $employee)\n {\n //\n }", "title": "" }, { "docid": "d731c361fc66134bd888336c800130ec", "score": "0.5504686", "text": "public function assignFormation()\n {\n try {\n $aData = array('emf_id' => $this->_attributs['_emf_id'],\n 'emf_responsable' => $this->_attributs['_emf_responsable'],\n 'employees_emp_id' => $this->_attributs['_employees_emp_id'],\n 'formations_for_id' => $this->_attributs['_formations_for_id'],\n 'emf_statusformation' => $this->_attributs['_emf_statusformation']\n );\n \n if ($this->_attributs['_emf_id'] == 0) {\n $this->insert($aData);\n } else {\n $this->update($aData, 'emf_id = ' . (int) $this->_attributs['_emf_id']);\n }\n } catch (Zend_Exception $e) {\n echo $e->getMessage();\n }\n }", "title": "" }, { "docid": "72819e35de97bd803f3fd8b07f85b0db", "score": "0.5496316", "text": "public function getEmployeeName()\n {\n return \"NOT IMPLEMENTED YET\";\n }", "title": "" }, { "docid": "84f506802482d5580ec18cb2e594b6f3", "score": "0.54878193", "text": "public function validateAction($id_employer, $id_procedure_type, $priority, $id_user, $employees)\n {\t\t \t\t\n\t\t$entityInscription = 9;\n\t\t$em = $this->getDoctrine()->getManager();\t\n\t\t$employerSearch = $this->loadClassById($id_employer,\"Employer\");\n\t\t$userSearch = $this->loadClassById($id_user,\"User\");\n\t\t$procedureTypeSearch = $this->loadClassById($id_procedure_type, \"ProcedureType\");\n\n\t\t$procedure = new RealProcedure();\n\t\t$procedure->setUserUser($userSearch);\n\t\t$procedure->setCreatedAt(new \\DateTime());\n\t\t$procedure->setProcedureTypeProcedureType($procedureTypeSearch);\n\t\t$procedure->setEmployerEmployer($employerSearch);\n\t\t$em->persist($procedure);\n\t\t\t \t\t\t\t\t\t\t\t\t\t\t\n \t\tforeach ($employees as $employee) {\n \t\t\t$entities = array();\n \t\t\tforeach ($employee[\"entities\"] as $entity) {\n \t\t\t\t$actionTypeFound = $this->loadClassById($entity[\"id_action_type\"],\"ActionType\");\n\t\t \t\t$employeeFound = $this->loadClassById($employee[\"id_employee\"],\"Employee\");\n\t\t \t\t$entityFound = $this->loadClassById($entity[\"id_entity\"],\"Entity\");\n \t\t\t\t$employeeHasEntityFound = $this->loadClassByArray(array(\"employeeEmployee\" => $employeeFound, \"entityEntity\"=>$entityFound),\"EmployeeHasEntity\");\t\t\t\t \t\t\t\t\t \t\t\t\t \t\t\t\t \t\n\t\t\t\t \tif($employeeHasEntityFound){\t\t\t\t \t\t\n\t\t\t\t \t}else{\t\t\t\t \t\t\n\t\t\t\t \t\tif($this->loadClassByArray(array(\n\t\t\t\t \t\t\t\"personPerson\" => $employeeFound->getPersonPerson(),\n\t\t\t\t \t\t\t\"actionTypeActionType\" => $this->loadClassById(\n\t\t\t\t \t$entityInscription,\"ActionType\"),\n\t\t\t\t \t\"entityEntity\" =>$this->loadClassById($entity[\"id_entity\"],\"Entity\")\n\t\t\t\t \t\t),\"Action\")){\n\t\t\t\t \t\t\t//se verifica que no hallan actions repetidos de inscripcion\n\t\t\t\t \t\t}else{\n\t\t\t \t\t\t\t$action = new Action();\n\t\t\t\t\t $action->setUserUser($userSearch);\n\t\t\t\t\t $action->setStatus('Nuevo');\n\t\t\t\t\t $action->setRealProcedureRealProcedure($procedure);\n\t\t\t\t\t $action->setEntityEntity($this->loadClassById($entity[\"id_entity\"],\"Entity\"));\n\t\t\t\t\t $action->setActionTypeActionType($this->loadClassById(\n\t\t\t\t\t \t$entityInscription,\"ActionType\"));\n\t\t\t\t\t $action->setPersonPerson($employeeFound->getPersonPerson());\n\t\t\t\t\t $em->persist($action);\n\t\t\t\t\t $em->flush();\n\t\t\t\t \t$procedure->addAction($action);\t\n\t\t\t\t \t\t}\t\t\t\t \t\t\n\t\t\t\t \t}\n\t\t\t\t \t//se verifica que no hallan actions iguales.\n\t\t\t\t \tif($this->loadClassByArray(array(\n\t\t\t\t \t\t\t\"personPerson\" => $employeeFound->getPersonPerson(),\n\t\t\t\t \t\t\t\"actionTypeActionType\" => $actionTypeFound\n\t\t\t\t \t\t),\"Action\")){\n\n\t\t\t\t \t}else{\n\t\t\t\t \t\t$action = new Action();\n\t\t\t\t $action->setUserUser($userSearch);\n\t\t\t\t $action->setStatus('Nuevo');\n\t\t\t\t $action->setRealProcedureRealProcedure($procedure);\n\t\t\t\t $action->setEntityEntity($this->loadClassById($entity[\"id_entity\"],\"Entity\"));\n\t\t\t\t $action->setActionTypeActionType($actionTypeFound);\n\t\t\t\t $action->setPersonPerson($employeeFound->getPersonPerson());\n\t\t\t\t $em->persist($action);\n\t\t\t\t $em->flush();\n\t\t\t\t $procedure->addAction($action);\n\t\t\t\t \t}\t \t\t\t\t\t\t\t\t\n \t\t\t}\n \t\t}\n \t\t$em->flush();\n return $procedure;\n \n }", "title": "" }, { "docid": "1b77f4d0cde6eb9ca9dc61e9533c4bd0", "score": "0.54610056", "text": "public function createAction()\n {\n if (!$this->request->isPost()) {\n $this->dispatcher->forward([\n 'controller' => \"employee\",\n 'action' => 'index'\n ]);\n\n return;\n }\n\n $employee = new Employee();\n $employee->Listid = $this->request->getPost(\"ListID\");\n $employee->Timecreated = $this->request->getPost(\"TimeCreated\");\n $employee->Timemodified = $this->request->getPost(\"TimeModified\");\n $employee->Editsequence = $this->request->getPost(\"EditSequence\");\n $employee->Name = $this->request->getPost(\"Name\");\n $employee->Isactive = $this->request->getPost(\"IsActive\");\n $employee->Salutation = $this->request->getPost(\"Salutation\");\n $employee->Firstname = $this->request->getPost(\"FirstName\");\n $employee->Middlename = $this->request->getPost(\"MiddleName\");\n $employee->Lastname = $this->request->getPost(\"LastName\");\n $employee->Suffix = $this->request->getPost(\"Suffix\");\n $employee->Jobtitle = $this->request->getPost(\"JobTitle\");\n $employee->Supervisorref_listid = $this->request->getPost(\"SupervisorRef_ListID\");\n $employee->Supervisorref_fullname = $this->request->getPost(\"SupervisorRef_FullName\");\n $employee->Department = $this->request->getPost(\"Department\");\n $employee->Description = $this->request->getPost(\"Description\");\n $employee->Targetbonus = $this->request->getPost(\"TargetBonus\");\n $employee->Employeeaddress_addr1 = $this->request->getPost(\"EmployeeAddress_Addr1\");\n $employee->Employeeaddress_addr2 = $this->request->getPost(\"EmployeeAddress_Addr2\");\n $employee->Employeeaddress_addr3 = $this->request->getPost(\"EmployeeAddress_Addr3\");\n $employee->Employeeaddress_addr4 = $this->request->getPost(\"EmployeeAddress_Addr4\");\n $employee->Employeeaddress_city = $this->request->getPost(\"EmployeeAddress_City\");\n $employee->Employeeaddress_state = $this->request->getPost(\"EmployeeAddress_State\");\n $employee->Employeeaddress_postalcode = $this->request->getPost(\"EmployeeAddress_PostalCode\");\n $employee->Employeeaddress_country = $this->request->getPost(\"EmployeeAddress_Country\");\n $employee->Printas = $this->request->getPost(\"PrintAs\");\n $employee->Phone = $this->request->getPost(\"Phone\");\n $employee->Mobile = $this->request->getPost(\"Mobile\");\n $employee->Pager = $this->request->getPost(\"Pager\");\n $employee->Pagerpin = $this->request->getPost(\"PagerPIN\");\n $employee->Altphone = $this->request->getPost(\"AltPhone\");\n $employee->Fax = $this->request->getPost(\"Fax\");\n $employee->Ssn = $this->request->getPost(\"SSN\");\n $employee->Email = $this->request->getPost(\"Email\");\n $employee->Emergencycontactprimaryname = $this->request->getPost(\"EmergencyContactPrimaryName\");\n $employee->Emergencycontactprimaryvalue = $this->request->getPost(\"EmergencyContactPrimaryValue\");\n $employee->Emergencycontactprimaryrelation = $this->request->getPost(\"EmergencyContactPrimaryRelation\");\n $employee->Emergencycontactsecondaryname = $this->request->getPost(\"EmergencyContactSecondaryName\");\n $employee->Emergencycontactsecondaryvalue = $this->request->getPost(\"EmergencyContactSecondaryValue\");\n $employee->Emergencycontactsecondaryrelation = $this->request->getPost(\"EmergencyContactSecondaryRelation\");\n $employee->Employeetype = $this->request->getPost(\"EmployeeType\");\n $employee->Gender = $this->request->getPost(\"Gender\");\n $employee->Partorfulltime = $this->request->getPost(\"PartOrFullTime\");\n $employee->Exempt = $this->request->getPost(\"Exempt\");\n $employee->Keyemployee = $this->request->getPost(\"KeyEmployee\");\n $employee->Hireddate = $this->request->getPost(\"HiredDate\");\n $employee->Originalhiredate = $this->request->getPost(\"OriginalHireDate\");\n $employee->Adjustedservicedate = $this->request->getPost(\"AdjustedServiceDate\");\n $employee->Releaseddate = $this->request->getPost(\"ReleasedDate\");\n $employee->Birthdate = $this->request->getPost(\"BirthDate\");\n $employee->Uscitizen = $this->request->getPost(\"USCitizen\");\n $employee->Ethnicity = $this->request->getPost(\"Ethnicity\");\n $employee->Disabled = $this->request->getPost(\"Disabled\");\n $employee->Disabilitydesc = $this->request->getPost(\"DisabilityDesc\");\n $employee->Onfile = $this->request->getPost(\"OnFile\");\n $employee->Workauthexpiredate = $this->request->getPost(\"WorkAuthExpireDate\");\n $employee->Usveteran = $this->request->getPost(\"USVeteran\");\n $employee->Militarystatus = $this->request->getPost(\"MilitaryStatus\");\n $employee->Accountnumber = $this->request->getPost(\"AccountNumber\");\n $employee->Notes = $this->request->getPost(\"Notes\");\n $employee->Billingrateref_listid = $this->request->getPost(\"BillingRateRef_ListID\");\n $employee->Billingrateref_fullname = $this->request->getPost(\"BillingRateRef_FullName\");\n $employee->Customfield1 = $this->request->getPost(\"CustomField1\");\n $employee->Customfield2 = $this->request->getPost(\"CustomField2\");\n $employee->Customfield3 = $this->request->getPost(\"CustomField3\");\n $employee->Customfield4 = $this->request->getPost(\"CustomField4\");\n $employee->Customfield5 = $this->request->getPost(\"CustomField5\");\n $employee->Customfield6 = $this->request->getPost(\"CustomField6\");\n $employee->Customfield7 = $this->request->getPost(\"CustomField7\");\n $employee->Customfield8 = $this->request->getPost(\"CustomField8\");\n $employee->Customfield9 = $this->request->getPost(\"CustomField9\");\n $employee->Customfield10 = $this->request->getPost(\"CustomField10\");\n $employee->Customfield11 = $this->request->getPost(\"CustomField11\");\n $employee->Customfield12 = $this->request->getPost(\"CustomField12\");\n $employee->Customfield13 = $this->request->getPost(\"CustomField13\");\n $employee->Customfield14 = $this->request->getPost(\"CustomField14\");\n $employee->Customfield15 = $this->request->getPost(\"CustomField15\");\n $employee->Status = $this->request->getPost(\"Status\");\n \n\n if (!$employee->save()) {\n foreach ($employee->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n $this->dispatcher->forward([\n 'controller' => \"employee\",\n 'action' => 'new'\n ]);\n\n return;\n }\n\n $this->flash->success(\"employee was created successfully\");\n\n $this->dispatcher->forward([\n 'controller' => \"employee\",\n 'action' => 'index'\n ]);\n }", "title": "" }, { "docid": "558964b441d4aa693a97192831130b74", "score": "0.5452493", "text": "public function empDepartment(){\n /**\n * return department which belongs to an employee.\n * first parameter is the model and second is a\n * foreign key.\n */\n return $this->belongsTo('App\\Department','dept_id');\n }", "title": "" }, { "docid": "ad16ad6d0216c709f1c840d090a2477c", "score": "0.54497683", "text": "private function createExpediente(InterPlan $modelPlan){\n yii::error('itentando crear expediente ');\n $postulante=$this->postulante;\n $campoCarrera=$postulante->campoCarrera();\n //var_dump($postulante->campoCarrera(),$postulante->isExternal());die();\n yii::error('es externo '.($postulante->isExternal())?'si':'no');\n yii::error('Campo carrera '.$campoCarrera);\n yii::error('carrera carera evaluador '.$modelPlan->eval->carrera->id);\n yii::error('POSTULANTE CAMPOS carrera '.$postulante->{$campoCarrera});\n if($modelPlan->eval->carrera->id==$postulante->{$campoCarrera}){\n yii::error('si es de la carreaera ');\n return InterExpedientes::firstOrCreateStatic([\n 'universidad_id'=>$this->universidad_id,\n 'facultad_id'=>$this->facultad_id,\n 'depa_id'=>$this->depa_id,\n 'plan_id'=>$modelPlan->id,\n 'orden'=>$modelPlan->ordenetapa, //oJO ESTA ES LA ETAPA NO EL ORDEN\n 'etapa_id'=>$modelPlan->etapa_id,\n 'programa_id'=>$this->programa_id,\n 'modo_id'=>$this->modo_id, \n 'convocado_id'=>$this->id,\n 'codocu'=>$modelPlan->codocu,\n 'secuencia'=>$modelPlan->orden, //OJO NO CONFUNDIRSE CON LA ETAPA, ESTE ES EL ORDEN\n ],InterExpedientes::SCE_BASICO,[ /*Campos para verifica rduplciados*/\n 'convocado_id'=>$this->id,\n 'secuencia'=>$modelPlan->orden,\n 'plan_id'=>$modelPlan->id,\n 'orden'=>$modelPlan->ordenetapa,\n ] );\n \n }else{\n yii::error('No es de la carrera');\n return false; \n \n }\n \n \n }", "title": "" }, { "docid": "035d973eb95ef7e4953ac7d34c8f5821", "score": "0.5449529", "text": "function generateEmployeeFromFKR($db)\n{\n global $arrHouseOwnership; // common_variable.php\n $bolOK = true;\n $strFKR = getRequestValue(\"dataID\");\n $strCandidate = \"\"; // id dari candidate\n if ($strFKR == \"\") {\n return false;\n }\n $arrFKR = [];\n $strSQL = \"\n SELECT * FROM hrd_fkr WHERE id = '$strFKR'\n \";\n $res = $db->execute($strSQL);\n if ($row = $db->fetchrow($res)) {\n $arrFKR = $row;\n $strCandidate = $row['id_candidate'];\n if ($row['id_employee'] != \"\") {\n return false;\n } //anggap sudah ada, tidak perlu dibuat lagi\n }\n if ($strCandidate == \"\") {\n return false;\n } // kandidat tidak ada, abaikan\n $arrCandidate = [];\n $strSQL = \"\n SELECT * FROM hrd_candidate WHERE id = '$strCandidate'\n \";\n $res = $db->execute($strSQL);\n if ($row = $db->fetchrow($res)) {\n $arrCandidate = $row;\n } else {\n return false;\n }\n // start proses generate data karyawan\n $db->execute(\"begin\");\n $strEmployeeID = $db->getNextID(\"hrd_employee_id_seq\");\n $strGender = ($arrCandidate['gender'] == \"\") ? 0 : $arrCandidate['gender'];\n $strMaritalStatus = ($arrCandidate['marital_status'] == \"1\") ? MARRIED : SINGLE; // di kandidat agak aneh, gak standard\n $strPhone = ($arrCandidate['phone'] != \"\" && $arrCandidate['hp'] != \"\") ? $arrCandidate['phone'] . \", \" . $arrCandidate['hp'] : $arrCandidate['phone'] . $arrCandidate['hp'];\n $strJoinDate = $strDueDate = $strJoinDate2 = $strDueDate2 = \"\";\n $strJoinDateLeave = $arrFKR['join_date']; // join date untuk leave\n $strPermanent = $strProbationEnd = $strPermanentAssign = \"\";\n $strProbation = 'f';\n if ($arrFKR['employee_status'] == 0) {\n $strJoinDate = $arrFKR['join_date'];\n $strPeriod = ($arrFKR['contract_month'] == \"\") ? 0 : $arrFKR['contract_month'];\n $strDueDate = getNextDateNextMonth($strJoinDate, $strPeriod);// date_functions.php\n $strDueDate = getNextDate($strDueDate, -1);\n $arrFKR['employee_status'] = STATUS_CONTRACT;\n } else //if ($arrFKR['employee_status'] == 1)\n {\n $strPermanent = $arrFKR['join_date'];\n $strPermanentAssign = $arrFKR['join_date'];\n $strPeriod = ($arrFKR['contract_month'] == \"\") ? 0 : $arrFKR['contract_month'];\n if (is_numeric($strPeriod) && $strPeriod > 0) //percobaan\n {\n $strProbation = 't';\n $strProbationEnd = getNextDateNextMonth($strPermanent, $strPeriod);// date_functions.php\n $strProbationEnd = getNextDate($strProbationEnd, -1);\n $strPermanentAssign = \"\";\n }\n $arrFKR['employee_status'] = STATUS_PERMANENT;\n }\n if (isset($arrHouseOwnership[$arrCandidate['house_ownership']])) {\n $strHouse = $arrHouseOwnership[$arrCandidate['house_ownership']]['text'];\n } else {\n $strHouse = $arrCandidate['house_ownership_other'];\n }\n $transport = 0;\n $strSQL = \"\n SELECT t1.*, t2.code as allowance_code\n FROM hrd_fkr_detail AS t1\n INNER JOIN hrd_allowance_type AS t2 ON t1.id_allowance_type = t2.id\n WHERE t1.id_fkr IN\n ( SELECT id FROM hrd_fkr WHERE id_candidate = '$strCandidate' )\n ;\n \";\n $res = $db->execute($strSQL);\n while ($row = $db->fetchrow($res)) {\n $fltAmount = ($row['amount_next'] == \"\" || $row['amount_next'] == 0) ? $row['amount_start'] : $row['amount_next'];\n if ($row['allowance_code'] == \"tunjangan_transport\") {\n $transport = $fltAmount;\n }\n }\n // $transport;\n // die();\n $strSQL = \"\n INSERT INTO hrd_employee (\n id, employee_id, employee_name, gender,\n primary_address, primary_phone, primary_city,\n primary_zip, emergency_address, emergency_phone,\n birthplace, birthday, nationality,\n driver_license_a, driver_license_b, driver_license_c,\n id_card, email, passport, bank_branch,\n bank_account, bank_account_name,\n weight, height, religion_code, employee_status,\n id_company, division_code, department_code,\n section_code, sub_section_code,\n position_code, grade_code,\n join_date, due_date, permanent_date,\n house_status, marital_status,\n photo, family_status_code, active, created,\n education_level_code,transport,transport_fee,branch_code,nickname\n )\n VALUES (\n '$strEmployeeID',\n '\" . addslashes($arrFKR['employee_id']) . \"',\n '\" . addslashes($arrFKR['employee_name']) . \"',\n '\" . $strGender . \"',\n '\" . addslashes($arrCandidate['current_address']) . \"',\n '\" . addslashes($strPhone) . \"',\n '\" . addslashes($arrCandidate['current_address_city']) . \"',\n '\" . addslashes($arrCandidate['current_address_zip']) . \"',\n '\" . addslashes($arrCandidate['permanent_address']) . \"',\n '\" . addslashes($arrCandidate['permanent_address_phone']) . \"',\n '\" . addslashes($arrCandidate['birthplace']) . \"',\n \" . handleDate($arrCandidate['birthdate']) . \",\n '\" . addslashes($arrCandidate['nationality']) . \"',\n '\" . addslashes($arrCandidate['driver_license_a']) . \"',\n '\" . addslashes($arrCandidate['driver_license_b']) . \"',\n '\" . addslashes($arrCandidate['driver_license_c']) . \"',\n '\" . addslashes($arrCandidate['id_card']) . \"',\n '\" . addslashes($arrCandidate['email']) . \"',\n '\" . addslashes($arrCandidate['passport']) . \"',\n '\" . addslashes($arrFKR['bank']) . \"',\n '\" . addslashes($arrFKR['bank_account_no']) . \"',\n '\" . addslashes($arrFKR['bank_account_name']) . \"',\n \" . handleNull($arrCandidate['weight']) . \",\n \" . handleNull($arrCandidate['height']) . \",\n \" . handleNull($arrCandidate['religion_code']) . \",\n \" . handleNull($arrFKR['employee_status']) . \",\n \" . handleNull($arrFKR['id_company']) . \",\n '\" . addslashes($arrFKR['division_code']) . \"',\n '\" . addslashes($arrFKR['department_code']) . \"',\n '\" . addslashes($arrFKR['section_code']) . \"',\n '\" . addslashes($arrFKR['sub_section_code']) . \"',\n '\" . addslashes($arrFKR['position_code']) . \"',\n '\" . addslashes($arrFKR['salary_grade_code']) . \"',\n \" . handleDate($strJoinDate) . \",\n \" . handleDate($strDueDate) . \",\n \" . handleDate($strPermanent) . \",\n '\" . addslashes($strHouse) . \"',\n \" . handleNull($strMaritalStatus) . \",\n \" . handleNull($arrCandidate['file_photo']) . \",\n '\" . addslashes($arrFKR['family_status_code']) . \"',\n '1', now(),\n \" . handleNull($arrCandidate['education_level_code']) . \",\n\t\t \" . handleNull($arrCandidate['transport']) . \",\n\t\t $transport,\n\t\t '\" . addslashes($arrFKR['branch_code']) . \"',\n\t\t '\" . addslashes($arrCandidate['nickname']) . \"'\n );\n \";\n $resExec = $db->execute($strSQL);\n if ($resExec == false) {\n $bolOK = false;\n }\n if ($bolOK) {\n // update juga data fkr, agar ada link ke id karyawan\n $strSQL = \"\n UPDATE hrd_fkr SET id_employee = '$strEmployeeID'\n WHERE id = '$strFKR';\n \";\n $resExec = $db->execute($strSQL);\n if ($resExec == false) {\n $bolOK = false;\n }\n }\n if ($bolOK) {\n // update juga data keluarga\n $bolOK = copyFamily($db, $strCandidate, $strEmployeeID);\n }\n if ($bolOK) {\n // update juga data pendidikan\n $bolOK = copyEducation($db, $strCandidate, $strEmployeeID);\n }\n if ($bolOK) {\n // update juga data training\n $bolOK = copyTraining($db, $strCandidate, $strEmployeeID);\n }\n if ($bolOK) {\n // update juga data pengalaman kerja\n $bolOK = copyWork($db, $strCandidate, $strEmployeeID);\n }\n if ($bolOK) {\n // update juga data pengalaman kerja\n $bolOK = copySalary($db, $strCandidate, $strEmployeeID);\n }\n if ($bolOK) {\n // update juga status keluarga (pajak)\n // $bolOK = updateFamilyStatus($db, $strEmployeeID, $strGender, $strMaritalStatus);\n }\n if ($bolOK) {\n $db->execute(\"commit\");\n $myDataGrid->message = getWords(\"Data Employee Succes be created!\");\n header(\"location:employee_edit.php?dataID=\" . $strEmployeeID);\n exit();\n } else {\n $db->execute(\"rollback\");\n }\n return $bolOK;\n}", "title": "" }, { "docid": "dff207e89f32df7a6fe3d3c982139926", "score": "0.5436944", "text": "public function getEmployeeDetails($employee_name){ \n\n try{ //fetch major details, including internal id\n $sql = \"SELECT employee_id, username, password, email_address, is_manager, is_admin, hours_day FROM employees WHERE employee_name = :_employee_name\";\n $stmt = $this->_db->prepare($sql);\n $details = array();\n if( $stmt->execute( array(':_employee_name' => $employee_name) ) ){\n $details = $stmt->fetch();\n if (is_null($details))\n {\n $_SESSION['error'] =\"Error: It would appear employee name did not exist - Please check for errors and try again!\";\n return 0;\n }\n $employee_id = $details['employee_id']; //set id \n \n $sql2 = \"SELECT manager_id FROM managers WHERE employee_id = :_employee_id\"; //fetch manager name first to allow \"no manager\" to be a thing (if manager leaves, set to 0)\n $stmt2 = $this->_db->prepare($sql2);\n if( $stmt2->execute( array(':_employee_id' => $employee_id) ) ){\n \n $manid = $stmt2->fetchColumn();\n \n if ($manid === false)\n {\n $_SESSION['error'] =\"Error: It would appear that the employee has no manager. You're going to need to alter the database manually...\";\n return 0;\n }\n else {\n if ($manid !== 0)\n {\n $sql3 = \"SELECT employee_name FROM employees WHERE employee_id = :_employee_id \"; //get manager name\n $stmt3 = $this->_db->prepare($sql3);\n if( $stmt3->execute( array(':_employee_id' => $manid ) )){\n $result3 = $stmt3->fetchColumn();\n \n \n if ($result3 !== false)\n {\n $details['manager_name'] = $result3;\n \n }\n else\n {\n $details['manager_name'] = \"\";\n }\n \n \n $sql4 = \"SELECT year, total_hours FROM holidays WHERE employee_id = :_employee_id \"; //get the last few details from a different table\n $stmt4 = $this->_db->prepare($sql4);\n if( $stmt4->execute( array(':_employee_id' => $employee_id ) )){\n $year_this = date(\"Y\");\n $year_next = $year_this + 1;\n $statementfour = $stmt4->fetchAll();\n $i = 0;\n foreach($statementfour as $data)\n {\n if ($data['year'] == $year_this || $data[\"year\"] == $year_next)\n {\n $details_array[$i] = array($data[\"year\"] => $data[\"total_hours\"]);\n $i++;\n }\n }\n // print_r($details_array);\n \n $details['hours_hol_this'] = $details_array[0][$year_this];\n $details['hours_hol_next'] = $details_array[1][$year_next];\n \n }\n }\n return $details;\n \n \n }\n else{\n return \"error\";\n } \n }\n \n }\n else{\n return \"error\";\n }\n }\n else{\n \n return \"nothing found\";\n }\n\n }\n catch(PDOException $e){\n return array('error' => $e->getMessage());\n } \n}", "title": "" }, { "docid": "43343fc28db67714715e624077d5a9a8", "score": "0.5424577", "text": "public function employee()\n {\n return $this->belongsTo(Employee::class);\n }", "title": "" }, { "docid": "521f6536869b94161c05924aff659cae", "score": "0.54230636", "text": "public function store(Request $request)\n {\n //variable for retirments to assinge to self value must be one;\n $self = 1;\n $this->validate($request,[\n \n \n 'prno' => 'required|max:9|unique:employees,PersonalNumber',\n 'name' => 'required',\n 'father' => 'required',\n 'cnic' => 'min:15|max:15|unique:employees,EmployeeCNIC|required',\n 'birth' => 'required',\n 'ddos' => 'required',\n 'marital' => 'required',\n 'funds' => 'required',\n 'grads' => 'required', \n 'title' => 'required',\n 'insurance' => 'required',\n 'deathOretir' => 'required',\n \n 'age' => 'required',\n 'enddate' => 'required',\n 'contribution' => 'required',\n ]);\n\n \n \n $employees = new Employees();\n $employees->PersonalNumber = $request->get('prno');\n $employees->EmployeeName = $request->get('name');\n $employees->EmployeeFatherHusbandName = $request->get('father');\n $employees->EmployeeCNIC = str_replace('-', '',$request->get('cnic'));\n\n $orgDate = $request->get('birth');\n $date = str_replace('/\"', '-', $orgDate); \n $newDate = date(\"Y-m-d\", strtotime($date));\n $employees->DateBirth = $newDate;\n $employees->DeptID = $request->get('funds');\n $employees->MaritalStatusID = $request->get('marital');\n $employees->DDO = $request->get('ddos');\n\n $employees->Grade = $request->get('grads');\n $employees->SDetObj = $request->get('title');\n $employees->GITypeID = $request->get('insurance');\n \n $DeathOrretirmentDate = $request->get('enddate');\n $DRdate = str_replace('/\"', '-', $DeathOrretirmentDate); \n $enddates = date(\"Y-m-d\", strtotime($DRdate));\n \n\n if(2 == $request->get('deathOretir')){\n $employees->DateDeath = $enddates;\n $employees->LegalHeirs = $request->get('beni');\n \n }else{\n \n $employees->DateRetirement = $enddates;\n $employees->LegalHeirs = $self;\n }\n\n $employees->AgeOnDate = $request->input('age');\n $employees->Contribution = $request->input('contribution');\n $employees->Status = \"submit\";\n $employees->user_id = Auth::id();\n $employees->save();\n return redirect()->to(url('/index/employees/beneficiary/create',$employees->id));\n \n }", "title": "" }, { "docid": "0c285aef10baaf63a147ecfbd804d20f", "score": "0.54081017", "text": "public function employee_designation()\n\t{\n\t\t\n\t\t$Return = array('chart_data'=>'', 'c_name'=>'', 'd_rows'=>'','c_color'=>'');\n\t\t$c_name = array();\n\t\t$c_am = array();\t\n\t\t$c_color = array('#9932CC','#556B2F','#16D39A','#DC143C','#D2691E','#8A2BE2','#FF976A','#FF4558','#00A5A8','#6495ED','#9932CC','#556B2F','#16D39A','#DC143C','#D2691E','#8A2BE2','#FF976A','#FF4558','#00A5A8','#6495ED','#9932CC','#556B2F','#16D39A','#DC143C','#D2691E','#8A2BE2','#FF976A','#FF4558','#00A5A8','#6495ED','#9932CC','#556B2F','#16D39A','#DC143C','#D2691E','#8A2BE2','#FF976A','#FF4558','#00A5A8','#6495ED','#9932CC','#556B2F','#16D39A','#DC143C','#D2691E','#8A2BE2','#FF976A','#FF4558','#00A5A8','#6495ED','#9932CC','#556B2F','#16D39A','#DC143C','#D2691E','#8A2BE2','#FF976A','#FF4558','#00A5A8','#6495ED','#9932CC','#556B2F','#16D39A','#DC143C','#D2691E','#8A2BE2','#FF976A','#FF4558','#00A5A8','#6495ED','#9932CC','#556B2F','#16D39A','#DC143C','#D2691E','#8A2BE2','#FF976A','#FF4558','#00A5A8','#6495ED','#9932CC','#556B2F','#16D39A','#DC143C','#D2691E','#8A2BE2','#FF976A','#FF4558','#00A5A8','#6495ED','#9932CC','#556B2F','#16D39A','#DC143C','#D2691E','#8A2BE2','#FF976A','#FF4558','#00A5A8','#6495ED','#9932CC','#556B2F','#16D39A','#DC143C','#D2691E','#8A2BE2','#FF976A','#FF4558','#00A5A8','#6495ED','#9932CC','#556B2F','#16D39A','#DC143C','#D2691E','#8A2BE2','#FF976A','#FF4558','#00A5A8','#6495ED','#9932CC','#556B2F','#16D39A','#DC143C','#D2691E','#8A2BE2','#FF976A','#FF4558','#00A5A8','#6495ED','#9932CC','#556B2F','#16D39A','#DC143C','#D2691E','#8A2BE2','#FF976A','#FF4558','#00A5A8','#6495ED','#9932CC','#556B2F','#16D39A','#DC143C','#D2691E','#8A2BE2','#FF976A','#FF4558','#00A5A8','#6495ED','#9932CC','#556B2F','#16D39A','#DC143C','#D2691E','#8A2BE2','#FF976A','#FF4558','#00A5A8','#6495ED','#9932CC','#556B2F','#16D39A','#DC143C','#D2691E','#8A2BE2','#FF976A','#FF4558','#00A5A8','#6495ED','#9932CC','#556B2F','#16D39A','#DC143C','#D2691E','#8A2BE2','#FF976A','#FF4558','#00A5A8','#6495ED','#9932CC','#556B2F','#16D39A','#DC143C','#D2691E','#8A2BE2','#FF976A','#FF4558','#00A5A8','#6495ED','#9932CC','#556B2F','#16D39A','#DC143C','#D2691E','#8A2BE2','#FF976A','#FF4558','#00A5A8','#6495ED','#9932CC','#556B2F','#16D39A','#DC143C','#D2691E','#8A2BE2','#FF976A','#FF4558','#00A5A8','#6495ED','#9932CC','#556B2F','#16D39A','#DC143C','#D2691E','#8A2BE2','#FF976A','#FF4558','#00A5A8','#6495ED','#9932CC','#556B2F','#16D39A','#DC143C','#D2691E','#8A2BE2','#FF976A','#FF4558','#00A5A8','#6495ED');\n\t\t$someArray = array();\n\t\t$j=0;\n\t\tforeach($this->Designation_model->all_designations() as $designation) {\n\t\t\n\t\t\t$condition = \"designation_id =\" . \"'\" . $designation->designation_id . \"'\";\n\t\t\t$this->db->select('*');\n\t\t\t$this->db->from('tat_employees');\n\t\t\t$this->db->where($condition);\n\t\t\t$this->db->group_by('location_id');\n\t\t\t$query = $this->db->get();\n\t\t\t$checke = $query->result();\n\t\t\t\n\t\t\tif ($query->num_rows() > 0) {\n\t\t\t\t$row = $query->num_rows();\n\t\t\t\t$d_rows [] = $row;\t\n\t\t\t\t$c_name[] = htmlspecialchars_decode($designation->designation_name);\n\t\t\t\t$someArray[] = array(\n\t\t\t\t 'label' => htmlspecialchars_decode($designation->designation_name),\n\t\t\t\t 'value' => $row,\n\t\t\t\t 'bgcolor' => $c_color[$j]\n\t\t\t\t );\n\t\t\t\t $j++;\n\t\t\t}\n\t\t}\n\t\t$Return['c_name'] = $c_name;\n\t\t$Return['d_rows'] = $row;\n\t\t$Return['chart_data'] = $someArray;\n\t\t$this->output($Return);\n\t\texit;\n\t}", "title": "" }, { "docid": "d69c6b07d2fb1167b9d85a102f612761", "score": "0.5401972", "text": "public function Crear_Empre_Prov(,$Id_emp ,$EstadoUsu_Id_est_usu ,$Solicitud_empleado_idSolicitud ,$Name_emp ,$Email_emp ,$Pass_emp ,$Img_emp ,$Id_supvisor ,$Obser_emp ,$Edad_emp ){\n $this->Id_emp=$Id_emp;\n$this->EstadoUsu_Id_est_usu=$EstadoUsu_Id_est_usu;\n$this->Solicitud_empleado_idSolicitud=$Solicitud_empleado_idSolicitud;\n$this->Name_emp=$Name_emp;\n$this->Email_emp=$Email_emp;\n$this->Pass_emp=$Pass_emp;\n$this->Img_emp=$Img_emp;\n$this->Id_supvisor=$Id_supvisor;\n$this->Obser_emp=$Obser_emp;\n$this->Edad_emp=$Edad_emp;\n}", "title": "" }, { "docid": "03c57c0837facdd5b92e81674fae98f8", "score": "0.5400282", "text": "function editEmployee($id, $firstname, $lastname, $birthdate, $gender, $salary)\n{\n global $c;\n $a = $c->getItem($id);\n $a->setFirstName($firstname);\n $a->setLastName($lastname);\n $a->setBirthDate($birthdate);\n $a->setGender($gender);\n $a->setSalary($salary);\n}", "title": "" }, { "docid": "f807e405c310f64f37120ceacea716ff", "score": "0.53980476", "text": "function createNewPerson() {\n \n #Adding names\n\t$fname=ucwords(strtolower($this->mapped_data['firstname']));\n\t$surname=ucwords(strtolower($this->mapped_data['surname']));\t\n\t$othername=ucwords(strtolower($this->mapped_data['othername']));\n\t$maidenname=ucwords(strtolower($this->mapped_data['maidenname']));\t\n #apply date formating here.\n\t$appointmentdate=ucwords(strtolower($this->mapped_data['date_hired']));\n\t\n $personObj = $this->ff->createContainer('person');\n $personObj->firstname = trim($fname);\n $personObj->surname = trim($surname);\n $personObj->othername = trim($othername);\n $personObj->maidenname = trim($maidenname);\n //$personObj->datefirstappointment = trim($appointmentdate);\n $personObj->getField('datefirstappointment')->setFromPost($appointmentdate);\n //$personObj->getField('prefix')->setValue($prefix);\n //$personObj->getField('prefix')->setFromPost($prefix);\n\t\n\t# Adding Prefix\n if($this->mapped_data[\"prefix\"]==\"MISS\")\n\t\t$prefixid='nametitle|4';\n\telseif($this->mapped_data[\"prefix\"]==\"MR\")\n\t\t$prefixid='nametitle|1';\n\telse \n\t{\n\t $prefixid=$this->mapped_data[\"prefix\"].'- which is not in your \"IF STATEMENT\" above !!!'; \n echo 'the Prefix id is == '. $prefixid;\n }\n # save the value\n $personObj->getField('nametitle')->setFromPost($prefixid);\n\t\n # Adding Nationality \n if (($country_id = array_search('MW',$this->existing_codes)) !== false) \n { \n $personObj->nationality = array('country',$country_id);\n } \n\n #Adding District of Origin\n if($this->mapped_data['district']==\"Lilongwe\")\n\t\t$domid='district|1';\n\telseif($this->mapped_data['district']==\"MZIMBA\")\n\t\t$domid='district|2';\n\telse\n\t{\n\t $domid=$this->mapped_data[\"district\"].'- which is not in your \"IF STATEMENT\" above !!!'; \n echo 'the district id is == '.$domid;\n }\n # save the value\n //$personObj->getField('residence')->setFromPost($domid); \n $domid='district|'.$this->loadDistricts();\n $personObj->getField('residence')->setFromPost($domid); \n /* \n #Adding Place Of Domicile\n /*\n $domid='district|'.$this->loadDistricts();\n $personObj->getField('residence')->setFromPost($domid); \n */\n\t$personID = $this->save($personObj,false);\n\t$parent_id='person|'.$personID;\n\t$_SESSION[\"parent_id\"]=$parent_id;\n\t\n\t//Adding Confirmation Date\n\n\t$confObj = $this->ff->createContainer('confirmationtoservice');\n\t$confObj->getField('parent')->setValue($parent_id);\n\t$confObj->getField('confirmationdate')->setFromPost($this->convert_date(\"conf\"));\n\t$this->save($confObj);\n\n\t//Adding Demographic info\n\t#format sex\n\tif($this->mapped_data[\"sex\"]==\"Female\")\n\t\t$sexid='F';\n\telse\n\t $sexid='M';\n\t\n\t$children=$this->mapped_data[\"no_child\"];\n\t$dependents=$this->mapped_data[\"no_dep\"];\n\t\n\t$domObj = $this->ff->createContainer('demographic');\n\t$domObj->getField('parent')->setValue($parent_id);\t \n\t$domObj->getField('birth_date')->setFromPost($this->convert_date(\"dateofbirth\"));\t\n\t$domObj->gender=array(\"gender\",'gender|'.$sexid);\n\t$domObj->marital_status=array(\"marital_status\",$this->get_marital_id($this->mapped_data[\"maritalstatus\"]));\n\t$domObj->disability=array(\"disability\",$this->get_disability_id($this->mapped_data[\"disability\"]));\t\n\t$domObj->dependents=$dependents;\t\n\t$this->save($domObj);\n\n //Adding Employment Identification\n $empno=$this->mapped_data['empno'];\n $idtype='id_type|1'; \n\t$idObj = $this->ff->createContainer('person_id');\n\t$idObj->getField('parent')->setFromPost($parent_id);\n\t$idObj->getField('id_type')->setFromPost($idtype); \n $idObj->getField('id_num')->setValue($empno);\n $this->save($idObj);\n \n return $personObj;\n }", "title": "" }, { "docid": "94b784509345b5f9eb9fc080bdf05285", "score": "0.539182", "text": "public function maintenEmployee()\n {\n return $this->belongsTo('App\\Models\\Employee', 'mainten_employee_id');\n }", "title": "" }, { "docid": "ce50ba0fb8a6b45420676b63c055f92c", "score": "0.53885037", "text": "function occupation() {\n //\n // do not forget to update version\n //\n $this->author = 'Herman Tolentino MD';\n $this->version = \"0.6-\".date(\"Y-m-d\");\n $this->module = \"occupation\";\n $this->description = \"CHITS Module - Occupation\";\n // 0.3 added error management for foreign key constraint\n // 0.4 added automated index generation for new occupation\n // see get_cat_index()\n // 0.5 changed order of form and display, also of Occupation ID\n // and Occupation Category\n // 0.6 debugged: ucwords save of occupation name\n }", "title": "" }, { "docid": "39509d49b8d96a9b6d755b06ddd1dd66", "score": "0.5383493", "text": "function AddEmployee($connection, $name, $address, $lastName, $originCountry, $phone, $numberFamily, $numberVisits, $id, $men, $women, $boys, $girls, $notes, $pregnant, $date, $race) {\n\t$n = mysqli_real_escape_string($connection, $name);\n\t$a = mysqli_real_escape_string($connection, $address);\n\t$l = mysqli_real_escape_string($connection, $lastName);\n\t$o = mysqli_real_escape_string($connection, $originCountry);\n\t$p = mysqli_real_escape_string($connection, $phone);\n\t$numf = mysqli_real_escape_string($connection, $numberFamily);\n\t$numv = mysqli_real_escape_string($connection, $numberVisits);\n\t$i = mysqli_real_escape_string($connection, $id);\n\t$m = mysqli_real_escape_string($connection, $men);\n\t$w = mysqli_real_escape_string($connection, $women);\n\t$b = \"0\";\n\t$g = \"0\";\n\t$note = mysqli_real_escape_string($connection, $notes);\n\t$preg = mysqli_real_escape_string($connection, $pregnant);\n\t$dat = mysqli_real_escape_string($connection, $date);\n\t$rac = mysqli_real_escape_string($connection, $race);\n\t//echo $d; //debug\n\t$query = \"INSERT INTO `Employees7` (ID, Name, Address, LastName, OriginCountry, Phone, NumberOfFamily, VisitsBefore, NumMen, NumWomen, NumBoys, NumGirls, Notes, Pregnant, RegistrationDate, Race) VALUES ('$i', '$n', '$a', '$l', '$o', '$p', '$numf', '$numv', '$m', '$w', '$b', '$g', '$note', '$preg', '$dat', '$rac');\";\n\tif(!mysqli_query($connection, $query)) echo(\"<p>Error adding employee data.</p>\");\n $query2 = \"INSERT INTO Months (ID, January, Febuary, March, April, May, June, July, August, September, October, November, December) VALUES ('$i', 'no', 'no', 'no', 'no', 'no', 'no', 'no', 'no', 'no', 'no', 'no', 'no');\";\n if(!mysqli_query($connection, $query2)) echo(\"<p>Error adding month data.</p>\");\n}", "title": "" }, { "docid": "6e8a9eceabb6939ea4bf98cd7c1e24c9", "score": "0.5354459", "text": "function creerfiliation() {\n\t\t//à partir de this->pere et this->mere\n\t\t/*pp = new relationpersonnes() ;\n\t\tif ($this->pere<> \"\") {\n\t\t\t$pere = new personne() ;\n\t\t\t$pere->identify($this->pere) ;\n\t\t\t$n = $rpp->count(\"where personne1 = $this->num and personne2 = $pere->num and typerelation = 1\") ;\n\t\t\tif ($n == 0) {\n\t\t\t\t$rpp->personne1 = $this->num ;\n\t\t\t\t$rpp->personne2 = $pere->num ;\n\t\t\t\t$rpp->typerelation = 1 ;\n\t\t\t\t$rpp->num = 0 ;\n\t\t\t\t$rpp->save() ;\n\t\t\t}\n\t\t}\n\t\tif ($this->mere<> \"\") {\n\t\t\t$mere = new personne() ;\n\t\t\t$mere->identify($this->mere) ;\n\t\t\t$mere->sexe = \"f\" ;\n\t\t\t$mere->save() ;\n\t\t\t$n = $rpp->count(\"where personne1 = $this->num and personne2 = $mere->num and typerelation = 1\") ;\n\t\t\tif ($n == 0) {\n\t\t\t\t$rpp->personne1 = $this->num ;\n\t\t\t\t$rpp->personne2 = $mere->num ;\n\t\t\t\t$rpp->typerelation = 1 ;\n\t\t\t\t$rpp->num = 0 ;\n\t\t\t\t$rpp->save() ;\n\t\t\t}\n\t\t}\n\t\t//echo \"fraternité\" ;\n\t\t//vérifications des liens de fraternité\n\t\t//$rpp = new relationspersonnes() ;\n\t\t$rpp2 = new relationpersonnes() ;\n\t\t//même père\n\t\tif (isset($pere)) {\n\t\t\t//echo \"il y a un père\" ;\n\t\t\t$rpp->select(\"where personne1 <> $this->num AND personne2 = $pere->num and typerelation = 1\") ;\n\t\t\twhile ($rpp->next()) {\n\t\t\t\t$frere = $rpp->personne1 ;\n\t\t\t\t$n = $rpp2->count(\"where ((personne1 = $this->num and personne2 = $frere) or (personne2 = $this->num and personne1 = $frere) and typerelation = 2)\") ;\n\t\t\t\tif ($n == 0) {\n\t\t\t\t\t//on créée la relation\n\t\t\t\t\t$rpp2->num = 0 ;\n\t\t\t\t\t$rpp2->personne1 = $this->num ;\n\t\t\t\t\t$rpp2->personne2 = $frere ;\n\t\t\t\t\t$rpp2->typerelation = 2 ;\n\t\t\t\t\t$rpp2->save() ;\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t\t//echo \"fraternité fin\" ;*/\n\t\treturn 1 ;\n\t}", "title": "" }, { "docid": "22bd41b3cb84e17605865f09e828ec7d", "score": "0.5342886", "text": "public function addEmployee($emp) {\n foreach($this->employees as $e)\n if($emp->getID() == $e->getID())\n return false;\n //Add the employee if it doesnt already exist.\n if(!isset($this->employees)) $this->employees = array($emp);\n else $this->employees[] = $emp; \n\n /* \n At this point in the function we have the employee added to the company.\n Next, we need to add the employee to a workstation, which makes the data cleaner.\n */\n //Go through each workstation and look for the correct one.\n $wsFound = false;\n foreach($this->workstations as $ws){\n if($ws->getNumber() == $emp->getComputer()){\n //Correct workstation was found for this employee.\n $ws->addEmployee($emp); \n $wsFound = true;\n }\n }\n //Create a new workstation and add the employee to it.\n if(!isset($this->workstations)) $this->workstations = array(new Workstation($emp->getComputer(), $emp));\n else if(!$wsFound) $this->workstations[] = new Workstation($emp->getComputer(), $emp);\n return true;\n }", "title": "" }, { "docid": "9efc9e9655653b4480025d88e0e6c89d", "score": "0.5335152", "text": "public function reviewEmployee()\n {\n return $this->belongsTo('App\\Models\\Employee', 'review_employee_id');\n }", "title": "" }, { "docid": "37ce3ecebf5343c47d82952f7aed7383", "score": "0.53256136", "text": "public function edit(Employee $employee)\n {\n \n }", "title": "" }, { "docid": "54c62e6b4c6b3adaeed3b47cd12b28d3", "score": "0.5318703", "text": "public function create()\n {\n $roles = Role::all();\n $permissions = Permission::all();\n $departments = $data = Departments::select('department_id','department_name')->get();\n $designations = $data = Designations::select('designation_id','designation_name')->get();\n if (!Auth::user()->hasPermissionTo('Employee Management')) {\n abort('401');\n } else {\n return view('employees.create', ['permissions'=>$permissions, 'departments'=>$departments, 'designations'=>$designations, 'roles'=>$roles]);\n }\n }", "title": "" }, { "docid": "e6a67ecb3dc64ef86346fc3fb44a14d6", "score": "0.5314828", "text": "public function getEmployeeRole()\n {\n return \"NOT IMPLEMENTED YET\";\n }", "title": "" }, { "docid": "ace08ffc54d1a196cef6e545339083c8", "score": "0.5313341", "text": "public function createLead(){\n\t\t\n\t}", "title": "" }, { "docid": "f2daddb8bbd80bc43992d4fe5234623c", "score": "0.53040063", "text": "public function update(Request $request, Employee $employee)\n {\n if (Gate::allows('isAdmin') || Gate::allows('isHr')) {\n $request->validate([\n \"profile_img\" => ['mimes:jpg,jpeg,png'],\n \"first_name\" => ['required'],\n \"last_name\" => ['required'],\n \"middle_name\" => ['required'],\n \"birthday\" => ['required'],\n \"birth_place\" => ['required'],\n \"citizenship\" => ['required'],\n \"religion\" => ['required'],\n \"present_address\" => ['required'],\n \"permanent_address\" => ['required'],\n \"civil_status\" => ['required'],\n \"contact\" => ['required', 'numeric'],\n \"gender\" => ['required'],\n \"emp_id\" => ['required', 'unique:employees,emp_id,'.$employee->id],\n \"department_id\" => ['required'],\n \"position_id\" => ['required'],\n \"height\" => ['required'],\n \"weight\" => ['required'],\n \"religion\" => ['required'],\n \"father_name\" => ['required'],\n \"father_birthday\" => ['required'],\n \"mother_name\" => ['required'],\n // \"mother_birthday\" => ['required'],\n // \"spouse_name\" => ['required'],\n // \"date_of_marriage\" => ['required'],\n // \"children\" => ['required'],\n \"elementary\" => ['required'],\n \"elementary_grad_date\" => ['required'],\n \"highschool\" => ['required'],\n \"highschool_grad_date\" => ['required'],\n \"college\" => ['required'],\n \"college_grad_date\" => ['required'],\n \"person_to_contact\" => ['required'],\n \"person_to_contact_address\" => ['required'],\n \"person_to_contact_number\" => ['required', 'numeric'],\n // \"tin_no\" => ['numeric'],\n // \"sss_no\" => ['numneric'],\n // \"philhealth_no\" => ['numneric'],\n // \"hdmf_no\" => ['numneric'],\n ]);\n\n $arr = array(request('experience'));\n $works = serialize($arr[0]);\n\n $arr1 = array(request('children'));\n $childrens = serialize($arr1[0]);\n\n if ($employee->profile_img != null && $request->hasFile('profile_img')) {\n\n Storage::delete('public/uploaded/'.$employee->profile_img);\n $filePath = 'public/uploaded';\n $fileExtension = $request->file('profile_img')->getClientOriginalExtension();\n $newFileName = rand(11111, 99999).'.'.$fileExtension;\n $request->file('profile_img')->storeAs($filePath, $newFileName);\n\n }elseif($employee->profile_img == null && $request->hasFile('profile_img')){\n\n $filePath = 'public/uploaded';\n $fileExtension = $request->file('profile_img')->getClientOriginalExtension();\n $newFileName = rand(11111, 99999).'.'.$fileExtension;\n $request->file('profile_img')->storeAs($filePath, $newFileName);\n\n }else{\n $newFileName = $employee->profile_img;\n }\n\n $employee->profile_img = $newFileName;\n $employee->first_name = $request->first_name;\n $employee->last_name = $request->last_name;\n $employee->middle_name = $request->middle_name;\n $employee->birthday = $request->birthday;\n $employee->birth_place = $request->birth_place;\n $employee->citizenship = $request->citizenship;\n $employee->religion = $request->religion;\n $employee->present_address = $request->present_address;\n $employee->permanent_address = $request->permanent_address;\n $employee->civil_status = $request->civil_status;\n $employee->contact = $request->contact;\n $employee->gender = $request->gender;\n $employee->emp_id = $request->emp_id;\n $employee->department_id = $request->department_id;\n $employee->position_id = $request->position_id;\n $employee->height = $request->height;\n $employee->weight = $request->weight;\n $employee->religion = $request->religion;\n $employee->father_name = $request->father_name;\n $employee->father_birthday = $request->father_birthday;\n $employee->mother_name = $request->mother_name;\n $employee->mother_birthday = $request->mother_birthday;\n $employee->spouse_name = $request->spouse_name;\n $employee->date_of_marriage = $request->date_of_marriage;\n $employee->children = $childrens;\n $employee->elementary = $request->elementary;\n $employee->elementary_grad_date = $request->elementary_grad_date;\n $employee->highschool = $request->highschool;\n $employee->highschool_grad_date = $request->highschool_grad_date;\n $employee->college = $request->college;\n $employee->college_grad_date = $request->college_grad_date;\n $employee->person_to_contact = $request->person_to_contact;\n $employee->person_to_contact_address = $request->person_to_contact_address;\n $employee->person_to_contact_number = $request->person_to_contact_number;\n $employee->tin_no = $request->tin_no;\n $employee->sss_no = $request->sss_no;\n $employee->philhealth_no = $request->philhealth_no;\n $employee->hdmf_no = $request->hdmf_no;\n $employee->experience = $works;\n $employee->save();\n\n return redirect(route('hr.emp.show', ['employee' => $employee->id]));\n\n }else{\n abort(403, 'You are not Authorized on this page!');\n }\n }", "title": "" }, { "docid": "ea370571ef334a9fc19bc0917b4d77b5", "score": "0.52949464", "text": "public function update(EmployeeDesignation $employee_designation, $params)\n {\n $date_effective = gv($params, 'date_effective');\n\n $this->validateInput($employee_designation->Employee, $params, $employee_designation->id);\n\n $employee_term = $employee_designation->EmployeeTerm;\n\n if ($employee_term->date_of_joining == $employee_designation->date_effective && $date_effective != $employee_designation->date_effective) {\n throw ValidationException::withMessages(['date_effective' => trans('employee.first_designation_date_should_be_date_of_joining', ['date' => showDate($employee_term->date_of_joining)])]);\n }\n\n if ($date_effective < $employee_term->date_of_joining || ($employee_term->date_of_leaving && $date_effective > $employee_term->date_of_leaving)) {\n throw ValidationException::withMessages(['date_effective' => trans('employee.date_not_in_term_range', ['start_date' => showDate($employee_term->date_of_joining), 'end_date' => $employee_term->date_of_leaving ? showDate($employee_term->date_of_leaving) : showDate(date('Y-m-d')) ]) ]);\n }\n\n $employee_designation->forceFill($this->formatParams($params, null, 'update'))->save();\n\n $last_designation = $employee_designation->Employee->EmployeeDesignations->where('id', '!=', $employee_designation->id)->sortByDesc('date_effective')->first();\n\n if ($last_designation) {\n $last_designation->date_end = Carbon::parse(gv($params, 'date_effective'))->subDays(1)->toDateString();\n $last_designation->save();\n }\n\n $this->processUpload($employee_designation, $params, 'update');\n\n return $employee_designation;\n }", "title": "" }, { "docid": "a24c077f6869a1458a918f74998127f8", "score": "0.529057", "text": "public function employee(){\n return $this->belongsTo('App\\Models\\Employee','employee_id_fk');\n }", "title": "" }, { "docid": "cd102aca3306cda82a54958788b7e057", "score": "0.5283231", "text": "function addEmployeeProfile(){\r\n\t\t $branch_dropdown = $this->SelectBranch();\r\n\t\t $department_dropdown = $this->SelectDepartment();\r\n\t\t $designation_dropdown = $this->SelectDesignation();\r\n\t\t $adminTyp_dropdown = $this->SelectAdminType();\r\n\t\t$PersonDropdown = $this->SelectPerson($ele_id = 'person_id', $ele_lbl_id = 'lbl_client');\r\n \t\t require_once(EMPLOYEE_ADD_SKIN);\r\n\t\t \r\n \t if ((getRequest('submit'))) {\r\n \t \t $info = array();\r\n\t\t $reqData = array();\r\n \t\t $info['table'] = HRM_EMPLOYEE_TBL;\r\n\t\t $reqData = getUserDataSet(HRM_EMPLOYEE_TBL);\r\n\t\t $reqData['actual_join_date'] = formatDate4insert(getRequest('actual_join_date'));\r\n\t\t $reqData['password'] = md5(md5(getRequest('employee_id')));\r\n\t\t $person_id = $this->addPerson();\r\n\t\t $reqData['person_id'] = $person_id;\r\n\t\t $reqData['employee_id'] = $person_id;\r\n\t\t $reqData['user_group_id'] = '3';\r\n\t\t $reqData['blocked'] = 'Y';\r\n\t\t $reqData['active'] ='N';\r\n\t\t $info['data'] = $reqData; \r\n\t\t $info['debug'] = true;\r\n\t\t $res = insert($info);\r\n\t\t\t if($res){\r\n\t\t\t\t//$employee_id = getRequest('employee_id');\r\n\t\t\t\t\theader(\"location:?app=employee&cmd=ViewEmployeeProfile&person_id=$person_id&EDmsg=Successfully Saved\");\r\n\t\t\t\t\t} \t \t \r\n \t \t\r\n \t else\r\n \t {\t//mysql_query('ROLLBACK');\r\n \t\theader(\"location:index.php?app=employee&cmd=save&msg=Not Saved\");\r\n \t \t\r\n \t } \r\n\t} // // end submit if\r\n }", "title": "" }, { "docid": "50817b6ddf6665fc1fa6055c619cb003", "score": "0.52819747", "text": "public function employee() {\n return $this->belongsTo('App\\Models\\Employee');\n }", "title": "" }, { "docid": "b0440d34bc6ab711c27f071e56d8e241", "score": "0.5277689", "text": "public function department(){\n\n }", "title": "" }, { "docid": "5f6b88585ccc3b264ab94d8903f86140", "score": "0.52601844", "text": "public function addEmployee($employee_id='')\n\t{\n\t\t$role_id = login_role;\n\t\tif($employee_id)\n\t\t{\n\t\t\tif($this->checkEditPermission())\n\t\t\t{\n\t\t\t\tif (isset($_POST['Submit']) && $_POST['Submit'] == \"Edit\") \n\t\t\t\t{\n\t\t\t\t\t$this->form_validation->set_rules($this->validation_rules['employeeEdit']);\n\t\t\t\t\tif($this->form_validation->run())\n\t\t\t\t\t{\n\t\t\t\t\t\t$post['user_full_name'] = $this->input->post('employee_name');\n\t\t\t\t\t\t$post['user_email'] = $this->input->post('employee_email');\n\t\t\t\t\t\tif(isset($_POST['employee_new_pass']) && $_POST['employee_new_pass'] != '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$post['user_password'] = md5($this->input->post('employee_new_pass'));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif($role_id == 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$post['company_id'] = $this->input->post('company_id');\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$post['company_id'] = $this->data['user_id'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$post['department_id'] \t= $this->input->post('department_id');\n\t\t\t\t\t\t$post['user_phone'] = $this->input->post('employee_phone');\t\t\t\t\t\t\n\t\t\t\t\t\t$post['user_city'] = $this->input->post('employee_city');\n\t\t\t\t\t\t$post['user_zip_code'] = $this->input->post('employee_zip_code');\t\t\t\t\t\t\n\t\t\t\t\t\t$post['user_country_id'] = $this->input->post('employee_country_id');\n\t\t\t\t\t\t$post['user_state_id'] = $this->input->post('employee_state_id');\n\t\t\t\t\t\t$post['user_address'] = $this->input->post('employee_address');\n\t\t\t\t\t\t$post['user_currency_type'] = $this->input->post('employee_currency_type');\n\t\t\t\t\t\t$post['user_short_note'] = $this->input->post('employee_short_note');\n\t\t\t\t\t\t// $post['user_fax'] = $this->input->post('employee_fax');\n\t\t\t\t\t\t// $post['user_website'] = $this->input->post('employee_website');\n\t\t\t\t\t\t$post['user_skype_id'] = $this->input->post('employee_skype_id');\n\t\t\t\t\t\t$post['user_facebook_url'] = $this->input->post('employee_fb_id');\n\t\t\t\t\t\t$post['user_twitter_id'] = $this->input->post('employee_twitter_id');\n\t\t\t\t\t\t$post['user_linkedin_url'] = $this->input->post('employee_linkedin_url');\n\t\t\t\t\t\t$post['user_status'] = $this->input->post('employee_status');\t\t\t\t\t\n\t\t\t\t\t\t$post['user_created_date'] = date('Y-m-d');\n\t\t\t\t\t\t$post['user_update_date'] = date('Y-m-d');\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($_FILES[\"employee_img\"][\"name\"])\n\t\t\t\t\t\t{\n\t $employee_img = 'employee_img';\n\t $fieldName = \"employee_img\";\n\t $Path = 'webroot/upload/user/';\n\t $employee_img = $this->ImageUpload($_FILES[\"employee_img\"][\"name\"], $employee_img, $Path, $fieldName);\n\t $post['user_profile_img'] = $Path.''.$employee_img;\n\t }\t \n\t\t\t\t\t\t$employee_id = $this->employee_model->updateEmployee($post,$employee_id);\t\n\t\t\t\t\t\tif($employee_id)\n\t\t\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\t\t\t$msg = 'Employee Update Successfully!!';\t\t\t\t\t\n\t\t\t\t\t\t\t$this->session->set_flashdata('message', '<section class=\"content\"><div class=\"col-xs-12\"><div class=\"alert alert-success alert-dismissable\"><i class=\"fa fa-check\"></i><button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">&times;</button>'.$msg.'</div></div></section>');\n\t\t\t\t\t\t\tredirect(base_url().'employee');\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\t\t\t\n\t\t\t\t\t\t$edit_employee = $this->employee_model->editEmployee($employee_id);\n\t\t\t\t\t\t$this->data['edit_employee'] = $edit_employee;\n\t\t\t\t\t\t$this->data['country_list'] = $this->employee_model->getCountryList();\n\t\t\t\t\t\t$this->data['role_list'] = $this->employee_model->getRoleList();\n\t\t\t\t\t\t$this->data['state_list'] = $this->comman_model->getData('tbl_state' , array('country_id' => $edit_employee[0]->country_id));\t\t\n\t\t\t\t\t\t// $this->data['company_list'] = $this->employee_model->getCompanyList();\n\t\t\t\t\t\t$this->data['department_list'] = $this->employee_model->getDepartMentByCompanyId(login_user);\n\t\t\t\t\t\t// echo \"<pre>\"; print_r($this->data['department_list']); die();\n\n\t\t\t\t\t\t$this->show_view_admin('admin/employee/employee_update', $this->data);\n\t\t\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$edit_employee = $this->employee_model->editEmployee($employee_id);\n\t\t\t\t\t$this->data['edit_employee'] = $edit_employee;\n\t\t\t\t\t$this->data['country_list'] = $this->employee_model->getCountryList();\n\t\t\t\t\t$this->data['role_list'] = $this->employee_model->getRoleList();\n\t\t\t\t\t$this->data['state_list'] = $this->comman_model->getData('tbl_state' , array('country_id' => $edit_employee[0]->user_country_id));\t\t\n\t\t\t\t\t$this->data['department_list'] = $this->employee_model->getDepartMentByCompanyId(login_user);\n\t\t\t\t\t// echo \"<pre>\"; print_r($this->data['department_list']); die();\n\n\t\t\t\t\t$this->show_view_admin('admin/employee/employee_update', $this->data);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tredirect( base_url().'dashboard/error/1');\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\t\t\n\t\t\tif($this->checkAddPermission())\n\t\t\t{\n\n\t\t\t\tif (isset($_POST['Submit']) && $_POST['Submit'] == \"Add\") \n\t\t\t\t{\n\t\t\t\t\t$this->form_validation->set_rules($this->validation_rules['employeeAdd']);\n\t\t\t\t\tif($this->form_validation->run())\n\t\t\t\t\t{\n\t\t\t\t\t\t$post['user_full_name'] = $this->input->post('employee_name');\n\t\t\t\t\t\t$post['user_id'] \t = round(microtime(true) * 1000);\n\t\t\t\t\t\n\t\t\t\t\t\t$post['user_email'] \t= $this->input->post('employee_email');\n\t\t\t\t\t\t$post['department_id'] \t= $this->input->post('department_id');\n\t\t\t\t\t\t$post['user_phone'] \t= $this->input->post('employee_phone');\n\t\t\t\t\t\t$post['user_password']\t= md5($this->input->post('employee_password'));\n\t\t\t\t\t\t$post['user_city'] \t\t= $this->input->post('employee_city');\n\t\t\t\t\t\t$post['user_zip_code'] \t= $this->input->post('employee_zip_code');\n\t\t\t\t\t\t$post['user_country_id']= $this->input->post('employee_country_id');\n\t\t\t\t\t\t$post['user_state_id'] \t= $this->input->post('employee_state_id');\n\t\t\t\t\t\t$post['user_address'] \t= $this->input->post('employee_address');\n\t\t\t\t\t\t$post['user_currency_type'] = $this->input->post('employee_currency_type');\n\t\t\t\t\t\t$post['user_short_note'] = $this->input->post('employee_short_note');\n\t\t\t\t\t\t// $post['user_fax'] = $this->input->post('employee_fax');\n\t\t\t\t\t\t// $post['user_website'] = $this->input->post('employee_website');\n\t\t\t\t\t\t$post['user_skype_id'] \t\t= $this->input->post('employee_skype_id');\n\t\t\t\t\t\t$post['user_facebook_url'] \t= $this->input->post('employee_fb_id');\n\t\t\t\t\t\t$post['user_twitter_id'] \t= $this->input->post('employee_twitter_id');\n\t\t\t\t\t\t$post['user_linkedin_url'] \t= $this->input->post('employee_linkedin_url');\n\t\t\t\t\t\t$post['user_status'] \t\t= $this->input->post('employee_status');\n\t\t\t\t\t\t$post['user_role_id'] \t\t= '3';\n\t\t\t\t\t\t$post['user_type'] \t\t\t= 'Employee';\n\t\t\t\t\t\t$post['user_created_date'] \t= date('Y-m-d');\n\t\t\t\t\t\t$post['user_update_date'] \t= date('Y-m-d');\n\t\t\t\t\t\t$post['added_by'] \t\t\t= login_user;\t\t\t\t\t\t\n\t\t\t\t\t\tif ($_FILES[\"employee_img\"][\"name\"])\n\t\t\t\t\t\t{\n\t $employee_img = 'employee_img';\n\t $fieldName = \"employee_img\";\n\t $Path = 'webroot/upload/user/';\n\t $employee_img = $this->ImageUpload($_FILES[\"employee_img\"][\"name\"], $employee_img, $Path, $fieldName);\n\t $post['user_profile_img'] = $Path.''.$employee_img;\n\t }\n\t\t\t\t\t\t$employee_id = $this->employee_model->addemployee($post);\t\n\t\t\t\t\t\tif($employee_id)\n\t\t\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\t\t\t$msg = 'Employee Added Successfully!!';\t\t\t\t\t\n\t\t\t\t\t\t\t$this->session->set_flashdata('message', '<section class=\"content\"><div class=\"col-xs-12\"><div class=\"alert alert-success alert-dismissable\"><i class=\"fa fa-check\"></i><button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">&times;</button>'.$msg.'</div></div></section>');\n\t\t\t\t\t\t\tredirect(base_url().'employee');\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{\n\n\t\t\t\t\t\t$this->data['country_list'] = $this->employee_model->getCountryList();\n\t\t\t\t\t\t$this->data['role_list'] \t= $this->employee_model->getRoleList();\t\n\t\t\t\t\t\t\n\t\t\t\t\t $this->data['department_list'] = $this->employee_model->getDepartMentByCompanyId(login_user);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->show_view_admin('admin/employee/employee_add', $this->data);\n\t\t\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$this->data['country_list'] \t= $this->employee_model->getCountryList();\n\t\t\t\t\t\n\t\t\t\t\t$this->data['department_list'] \t= $this->employee_model->getDepartMentByCompanyId(login_user);\n\t\t\t\t\t$this->data['role_list'] \t\t= $this->employee_model->getRoleList();\n\t\t\t\t\t$this->show_view_admin('admin/employee/employee_add', $this->data);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tredirect( base_url().'dashboard/error/1');\n\t\t\t}\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "f1959604a7f5fc18335f37f88ce0b93b", "score": "0.52492476", "text": "public function actCustomerWorkEmployeeRequirement($mode = \"I\"){\n\t\t$mode = strtoupper($mode);\n\t\tswitch($mode){\n\t\t\tcase \"I\":\n\t\t\t\t$Sql = \"INSERT INTO rs_tbl_customer_work_employee_requirement(\n\t\t\t\t\t\temployemee_requirement_id,\n\t\t\t\t\t\tcustomer_work_id,\n\t\t\t\t\t\tcustomer_id,\n\t\t\t\t\t\teducation_id,\n\t\t\t\t\t\tgender_id,\n\t\t\t\t\t\tage_id,\n\t\t\t\t\t\tage_start,\n\t\t\t\t\t\tage_end,\n\t\t\t\t\t\tcountry_id,\n\t\t\t\t\t\tis_active) \n\t\t\t\t\t\tVALUES(\";\n\t\t\t\t$Sql .= $this->isPropertySet(\"employemee_requirement_id\", \"V\") ? $this->getProperty(\"employemee_requirement_id\") : \"NULL\";\n\t\t\t\t$Sql .= \",\";\n\t\t\t\t$Sql .= $this->isPropertySet(\"customer_work_id\", \"V\") ? \"'\" . $this->getProperty(\"customer_work_id\") . \"'\" : \"NULL\";\n\t\t\t\t$Sql .= \",\";\n\t\t\t\t$Sql .= $this->isPropertySet(\"customer_id\", \"V\") ? \"'\" . $this->getProperty(\"customer_id\") . \"'\" : \"NULL\";\n\t\t\t\t$Sql .= \",\";\n\t\t\t\t$Sql .= $this->isPropertySet(\"education_id\", \"V\") ? \"'\" . $this->getProperty(\"education_id\") . \"'\" : \"NULL\";\n\t\t\t\t$Sql .= \",\";\n\t\t\t\t$Sql .= $this->isPropertySet(\"gender_id\", \"V\") ? \"'\" . $this->getProperty(\"gender_id\") . \"'\" : \"NULL\";\n\t\t\t\t$Sql .= \",\";\n\t\t\t\t$Sql .= $this->isPropertySet(\"age_id\", \"V\") ? \"'\" . $this->getProperty(\"age_id\") . \"'\" : \"NULL\";\n\t\t\t\t$Sql .= \",\";\n\t\t\t\t$Sql .= $this->isPropertySet(\"age_start\", \"V\") ? \"'\" . $this->getProperty(\"age_start\") . \"'\" : \"NULL\";\n\t\t\t\t$Sql .= \",\";\n\t\t\t\t$Sql .= $this->isPropertySet(\"age_end\", \"V\") ? \"'\" . $this->getProperty(\"age_end\") . \"'\" : \"NULL\";\n\t\t\t\t$Sql .= \",\";\n\t\t\t\t$Sql .= $this->isPropertySet(\"country_id\", \"V\") ? \"'\" . $this->getProperty(\"country_id\") . \"'\" : \"NULL\";\n\t\t\t\t$Sql .= \",\";\n\t\t\t\t$Sql .= $this->isPropertySet(\"is_active\", \"V\") ? \"'\" . $this->getProperty(\"is_active\") . \"'\" : \"NULL\";\n\t\t\t\t$Sql .= \")\";\n\t\t\t\tbreak;\n\t\t\tcase \"U\":\n\t\t\t\t$Sql = \"UPDATE rs_tbl_customer_work_employee_requirement SET \";\n\t\t\t\tif($this->isPropertySet(\"education_id\", \"K\")){\n\t\t\t\t\t$Sql .= \"$con education_id='\" . $this->getProperty(\"education_id\") . \"'\";\n\t\t\t\t\t$con = \",\";\n\t\t\t\t}\n\t\t\t\tif($this->isPropertySet(\"gender_id\", \"K\")){\n\t\t\t\t\t$Sql .= \"$con gender_id='\" . $this->getProperty(\"gender_id\") . \"'\";\n\t\t\t\t\t$con = \",\";\n\t\t\t\t}\n\t\t\t\tif($this->isPropertySet(\"age_id\", \"K\")){\n\t\t\t\t\t$Sql .= \"$con age_id='\" . $this->getProperty(\"age_id\") . \"'\";\n\t\t\t\t\t$con = \",\";\n\t\t\t\t}\n\t\t\t\tif($this->isPropertySet(\"age_start\", \"K\")){\n\t\t\t\t\t$Sql .= \"$con age_start='\" . $this->getProperty(\"age_start\") . \"'\";\n\t\t\t\t\t$con = \",\";\n\t\t\t\t}\n\t\t\t\tif($this->isPropertySet(\"age_end\", \"K\")){\n\t\t\t\t\t$Sql .= \"$con age_end='\" . $this->getProperty(\"age_end\") . \"'\";\n\t\t\t\t\t$con = \",\";\n\t\t\t\t}\n\t\t\t\tif($this->isPropertySet(\"country_id\", \"K\")){\n\t\t\t\t\t$Sql .= \"$con country_id='\" . $this->getProperty(\"country_id\") . \"'\";\n\t\t\t\t\t$con = \",\";\n\t\t\t\t}\n\t\t\t\tif($this->isPropertySet(\"is_active\", \"K\")){\n\t\t\t\t\t$Sql .= \"$con is_active='\" . $this->getProperty(\"is_active\") . \"'\";\n\t\t\t\t\t$con = \",\";\n\t\t\t\t}\n\t\t\t\t$Sql .= \" WHERE 1=1\";\n\t\t\t\tif($this->isPropertySet(\"employemee_requirement_id\", \"V\")){\n\t\t\t\t\t$Sql .= \" AND employemee_requirement_id='\" . $this->getProperty(\"employemee_requirement_id\") . \"'\";\n\t\t\t\t}\n\t\t\t\tif($this->isPropertySet(\"customer_work_id\", \"V\")){\n\t\t\t\t\t$Sql .= \" AND customer_work_id='\" . $this->getProperty(\"customer_work_id\") . \"'\";\n\t\t\t\t}\n\t\t\t\tif($this->isPropertySet(\"customer_id\", \"V\")){\n\t\t\t\t\t$Sql .= \" AND customer_id='\" . $this->getProperty(\"customer_id\") . \"'\";\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"D\":\n\t\t\t\t$Sql = \"DELETE FROM rs_tbl_customer_work\n\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\t1=1\";\n\t\t\t\tif($this->isPropertySet(\"customer_work_id\", \"V\")){\n\t\t\t\t\t$Sql .= \" AND customer_work_id=\" . $this->getProperty(\"customer_work_id\");\n\t\t\t\t}\n\t\t\t\tif($this->isPropertySet(\"customer_id\", \"V\")){\n\t\t\t\t\t$Sql .= \" AND customer_id=\" . $this->getProperty(\"customer_id\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t\treturn $this->dbQuery($Sql);\n\t}", "title": "" }, { "docid": "ddfd1df08a4e850740c85d372bbc702a", "score": "0.52478075", "text": "public function store(Request $request) {\n// $this->validate($request, [\n// 'fname' => 'required',\n// 'lname' => 'required',\n// 'email' => 'required',\n// 'phone' => 'required',\n// 'address' => 'required',\n// 'city_id' => 'required',\n// 'country_id' => 'required',\n// 'blood_id' => 'required',\n// 'gender_id' => 'required',\n// 'marital_id' => 'required',\n// 'DOB' => 'required',\n// 'company_id' => 'required',\n// 'department_id' => 'required',\n// 'section_id' => 'required',\n// 'branch_id' => 'required',\n// 'supervisor' => 'required',\n// 'effective_date' => 'required',\n// 'designation_id' => 'required',\n// 'emp_code' => 'required',\n// ]);\n $basic = new EmployeeInfo;\n $basic->first_name = $request->fname;\n $basic->last_name = $request->lname;\n $basic->email = $request->email;\n $basic->phone = $request->phone;\n $basic->address = $request->address;\n $basic->city = $request->city_id;\n $basic->country = $request->country_id;\n $basic->blood_group = $request->blood_id;\n $basic->gender = $request->gender_id;\n $basic->marital_status = $request->marital_id;\n $basic->dob = $request->DOB;\n\n\n\n $compa = new EmployeeCompany;\n $compa->company_id = $request->company_id;\n $compa->emp_code = $request->emp_code;\n $compa->company_effective_start_date = $request->effective_date;\n $compa->company_effective_end_date = $request->effective_date;\n $compa->status = '1';\n\n $dept = new EmployeeDepartment;\n $dept->department_id = $request->department_id;\n $dept->emp_code = $request->emp_code;\n $dept->company_id = $request->company_id;\n $dept->department_effective_start_date = $request->effective_date;\n $dept->department_effective_end_date = $request->effective_date;\n $dept->status = '1';\n\n $sec = new EmployeeSection;\n $sec->section_id = $request->section_id;\n $sec->emp_code = $request->emp_code;\n $sec->company_id = $request->company_id;\n $sec->department_id = $request->department_id;\n $sec->section_effective_start_date = $request->effective_date;\n $sec->section_effective_end_date = $request->effective_date;\n $sec->status = '1';\n\n\n $desi = new EmployeeDesignation;\n $desi->designation_id = $request->designation_id;\n $desi->emp_code = $request->emp_code;\n $desi->company_id = $request->company_id;\n $desi->department_id = $request->department_id;\n $desi->desigantion_effective_start_date = $request->effective_date;\n $desi->desigantion_effective_end_date = $request->effective_date;\n $desi->status = '1';\n\n $branch = new EmployeeCompanyBranch;\n $branch->branch_id = $request->branch_id;\n $branch->emp_code = $request->emp_code;\n $branch->company_id = $request->company_id;\n $branch->branch_effective_start_date = $request->effective_date;\n $branch->branch_effective_end_date = $request->effective_date;\n $branch->status = '1';\n\n $job = new EmployeeJobExperienceHistory;\n// $job->company_name = $request->com_name;\n// $job->company_address = $request->com_address;\n// $job->desigantion = $request->com_desigantion;\n// $job->responsibility = $request->com_responsibility;\n// $job->start_date = $request->com_s_date;\n// $job->end_date = $request->com_e_date;\n// $job->cirtificateupload = $request->com_upload;\n\n $checkBox = array();\n $checkBox = EmployeeInfoController::get('com_name');\n $id = EmployeeInfoController::get('id');\n \n $newSafety = new Extra;\n \n foreach($checkBox as $safety){\n \n $job->offer_id = $id;\n $job->car_id = $safety;\n $job->car = 15;\n $job->save();\n \n }\n\n\n // $job->save();\n\n // $compa->save();\n // $dept->save();\n // $sec->save();\n // $desi->save();\n // $branch->save();\n //$basic->save();\n\n\n\n return redirect()->action('EmployeeInfoController@index')->with('success', 'Information Added Successfully');\n }", "title": "" }, { "docid": "44063a9b7f50ebc3c1baa55dfc9e070e", "score": "0.524485", "text": "public function showEmployeeCareer()\n {\n if(Session::getInstance()->read('current-state')['state'] == 'owner')\n {\n if(empty($this->companies))\n {\n return $this->showMyEmployeeCareerft($this->showEmployeeEditft());\n }\n else{\n return $this->showMyEmployeeCareer($this->showMyEmployeeBody());\n }\n }\n if(Session::getInstance()->read('current-state')['state'] == 'viewer')\n {\n if(empty($this->companies))\n {\n return $this->showUserEmployeeCareerEmpty($this->showEmptyEmployeeCareer());\n }\n else{\n return $this->showUserEmployeeCareer($this->showUserEmployeeBody());\n }\n }\n }", "title": "" }, { "docid": "7397ccb49507b2837217b49758ab4e30", "score": "0.5244205", "text": "public function employee()\n {\n return $this->belongsTo('App\\Models\\Employee');\n }", "title": "" }, { "docid": "3491721cd19aa6bc0ab5cd6218866b6d", "score": "0.52317935", "text": "public function getEmployee()\n {\n return $this->hasOne(Employees::className(), ['ID' => 'EmployeeID']);\n }", "title": "" }, { "docid": "dc6b0f8eef0a04c3f6a1f78767ad90f6", "score": "0.5229752", "text": "public function create()\n {\n// $exp = (($employees->date_end) - ($employees->date_join));\n $departments = Department::orderByDesc('name')->get();\n $employees = Employee::all();\n $positions = Position::all();\n $position = Position::orderByDesc('name')->get();\n $departmentOld = [];\n $positionOld = [];\n\n return view('admin::employee.create',compact('departments','employees','departmentOld','positions','positionOld','position'));\n }", "title": "" }, { "docid": "dd6183028cad76e5d9e0ea5936bf2b5d", "score": "0.5229389", "text": "public function created(Employee $employee)\n { }", "title": "" }, { "docid": "2799b6c59004433299c8887981fe1499", "score": "0.5227407", "text": "function createEmployees(){\n //In future this will funciton differently\n global $employeeData;\n\n if(!isset(Employee::$scheduleManager)) {\n echo 'IMPORTANT:: Employee::$scheduleManager must first be set first';\n }\n\n for ($c=0; $c < count($employeeData); $c++) { \n $empData = $employeeData[$c];\n Employee::$employees[$c] = new Employee($empData[\"Name\"], $empData[\"DefaultChanges\"]);\n }\n\n}", "title": "" }, { "docid": "f13dd2b561bcc4ddf1af21e5f610423e", "score": "0.5225563", "text": "public function getEmployee()\n {\n return $this->hasOne(Employee::className(), ['id' => 'id']);\n }", "title": "" }, { "docid": "a0f8a11b78255fe1a3ce630b5887b3d1", "score": "0.5220977", "text": "public function employees()\n {\n return $this->belongsTo(Employee::class,'employee');\n }", "title": "" }, { "docid": "3d9ad9f3951397339f7285723f611311", "score": "0.5219857", "text": "public function edit(Employee $employee)\n {\n //\n }", "title": "" }, { "docid": "3d9ad9f3951397339f7285723f611311", "score": "0.5219857", "text": "public function edit(Employee $employee)\n {\n //\n }", "title": "" }, { "docid": "3d9ad9f3951397339f7285723f611311", "score": "0.5219857", "text": "public function edit(Employee $employee)\n {\n //\n }", "title": "" }, { "docid": "3d9ad9f3951397339f7285723f611311", "score": "0.5219857", "text": "public function edit(Employee $employee)\n {\n //\n }", "title": "" }, { "docid": "3d9ad9f3951397339f7285723f611311", "score": "0.5219857", "text": "public function edit(Employee $employee)\n {\n //\n }", "title": "" }, { "docid": "a059ee7327496b2838cd9501b7d10fd2", "score": "0.5217196", "text": "public function employeeUpdateInfo(){\n\t\t$details = $this->controller->update(\n\t \t\"UPDATE employee_details_tbl SET firstname = ?, lastname = ?, designation = ?, birthday = ?, age = ?, gender = ?, address = ? WHERE id = ?\",\n\t \t[\n\t\t \t'firstname' => $this->firstname,\n\t\t \t'lastname' => $this->lastname,\n\t\t \t'designation' => $this->designation,\n\t\t \t'birthday' => $this->birthday,\n\t\t \t'age' => $this->age,\n\t\t \t'gender' => $this->gender,\n\t\t \t'address' => $this->address,\n\t\t \t'id' => $this->id,\n\t\t \t\n\t\t ]\n\t );\n\t $rate = $this->controller->update(\n\t \t\"UPDATE salary_rate_tbl SET salary_rate_basis = ?, salary_rate_peso = ? WHERE employee_id = ?\",\n\t \t[\n\t\t \t'salary_rate_basis' => $this->salary_rate_basis,\n\t\t \t'salary_rate_peso' => $this->salary_rate_peso,\n\t\t \t'employee_id' => $this->id,\n\t\t ]\n\t );\n\t $contri = $this->controller->update(\n\t \t\"UPDATE employee_contributions_tbl SET sss = ?, pagibig = ?, philhealth = ? WHERE employee_id = ?\",\n\t \t[\n\t\t \t'sss' => $this->sss,\n\t\t \t'pagibig' => $this->pagibig,\n\t\t \t'philhealth' => $this->philhealth,\n\t\t \t'employee_id' => $this->id,\n\t\t ]\n\t );\n\n\t return $details && $rate && $contri;\n\t}", "title": "" }, { "docid": "b2f2532344200568b8aaa2fa12f1b218", "score": "0.52137697", "text": "public function update(Request $request, $id)\n {\n $employees = Employees::findOrFail($id);\n $self = 1;\n $this->validate($request,[\n \n \n 'prno' => 'required|max:9|unique:employees,PersonalNumber,'.$employees->id,\n 'name' => 'required',\n 'father' => 'required',\n 'cnic' => 'min:15|max:15|unique:employees,EmployeeCNIC,'.$employees->id,\n 'birth' => 'required',\n 'ddos' => 'required',\n 'marital' => 'required',\n 'funds' => 'required',\n 'grads' => 'required', \n 'title' => 'required',\n 'insurance' => 'required',\n 'deathOretir' => 'required',\n \n 'age' => 'required',\n 'enddate' => 'required',\n 'contribution' => 'required',\n ]);\n \n $employees->PersonalNumber = $request->get('prno');\n $employees->EmployeeName = $request->get('name');\n $employees->EmployeeFatherHusbandName = $request->get('father');\n $employees->EmployeeCNIC = str_replace('-', '',$request->get('cnic'));\n\n $orgDate = $request->get('birth');\n $date = str_replace('/\"', '-', $orgDate); \n $newDate = date(\"Y-m-d\", strtotime($date));\n $employees->DateBirth = $newDate;\n $employees->DeptID = $request->get('funds');\n $employees->MaritalStatusID = $request->get('marital');\n $employees->DDO = $request->get('ddos');\n\n $employees->Grade = $request->get('grads');\n $employees->SDetObj = $request->get('title');\n $employees->GITypeID = $request->get('insurance');\n \n $DeathOrretirmentDate = $request->get('enddate');\n $DRdate = str_replace('/\"', '-', $DeathOrretirmentDate); \n $enddates = date(\"Y-m-d\", strtotime($DRdate));\n \n\n if(2 == $request->get('deathOretir')){\n $employees->DateDeath = $enddates;\n $employees->LegalHeirs = $request->get('beni');\n \n }else{\n \n $employees->DateRetirement = $enddates;\n $employees->LegalHeirs = $self;\n }\n\n $employees->AgeOnDate = $request->input('age');\n $employees->Contribution = $request->input('contribution');\n \n $employees->user_id = Auth::id();\n $employees->update();\n return redirect()->route('employees.index')->with('updated','Employee Recored Has Been Updated Successfully.');\n }", "title": "" }, { "docid": "2e55ad4424cbd465833bf522b0b97052", "score": "0.52128595", "text": "public function getEmployees();", "title": "" }, { "docid": "9c6264d3315b26c2bb8496ed56e96db3", "score": "0.5209826", "text": "public function create(Employee $employee, $params)\n {\n $this->validateInput($employee, $params);\n\n $date_effective = gv($params, 'date_effective');\n\n $employee_designations = $employee->EmployeeDesignations;\n\n $last_designation = $employee_designations->sortByDesc('date_effective')->first();\n\n if ($last_designation && $date_effective <= $last_designation->date_effective) {\n throw ValidationException::withMessages(['date_effective' => trans('employee.cannot_assign_designation_before_previous_designation', ['date' => showDate($last_designation->date_effective)])]);\n }\n\n $employee_term = $employee->EmployeeTerms->where('date_of_leaving', '=', null)->first();\n\n if (! $employee_term) {\n throw ValidationException::withMessages(['message' => trans('employee.could_not_find_term')]);\n }\n\n $last_designation->date_end = Carbon::parse(gv($params, 'date_effective'))->subDays(1)->toDateString();\n $last_designation->save();\n\n $employee_designation = $this->employee_designation->forceCreate($this->formatParams($params, $employee->id));\n $employee_designation->employee_term_id = $employee_term->id;\n $employee_designation->save();\n\n $this->processUpload($employee_designation, $params);\n\n return $employee_designation;\n }", "title": "" }, { "docid": "2e37f15cc3df415be8c691ba4e69f1e0", "score": "0.5205079", "text": "function employee_data_for_permission($empId=0, $resultType='G',$status=false)\n{\n $addsql = '';\n \n if($empId > 0)\n {\n $addsql .= \" and e.empId=\".$empId;\n }\n if($this->input->post('status')!='')\n {\n $addsql .= \" and e.status='\".$this->input->post('status').\"' \";\n }\n else\n {\n //$addsql .= \" and e.status='1' \";\n }\n if($status)\n {\n $addsql .= \" and e.status!='\".$status.\"' \";\n }\n\n if($this->input->post('filters')!='') // search filters\n {\n $addsql .= \" and \".self::decodeFilters($this->input->post('filters'));\n }\n $sql = \"select e.empMobile,e.joiningFor, e.empDesination, e.regionPermission, e.isActive, e.appointmentLetterSend,DATE_FORMAT(e.appointmentLetterSenddate,'%d-%b-%Y') appointmentLetterSenddate, e.empId,e.empEmailOffice,e.status,d.name, concat(e.empTitle,' ',e.empFname,' ',e.empLname) as empName,DATE_FORMAT(e.lastWorkingday,'%d-%b-%Y') lastWorkingday , DATE_FORMAT(e.empDOJ,'%d-%b-%Y') empDOJ,e.candidateId, e.empEmailPersonal, e.empEmailOffice , de.name as desination,em.empId as managerId, concat(em.empTitle,' ',em.empFname,' ',em.empLname) as manager,em.empEmailOffice as manageremail,c.cityName as jobCityName,s.State_Name as jobStateName from \".TABLE_EMP.\" e\n Left Join \".TABLE_DEPT.\" d on e.empDept=d.id\n Left Join \".TABLE_MASTER_DESIGNATION.\" de on e.empDesination=de.id\t\t \n Left Join \".TABLE_EMP.\" em on e.reportingTo=em.empId\n LEFT JOIN \".TABLE_CITY.\" c on e.jobLocation=c.cityId\n LEFT JOIN \".TABLE_STATE.\" s on c.state=s.State_Id \n where 1=1 \".$addsql.\" and e.empId > 20000000 \";\n \n if($resultType=='G')\n {\n $result = parent::result_grid_array($sql);\n }\n else\n {\n $result = $this->db->query($sql)->result_array();\n }\n //pre($result);\n return $result;\n}", "title": "" }, { "docid": "7737902685d4c5f8b9cc250ddb294ea9", "score": "0.52019626", "text": "public function employee()\n {\n return $this->belongsTo('App\\Employee', 'employee_id');\n }", "title": "" }, { "docid": "9b7b09c465cda6d1147033073381de9c", "score": "0.51983625", "text": "public function update_employee_attendance( $employee_id, $start_date = null, $end_date = null, $forced = false )\n {\n global $profile, $prefix;\n $breakup = array( );\n $transaction_code = EMPLOYEE_PAYROLL; //hard coded -- need to bring it through some other way\n $employee_db = new employee_model();\n $employee_transaction_db = new employee_transaction_model();\n $employee_transaction_tbl = array( );\n $employee_tbl_personal = array( );\n\n $employee_db->select( $employee_id, employee_model::PERSONAL, $employee_tbl_personal, array( 'enable_where' => 1 ) );\n $this->overtime = false;\n if ( strcmp( strtolower( $employee_tbl_personal[ 'overtime' ] ), 'allowed' ) == 0 )\n {\n $this->overtime = true;\n }\n\n $tpost = array( );\n $res = $employee_transaction_db->select_advanced( $transaction_code, array( 'employee_id' => $employee_id, 'transaction_code' => $transaction_code ), $tpost, array( 'orderBy' => 'employee_transaction_id DESC', 'limit' => '0,1', 'enable_where' => 1 ) );\n //-----------\n $now = timestamp_breakup( date( 'Y-m-d h:i:s', time() ) );\n $salary_paid_timestamp = \"\";\n if ( $res == false )\n {\n $salary_paid_timestamp = \"{$now[ 'prev_year' ]}-{$now[ 'prev_month' ]}-01 00:00:00\";\n }\n else if ( empty( $tpost[ 'transaction_timestamp1' ] ) )\n {\n $salary_paid_timestamp = \"{$now[ 'prev_year' ]}-{$now[ 'prev_month' ]}-01 00:00:00\";\n }\n else\n {\n $salary_paid_timestamp = convert_FA_to_MYSQL( $tpost[ 'transaction_timestamp2' ] ); //this should be the start of the month\n }\n $this->salary_stamp = get_date( $salary_paid_timestamp );\n\n $this->leave_arr = array( );\n $basic = PluSQL::against( $profile )->run( \"select transaction_timestamp1 as start_date, transaction_timestamp2 as end_date, transaction_string2 as leave_type from {$prefix}employee_transaction \n where transaction_dec1 = {$this->fiscal_year[ 'fiscal_year_id' ]} and transaction_code = \" . EMPLOYEE_LEAVE . \" and employee_id = $employee_id\" );\n while ( $row = $basic->nextRow() )\n {\n $this->leave_arr[ ] = $row;\n }\n\n if ( $this->shift_db->select( $employee_tbl_personal[ 'shift_id' ], $this->shift_tbl ) )\n {\n $sql = $employee_transaction_db->search_advanced( array( 'employee_id' => $employee_id, 'transaction_code' => EMPLOYEE_SHIFT ), $employee_transaction_tbl, array( 'orderBy' => 'employee_transaction_id ASC', 'enable_where' => 1 ) );\n $basic = PluSQL::against( $profile )->run( $sql );\n $count = 1;\n $this->rotation_arr = array( );\n while ( $row = $basic->nextRow() )\n {\n if ( $count == 1 )\n {\n $this->rotation_arr[ ] = array( 'transaction_timestamp' => date( 'Y-m-d h:i:s', strtotime( $employee_tbl_personal[ 'joining_date' ] ) ), 'transaction_int1' => $row[ 'transaction_int1' ], 'transaction_int2' => $row[ 'transaction_int1' ] );\n }\n $this->rotation_arr[ ] = $row;\n $count++;\n }\n if ( empty( $this->rotation_arr ) )\n {\n $this->rotation_arr[ ] = array( 'transaction_timestamp' => date( 'Y-m-d h:i:s', strtotime( $employee_tbl_personal[ 'joining_date' ] ) ), 'transaction_int1' => $employee_tbl_personal[ 'shift_id' ], 'transaction_int2' => $employee_tbl_personal[ 'shift_id' ] );\n }\n $now = timestamp_breakup( $this->fiscal_year[ 'end' ] . \" 00:00:00\" );\n if ( !is_null( $end_date ) )\n {\n $now = timestamp_breakup( $end_date );\n }\n $timestamp = timestamp_breakup( $this->fiscal_year[ 'begin' ] . \" 00:00:00\" );\n if ( !is_null( $start_date ) )\n {\n $timestamp = timestamp_breakup( $start_date );\n }\n $breakup = timestamp_diff( $now, $timestamp );\n foreach ( $breakup as &$break )\n {\n $break[ 'absents_count' ] = 0;\n $break[ 'late_minutes_count' ] = 0;\n $attendance_days = 1;\n if ( isset( $break[ 'START_MONTH' ] ) )\n {\n $attendance_days = $break[ 'total_days' ];\n }\n else\n {\n $attendance_days = $break[ 'days' ];\n }\n //work out the lates on the basis of shift rotation\n try\n {\n $late_minutes_count = 0;\n $absents_count = 0;\n //--------------------------------------------------------\n $table = $this->table;\n $basic = PluSQL::from( $profile )->$table->select( \"*\" )->orderBy( 'timestamp ASC' )->where( \"DATE(timestamp) >= '{$break[ 'year' ]}-{$break[ 'month' ]}-01' and DATE(timestamp) <= '{$break[ 'year' ]}-{$break[ 'month' ]}-$attendance_days' and employee_id = $employee_id\" )->run()->$table;\n $day = '';\n $day_arr = array( );\n foreach ( $basic as $attendance )\n {\n $temp = explode( ' ', $attendance->timestamp );\n if ( empty( $day ) )\n {\n $next_day = \"{$break[ 'year' ]}-{$break[ 'month' ]}-01\";\n $day = $temp[ 0 ];\n while ( $next_day < $day )\n {\n $delay = $this->calculate_delays( $employee_id, $next_day, $day_arr, $forced );\n if ( $delay == -1 )\n {\n $absents_count += 1;\n }\n else\n {\n $late_minutes_count += $delay;\n }\n $next_day = date( 'Y-m-d', strtotime( \"+1 day\", strtotime( $next_day ) ) );\n }\n $day_arr[ ] = $attendance;\n continue;\n }\n else\n {\n if ( strcmp( $temp[ 0 ], $day ) == 0 ) //same day\n {\n $day_arr[ ] = $attendance;\n continue;\n }\n else\n {\n $delay = $this->calculate_delays( $employee_id, $day, $day_arr, $forced );\n if ( $delay == -1 )\n {\n $absents_count += 1;\n }\n else\n {\n $late_minutes_count += $delay;\n }\n $next_day = date( 'Y-m-d', strtotime( \"+1 day\", strtotime( $day ) ) );\n $day = $temp[ 0 ];\n $day_arr = array( );\n //this is a new day\n while ( $next_day < $day )\n {\n $delay = $this->calculate_delays( $employee_id, $next_day, $day_arr, $forced );\n if ( $delay == -1 )\n {\n $absents_count += 1;\n }\n else\n {\n $late_minutes_count += $delay;\n }\n $next_day = date( 'Y-m-d', strtotime( \"+1 day\", strtotime( $next_day ) ) );\n }\n $day_arr[ ] = $attendance;\n }\n }\n }\n $delay = 1;\n $delay = $this->calculate_delays( $employee_id, $day, $day_arr, $forced );\n if ( $delay == -1 )\n {\n $absents_count += 1;\n }\n else\n {\n $late_minutes_count += $delay;\n }\n $break[ 'absents_count' ] = $absents_count * -1;\n $break[ 'late_minutes_count' ] = $late_minutes_count;\n }\n catch ( Exception $e )\n {\n \n }\n }\n return $breakup;\n }\n }", "title": "" }, { "docid": "fc5320e19fcc3e26a884e1b34fd8751f", "score": "0.51828057", "text": "public function edit(Employe $employe)\n {\n //\n }", "title": "" }, { "docid": "6b191b6cdf846bedb1343d93ac9ce268", "score": "0.51718354", "text": "public function fetchEmployee(){\r\n require_once(\"../model/classes.employee.php\");\r\n $obj = new Employee();\r\n $get = $obj -> employeeFetch();\r\n include(\"../view/create_event.php\");\r\n \r\n }", "title": "" }, { "docid": "88af2a269b8e4193f6aa121da824d08c", "score": "0.5171504", "text": "public function getEmployee()\n {\n return $this->hasOne(Employee::className(), ['employee_id' => 'employee_id']);\n }", "title": "" }, { "docid": "0bc03a2a92a55daf2131308618c193e9", "score": "0.5159657", "text": "public function employeeName(){\n $return = $this->employee->first_name.' '.$this->employee->last_name;\n unset($this->employee);\n unset($this->employee_id_fk);\n return $return;\n }", "title": "" }, { "docid": "128694944c6220238ae32529b4003a40", "score": "0.5159163", "text": "function register($info,$dep_id) {\n\t\t//bug here com_id just company id, work->job needs department id \n\t\t$newemployee = array('Employee' => $info);\n\t\t$this->save($newemployee);\n\t\t$id = $this->getInsertId();\n\t\t$this->Work->job($id,$dep_id);\n\t\treturn $id;\n\t}", "title": "" }, { "docid": "2f4fbd2a60e624d3a778ca1a9a3d47ce", "score": "0.5154222", "text": "public function actionCreate()\n\t{\n\t parent::actionCreate();\n $this->lookupdata();\n $model=new Employee;\n\n\t if (Yii::app()->request->isAjaxRequest)\n\t {\n\t\techo CJSON::encode(array(\n\t\t\t'status'=>'success',\n\t\t\t'divcreate'=>$this->renderPartial('_form', array('model'=>$model,\n\t\t\t 'orgstructure'=>$this->orgstructure,\n\t\t\t 'position'=>$this->position,\n\t\t\t 'employeetype'=>$this->employeetype,\n\t\t\t 'sex'=>$this->sex,\n\t\t\t 'bloodtype'=>$this->bloodtype,\n\t\t\t 'birthcity'=>$this->birthcity,\n\t\t\t 'religion'=>$this->religion,\n\t\t\t 'maritalstatus'=>$this->maritalstatus,\n\t\t\t 'tribe'=>$this->tribe,\n\t\t\t 'employeestatus'=>$this->employeestatus,\n 'levelorg'=>$this->levelorg), true)\n\t\t\t));\n\t\tYii::app()->end();\n\t }\n\t}", "title": "" }, { "docid": "2fc9d9ca37bc101df2377e5b39017baa", "score": "0.51482314", "text": "public function saveAction()\n {\n\n if (!$this->request->isPost()) {\n $this->dispatcher->forward([\n 'controller' => \"employee\",\n 'action' => 'index'\n ]);\n\n return;\n }\n\n $ListID = $this->request->getPost(\"ListID\");\n $employee = Employee::findFirstByListID($ListID);\n\n if (!$employee) {\n $this->flash->error(\"employee does not exist \" . $ListID);\n\n $this->dispatcher->forward([\n 'controller' => \"employee\",\n 'action' => 'index'\n ]);\n\n return;\n }\n\n $employee->Listid = $this->request->getPost(\"ListID\");\n $employee->Timecreated = $this->request->getPost(\"TimeCreated\");\n $employee->Timemodified = $this->request->getPost(\"TimeModified\");\n $employee->Editsequence = $this->request->getPost(\"EditSequence\");\n $employee->Name = $this->request->getPost(\"Name\");\n $employee->Isactive = $this->request->getPost(\"IsActive\");\n $employee->Salutation = $this->request->getPost(\"Salutation\");\n $employee->Firstname = $this->request->getPost(\"FirstName\");\n $employee->Middlename = $this->request->getPost(\"MiddleName\");\n $employee->Lastname = $this->request->getPost(\"LastName\");\n $employee->Suffix = $this->request->getPost(\"Suffix\");\n $employee->Jobtitle = $this->request->getPost(\"JobTitle\");\n $employee->Supervisorref_listid = $this->request->getPost(\"SupervisorRef_ListID\");\n $employee->Supervisorref_fullname = $this->request->getPost(\"SupervisorRef_FullName\");\n $employee->Department = $this->request->getPost(\"Department\");\n $employee->Description = $this->request->getPost(\"Description\");\n $employee->Targetbonus = $this->request->getPost(\"TargetBonus\");\n $employee->Employeeaddress_addr1 = $this->request->getPost(\"EmployeeAddress_Addr1\");\n $employee->Employeeaddress_addr2 = $this->request->getPost(\"EmployeeAddress_Addr2\");\n $employee->Employeeaddress_addr3 = $this->request->getPost(\"EmployeeAddress_Addr3\");\n $employee->Employeeaddress_addr4 = $this->request->getPost(\"EmployeeAddress_Addr4\");\n $employee->Employeeaddress_city = $this->request->getPost(\"EmployeeAddress_City\");\n $employee->Employeeaddress_state = $this->request->getPost(\"EmployeeAddress_State\");\n $employee->Employeeaddress_postalcode = $this->request->getPost(\"EmployeeAddress_PostalCode\");\n $employee->Employeeaddress_country = $this->request->getPost(\"EmployeeAddress_Country\");\n $employee->Printas = $this->request->getPost(\"PrintAs\");\n $employee->Phone = $this->request->getPost(\"Phone\");\n $employee->Mobile = $this->request->getPost(\"Mobile\");\n $employee->Pager = $this->request->getPost(\"Pager\");\n $employee->Pagerpin = $this->request->getPost(\"PagerPIN\");\n $employee->Altphone = $this->request->getPost(\"AltPhone\");\n $employee->Fax = $this->request->getPost(\"Fax\");\n $employee->Ssn = $this->request->getPost(\"SSN\");\n $employee->Email = $this->request->getPost(\"Email\");\n $employee->Emergencycontactprimaryname = $this->request->getPost(\"EmergencyContactPrimaryName\");\n $employee->Emergencycontactprimaryvalue = $this->request->getPost(\"EmergencyContactPrimaryValue\");\n $employee->Emergencycontactprimaryrelation = $this->request->getPost(\"EmergencyContactPrimaryRelation\");\n $employee->Emergencycontactsecondaryname = $this->request->getPost(\"EmergencyContactSecondaryName\");\n $employee->Emergencycontactsecondaryvalue = $this->request->getPost(\"EmergencyContactSecondaryValue\");\n $employee->Emergencycontactsecondaryrelation = $this->request->getPost(\"EmergencyContactSecondaryRelation\");\n $employee->Employeetype = $this->request->getPost(\"EmployeeType\");\n $employee->Gender = $this->request->getPost(\"Gender\");\n $employee->Partorfulltime = $this->request->getPost(\"PartOrFullTime\");\n $employee->Exempt = $this->request->getPost(\"Exempt\");\n $employee->Keyemployee = $this->request->getPost(\"KeyEmployee\");\n $employee->Hireddate = $this->request->getPost(\"HiredDate\");\n $employee->Originalhiredate = $this->request->getPost(\"OriginalHireDate\");\n $employee->Adjustedservicedate = $this->request->getPost(\"AdjustedServiceDate\");\n $employee->Releaseddate = $this->request->getPost(\"ReleasedDate\");\n $employee->Birthdate = $this->request->getPost(\"BirthDate\");\n $employee->Uscitizen = $this->request->getPost(\"USCitizen\");\n $employee->Ethnicity = $this->request->getPost(\"Ethnicity\");\n $employee->Disabled = $this->request->getPost(\"Disabled\");\n $employee->Disabilitydesc = $this->request->getPost(\"DisabilityDesc\");\n $employee->Onfile = $this->request->getPost(\"OnFile\");\n $employee->Workauthexpiredate = $this->request->getPost(\"WorkAuthExpireDate\");\n $employee->Usveteran = $this->request->getPost(\"USVeteran\");\n $employee->Militarystatus = $this->request->getPost(\"MilitaryStatus\");\n $employee->Accountnumber = $this->request->getPost(\"AccountNumber\");\n $employee->Notes = $this->request->getPost(\"Notes\");\n $employee->Billingrateref_listid = $this->request->getPost(\"BillingRateRef_ListID\");\n $employee->Billingrateref_fullname = $this->request->getPost(\"BillingRateRef_FullName\");\n $employee->Customfield1 = $this->request->getPost(\"CustomField1\");\n $employee->Customfield2 = $this->request->getPost(\"CustomField2\");\n $employee->Customfield3 = $this->request->getPost(\"CustomField3\");\n $employee->Customfield4 = $this->request->getPost(\"CustomField4\");\n $employee->Customfield5 = $this->request->getPost(\"CustomField5\");\n $employee->Customfield6 = $this->request->getPost(\"CustomField6\");\n $employee->Customfield7 = $this->request->getPost(\"CustomField7\");\n $employee->Customfield8 = $this->request->getPost(\"CustomField8\");\n $employee->Customfield9 = $this->request->getPost(\"CustomField9\");\n $employee->Customfield10 = $this->request->getPost(\"CustomField10\");\n $employee->Customfield11 = $this->request->getPost(\"CustomField11\");\n $employee->Customfield12 = $this->request->getPost(\"CustomField12\");\n $employee->Customfield13 = $this->request->getPost(\"CustomField13\");\n $employee->Customfield14 = $this->request->getPost(\"CustomField14\");\n $employee->Customfield15 = $this->request->getPost(\"CustomField15\");\n $employee->Status = $this->request->getPost(\"Status\");\n \n\n if (!$employee->save()) {\n\n foreach ($employee->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n $this->dispatcher->forward([\n 'controller' => \"employee\",\n 'action' => 'edit',\n 'params' => [$employee->ListID]\n ]);\n\n return;\n }\n\n $this->flash->success(\"employee was updated successfully\");\n\n $this->dispatcher->forward([\n 'controller' => \"employee\",\n 'action' => 'index'\n ]);\n }", "title": "" }, { "docid": "b4c3bbda2b2ccd48bfcf4b9603d93129", "score": "0.5147877", "text": "public function edit(TypeConsultation $consultation)\n {\n //\n }", "title": "" }, { "docid": "c03a97de3d47097b4c08785d2aa88517", "score": "0.51475585", "text": "public function edit($id)\n {\n $employee = Employee::find($id);\n\n if (empty($employee)) {\n Flash::error('Employee not found');\n\n return redirect(route('employees.index'));\n }\n $city=city::find($employee->ShopCity);\n $storeCity[$city->id]=$city->name;\n $cityid=$city->id;\n $shops=array();\n $shops[null]=\"Select Shop\";\n $shops_resuls=Shop::where([['city_id',$employee->ShopCity],['brand_id',$employee->SelectBrand]])->get();\n foreach ($shops_resuls as $key => $value) {\n $shops[$value->id]=$value->name;\n }\n if($employee->Shop) {\n $employeeshop=$employee->Shop;\n }\n else\n {\n $employeeshop='';\n }\n $reporting1=array();\n if(!empty($employee->Reporting1)) {\n $reporter1=Employee::find($employee->Reporting1);\n $reporting1[$reporter1->id]=$reporter1->name;;\n }\n $reporting2=array();\n if(!empty($employee->Reporting2)) {\n $reporter2=Employee::find($employee->Reporting2);\n $reporting2[$reporter2->id]=$reporter2->name;;\n }\n $allbrands= Brand::where('deleted_at',NULL)->get();\n $brands[null]='-- Select Brand--';\n foreach ($allbrands as $key => $value) {\n $brands[$value->id]=$value->BrandName;\n }\n $designation_result= role::where([['name', '!=', 'Admin'],['name', '!=', 'Employee']])->get();\n $designations[null]='-- Designation--';\n foreach ($designation_result as $key => $value) {\n $designations[$value->id]=$value->name;\n }\n $countries[null]='-- Country--';\n $countries_result=country::all();\n foreach ($countries_result as $key => $value) {\n $countries[$value->id]=$value->name;\n }\n $selected_country=array();\n $country_id='';\n $selected_nationality='';\n if(!empty($employee->Country)) {\n $country=country::find($employee->Country);\n $selected_country=$country->id;\n $country_id=$country->id;\n $selected_nationality=$employee->Nationality;\n }\n $states_result=state::all();\n foreach ($states_result as $key => $value) {\n $states[$value->id]=$value->name;\n }\n $selected_state='';\n if(!empty($employee->state_id)) {\n $state=state::find($employee->state_id);\n $selected_state=$state->id;\n }\n $states_result=state::where('country_id',$selected_country)->get();\n $country_states[null]='--Select Province--';\n foreach ($states_result as $key => $value) {\n $country_states[$value->id]=$value->name;\n }\n $district_result=city::where('state_id',$selected_state)->get();\n $states_cities[null]='--Select District--';\n foreach ($district_result as $key => $value) {\n $states_cities[$value->id]=$value->name;\n }\n $city=city::find($employee->ShopCity);\n $selected_city=$city->id;\n if(!empty($employee->SelectBrand)) {\n $brand_cities_result=Brand::find($employee->SelectBrand)->cities;\n foreach ($brand_cities_result as $key => $value) {\n $city_ids[]=$value->city_id;\n }\n }\n $cities_result=city::whereIn('id',$city_ids)->get();\n $brandcities[null]='--Select Brand City--';\n foreach ($cities_result as $key => $value) {\n $brandcities[$value->id]=$value->name;\n }\n $brand_employees_result=Brand::find($employee->SelectBrand)->employee;\n $brand_sup[null]='--Select--';\n foreach ($brand_employees_result as $key => $value) {\n $employee_role_result=Employee::find($value->id)->employee_role;\n foreach ($employee_role_result as $key1 => $value1) {\n if($value1->name=='Supervisors')\n {\n $brand_sup[$value->id]=$value->EmployeeName;\n }\n }\n }\n $selected_reporting1='';\n if(!empty($employee->Reporting1)) {\n $reporting1_result=Employee::find($employee->Reporting1);\n $selected_reporting1=$reporting1_result->id;\n }\n $selected_reporting2='';\n if(!empty($employee->Reporting2)) {\n $reporting2_result=Employee::find($employee->Reporting2);\n $selected_reporting2=$reporting2_result->id;\n }\n $employee->UserAvatar=URL::to('/storage/UserAvatar/').'/'.$employee->UserAvatar; \n $employee->CNICIMG=URL::to('/storage/CNICIMG/').'/'.$employee->CNICIMG; \n return view('admin.employees.edit')->with('employee', $employee)->with('brands', $brands)->with('shops', $shops)->with('designations', $designations)->with('countries',$countries)->with('countrystates',$country_states)->with('selected_province',$selected_state)->with('states',$states)->with('storeCity',$storeCity)->with('selected_brand',$employee->SelectBrand)->with('shop',$employeeshop)->with('reporting1',$brand_sup)->with('reporting2',$brand_sup)->with('selectcountry',$selected_country)->with('selectnationality',$selected_nationality)->with('selectstate',$selected_state)->with('districts',$states_cities)->with('selected_district',$selected_city)->with('shop_cities',$brandcities)->with('selected_brand_city',$employee->ShopCity)->with('selected_reporting1',$selected_reporting1)->with('selected_reporting2',$selected_reporting2)->with('selected_shop',$employeeshop);\n\n }", "title": "" }, { "docid": "431cf02a1c134031566b241a89a67bce", "score": "0.51451343", "text": "public function actionCreate(){\n\n\t\t$model=new EmployeeSchedule;\n\t\t$checkifExist = EmployeeSchedule::model()->findAll();\n\t\t\n\t\t$emp_s = array();\n\t\tforeach($checkifExist as $w){\n\t\t\t$emp_s[] = array(\n\t\t\t\t'emp_id' => $w['emp_id'],\n\t\t\t\t'start_date' => $w['start_date'],\n\t\t\t\t'end_date' => $w['end_date'],\n\t\t\t\t);\n\t\t}\n\t\t\n\t\t$alertwS = null;\n\t\t$alertwoS = null;\n\t\t$empschedId = null;\n\t\t$employee = Employee::model()->findAll(array(\"condition\"=>\"status_id = 1\"));\n $emp = array();\n\t\t foreach($employee as $emps){\n\t\t\t\t\tarray_push($emp, $emps['id'].\". \".$emps['lastname'].\" \".$emps['firstname']);\n\t\t\t\t}\n\t\t\n\t\t$confsched = null;\n\t\t$alert = '';\n\t\t$alertTo = null;\n\t\t$dayswithsched = null;\n\t\t$dayswithoutsched = null;\n\n\t\tif(isset($_POST['EmployeeSchedule']))\n\t\t{\n\n\t\t$employeeselect = $_POST['emp_sel'];\n\t\t$scheduleselect = $_POST['sched_sel'];\n\t\t$startD = $_POST['startDate'];\n\t\t$endD = $_POST['endDate'];\n\t\t\n\t\tif($employeeselect == null){$alertTo .= '* Employee/s Must not be Empty<br>';}\n\t\tif($scheduleselect == null){$alertTo .= '* Schedule Must not be Empty<br>';}\n\t\tif($startD == null){$alertTo .= '* Start Date Must not be Empty<br>';}\n\t\tif($endD == null){$alertTo .= '* End Date Must not be Empty<br>';}\n\n\t\tif($alertTo != null){\n\t\t\t\t$alert = '<div class=\"alert-error\" style=\"padding:10px;\">ERROR<br />'.$alertTo.'</div>';\n\t\t}else{\n\n\n\t\t$arr_sched = explode('.',$scheduleselect);\n\t\t$saveit = 0;\n\t\t$array = $employeeselect;\n\t\t$notExistName = '';\n\n\t\t$output = array();\n\t\t$i = 0;\n\n\t\t$bits = explode(',', $array);\n\t\tforeach($bits as $bit):\n\t\t\tif(strpos($bit,'. ') != false){\n\t\t\t\t\t\t$has_num = explode('.', $bit);\n\t\t\t\t\t\tif(count($has_num) > 1) {\n\t\t\t\t\t\t\t\t\t\t$i = $has_num[0];\n\t\t\t\t\t\t\t\t\t\t$name = $has_num[1];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$name = $has_num[0];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$output[$i][] = trim($name);\n\t\t\t} else{\n\t\t\t\t\t\t$saveit++; //checkif exist\n\t\t\t\t\t\t$notExistName .= $bit.\",\";\n\t\t\t}\n\t\tendforeach;\n\n\t\tif($saveit == 0){\n\t\t\tforeach($output as $key => $value):\n\t\t\t\t$checkOutput = Yii::app()->db->createCommand(/*'\n\t\t\t\t\t\tSELECT es.sched_id, es.emp_id, es.start_date, es.end_date, s.mon, s.tue, s.wed, s.thur, s.fri, s.sat, s.sun\n\t\t\t\t\t\tFROM employee_schedule AS es\n\t\t\t\t\t\tINNER JOIN schedule AS s ON s.id = es.sched_id\n\t\t\t\t\t\tWHERE emp_id=\\''.$key.'\\' AND (start_date <= \\''.$startD.'\\' and end_date >= \\''.$endD.'\\')\n\t\t\t\t\t\t'*/\n\t\t\t\t\t\t'SELECT es.sched_id, es.emp_id, es.start_date, es.end_date, s.mon, s.tue, s.wed, s.thur, s.fri, s.sat, s.sun \n\t\t\t\t\t\tFROM employee_schedule AS es \n\t\t\t\t\t\tINNER JOIN schedule AS s ON s.id = es.sched_id \n\t\t\t\t\t\tWHERE emp_id=\\''.$key.'\\' AND (start_date <= \\''.$startD.'\\' and end_date >= \\''.$startD.'\\' or end_date <= \\''.$endD.'\\')\n\t\t\t\t\t\t')->queryAll();\n\n\t\t\t\t\t\t$day = $startD;\n\t\t\t\t\t\twhile($day <= $endD){\n\t\t\t\t\t\t\tforeach($checkOutput as $cA){\n\t\t\t\t\t\t\t\tif($cA['start_date'] <= $day && $cA['end_date'] >= $day){\n\t\t\t\t\t\t\t\t\t//days with schedule\n\t\t\t\t\t\t\t\t\t$dayswithsched .= $day.\"<br>\";\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t//days without schedule\n\t\t\t\t\t\t\t\t\t$dayswithoutsched .= $day.\"<br>\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$day = date('Y-m-d', strtotime('+1 day', strtotime($day)));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif($dayswithsched == null){\n\t\t\t\t\t\t\t\t\t//the employee schedule has been save\t\n\t\t\t\t\t\t\t\t\t$model = new EmployeeSchedule;\n\t\t\t\t\t\t\t\t\t$model->emp_id = $key;\n\t\t\t\t\t\t\t\t\t$model->sched_id = $arr_sched[0];\n\t\t\t\t\t\t\t\t\t$model->start_date = $startD;\n\t\t\t\t\t\t\t\t\t$model->end_date = $endD;\n\t\t\t\t\t\t\t\t\t$model->save();\n\n\t\t\t\t\t\t\t\t\t$emp_key = Employee::model()->findByPk($key);\n\t\t\t\t\t\t\t\t\t$alertwS .= $emp_key['lastname'].', '.$emp_key['firstname'].' has been saved <br>';\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t//cant be save\n\t\t\t\t\t\t\t\t\t$emp_key = Employee::model()->findByPk($key);\n\t\t\t\t\t\t\t\t\t$alertwoS .= $emp_key['id'].\"-\".$emp_key['lastname'].', '.$emp_key['firstname'].' can\\'t be saved <br> Conflict Schedule:<br>'.$dayswithsched;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$confsched .= $dayswithsched;\n\t\t\t\t\t\t\t\t$dayswithsched = null;\n\t\t\t\t\t\t\t\t$dayswithoutsched = null;\n\n\t\t\tendforeach;\n\t\t\tif($alertwS != null){\n\t\t\t\t$alert .= \"<div class='alert-success' style='padding:10px'>SUCCESS!<br />$alertwS</div>\";}\n\t\t\tif($alertwoS != null){\n\t\t\t\t$alert .= \"<div class='alert-error' style='padding:10px;'>ERROR<br />$alertwoS</div>\";}\n\t\t\t}else{\n\t\t\t\t$alert = '<div class=\"alert-error\" style=\"padding:10px;\">ERROR<br />'.$notExistName.' does not Exist. Please try again.</div>';\n\t\t\t}\n\t\t}\n}\n\t\t\t\t$this->render('create',array(\n\t\t\t\t'employee'=>$employee,\n\t\t\t\t'model'=>$model,\n\t\t\t\t'alert'=>$alert,\n\t\t\t\t'emp'=>$emp,\n\t\t\t\t));\n\t}", "title": "" }, { "docid": "a8fd0ce1de3611264a4c76f68b7c2aee", "score": "0.51446825", "text": "public function create_employee()\n\t{\n\t\treturn view('employee_view.employee_create');\n\t}", "title": "" }, { "docid": "bb303c642f694304c0a5569cd734e51a", "score": "0.51424134", "text": "function insertNewEmployee($parameters) {\n\t\t\t$firstName = $parameters[\"fFirstname\"];\n\t\t\t$secondName = $parameters[\"fSurname\"];\n\t\t\t$dob = $parameters[\"fDOB\"];\n\t\t\t$mobile = $parameters[\"fMobile\"];\n\t\t\t$address = $parameters[\"fAddr\"];\n\t\t\t$email = $parameters [\"fEmail\"];\n\t\t\t$empPin = $parameters [\"fPassword\"];\n\t\t\t$empPinConf = $parameters[\"fPassConf\"];\n\t\t\t$date_joined = date(\"Y/m/d h:i:sa\");\n\t\t\t$companyID = $parameters['fCompanyName'];\n\t\t\t$service = $parameters['fCompanyService'];\n\t\t\t//$companyID = $this->model->validationFactory->getCompanyIDByName($companyName);\n\t\t\t$empNum = $this->model->validationFactory->empNumGenerator();\n\t\t\t\n\t\t\t//All fields must be filled\n\t\t\tif (! empty ( $firstName ) && ! empty ( $secondName ) && ! empty ( $email ) && ! empty ( $mobile ) && ! empty ( $address ) && ! empty ( $empPin ) && ! empty($date_joined) && ! empty($empNum) && ! empty($service) ){\n\t\t\t\t/*\n\t\t\t\tIn this if statement , the controller checks various validity methods from the model. \n\t\t\t\tThis is mainly to ensure that the new email that the new user has entered does not match an existing user and that character lenght and casings are adequate\n\t\t\t\t*/\n\t\t\t\tif($empPin == $empPinConf){\n\t\t\t\t\tif(! empty($companyID)){\n\t\t\t\t\t\tif ($this->model->validationFactory->isLengthStringValid( $firstName, NEW_USER_FORM_MAX_USERNAME_LENGTH ) && $this->model->validationFactory->isLengthStringValid ($secondName,NEW_USER_FORM_MAX_USERNAME_LENGTH) && $this->model->validationFactory->isEmailValid ( $email ) && $this->model->validationFactory->isMobileValid( $mobile , MAX_LENGTH_FOR_MOBILE )) {\n\t\t\t\t\t\t\t//if (! $this->model->authenticationFactory->isAdminEmailExisting ( $email )) {\n\t\t\t\t\t\t\t// the hashed password is saved in a variable and along with the new username .....\n\t\t\t\t\t\t\t\t$hashedPin = $this->model->authenticationFactory->getHashValue ( $empPin );\n\t\t\t\t\t\t\t\t//...... is inserted to the database\n\t\t\t\t\t\t\t\t// the hasRegistrationFailed methosd is assigned false so will not take affect \n\t\t\t\t\t\t\t\t//the user is notified of the completed insertion\n\t\t\t\t\t\t\t\tif ($this->model->insertNewEmployee( $firstName,$secondName,$dob,$mobile,$address,$email, $hashedPin,$date_joined,$empNum,$companyID,$service)) {\n\t\t\t\t\t\t\t\t\t$this->model->hasRegistrationFailed = false;\n\t\t\t\t\t\t\t\t\t$this->model->setConfirmationMessage();\n\t\t\t\t\t\t\t\t\treturn (true);\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/*\n\t\t\t\t\t\t\t\tThe model is holding all the error messages, therefore should any of the aspects \n\t\t\t\t\t\t\t\tfail during user insertion the user will be notified of where and why they failed\n\t\t\t\t\t\t\t\t*/\n\t\t\t\t\t\t\t//} else\n\t\t\t\t\t\t\t//\t$this->model->setUpNewUserError ( NEW_USER_FORM_EXISTING_ERROR_STR );\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t$this->model->setUpNewUserError ( NEW_USER_FORM_ERRORS_STR );\n\t\t\t\t\t}else\n\t\t\t\t\t\t$this->model->setUpNewUserError( NEW_USER_FORM_EXISTING_ERROR_STR);\n\t\t\t\t}else \n\t\t\t\t\t$this->model->setUpNewUserError( NEW_USER_FORM_MAX_USERNAME_LENGTH);\n\t\t\t} else\n\t\t\t\t$this->model->setUpNewUserError ( NEW_USER_FORM_ERRORS_COMPULSORY_STR );\n\t\t\t\n//\t\t\t$this->model->hasRegistrationFailed = true;\n//\t\t\t$this->model->updateLoginErrorMessage ();\n//\t\t\treturn (false);\n\t\t}", "title": "" }, { "docid": "d58d7ec7928750f4133524df7b47180d", "score": "0.5141981", "text": "public function adjustment():Relation;", "title": "" }, { "docid": "24e0cd314e6795976bf3576059f7677d", "score": "0.51407486", "text": "public function employees()\n {\n return $this -> belongsToMany('App\\Models\\EmployeeAdmin','employee_branches','employee_id','branch_id','id','id');\n\n }", "title": "" }, { "docid": "0aea359efc94f5a3a153229de7a92c63", "score": "0.51403284", "text": "private function createEmployee(){\n $employee_obj =new Employee;\n $employee_obj ->name =request()->name;\n $employee_obj ->email =request()->email;\n $employee_obj ->address =request()->address;\n $employee_obj ->phone_number =request()->phone_number;\n $employee_obj ->password =request()->password;\n $employee_obj ->image =$this->getImage();\n $employee_obj ->created_by =Auth::user()->id;\n $employee_obj ->save();\n\n $user_obj =new User;\n $user_obj->name = request()->name;\n $user_obj->email = request()->email;\n $user_obj->password = Hash::make(request()->password);\n $user_obj->category = request()->category;\n $user_obj ->save();\n return redirect()->back()->with('msg', 'You have added Employee Successfully');\n }", "title": "" }, { "docid": "db88a8b99c2083c4ddd074eab01e763a", "score": "0.51377136", "text": "public function employees()\n {\n \treturn $this->belongsToMany(User::class, 'user_department')->withTimestamps();\n }", "title": "" }, { "docid": "6ea4144b3c431d77baae2c941d31b9d2", "score": "0.5137166", "text": "public function updateEmployeeDetails($employee_id, $username, $email_address, $is_manager, $is_admin, $hours_day, $manager_name){ \n\n try{\n $sql = \"UPDATE employees \"\n . \"SET username = :_username, email_address = :_email_address, is_manager = :_is_manager, is_admin = :_is_admin, hours_day=:_hours_day \"\n . \"WHERE employee_id = :_employee_id\";\n $stmt = $this->_db->prepare($sql);\n if( $stmt->execute( array(':_username' => $username, ':_email_address' => $email_address, ':_is_manager' => $is_manager,':_is_admin' => $is_admin, ':_hours_day' => $hours_day, ':_employee_id' => $employee_id) ) ){\n \n $manager_id = $this->fetchIDfromName($manager_name);//fetch manager ID being that we are only given name\n \n $sql1 = \"UPDATE managers \"\n . \"SET manager_id = :_manager_id \"\n . \"WHERE employee_id = :_employee_id \";\n $stmt1 = $this->_db->prepare($sql1);\n if ( $stmt1->execute( array(':_employee_id' => $employee_id , ':_manager_id' => $manager_id ))){\n \n $_SESSION['message'] =\"Employee succesfully updated!\";\n return 1;\n }\n else\n {\n $_SESSION['error'] =\"Error: Employee update failed\";\n return 0;\n }\n } \n else\n {\n return \"error\";\n }\n }\n\n \n catch(PDOException $e){\n return array('error' => $e->getMessage());\n } \n}", "title": "" }, { "docid": "234e92735dddae3b9e45f97021da00a2", "score": "0.5136576", "text": "public function create()\n {\n $designations = Designation::orderBy('name')->pluck('name', 'id');\n return view('admin.employee.create', compact('designations'));\n }", "title": "" }, { "docid": "5d30e6fd068fe60dd98cb23b5b374ec0", "score": "0.51354975", "text": "public function fixAppointmentWithUserForEmployee(User $user, Employee $employee);", "title": "" }, { "docid": "6d6eebfece474168e5f4ebbd6bccb285", "score": "0.5133155", "text": "public function scopeselemployee($query, $parameter)\n\t{\n\t\t$date \t\t\t\t= $parameter['date'];\n\t\t$company_id \t\t= $parameter['company_id'];\n\t\t$employment_status \t= $parameter['employement_status'];\n\t\t$shop_id \t\t\t= $parameter['shop_id'];\n\t\t\n\t\tif($date == '0000-00-00')\n\t\t{\n\t\t\t$date = date('Y-m-d');\n\t\t}\n\n\t\t$query->leftjoin('tbl_payroll_company as company','company.payroll_company_id','=','tbl_payroll_employee_basic.payroll_employee_company_id')\n\t\t\t ->leftjoin('tbl_payroll_employee_contract as contract','contract.payroll_employee_id','=','tbl_payroll_employee_basic.payroll_employee_id')\n\t\t\t ->leftjoin('tbl_payroll_department as department','department.payroll_department_id','=','contract.payroll_department_id')\n\t\t\t ->leftjoin('tbl_payroll_jobtitle as jobtitle','jobtitle.payroll_jobtitle_id','=','contract.payroll_jobtitle_id')\n\t\t\t ->where('contract.payroll_employee_contract_date_end','<=',$date)\n\t\t\t ->where('company.shop_id',$shop_id);\n\t\t\t \n\t\t\t if($company_id != 0)\n\t\t\t {\n\t\t\t \t$query->where('company.payroll_company_id',$company_id);\n\t\t\t }\n\n\t\t\t if($employment_status == 0)\n\t\t\t {\n\t\t\t \t$status = array();\n\t\t\t \t$status[0] = 1;\n\t\t\t \t$status[1] = 2;\n\t\t\t \t$status[2] = 3;\n\t\t\t \t$status[3] = 4;\n\t\t\t \t$status[4] = 5;\n\t\t\t \t$status[5] = 6;\n\t\t\t \t$status[6] = 7;\n\t\t\t }\n\n\t\t\t if($employment_status === 'separated')\n\t\t\t {\n\t\t\t \t$status = array();\n\t\t\t \t$status[0] = 8;\n\t\t\t \t$status[1] = 9;\n\t\t\t \t\n\t\t\t }\n\n\t\t\t if($employment_status != 0 && $employment_status != 'separated')\n\t\t\t {\n\t\t\t \t$status = array();\n\t\t\t \t$status[0] = $employment_status;\n\t\t\t }\n\n\t\t\t $query->whereIn('contract.payroll_employee_contract_status',$status)\n\t\t\t \t\t->select('company.payroll_company_name','tbl_payroll_employee_basic.*','department.payroll_department_name','jobtitle.payroll_jobtitle_name')\n\t\t\t \t\t->groupBy('tbl_payroll_employee_basic.payroll_employee_id');\n\n\t\treturn $query;\n\n\t}", "title": "" }, { "docid": "618a0b9c275434175b9c69c3b3c4c823", "score": "0.5132551", "text": "public function actCustomerEmployment($mode = \"I\"){\n\t\t$mode = strtoupper($mode);\n\t\tswitch($mode){\n\t\t\tcase \"I\":\n\t\t\t\t$Sql = \"INSERT INTO rs_tbl_customer_employment(\n\t\t\t\t\t\temployee_id,\n\t\t\t\t\t\tcustomer_id,\n\t\t\t\t\t\tcompany_name,\n\t\t\t\t\t\tduration,\n\t\t\t\t\t\tstart_date,\n\t\t\t\t\t\tend_date,\n\t\t\t\t\t\tlocation,\n\t\t\t\t\t\tindustry_id,\n\t\t\t\t\t\tjob_title,\n\t\t\t\t\t\tjob_description,\n\t\t\t\t\t\temp_date,\n\t\t\t\t\t\tis_active) \n\t\t\t\t\t\tVALUES(\";\n\t\t\t\t$Sql .= $this->isPropertySet(\"employee_id\", \"V\") ? $this->getProperty(\"employee_id\") : \"NULL\";\n\t\t\t\t$Sql .= \",\";\n\t\t\t\t$Sql .= $this->isPropertySet(\"customer_id\", \"V\") ? \"'\" . $this->getProperty(\"customer_id\") . \"'\" : \"NULL\";\n\t\t\t\t$Sql .= \",\";\n\t\t\t\t$Sql .= $this->isPropertySet(\"company_name\", \"V\") ? \"'\" . $this->getProperty(\"company_name\") . \"'\" : \"NULL\";\n\t\t\t\t$Sql .= \",\";\n\t\t\t\t$Sql .= $this->isPropertySet(\"duration\", \"V\") ? \"'\" . $this->getProperty(\"duration\") . \"'\" : \"NULL\";\n\t\t\t\t$Sql .= \",\";\n\t\t\t\t$Sql .= $this->isPropertySet(\"start_date\", \"V\") ? \"'\" . $this->getProperty(\"start_date\") . \"'\" : \"NULL\";\n\t\t\t\t$Sql .= \",\";\n\t\t\t\t$Sql .= $this->isPropertySet(\"end_date\", \"V\") ? \"'\" . $this->getProperty(\"end_date\") . \"'\" : \"NULL\";\n\t\t\t\t$Sql .= \",\";\n\t\t\t\t$Sql .= $this->isPropertySet(\"location\", \"V\") ? \"'\" . $this->getProperty(\"location\") . \"'\" : \"NULL\";\n\t\t\t\t$Sql .= \",\";\n\t\t\t\t$Sql .= $this->isPropertySet(\"industry_id\", \"V\") ? \"'\" . $this->getProperty(\"industry_id\") . \"'\" : \"NULL\";\n\t\t\t\t$Sql .= \",\";\n\t\t\t\t$Sql .= $this->isPropertySet(\"job_title\", \"V\") ? \"'\" . $this->getProperty(\"job_title\") . \"'\" : \"NULL\";\t\t\t\t\n\t\t\t\t$Sql .= \",\";\n\t\t\t\t$Sql .= $this->isPropertySet(\"job_description\", \"V\") ? \"'\" . $this->getProperty(\"job_description\") . \"'\" : \"NULL\";\n\t\t\t\t$Sql .= \",\";\n\t\t\t\t$Sql .= $this->isPropertySet(\"emp_date\", \"V\") ? \"'\" . $this->getProperty(\"emp_date\") . \"'\" : \"NULL\";\n\t\t\t\t$Sql .= \",\";\n\t\t\t\t$Sql .= $this->isPropertySet(\"is_active\", \"V\") ? \"'\" . $this->getProperty(\"is_active\") . \"'\" : \"NULL\";\n\t\t\t\t$Sql .= \")\";\n\t\t\t\tbreak;\n\t\t\tcase \"U\":\n\t\t\t\t$Sql = \"UPDATE rs_tbl_customer_employment SET \";\n\t\t\t\t\n\t\t\t\tif($this->isPropertySet(\"company_name\", \"K\")){\n\t\t\t\t\t$Sql .= \"$con company_name='\" . $this->getProperty(\"company_name\") . \"'\";\n\t\t\t\t\t$con = \",\";\n\t\t\t\t}\n\t\t\t\tif($this->isPropertySet(\"duration\", \"K\")){\n\t\t\t\t\t$Sql .= \"$con duration='\" . $this->getProperty(\"duration\") . \"'\";\n\t\t\t\t\t$con = \",\";\n\t\t\t\t}\n\t\t\t\tif($this->isPropertySet(\"start_date\", \"K\")){\n\t\t\t\t\t$Sql .= \"$con start_date='\" . $this->getProperty(\"start_date\") . \"'\";\n\t\t\t\t\t$con = \",\";\n\t\t\t\t}\n\t\t\t\tif($this->isPropertySet(\"end_date\", \"K\")){\n\t\t\t\t\t$Sql .= \"$con end_date='\" . $this->getProperty(\"end_date\") . \"'\";\n\t\t\t\t\t$con = \",\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($this->isPropertySet(\"location\", \"K\")){\n\t\t\t\t\t$Sql .= \"$con location='\" . $this->getProperty(\"location\") . \"'\";\n\t\t\t\t\t$con = \",\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($this->isPropertySet(\"industry_id\", \"K\")){\n\t\t\t\t\t$Sql .= \"$con industry_id='\" . $this->getProperty(\"industry_id\") . \"'\";\n\t\t\t\t\t$con = \",\";\n\t\t\t\t}\n\t\t\t\tif($this->isPropertySet(\"job_title\", \"K\")){\n\t\t\t\t\t$Sql .= \"$con job_title='\" . $this->getProperty(\"job_title\") . \"'\";\n\t\t\t\t\t$con = \",\";\n\t\t\t\t}\n\t\t\t\tif($this->isPropertySet(\"job_description\", \"K\")){\n\t\t\t\t\t$Sql .= \"$con job_description='\" . $this->getProperty(\"job_description\") . \"'\";\n\t\t\t\t\t$con = \",\";\n\t\t\t\t}\n\t\t\t\tif($this->isPropertySet(\"emp_date\", \"K\")){\n\t\t\t\t\t$Sql .= \"$con emp_date='\" . $this->getProperty(\"emp_date\") . \"'\";\n\t\t\t\t\t$con = \",\";\n\t\t\t\t}\n\t\t\t\tif($this->isPropertySet(\"is_active\", \"K\")){\n\t\t\t\t\t$Sql .= \"$con is_active='\" . $this->getProperty(\"is_active\") . \"'\";\n\t\t\t\t\t$con = \",\";\n\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t$Sql .= \" WHERE 1=1\";\n\t\t\t\tif($this->isPropertySet(\"employee_id\", \"V\")){\n\t\t\t\t\t$Sql .= \" AND employee_id='\" . $this->getProperty(\"employee_id\") . \"'\";\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"D\":\n\t\t\t\t$Sql = \"DELETE FROM rs_tbl_customer_employment\n\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\t1=1\";\n\t\t\t\t$Sql .= \" AND employee_id=\" . $this->getProperty(\"employee_id\");\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t\treturn $this->dbQuery($Sql);\n\t}", "title": "" }, { "docid": "6b291449ae874aed2a82ce88f8b22cd2", "score": "0.5130136", "text": "function getID()\n\t{\n\t\treturn $this->employeeID;\n\t}", "title": "" }, { "docid": "a7e85c199b5155aff7bfcc238566986d", "score": "0.5130079", "text": "public function getEmployee()\n {\n return $this->employee;\n }", "title": "" }, { "docid": "c5979ff7d34a804675d5dbcdc42365c9", "score": "0.51264465", "text": "public function create()\n\t{\n\t\t\n\t\t$employees = DB::table('employee')\n\t\t ->where('in_employment','=','Y')\n\t\t ->where('employee.organization_id',Auth::user()->organization_id)\n\t\t ->get();\n\t\t$reliefs = Relief::whereNull('organization_id')->orWhere('organization_id',Auth::user()->organization_id)->get();\n\t\t$currency = Currency::whereNull('organization_id')->orWhere('organization_id',Auth::user()->organization_id)->first();\n\n\t\tif ( !Entrust::can('create_relief') ) // Checks the current user\n {\n return Redirect::to('home')->with('notice', 'you do not have access to this resource. Contact your system admin');\n }else{ \n\t\treturn view('employee_relief.create',compact('employees','reliefs','currency'));\n\t}\n\t}", "title": "" }, { "docid": "629a226ae988d3ab6f275b9f456ced02", "score": "0.5123315", "text": "public function edit(Employee $employee)\n {\n //\n // return $employee;\n $page_name = \"Employee\";\n $page_subpage = \"update\";\n $page_icon =\"fa fa-user-edit\";\n $auth = Auth::user();\n $employees = Employee::all();\n foreach ($employees as $key) {\n if ($key->id == $auth->employee_id) {\n $user = $key;\n }\n }\n\n // $employee=Employee::find($employee->$id);\n $documentType = DocumentType::all();\n $workstation = Workstation::all();\n // return $documentType;\n return view('employee.edit',compact(\"user\", \"employee\", \"workstation\",\"documentType\",\"page_name\",\"page_subpage\", \"page_icon\"));\n // return view('employee.edit',compact('employee','em', 'documentType', 'workstation'));\n }", "title": "" }, { "docid": "86e33eb0fb229700190d2f2e13bac5fd", "score": "0.51214737", "text": "public function store(Request $request)\n {\n $employee = new Employee;\n\n\n $employee->nombreCompleto = $request -> nombreCompleto;\n $employee->scholarship_id = $request -> scholarship_id;\n $employee->status_id = '1';\n $employee->voluntario = 0;\n $employee->civil_status_id = $request -> civil_status_id;\n $employee->scholarship_id = $request -> scholarship_id;\n $employee->headquarter_id = $request -> headquarter_id;\n $employee->fechaNac = $request -> fechaNac;\n $employee->salarioxhora = $request -> salarioxhora;\n $employee->fechaIngreso = $request -> fechaIngreso;\n $employee->RFC = $request -> RFC;\n $employee->CURP = $request -> CURP;\n $employee->infonavit = $request -> infonavit;\n $employee->calle = $request -> calle;\n $employee->numInterior = $request -> numInterior;\n $employee->numExterior = $request -> numExterior;\n $employee->colonia = $request -> colonia;\n $employee->codigoPostal = $request -> codigoPostal;\n $employee->estado = $request -> estado;\n $employee->ciudad = $request -> ciudad;\n $employee->telefono = $request -> telefono;\n $employee->celular = $request -> celular;\n $employee->correo = $request -> correo;\n $employee->numBeneficiarios = $request -> numBeneficiarios;\n $employee->frecuenciaSalario = $request -> frecuenciaSalario;\n $employee->puesto = $request -> puesto;\n $employee->diasLaborales = $request -> diasLaborales;\n $employee->numSeguroSocial = $request -> numSeguroSocial;\n\n $employee->save();\n\n return $employee;\n }", "title": "" }, { "docid": "e36d81cbd5bf37aaac3d93231e060872", "score": "0.5120172", "text": "public function edit(Consultations $consultations)\n {\n //\n }", "title": "" }, { "docid": "a7b47a64e09eef1b0dd850936faf4a57", "score": "0.5113102", "text": "protected function setupCreateOperation()\n {\n CRUD::setValidation(EmployeeRequest::class);\n\n //CRUD::setFromDb(); // fields\n\n CRUD::addField(['name' => 'name', 'type' => 'text']);\n CRUD::addField(['name' => 'birth_day', 'type' => 'date']);\n CRUD::addField(['name'=> 'gender', 'type'=> 'select_from_array', 'options'=> ['male' => 'male', 'female' => 'female'],]);\n\n CRUD::addField(['name' => 'countries', 'label' => \"Country\", 'type' => 'select',\n 'entity' => 'countries', Country::class => \"App\\Models\\Country\",\n 'attribute' => 'country', (function ($query) {\n return $query->orderBy('name', 'ASC')->get();\n }),]);\n\n CRUD::addField(['name' => 'cities', 'label' => \"City\", 'type' => 'select',\n 'entity' => 'cities', Country::class => \"App\\Models\\Country\",\n 'attribute' => 'city', (function ($query) {\n return $query->orderBy('name', 'ASC')->get();\n }),]);\n\n CRUD::addField(['name' => 'phone', 'type' => 'text']);\n CRUD::addField(['name' => 'department', 'type' => 'select_from_array','options'=> ['M&E' => 'M&E', 'HR' => 'HR',\n 'Program' => 'Program','Media' => 'Media','logistic' => 'logistic','Finance' => 'Finance','Operation' => 'Operation','allows_null' => false,],]);\n\n CRUD::addField(['name' => 'positions', 'label' => \"Position\", 'type' => 'select',\n 'entity' => 'positions', Position::class => \"App\\Models\\Position\",\n 'attribute' => 'position', (function ($query) {\n return $query->orderBy('name', 'ASC')->get();\n }),]);\n\n CRUD::addField(['name' => 'supervisior', 'type' => 'text']);\n\n CRUD::addField(['name' => 'hrs', 'label' => \"HR\", 'type' => 'select',\n 'entity' => 'hrs', User::class => \"App\\Models\\User\",\n 'attribute' => 'name', (function ($query) {\n return $query->orderBy('name', 'ASC')->get();\n }),]);\n\n CRUD::addField(['name'=> 'contract_type', 'type'=> 'select_from_array', 'options'=> ['Full Time' => 'Full Time', 'Part Time' => 'Part Time'],]);\n CRUD::addField(['name' => 'salary', 'type' => 'number']);\n CRUD::addField(['name' => 'is_active', 'type' => 'checkbox']);\n CRUD::addField(['name' => 'start_date', 'type' => 'date']);\n CRUD::addField(['name' => 'end_date', 'type' => 'date']);\n CRUD::addField(['name' => 'project_name', 'type' => 'text']);\n CRUD::addField(['name' => 'not', 'type' => 'text']);\n\n\n CRUD::addField(['label' => \"Image\", 'name' => \"image\", 'type' => 'image', 'crop' => true, 'aspect_ratio' => 1,]);\n CRUD::addField(['name' => \"Id_card\", 'type' => 'upload','upload'=> true,]);\n CRUD::addField(['name' => \"CV\", 'type' => 'upload','upload'=> true,]);\n CRUD::addField(['name' => \"self_doc\", 'type' => 'upload','upload'=> true,]);\n\n\n\n\n\n\n\n\n\n\n\n\n /**\n * Fields can be defined using the fluent syntax or array syntax:\n * - CRUD::field('price')->type('number');\n * - CRUD::addField(['name' => 'price', 'type' => 'number']));\n */\n }", "title": "" }, { "docid": "d59e957232ba32b514c6badd8c7ca7c0", "score": "0.51118195", "text": "public function update() {\r\n global $DB; \r\n $fields = $this->makeSetString();\r\n $query = \"UPDATE Ass1_Employees $fields WHERE id = {$this->id}\";\r\n $result = $DB->query($query);\r\n Employee::checkResult($result);\r\n }", "title": "" }, { "docid": "6bd1535be1320f8d44d88462e48cf8aa", "score": "0.51089615", "text": "public function editable($employee_id, $id)\n {\n $employee_designation = $this->findOrFail($employee_id, $id);\n\n $employee_designations = $employee_designation->Employee->EmployeeDesignations;\n\n if ($employee_designations->where('id', '!=', $id)->where('date_effective', '>', $employee_designation->date_effective)->count()) {\n throw ValidationException::withMessages(['message' => trans('employee.only_last_designation_is_editable')]);\n }\n\n return $employee_designation;\n }", "title": "" }, { "docid": "77bed6caa11c661c8e6ca68f4566f9c7", "score": "0.5106331", "text": "public function employee()\n {\n return $this->belongsTo(User::class);\n }", "title": "" } ]
7441d5002304a6f0d23e29d0c98eb9f2
get all items from goods table
[ { "docid": "67fb2a839ab7d78522633cdc0fdeff77", "score": "0.807493", "text": "function getItemsFromGoods() { \n global $link;\n $sql = 'SELECT id, category, description, price, visible, section, hit FROM goods';\n\n if (!$result = mysqli_query($link, $sql)) {\n return false;\n } else {\n $items = mysqli_fetch_all($result, MYSQLI_ASSOC);\n //$items = mysqli_fetch_assoc($result); \n \n mysqli_free_result($result);\n return $items;\n }\n }", "title": "" } ]
[ { "docid": "3508ef626d7c81eb5394ee6792ab5493", "score": "0.7688189", "text": "public function getItems()\n {\n return $this->hasMany(GoodsFields::className(), ['id' => 'item_id'])->viaTable('shop_to_good_field', ['sid' => 'id']);\n }", "title": "" }, { "docid": "932f300489ec222604864e864e524064", "score": "0.7671651", "text": "function getItemsFromGoodsAndImgs() { \n global $link;\n $sql = 'SELECT g.id, img_path, category, description, price, visible, section, hit FROM goods AS g\n LEFT JOIN imgs AS i ON g.id = i.id_goods GROUP BY g.id';\n\n if (!$result = mysqli_query($link, $sql)) {\n return false;\n } else {\n $items = mysqli_fetch_all($result, MYSQLI_ASSOC);\n //$items = mysqli_fetch_assoc($result); \n \n mysqli_free_result($result);\n return $items;\n }\n }", "title": "" }, { "docid": "e0c55928513ae36346a55b854a59d407", "score": "0.7477496", "text": "public function getGoodsList(){\n return $this->_get(5);\n }", "title": "" }, { "docid": "a3eb29f9019c31faede011992337f6fa", "score": "0.7349815", "text": "function getItemsFromGoodsAndImgsForHit() { \n global $link;\n $sql = 'SELECT g.id, img_path, category, description, price, visible, section, hit FROM goods AS g\n LEFT JOIN imgs AS i ON g.id = i.id_goods WHERE hit = 1 GROUP BY g.id LIMIT 1';\n\n if (!$result = mysqli_query($link, $sql)) {\n return false;\n } else {\n $items = mysqli_fetch_all($result, MYSQLI_ASSOC);\n //$items = mysqli_fetch_assoc($result); \n \n mysqli_free_result($result);\n return $items;\n }\n }", "title": "" }, { "docid": "3dc0859dcddd017a366d030c063f40e3", "score": "0.7251873", "text": "public function getAllItems();", "title": "" }, { "docid": "185d461e2e8a0fa28c3759d4e2e7ef37", "score": "0.7198725", "text": "public function getAllItem() {\r\n $results = DB::table('food_items')->get();\r\n return $results;\r\n /* $items = Item::select(array(\r\n 'food_items.*',\r\n 'food_category.name as category',\r\n ))\r\n ->leftJoin('food_category', 'food_items.food_category_id', '=', 'food_category.id')\r\n ->get();\r\n\r\n return $items; */\r\n }", "title": "" }, { "docid": "67c499a3f26a8088d05b1c23e2a5db02", "score": "0.7112222", "text": "public function get_items()\n {\n return $this->db->get_where('producto', array('estado' => get_state('ACTIVO')))->result();\n }", "title": "" }, { "docid": "f3d89da341cdb7fda37a79374cad5382", "score": "0.7040577", "text": "function getItems(){\n \n global $dbConn;\n \n $sql = \"SELECT productName, productId, price FROM product\";\n $statement = $dbConn->prepare($sql);\n $statement->execute();\n $records = $statement->fetchAll(PDO::FETCH_ASSOC);\n \n return $records;\n}", "title": "" }, { "docid": "000bcaafa45f343d8181ff17a6a2e7ee", "score": "0.6975158", "text": "public function getAllShoppingListItems() {\n $query = $this->db->query('SELECT `item`, `id` FROM `shopping_list`;');\n return $query->fetchAll();\n }", "title": "" }, { "docid": "a698b0a9926bdf36cae96603aaa48487", "score": "0.69460166", "text": "public function getItems();", "title": "" }, { "docid": "a698b0a9926bdf36cae96603aaa48487", "score": "0.69460166", "text": "public function getItems();", "title": "" }, { "docid": "a698b0a9926bdf36cae96603aaa48487", "score": "0.69460166", "text": "public function getItems();", "title": "" }, { "docid": "a698b0a9926bdf36cae96603aaa48487", "score": "0.69460166", "text": "public function getItems();", "title": "" }, { "docid": "a698b0a9926bdf36cae96603aaa48487", "score": "0.69460166", "text": "public function getItems();", "title": "" }, { "docid": "1dd371a2ceebf351a9ecc7a98ce8a44c", "score": "0.6905199", "text": "abstract protected function _getAllItems();", "title": "" }, { "docid": "c706374c2adf3636d6715238bec72f2e", "score": "0.6900134", "text": "public function getItems()\n {\n $query = \"SELECT * FROM items WHERE seller_id = :user_id\";\n $stmt = $this->conn->prepare($query);\n $stmt->bindParam(\":user_id\", $this->user_id);\n\n try {\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n } catch (PDOException $e) {\n //echo $e->getMessage();\n return null;\n }\n }", "title": "" }, { "docid": "24c9f7bc9a2c8a7a0a37e1dc9d89a0d9", "score": "0.68999016", "text": "public function getAll()\n {\n return Item::join('category', 'item.category_id', '=', 'category.id')\n ->select('item.*', 'category.name as cate')\n ->where('item.store_id', Auth::user()->id)\n // ->orderBy('item.id','DESC')->get();\n ->orderBy('sort_no', 'ASC')->get();\n }", "title": "" }, { "docid": "0903c5a686dd793dc1c9b6d179eb11b3", "score": "0.6884527", "text": "public function items() {\n $items = $this->db->prepare(\n \"SELECT * FROM `user_items` WHERE `owned_by`=:owned_by\"\n );\n $items->bindParam(\":owned_by\", $this->ID);\n $items->execute();\n return $items->fetchAll();\n }", "title": "" }, { "docid": "61e3766d45d2c04d90969d3386f96627", "score": "0.6841395", "text": "function get_items() {\n\tglobal $conn;\n\t$user_id = $_SESSION['user_id'];\n\t$sql = \"SELECT * FROM user_inventory, items WHERE user_id = {$user_id} and id = item_id;\";\n\t$items = $conn->query($sql);\n\tif ($items) {\n\t\treturn $items;\n\t} else {\n\t\techo \"Error: \" . $sql . \"<br>\" . $conn->error;\n\t}\n}", "title": "" }, { "docid": "e24c033c134ba8dd0a6b2caab32f8c69", "score": "0.6820648", "text": "public function getDadosItemAll() {\n\t\t$query = \"\n\t\t\t\tselect \tcd_itemID as cod_item,\n\t\t\t\t\t\tnm_item as nome_item,\n\t\t\t\t\t\tcd_tip_evt_suprimt as cod_evento\n\t\t\t\t\tfrom tb_item_suprimt\n\t\t\t\t\torder by nm_item\";\n\t\t$stmt = $this->db->prepare($query);\n\t\t$stmt->execute();\n\n\t\treturn $stmt->fetchAll(\\PDO::FETCH_ASSOC);\t\n\n\t}", "title": "" }, { "docid": "1a0fd2a8a8f3bae4c2ac4f604e967701", "score": "0.6780481", "text": "public static function mdlViewAllItems()\n {\n //Presents items arranged by store\n $stmt = Connection::connect()->prepare(\"SELECT items.name,items.category,items.supplier_id,items.item_number,items.unit_price,stores_items.quantity,items.item_id,stores.store_name,items.factory_id FROM items JOIN stores_items ON items.item_id = stores_items.item_id JOIN stores ON stores_items.store_id = stores.store_id WHERE stores_items.active = ? AND items.deleted = ? ORDER BY stores_items.store_id\");\n $stmt->execute([1, 0]);\n\n return $stmt->fetchAll();\n\n $stmt->close();\n $stmt = null;\n }", "title": "" }, { "docid": "89e16998352bd0771648d53d5840e84e", "score": "0.6772009", "text": "function getDescItemFromGoodsAndImgs($id) { \n global $link;\n $sql = \"SELECT g.id, img_path, category, description, price, visible FROM goods AS g\n LEFT JOIN imgs AS i ON g.id = i.id_goods WHERE g.id = {$id} GROUP BY g.id\";\n\n if (!$result = mysqli_query($link, $sql)) {\n return false;\n } else {\n $items = mysqli_fetch_all($result, MYSQLI_ASSOC);\n //$items = mysqli_fetch_assoc($result); \n \n mysqli_free_result($result);\n return $items;\n }\n }", "title": "" }, { "docid": "c433ccf8311614bc20b67ff10f62825e", "score": "0.6765206", "text": "public function getItems($id){\r\n\t\treturn $this->db->select('si.*,pr.name,pr.code,pr.hsn_sac_code,pr.unit')\r\n\t\t\t\t\t\t ->from('quotation_items si')\r\n\t\t\t\t\t\t ->join('quotation s','si.quotation_id = s.quotation_id')\r\n\t\t\t\t\t\t ->join('products pr','si.product_id = pr.product_id')\r\n\t\t\t\t\t\t ->where('si.quotation_id',$id)\r\n\t\t\t\t\t\t ->get()\r\n\t\t\t\t\t\t ->result();\r\n\t}", "title": "" }, { "docid": "ecd908275cac1c4c38f48df92f2d9a31", "score": "0.6762655", "text": "public function getItems()\n {\n return $this->hasMany(Item::className(), ['item_id' => 'item_id'])->viaTable('customer_item_price', ['customer_id' => 'customer_id']);\n }", "title": "" }, { "docid": "7cfa57e899770e97a06f6ada5b474e9a", "score": "0.6753349", "text": "function get_all_items($args = array())\n {\n $select = \"i.id iditem, i.name item_name,ic.id as idcat, ic.name as cat_name, s.name stock_name, si.stock_id as idstock, si.current_qty\";\n $q = $this->db->select($select)\n ->from(\"$this->items_table i\")\n ->join(\"$this->_table_name si\", 'i.id=si.item_id', 'left')\n ->join(\"$this->stocks_table s\", 's.id=si.stock_id', 'left')\n ->join(\"$this->items_categories_table ic\", 'i.item_category=ic.id');\n if(isset($args['limit']))\n $this->db->limit($args['limit'], $args['offset']);\n $q = $this->db->where('si.stock_id', $args['stock_id'])->get();\n \n if(!isset($args['num']))\n return $q->result();\n /*\n *if the return res function id used it will retutn an object \n *if the results is one result it will not be treateed as an array so it cant be used in pagination\n * */\n return $q->num_rows();\n }", "title": "" }, { "docid": "800e94e8cd4942196bab7f8b7211757c", "score": "0.674914", "text": "function GetAllInventoryItems(){\n\t$result = dbQuery(\"\n\t\tSELECT *\n\t\tFROM inventory\n\t\t\")->fetchAll();\n//* = all\n//from tells us which table to look at\n\t\treturn $result;\n//like your getAllBlogPosts function\n}", "title": "" }, { "docid": "0f6b7edb074a3e303c1f942ad55af62e", "score": "0.6746643", "text": "public function getItems0()\n {\n return $this->hasMany(GoodsGroups::className(), ['id' => 'item_id'])->viaTable('shop_to_good_group', ['sid' => 'id']);\n }", "title": "" }, { "docid": "427f367e41a64215914e3f61f2bf9589", "score": "0.6738061", "text": "public function getPurchasedItems();", "title": "" }, { "docid": "f8e70af9e141abe5174bd74a8f086dec", "score": "0.6722914", "text": "function get_all_purchases_goods()\n {\n $this->db->order_by('PurchaseID', 'desc');\n return $this->db->get('purchases_goods')->result_array();\n }", "title": "" }, { "docid": "d1675d3e9913ef04d427dca207e041a9", "score": "0.672162", "text": "function getSaleItems()\n {\n $data=array();\n $result=$this->db->prepare(\"select * from Products where Saleprice>0\");\n $result->execute();\n $result->setFetchMode(PDO::FETCH_ASSOC);\n while($row=$result->fetch())\n {\n $data[]=$row;\n }\n\n\n if(count($data)>0)\n return $data;\n\n }", "title": "" }, { "docid": "fce1c2a267bf8ea6478a73a70c8bcb12", "score": "0.67018753", "text": "function getAllItems() {\n\t\tglobal $con;\n\t\t$stmt = $con->prepare(\"SELECT * FROM items WHERE Approve != 0\");\n\t\t$stmt->execute();\n\t\t$val = $stmt->fetchAll();\n\t\treturn $val;\n\t}", "title": "" }, { "docid": "707f3cbe117d6b37699a7760071b1fe8", "score": "0.66867805", "text": "public static function get_all_items() {\n $ret = array();\n $req = BDD::get()->prepare('SELECT * FROM ITEMS ORDER BY name ASC;'); \n\t\t $req->execute();\n $respList = $req->fetchAll();\n foreach($respList as $resp) {\n $item = new Item();\n $item->init($resp);\n $ret[] = $item;\n }\n return $ret;\n }", "title": "" }, { "docid": "9280dc23ae6515ee71cdbcbebb611b75", "score": "0.6685728", "text": "function getItemsFromImgs() { \n global $link;\n $sql = 'SELECT id, id_goods, img_path FROM imgs ORDER BY id';\n\n if (!$result = mysqli_query($link, $sql)) {\n return false;\n } else {\n $items = mysqli_fetch_all($result, MYSQLI_ASSOC);\n //$items = mysqli_fetch_assoc($result); \n \n mysqli_free_result($result);\n return $items;\n }\n }", "title": "" }, { "docid": "83b173d741c8ff38dd61cc7d63914018", "score": "0.6682216", "text": "public function getAll_item() {\n\n\t\t$stmt = mysqli_prepare($this->connection, \"SELECT * FROM $this->tablename\");\t\t\n\t\t$this->throwExceptionOnError();\n\n\t\tmysqli_stmt_execute($stmt);\n\t\t$this->throwExceptionOnError();\n\n\t\t$rows = array();\n\n\t\tmysqli_stmt_bind_result($stmt, $row->itemIndex, $row->itemID, $row->itembarcodeID, $row->itemName, $row->itemDetail, $row->itemPrice, $row->itemLatestCost, $row->itemStock, $row->itemProPoint, $row->itemProStart, $row->itemProEnd, $row->CRE_DTE, $row->CRE_USR, $row->UPD_DTE, $row->UPD_USR, $row->DEL_DTE, $row->DEL_USR, $row->itemCatagoryIndex, $row->itemUnitIndex, $row->itemSizeIndex, $row->itemLocationIndex);\n\n\t while (mysqli_stmt_fetch($stmt)) {\n\t $row->itemProStart = new DateTime($row->itemProStart);\n\t $row->itemProEnd = new DateTime($row->itemProEnd);\n\t $row->CRE_DTE = new DateTime($row->CRE_DTE);\n\t $row->UPD_DTE = new DateTime($row->UPD_DTE);\n\t $row->DEL_DTE = new DateTime($row->DEL_DTE);\n\t $rows[] = $row;\n\t $row = new stdClass();\n\t mysqli_stmt_bind_result($stmt, $row->itemIndex, $row->itemID, $row->itembarcodeID, $row->itemName, $row->itemDetail, $row->itemPrice, $row->itemLatestCost, $row->itemStock, $row->itemProPoint, $row->itemProStart, $row->itemProEnd, $row->CRE_DTE, $row->CRE_USR, $row->UPD_DTE, $row->UPD_USR, $row->DEL_DTE, $row->DEL_USR, $row->itemCatagoryIndex, $row->itemUnitIndex, $row->itemSizeIndex, $row->itemLocationIndex);\n\t }\n\n\t\tmysqli_stmt_free_result($stmt);\n\t mysqli_close($this->connection);\n\n\t return $rows;\n\t}", "title": "" }, { "docid": "52b0dcf753b0ee168b772eea6bfdaa02", "score": "0.6671651", "text": "function getProducts()\n {\n //define the query\n $sql = \"SELECT * FROM product\";\n\n //prepare the statement\n $statement = $this->_dbh->prepare($sql);\n\n //execute the statement\n $statement->execute();\n\n //return the results\n return $statement->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "7adb5b7a2308fea401ab607140113d81", "score": "0.66656804", "text": "public static function getAllItems() {\n $pdo = Helper::tuckshopPDO();\n $query = \"SELECT itemID FROM Items\";\n $statement = $pdo->prepare($query);\n\n $statement->execute();\n $itemIDs = $statement->fetchAll(PDO::FETCH_COLUMN);\n $items = array();\n\n foreach ($itemIDs as $itemID) {\n $items[] = Item::getItemById($itemID);\n }\n\n return $items;\n }", "title": "" }, { "docid": "c20340ae0b2093bfd11c5cd28344e710", "score": "0.66603", "text": "public function getProducts();", "title": "" }, { "docid": "c20340ae0b2093bfd11c5cd28344e710", "score": "0.66603", "text": "public function getProducts();", "title": "" }, { "docid": "c20340ae0b2093bfd11c5cd28344e710", "score": "0.66603", "text": "public function getProducts();", "title": "" }, { "docid": "f17464edb9bfd43b62f8c2331a312c3f", "score": "0.66512364", "text": "public function showAllItems()\n {\n /*\n ! DANGEROUS ! ! DANGEROUS ! ! DANGEROUS ! ! DANGEROUS !\n TO MANY DATAS CAN KILL THE SQL SERVER OR CAUSES A LONG DELAY IN REQUEST\n */\n\n return DB::table('item')\n ->join('material', 'item.material_id', '=', 'material.id')\n ->join('category', 'item.CategoryStartID', '=', 'category.id')\n ->where('Visible', 1)\n ->select('item.Id', 'item.Name', 'item.State', 'category.name as Category','material.BuildType', 'material.SalePrice', 'material.StorageValue', 'item.material_id')\n ->get();\n\n }", "title": "" }, { "docid": "76d6065166e2c542505c47281f55e26f", "score": "0.6626182", "text": "public function list_item() {\n //$sql = \"SELECT * FROM \" . $this->tblItems . \", \" . $this->tblCategory . \n // \" WHERE \" . $this->tblItems . \".category=\" . $this->tblCategory . \".category_id\";\n \n $sql = \"SELECT * FROM \" . $this->tblItems . \" INNER JOIN \" . $this->tblCategory . \" ON \"\n . $this->tblItems. \".category=\" . $this->tblCategory . \".category_id\";\n //execute the query\n try {\n $query = $this->dbConnection->query($sql);\n if (!$query){\n $errmsg = $this->dbConnection->error;\n throw new DatabaseException(\"HEllo\");\n // return false;\n }\n else if($query->num_rows == 0){\n return 0;\n \n }\n else{\n $items = array();\n\n //loop through all rows \n while ($obj = $query->fetch_object()) {\n $item = new Item(stripslashes($obj->title), stripslashes($obj->price), stripslashes($obj->image), stripslashes($obj->description), stripslashes($obj->category));\n\n //set the id for a item\n $item->setItem_Id($obj->item_id);\n\n //add the item into an array\n $items[] = $item;\n }\n return $items;\n }\n }\n catch(DatabaseException $e){\n $error = new LoginError();\n $error->display($e->getMessage());\n }\n catch(Exception $e){\n $error = new LoginError();\n $error->display($e->getMessage());\n }\n \n }", "title": "" }, { "docid": "b3e0fae701032637efbc55438c78037f", "score": "0.6617303", "text": "function All(){\n\t\t // $query = \"SELECT\n\t\t\t// \t\t\tod.*, p.productName, p.image, (p.buyPrice*(100 - s.sales_percent)/100) as priceEach\n\t\t\t// \t\tFROM\n\t\t\t// \t\t\torderdetails od LEFT JOIN orders o ON od.orderNumber = o.orderNumber\n\t\t\t// \t\t\tLEFT JOIN products p ON od.productCode = p.productCode\n\t\t\t// \t\t\tLEFT JOIN sales s ON s.productCode = p.productCode \";\n\t\t\t$query = \"SELECT * FROM order_view\";\n\t\t $data = array();\n\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$data[] = $row;\n\t\t }\n\n\t\t return $data;\n\t\t}", "title": "" }, { "docid": "32b6dfc7c5d194423c7e0a1b23d8fe30", "score": "0.6608474", "text": "public function items($id)\n {\n return $this->qb->query('SELECT * FROM products WHERE id='. $id)->first();\n }", "title": "" }, { "docid": "88cb21b93e6fca90ef0acd18940a2c7a", "score": "0.6591497", "text": "public function getItems()\n {\n $select = $this->_items->select();\n $items = $this->_items->prepareStatementForSqlObject($select);\n $result = $items->execute();\n $resultSet = new ResultSet();\n $resultSet->initialize($result);\n $results = $resultSet->toArray();\n return $results;\n }", "title": "" }, { "docid": "3456f45225a42e995eec2dcc4a53bab6", "score": "0.6589695", "text": "function ierg4210_prod_fetchall() {\n\t// DB manipulation\n\tglobal $db;\n\t$db = ierg4210_DB();\n\t$q = $db->prepare(\"SELECT * FROM products LIMIT 100;\");\n\tif ($q->execute())\n\t\treturn $q->fetchAll();\n}", "title": "" }, { "docid": "74efe1115aea154c4d258272f830f9d7", "score": "0.6575357", "text": "public function fetchAll () { \n return $products=executeQuery(\"SELECT * FROM products\");\n }", "title": "" }, { "docid": "22e50f23d0537f55a45545b0b30bf368", "score": "0.6542421", "text": "public static function getAll(){\n\t\t$sql = \"select * from \".self::$tablename;\n\t\t$query = Executor::doit($sql);\n\t\treturn Model::many($query[0],new UnitData());\n\t}", "title": "" }, { "docid": "0bfe71cb5986d4178db0279c7750948d", "score": "0.6518985", "text": "public function all()\n\t{\n\t\t$ids = [];\n\t\t$items = [];\n\n\t\tif($this->storage->all()){\n\t\t\tforeach ($this->storage->all() as $product) {\n\t\t\t$ids[] = $product['product_id'];\n\t\t\t}\n\t\t} \n\t\t$products = $this->product->find($ids);\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->quantity = $this->get($product)['quantity'];\n\t\t\t// $product->coupon = $this->get($product)['coupon'];\n\t\t\t$items[] = $product;\n\t\t}\n\t\t\n\n\t\treturn $items;\n\t}", "title": "" }, { "docid": "f171c7a97836f1a62b02c99ed70644c6", "score": "0.65097094", "text": "public function findAllProducts();", "title": "" }, { "docid": "76a3cdf3047084041fd36c480754e41c", "score": "0.6481571", "text": "public function get_all()\n {\n return $this->db->get('producto')->result();\n }", "title": "" }, { "docid": "167708811eeac26e382930d851df2814", "score": "0.6476519", "text": "public function getItems()\n {\n $command = Yii::$app->db->createCommand($this->queryString)->bindValues($this->bindValues);\n\n return $command->queryAll();\n }", "title": "" }, { "docid": "c5492f5501f49251338316edc8688d28", "score": "0.64747554", "text": "public function loadAllProducts() {\n\n //Prepared statement\n $this->db->query('SELECT * FROM esb_products WHERE STATUS = 0 AND QUANTITY > 0');\n \n $results = $this->db->resultSet();\n\n return $results;\n\n }", "title": "" }, { "docid": "02a8f67f5a79e649c282ca9f5dde250e", "score": "0.64646995", "text": "public static function GetBudgetItems()\n {\n $items = array();\n $queryResults = RunQuery('SELECT item.id, item.id_str, item.id_disp, item.name, item.descr, \n item.unit, item.quote, item.price, item.cluster, item.category_id, item.sponsored, category.name AS category_name \n FROM item \n LEFT JOIN category ON item.category_id = category.id', array());\n foreach ($queryResults as $row) {\n $item = new BudgetItem();\n $item->id = $row['id'];\n $item->idStr = $row['id_str'];\n $item->refNo = $row['id_disp'];\n $item->name = $row['name'];\n $item->description = $row['descr'];\n $item->unitMeasure = $row['unit'];\n $item->quoteRequired = $row['quote'];\n $item->price = $row['price'];\n $item->cluster = $row['cluster'];\n $item->categoryId = $row['category_id'];\n $item->categoryName = $row['category_name'];\n $item->sponsored = $row['sponsored'];\n array_push($items, $item);\n }\n return $items;\n }", "title": "" }, { "docid": "314af63c0d1ddafb66aff7f3824c4304", "score": "0.64567053", "text": "function get_all_items() {\n $req = 'SELECT `id`, `name`, `price`, `img` FROM items INNER JOIN item_categories ON items.id = item_categories.item_id';\n $stmt = mysqli_prepare(get_db(), $req);\n mysqli_stmt_execute($stmt);\n mysqli_stmt_bind_result($stmt, $id, $name, $price, $img);\n $array = array();\n while (mysqli_stmt_fetch($stmt)) {\n $array[$id] = array('name'=>$name, 'price'=>$price, 'img'=>$img);\n }\n mysqli_stmt_close($stmt);\n return ($array);\n}", "title": "" }, { "docid": "ee23780c96cb123ab209fa73963af5c9", "score": "0.6438011", "text": "function getItems($allStockItems=99999){\r\n $manoSQL = \"SELECT * FROM stock1 LIMIT $allStockItems\";\r\n //$rezultatai-mysql'o objektas\r\n $rezultataiOBJ=mysqli_query(getprisijungimas(), $manoSQL);\r\n if (!$rezultataiOBJ) {\r\n echo \"ERROR: nepavyko rasti Duomenu\" . mysqli_error(getprisijungimas());\r\n return null;\r\n } else {\r\n return $rezultataiOBJ; //graziname my sql objekta\r\n }\r\n }", "title": "" }, { "docid": "d0d42f3854389f1608ad45a52e04386f", "score": "0.642435", "text": "public function getAllItems(){\n $this->_checkUserSet();\n return $this->user->cartItems()->with(['product'])->get()->toArray();\n }", "title": "" }, { "docid": "6f00df84dc9c2c3c3bdb942e7194afc7", "score": "0.64085984", "text": "private function getCartItens() {\n $sql = \"SELECT CI.QUANTITY, CI.ITEM_ID, I.STOCK\n FROM CART_ITEM CI\n INNER JOIN CART C\n ON C.ID = CI.CART_ID\n INNER JOIN ITEM I\n ON CI.ITEM_ID = I.ID\n WHERE C.USER_ID = $1\";\n $bind = [\n \"user_id\" => $this->getParams(\"user_id\")\n ];\n\n return _fetchData($sql, $bind);\n }", "title": "" }, { "docid": "064a4f29f2fcb9c9291fa79dfe633e1a", "score": "0.64054555", "text": "public function getItems()\n {\n return $this->hasMany(Item::className(), ['item_type_id' => 'item_type_id']);\n }", "title": "" }, { "docid": "bce48a5ab4a30931be2851f4136afa7b", "score": "0.64004284", "text": "public function listInventory(){\r\n\t\t\t$dbo = db::getInstance();\r\n\t\t\t$stm = $dbo->prepare('SELECT * FROM \"Inventory\"');\r\n\t\t\t$stm->execute();\r\n\t\t\treturn $stm->fetchAll(PDO::FETCH_ASSOC); \r\n\t\t}", "title": "" }, { "docid": "e9004694b130ceec0582a48984cdb367", "score": "0.6394698", "text": "public function queryAll(){\n\t\t$sql = 'SELECT * FROM prod_section';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "title": "" }, { "docid": "ec41d1d16b790d47b58d84e876715155", "score": "0.63865495", "text": "public function getAll() {\n\t\t$this->db->from('shop');\n $query = $this->db->get();\n return $result = $query->result_array();\n\t}", "title": "" }, { "docid": "e8b981f09f5a9cb1de0ea7e92d0aaf28", "score": "0.6377187", "text": "function getItems($supplier_id) {\n\t\t\n\t\t $this->db->select('i_id, i_name')->from('tbl_po_inv')\n\t\t ->join('tbl_po_inv_item', '`tbl_po_inv`.`po_id` = `tbl_po_inv_item`.`po_inv_id`', 'LEFT')\n\t\t ->join('tbl_item', '`tbl_po_inv_item`.`item_code` = `tbl_item`.`i_id`', 'LEFT')\n\t\t ->where('supplier_code', $supplier_id);\n\t\t $this->db->group_by('i_id');\n\t\t $query = $this->db->get();\n\t\t $items = array();\n\t\t return $query->result();\n\t\t \n\t }", "title": "" }, { "docid": "863f7dc2b0c77366713fa3be0f1ab1db", "score": "0.6369827", "text": "public function getItems(){\n return ['items' => $this->db->select('SELECT * FROM `todo`', [])];\n }", "title": "" }, { "docid": "40c370e83d171f9a51850ba9d93df22d", "score": "0.63601786", "text": "public function getDadosItemAll2() {\n\t\t$query = \"\n\t\t\t\tselect \tnm_item as nome_item,\n\t\t\t\t\t\tcd_tip_evt_suprimt as cd_evento\n\t\t\t\t\tfrom tb_item_suprimt\n\t\t\t\t\twhere cd_itemID = :cd_item\";\n\t\t$stmt = $this->db->prepare($query);\n\t\t$stmt->bindValue(':cd_item', $this->__get('cd_item'));\n\t\t$stmt->execute();\n\n\t\t$registro = $stmt->fetch(\\PDO::FETCH_ASSOC);\t\n\n\t\t$this->__set ('nome_item', $registro['nome_item']);\n\t\t$this->__set ('evento', $registro['cd_evento']);\n\n\t}", "title": "" }, { "docid": "84700926cb08703089a8603e2f1c450b", "score": "0.6359034", "text": "public function fetch_items() {\n $result = $this->process_query(\"SELECT * FROM `items` ORDER BY `name` ASC\");\n $items = array();\n\n while ($row = $result->fetch_assoc()) {\n $items[] = $row['name'];\n }\n\n return $items;\n }", "title": "" }, { "docid": "58ff95ae4ff798ed71547954c19765eb", "score": "0.6359004", "text": "function find_all_items() {\n\tglobal $db; // makes db-connection\n\n\t$sql = \"SELECT * FROM items\";\n\t$result = mysqli_query($db, $sql);\n\tconfirm_result_set($result);\n\treturn $result;\n}", "title": "" }, { "docid": "10e718dd200df0deb69b83c6c272e4e5", "score": "0.63454944", "text": "public function get_all_products() {\n // TODO: Not Tested\n $statement = $this->connection->prepare('SELECT item_id, item_name, image_url, item_description, item_price FROM Products');\n\n if(!$statement->execute())\n return false;\n\n $statement->bind_result($returned_item_id, $returned_item_name, $returned_image_url, $returned_item_description, $returned_item_price);\n\n $array_of_results = array();\n\n while ($statement->fetch()) {\n $item = new Product($returned_item_id,$returned_item_name,$returned_image_url,$returned_item_description,$returned_item_price);\n $array_of_results[] = $item;\n }\n\n if (empty($array_of_results))\n return false;\n else\n return $array_of_results;\n }", "title": "" }, { "docid": "bfc1b08adeeaedf6f0d7bb06a838b58f", "score": "0.6340184", "text": "protected function buildItemsList()\n {\n return $this->entityManager->getRepository('OvescoFacturationBundle:FactureModel')->findAll();\n }", "title": "" }, { "docid": "2bc0cec619f3bce37efcca790dd23908", "score": "0.63265455", "text": "public function getItemsList(){\n return $this->_get(1);\n }", "title": "" }, { "docid": "1eece266b2cb9ce4d8f97d8658948b51", "score": "0.6324196", "text": "public function get_all(){ \n\t\treturn $this->call('GET', '/admin/products.json', array()); \n\t}", "title": "" }, { "docid": "da3f03404603d8d01ab547800226c0d3", "score": "0.631754", "text": "public static function getItems($pallet_id){\n \n return PalletItem::select('pallets.barcode as plt_barcode', 'labels.barcode as label_barcode',\n 'pallet_items.product_code', 'pallet_items.prim_qty',\n 'pallet_items.prim_uom_code', 'pallet_items.id')\n ->join('pallets','pallets.id','pallet_items.pallet_id')\n ->leftJoin('labels','labels.id','pallet_items.label_id')\n ->where('pallet_items.company_id', Auth::user()->company_id)\n ->where('pallet_items.pallet_id', $pallet_id)\n ->where('pallet_items.pallet_status_id', '<>', '9')\n ->get()\n ->toArray();\n }", "title": "" }, { "docid": "a35b18d54bc184f7a367a1d9b5585b83", "score": "0.63173074", "text": "function getContentItemsList()\n\t {\n $items = array();\n $stmt = $this->dbh->prepare('SELECT id FROM itemsTable');\n $stmt->execute();\n while ($row = $stmt->fetch(\\PDO::FETCH_ASSOC)) {\n $items[] = $row['id'];\n }\n\n return ($items);\n\t }", "title": "" }, { "docid": "3acf392312c67432d218d20c2633382a", "score": "0.631304", "text": "function newItems(){\n\t\t\t\t$sql = 'SELECT *,product_type.type_name\n\t\t\t\tFROM product\n\t\t\t\tJOIN product_type ON product_type.product_type_id = product.product_type_id \n\t\t\t\tORDER BY product.product_id DESC\n\t\t\t\tLIMIT 5' \n\t\t\t\t;\n\t\t\t\t$Q = $this-> db-> query($sql);\n\t\t\t\tforeach ($Q-> result_array() as $row){\n\t\t\t\t}\n\t\t\t\treturn $Q;\n\t\t\t\t}", "title": "" }, { "docid": "69938e8c3b9469b646162fda63de22d9", "score": "0.6310556", "text": "function getShoppingList(PDO $db): array\n{\n $query = $db->prepare(\"SELECT `name` FROM `items`\");\n $query->execute();\n $items = $query->fetchAll();\n return $items;\n}", "title": "" }, { "docid": "cadf7477ec5edc377b724e0a39a642ba", "score": "0.63086534", "text": "public function items();", "title": "" }, { "docid": "cadf7477ec5edc377b724e0a39a642ba", "score": "0.63086534", "text": "public function items();", "title": "" }, { "docid": "ad8b54240a2ae7a4f1253f606aa82b40", "score": "0.63048303", "text": "function getOrderItems()\n {\n $query = \"SELECT po.OrderId, p.Name, po.Quantity, p.Price FROM $this->table AS po JOIN products AS p ON po.productId= p.Id WHERE po.orderId=:orderid_IN\";\n\n $stmt = $this->conn->prepare($query);\n //bind functions\n $stmt->bindParam(':orderid_IN', $this->OrderId);\n $stmt->execute();\n $count = $stmt->rowCount();\n if ($count == 0) {\n $error = new stdClass();\n $error->message = \"No such order exist\";\n $error->code = \"0010\";\n print_r(json_encode($error));\n die();\n } else {\n while ($data = $stmt->fetch(PDO::FETCH_ASSOC)) {\n\n echo \"<table>\";\n echo \"<tr><td>Order ID:</td><td>$data[OrderId]</td></tr>\";\n echo \"<tr><td>Product:</td><td>$data[Name]</td></tr>\";\n echo \"<tr><td>Quantity</td><td>$data[Quantity]</td></tr>\";\n echo \"<tr><td>Price</td><td>$data[Price]</td></tr>\";\n echo \"</table>\";\n }\n }\n }", "title": "" }, { "docid": "39760a59c9ed12ff2f5ea78ec8e5da90", "score": "0.6301775", "text": "public function getAllItems()\n {\n $sql = 'SELECT *\n FROM pages\n ORDER BY id ASC';\n $pages = $this->dbConnect($sql);\n return $pages;\n }", "title": "" }, { "docid": "46492a56d94e1fb9fc96b8d09013fbf0", "score": "0.6301559", "text": "public function getDadosItemAll3() {\n\t\t$query = \"\n\t\t\t\tselect \tcd_itemID as cod_item,\n\t\t\t\t\t\tnm_item as nome_item,\n\t\t\t\t\t\tcd_tip_evt_suprimt as cod_evento\n\t\t\t\t\tfrom tb_item_suprimt\n\t\t\t\t\torder by nm_item\";\n\t\t$stmt = $this->db->prepare($query);\n\t\t$stmt->execute();\n\n\t\treturn $stmt->fetchAll(\\PDO::FETCH_ASSOC);\t\n\n\t}", "title": "" }, { "docid": "7844010e4dd132e0ca1ce7317e588789", "score": "0.6301424", "text": "public static function get_items()\n {\n $m_query_string = \"SELECT * \";\n $m_query_string .= \"FROM items \";\n $m_query_string .= \"ORDER BY item_name DESC \";\n return $m_query_string;\n }", "title": "" }, { "docid": "c5d50c8be8593869d01057aca7a71dfb", "score": "0.62971145", "text": "public function getAll()\n\t{\n\t\t$query = $this->db->get('products', 10);\n return $query->result_array();\n\t}", "title": "" }, { "docid": "5b4413d995da7ec08a0b38b738083c27", "score": "0.628596", "text": "public function getProducts()\n {\n try {\n $stmt = $this->_conn->prepare(\n 'SELECT '\n .'product.sq_product, product.sq_product_type, sq_status_product, ds_product, nu_value, nu_quantity, nu_production, st_foldable, im_product_image '\n .'FROM fulo.product '\n .'JOIN fulo.product_type USING (sq_product_type) '\n .'JOIN fulo.product_image USING (sq_product)'\n );\n\n $stmt->execute();\n\n return $stmt->fetchAll(PDO::FETCH_OBJ);\n } catch (Exception $ex) {\n throw $ex;\n }\n }", "title": "" }, { "docid": "268647e7facfdf46bfa47612517355ab", "score": "0.6277592", "text": "public function getAll()\n {\n $products = $this->productModel->getAll();\n foreach ($products as $product) {\n $data[] = array(\n 'id' => $product['id'],\n 'idcategory' => $product['idcategory'],\n 'name' => $product['name'],\n 'description' => $product['description'],\n 'price' => $product['price'],\n 'dcto' => $product['dcto'],\n 'picture' => $product['dcto'],\n 'state' => $product['state'],\n\n 'priceView' => '$' . number_format($product['price']),\n 'stateView' => ($product['state'] == 1) ? 'Activo' : 'Inactivo',\n );\n }\n\n\n $json = array('results' => $data);\n return $this->respond($json);\n }", "title": "" }, { "docid": "7252b0c3b9be85e3dbd5bc96e489c00f", "score": "0.62695074", "text": "function getProductBasics() {\n $db = acmeConnect();\n $sql = 'SELECT invName, invId FROM inventory ORDER BY invName ASC';\n $stmt = $db->prepare($sql);\n $stmt->execute();\n $products = $stmt->fetchAll(PDO::FETCH_NAMED);\n $stmt->closeCursor();\n return $products;\n}", "title": "" }, { "docid": "4cb46dfcc4f8e11b97ff83a0972210b3", "score": "0.6266639", "text": "public function getItems(): array;", "title": "" }, { "docid": "ad680434ea95e4229b6dae761d240369", "score": "0.6253096", "text": "public function list()\n {\n $query = \"Select * from products\";\n\n // Preparacao da conexao\n $stmt = $this->db->prepare ($query);\n\n // Execucao da conexao\n $stmt->execute();\n\n // Retorna os produtos da tabela atraves de um Array Associativo\n return $stmt->fetchAll (\\PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "34a33c6764769edf216ce99312b66ea6", "score": "0.62500066", "text": "public function getExchangedGoodsList(){\n return $this->_get(5);\n }", "title": "" }, { "docid": "2e5e14bd3171b9581472eecd1f2dfa80", "score": "0.6247346", "text": "public function getAll() {\n // 1. abro la conexión con MySQL \n $db = $this->createConection();\n\n // 2. enviamos la consulta (3 pasos)\n $sentencia = $db->prepare(\"SELECT * FROM productos\"); // prepara la consulta\n $sentencia->execute(); // ejecuta\n $productos = $sentencia->fetchAll(PDO::FETCH_OBJ); // obtiene la respuesta\n\n return $productos;\n }", "title": "" }, { "docid": "63d36110e7631940679e4cba32f8f096", "score": "0.6244903", "text": "public function get_items()\n\t{\n\t\tif (!$this->ion_auth->logged_in())\n\t\t{\n\t\t\t// redirect them to the login page\n\t\t\tredirect('auth/login', 'refresh');\n\t\t}\n\n\t\t$id=$this->input->post('item_id');\n\n\n\t\t$data['items']=$this->Purchase_model->getItemById($id);\n\t\t$data['tax']=$this->Quotation_model->getTaxs();\n\t\t/*echo \"<pre>\";\n\t\tprint_r($data);*/\n\t\techo json_encode($data);\n\n\t}", "title": "" }, { "docid": "358a29b633e687693a8f45276009c3da", "score": "0.6242234", "text": "public function getProducts()\n {\n $conn = Connection::getConn();\n //armazenando o resultado na variavel stmt\n $stmt = $conn -> prepare('SELECT * FROM tbProduto');\n $stmt -> execute();\n //criando laco para extrair dados de tale sql \n\n $fetch = array();\n //enquanto houver dados crie e preencha campos na classe produtos\n while($data = $stmt -> fetchObject('Produtos')){\n $fetch[] = $data;\n }\n return $fetch;\n\n }", "title": "" }, { "docid": "0d3f962c6538b7f78da4be00e257dbb9", "score": "0.6237998", "text": "public function all()\n\t{\n\t\t$items = Item::get();\n\t\t$arr_items = array();\n\n\t\tforeach ($items as $item) \n\t\t{\n\t\t\tarray_push($arr_items, array('id' => $item->id, 'nombre' => $item->nombre));\n\t\t}\n\n\t\treturn $arr_items;\n\n\t}", "title": "" }, { "docid": "adc13ce6c622e24b50f68dc079a39be4", "score": "0.62304014", "text": "public function getAllOrderItemsList(){\n $select = ['i.model_sn', 'i.nums', 'i.order_id', 'o.customer_id', 'i.product_id'];\n $allQuery = (new Query)->select($select)\n ->from('meet_order AS o')\n ->leftJoin('meet_order_items as i', 'o.order_id=i.order_id')\n ->where(['i.disabled' => 'false'])\n ->all();\n $productQuery = (new Query)->select(['product_id', 'size_id', 'cost_price', 'color_id'])\n ->from('meet_product')\n ->indexBy('product_id')\n ->all();\n $customerQuery = (new Query)->select(['customer_id', 'code', 'name'])\n ->from('meet_customer')\n ->indexBy('customer_id')\n ->all();\n $sizeQuery = (new Query)->select(['size_id', 'size_no'])\n ->from('meet_size')\n ->indexBy('size_id')\n ->all();\n $colorQuery = (new Query)->select(['color_id', 'color_no'])\n ->from('meet_color')\n ->indexBy('color_id')\n ->all();\n $result = [];\n foreach ($allQuery as $val) {\n $arr = [];\n $arr['model_sn'] = $val['model_sn'];\n $arr['nums'] = $val['nums'];\n $arr['order_id'] = $val['order_id'];\n $arr['size_no'] = $sizeQuery[$productQuery[$val['product_id']]['size_id']]['size_no'];\n try {\n\n $arr['code'] = $customerQuery[$val['customer_id']]['code'];\n $arr['name'] = $customerQuery[$val['customer_id']]['name'];\n } catch (\\Exception $e) {\n var_dump($val['customer_id']);\n }\n $arr['cost_price'] = $productQuery[$val['product_id']]['cost_price'];\n $arr['color_no'] = $colorQuery[$productQuery[$val['product_id']]['color_id']]['color_no'];\n $result[] = $arr;\n }\n return $result;\n }", "title": "" }, { "docid": "a0b69e4d44ff30dd3d0eed38564630bf", "score": "0.62271655", "text": "public function queryAll(){\n\t\t$sql = 'SELECT * FROM proposta_bolsa';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "title": "" }, { "docid": "aaeecf71f7c43ac54ccc34d5ac10030c", "score": "0.62231934", "text": "function getShelfitemByBook()\r\n {\r\n $query = \"SELECT shelf.book_id, books.book_id, books.book_image, books.book_author, books.book_title, books.book_file \r\n from books, shelf where shelf.book_id=books.book_id\";\r\n \r\n \r\n \r\n $bookResult = $this->getDBResult($query);\r\n return $bookResult;\r\n // }\r\n \r\n // $params = array(\r\n // array(\r\n // \"param_type\" => \"i\",\r\n // \"param_value\" => $ip_add\r\n // )\r\n\r\n // );\r\n \r\n\r\n \r\n // $cartResult = $this->getDBResult($query,$params);\r\n\r\n // return $cartResult;\r\n }", "title": "" }, { "docid": "c13f9b4240038e05e1b93fc3e32f8e3c", "score": "0.62157935", "text": "public static function getItems($userId) {\n\t\t$sql = \"SELECT * FROM item WHERE user_id=\".$userId;\n $dbh = ConnectionManager::getConnection();\n\t\t$sth = $dbh->prepare($sql);\n\t\t$sth->execute();\n\t\treturn $sth->fetchAll(PDO::FETCH_ASSOC);\n\t}", "title": "" }, { "docid": "7be72b4e04aac6ddf8c19a21d740c05f", "score": "0.6215004", "text": "public function getList(){\n\n\t\t$sql = \"SELECT prod_id AS id, prod_amt amt, prod_desc name\n\t\t\t\tFROM Product_Master WHERE is_centriq = '1' and data_id = 1\";\n\t\t$this->getAdapter()->setFetchMode(Zend_Db::FETCH_OBJ);\n\t\treturn $this->getAdapter()->fetchAll($sql);\n\t}", "title": "" }, { "docid": "a57f20e4c65fd7518588af05b82d7e49", "score": "0.6214008", "text": "public function index()\n {\n $items = Item::with('itemDetails')->get();\n return $items;\n }", "title": "" }, { "docid": "2722ea8aa8ade830093291f44529d1e5", "score": "0.62046695", "text": "public function getItemsList(){\n return $this->_get(3);\n }", "title": "" }, { "docid": "69fbb179470f1ef61280e6a2b6e6eae6", "score": "0.6202007", "text": "function viewBuyList(){\n $sql = \"SELECT p.ProductName, o.OrderDate, op.quantity, c.CustName FROM product AS p, order_product AS op, customer AS c, orders as o WHERE op.ProductID = p.ProductID AND op.OrderID = o.OrderID AND o.CustID = c.CustID AND p.SpID = '$this->spid';\";\n return DB::run($sql);\n }", "title": "" }, { "docid": "611c1211c1adb4a37e0daf68a91e69f5", "score": "0.6198894", "text": "function productos()\r\n \t{\r\n \t\tglobal $PDO;\r\n\t\t$sql = \"SELECT * from producto\";\r\n\t\t$statement = $PDO->PREPARE($sql);\r\n\t\t$statement->EXECUTE();\r\n\t\t$results = $statement-> fetchAll();\r\n\t\treturn $results;\r\n \t}", "title": "" } ]
44aa8ac9f2a76f5701506cc1ab1766aa
Lists categorized Videos models.
[ { "docid": "7b8f01f86bd2a98402d218c802dca97c", "score": "0.0", "text": "public function actionIndex($slug, $page = 1, $sort = '')\n {\n $this->trigger(self::EVENT_BEFORE_CATEGORY_SHOW);\n\n $data['slug'] = $slug;\n $data['sort'] = $sort;\n $data['page'] = (int) $page;\n $data['route'] = '/' . $this->getRoute();\n\n \t// Ищем категорию\n $data['category'] = CategoryFinder::findBySlug($slug);//$categriesRepository->findBySlug($slug);\n\n\t\tif (empty($data['category'])) {\n\t\t\tthrow new NotFoundHttpException('The requested page does not exist.');\n\t\t}\n\n $videoFinder = new VideoFinder();\n $data['videos'] = $videoFinder->getVideosFromCategory($data['category'], $page);\n\n $pagination = new Pagination([\n 'totalCount' => $videoFinder->totalCount(),\n 'defaultPageSize' => Module::getInstance()->settings->get('items_per_page', 20),\n 'pageSize' => Module::getInstance()->settings->get('items_per_page', 20),\n 'route' => $data['route'],\n 'forcePageParam' => false,\n ]);\n\n $settings = Yii::$app->settings->getAll();\n $settings['videos'] = Module::getInstance()->settings->getAll();\n\n Event::on(self::class, self::EVENT_AFTER_CATEGORY_SHOW, [\\ytubes\\videos\\events\\UpdateCountersEvent::class, 'onShowThumbs'], $data);\n\n $this->trigger(self::EVENT_AFTER_CATEGORY_SHOW);\n\n return $this->render('category_videos', [\n 'data' => $data,\n 'settings' => $settings,\n 'pagination' => $pagination,\n ]);\n }", "title": "" } ]
[ { "docid": "d66b315f04147a7568009bdab81cf6a4", "score": "0.71210015", "text": "public function index()\n {\n $categories = $this->videoCategoryRepository->all();\n return view('admin.videos.categories.index')->with('video_categories', $categories);\n }", "title": "" }, { "docid": "c6057216d270eeb81531d2e126f09db5", "score": "0.6996859", "text": "public function categories()\r\n { \r\n //-------------select class sorted--------------- \r\n $class_video = $this->classVideo();\r\n for($i=0;$i<count($class_video);$i++){ \r\n //select top video resource\r\n $map_top['v_cid'] = $class_video[$i]['classid'];\r\n $map_top['top'] = 1;\r\n $field_top = 'concat(\\''.PATH_IMG.'\\',v_firstimgurl)firstImgUrl,concat(\\''.PATH_IMG.'\\',v_secondimgurl)secondImgUrl,v_title as title,v_describe as subname,v_id as id,playnum,from_unixtime(v_addtime,\\'%Y-%m-%d\\')addTime,count(*)comments';\r\n $join = 'left join vr_comment vmm on vr_video.v_id = vmm.resourceid';\r\n $class_video[$i]['topVideo'] = $this->VideoObj\r\n ->field($field_top)\r\n ->where($map_top)\r\n ->join($join)\r\n ->find();\r\n //select top video resource end\r\n //select list video resource\r\n $map_list['v_cid'] = $class_video[$i]['classid'];\r\n $map_list['top'] = 0;\r\n $field = 'concat(\\''.PATH_IMG.'\\',v_firstimgurl)firstImgUrl,concat(\\''.PATH_IMG.'\\',v_secondimgurl)secondImgUrl,v_title as title,v_describe as subname,v_id as id,playnum,from_unixtime(v_addtime,\\'%Y-%m-%d\\')addTime,count(*)comments';\r\n $join = \"left join vr_comment vmm on vr_video.v_id = vmm.resourceid\";\r\n $class_video[$i]['videos'] = $this->VideoObj\r\n ->where($map_list)\r\n ->field($field_top)\r\n ->join($join)\r\n ->select();\r\n //select top video resource end\r\n }\r\n $categories = $class_video;\r\n return $categories;\r\n }", "title": "" }, { "docid": "11a868e8f6cb6a1d4527dbe2be42ab9c", "score": "0.66133237", "text": "public function videos()\n {\n return $this->hasManythrough(Video::class, Channel::class);\n }", "title": "" }, { "docid": "77af7f401ac82c0d8c10fc77cbc524f9", "score": "0.6599649", "text": "public function videos()\n {\n return $this->morphedByMany(Video::class, 'taggable');\n }", "title": "" }, { "docid": "ee8e260990917fc1cf0f8cbbbabab28f", "score": "0.658036", "text": "public function videos()\n {\n return $this->hasMany('App\\Models\\VideoBookVideo', 'e_video_book_id')->where('type',Config::get('constant.SERIES_VIDEO'));\n }", "title": "" }, { "docid": "5bf71127b44c030c5d916e2fe869d86b", "score": "0.6490668", "text": "public function allVideos()\n {\n return $this->hasMany('App\\Models\\VideoBookVideo', 'e_video_book_id');\n }", "title": "" }, { "docid": "f6f4a03a57132a6770e7c81f020c5384", "score": "0.6487746", "text": "protected static function getCourseVideosWithPagination(){\n $result = static::join('course_categories', 'course_categories.id', '=', 'course_videos.course_category_id')\n ->join('course_sub_categories', 'course_sub_categories.id', '=', 'course_videos.course_sub_category_id')\n ->join('course_courses', 'course_courses.id', '=', 'course_videos.course_id')\n ->join('admins','admins.id','=', 'course_courses.admin_id')\n ->where('course_sub_categories.created_for', 1);\n if(Auth::guard('admin')->user()->hasRole('sub-admin')){\n $result->where('course_courses.admin_id', Auth::guard('admin')->user()->id);\n }\n return $result->select('course_videos.id', 'course_videos.name', 'course_categories.name as category', 'course_sub_categories.name as subcategory', 'course_courses.name as course','course_courses.admin_id','admins.name as admin')\n ->groupBy('course_videos.id')\n ->paginate();\n }", "title": "" }, { "docid": "4118194127f6a2f41a42fc953566488b", "score": "0.6464443", "text": "public function listVideo()\n {\n return view('Video::list');\n }", "title": "" }, { "docid": "f604def393976dd103c92890528a973e", "score": "0.6419789", "text": "public function index()\n {\n $videos = Video::all();\n return $this->showAll($videos);\n }", "title": "" }, { "docid": "1907e6ff3f099820cb9bcf595d9bd593", "score": "0.6405905", "text": "public function videos()\n {\n return $this->belongsToMany(Video::class);\n }", "title": "" }, { "docid": "2973df022ab549ca1e9de2055f1ed5d8", "score": "0.63793874", "text": "public function index($id=null)\n {\n //$videos = Video::latest()->paginate(50);\n\t $categories = VideoCategory::all()->pluck('title', 'id');\n\n if($id){\n $by_category = VideoCategory::find($id);\n //$by_category = VideoCategory::whereIn('id', array($id) )->paginate(50);\n\n //dd($by_category);\n return view('videos.index',compact('by_category','categories','id'));\n }else{\n $videos = Video::orderBy('ordering', 'asc')->paginate(50);\n return view('videos.index',compact('videos','categories','id'));\n } \n }", "title": "" }, { "docid": "ebab45cfc81072c4ced0f89e71d95a59", "score": "0.63659084", "text": "public function videos()\n {\n return view('videos.index');\n }", "title": "" }, { "docid": "12b14f0e3bfb0fc443c71b4723d209c8", "score": "0.636167", "text": "public function listIndexVideos()\n {\n $shown_on_index = 4;\n\n return $this->orderBy('created_at', 'desc')\n ->take($shown_on_index)\n ->get();\n }", "title": "" }, { "docid": "c570cc3012c409793f7b7f24d5b7129f", "score": "0.6360552", "text": "public function actionIndex()\n {\n// $videos = [];\n// if (file_exists($folderPath)) {\n// $dh = opendir($folderPath);\n// while (false !== ($filename = readdir($dh))) {\n// $ext = pathinfo($filename, PATHINFO_EXTENSION);\n// if ($filename != '.' && $filename != '..') {\n// $videos[] = '/'.self::FOLDER_NAME.'/'.$filename;\n// }\n// }\n// }\n $videos = \\app\\models\\TrainingVideos::find()->all();\n return $this->render('index', ['videos' => $videos]);\n }", "title": "" }, { "docid": "c08e2dbe2478c1cfcd3bb019e3816bb7", "score": "0.6344937", "text": "public function index()\n {\n $allVideos = important_video::all();\n\n return view('admin..videos.videos', compact('allVideos'));\n }", "title": "" }, { "docid": "0ee6d4fc616b360e702e329dda1ed276", "score": "0.63361305", "text": "public function show(Video $video)\n {\n //$categories = $video->categories()->get();\n //$genres = $video->genres()->get();\n $categories = VideoCategory::all()->pluck('title', 'id'); \n $genres = Genre::all()->pluck('title', 'id');\n $current_categories = $video->categories()->get();\n $current_genres = $video->genres()->get();\n $classifications = Video::classifications();\n return view('videos.show',compact('video','categories','genres','current_categories','current_genres','classifications'));\n\n }", "title": "" }, { "docid": "15f920f6524fb17d5a0ed8691c6b8375", "score": "0.63201123", "text": "public function actionVideos() \n {\n $query = VideoPost::find()\n ->where([\n 'is_public' => 1,\n ]);\n $query->orderBy(['created_at' => SORT_DESC]);\n\n $videosDataProvider = new ActiveDataProvider([\n 'query' => $query,\n 'pagination' => [\n 'pageSize' => 10,\n ],\n ]);\n\n return $this->render('@frontend/views/site/index', [\n 'templateType' => 'col2',\n 'title' => 'Dynamomania.com | Видео',\n 'columnFirst' => [\n 'content' => [\n 'view' => '@frontend/views/site/videos',\n 'data' => compact('videosDataProvider'),\n ],\n ],\n 'columnSecond' => [ \n 'short_news' => SiteBlock::getShortNews(),\n ],\n ]);\n }", "title": "" }, { "docid": "cc1f288324d5ed936129958a15d6bad5", "score": "0.6307274", "text": "public function videos() {\n return $this->belongsToMany ( Video::class, 'video_tag', 'tag_id', 'video_id' );\n }", "title": "" }, { "docid": "99b6d6f6e9f2f6571ae8824695367f22", "score": "0.6287192", "text": "public function videos() {\n return $this->hasMany(Video::class);\n }", "title": "" }, { "docid": "e868ccaf587f64dd5e7476b133f399d9", "score": "0.6283787", "text": "function getVideos($limit = 5, $listid = \"\"){\r\n global $mainframe, $db;\r\n $where = \" \"; \r\n if($listid != \"\"){ $where .= \" AND id in($listid) \"; }\r\n \r\n $query = \"SELECT * FROM \" . TBL_CATEGORIES \r\n .\" WHERE status = 1 AND `scope` ='videos' \"\r\n .\" ORDER BY ordering ASC\";\r\n $query_command = $db->createCommand($query);\r\n $items = $query_command->queryAll();\r\n \r\n $arr_new = array();\r\n for($i=0;$i<count($items);$i++){\r\n $item = $items[$i];\r\n $params = array(\"view\"=> \"category\",\"id\" =>$item['id'], \"alias\"=>$item['alias']);\r\n $item['link'] = Router::buildLink('videos', $params); \r\n $item['videos'] = $this->getVideoCategoy($item['id'],0, $limit);\r\n $arr_new[$item['id']] = $item;\r\n }\r\n $items = $arr_new;\r\n \r\n if($listid != \"\"){\r\n $listid = explode(\",\", $listid);\r\n $arr_new = array();\r\n foreach ($listid as $k=>$id){\r\n if(isset($items[$id]))\r\n $arr_new[$id] = $items[$id];\r\n }\r\n $items = $arr_new;\r\n } \r\n return $items;\r\n }", "title": "" }, { "docid": "99c281cad4dbf7584a28a77cc4307efd", "score": "0.628044", "text": "public function actionIndex()\n {\n $searchModel = new VideosSearch();\n\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n\n ]);\n }", "title": "" }, { "docid": "0028fb3db827cf0f4202f689cf1b3d94", "score": "0.6270029", "text": "public function videos() {\n return $this->belongsToMany('App\\Models\\Video', 'yvideo_playlist');\n }", "title": "" }, { "docid": "41388ed881258097af6ec31b251851b0", "score": "0.6244953", "text": "public function Videos()\n {\n\n \n $this->check_login();\n $data['res'] = $this->Videos_model->get_video_list();\n\n $this->load->view('admin/includes/header');\n\n $this->load->view('admin/includes/sidebar');\n\n $this->load->view('admin/view_video_list',$data);\n\n $this->load->view('admin/includes/footer');\n }", "title": "" }, { "docid": "b72907a1be7837d5eddf6eef44c5d61e", "score": "0.6224507", "text": "public function index()\n {\n $videos = Videos::paginate(15);\n\n return VideosResource::collection($videos);\n }", "title": "" }, { "docid": "414092afc85a9a01f956174df1e9501f", "score": "0.62196463", "text": "public function index()\n\t{\n\t\t// Selected year set in filters.php -> App::before()\n\t\t$year = Session::get('year', false);\n\n\t\t$video_query = Video::with('vid_division',\n\t\t 'school', 'students', 'teacher', 'awards')\n\t\t\t\t\t\t\t->orderBy('year', 'desc')\n\t\t\t\t\t\t\t->orderBy('teacher_id');\n\n\t\tif($year) {\n\t\t\t$video_query = $video_query->where('year', $year);\n\t\t}\n\n\t\t$videos = $video_query->get();\n\n\t\tView::share('title', 'Videos');\n\t\treturn View::make('videos.index', compact('videos'));\n\t}", "title": "" }, { "docid": "9c7a5b46fd02cc1fd57750e05529b502", "score": "0.618735", "text": "public function index()\n {\n $videos = Video::all();\n return view ('videos', compact('videos'));\n }", "title": "" }, { "docid": "0b3383bd915e924aef862ebaa0b24dc7", "score": "0.6178831", "text": "public function getVideos()\n\t{\n\t\t$this->import('BackendUser', 'User');\n\n\t\t$groups = array();\n\t\n\t\t$objVideos = $this->Database->execute(\"SELECT v.id AS videoid, v.videotitle, a.title AS archivetitle, a.allowedUserGroups FROM tl_videobox v LEFT JOIN tl_videobox_archive a ON (a.id = v.pid) ORDER BY a.title\");\n\n\t\t// build groups\n\t\t\n \t\twhile($objVideos->next()) {\n\t\t\t// show everything to admins\n\t\t\tif($this->User->isAdmin) {\n\t\t\t\t$groups[$objVideos->archivetitle][$objVideos->videoid] = $objVideos->videotitle . ' [ID: ' . $objVideos->videoid . ']';\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// if there is no usergroup allowed at all (empty blob)\n\t\t\tif(strlen($objVideos->allowedUserGroups) == 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// check whether the user is allowed to see the video\n\t\t\tif(count(array_intersect($this->User->groups, deserialize($objVideos->allowedUserGroups)))) {\n\t\t\t\t$groups[$objVideos->archivetitle][$objVideos->videoid] = $objVideos->videotitle . ' [ID: ' . $objVideos->videoid . ']';\n\t\t\t}\n\t\t}\n\t\treturn $groups; \n\t}", "title": "" }, { "docid": "d57f1bfc3c439be1ea8653131a018cc9", "score": "0.6168804", "text": "public function video_cate ()\n {\n \treturn $this->belongsTo('App\\VideoCategory');\n }", "title": "" }, { "docid": "7eb36183d79c2dccd0de53e91f3b5fec", "score": "0.6163485", "text": "public function getVideos(){\n return $this->videos;\n }", "title": "" }, { "docid": "d276e2ddc5cf3d5261cab2a5f59a75e2", "score": "0.61400795", "text": "public function index(Request $request)\n {\n \n $request->flash();\n\n $inputsArray = [ \n 'video_translations.videos_title' => [ 'like', request('title') ],\n 'video_translations.videos_desc' => [ 'like', request('desc') ],\n 'videos.videos_status' => [ '=', request('status') ],\n 'videos.category_id' => [ '=', request('category_id') ]\n ];\n\n $query = Video::join('video_translations', 'videos.id', 'video_translations.video_id')\n ->groupBy('videos.id');\n \n $searchQuery = $this->handleSearch($query, $inputsArray);\n\n $videos = $searchQuery->paginate(env('perPage'));\n\n $categories = Category::all();\n\n return view('dashboard.videos.index', compact('videos', 'categories'));\n }", "title": "" }, { "docid": "cf43496f53d8b6492a81cc0bc128bdb5", "score": "0.6128655", "text": "public function index()\n {\n $videos = Video::all()->take(5);\n return $videos;\n }", "title": "" }, { "docid": "0906be3d8aa0de997161a1e3c46995f7", "score": "0.6120137", "text": "public function index()\n {\n $videos = Video::all();\n return view('videos.index',compact('videos'));\n }", "title": "" }, { "docid": "4dbac8f522bb46cac566aeabf6f8ce99", "score": "0.6117364", "text": "public function index()\n {\n $videos = Video::all();\n return view('admin.video.index',compact('videos'));\n }", "title": "" }, { "docid": "5a6e617cc6517a9bc68366410a459a61", "score": "0.61132056", "text": "public function getVideos()\n {\n return $this->videos;\n }", "title": "" }, { "docid": "55b8242d99c8ea0055c98b4a7cc5eaea", "score": "0.6111431", "text": "public function index()\n {\n //Todo: Paginate Videos\n $videos = Video::all();\n return view('videos.index', compact('videos'));\n\n }", "title": "" }, { "docid": "8df71ea059c8db3f466e997073a0f0e7", "score": "0.60993093", "text": "public function category()\n {\n return $this->belongsTo('App\\Models\\VideoCategory', 'video_category_id');\n }", "title": "" }, { "docid": "32b8e6ae9132771a8cbf059865d18535", "score": "0.6072421", "text": "public function getCategoryVideo()\n {\n return $this->category_video;\n }", "title": "" }, { "docid": "d20b5fe2edd127b2eb2158ffb85262a1", "score": "0.60641414", "text": "public function actionIndex()\n {\n $searchModel = new MvVideoSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "3f7075546a7cee6757166802bb7f5894", "score": "0.6062625", "text": "public function getList()\n\t{\n\t\t$req = $this->_db->query('SELECT * from video');\n\t\twhile($donnees = $req->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$videos[] = new video($donnees);\n\t\t}\n\t\tif(isset($videos))\n\t\t{\n\t\t\treturn $videos;\n\t\t}\n\t\t\n\t\treturn 0;\n\t}", "title": "" }, { "docid": "3ad585d814bf0f6c8b7380cf57f38559", "score": "0.60601133", "text": "public function getList()\n {\n return ArrayHelper::map(Video::find()->all(), 'vid_id', 'vid_name');\n }", "title": "" }, { "docid": "74616d393787946ac433c7f44cf1e0fc", "score": "0.6054373", "text": "public function index()\n {\n $videos = Video::paginate(PAGINATION_COUNT);\n return view('dashboard.videos.index',compact('videos'));\n }", "title": "" }, { "docid": "408d2ba9562157a3f9bd0d8c0dd3cd57", "score": "0.6030906", "text": "public function myVideos()\n {\n return $this->hasMany(Video::class);\n }", "title": "" }, { "docid": "cbe2e83b73f01ab11b20ff9119ff0773", "score": "0.6028084", "text": "public function videoCategory(){\n return $this->belongsTo(CourseCategory::class, 'course_category_id');\n }", "title": "" }, { "docid": "01ef5a989b72eba701c69d54b5624c33", "score": "0.6019822", "text": "public function index() {\n $video = Video::take(100)->sortByDesc(\"updated_at\");\n\n return $video;\n }", "title": "" }, { "docid": "5c4629a3c314803944371b5c5c7e8b11", "score": "0.6012563", "text": "public function index(){\n return view('admin.video.list');\n }", "title": "" }, { "docid": "29503d45b7afcb79672e8acb43e9a049", "score": "0.60124254", "text": "public function videos(): MorphToMany\n {\n return $this->morphedByMany(Video::class, 'taggable');\n }", "title": "" }, { "docid": "544f6a5a54f15bff597b8d60c5ac688d", "score": "0.60107535", "text": "public function introVideos()\n {\n return $this->hasMany('App\\Models\\VideoBookVideo', 'e_video_book_id')->where('type',Config::get('constant.INTRO_VIDEO'));\n }", "title": "" }, { "docid": "b1e3c34fcca3470815504244415fa21b", "score": "0.6010612", "text": "public function index()\n\t{\n\t\t//\n\t\t\t$videos = Video::get();\n\t\t\treturn View::make('videos.index')\n\t\t\t\t\t\t->with('active', 0)\n\t\t\t\t\t\t->with('videos', $videos);\n\t}", "title": "" }, { "docid": "a903b4edf2b277bd6c0fe57cf2f451d2", "score": "0.6002578", "text": "public static function byCategory( $cat_id ){\n\t\t$videos = array();\n\n\t\t$cat = Category::with('videos')->find($cat_id);\n\n\t\t$videos = $cat->videos;\n\n\t\treturn $videos;\n\t}", "title": "" }, { "docid": "d4a060be172b4482ad54c40b32b9f578", "score": "0.59628135", "text": "public function index()\n {\n $videos = VideoGallery::latest('id')->paginate(5);\n return view('cms.archive.video.index',compact('videos'));\n }", "title": "" }, { "docid": "207e3258416108de93c5d74e8867d4a7", "score": "0.5935119", "text": "public function getListOfVideos()\n {\n\n $videos = $this->call('vimeo.channels.getVideos',\n array(\n 'channel_id' => $this->channelId,\n 'user_id' => $this->userId,\n )\n );\n\n return $videos;\n\n }", "title": "" }, { "docid": "80bf3e6fd9a55dfcc73e2ce17f08af6d", "score": "0.59283817", "text": "public function index()\n {\n // Get user info (if logged)\n $userInfo = Auth0::jwtUser();\n $user = null;\n if ($userInfo !== null) {\n $user = User::where('sub_auth0', $userInfo->sub)->first();\n }\n\n $categories = Category::with('videos')->orderBy('order', 'asc')->get();\n $categoriesArray = [];\n foreach ($categories as $category) {\n array_push($categoriesArray, self::getCategoryJsonWithVideos($category, $user));\n }\n return response()->json(['categories'=> $categoriesArray], 200);\n }", "title": "" }, { "docid": "dcb5020795b1d62282403d02e9518e64", "score": "0.59080374", "text": "public function index()\n {\n //\n $videos = DB::table('videos')\n ->join('courses', 'courses.id', '=', 'videos.course_id')\n ->select('courses.title', 'videos.id', 'videos.path', 'videos.description')\n ->paginate(6);\n return view('videoss.index', compact('videos'));\n }", "title": "" }, { "docid": "fa3bf271ab4e45f345eb82f0636c7698", "score": "0.5887256", "text": "public function index()\n {\n $categories = Category::with('media')->get();\n\n return view('categories', compact('categories'));\n }", "title": "" }, { "docid": "e089e5187a7dcf216006e063831cf591", "score": "0.58858895", "text": "public function index()\n {\n $video = Video::orderByDesc('created_at')->paginate(20);\n return view('admin_area.video.index', compact('video'));\n }", "title": "" }, { "docid": "1140f39ac93177fdbdd6f58101035591", "score": "0.588331", "text": "public function videos()\n {\n return $this->hasMany(Post::class);\n }", "title": "" }, { "docid": "def96b5d19de77933cfe9fb268960d0a", "score": "0.58637387", "text": "public function Sort_Video_Channel()\n {\n $sortVideoChannel = DB::table('channel')->orderBy('total_video','desc')->get();\n return view('components.ajax.sortVideo',compact('sortVideoChannel'));\n }", "title": "" }, { "docid": "17e0ae9f8aaacd06c8405bfd9daf2378", "score": "0.5853956", "text": "public function projectVideos()\n {\n return $this->morphMany(Video::class, 'videoable');\n }", "title": "" }, { "docid": "cf34d9b9ec382bb2ecb71e0975c6eb8c", "score": "0.58538866", "text": "public function index()\n {\n $videos = Video::where('validated', true)->paginate(20);\n\n return view('admin.pages.videos.index', [\n 'videos' => $videos,\n 'menu_active' => 'videos'\n ]);\n }", "title": "" }, { "docid": "23334133d5b21b1c6dab9348cadfcfdc", "score": "0.5850533", "text": "public function index()\n {\n $videos = Video::latest()->get();\n\n return view('videos.index', compact('videos'));\n }", "title": "" }, { "docid": "df2c5b9613dfda166e85b337bdf6a0c6", "score": "0.58361125", "text": "function index() {\n\t\tmysql_query(\"SET names utf8\");\n\t\t$this->paginate = array('conditions'=>array('Video.status'=>1),'order'=>'Video.id DESC','limit'=>50);\n\t $this->set('products', $this->paginate('Video',array()));\t\n \n\t}", "title": "" }, { "docid": "f988ef711073d4baeade4eee43b4f86a", "score": "0.5825436", "text": "public function listarVideos($data){\n $actividades = $this->db->select('*')->from('activities')->where(\"ATVT_categoria\",$data)->where(\"ATVT_state\",\"2\")->where(\"ATVT_day\",\"LUNES\");\n return $actividades->get()->result();\n }", "title": "" }, { "docid": "e617f6cf2f18055e6806c7966e1e3f31", "score": "0.58118486", "text": "public static function getPanelCategorias(){\n $generos=Genre::all();\n\n return view('admin.panel_categorias.listado_categorias')\n ->with(\"generos\", $generos);\n }", "title": "" }, { "docid": "aa186e5e827ab9e329c7d515657648af", "score": "0.58060247", "text": "function kategori_video()\n\t{\n\t\t$data= array(\t'title'\t\t\t=>\t'Halaman Administrator',\n\t\t\t\t\t\t'isi'\t\t\t=>\t'kategori_video',\n\t\t\t\t\t\t'kategori_video'=> $this->konten_model->kategori_video_show());\n\t\t$this->load->view('admin/layout/wrapper',$data);\n\t}", "title": "" }, { "docid": "190f06cf487905504628806ad0411cba", "score": "0.57855195", "text": "public function categories()\n {\n return $this->belongsToMany(Category::class, 'category_movie');\n }", "title": "" }, { "docid": "f4709e77ea589884e3585906f34eb24c", "score": "0.5785394", "text": "public function video()\n {\n $video = Blog::where('category_id', '=', '2')->latest()->paginate(10);\n if (empty($video)) {\n return redirect(route('blogs.index'));\n }\n return view('blogs.video', compact('video'));\n }", "title": "" }, { "docid": "48aaedd7bb53afb9976ec0a1e4f8f075", "score": "0.57801425", "text": "public function favorites_videos()\n {\n return $this->belongsToMany(Video::class, 'favorites', 'user_id', 'object_id')\n ->wherePivot('object_type',Favorite::FAVORITE_VIDEO);\n }", "title": "" }, { "docid": "dd56358efc543e43bae99749b3a83fcd", "score": "0.5763709", "text": "public function run()\n {\n $categoryVideo = new CategoryVideo();\n $categoryVideo->category_id = '1';\n $categoryVideo->video_id = '1';\n $categoryVideo->save();\n\n $categoryVideo = new CategoryVideo();\n $categoryVideo->category_id = '2';\n $categoryVideo->video_id = '1';\n $categoryVideo->save();\n\n $categoryVideo = new CategoryVideo();\n $categoryVideo->category_id = '3';\n $categoryVideo->video_id = '2';\n $categoryVideo->save();\n\n $categoryVideo = new CategoryVideo();\n $categoryVideo->category_id = '4';\n $categoryVideo->video_id = '2';\n $categoryVideo->save();\n\n $categoryVideo = new CategoryVideo();\n $categoryVideo->category_id = '1';\n $categoryVideo->video_id = '4';\n $categoryVideo->save();\n\n $categoryVideo = new CategoryVideo();\n $categoryVideo->category_id = '3';\n $categoryVideo->video_id = '4';\n $categoryVideo->save();\n\n $categoryVideo = new CategoryVideo();\n $categoryVideo->category_id = '5';\n $categoryVideo->video_id = '4';\n $categoryVideo->save();\n\n $categoryVideo = new CategoryVideo();\n $categoryVideo->category_id = '1';\n $categoryVideo->video_id = '12';\n $categoryVideo->save();\n\n $categoryVideo = new CategoryVideo();\n $categoryVideo->category_id = '1';\n $categoryVideo->video_id = '19';\n $categoryVideo->save();\n\n $categoryVideo = new CategoryVideo();\n $categoryVideo->category_id = '2';\n $categoryVideo->video_id = '16';\n $categoryVideo->save();\n\n $categoryVideo = new CategoryVideo();\n $categoryVideo->category_id = '2';\n $categoryVideo->video_id = '8';\n $categoryVideo->save();\n\n $categoryVideo = new CategoryVideo();\n $categoryVideo->category_id = '2';\n $categoryVideo->video_id = '13';\n $categoryVideo->save();\n\n $categoryVideo = new CategoryVideo();\n $categoryVideo->category_id = '3';\n $categoryVideo->video_id = '20';\n $categoryVideo->save();\n\n $categoryVideo = new CategoryVideo();\n $categoryVideo->category_id = '3';\n $categoryVideo->video_id = '18';\n $categoryVideo->save();\n\n $categoryVideo = new CategoryVideo();\n $categoryVideo->category_id = '4';\n $categoryVideo->video_id = '1';\n $categoryVideo->save();\n\n $categoryVideo = new CategoryVideo();\n $categoryVideo->category_id = '4';\n $categoryVideo->video_id = '11';\n $categoryVideo->save();\n\n $categoryVideo = new CategoryVideo();\n $categoryVideo->category_id = '4';\n $categoryVideo->video_id = '6';\n $categoryVideo->save();\n\n $categoryVideo = new CategoryVideo();\n $categoryVideo->category_id = '5';\n $categoryVideo->video_id = '12';\n $categoryVideo->save();\n\n $categoryVideo = new CategoryVideo();\n $categoryVideo->category_id = '5';\n $categoryVideo->video_id = '7';\n $categoryVideo->save();\n\n $categoryVideo = new CategoryVideo();\n $categoryVideo->category_id = '5';\n $categoryVideo->video_id = '15';\n $categoryVideo->save();\n }", "title": "" }, { "docid": "c0d40c18799d7dec8b6f12263cdf9986", "score": "0.57570857", "text": "public function index()\n {\n $videos=video::orderBy('discription')->paginate(10);\n return view('admin.home',compact('videos'));\n }", "title": "" }, { "docid": "6a4127aaa1bc31e42adb1d2e9a12b8da", "score": "0.5756845", "text": "public function create()\n {\n $allFiles = $this->getFilesAndDirectories('uploads/videos/');\n $allFiles = $this->sortFiles($allFiles);\n \n $categories = Category::all();\n\n return view('dashboard.videos.create', compact('categories', 'allFiles'));\n }", "title": "" }, { "docid": "a64b755bb12e8627c3facabb38116178", "score": "0.57329285", "text": "public function index()\n {\n return view(\"pages.admin.specification.video.video\",$this->data);\n }", "title": "" }, { "docid": "59a1872ed189544adc40aa3f3955572c", "score": "0.5731414", "text": "static function listAll(){\n $media_models = config('admin.media_models');\n $articles = [];\n if($media_models){\n foreach($media_models as $model){\n $model_name = str_plural(str_replace('App\\\\','', $model));\n $articles[$model_name] = $model::all()->pluck('title', 'model_title')->toArray();\n }\n }\n return $articles;\n }", "title": "" }, { "docid": "d1621edd6ac5e01aecd5c701e4658b0c", "score": "0.57262594", "text": "function model()\n {\n return VideoTag::class;\n }", "title": "" }, { "docid": "b269d883f50d455113cea6ef26ec543f", "score": "0.57175344", "text": "public function getVideoCollections(FlaggableContentInterface $content) {\n return $this->getCollections($content, 'video');\n }", "title": "" }, { "docid": "e41b1adb3b51504c7a508c0a8f0ae7e4", "score": "0.5715022", "text": "public function getMovielist() {\r\n return $this->movie->all();\r\n }", "title": "" }, { "docid": "2c67b7c56e4c6bc30bc26ae65be30fc1", "score": "0.5711844", "text": "public function getVideosViews(){\n\t\t$this->db->select('*');\n\t\t$this->db->from('multimedia_content');\n\t\t$this->db->where('file_type', 'video');\n\t\t$this->db->order_by('Views', 'DESC');\n\t\t$this->db->limit(5);\n\t\t$query= $this->db->get();\n\t\treturn $query->result();\n\n\t}", "title": "" }, { "docid": "25e2e314367ae2d8e86f0dba1041498b", "score": "0.5689983", "text": "public function create()\n\t{\n\t\t//\n\t\t$categories = Vidcategory::get();\n\t\treturn View::make('videos.create')\n\t\t\t\t->with('active', 0)\n\t\t\t\t->with('categories', $categories);\n\t}", "title": "" }, { "docid": "de48427855a97e97395e72c43f7054e4", "score": "0.5689517", "text": "public function getRelated()\n\t{\n\t\t$video = new Video($this->request->get('video'));\n\n\t\t$videos = new VideoCollection($this->request->get('videos'));\n\n\t\t$skip = $this->request->get('skip');\n\n\t\t$take = $this->request->get('take');\n\n\t\tDB::connection()->enableQueryLog();\n\n\t\t$videos = $this->videos->getRelatedByCategory($video,$skip,$take,$videos->getIds());\n\n\t\t// if($skip >= 10){\n\t\t// \t$queries = DB::getQueryLog();\n\t\t// \tdd($queries);\n\t\t// }\n\n\t\t// I want to get 10 related videos ( with the same category.)\n\t\t// If no related videos then get latest published video 10.\n\t\t// If the returned related videos is not equal to 10 then add a latest published videos.\n\n\t\treturn [\n\t\t\t'videos' => $videos->shuffle()->all()\n\t\t];\n\t}", "title": "" }, { "docid": "f0c8cd908b0828fc29f707c95464bf4c", "score": "0.5681239", "text": "public function video()\n {\n\t\t\n $video = video::limit(50)->get();\n\n \t\t return view('main.video',\n [\n 'video' => $video \n ]);\n }", "title": "" }, { "docid": "7b8fe75258e5f532173998b34d6bc1bf", "score": "0.56634253", "text": "public function index()\n {\n $video = CourseVideo::where('teacher_id', '=' , Auth::user()->id)->get();\n\n return view('teacher/course-video')->with(['videos' => $video]);\n }", "title": "" }, { "docid": "22864a31819660e151d0a91781f6fdde", "score": "0.56535804", "text": "protected function create()\n {\n \n //echo $folder = Storage::url('videos' . '/' );\n \n $genres = Genre::all()->pluck('title', 'id'); \n $categories = VideoCategory::all()->pluck('title', 'id'); \n $classifications = Video::classifications();\n return view('videos.create')->with( compact('categories','genres','classifications'));\n }", "title": "" }, { "docid": "271216a18c24935dd829318e4bfb6254", "score": "0.56508744", "text": "public static function showCategorias(){\n \n require_once 'models/categoria.php';\n $categoria = new Categoria();\n $categorias = $categoria->getAll();\n \n return $categorias;\n }", "title": "" }, { "docid": "7cdcbd19173aaab4efef8c46d91f65d0", "score": "0.56479573", "text": "public function index()\n {\n\n $videos = Video::where('author_id', Auth::user()->id)\n ->get();\n\n return view('video.index')->with('videos', $videos);\n }", "title": "" }, { "docid": "ec8e289733a597d87b871eb9a1082d03", "score": "0.56398576", "text": "static public function mostrarVideoController(){\n\t\t\n\t\t$respuesta = GestorVideosModel::mostrarVideoModel('videos');\n\n\t\tforeach ($respuesta as $row => $item) {\n\t\t\t\n\t\t\techo '<div class=\"video col-12 col-lg-6\" id=\"'.$item['id'].'\">\n\n\t\t\t\t\t<video class=\"video-src handleVideo\" autoplay muted loop>\n\t\t\t\t\t\t<source src=\"'.$item['ruta'].'\" type=\"video/mp4\">\n\t\t\t\t\t</video>\n\n\t\t\t\t\t<div class=\"noticia d-flex align-items-center\">\n\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t<h6 class=\"titulo tit_esp\">'.$item['tit_esp'].'</h6>\n\t\t\t\t\t\t\t<p class=\"texto noti_esp\">'.$item['noti_esp'].'</p>\n\t\t\t\t\t\t\t<h6 class=\"titulo tit_ing\">'.$item['tit_ing'].'</h6>\n\t\t\t\t\t\t\t<p class=\"texto noti_ing\">'.$item['noti_ing'].'</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"btn-video-container d-flex justify-content-center\">\n\t\t\t\t\t\t<button class=\"btn-default editarVideo\"><span class=\"icon-pencil\"></span> Editar</button>\n\t\t\t\t\t\t<a href=\"index.php?pagina=videos&idBorrar='.$item['id'].'&rutaVideo='.$item['ruta'].'\"><button class=\"btn-default\"><span class=\"icon-cross\"></span> Eliminar</button></a>\n\t\t\t\t\t</div>\n\n\t\t\t\t</div>';\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "741ea1825835818f15fe8da090e7484a", "score": "0.5639551", "text": "public function categoriesList();", "title": "" }, { "docid": "748ca060bbc150a975f1068527b7639f", "score": "0.56335485", "text": "public function myVideosAction() {\n if (!$this->_helper->requireUser()->isValid())\n return;\n\n $sitevideoDashboard = Zend_Registry::isRegistered('sitevideoDashboard') ? Zend_Registry::get('sitevideoDashboard') : null;\n if (empty($sitevideoDashboard))\n return;\n\n //GET VIEWER\n $viewer = Engine_Api::_()->user()->getViewer();\n if (!$viewer)\n return $this->_forward('notfound', 'error', 'core');\n //GET EVENT ID AND OBJECT\n $channel_id = $this->_getParam('channel_id');\n $addMyVideo = $this->_getParam('addMyVideo');\n if (!$channel_id)\n return $this->_forward('notfound', 'error', 'core');\n $this->view->videoIds = json_decode($this->_getParam('existingVideos'));\n $this->view->type = $type = $this->_getParam('type');\n $params['owner_id'] = $viewer->getIdentity();\n $params['excludeVideoOwner'] = ($addMyVideo == 0) ? $params['owner_id'] : 0;\n $this->view->channel = $channel = Engine_Api::_()->getItem('sitevideo_channel', $channel_id);\n switch ($type) {\n case 'favourited' :\n $paginator = Engine_Api::_()->getDbTable('videos', 'sitevideo')->getFavouriteVideoPaginator($params);\n break;\n case 'liked' :\n $paginator = Engine_Api::_()->getDbTable('videos', 'sitevideo')->getLikedVideoPaginator($params);\n break;\n case 'rated' :\n $paginator = Engine_Api::_()->getDbTable('videos', 'sitevideo')->getRatedVideoPaginator($params);\n break;\n case 'uploaded' :\n $paginator = Engine_Api::_()->getDbTable('videos', 'sitevideo')->getUploadedVideoPaginator($params);\n break;\n default :\n $paginator = Engine_Api::_()->getDbTable('videos', 'sitevideo')->getFavouriteVideoPaginator($params);\n }\n $this->view->paginator = $paginator;\n }", "title": "" }, { "docid": "de91085f5eab27d5d2d9a2669ba4c462", "score": "0.5631459", "text": "public function index()\n {\n $videos = Video::all();\n $reports = Report::all();\n return view('videos.index', compact('videos', 'reports'));\n }", "title": "" }, { "docid": "a9296b0aa52fa2944cc6be8ff9488a2d", "score": "0.5607587", "text": "public function index()\n {\n $videos = $this->videos->findAll();\n $series = $this->series->listIdAndTitle();\n\n return $this->responseJson(compact('videos', 'series'));\n }", "title": "" }, { "docid": "db5e4308c56fd319d30d62f669bcb7ab", "score": "0.56035537", "text": "public static function queryYouTubeCategories()\n\t{\n\t\t// get any available youtube linked account\n\t\t$account = self::query()\n\t\t\t->where('platform', '=', 'youtube')\n\t\t\t->where('is_enabled', '=', true)\n\t\t\t->whereNull('expired_at')\n\t\t\t->orderBy('linked_at', 'DESC')\n\t\t\t->first();\n\n\t\tif(is_null($account)) {\n\t\t\treturn [];\n\t\t}\n\n\t\t$token = $account->token;\n\n\t\t// the scopes required for the video post\n\t\t$scopes = [\n\t\t\t'https://www.googleapis.com/auth/youtube',\n\t\t\t'https://www.googleapis.com/auth/youtube.readonly'\n\t\t];\n\n\t\t// create client\n\t\t$client = new \\Google_Client;\n\t\t$client->setApplicationName('Influencer HUB');\n\t\t$client->setClientId(config('services.youtube.client_id'));\n\t\t$client->setClientSecret(config('services.youtube.client_secret'));\n\t\t$client->setScopes($scopes);\n\t\t$client->setAccessType('offline');\n\t\t$client->setClassConfig('Google_Http_Request', 'disable_gzip', true);\n\t\t$client->setAccessToken($token);\n\n\t\t// refresh\n\t\t$token = $account->handleYoutubeAccessToken($client);\n\t\tif($token === false) {\n\t\t\treturn [];\n\t\t}\n\n\t\t// youtube\n\t\t$youtube = new \\Google_Service_YouTube($client);\n\t\t$categories = $youtube->videoCategories->listVideoCategories('snippet', ['regionCode' => 'AU']);\n\t\tif(!is_null($categories)) {\n\t\t\t$categories = $categories->getItems();\n\t\t}\n\n\t\t// build data array\n\t\t// need to filter by 'snippet.assignable', otherwise the post dispatch process will throw an invalid category error\n\t\t$categories = collect($categories)->where('snippet.assignable', true)->pluck('snippet.title', 'id');\n\n\t\t$data = [];\n\t\tforeach($categories as $key => $text) {\n\t\t\t$data[] = (object) [\n\t\t\t\t'native_id' => $key,\n\t\t\t\t'title' => $text,\n\t\t\t];\n\t\t}\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "df6eb9e30bc0b60d26376fee0fb9008d", "score": "0.5601891", "text": "public function listar()\n {\n return view('categorias.index');\n }", "title": "" }, { "docid": "ed800f7c38dd1ffdca702f26cc876d9f", "score": "0.5587103", "text": "public function listarCategorias(){\n $categorias = Categoria::all();\n return view('selectCategoria',compact('categorias'));\n }", "title": "" }, { "docid": "a5567b80e2600aea87bdf1c99a05d5c1", "score": "0.5586172", "text": "public function getVideos() {\n $this->db->query(\"SELECT * FROM videos\");\n $result = $this->db->resultSet();\n\n if ($result) {\n return $result;\n }else {\n return 'Le tableau est vide';\n }\n }", "title": "" }, { "docid": "686ef87b99f82fc7586b0fdd3170007a", "score": "0.5583544", "text": "public function index()\n {\n $videoData = Video::all()[0];\n return view('admin.video', compact('videoData'));\n }", "title": "" }, { "docid": "697daae500dfa7b7a9da44fe0d3abb20", "score": "0.5570776", "text": "public function index()\n { $lectures=Lecture::all();\n return view('admin.index_video',['lectures' => $lectures]);\n }", "title": "" }, { "docid": "1abb004a5aba9248b6da6ea85ab4f968", "score": "0.5558265", "text": "public function videoList(string $searchTerm = null): array;", "title": "" }, { "docid": "e7785130152a32d7773b2fe1a04e7394", "score": "0.55463386", "text": "public function index()\n {\n return Categoria::all();\n }", "title": "" }, { "docid": "1764bfa1be0dfb0119a6a091ef36b100", "score": "0.55443335", "text": "public function videos($id)\n {\n \n //Obtengo las opciones del menú\n $opciones=Opcion::where('estatus','=','1')->orderBy('id','asc')->get();\n\n //Obtengo información del integrante\n $integrante=Integrantes::where('estatus','=','1')->where('idTipo','=',$id)->orderBy('id','asc')->get();\n\n //Obtengo los videos del integrante\n $videos=Videos::where('estatus','=','1')->where('idTipo','=',$id)->orderBy('id','asc')->paginate(20);\n\n\n //Invoco la vista que mostrara la información\n return view('integrante.videos')->with(compact('opciones','integrante','videos'));\n \n }", "title": "" }, { "docid": "4cbadc375568af09036641f16ced872c", "score": "0.55435383", "text": "public function getAllActiveCategories() {\n\t\t$sql = 'SELECT DISTINCT category FROM rm_movie';\n\t\t$res = $this->db->ExecuteSelectQueryAndFetchAll($sql);\n\t\t\n\t\t$categories = null;\n\t\t\n\t\tforeach($res as $val) {\n\t\t\t$categories .= \"<a href=?category={$val->category}>{$val->category}</a> \";\n\t }\n\t return $categories;\n\t}", "title": "" }, { "docid": "d3a60c48992e2f6f14c98beea060d811", "score": "0.5541855", "text": "public function index()\n {\n $this->repository->pushCriteria(app('Prettus\\Repository\\Criteria\\RequestCriteria'));\n $decorationVideos = $this->repository->all();\n\n if (request()->wantsJson()) {\n\n return response()->json([\n 'data' => $decorationVideos,\n ]);\n }\n\n return view('decorationVideos.index', compact('decorationVideos'));\n }", "title": "" }, { "docid": "bc51d77e31d41d06d38bb9aca6e31c73", "score": "0.55339664", "text": "public function create()\n {\n return view('admin.videos.categories.create');\n\n }", "title": "" }, { "docid": "839e4e99492286933ff8a9e68e7ff3b0", "score": "0.55322164", "text": "public function videoIndex(Request $request)\n {\n $type = $request->input('type') ? $request->input('type') : 2;\n $product_id = $request->input('id') ? $request->input('id') : '';\n $product = ProductsModel::where('id' , $product_id)->first();\n if(!empty($product)){\n $product_number = $product->number;\n }else{\n $product_number = '';\n }\n if(!empty($product_number)){\n $materialLibraries = MaterialLibrariesModel::where('type' , $type)->where('status' , 1)->where('product_number' , $product_number)->orderBy('created_at' , 'desc')->paginate(15);\n }else{\n $materialLibraries = MaterialLibrariesModel::where('type' , $type)->where('status' , 1)->orderBy('created_at' , 'desc')->paginate(15);\n }\n\n if($type == 1){\n return view('home/materialLibraries.image',[\n 'materialLibraries' => $materialLibraries,\n 'type' => 1,\n 'search' => '',\n 'product_id' => $product_id,\n 'status' => 1\n\n ]);\n }\n if($type == 2){\n return view('home/materialLibraries.video',[\n 'materialLibraries' => $materialLibraries,\n 'type' => 2,\n 'search' => '',\n 'product_id' => $product_id,\n 'status' => 1\n\n ]);\n }\n if($type == 3){\n return view('home/materialLibraries.describe',[\n 'materialLibraries' => $materialLibraries,\n 'type' => 3,\n 'search' => '',\n 'product_id' => $product_id,\n 'status' => 1\n\n ]);\n }\n if($type == 4){\n if(!empty($product_number)){\n $articles = ArticleModel::where('product_number' , $product_number)->where('status' , 1)->orderBy('created_at' , 'desc')->paginate(15);\n }else{\n $articles = ArticleModel::where('status' , 1)->orderBy('created_at' , 'desc')->paginate(15);\n }\n $web_url = config('constant.web_url').'/product/article_show/';\n\n return view('home/article.article',[\n 'articles' => $articles,\n 'search' => '',\n 'product_id' => $product_id,\n 'product' => $product,\n 'type' => 4,\n 'status' => 1,\n 'web_url' => $web_url,\n\n ]);\n }\n }", "title": "" } ]
590131aca6553b22b9cf9aba3fd65d4d
Transforms search result into hooks result array
[ { "docid": "c4097c5403ec67b4dc3cb001f6f759d2", "score": "0.7031643", "text": "protected static function transformSearchResults($result, $hook_params) {\n\t\t\n\t\tif (elgg_extract('count', $hook_params) === true) {\n\t\t\treturn $result->getCount();\n\t\t}\n\t\t\n\t\treturn $result->toEntities($hook_params);\n\t}", "title": "" } ]
[ { "docid": "f2ca65a8362c4938adf41788c54247bd", "score": "0.6333646", "text": "function akdn_museum_preprocess_search_result(&$variables) {\n $arguments = arg();\n $result = $variables['result'];\n // print '<pre>'.print_r($variables,1).'</pre>';\n \n if ($variables['module'] == 'apachesolr_search' && $arguments[0] == 'collections' && $arguments[1] == 'artefact-browser') {\n $variables['full_node'] = node_load($result['node']->entity_id);\n $variables['theme_hook_suggestions'][] = 'search_result__artefact_search__' . $result['entity_type'] . '__' . $result['bundle'];\n }\n else {\n $info = array();\n if (!empty($result['date'])) {\n $info['date'] = format_date($result['date'], 'short');\n }\n if (!empty($result['bundle'])) {\n $info['bundle'] = $result['type'];\n }\n $variables['info'] = implode(' | ', $info);\n }\n}", "title": "" }, { "docid": "2e06adf120a49ee6050eeda3ba59ee9a", "score": "0.6321923", "text": "function afterFind(array $results){\n //this method creates a fake tags attribute to be formated for the tag cloud\n $new_results = array();\n //run for each row in the returned result\n foreach($results as $post){\n //buiild the tags\n $post['Post']['tags'] = $this->_build_tags($post['Tag']);\n //insert the newly formated post into a new result set\n $new_results[] = $post;\n }\n return $new_results;\n }", "title": "" }, { "docid": "fddd89bb763f607e31bfbee02e01e058", "score": "0.6215846", "text": "public function transform($results, $meta = []);", "title": "" }, { "docid": "4580d78f510a767ab80fc034d0700b0d", "score": "0.6088894", "text": "public function hydrateElasticsearchResult(array $result)\n {\n $items = $result['hits']['hits'];\n $groupedByType = array_reduce($items, function ($carry, $item) {\n $carry[$item['_type']][] = $item;\n return $carry;\n }, []);\n array_walk($groupedByType, function (&$group, $type) {\n $ids = array_column($group, '_id');\n $model = $this->getModelNameByType($type);\n $collection = $model::whereIn('id', $ids)->orderByRaw('FIELD(id, ' . implode(',', $ids) . ')')->get();\n $group = $collection;\n });\n $items = array_map(function ($item) use ($groupedByType) {\n $group = $groupedByType[$item['_type']];\n $instance = $group->keyBy('id')->get($item['_id']);\n if (array_key_exists('highlight', $item)) {\n $instance->highlight = $item['highlight'];\n }\n return $instance;\n }, $items);\n return $items;\n }", "title": "" }, { "docid": "913be3f5669f64928ac3c659cb7d5247", "score": "0.60788476", "text": "public function addResult(array &$results, string $search_page_id, array $result) {\n if (in_array($search_page_id, $this->appliesTo())) {\n try {\n $converted = $this->convert($result);\n $results[$converted['entity_type'] . ':' . $converted['id']] = $converted;\n }\n catch (\\Exception $e) {\n watchdog_exception('word_monitor', $e);\n }\n }\n }", "title": "" }, { "docid": "c859bd0195a3a53b528d4587f3b86194", "score": "0.5978297", "text": "public function updateResult($result)\n {\n @list($foundWord, $nextWord) = $result;\n\n list($volume, $page) = $this->extractVolumeAndPage($foundWord['image']);\n\n if (! $volume = (int)$volume) {\n $volume = '';\n }\n\n if (! $page = (int)$page) {\n $page = '';\n }\n\n return [\n 'definition' => $this->setImagePath($foundWord),\n 'errataImages' => $this->needErrataImages? $this->searchErrata($foundWord['image']) : null,\n 'errataText' => $this->needErrataText? $foundWord['errata'] : null,\n 'ghostwords' => $this->needGhostwords? $this->searchGhostwords($foundWord, $nextWord) : null,\n 'volume' => $volume,\n 'page' => $page,\n 'firstWord' => $foundWord['original'],\n ];\n }", "title": "" }, { "docid": "f8e85e9a6024fac911e99ec450227d62", "score": "0.59405947", "text": "function save_search_result_to_widget_format( $results )\r\n {\r\n $urls = array();\r\n if( false !== $results )\r\n {\r\n foreach( $results as $annotation )\r\n {\r\n if( is_multisite() )\r\n {\r\n $urls[] = \"'\" . get_blog_permalink( $annotation->wp_blog_id, $annotation->wp_post_id ) . \"'\";\r\n }\r\n else\r\n {\r\n $urls[] = \"'\" . get_permalink( $annotation->wp_post_id ) . \"'\";\r\n }\r\n }\r\n }\r\n $urls = implode( ',', $urls );\r\n $this->search_result_urls = $urls;\r\n }", "title": "" }, { "docid": "61388f3b8ee4fd6d30f565ced43e4e6c", "score": "0.5938722", "text": "protected function _transformSearchResult(\\FACTFinder\\Data\\Result $searchResult)\n {\n $result = [];\n /** @var \\FACTFinder\\Data\\Record $record */\n foreach($searchResult as $record) {\n $result[$record->getID()] = [\n 'entity_id' => $record->getField('parent_id'),\n 'score' => $record->getSimilarity(),\n ];\n }\n\n return $result;\n }", "title": "" }, { "docid": "ac579676119786c4282cdd09b9e58801", "score": "0.59031576", "text": "function _parse_results($results = []) {\n\n $result = [];\n\n foreach ($results as $res) {\n $result[$res->nid] = [\n 'id' => $res->nid,\n 'title' => Drupal::l($res->title, Url::fromUri('internal:/node/' . $res->nid)),\n 'status' => $res->status == 1 ? 'yes' : 'no',\n 'created' => date('m/d/Y | H:i:s', $res->created),\n 'created_by' => $this->_parse_username((int)$res->uid),\n 'edit' => Drupal::l('Edit', Url::fromUri('internal:/node/' . $res->nid . '/edit')),\n ];\n }\n return $result;\n }", "title": "" }, { "docid": "e4a5e1a66caacbe6710d9eaecdb1aba1", "score": "0.58954424", "text": "protected function process_results($result) {\n\t\treturn $result;\t\n\t}", "title": "" }, { "docid": "8579ce6954131f1ed89c05e4bf5ca745", "score": "0.5890397", "text": "protected static function extractQueryResults($results) {\n\t\t$query_results = [];\n\t\tforeach($results as $result) {\n\t\t\t$id = @$result['entity']['key']['path'][0]['id'];\n\t\t\t$key_name = @$result['entity']['key']['path'][0]['name'];\n\t\t\t$props = $result['entity']['properties'];\n\n\t\t\t$title = $props[self::BLOG_TITLE]->getStringValue();\n\t\t\t$subtitle = $props[self::BLOG_SUBTITLE]->getStringValue();\n\t\t\t$url = $props[self::BLOG_URL]->getStringValue();\n\t\t\t$main_img = $props[self::BLOG_MAINIMG]->getStringValue();\n\t\t\t$publication_date = $props[self::BLOG_PUBLICATIONDATE]->getDateTimeValue();\n\t\t\t$author = $props[self::BLOG_AUTHOR]->getStringValue();\n\t\t\t$body_md = $props[self::BLOG_BODYMD]->getStringValue();\n\t\t\t//$tags = $props[self::BLOG_TAGS]->getListValue();\n\t\t\t$tags = $props[self::BLOG_TAGS]->getStringValue();\n\t\t\t$b_publish = $props[self::BLOG_B_PUBLISH]->getBooleanValue();\n\n\t\t\t$blog_model = new Ecm_Bloc($title, $subtitle, $url, $main_img, $publication_date, $author, $body_md, $tags, $b_publish);\n\t\t\t$blog_model->setKeyId($id);\n\t\t\t$blog_model->setKeyName($key_name);\n\t\t\t// Cache this read feed.\n\t\t\t$blog_model->onItemWrite();\n\n\t\t\t$query_results[] = $blog_model;\n\t\t}\n\t\treturn $query_results;\n\t}", "title": "" }, { "docid": "3a838d8e6f8dfa5b262a60fec471889e", "score": "0.58508164", "text": "public function parse(ResultInterface $result): array\n {\n $data = $result->getData();\n $query = $result->getQuery();\n\n $suggestions = [];\n $allSuggestions = [];\n $collation = null;\n\n if (isset($data['spellcheck']['suggestions']) && \\is_array($data['spellcheck']['suggestions'])) {\n $suggestResults = $data['spellcheck']['suggestions'];\n $termClass = $query->getOption('termclass');\n\n if ($query->getResponseWriter() === $query::WT_JSON) {\n $suggestResults = $this->convertToKeyValueArray($suggestResults);\n }\n\n foreach ($suggestResults as $term => $termData) {\n if ('collation' === $term) {\n $collation = $termData;\n } else {\n if (!\\array_key_exists(0, $termData)) {\n $termData = [$termData];\n }\n\n foreach ($termData as $currentTermData) {\n $allSuggestions[] = $this->createTerm($termClass, $currentTermData);\n\n if (!\\array_key_exists($term, $suggestions)) {\n $suggestions[$term] = $this->createTerm($termClass, $currentTermData);\n }\n }\n }\n }\n }\n\n return [\n 'results' => $suggestions,\n 'all' => $allSuggestions,\n 'collation' => $collation,\n ];\n }", "title": "" }, { "docid": "defb70600a122e63091e285c75d72792", "score": "0.5804382", "text": "protected abstract function process_results($result_array);", "title": "" }, { "docid": "46d0b50c87489276fdfc9ff136247e36", "score": "0.57744884", "text": "function awbs_preprocess_search_results(&$var) {\n\n //dsm($var);\n $var['info_split']['date'] = $var['result']['node']->created;\n return $var;\n}", "title": "" }, { "docid": "ccf1107708c9d96c2d97c12ca0dd5b2b", "score": "0.57342803", "text": "private function prepareResults($output)\n {\n $search_results = [];\n \n foreach ($output as $product) {\n $item['name'] = $product['caption'];\n $item['image_url'] = $product['thumbURI'];\n $item['price'] = getFloat($product['priceInfo']['price']);\n $item['msrp'] = !empty($product['priceInfo']['maxPrice']) ? getFloat($product['priceInfo']['maxPrice']) : $item['price'];\n $item['percentage'] = (string)(($item['msrp'] - $item['price']) / $item['msrp'] * 100) . '%';\n \n $search_results[] = $item;\n }\n \n return $search_results;\n }", "title": "" }, { "docid": "7790cbb905e4213998befc13f98bb0f9", "score": "0.57244635", "text": "public function render(array $result, array $options = []) {\n $options = $options + [\n 'rendermode' => 'stored',\n 'format' => 'json',\n 'debug' => FALSE,\n ];\n\n // Raw output is returned right away.\n if ($options['format'] == 'raw') {\n return $result;\n }\n\n // Loop through hits and build output array.\n $output = [];\n foreach ($result['hits']['hits'] ?? [] as $hit) {\n $hit['_source']['_score'] = $hit['_score'];\n $render = &$hit['_source']['rendered_search_result'];\n\n // If specified, replace stored render with fresh live render.\n if ($options['rendermode'] == 'live') {\n $entity = $this->entityTypeManager->getStorage($hit['_source']['entity'])->load($hit['_source']['id']);\n $render_array = $this->entityTypeManager->getViewBuilder($hit['_source']['entity'])->view($entity, 'search_result');\n $render = $this->renderer->renderPlain($render_array);\n }\n\n // Replace highlight placeholder with highlight:\n $highlight = implode(' … ', $hit['highlight']['content']);\n $highlight = $this->getExcerptMarkup($highlight);\n $placeholder = $this->getExcerptPlaceholder();\n $render = str_replace($placeholder, $highlight, $render);\n\n // Optionally amend some quick debug output.\n if ($options['debug']) {\n $render = $render . \"\\nsearchphrase:\" . $result['searchphrase'] . ' timestamp:' . time();\n }\n\n $output[] = ($options['format'] == 'html') ? $render : $hit['_source'];\n }\n\n // If html specified, concatenated output string.\n if (($options['format'] == 'html')) {\n $output = implode(\"\\n\", $output);\n }\n\n return $output;\n }", "title": "" }, { "docid": "d5e7016d7e4ac2781b4880b06b504dea", "score": "0.5662824", "text": "private function _parse_results($results, $format) {\n while ($row = mysql_fetch_assoc($results)) {\n \t\tforeach ($row as $key=>$item) {\n \t\t $row_array[$key] = $item;\n \t\t}\n \t\t\n \t\tif ($format == 'object') {\n \t\t $return[] = (object)$row_array;\n \t\t} else {\n \t\t $return[] = $row_array;\n \t\t}\n \t }\n \t \n \t return $return;\n\t}", "title": "" }, { "docid": "726bc9162628d56ba81cd46c1e5ef1d8", "score": "0.5607276", "text": "public function getAllDataFromSearch($searchResult){\n\n\t\tfor($i=0; $i < count($searchResult); $i++){\n\t\t\t$this->switchImdbId($searchResult[$i][\"imdbID\"]); \n\t\t\t$this->switchImdbIdPoster($searchResult[$i][\"imdbID\"]); \n\n\t\t\t$result = $this->getData($this->urlOmdbIndividual);\n\t\t\t\n\t\t\t$newResult = json_decode($result, true);\n\n\t\t\t$newResult['Poster'] = $this->urlPoster; //Change imdb hotlink to omdb for posters.\n\t\t \n\t\t\tarray_push($this->fullSearchResults, $newResult);\n\t\t}\n\t\treturn $this->fullSearchResults;\n\t}", "title": "" }, { "docid": "b1085d114f9447a2d274dc24d25b30ed", "score": "0.5581655", "text": "function get_search_results($search_id, $super_order_by, $images_where='')\n{\n $search = get_search_array($search_id);\n if ( !isset($search['q']) )\n {\n $result['items'] = get_regular_search_results($search, $images_where);\n return $result;\n }\n else\n {\n return get_quick_search_results($search['q'], array('super_order_by'=>$super_order_by, 'images_where'=>$images_where) );\n }\n}", "title": "" }, { "docid": "ad1d8890e2828eb037292f8d2787e8df", "score": "0.55771196", "text": "function commerce_pos_format_autocomplete_results($result) {\n $matches = array();\n if ($result) {\n foreach ($result as $row) {\n if (empty($row->commerce_pos_phone_number_value)) {\n $matches[$row->mail] = check_plain($row->name . ' (' . $row->mail . ')');\n }\n else {\n $matches[$row->mail] = check_plain($row->name . ' (' . $row->mail . ')' . ' (' . $row->commerce_pos_phone_number_value . ')');\n }\n }\n }\n return $matches;\n}", "title": "" }, { "docid": "89050c24c4d31da6bc4a8213dced2503", "score": "0.5550599", "text": "public function getResults(): array;", "title": "" }, { "docid": "743bab2ecf627d3855d88b9c68abaeb8", "score": "0.54988104", "text": "function set_yolink_search_results($posts, $query=false)\r\n {\r\n if( is_search() &&\r\n $this->search_query_state == 0 )\r\n {\r\n $this->search_query_state = 1; // do it only once\r\n global $blog_id;\r\n $blog_id_last_item = $blog_id;\r\n $posts = array();\r\n $results = get_transient( 'yolink_search_results_' . get_search_query() . '_' . $this->search_options );\r\n if( !isset( $results ) || false === $results )\r\n {\r\n $results = $this->do_search( get_search_query() );\r\n }\r\n $this->save_search_result_to_widget_format( $results ); \r\n\r\n $this->load_script_once = 'true';\r\n // save the results for rendering chunks\r\n $this->yolink_search_results = array();\r\n if( isset( $results ) && false !== $results )\r\n {\r\n foreach ( $results as $annotation )\r\n {\r\n $post = get_blog_post($annotation->wp_blog_id, $annotation->wp_post_id);\r\n $posts[] = $post;\r\n\r\n # 2.3.1 -- Check if a URL customization is present.\r\n $url = @$annotation->actual_url;\r\n\r\n $map = array( 'blog_id' => $annotation->wp_blog_id, 'post' => $post, 'actual_url' => $url );\r\n $this->yolink_search_results[] = $map; \r\n $blog_id_last_item = $annotation->wp_blog_id;\r\n }\r\n\r\n if( $blog_id_last_item != $blog_id )\r\n {\r\n // Here we create a fake post as the last item, so that we can reset the blog context to\r\n // the original\r\n $post = new stdClass();\r\n $post->ID = 0;\r\n $post->post_author = '';\r\n $post->post_date = date('Y-m-d H:m:s');\r\n $post->post_type = 'post';\r\n $post->post_title = '';\r\n $post->post_content = '';\r\n $post->post_status = 'open';\r\n $post->comment_status = 'open';\r\n $post->ping_status = 'open';\r\n $post->ecpt_yolink_custom_url = '';\r\n $posts[] = $post;\r\n\r\n $this->yolink_search_results[] = array( 'blog_id' => $blog_id, 'post' => $post, );\r\n }\r\n }\r\n }\r\n return $posts;\r\n }", "title": "" }, { "docid": "dc92a599f3c6b8277274b96428fae200", "score": "0.54871905", "text": "public function parseResults(array $results) {\n $list = [];\n\n foreach ($results as $item) {\n $result = $item->getFields();\n $url = $this->getUrl($item);\n $title = $this->getTitle($result);\n $description = $this->getDescription($result);\n $type = $this->getType($result);\n $isDownloadable = FALSE;\n if ($type == 'download' || $type == 'orbit_article') {\n if (empty($result['field_gated_content']) || empty($result['field_gated_content']->getValues())) {\n $isDownloadable = TRUE;\n $url = $this->getFileUrl($result);\n }\n\n }\n $fileExtension = $this->getFileExtension($result);\n $list[] = [\n 'url' => $url,\n 'title' => $this->searchExtension->highlightSearchedWord($title),\n 'image' => $this->getImage($result),\n 'description' => $this->searchExtension->highlightSearchedWord($description),\n 'type' => $this->getTypeLabel($result),\n 'fileExtension' => $fileExtension,\n 'isDownloadable' => $isDownloadable,\n ];\n }\n\n return $list;\n }", "title": "" }, { "docid": "6f6fd556cb7d78ff3612f72fc5d74ee3", "score": "0.54830664", "text": "public function __invoke($results)\n {\n $results['results'] =\n collect($results['results'])->map(function($row){\n $row['id'] = $row['site'];\n return $row;\n })->toArray();\n\n return $this->transform($results);\n }", "title": "" }, { "docid": "5711cd62eafe9ce428603be21cfd512a", "score": "0.5466847", "text": "protected function transform($result)\n {\n if ($this->original) {\n return $result;\n }\n\n $transformed = $this->resolveTransformer()->transformResult(\n $result, $this->getSelectables($this->selectedColumns)\n );\n\n if (!$this->isPaginated($result)) {\n if ($resourceKey = $this->getResourceKey()) {\n return [$resourceKey => $transformed];\n }\n }\n\n return $transformed;\n }", "title": "" }, { "docid": "20300fdf1bcbb1b9d3d1104c8b27d7ba", "score": "0.545303", "text": "public function search(SearchQuery $search): array;", "title": "" }, { "docid": "ed7673de2de44eb9dded2180d983b623", "score": "0.54396033", "text": "private function transformResults($results,$isApi = false)\n {\n $list = [];\n if (!\\is_array($results) || count($results) == 0){\n return $list;\n }\n for ($i = 0; $i < count($results); $i++) {\n $result = (object) $results[$i];\n $obj = $this->transformResult($result,$isApi);\n if ($obj != null){\n $list[] = $obj;\n }\n }\n return $list;\n }", "title": "" }, { "docid": "4dfe98a68512b4d08741eaa19ff34daf", "score": "0.54374933", "text": "public function parse($result)\n {\n $data = $result->getData();\n $query = $result->getQuery();\n $suggestions = array();\n\n if (isset($data['suggest']) && is_array($data['suggest'])) {\n\n $suggestResults = $data['suggest'];\n $termClass = $query->getOption('termclass');\n foreach ($suggestResults as $dictionary => $termData) {\n\n foreach ($termData as $term => $suggestionData) {\n $suggestions[$dictionary][$term] = $this->createTerm($termClass, $suggestionData);\n }\n }\n }\n\n return $this->addHeaderInfo(\n $data,\n array(\n 'results' => $suggestions,\n )\n );\n }", "title": "" }, { "docid": "b3f113914cc9ccab8b82db764da7b497", "score": "0.54345596", "text": "protected function optimize_tags( $result )\n {\n if ( count( $result ) == 0 ) {\n return $result;\n }\n\n $res_result = [];\n $current = $result[ 0 ];\n $i = 1;\n\n while ( $i < count( $result ) ) {\n //if they have the same tag then we concatenate them\n if ( ( $current[ 'tag' ] == $result[ $i ][ 'tag' ] ) && ( $current[ 'params' ] == $result[ $i ][ 'params' ] ) ) {\n $current[ 'text' ] .= $result[ $i ][ 'text' ];\n } else {\n $current = $this->expand_parameters( $current );\n array_push( $res_result, $current );\n $current = $result[ $i ];\n }\n\n $i++;\n }\n\n $current = $this->expand_parameters( $current );\n array_push( $res_result, $current );\n\n return $res_result;\n }", "title": "" }, { "docid": "48ae671d0f37e6e3e3b8d9b464ce8f12", "score": "0.540989", "text": "public function execute() {\n $results = [];\n if (!$this->isSearchExecutable()) {\n return $results;\n }\n return [\n [\n 'link' => Url::fromRoute('test_page_test.test_page')->toString(),\n 'type' => 'Dummy result type',\n 'title' => 'Dummy title',\n 'snippet' => new FormattableMarkup(\"Dummy search snippet to display. Keywords: @keywords\\n\\nConditions: @search_parameters\", ['@keywords' => $this->keywords, '@search_parameters' => print_r($this->searchParameters, TRUE)]),\n ],\n ];\n }", "title": "" }, { "docid": "528b7c004e30304f20c78d2533ff0964", "score": "0.5405603", "text": "public function afterFind($results, $format){\n if(!$results || $this->_skipFormatting) return $results;\n if(!$format) throw new CakeException(\"SuperContainble requires a result format is passed to afterFind\");\n\n $return = array();\n $count = 0;\n $lastPrimaryId = false;\n foreach($results as &$row){\n # If we have not set our primary ID or our current id does not equal it then set it\n if(!$lastPrimaryId || $row[$this->_params['name']]['id'] != $lastPrimaryId){\n # If this is not the first time we are setting it increment count\n if($lastPrimaryId) $count++;\n $lastPrimaryId = $row[$this->_params['name']]['id'];\n }\n $this->_flatten($format, $row, $return, $count);\n }\n\n return BBHash::expand($return);\n }", "title": "" }, { "docid": "54ee4ff91e3610bf4733d30360b3ba8d", "score": "0.54037684", "text": "protected function _parse_search_results(array $results)\n {\n $collection = new Fotolia_Collection;\n\n if (array_key_exists('RSS', $results)\n and array_key_exists('CHANNEL', $results['RSS'])\n and array_key_exists('ITEM', $results['RSS']['CHANNEL'])\n and is_array($results['RSS']['CHANNEL']['ITEM']))\n {\n foreach ($results['RSS']['CHANNEL']['ITEM'] as $result)\n {\n $item = Model::factory('fotolia_result');\n\n foreach ($result as $key => $value)\n {\n $item->$key = $value;\n }\n\n $collection->append($item);\n }\n }\n\n return $collection;\n }", "title": "" }, { "docid": "a2f4c44913dee8e19a6793999f2e2b5b", "score": "0.53822774", "text": "private function parsedResult(): array\n {\n $result = [];\n $id = $this->property('qnaID');\n $this->sourceqna = Question::where('theme_id', $id)\n ->where('active', true)\n ->orderBy('sort_order', 'asc')\n ->get();\n foreach (input('q') as $idx => $question) {\n $qna = [];\n $qna['question'] = $question;\n if (!isset(input('a')[$idx])) {\n $qna['answer'] = 'n/a';\n } else {\n switch ($this->sourceqna[$idx]->input_type) {\n case 'radio':\n $qna['answer'] = input('a')[$idx];\n break;\n case 'checkbox':\n $qna['answer'] = implode(',', input('a')[$idx]);\n break;\n case 'select':\n $qna['answer'] = input('a')[$idx];\n break;\n case 'text':\n $qna['answer'] = input('a')[$idx];\n break;\n default:\n $qna['answer'] = 'wrong input type';\n break;\n }\n }\n // check if this q'n'a are correct\n if ($this->validate($idx, $qna)) {\n $result[] = $qna;\n } else {\n // immediate return as questionnaire was changed while user was thinking on answers\n $this->valid = false;\n return [];\n }\n }\n return $result;\n }", "title": "" }, { "docid": "d353b598d896c3f6ae9eb7e66cb08fb6", "score": "0.53584343", "text": "function fetch_rows($result)\n {\n $fetch_res = array();\n foreach($result as $key => $row)\n {\n\n if($this->searchby === 'People')\n {\n $avatar = encode_file_to_axios($row['avatar'],'user','avatar');\n $line = (object)array(\"id\" => $row['userprofile_id'],\n \"type\" => \"user\",\n \"first_name\" => $row['first_name'],\n \"last_name\" => $row['last_name'],\n \"profession\" => $row['profession'],\n \"avatar\" => $avatar,\n \"country\" => $row['country'],\n \"state\" => $row['state'],\n \"city\" => $row['city']\n );\n }\n else if($this->searchby === 'Companies')\n {\n $avatar = encode_file_to_axios($row['avatar'],'company','avatar');\n $line = (object)array(\"id\" => $row['companyprofile_id'],\n \"type\" => \"company\",\n \"companyName\" => $row['companyName'],\n \"workDomain\" => $row['workDomain'],\n \"avatar\" => $avatar,\n \"country\" => $row['country'],\n \"state\" => $row['state'],\n \"city\" => $row['city']\n );\n }\n else\n {\n $avatar = encode_file_to_axios($row['avatar'],'company','avatar');\n $line = (object)array(\"id\" => $row['job_id'],\n \"type\" => \"job\",\n \"jobName\" => $row['jobName'],\n \"companyName\" => $row['companyName'],\n \"jobDescription\" => $row['jobDescription'],\n \"experienceLevel\" => $row[\"experienceLevel\"],\n \"datePosted\" => $row[\"datePosted\"],\n \"avatar\" => $avatar,\n \"country\" => $row['country'],\n \"state\" => $row['state'],\n \"city\" => $row['city'],\n );\n }\n\n array_push($this->search_result, $line);\n }\n }", "title": "" }, { "docid": "adae3f691003a88fb51c0a232ac5b8bf", "score": "0.53497946", "text": "protected function parseResults() {\n $regex = $this->getRegex();\n $wordsFound = [];\n $result = [];\n\n if(preg_match_all($regex, $this->httpResponse, $matches)) {\n $wordsFound = $matches[0];\n }\n\n if (count($wordsFound)) {\n $wordsUnique = array_unique(array_values($wordsFound));\n $result = array_combine(\n $wordsUnique,\n array_fill(0, count($wordsUnique), 0)\n );\n\n foreach ($wordsFound as $word) {\n if (array_key_exists($word, $result)) {\n $result[$word] += 1;\n }\n }\n }\n\n $this->result = $result;\n }", "title": "" }, { "docid": "e22bdab31f65b4c2e7cb2dad7f4551dd", "score": "0.53468525", "text": "function apsa_get_search_results($paged = 1, $limit = 1000, $query_str = '', $order = 'DESC', $order_by = 'id', $status = 'available', $date_filter = false) {\n global $wpdb;\n $from = ($paged * $limit) - $limit;\n $query_str = sanitize_text_field($query_str);\n $query_str = '%' . $query_str . '%';\n $custom_ads_table = $wpdb->prefix . 'apsa_custom_ads';\n if ($date_filter === false || $date_filter === '0') {\n $form = $wpdb->get_results('SELECT SQL_CALC_FOUND_ROWS * FROM ' . $custom_ads_table . ' WHERE `status`=\"' . $status . '\" and `title` like \"' . $query_str . '\" Order by ' . $order_by . ' ' . $order . ' LIMIT ' . $from . ',' . $limit . ' ', ARRAY_A);\n $count = $wpdb->get_results('SELECT FOUND_ROWS() as count', ARRAY_A);\n } else {\n $date_value = '%' . $date_filter . '%';\n $form = $wpdb->get_results('SELECT SQL_CALC_FOUND_ROWS * FROM ' . $custom_ads_table . ' WHERE `creation_date` like \"' . $date_value . '\" and `status`=\"' . $status . '\" and `title` like \"' . $query_str . '\" Order by ' . $order_by . ' ' . $order . ' LIMIT ' . $from . ',' . $limit . ' ', ARRAY_A);\n $count = $wpdb->get_results('SELECT FOUND_ROWS() as count', ARRAY_A);\n }\n return array('forms' => $form, 'count' => intval($count[0]['count']));\n}", "title": "" }, { "docid": "600084378364a60d7beb5614ed93424c", "score": "0.5339243", "text": "public function parse(ResultInterface $result): array\n {\n $data = parent::parse($result);\n\n // parse 'info' first so 'fields' can use it for flag lookups\n $data['infoResult'] = $this->parseInfo($data['info']);\n $data['fieldsResult'] = $this->parseFields($data['fields']);\n\n return $data;\n }", "title": "" }, { "docid": "65540efe7ff4e9e2735a3beab8887d23", "score": "0.5329066", "text": "public function parse($result)\n {\n $data = $result->getData();\n $synonymMappings = null;\n if (isset($data['synonymMappings'])) {\n $synonymMappings = $data['synonymMappings'];\n }\n\n $parsed = [];\n $items = [];\n\n if (null !== $synonymMappings && !empty($synonymMappings)) {\n foreach ($synonymMappings['managedMap'] as $term => $synonyms) {\n $items[] = new \\Solarium\\QueryType\\ManagedResources\\Result\\Synonyms\\Synonyms($term, $synonyms);\n }\n\n $parsed['items'] = $items;\n $parsed['ignoreCase'] = $synonymMappings['initArgs']['ignoreCase'];\n $parsed['initializedOn'] = $synonymMappings['initializedOn'];\n }\n\n $this->addHeaderInfo($data, $parsed);\n\n return $parsed;\n }", "title": "" }, { "docid": "3942b5434d415a92406831d90811d5ce", "score": "0.53274024", "text": "protected static function mutateApiResult(array $result): array\n {\n // Be sure to call the parent version for common mutations\n $result = parent::mutateApiResult($result);\n\n\n /**\n * Add custom mutations for this item type here\n */\n if (isset($result['address'])) {\n $result = self::setStreetAddress($result);\n }\n\n $result = self::setUpcomingEvents($result);\n\n\n // Sometimes popularity_score is NULL. Coerce those to zero\n $result['popularity_score'] = $result['popularity_score'] ?? 0;\n\n return $result;\n }", "title": "" }, { "docid": "03b146d765bc19b2436a9fe43b75df14", "score": "0.5326777", "text": "abstract public function getResults();", "title": "" }, { "docid": "943eacd4b9682b97740838f20c4f324a", "score": "0.53139", "text": "private function parseResult($result) {\n\n $td_image = $result->find('td', 0);\n $td_name = $result->find('td', 1);\n $td_type = $result->find('td', 2);\n $td_volumes = $result->find('td', 3);\n $td_chapters = $result->find('td', 4);\n $td_score = $result->find('td', 5);\n $td_publish_date_from = $result->find('td', 6);\n $td_publish_date_to = $result->find('td', 7);\n $td_members_inlist = $result->find('td', 8);\n \n $manga = new MangaSearchModel();\n \n // TODO: Separate each individual parse to a different function\n \n // The ID\n // <a class=\"hoverinfo_trigger\" href=\"https://myanimelist.net/manga/90/Loveless\" id=\"sarea90\" rel=\"#sinfo90\"><img...></a>\n $manga->set('id', (int)substr(trim($td_image->find('div.picSurround a', 0)->id), 5));\n\n // The Name\n // <strong>Loveless</strong>\n $manga->set('name', (string)html_entity_decode(\n $td_name->find('a.hoverinfo_trigger strong', 0)->innertext, ENT_QUOTES));\n\n // The MAL URL\n // <a class='hoverinfo_trigger fw-b' href='https://myanimelist.net/manga/90/Loveless' id='sinfo90' rel='#sinfo90' style='display: inline-block;'>\n $manga->set('mal_url', (string)$td_name->find('a.hoverinfo_trigger', 0)->href);\n\n // The Image URL\n // <img width=\"50\" height=\"70\" alt=\"Loveless\" border=\"0\" data-src=\"https://myanimelist.cdn-dena.com/r/50x70/images/manga/2/171051.webp?s=9322c3e430735b915d69c06f08e292b4\" data-srcset=\"https://myanimelist.cdn-dena.com/r/50x70/images/manga/2/171051.webp?s=9322c3e430735b915d69c06f08e292b4 1x, https://myanimelist.cdn-dena.com/r/100x140/images/manga/2/171051.webp?s=8b6fd8e7fc25b5ceadc60b5e903766ba 2x\" class=\" lazyloaded\" srcset=\"https://myanimelist.cdn-dena.com/r/50x70/images/manga/2/171051.webp?s=9322c3e430735b915d69c06f08e292b4 1x, https://myanimelist.cdn-dena.com/r/100x140/images/manga/2/171051.webp?s=8b6fd8e7fc25b5ceadc60b5e903766ba 2x\" src=\"https://myanimelist.cdn-dena.com/r/50x70/images/manga/2/171051.webp?s=9322c3e430735b915d69c06f08e292b4\">\n if($td_image->find('div.picSurround a img', 0)->{'data-srcset'}) {\n $manga->set('image_url', (string)str_replace('webp', 'jpg',\n str_replace('/r/50x70', '',\n explode(\n '?s=',\n $td_image->find('div.picSurround a img', 0)->{'data-srcset'}\n )[0]\n )\n ));\n } else {\n $manga->set('image_url', (string)str_replace('webp', 'jpg',\n str_replace('/r/50x70', '',\n explode(\n '?s=',\n $td_image->find('div.picSurround a img', 0)->srcset\n )[0]\n )\n ));\n }\n\n // The Score\n // <td class='borderClass ac bgColor0' width='50'> 7.86 </td>\n if(trim($td_score->innertext) !== 'N/A') {\n $manga->set('score', (float)trim($td_score->innertext));\n }\n\n // The Type\n // <td class='borderClass ac bgColor0' width='45'> Manga </td>\n if(trim($td_type->innertext) !== '-') {\n $manga->set('type', (string)strtolower(trim($td_type->innertext)));\n }\n\n // The Volumes\n // <td class='borderClass ac bgColor0' width='40'> - </td>\n if(trim($td_volumes->innertext) !== '-') {\n $manga->set('volumes', (int)trim($td_volumes->innertext));\n }\n\n // The Chapters\n // <td class='borderClass ac bgColor0' width='50'> - </td>\n if(trim($td_chapters->innertext) !== '-') {\n $manga->set('chapters', (int)trim($td_chapters->innertext));\n }\n\n // The Publish-From Date\n // MM-DD-YY (and ?? if unknown, - if everything is unknown)\n $mal_publish_date_from = trim($td_publish_date_from->innertext);\n if($mal_publish_date_from !== '-') {\n $manga->set('publish_dates//from', (array)Time::convert($mal_publish_date_from));\n }\n\n // The Publish-To Date\n $mal_publish_date_to = trim($td_publish_date_to->innertext);\n if($mal_publish_date_to !== '-') {\n $manga->set('publish_dates//to', (array)Time::convert($mal_publish_date_to));\n }\n \n // The Members who have it in their list\n // <td class='borderClass ac bgColor0' width='75'> 22,585 </td>\n $manga->set('members_inlist', (int)str_replace(',', '', trim($td_members_inlist->innertext)));\n\n return $manga;\n\n }", "title": "" }, { "docid": "53d16b37b05c51bdeb51985e143efe92", "score": "0.5304228", "text": "function roblib_search_preprocess_roblib_search_wrapper(&$variables) {\n //not yet implemented\n}", "title": "" }, { "docid": "f5fe693adb12c0630542415e0f1e7a0c", "score": "0.5302028", "text": "protected function _beforeWalk() {\n if (!$this->_result instanceof Garp_Db_Table_Rowset) {\n $this->_result = array($this->_result);\n }\n }", "title": "" }, { "docid": "83f8bfae61e2a88bc36d89444e72d5de", "score": "0.5295496", "text": "function normalize_results ( $results ) {\n\t// title, author, date, url, summary, source_name, source_url\n\t// see: https://github.com/CrossRef/rest-api-doc/blob/master/api_format.md\n\t$normalized_results = array();\n\t// do we actually have any results\n\tif ($results['message']['items']) {\n\t\t// process our results and put into array\n\t\tforeach ($results['message']['items'] as $item) {\n\t\t\t$normalized_item = array();\n\t\t\t// skip over any records with info we don't care about (that lack titles, basically)\n\t\t\tif( empty($item['title']) ) { continue; } \n\t\t\telseif( is_array($item['title']) ) { $title = $item['title'][0]; }\n\t\t\telseif( is_string($item['title']) ) { $title = $item['title']; }\n\t\t\telse { continue; } // if it's something else weird, just skip out\n\n\t\t\t$normalized_item['api'] = 'Crossref';\n\n\t\t\t$normalized_item['title'] = $title;\n\t\t\tif ( is_array($item['issued']) ) \t{ $normalized_item['date'] = $item['issued']['date-parts'][0][0]; }// print_r($item['issued'], true); } // $item['issued'][0]; }\n\t\t\tif ( is_string($item['DOI']) )\t\t{ $normalized_item['url'] = 'https://doi.org/' . $item['DOI']; }\n\t\t\tif ( is_array($item['author']) ) \t{ \n\t\t\t\t// sort of like http://blog.apastyle.org/apastyle/2011/11/the-proper-use-of-et-al-in-apa-style.html\n\t\t\t\t$normalized_item['author'] = $item['author']['0']['family-name'];\n\t\t\t\tif ( $item['author']['1']['family-name'] ) { $normalized_item['author'] .= \"et al.\"; } // more than 1 author\t\n\t\t\t\telseif ( $item['author']['0']['given-name'] ) { $normalized_item['author'] .= \", \" . $item['author']['0']['given-name']; } // 1 author only\n\t\t\t\t//print_r($item['author'][0], true); \n\t\t\t}\n\t\t\tif( $item['publisher'] ) { $normalized_item['source_name'] = $item['publisher']; }\n\n\t\t\t//if ( is_array($item['subject']) )\t{ $normalized_item['summary'] = print_r($item['subject'][0], true); } // implode( ', ', $item['subject'] ); }\n\n\t\t\t//error_log( \"CR normalized item: \" . print_r($normalized_item, true) );\n\n\t\t\t//error_log( \"CR item: \" . print_r($item, true) );\n\n\n\t\t\t$normalized_results[] = $normalized_item;\n\t\t}\n\t\treturn $normalized_results;\n\t}\n\telse { \n\t\t// no results to normalize\n\t\treturn ''; \n\t}\n}", "title": "" }, { "docid": "d40ed7f93ea71cb37a5fc6515a110cde", "score": "0.52953017", "text": "protected function get_results($result_var){\n\t\t//sets them into last_results and returns those results\n\t}", "title": "" }, { "docid": "3d74cf7c194a102cbf099ae0a98f0e0e", "score": "0.52896786", "text": "protected function _formatResult(Model $Model, array &$result) {\n\t\tforeach ($result as &$data) {\n\t\t\t$data = array($Model->alias => $data);\n\t\t}\n\t}", "title": "" }, { "docid": "0767ce8b53189c24c5032c75e516f142", "score": "0.5287634", "text": "protected static function extractQueryResults($results) {\n $query_results = [];\n foreach($results as $result) {\n $id = @$result['entity']['key']['path'][0]['id'];\n $key_name = @$result['entity']['key']['path'][0]['name'];\n $props = $result['entity']['properties'];\n $title = $props[self::TITLE_NAME]->getStringValue();\n $price = $props[self::PRICE_NAME]->getStringValue();\n $date = $props[self::DATE_NAME]->getDateTimeValue();\n\n $ad_model = new AdModel($title, $price, $date);\n $ad_model->setKeyId($id);\n $ad_model->setKeyName($key_name);\n // Cache this read ad\n $ad_model->onItemWrite();\n\n $query_results[] = $ad_model;\n }\n return $query_results;\n }", "title": "" }, { "docid": "30156fd33a35414dbc1955ab91284e50", "score": "0.5286713", "text": "function cai_2012_preprocess_search_result(&$variables) {\n // Removing just the user name is documented here, deemed too complicated http://data.agaric.com/preprocess-from-module-removing-content-author-from-drupal-7-search-results\n $variables['info'] = '';\n}", "title": "" }, { "docid": "f1ce6a1c99358d6cc1e9079ec0f39ba8", "score": "0.5279948", "text": "public function prepareResult(): array\n {\n $result = [];\n $aspects = AspectCollector::list();\n foreach ($aspects as $type => $collections) {\n foreach ($collections as $aspect => $target) {\n $result[$aspect][$type] = $target;\n }\n }\n return $result;\n }", "title": "" }, { "docid": "5d4383fde140d37bf51d8f6dd94bfd13", "score": "0.5272962", "text": "public function transformResult() {\n\t\t// Let the row processor object instance handle all result transformations\n\t\t$this->resultData = $this->rowProcessor->transformResult();\n\t}", "title": "" }, { "docid": "658fdddee51e6c77bb79edf653735c5a", "score": "0.5269521", "text": "function setToArray($results, & $keywordMessages) {\n\t$resultCount = count($results);\n\tfor ($i = 0; $i < $resultCount; $i++) {\n\t\t$result = $results[$i];\n\t\t$keywordMessage['profile_image_url'] = $result[profile_image_url];\n\t\t$keywordMessage['from_user'] = $result[from_user];\n\t\t$keywordMessage['created_at'] = strtotime($result[created_at]);\n\t\t$keywordMessage['profile_image_url'] = $result[profile_image_url];\n\t\t$keywordMessage['text'] = $result[text];\n\t\tarray_push($keywordMessages, $keywordMessage);\n\t}\n}", "title": "" }, { "docid": "0a0448ba25b56bbe3a33456f403a1d0c", "score": "0.5267431", "text": "public function filter($results);", "title": "" }, { "docid": "6879f873c3730af07b49d372a20f87ec", "score": "0.52609146", "text": "public function getResults();", "title": "" }, { "docid": "6879f873c3730af07b49d372a20f87ec", "score": "0.52609146", "text": "public function getResults();", "title": "" }, { "docid": "6879f873c3730af07b49d372a20f87ec", "score": "0.52609146", "text": "public function getResults();", "title": "" }, { "docid": "6879f873c3730af07b49d372a20f87ec", "score": "0.52609146", "text": "public function getResults();", "title": "" }, { "docid": "bdbbed6d1b7fcdd6202b781bd2680f6b", "score": "0.52557445", "text": "function afterFind($results, $primary = false) {\n\t\tif ($primary === true) {\n\t\t\tif (Set::check($results, '0.0')) {\n\t\t\t\t$fieldNames = array_keys($results[0][0]);\n\t\t\t\tforeach ($results as $key => $value) {\n foreach ($fieldNames as $fieldName) {\n\t\t\t\t\t $results[$key][$this->alias][$fieldName] = $value[0][$fieldName];\n }\n\t\t\t\t\tunset($results[$key][0]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $results;\n\t}", "title": "" }, { "docid": "1133d803cb069b964c8d062acfd88a55", "score": "0.5247807", "text": "function philosophy_highlight_search_results($text)\n\t{\n\t\tif (is_search()) {\n\t\t\t$pattern = '/(' . join('|', explode(' ', get_search_query())) . ')/i';\n\t\t\t$text = preg_replace($pattern, '<span class=\"search-highlight\">\\0</span>', $text);\n\t\t}\n\t\treturn $text;\n\t}", "title": "" }, { "docid": "3f14e774d0d58744355b7b1e3a2e90c6", "score": "0.5239591", "text": "function level_omega_preprocess_apachesolr_currentsearch(&$vars, $hook) {\n drupal_add_js(drupal_get_path('module', 'apachesolr') . '/apachesolr.js');\n $vars['current_search'] = filter_xss($_GET['text']);\n if ($vars['current_search'] == \"*:*\") {\n $vars['current_search'] = ''; \n }\n\n $views_query = apachesolr_current_query();\n $filter_search = $views_query->get_filters('company_transactions');\n if (isset($filter_search[0]['#value'])) {\n $transaction_filter = $filter_search[0]['#value'];\n $filter_elements = explode('|',$transaction_filter);\n $facet_text .= theme('ui_date',strtotime($filter_elements[0]),constant ('LEVEL_PLATFORM_TRANSACTION_TYPES_' . $filter_elements[1]) . ' on '); \n $vars['transaction_search'] = $facet_text; \n $title = $facet_text;\n }\n \n\n if ($title) {\n drupal_set_title($title); \n }\n}", "title": "" }, { "docid": "ddac10dc9a8da93a047909227057e560", "score": "0.5232727", "text": "function indeed_job_results( $api_results = NULL, $search = NULL ) {\n\tif( !$api_results ) return false;\n \n\t$total = count($api_results);\n\t$search = ( $search ) ? \" found for &ldquo;<strong>$search</strong>&rdquo;\" : \"\";\n \n\t$html = \"<section class='jobs'>\";\n\t$html .= \"<header>\";\n\t$html .= \"<h2>$total jobs$search</h2>\";\n\t$html .= \"</header>\";\n\tforeach ( $api_results as $job ) {\n\t\t$date = explode(' ', $job->date);\n\t\t$formattedDate = $date[2] . ' ' . $date[1] . ', ' . $date[3];\n \n\t\t$html .= \"<article>\";\n\t\t$html .= \"<h3><a href='{$job->url}' target='_blank'>{$job->jobtitle}</a></h3>\";\n\t\t$html .= \"<p class='details'>{$job->formattedLocation} <em>&ndash;</em> $formattedDate</p>\";\n\t\t$html .= \"</article>\";\n\t}\n\t$html .= \"</section><!--// end .jobs -->\";\n \n\treturn $html;\n}", "title": "" }, { "docid": "f1aafb1c0fcd96edf649134c949c24a9", "score": "0.5218932", "text": "function cfs_posts_results_action($posts) {\n\t\tglobal $wp_the_query,$search;\n\t\tif (isset($wp_the_query->query_vars['advanced-search']) && $wp_the_query->query_vars['advanced-search'] == 1) {\n\t\t\tif (cfs_param('cfs_global_search') == '1') {\n\t\t\t\tforeach($posts as $key => $post) {\n\t\t\t\t\t$deets = get_blog_details($post->blog_id);\n\t\t\t\t\t$posts[$key]->siteurl = $deets->siteurl;\n\t\t\t\t\t$posts[$key]->blogname = $deets->blogname;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// unset the advanced-search var on the query object so that these filters aren't running again\n\t\t\tunset($wp_the_query->query_vars['advanced-search']);\n\t\t}\n\t\treturn $posts;\n\t}", "title": "" }, { "docid": "75e581a8b1b81d04a117392e650ce82d", "score": "0.52155125", "text": "function proccessQueryResult ( $result ) {\n $resultArray = array();\n while ( $row = mysql_fetch_assoc($result) ) {\n array_push($resultArray, $row);\n }\n return $resultArray;\n }", "title": "" }, { "docid": "f485e66bb475d0a4cca1cd309afcfbe1", "score": "0.5213812", "text": "public function parseResults(array $results, $index);", "title": "" }, { "docid": "e042a75518e083935272f0bc0425fc6f", "score": "0.52130425", "text": "public function resultFilter();", "title": "" }, { "docid": "4bd1ff04a88c4424d0a5321d1be495d5", "score": "0.5202536", "text": "function get_search_results( $request ) {\n\n\t\t$keyword = $request['s'];\n\n\t\t$products = new \\WP_Query(\n\t\t\t[\n\t\t\t\t'ep_integrate' => true,\n\t\t\t\t'post_type' => 'product',\n\t\t\t\t's' => $keyword,\n\t\t\t\t'posts_per_page' => 3,\n\t\t\t]\n\t\t);\n\n\t\t$posts = new \\WP_Query(\n\t\t\t[\n\t\t\t\t'ep_integrate' => true,\n\t\t\t\t'post_type' => 'page',\n\t\t\t\t's' => $keyword,\n\t\t\t]\n\t\t);\n\n\t\t$categories = new \\WP_Query(\n\t\t\t[\n\t\t\t\t'ep_integrate' => true,\n\t\t\t\t'search_fields' => [\n\t\t\t\t\t'taxonomies' => [ 'product_cat' ],\n\t\t\t\t],\n\t\t\t\t's' => $keyword,\n\t\t\t]\n\t\t);\n\n\t\t$response = [];\n\n\t\t$response['products'] = array_map(\n\t\t\t__NAMESPACE__ . '\\strip_response_post',\n\t\t\t$products->posts\n\t\t);\n\t\t$response['posts'] = array_map(\n\t\t\t__NAMESPACE__ . '\\strip_response_post',\n\t\t\t$posts->posts\n\t\t);\n\t\t$response['categories'] = array_map(\n\t\t\t__NAMESPACE__ . '\\strip_response_post',\n\t\t\t$categories->posts\n\t\t);\n\n\t\treturn new \\WP_REST_Response( $response );\n\t}", "title": "" }, { "docid": "cd931d3175d65d1fecf15f5786687d92", "score": "0.52011466", "text": "function asu_isearch_get_field_solr_mappings() {\n\n $map = array(\n //'status' => 'status',\n 'field_isearch_displayname' => 'displayName',\n 'field_isearch_firstname' => 'firstName',\n 'field_isearch_lastname' => 'lastName',\n 'field_isearch_employment_title' => 'primaryTitle',\n 'field_isearch_eid' => 'eid',\n 'field_isearch_asurite_id' => 'asuriteId',\n 'field_isearch_email' => 'emailAddress',\n 'field_isearch_phone' => 'phone',\n 'field_isearch_fax' => 'fax',\n 'field_isearch_campus_building' => 'addressLine1',\n 'field_isearch_campus_room' => 'addressLine2',\n 'field_isearch_primary_campus' => 'primaryJobCampus',\n 'field_isearch_photo_preference' => 'photoPreference',\n 'field_isearch_photo_permission' => 'photoPermission',\n 'field_isearch_social_twitter' => 'twitterLink',\n 'field_isearch_social_facebook' => 'facebook',\n 'field_isearch_social_linkedin' => 'linkedin',\n 'field_isearch_social_googleplus' => 'googlePlus',\n 'field_isearch_social_personalweb' => 'website',\n 'field_isearch_short_bio' => 'shortBio',\n 'field_isearch_bio' => 'bio',\n 'field_isearch_education' => 'education',\n 'field_isearch_cv_url' => 'cvUrl',\n 'field_isearch_rsrch_website' => 'researchWebsite',\n 'field_isearch_rsrch_interests' => 'researchInterests',\n 'field_isearch_rsrch_group' => 'researchGroup',\n 'field_isearch_rsrch_activity' => 'researchActivity',\n 'field_isearch_rsrch_publications' => 'publications',\n 'field_isearch_tch_website' => 'teachingWebsite',\n 'field_isearch_tch_courses' => 'courses',\n 'field_isearch_tch_presentations' => 'presentations',\n 'field_isearch_honors_awards' => 'honorsAwards',\n 'field_isearch_editorships' => 'editorships',\n 'field_isearch_prof_associations' => 'professionalAssociations',\n 'field_isearch_graduate_faculties' => 'graduateFaculties',\n 'field_isearch_work_history' => 'workHistory',\n 'field_isearch_service' => 'service',\n );\n\n return $map;\n\n}", "title": "" }, { "docid": "0028fbbade355f50e9c407b1fc0d9711", "score": "0.52003294", "text": "public static function searchOptions(\\Elgg\\Hook $hook) {\n\t\t\n\t\tif (!self::handleSearch()) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$return = $hook->getValue();\n\t\tif (elgg_extract('_elasticsearch_supported', $return) === false) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$sort = elgg_extract('sort', $return, 'relevance');\n\t\tif ($sort === 'time_created' && !get_input('sort')) {\n\t\t\t// default sorting by Elgg is time_created\n\t\t\t$sort = 'relevance';\n\t\t}\n\t\t\n\t\t$return['sort'] = $sort;\n\t\t$return['order'] = elgg_extract('order', $return, 'desc');\n\t\t\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "205295b5a6ec640bf15302f5c710255b", "score": "0.5198336", "text": "function searchResults($hit)\n {\n echo \"<a href=\\\"KVR\\\\\".$hit['_source']['doc_id'].\"\\\"><h4>\";\n\n if ($hit['_source']['inhoud'] == \"\")\n {\n if ($hit['_source']['trefwoorden'] == \"\")\n {\n echo $hit['_source']['doc_id'];\n }\n else\n {\n $splitTref = explode(\" \", $hit['_source']['trefwoorden']);\n\n foreach (array_slice($splitTref, 0, 15) as $token)\n {\n echo $token;\n echo \" \";\n }\n\n if (count($splitTref) > 15) {\n echo \"...\";\n }\n }\n } else {\n $splitInhoud = explode(\" \", $hit['_source']['inhoud']);\n //$splitInhoud = explode(\" \", $hit['highlight']['inhoud'][0]);\n\n foreach (array_slice($splitInhoud, 0, 15) as $token)\n {\n echo $token;\n echo \" \";\n }\n\n if (count($splitInhoud) > 15) {\n echo \"...\";\n }\n }\n echo \"</h4></a>\";\n\n\n\n // some document contents\n $splitVraag = explode(\" \",$hit['_source']['vraag']);\n\n foreach (array_slice($splitVraag, 0, 50) as $token)\n {\n echo $token;\n echo \" \";\n }\n\n if (count($splitVraag) > 50)\n {\n echo \"...\";\n }\n elseif (count($splitVraag) < 50)\n {\n $splitAnt = explode(\" \", $hit['_source']['antwoord']);\n\n foreach (array_slice($splitAnt, 0, 50 - count($splitVraag)) as $token)\n {\n echo $token;\n echo \" \";\n }\n\n echo \"...\";\n }\n echo \"<br>\";\n\n // doc-id\n echo \"<span class=\\\"label label-info\\\">\".\"Jaar: \".$hit['_source']['jaar'].\"</span> \";\n $temp = explode(\", \",$hit['_source']['partij']);\n $temp = array_unique($temp);\n echo \"<span class=\\\"label label-default\\\">\".\"Partij: \";\n $i = 0;\n foreach ($temp as $word) {\n echo $word;\n if ($i != count($temp) - 1)\n echo \", \";\n $i++;\n }\n echo \"</span>\";\n }", "title": "" }, { "docid": "332f2d17345950993259fadd919d5c0e", "score": "0.5193817", "text": "function search_result_manual($search_result)\r\n\t{\r\n\t\tif($search_result != NULL)\r\n\t\t{\r\n\t\t\t// DEFINES LOAD CRUDS_MODEL FORM MODELS FOLDERS\r\n\t\t\t$this->load->model('Crud_model');\r\n\r\n\t\t\t$result = $this->Crud_model->search_items_stock($search_result);\r\n\t\t\t//LOAD FRESH CONTENT AVAILABLE IN TEMP TABLE\r\n\t\t\t$data['search_result'] = $result;\r\n\t\t\t$this->load->view('search_list.php',$data);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "96e924c39d6701c96af7006c43918f6c", "score": "0.51883185", "text": "function asSearchResult(){\r\n\r\n\t\t$trunc10 = new FormatTruncate(10);\r\n\t\t$trunc20 = new FormatTruncate(20);\r\n\t\t$trunc35 = new FormatTruncate(35);\r\n\t\t$trunc100 = new FormatTruncate(100);\r\n\r\n\t\t$this->query\r\n\t\t\t->clearSelect()\r\n\t\t\t->select(\"DISTINCT ON (a.id) a.id\", \"activity_id\", [\"is_visible\" => true])\r\n\t\t\t->select(\"a.name\", \"Subject\", [\r\n\t\t\t\t\t\"add_classes\" => \"left\",\r\n\t\t\t\t\t\"formatter\" => new FormatChainedLink($trunc35, \"/activities/detail?activity_id={ACTIVITY_ID}\")\r\n\t\t\t\t\t])\r\n\t\t\t->select(\"a.description\", null, [\"formatter\" => $trunc100])\r\n\t\t\t->select(\"a.activity_type_id\")\r\n\t\t\t->select(\"activity_status_id\", \"Status\")\r\n\t\t\t->select(\"a.created_timestamp\")\r\n\t\t\t->paginate(10)\r\n\t\t\t->makeSortable()\r\n\t\t\t->orderBy(\"a.created_timestamp\", \"desc\")\r\n\t\t;\r\n\r\n\t\t$query = $this->query;\r\n\t\t$dataset = $this->query->returnDataSet();\r\n\r\n\t\t//var_dump($query.\"\");\r\n\t\treturn $this->query->returnDataSet();\r\n\r\n\t}", "title": "" }, { "docid": "0b005692c7f65e4b05243dc5b229b40d", "score": "0.5174304", "text": "function myResultMapper(array $row)\n{\n\t$data = array();\n\tif (isset($row['query_id'])) {\n\t\t$data['myQueryId'] = $row['query_id'];\n\t}\n\n\tif (isset($row['result'])) {\n\t\t$data['myResult'] = $row['result'];\n\t}\n\n\treturn $data;\n}", "title": "" }, { "docid": "56d03cc2490f482802a1b9ba47443d11", "score": "0.5174289", "text": "protected function _getFindologicSearchResult(){\n \treturn $this->getLayer()->getProductCollection()->getFindologicSearchResult();\n }", "title": "" }, { "docid": "67a94acb6b208fb58e49274ba2781fb1", "score": "0.51720357", "text": "function FaqsResults($data, $form){\n \t$data = array(\n 'Results' => $this->FaqsEntries(),\n 'Query' => $form->getSearchQuery(),\n 'Title' => _t('FaqsHolder.SEARCHRESULTS', 'Faqs Search Results'));\n return $this->customise($data)->renderWith(array('FaqsHolder', 'FaqsSearchResults', 'Page'));\n }", "title": "" }, { "docid": "cccc161980f5aeaf8ac1ed84ff17d83b", "score": "0.5170927", "text": "abstract protected function convert(array $result) : array;", "title": "" }, { "docid": "525670baa86131923d4e9e75f5b6fdd1", "score": "0.51674294", "text": "public function filterResultArray(array $result): array;", "title": "" }, { "docid": "5850c2d29c38852bd33b60e7be9a4468", "score": "0.515357", "text": "public static function searchFields(\\Elgg\\Hook $hook) {\n\t\t\n\t\tif (!self::handleSearch()) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif ($hook->getParam('_elasticsearch_supported') === false) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$value = (array) $hook->getValue();\n\t\t\n\t\t$defaults = [\n\t\t\t'attributes' => [],\n\t\t\t'metadata' => [],\n\t\t];\n\t\t\n\t\t$metadata_should_be_attribute = [\n\t\t\t'description',\n\t\t\t'name',\n\t\t\t'tags',\n\t\t\t'title',\n\t\t\t'username',\n\t\t];\n\t\t\n\t\t$value = array_merge($defaults, $value);\n\t\t\n\t\tforeach ($value['metadata'] as $index => $name) {\n\t\t\tif (!in_array($name, $metadata_should_be_attribute)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t$value['attributes'][] = $name;\n\t\t\tunset($value['metadata'][$index]);\n\t\t}\n\t\t\n\t\t$value['attributes'] = array_values(array_unique($value['attributes']));\n\t\t\n\t\treturn $value;\n\t}", "title": "" }, { "docid": "fb8b2a178f6878581465fdbcb74a9cda", "score": "0.5145122", "text": "function usasearch_fetch_results($query, $group = NULL, $page = 0) {\n $action_domain = get_site_option('domain', 'search.usa.gov');\n // Set affiliate_name from variables table, checking for a value using ternary operator.\n $affiliate_name = (get_site_option('affiliate_name') != '') ? get_site_option('affiliate_name') : '';\n $api_key = get_site_option('api_key', '') ? get_site_option('api_key', '') : '';\n $search_version = get_site_option('search_version', '');\n // Convert from zero-based numbering to one-based.\n if($page != 0)\n $page = $page;\n else\n $page = 1;\n\n // TODO put site into a variable\n $scope = $group?\"site:www.data.gov/$group+\":\"\";\n //$scope = $group?\"site:www.data.gov/communities+\":\"\";\n if ($search_version=='v1'){\n $query = \"query=\" . $scope . urlencode($query);\n $query .= \"&affiliate=$affiliate_name\";\n $query .= \"&api_key=$api_key\";\n $query .= \"&page=$page\" ;\n $query .= \"&index=web\";\n\n\n\n //echo \"the value of the query in usa search function is==> \".\"http://$action_domain/api/search.json?$query\";\n\n $response = wp_remote_get(\"https://$action_domain/api/search.json?$query\");\n }\n // new Api Query\n if ($search_version=='v2'){\n $page=($page-1)*10;\n $query = \"query=\" . $scope . urlencode($query);\n $query .= \"&affiliate=$affiliate_name\";\n $query .= \"&access_key=$api_key\";\n $query .= \"&offset=$page\";\n $query .= \"&limit=20\";\n //echo \"https://$action_domain/api/v2/search?$query\";\n $response = wp_remote_get(\"https://$action_domain/api/v2/search?$query\");\n }\n return $response;\n}", "title": "" }, { "docid": "5ccd6096ed389b019de6ac5afebcb5d5", "score": "0.51395446", "text": "public static function processSearchRequest()\n\t{\n\t\tstatic::checkRequiredModules();\n\n\t\t$parameters = static::processSearchGetParameters();\n\n\t\t$result = static::processSearchGetList($parameters);\n\t\t$result = static::processSearchGetAdditional($result);\n\n\t\t// drop unwanted data\n\t\tforeach($result['ITEMS'] as &$item)\n\t\t{\n\t\t\tunset($item['LEFT_MARGIN']);\n\t\t\tunset($item['RIGHT_MARGIN']);\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "7b9ac4342a603058d3e1be431ac7d38a", "score": "0.51368016", "text": "function trj_golem_process_search($trj_golem_data) {\n\n\t\t// Access the wordpress database object\n\t\tglobal $wpdb;\n\n\t\t/* ---------- PREP USER SUBMITTED DATA ---------- */\n\t\t$trj_golem_make = isset ($trj_golem_data['script']['user_query_vars']['trj_golem_make']) ? \"&trj_golem_make={$trj_golem_data['script']['user_query_vars']['trj_golem_make']}\" : NULL;\n\t\t$trj_golem_numresults = isset ($trj_golem_data['script']['user_query_vars']['trj_golem_numresults']) ? \"&trj_golem_numresults={$trj_golem_data['script']['user_query_vars']['trj_golem_numresults']}\" : NULL;\n\t\t$trj_golem_offset = isset ($trj_golem_data['script']['user_query_vars']['trj_golem_offset']) ? \"&trj_golem_offset={$trj_golem_data['script']['user_query_vars']['trj_golem_offset']}\" : NULL;\n\n\t\t// Build URL and query string\n\t\t$url = 'https://' . $_SERVER['HTTP_HOST'] . strtok($_SERVER[\"REQUEST_URI\"],'?') . '?page_id=' . $trj_golem_data['init']['plugin_home_page'] . '&trj_golem_script=' . $trj_golem_data['current_script'];\n\t\t$url .= !is_null($trj_golem_make) ? $trj_golem_make: '';\n\t\t$url .= !is_null($trj_golem_numresults) ? $trj_golem_numresults: '';\n\t\t$url .= !is_null($trj_golem_offset) ? $trj_golem_offset: '';\n\n\t\t// Redirect\n\t\twp_redirect($url, $status=303);\n\n\t\treturn;\n\t\t}", "title": "" }, { "docid": "755161382d89b47752ca84681f2e0b1a", "score": "0.5129267", "text": "private function _getSearchResult() {\n $excludes = array( 'the', 'and', 'or' );\n $SearchFor = NoNull($this->settings['for'], $this->settings['search_for']);\n $InclFull = YNBool(NoNull($this->settings['incl_html'], $this->settings['incl_full']));\n $Count = nullInt($this->settings['results'], $this->settings['count']);\n $Uniques = array();\n\n if ( strlen($SearchFor) <= 0 ) {\n $this->_setMetaMessage(\"Please enter some search criteria\", 400);\n return false;\n }\n\n $CleanScores = '';\n $words = explode(' ', strtolower($SearchFor));\n if ( count($words) > 0 ) {\n foreach ( $words as $word ) {\n $word = NoNull($word);\n if ( strlen($word) > 1 && in_array($word, $excludes) === false && in_array($word, $Uniques) === false ) {\n $Uniques[] = $word;\n $CleanScores .= tabSpace(9) . \" IFNULL(ROUND((CHAR_LENGTH(LOWER(CONCAT(IFNULL(po.`title`, ''), ' ', po.`value`, ' ', po.`canonical_url`, ' ', IFNULL(geo.`value`, ''), ' ', IFNULL(tags.`tags`, '')))) -\\n\" .\n tabSpace(13) . \" CHAR_LENGTH(REPLACE(LOWER(CONCAT(IFNULL(po.`title`, ''), ' ', po.`value`, ' ', po.`canonical_url`, ' ', IFNULL(geo.`value`, ''), ' ', IFNULL(tags.`tags`, ''))), '\" . sqlScrub($word) . \"', ''))) / CHAR_LENGTH('\" . sqlScrub($word) . \"')), 0) +\\n\";\n }\n }\n }\n\n // Ensure We Still Have Some Search Criteria\n if ( count($Uniques) <= 0 ) {\n $this->_setMetaMessage(\"Please enter some more specific search criteria\", 400);\n return false;\n }\n if ( $Count <= 0 ) { $Count = 50; }\n if ( $Count > 100 ) { $Count = 100; }\n\n $ReplStr = array( '[ACCOUNT_ID]' => nullInt($this->settings['_account_id']),\n '[CHANNEL_ID]' => nullInt($this->settings['_channel_id']),\n '[SITE_TOKEN]' => sqlScrub(NoNull($this->settings['site_token'])),\n '[SCORING]' => $CleanScores,\n '[COUNT]' => nullInt($Count, 50),\n );\n $sqlStr = readResource(SQL_DIR . '/search/getSearchResult.sql', $ReplStr);\n $rslt = doSQLQuery($sqlStr);\n if ( is_array($rslt) ) {\n $CleanStr = array( '[RNRN]' => '', '</p> <p>' => '</p><p>', '</p> ' => '</p>', ' ' => ' ' );\n $HighLights = array();\n foreach ( $Uniques as $word ) {\n $HighLights[$word] = '<span class=\"highlight\">' . $word . '</span>';\n }\n\n require_once(LIB_DIR . '/posts.php');\n $post = new Posts($this->settings);\n\n $data = array();\n foreach ( $rslt as $Row ) {\n $html = $post->getMarkdownHTML($Row['value'], nullInt($Row['post_id']), false, true);\n $html = str_replace('</p>', \"</p>[RNRN]\", $html);\n $snip = $this->_getHighlights($html, $Uniques);\n\n // So Long As We Have Text, Return the Object\n if ( NoNull($snip['simple']) != '' ) {\n // Include the Text and rendered HTML if Requested\n if ( $InclFull ) {\n $snip['text'] = str_ireplace(array_keys($CleanStr), array_values($CleanStr), strip_tags($html));\n $snip['html'] = str_ireplace(array_keys($CleanStr), array_values($CleanStr), $html);\n }\n\n $data[] = array( 'guid' => NoNull($Row['guid']),\n 'title' => ((NoNull($Row['title']) != '') ? NoNull($Row['title']) : false),\n 'content' => $snip,\n\n 'url' => NoNull($Row['canonical_url']),\n 'privacy' => NoNull($Row['privacy_type']),\n 'type' => NoNull($Row['type']),\n 'score' => nullInt($Row['score']),\n\n 'publish_at' => date(\"Y-m-d\\TH:i:s\\Z\", strtotime($Row['publish_at'])),\n 'publish_unix' => strtotime($Row['publish_at']),\n 'expires_at' => ((NoNull($Row['expires_at']) != '') ? date(\"Y-m-d\\TH:i:s\\Z\", strtotime($Row['expires_at'])) : false),\n 'expires_unix' => ((NoNull($Row['expires_at']) != '') ? strtotime($Row['expires_at']) : false),\n\n 'author' => array( 'name' => NoNull($Row['name']),\n 'display_name' => NoNull($Row['display_name']),\n 'avatar' => NoNull($Row['avatar_url']),\n ),\n );\n }\n }\n unset($post);\n\n // If We Have Data, Return It\n if ( count($data) > 0 ) { return $data; }\n }\n\n // If We're Here, There's Nothing\n return array();\n }", "title": "" }, { "docid": "6a8000be29385187133a72c05a6d33bb", "score": "0.5128747", "text": "public function return_results_objects($result){\n $objectsArr = [];\n foreach($result as $result){\n $obj = new $this->model();\n $obj->populate_object_data($result);\n $objectsArr[] = $obj;\n }\n return $objectsArr;\n }", "title": "" }, { "docid": "5d2ae903aab17da90fbb44cf047d1e19", "score": "0.51276875", "text": "private static function getResults($input)\n\t{\n\t\tif ($input[\"queryType\"] == \"nama_klien\") {\n\t\t\t$input[\"nama_klien\"] = $input[\"queryInput\"];\n\t\t\treturn KlienSearch::getResults($input);\n\t\t} elseif ($input[\"queryType\"] == \"no_reg\") {\n\t\t\t$input[\"no_reg\"] = $input[\"queryInput\"];\n\t\t\treturn KasusSearch::getResults($input);\n\t\t}\n\t}", "title": "" }, { "docid": "1fc6210b5e23a9133c5c1b59893fbb27", "score": "0.5124638", "text": "function afterFind(&$model, $results, $primary) {\n foreach ($this->settings[$model->alias] as $field) {\n $results[$model->alias][$field] = unserialize($results[$model->alias][$field]);\n }\n return $results;\n }", "title": "" }, { "docid": "996b933d0bdd95aaf7444f4f7f4d59fb", "score": "0.5120527", "text": "function pass_search_result_data_back_to_frontend() {\n\n\t// Make sure our secret security measure checks out (see ajaxSearchl10n above).\n\tcheck_admin_referer( 'ajax_search', 'nonce' );\n\n\t/*\n\t * sanitize_text_field\n\t *\n\t * When our AJAX request comes over -over JavaScript we save the search term, e.g.\n\t * \"You're Awesome Post\" in a variable called \"s\". Here we just grab that value and make\n\t * sure it's not passing any bad data that could corrupt the system using sanitize_text_field().\n\t */\n\t$s = sanitize_text_field( $_REQUEST['s'] );\n\n\t// This checks to see if SearchWP's Querying engine is available, if it's not we default to normal WP_Query which WordPress uses (and is less powerful).\n\tif ( ! class_exists( 'SWP_Query' ) ) {\n\n\t\t// Use default WP_Query search (just as a fallback, because we don't want things to just not work because someone deactivated SearchWP).\n\t\t$query = new WP_Query( array(\n\t\t\t's' => $s, // The search term sent over via AJAX.\n\t\t\t'fields' => 'ids', // We just want ID's here so we can only get what we need later.\n\t\t\t'posts_per_page' => 20, // More results, we may want to do something more advanced here (if you comment this out it will follow Dashboard > General > Reading settings).\n\t\t) );\n\n\t\t// Send back the results for WP_Query (generic search results). Note, the script will die() here and not continue.\n\t\twp_send_json_success( get_live_ajax_get_post_data_from_ids( $query->get_posts() ) );\n\t}\n\n\t/*\n\t * SWP_Query\n\t *\n\t * So we must have SWP_Query available, so let's use that because it's going to search through WordPress\n\t * using SearchWP!\n\t *\n\t * See https://searchwp.com/docs/swp_query/ for more documentation.\n\t *\n\t * This works a lot like WP_Query but is more powerful.\n\t */\n\t$query = new SWP_Query( array(\n\t\t's' => $s, // The search term sent over via AJAX.\n\t\t'fields' => 'ids', // We just want ID's here so we can only get what we need later.\n\t\t'posts_per_page' => 20, // More results, we may want to do something more advanced here (if you comment this out it will follow Dashboard > General > Reading settings).\n\t) );\n\n\t// And....send data back to the frontend to be processed in JavaScript.\n\twp_send_json_success( get_live_ajax_get_post_data_from_ids( $query->get_posts() ) );\n}", "title": "" }, { "docid": "1a85d32c883cadc142ede3fe861d20a6", "score": "0.51087546", "text": "public function onTags()\n {\n $term = input('q');\n\n $searchField = 'name';\n $tags = Tag::where($searchField, 'LIKE', '%'.$term.'%')\n ->orderByRaw(\"CASE WHEN {$searchField} = '{$term}' THEN 0 \n WHEN {$searchField} LIKE '{$term}%' THEN 1 \n WHEN {$searchField} LIKE '%{$term}%' THEN 2 \n WHEN {$searchField} LIKE '%{$term}' THEN 3 \n ELSE 4\n END, {$searchField} ASC\")\n ->get()\n ;\n\n $result = [];\n\n // add new result\n $result[$term] = $term;\n\n foreach ($tags as $tag){\n $result[$tag->name] = $tag->name;\n }\n\n // Render the partial and return it as our list item\n return $result;\n }", "title": "" }, { "docid": "95ccb0bfc2fbaabe9c2cebc1799af0d4", "score": "0.5101165", "text": "public function reduceSearchResult(array $results, array $extraField = []): array {\n foreach ($results['results'] as $k => $v) {\n $results['results'][$k] = [\n 'id' => $v['id'],\n 'thumb' => $v['urls']['thumb'],\n 'img' => $v['urls']['regular']\n ];\n if (!empty($extraField)) {\n foreach ($extraField as $vExtra) {\n $results['results'][$k][$vExtra] = $v[$vExtra] ?? '';\n }\n }\n }\n return $results;\n }", "title": "" }, { "docid": "c209da0936beb373ed6fa45eed22ea41", "score": "0.50995743", "text": "private function sanitizeResults()\n {\n // Do not sanitize values returned from database\n if (strtolower($this->format) == 'raw') {\n return;\n }\n\n // Return WP_User instances\n if (strtolower(substr($this->format, 0, 4)) == 'user') {\n $this->results = array_map(function ($result) {\n return get_user_by('id', $result->user_id);\n }, $this->results);\n\n return;\n }\n\n // Return values as WP meta values (unserialized as appropriate)\n $this->results = array_map(function ($result) {\n // List of valid meta keys actually assigned to this result\n $keys = array_intersect(\n array_keys((new MemberFields)->metaFields()),\n array_keys(get_object_vars($result))\n );\n\n foreach ($keys as $key) {\n $result->$key = get_user_meta($result->user_id, $key, true);\n }\n\n return $result;\n }, $this->results);\n }", "title": "" }, { "docid": "baabce8fa83c45fe530ce01321d4a208", "score": "0.50983846", "text": "static function search(){\n \n $query = isset( $_GET['params'] ) ? (array)json_decode( stripslashes( $_GET['params'] )) : exit;\n $query['s'] = isset( $_GET['query'] ) ? $_GET['query'] : exit;\n \n global $wp_query;\n $result = array();\n $result['query'] = $query['s'];\n \n $wp_query = new WP_Query( $query );\n \n if( $wp_query -> have_posts() ){\n foreach( $wp_query -> posts as $post ){\n $result['suggestions'][] = $post -> post_title;\n $result['data'][] = $post -> ID;\n }\n }\n \n echo json_encode( $result );\n exit();\n }", "title": "" }, { "docid": "78733f1660e02a3429bf281c44328e7f", "score": "0.50966334", "text": "public function modifySearchResult(array &$hit) {\n // Set the internal url to a freshly generated full valid uri.\n // (This includes any current language prefix).\n // Todo: Discuss if this can be done better at index time instead.\n $hit['url_internal'] = Url::fromUri('entity:' . $hit['entity'] . '/' . $hit['id'])->toString();\n }", "title": "" }, { "docid": "dd333e1c74e656aeab54b89b2636d677", "score": "0.50961775", "text": "public function parseResults($id, array $results);", "title": "" }, { "docid": "5aab8073dd793c820872aeb1222ab98c", "score": "0.5094918", "text": "function afterFind($results)\n\t{\n\t\tif(empty($results)) return $results;\n\n\t\tif(isset($results['Media'])) {\n\n\t\t\t$results['Media']['media_info'] = json_decode($results['Media']['media_info'],true);\n\n\t\t\t$results['Media']['metadata'] = json_decode($results['Media']['metadata'],true);\n\n\t\t\treturn $results;\n\t\t}\n\n\t\t$MediaStorage = Configure::read('Media.storage');\n\n\t\t$Menu = ClassRegistry::getClass('MenuModel');\n\n\t\t$menu_id_catchall = $Menu->getMenuIdByAction(101); // Media Catch-All menu\n\n $Config = Configure::read('JreviewsSystem.Config');\n\n\t\t$use_catch_all = Sanitize::getBool($Config,'media_url_catchall');\n\n\t\tforeach($results AS $media_id=>$media)\n\t\t{\n\t\t\tif($use_catch_all && $menu_id_catchall) {\n\t\t\t\t $results[$media_id]['Media']['menu_id'] = $menu_id_catchall;\n\t\t\t}\n\t\t\telseif(isset($media['Category']['menu_id'])) {\n\t\t\t\t$results[$media_id]['Media']['menu_id'] = $media['Category']['menu_id'];\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$results[$media_id]['Media']['menu_id'] = '';\n\t\t\t}\n\n\t\t\t// For guest submissions, replace the user's name with the guest's name\n\t\t\tif((int) $media['Media']['user_id'] == 0) {\n\n\t\t\t\t$results[$media_id]['User']['name'] = $results[$media_id]['User']['username'] = $media['Media']['name'];\n\t\t\t}\n\n\t\t\tif(isset($media['Media']['metadata']))\n\t\t\t{\n\t\t\t\t$results[$media_id]['Media']['metadata'] = json_decode($media['Media']['metadata'],true);\n\t\t\t}\n\n\t\t\tif(isset($media['Media']['media_info']))\n\t\t\t{\n\t\t\t\t$media_info = $results[$media_id]['Media']['media_info'] = json_decode($media['Media']['media_info'],true);\n\n\t\t\t\tif($media['Media']['media_type'] == 'video' && $media['Media']['embed'] != '') {\n\t\t\t\t\t$media_type = 'video_embed';\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$media_type = $media['Media']['media_type'];\n\t\t\t\t}\n\n\t\t\t\t$filename_url = $MediaStorage->getStorageUrl($media_type, $media['Media']['rel_path'] . $media['Media']['filename'], array('cdn'=>true));\n\n\t\t\t\t$media_info = $this->completeMediaUrls($media['Media'], $filename_url);\n\n\t\t\t\t/*\n\t\t\t\t * Add Embed video urls for 3rd party video services\n\t\t\t\t */\n\t\t\t\tif($media['Media']['media_type'] == 'video' && $media['Media']['embed'] != '') {\n\n\t\t\t\t\t$filename_url = $MediaStorage->getStorageUrl($media['Media']['embed'], $media['Media']['filename']);\n\n\t\t\t\t\t$media_info_embed = $this->completeEmbedUrls($media['Media'], $filename_url);\n\n\t\t\t\t\t$media_info = array_insert($media_info, $media_info_embed);\n\t\t\t\t}\n\n\t\t\t\t$results[$media_id]['Media']['media_path'] = $filename_url;\n\n\t\t\t\t$results[$media_id]['Media']['media_info'] = $media_info['media_info'];\n\t\t\t}\n\t\t}\n\n if(!defined('MVC_FRAMEWORK_ADMIN') || MVC_FRAMEWORK_ADMIN == 0) {\n # Add Community info to results array\n if(class_exists('CommunityModel')) {\n $Community = ClassRegistry::getClass('CommunityModel');\n $results = $Community->addProfileInfo($results, 'Media', 'user_id');\n }\n }\n\n\t\treturn $results;\n\t}", "title": "" }, { "docid": "affec2226388bf958dea651d29805581", "score": "0.50936055", "text": "public function getElasticResultsData(array $results = null)\n {\n $data = [];\n $accountId = $this->request->get('account_id', false);\n\n foreach ($results as $result) {\n switch ($result->getType()) {\n case 'listing':\n $listing = $this->container->get('doctrine')\n ->getRepository('ListingBundle:Listing')\n ->find($result->getId());\n\n /* Valid if the listing exist */\n if (is_null($listing)) {\n continue;\n }\n\n $listing->setType($result->getType());\n $listing->setAddress($this->getItemLocationsImploded($listing));\n\n $listingItemDetail = new ListingItemDetail($this->container, $listing);\n if ($listingItemDetail->getLevel()->imageCount > 0) {\n $listing->setImageUrl($this->getImagePath($listing->getMainImage()));\n }\n\n if ($accountId) {\n $favId = $this->container->get('quicklist.handler')\n ->getFavoriteId($listing->getId(), $accountId, 'listing');\n\n $listing->setFavoriteId($favId);\n }\n\n $moduleLevel = new ModuleLevelDocument('listing');\n $listing = $moduleLevel->applyModuleLevel($listing, $listingItemDetail->getLevel());\n\n $reviews_enable = $this->container->get('doctrine')\n ->getRepository('WebBundle:Setting')\n ->getSetting('review_listing_enabled');\n if (!$reviews_enable) {\n $listing->setAvgReview(null);\n }\n\n /* gets listing's classifieds */\n $classifieds = [];\n foreach ($listing->getClassifieds() as $classified) {\n /* @var $classified Classified */\n if ($this->container->get('classified.handler')->isValid($classified)) {\n $classifieds[] = $classified;\n }\n }\n\n /* limit classifieds by listing level */\n $listing->setClassifieds(array_slice($classifieds, 0,\n $listingItemDetail->getLevel()->classifiedQuantityAssociation));\n\n $data[] = $listing;\n break;\n\n case 'event':\n $event = $this->container->get('doctrine')->getRepository('EventBundle:Event')->find($result->getId());\n\n /* Valid if the event exist */\n if (is_null($event)) {\n continue;\n }\n\n $event->setType($result->getType());\n $event->setAddress($this->getItemLocationsImploded($event));\n\n $eventItemDetail = new EventItemDetail($this->container, $event);\n if ($eventItemDetail->getLevel()->imageCount > 0) {\n $event->setImageUrl($this->getImagePath($event->getImage()));\n }\n /* set the recurring date of the event */\n if ($event->getRecurring() == 'Y') {\n $recurring = new RecurringExtension($this->container);\n $event->setRecurringPhrase($recurring->recurringPhrase($event));\n\n $this->setStartDateToNextOccurrence($event);\n }\n\n $event = $this->setBadDateValueToNull($event);\n\n\n $moduleLevel = new ModuleLevelDocument('event');\n $event = $moduleLevel->applyModuleLevel($event, $eventItemDetail->getLevel());\n\n if ($accountId) {\n $favId = $this->container->get('quicklist.handler')\n ->getFavoriteId($event->getId(), $accountId, 'event');\n\n $event->setFavoriteId($favId);\n }\n\n $data[] = $event;\n break;\n\n case 'classified':\n $classified = $this->container->get('doctrine')->getRepository('ClassifiedBundle:Classified')->find($result->getId());\n\n /* Valid if the classified exist */\n if (null === $classified) {\n continue;\n }\n\n $classified->setType($result->getType());\n $classified->setAddress($this->getItemLocationsImploded($classified));\n\n $classifiedItemDetail = new ClassifiedItemDetail($this->container, $classified);\n if ($classifiedItemDetail->getLevel()->imageCount > 0) {\n $classified->setImageUrl($this->getImagePath($classified->getImage()));\n }\n\n $moduleLevel = new ModuleLevelDocument('classified');\n $classified = $moduleLevel->applyModuleLevel($classified, $classifiedItemDetail->getLevel());\n\n $data[] = $classified;\n\n if ($accountId) {\n $favId = $this->container->get('quicklist.handler')\n ->getFavoriteId($classified->getId(), $accountId, 'classified');\n\n $classified->setFavoriteId($favId);\n }\n\n break;\n\n case 'article':\n $article = $this->container->get('doctrine')->getRepository('ArticleBundle:Article')->find($result->getId());\n\n /* Valid if the article exist */\n if (null === $article) {\n continue;\n }\n\n $article->setType($result->getType());\n $article->setImageUrl($this->getImagePath($article->getImage()));\n\n if ($accountId) {\n $favId = $this->container->get('quicklist.handler')\n ->getFavoriteId($article->getId(), $accountId, 'article');\n\n $article->setFavoriteId($favId);\n }\n\n $data[] = $article;\n break;\n\n case 'blog':\n $blog = $this->container->get('doctrine')->getRepository('BlogBundle:Post')->find($result->getId());\n\n /* Valid if the blog exist */\n if (null === $blog) {\n continue;\n }\n\n $blog->setType($result->getType());\n $blog->setImageUrl($this->getImagePath($blog->getImage()));\n $blog->setContent(mb_substr(strip_tags(html_entity_decode($blog->getContent(), ENT_QUOTES)), 0, 200));\n\n $data[] = $blog;\n break;\n\n case 'deal':\n $deal = $this->container->get('doctrine')\n ->getRepository('DealBundle:Promotion')\n ->find($result->getId());\n\n /* Valid if the deal exist */\n if (null === $deal) {\n continue;\n }\n\n $deal->setType($result->getType());\n $deal->setImageUrl($this->getImagePath($deal->getMainImage()));\n\n if ($this->container->get('deal.handler')->isValid($deal)) {\n $data[] = $deal;\n }\n\n break;\n }\n };\n\n return $data;\n }", "title": "" }, { "docid": "788fb617b45a8fe7c31cf46172b0e165", "score": "0.5092973", "text": "function array_to_tags_recursive($arr, &$results){\n\t\t\t\tforeach($arr as $key=>$val) {\n\t\t\t\t\tif ($key === 'classes'){\n\t\t\t\t\t\t$results=$val;\n\t\t\t\t\t}\n\t\t\t\t\telse if (is_array($val))\n\t\t\t\t\t\tarray_to_tags_recursive($val, $results);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "title": "" }, { "docid": "7606fcd373bac0c3b91c8a93dee5f942", "score": "0.5092759", "text": "protected static function mutateApiResult(array $result): array\n {\n return self::mutateDatesToTevoDates($result);\n }", "title": "" }, { "docid": "aff690b9638d5e7cf2921e1c05473260", "score": "0.5077154", "text": "public function return_result_as_array($result_obj){\n $results_ = [];\n foreach($result_obj as $results_arr => $result_arr){\n\n foreach($result_arr as $key => $val){\n $results_[$results_arr][$key] = $val;\n }\n\n }\n return $results_;\n }", "title": "" }, { "docid": "3903f182e9789b4d59053d54540cd78f", "score": "0.5074925", "text": "private function processHooks() {\n\t\tforeach ($this->hooks as list($query, $hook)) {\n\t\t\tforeach ($this->xpath->query($query) as $element) $hook->run($element);\n\t\t}\n\t\t$this->hooks = [];\n\t}", "title": "" }, { "docid": "cc8dd21f4e493e20f49f3f11d54f413d", "score": "0.5066817", "text": "function getSearchResults($search_param) {\n global $oauth_settings;\n global $rest_urls;\n $tw_search = new TwitterSearch(array(\n 'oauth_settings' => $oauth_settings,\n 'rest_urls' => $rest_urls));\n\n $result = $tw_search->getSearchResult($search_param);\n\n $jsonArray = json_decode($result, TRUE);\n $jsonArray = $jsonArray[\"statuses\"];\n\n $return_result = array();\n foreach($jsonArray as $item) {\n $curr_text = createEntityLinks($item['text'], $item['entities']);\n try {\n// $curr_tz = date_default_timezone_get();\n date_default_timezone_set('UTC');\n } catch (Exception $e) {\n }\n\n $timestamp = date_timestamp_get(DateTime::createFromFormat('D M d H:i:s O Y', $item['created_at']));\n// date_default_timezone_set($curr_tz);\n\n $tweet = array(\n 'id' => $item['id_str'],\n 'tweet_text' => $curr_text,\n 'tweet_date' => $timestamp,\n 'user_name' => $item['user']['name'],\n 'screen_name' => $item['user']['screen_name'],\n 'user_image' => $item['user']['profile_image_url'],\n );\n $return_result[] = $tweet;\n }\n return $return_result;\n}", "title": "" }, { "docid": "46dc329a87ec6b0a17101e8b95ea7941", "score": "0.50664407", "text": "private function set_result(&$result, $svc, $args) {\n //Stash the new values, and try to translate the result code to be more readable\n $this->last_result = isset($result->result) ? $result->result : false;\n $this->last_friendly_result = BBHelper::translate_result($this->last_result);\n\n //Parse into an object for storage / dumping\n $result_history = (object)array('result' => $this->last_result, 'friendly' => $this->last_friendly_result, 'svc' => $svc, 'args' => $args);\n\n //Store it in the result history array too\n $this->result_history[] = $result_history;\n\n //Dump failed calls\n if($this->last_result != 200) {\n $title = 'API Failure (' . $this->last_friendly_result . ')';\n BBDev::print_error($this, $this->last_result, $title, debug_backtrace());\n }\n }", "title": "" }, { "docid": "c2f029ebcd550b9b5da74d47ee6af62a", "score": "0.50654507", "text": "private static function parseResult(array $result, bool $fisica = true): array {\n $return = [];\n\n foreach ($result as $row) {\n $nSala = $row[\"nSala\"];\n $nFile = $row[\"nFile\"];\n $nPostiFila = $row[\"nPostiFila\"];\n $disponibile = boolval($row[\"disponibile\"]);\n\n if ($fisica) {\n array_push($return, new ESalaFisica($nSala, $nFile, $nPostiFila, $disponibile));\n } else {\n array_push($return, new ESalaVirtuale($nSala, $nFile, $nPostiFila, $disponibile));\n }\n }\n\n return $return;\n }", "title": "" }, { "docid": "2611d597a9bcbbfe5f8e5c53b89fd7f4", "score": "0.50648975", "text": "function perform_basic_search($srch_str_raw,$focus){\n $searchVars = array();\n $spec_SearchVars = array();\n\n\n //make sure string does not have html encoding\n $srch_str_raw = from_html($srch_str_raw);\n $srch_str_raw_orig = $srch_str_raw;\n\n //lets remove defined tags from the search string\n $tagNamesArr = separateTagNames($srch_str_raw);\n if(!empty($tagNamesArr)){\n $_POST['searchText'] = $tagNamesArr['search_string_raw'];\n $spec_SearchVars['tag_name'] = $tagNamesArr['tag_token_string'];\n }\n if(isset($_POST['canned_search']) and !empty($_POST['canned_search'])){$spec_SearchVars['canned_search'] = $_POST['canned_search'];}\n\n\n //create array of available search parameters.\n if(isset($_POST['searchText']) and !empty($_POST['searchText'])){$spec_SearchVars['searchText_include'] = from_html($_POST['searchText']);}\n $list_query = create_fts_search_list_query($focus->db,$spec_SearchVars,$searchVars);\n if(empty($list_query)){\n return '';\n }\n return $list_query ;\n\n}", "title": "" } ]
50d74b6099db85a584ee7945ff2045dc
Output the search url
[ { "docid": "182c8cd57775717802f8ecefbb954561", "score": "0.707612", "text": "function bbp_search_url()\n{\n}", "title": "" } ]
[ { "docid": "329dd2a5598792ab679ed5206bc2e2dd", "score": "0.73302346", "text": "function bbp_get_search_results_url()\n{\n}", "title": "" }, { "docid": "8e286bce3f43436447c32ac859efbd25", "score": "0.7295532", "text": "function bbp_search_results_url()\n{\n}", "title": "" }, { "docid": "4cc7307e0e8af4956af9543e690bac56", "score": "0.72495544", "text": "function bbp_get_search_url()\n{\n}", "title": "" }, { "docid": "4b301422a743b5bc9374a3fd236384c8", "score": "0.7196866", "text": "private function search_url() {\n\t\treturn admin_url( 'edit-tags.php?taxonomy=' . $this->term->taxonomy . '&seo_kw_filter={keyword}' );\n\t}", "title": "" }, { "docid": "7c948c564469443e36545bd0c62ee50a", "score": "0.7146506", "text": "protected function getUrl()\n {\n global $argv;\n \n if (!is_array($argv) || empty($argv[1])) {\n die('You must pass a search term as the first argument');\n }\n \n // Get the search term from the command line argument\n $searchTerm = $argv[1];\n \n // construct the url for google\n $url = $this->url\n . '/search?q='\n . $searchTerm;\n \n return $url;\n }", "title": "" }, { "docid": "00d33ef1600a610dbab8de6acb41872e", "score": "0.68301904", "text": "public function search() {\n\t\t# Search request submitted by user\n\t\t$search_query = $_POST['search_query'];\n\t\t$response = 'success';\n\n\t\tif (strlen($search_query) < 4) {\n\t\t\t$response = 'query_too_short';\n\t\t}\n\n\t\t# Search members / profiles\n\t\t$results = $this->model('Search')->select_from_pages_results($search_query);\n\n\t\t$search_query = str_replace(\"%\", \"\", $search_query);\n\n\t\tforeach ($results as $row) {\n\t\t\t$url = $row['url'];\n\t\t\t// $row['content'] = str_replace(\"$search_query\", \"<span style='background-color: yellow;'>$search_query</span>\", $row['content']);\n\t\t\t$content = strip_tags($row['content']);\n\t\t\t$content = substr($content, 0, 400);\n\t\t\t$content = str_replace(\"$search_query\", \"<span style='background-color: yellow;'>$search_query</span>\", $content);\n\t\t\techo $content . \"<br><a href='{$url}'>\" . $url . \"</a><br><br>\";\n\t\t\t// var_dump(self::cleanSearchString($content, $search_query));exit;\n\t\t\t//echo \"<p> \" . self::cleanSearchString($content, $search_query) . \"</p> <p><a href='\".strip_tags($url).\"'>\". strip_tags($url).\"</a></p><br>\";\n\t\t}\n\t}", "title": "" }, { "docid": "f28f955f590c21c7c0df7e9debae7d3b", "score": "0.67008615", "text": "protected function buildSearchUrl()\n\t{\n\t\t$this->searchUrl = $this->baseUrl . 'query=' . $this->getQuery() . '&resultCount=' . $this->getCount();\n\n\t\treturn $this->searchUrl;\n\t}", "title": "" }, { "docid": "7a13c9f0db82a4682b814f45e8c76e5a", "score": "0.6552981", "text": "function ic_get_search_words_url() {\n\n\t$words = ic_get_search_words_array();\n\n\tif ( ! empty( $words ) ) {\n\t\t$search_array = array();\n\n\t\tforeach ( $words AS $word ) {\n\t\t\t$search_array[] = '<a href=\"' . add_query_arg( 's', esc_attr( $word ),\n\t\t\t\t\thome_url() ) . '\">' . esc_html( $word ) . '</a>';\n\t\t}\n\n\t\treturn implode( ' + ', $search_array );\n\t}\n\n\treturn '';\n}", "title": "" }, { "docid": "6a87093761cb5350bf97cd494e4be05a", "score": "0.65388876", "text": "public function url()\r\n {\r\n $query = array(\r\n 'key' => !empty($this->api_key) ? $this->api_key : PiplApi_SearchApi::$default_api_key,\r\n 'person' => PiplApi_Serializable::to_json($this->person),\r\n 'query_params_mode' => $this->query_params_mode,\r\n 'exact_name' => $this->exact_name,\r\n 'prioritize_records_by' => implode(',', $this->_prioritize_records_by),\r\n 'filter_records_by' => $this->_filter_records_by\r\n );\r\n \r\n return self::$BASE_URL . http_build_query($query);\r\n }", "title": "" }, { "docid": "fdb6d938140d8787e2b2fcd19cb9a15f", "score": "0.65321517", "text": "public function getQueryUrl()\n {\n return $this->search_url;\n }", "title": "" }, { "docid": "63614ca1764489d4390a80b8732cf469", "score": "0.6324324", "text": "function pipeSearch ()\n {\n \n \n $q = str_replace (' ', '%', preg_replace ('/[^a-z0-9\\- ]/i', ' ', urldecode ($_GET['q'])));\n \n self::$q = str_replace ('%', ' ', $q);\n \n $this->main->database->doQuery (\"SELECT * FROM BLOG_POSTS WHERE strTitle LIKE '%%%s%%' OR strContent LIKE '%%%s%%'\", (string) $q, (string) $q);\n while (self::$jsp = $this->main->database->doRead ())\n {\n self::$jspc++;\n self::$jsp['strTitle'] = str_ireplace ($q, '<u>' . $q . '</u>', self::$jsp['strTitle']);\n self::$jsp['strContent'] = str_ireplace ($q, '<u>' . $q . '</u>', self::$jsp['strContent']);\n Template::load ('blog_search_piping');\n $this->main->js_pipe->flush ();\n }\n \n Template::load ('blog_search_piped');\n }", "title": "" }, { "docid": "70ae92e6aa9e78c5a8dc3d30623c904a", "score": "0.6318605", "text": "public static function search()\n {\n $query = Flight::request()->query ['q'];\n\n $blogs = Model::getBlogsContaining($query);\n\n View::renderSearch($query, $blogs);\n }", "title": "" }, { "docid": "2f41878570368f4b6463a5d2acbd7373", "score": "0.6317575", "text": "public static function getSearchUri()\r\n {\r\n return self::getURI( self::URI_SEARCH );\r\n }", "title": "" }, { "docid": "9e5a014c013528aae0a3b41f3af35738", "score": "0.6306923", "text": "function search() {\n $url['action'] = 'index';\n \n // build a URL will all the search elements in it\n // the resulting URL will be\n // example.com/cake/posts/index/Search.keywords:mykeyword/Search.tag_id:3\n foreach ($this->data as $k=>$v){\n foreach ($v as $kk=>$vv){\n $url[$k.'.'.$kk]=$vv;\n }\n }\n \n // redirect the user to the url\n $this->redirect($url, null, true);\n }", "title": "" }, { "docid": "ebb2455054faa19cd091c7ded9385842", "score": "0.622463", "text": "public function generate_open_graph_url() {\n\t\t$search_query = \\get_search_query();\n\n\t\t// Regex catches case when /search/page/N without search term is itself mistaken for search term.\n\t\tif ( ! empty( $search_query ) && ! \\preg_match( '|^page/\\d+$|', $search_query ) ) {\n\t\t\treturn \\get_search_link();\n\t\t}\n\n\t\treturn '';\n\t}", "title": "" }, { "docid": "6bd13ee0646bedf6fbc0e138625c2563", "score": "0.6211027", "text": "function bbp_search_results_redirect()\n{\n}", "title": "" }, { "docid": "6206c367b33901e9cad70084b796d844", "score": "0.62052566", "text": "private function search(){\n\t\tif(isset($_POST['q']) && !empty($_POST['q']))\n\t\t{\n\t\t\t$q = $_POST['q'];\n\t\t\tif($this->getRPCresults(\"getassetdata\", $q))\n\t\t\t{\n\t\t\t\theader('Location: ./?cmd=viewasset&id='.base64_encode($q));\n\t\t\t}elseif($this->getRPCresults(\"listassetbalancesbyaddress\", $q))\n\t\t\t{\n\t\t\t\theader('Location: ./?cmd=viewholder&id='.$q);\n\t\t\t}else{\n\t\t\t\theader('Location: ./');\n\t\t\t\texit();\n\t\t\t}\n\t\t\texit();\n\t\t}else{\n\t\t\theader('Location: ./');\n\t\t\texit();\n\t\t}\n\t}", "title": "" }, { "docid": "226aed0eda03b0a767584679473b432b", "score": "0.61818904", "text": "public function get_search() {\n\t\treturn ! empty( $_GET['s'] ) ? urldecode( trim( $_GET['s'] ) ) : false;\n\t}", "title": "" }, { "docid": "b03ddc2afb67599d295e034ff3d596b4", "score": "0.6180645", "text": "protected function searchAction(): string\n {\n return $this->response($this->domainsRepository->searchDomains($this->requestParams['domain'] ?? ''));\n }", "title": "" }, { "docid": "8e9bfe2e9654127ff769e77d12fa7ce9", "score": "0.6175181", "text": "public function search_get()\n {\n $page = $this->input->get('page') ?? 1;\n $link = $this->input->get('link') ?? 'short';\n $query = $this->input->get('q');\n $this->log->write_log('debug', $this->TAG . ': list: $query: ' . $query . ',$page: ' . $page);\n if (empty($query) OR ! is_numeric($page) OR $page <= 0) {\n $this->response_error(VALUE_STATUS_CODE_ERROR, 'Wrong URL Parameter', 404);\n }\n $this->load->model('search_model');\n $query = html_escape($query);\n $full_link = (strtolower($link) === 'full') ? TRUE : FALSE;\n $result = $this->search_model->get($full_link, $query, $page);\n $this->response($result);\n }", "title": "" }, { "docid": "793d72aaea6ac725e5d1b3f86622dd34", "score": "0.6158587", "text": "public function buildAdvanceSearchUrl() {\t\t\t\n\t\tif (sizeof(Input::get('authors')) > 0) {\n\t\t\t$author_lists = implode(\",\", Input::get('authors'));\t\t\n\t\t} else {\n\t\t\t$author_lists = '';\t\n\t\t}\n\t\t\t\n\t\tif (sizeof(Input::get('cat_ids')) > 0) {\t\t\t\n\t\t\t$cat_to_search = implode(\",\", Input::get('cat_ids'));\n\t\t} else {\n\t\t\tif (Input::get('parent_id')) {\n\t\t\t\t$cat_to_search = Input::get('parent_id');\n\t\t\t} else {\n\t\t\t\t$cat_to_search = '';\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn Redirect::to('adv-search/result/?cats='. $cat_to_search . '&key=' . Input::get('search_keyword'). '&authors=' . $author_lists);\n\t}", "title": "" }, { "docid": "eb5479f29366212681954381e09efda9", "score": "0.61356056", "text": "function wpsc_product_search_url( $url ) {\n\t\t\t\n\tif ( isset( $_GET['product_search'] ) ) {\n\t\tif ( strrpos( $url, '?') ) {\n\t\t\t$url .= '&product_search=' . $_GET['product_search'];\n\t\t} else {\n\t\t\t$url .= '?product_search=' . $_GET['product_search'];\n\t\t}\n\t}\n\t\n\treturn $url;\n\n}", "title": "" }, { "docid": "a77ad4723d4f54f20cfbbcfd25b5c2b7", "score": "0.60895145", "text": "function sp_search_text( $text ) {\n\treturn esc_attr( 'Seach ' . get_bloginfo( $show = '', 'display' ));\n\tget_permalink();\n}", "title": "" }, { "docid": "494614d8460bfc43d97eec7baa7a6267", "score": "0.6062067", "text": "public function getWebsiteSearchLink() : string\n {\n return $this->wowDBSerachLink;\n }", "title": "" }, { "docid": "ea0390a5b94701c3fd3622bddae18458", "score": "0.60407925", "text": "function wpb_change_search_url() {\n if ( is_search() && ! empty( $_GET['s'] ) ) {\n wp_redirect( home_url( \"/search/\" ) . urlencode( get_query_var( 's' ) ) );\n exit();\n }\n}", "title": "" }, { "docid": "4cfe4739b6fd11ae97f961c6d8924a38", "score": "0.6030424", "text": "function search() {\n return show(\"menu/search\", array(\"searchword\" => (empty($_GET['searchword']) ? _search_word : $_GET['searchword'])));\n}", "title": "" }, { "docid": "144379fe31885f0fe8f4164d7ce33c32", "score": "0.6028689", "text": "function generate_search_url( $search = '', $lang = null ) {\n $lang = $lang !== null ? $lang : pll_current_language();\n\n $url = '/' . ( pll_default_language() !== $lang ? $lang . '/' : '' ) . search_base( $lang ) . '/' . $search;\n\n return $url;\n}", "title": "" }, { "docid": "797a31d89d42ed4e55c8555f1ebddf6f", "score": "0.6014433", "text": "private function formQuery()\n {\n // form query\n foreach ($this->search_parameters as $key => $value) {\n $q_key = \"&\" . $key . \"=\";\n if (is_array($value)) {\n if ($key == 'sk') {\n $filtered = array_map(function ($item) {\n return $this->cleanParameter($item . '|NTH|');\n }, $value);\n $this->search_url .= $q_key . implode(',', $filtered);\n } else {\n $this->search_url .= implode($q_key, $value);\n }\n } else {\n $this->search_url .= $q_key . $this->cleanParameter($value);\n }\n }\n }", "title": "" }, { "docid": "2f911fca7a795311b03d4d113816f360", "score": "0.60005635", "text": "public static function template_redirect()\r\n\t{\r\n\t\tif ( stripos($_SERVER['REQUEST_URI'], '/?s=') === FALSE && stripos($_SERVER['REQUEST_URI'], '/search/') === FALSE)\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tadd_action('wp_title', array('GoogleCSE', 'get_title'));\r\n\t\tadd_action('wp_head', Array('GoogleCSE', 'search_css'));\r\n\r\n\t\tget_header();\r\n\r\n\t\tif (self::$google_search_show_sidebar)\r\n\t\t{\r\n\t\t\techo '<div id=\"content\" class=\"narrowcolumn\">';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\techo '<div id=\"content\">';\r\n\t\t}\r\n\t\techo self::$google_search_box;\r\n\t\techo self::$google_search_results;\r\n\t\techo '</div>';\r\n\r\n\t\tif (self::$google_search_show_sidebar)\r\n\t\t{\r\n\t\t\techo get_sidebar();\r\n\t\t}\r\n\r\n\t\tget_footer();\r\n\t\texit;\r\n\t}", "title": "" }, { "docid": "d843afee5b1e85cfe73266a42ac28e0c", "score": "0.59996766", "text": "function search() \n {\n // the page we will redirect to\n $url = $this->request->data['EventView']['url'];\n unset($this->request->data['EventView']['url']);\n if(isset($this->request->data['EventView'])) {\n foreach ($this->request->data['EventView'] as $key => $param){\n if (!empty($param)) {\n $url.='/'. $key . ':'. $param;\n }\n }\n }\n //// redirect the user to the url\n return $this->redirect($url);\n }", "title": "" }, { "docid": "81020cae152014aef700f925c6118df3", "score": "0.5970497", "text": "protected function _SearchKeyword()\n {\n\n $html = $this->getHead('FoobarSearch Results')\n . $this->getHeader('FoobarSearch Results')\n . \"<h3>Total {$this->data['total']}</h3>\n <ul>\";\n\n foreach ($this->data['results'] as $result) {\n\n $html .= \"<li>\n <a href=\\\"\".FOOBAR_BASE_URL.\"?module=Search&amp;action=thread&amp;data[id]={$result['id']}\\\">{$result['title']}</a>\n </li>\";\n }\n\n return \"{$html}\n </ul>\";\n }", "title": "" }, { "docid": "51523d8111620b45da4b189d83cc7fb2", "score": "0.5970072", "text": "public function search();", "title": "" }, { "docid": "a0272db0d022f68fb586eadf14b4f128", "score": "0.59605", "text": "function displaySearchLibrary(){\n\t\t$this->requireFacebook();\n\t\t$this->tpl->assign('search', $GLOBALS['SEARCH']);\n\t\t$this->tpl->assign('RSSFeed', $GLOBALS['FEED_URL']);\n\t\t$this->tpl->display('SearchLibrary.tpl');\n\t}", "title": "" }, { "docid": "f8c14e8c9b2f130f0c25d12e38103180", "score": "0.5958457", "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\n\t\t$this->title = \"Search land \";\n\t\t$this->list = $this->Results();\t\r\n return $this->renderWith(array('Land_results', 'App'));\r\n }", "title": "" }, { "docid": "803f449e2c4f0a04d1a5a81cdca4b881", "score": "0.5953556", "text": "private function search()\n {\n //set empty parameter array\n $url_params = array();\n\n //add the parameters\n $url_params['location'] = $this->location;\n $url_params['sort'] = $this->sort;\n $url_params['category_filter'] = $this->category_filter;\n\n //create the search path including the base URL and parameters\n $search_path = $this->search_path . \"?\" . http_build_query($url_params);\n\n //return response\n return $this->request($search_path);\n }", "title": "" }, { "docid": "df64eb2b6b9d7c316d267291d4f9dd75", "score": "0.59411", "text": "function search () {\n\t\t// Check CPU Load\n\t\tif (conf('HIGH_CPU_LOAD') == 1) {\n\t\t\treturn common()->server_is_busy();\n\t\t}\n\t\t$OBJ = $this->_load_sub_module(\"articles_search\");\n\t\treturn is_object($OBJ) ? $OBJ->_go() : \"\";\n\t}", "title": "" }, { "docid": "2a4b202b003c18a3196eff685321b696", "score": "0.59360796", "text": "public function getSearchPostUrl()\n {\n return $this->getUrl('*/*/index');\n }", "title": "" }, { "docid": "92c8158d37b946cc5ef4d276dbd1b0df", "score": "0.5910808", "text": "public function display_search_form()\n {\n }", "title": "" }, { "docid": "aeb08cdbbee2f8d8e278205c6803347a", "score": "0.590753", "text": "function search()\n\t\t{\n\n\t\t\techo '\n\t\t\t<!-- The search div -->\n\t\t\t<div id=\"content\">\n\n\t\t\t\t<form class=\"card\" id=\"search\">\n\t\t\t\t\t<header class = \"subheading\"><span class=\"fa fa-search\"></span> Package Finder</header>\n\t\t\t\t\t<p>Search by tracking number, customer, shipping provider or item description</p><br>\n\t\t\t\t\t<input id=\"queryField\" type = \"text\" name=\"query\" placeholder = \"e.g enter a tracking number, name, courier or item description to search \" autofocus/><br>\n\t\t\t\t\t<header class=\"subheading searchOptions\">Show results </header>\n\t\t\t\t\t<label for=\"beforeDate\"> Between</label> <input type=\"date\" id=\"before\" name=\"beforeDate\" />\n\t\t\t\t\t<label for=\"afterDate\"> And</label><input type=\"date\" id=\"after\" name=\"afterDate\" />\n\t\t\t\t\t<input id=\"lookupButton\" type=\"submit\" value=\"Find\">\n\n\t\t\t\t\t<header class=\"subheading searchOptions\">Icon guide</header>\n\t\t\t\t\t<p class=\"searchKey\"><span><i class=\"fa fa-bug\"></i></span> : Package Issue</p>\n\t\t\t\t\t<p class=\"searchKey\"><span><i class=\"fa fa-shopping-bag\"></i></span> : Item description</p>\n\t\t\t\t\t<p class=\"searchKey\"><span><i class=\"fa fa-ship\"></i></span> : Shipping carrier e.g UPS</p>\n\t\t\t\t\t<p class=\"searchKey\"><span><i class=\"fa fa-truck\"></i></span> : Tracking number</p>\n\t\t\t\t\t<p class=\"searchKey\"><span><i class=\"fa fa-hashtag\"></i></span> : Account number e.g WEB720</p>\n\t\t\t\t</form>\n\n\n\t\t\t\t<section id = \"lookupResults\">\n\n\t\t\t\t</section>\n\t\t\t</div>';\n\t\t}", "title": "" }, { "docid": "413734847719eadebc4796083e790411", "score": "0.5896137", "text": "public function index() {\n\t\t$q = $_GET['q'];\n\t\t$out = array();\n\t\t$out['venues'] = \\Model\\Venue::Search($q, \"name\");\n\t\t$out['groups'] = \\Model\\Group::Search($q, \"name\");\n\t\t$out['events'] = \\Model\\Event::Search($q, \"title\");\n\t\tif (\\Core\\Router::$mode == \\Core\\Router::MODE_JSON) {\n\t\t\techo json_encode($out);\n\t\t} else {\n\t\t\t//FIXME Search HTML view needs to be made\n\t\t\tthrow new Exception(\"Not yet implemented\");\n\t\t}\n\t}", "title": "" }, { "docid": "3639f41c319dce42f7851edf0d013c6e", "score": "0.589167", "text": "public function get_search_url( $keywords ) {\n\t\t$url = add_query_arg( [\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": "37371926464a1b95e69e1b589a1cf69b", "score": "0.5885825", "text": "public function search()\n\t{\n\t\t$this->save();\n\t\treturn $this->getView()->render();\n\t}", "title": "" }, { "docid": "6f3d165c0d68d3a66016b65e24ce0c79", "score": "0.5855384", "text": "function printSearchForm(){\nprint <<<EOT\n\t<form class=\"navbar-form navbar-right\" role=\"search\" action=searchResults.php>\n \t<div class=\"form-group\">\n \t<input type=\"text\" class=\"form-control\" placeholder=\"Search\" name=\"searchentry\" required>\n \t</div>\n \t<button type=\"submit\" class=\"btn btn-default\">Submit</button>\n </form>\nEOT;\n}", "title": "" }, { "docid": "654e195dc09ae272bcb7c4c03509faab", "score": "0.585459", "text": "function gen_search()\n{\n\n return include_htm(\"main/search/index.htm\");\n\n}", "title": "" }, { "docid": "5a000e0288b9b4c536f8955fbed86ab3", "score": "0.5832488", "text": "function vf_printsearchresult($username, $name, $age, $location) {\n $username = vf_usertolink($username);\n echo <<<END\n<div class=\"textframe-item\">\n <div class=\"users-search-subitem\">\n $username\n </div>\n <div class=\"users-search-subitem\">\n $name\n </div>\n <div class=\"users-search-subitem\">\n $age\n </div>\n <div class=\"users-search-subitem\">\n $location\n </div>\n <div id=\"nextSetOfContent\"></div>\n</div>\nEND;\n }", "title": "" }, { "docid": "67180394424dc4a1cec7b848541fb195", "score": "0.58323836", "text": "protected function search()\n {\n $output = '<p class=\"search-box\">';\n $output .= '<input type=\"search\" id=\"wpbs-bookings-search\" name=\"wpbs-bookings-search\" value=\"\" placeholder=\"' . __('Search bookings', 'wp-booking-system') . '\" >';\n $output .= '</p>';\n\n return $output;\n }", "title": "" }, { "docid": "c842c383d8ccdeec4dfd2c41e79a55be", "score": "0.5826859", "text": "public function actionSearch()\n\t{\n\t\tif ( !empty($_GET['query']) ) {\n\t\t\t$criteria = new CDbCriteria;\n\t\t\t$criteria->compare('company_name',$_GET['query'],true);\n\t\t\t$searchQuery = Factory::model()->findAll($criteria);\n\t\t}\n\t\techo $this->render('search_company',array('searchQuery'=>$searchQuery));\n\t\t\n\t}", "title": "" }, { "docid": "2003c8b4f1307351a73055afe671e7d7", "score": "0.58194995", "text": "public function fetchSearch() {\n if (request()->input('radical')) {\n return redirect(\"/radical/search/\" . request()->input('search'));\n }\n\n return redirect(\"/search/\" . request()->input('query'));\n }", "title": "" }, { "docid": "3d5a29ecdeb5b37ded915c01100b038c", "score": "0.58129424", "text": "function search()\n\t{\n\t $url1 = explode('/',$_GET['url']);\t\n\t\t$this->view->title = 'Search Bureauordre';\n\t $this->view->userListviewo = $_GET['o']; //criter de choix\n\t $this->view->userListviewq = $_GET['q']; //key word \n\t\t$this->view->userListviewp = $url1[2]; // parametre 2 page limit 2,3\n\t\t$this->view->userListviewl = 13 ; // parametre 3 nombre de ligne par page limit 2,3 \n\t\t$this->view->userListviewb = 15 ; // parametre nombre de chiffre dan la barre navigation\n\t\t$this->view->userListview = $this->model->userSearch($this->view->userListviewo,$this->view->userListviewq,$this->view->userListviewp,$this->view->userListviewl);\n\t\t$this->view->userListview1= $this->model->userSearch1($this->view->userListviewo,$this->view->userListviewq); // compte total pour bare de navigation\n\t\t$this->view->render($this->route.'/index');\n\t}", "title": "" }, { "docid": "761d24d1dce4373b54431c3d3270c410", "score": "0.5812323", "text": "public function searchAction()\n {\n PixabayApi::search();\n\n exit;\n }", "title": "" }, { "docid": "bc8cae946e6fbd1a5f7348b491694d32", "score": "0.5812139", "text": "function urlsearch($type_search = 0){\n\t\t$str = '';\n\t\t$str = '<form action=\"' . $_SERVER['SCRIPT_NAME'] . '\" methor=\"get\" name=\"form_search\" onsubmit=\"check_form_submit(this); return false\">';\n\t\t$str .= '<input type=\"hidden\" name=\"search\" id=\"search\" value=\"1\" />';\n\t\t$str .= '<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr>';\n\n\t\t// Show nút search ở đầu\n\t\tif($type_search == 1){\n\t\t\t$str .= '<td>&nbsp;<input type=\"submit\" class=\"btn btn-sm btn-info\" value=\"' . translate_text(\"Tìm kiếm\") . '\"></td>';\n\t\t}\n\n\t\tforeach($this->arraySearch as $key=>$field){\n\t\t\tswitch($this->arrayType[$key]){\n\n\t\t\t\tcase \"string\":\n\t\t\t\tcase \"text\":\n\t\t\t\t\t$value = getValue($field,\"str\",\"GET\", $this->arrayLabel[$key]);\n\t\t\t\t\t$str .= '<td class=\"text\">' . $this->arrayLabel[$key] . '</td><td><input type=\"text\" class=\"form-control\" ' . $this->arrayAttribute[$key] . ' name=\"' . $field . '\" id=\"' . $field . '\" onfocus=\"if(this.value==\\'' . $this->arrayLabel[$key] . '\\') this.value=\\'\\'\" onblur=\"if(this.value==\\'\\') this.value=\\'' . $this->arrayLabel[$key] . '\\'\" value=\"' . $value . '\"></td>';\n\t\t\t\tbreak;\n\t\t\t\tcase \"numbernotedit\":\n\t\t\t\t\t$value = getValue($field,\"str\",\"GET\",$this->arrayLabel[$key]);\n\t\t\t\t\t$str .= '<td class=\"text\">' . $this->arrayLabel[$key] . '</td><td><input type=\"text\" class=\"form-control\" ' . $this->arrayAttribute[$key] . ' name=\"' . $field . '\" id=\"' . $field . '\" onfocus=\"if(this.value==\\'' . $this->arrayLabel[$key] . '\\') this.value=\\'\\'\" onblur=\"if(this.value==\\'\\') this.value=\\'' . $this->arrayLabel[$key] . '\\'\" value=\"' . $value . '\"></td>';\n\t\t\t\tbreak;\n\t\t\t\tcase \"date\":\n\t\t\t\t\t$value = getValue($field,\"str\",\"GET\",\"dd/mm/yyyy\");\n\t\t\t\t\t$str .= '<td class=\"text\">' . $this->arrayLabel[$key] . '</td><td>&nbsp;<input type=\"text\" class=\"form-control date\" ' . $this->arrayAttribute[$key] . ' name=\"' . $field . '\" id=\"' . $field . '\" onKeyPress=\"displayDatePicker(\\'' . $field . '\\', this);\" onClick=\"displayDatePicker(\\'' . $field . '\\', this);\" onfocus=\"if(this.value==\\'' . translate_text(\"Enter\") . ' ' . $this->arrayLabel[$key] . '\\') this.value=\\'\\'\" onblur=\"if(this.value==\\'\\') this.value=\\'' . translate_text(\"Enter\") . ' ' . $this->arrayLabel[$key] . '\\'\" value=\"' . $value . '\"></td>';\n\t\t\t\tbreak;\n\t\t\t\tcase \"array\":\n\t\t\t\tcase \"arraytext\":\n\t\t\t\t\t$field = $this->arrayField[$key];\n\t\t\t\t\tglobal $$field;\n\t\t\t\t\t$arrayList = $$field;\n\t\t\t\t\t$str \t\t\t.= '<td class=\"text\">' . $this->arrayLabel[$key] . '</td><td><select class=\"form-control\" name=\"' . $field . '\" id=\"' . $field . '\" ' . $this->arrayAttribute[$key] . '>';\n\t\t\t\t\t$str \t\t\t.= '<option value=\"-1\">' . $this->arrayLabel[$key] . '</option>';\n\t\t\t\t\t$selected \t\t= getValue($field,\"str\",\"GET\",-1);\n\t\t\t\t\tforeach($arrayList as $key=>$value){\n\t\t\t\t\t\t$str \t\t.= '<option value=\"' . $key . '\" ' . (($selected==$key) ? 'selected' : '') . '>' . $value . '</option>';\n\t\t\t\t\t}\n\t\t\t\t\t$str .= '</select></td>';\n\t\t\t\tbreak;\n\n\t\t\t}\n\t\t}\n\n\t\tforeach($this->arrayAddSearch as $key=>$value){\n\t\t\tif($value[2] != \"\"){\n\t\t\t\t$str .= \"<td>&nbsp;<b>\";\n\t\t\t\t$str .= $value[2];\n\t\t\t\t$str .= \"</b>&nbsp;&nbsp;</td>\";\n\t\t\t}\n\n\t\t\t$str .= \"<td>\";\n\t\t\t$str .= $value[0];\n\t\t\t$str .= \"</td>\";\n\t\t}\n\t\t// Show nút search ở cuối\n\t\tif($type_search != 1){\n\t\t\t$str .= '<td>&nbsp;<input type=\"submit\" class=\"btn btn-sm btn-info\" value=\"' . translate_text(\"Tìm kiếm\") . '\"></td>';\n\t\t}\n\n\t\t\t$str .= '</tr></table>';\n\t\t\t$str .= '</form>';\n\n\t\t\t//phần check javascript cho form tìm kiếm\n\t\t\t$str .= '<script type=\"text/javascript\">';\n\t\t\t$str .= 'function check_form_submit(obj){';\n\t\t\tforeach($this->arraySearch as $key=>$field){\n\t\t\t\tswitch($this->arrayType[$key]){\n\t\t\t\t\tcase \"string\":\n\t\t\t\t\t\t$str .= 'if(document.getElementById(\"' . $field . '\").value == \\'' . translate_text(\"Enter\") . ' ' . $this->arrayLabel[$key] . '\\'){document.getElementById(\"' . $field . '\").value = \\'\\'}';\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$str .= 'document.form_search.submit(); ';\n\t\t\t$str .= '};';\n\t\t\t$str .= '</script>';\n\n\t\treturn $str;\n\t}", "title": "" }, { "docid": "fa182fc8034f99438800586901a8b25b", "score": "0.5808787", "text": "static function getSearchURL($full = true) {\n global $CFG_GLPI;\n\n $dir = ($full ? $CFG_GLPI['root_doc'] : '');\n\n if (Session::getCurrentInterface() == \"central\") {\n return \"$dir/front/knowbaseitem.php\";\n }\n return \"$dir/front/helpdesk.faq.php\";\n }", "title": "" }, { "docid": "bde8c68cecb9acdb328898248642fd3a", "score": "0.58059454", "text": "public function search() {\n \treturn $this->index(Input::get());\n }", "title": "" }, { "docid": "6c8b3c1cb7c21716e03822fc715a66c9", "score": "0.5798334", "text": "function getSearchString(){\n\t\t\treturn $this->searchString;\n\t\t}", "title": "" }, { "docid": "a444cfab65b02c4bf41dee3f713c8fbf", "score": "0.57818556", "text": "private function search()\r\n {\r\n if (!eval(Hooks::get('ACTIVITY_SEARCH'))) return;\r\n\r\n $this->_template->assign('isResultsMode', false);\r\n $this->_template->assign('wildCardString', '');\r\n $this->_template->assign('active', $this);\r\n $this->_template->display('./modules/activity/Search.tpl');\r\n }", "title": "" }, { "docid": "b37f9df08ece68c88b52bde663b052a2", "score": "0.5780598", "text": "public function getUrl() {\n\n\t\tglobal $url;\n\t\t\n\t\t// query string\n\t\t$fields = array(\n\t\t\t'key' => '2015201520159',\n\t\t\t'out' => 'json',\n\t\t\t'cats' => 'ACCOMM',\n\t\t\t'ar' => 'Blue Mountains Area',\n\t\t\t'size' => \"8\",\n\t\t);\n\t\t\n\t\t$url = 'http://atlas.atdw.com.au/productsearchservice.svc/products?' . http_build_query($fields);\n\t}", "title": "" }, { "docid": "a1926d72b3bf0644a42b0e89d9694fd7", "score": "0.5771361", "text": "public static function headerSearch() {\n $html = \"<form id='search' action='movies.php#anchor'>\\n\";\n $html .= \"<input type='search' name='title' placeholder='Sök efter film'/><input type='submit' name='submit' value='Sök'/>\\n\";\n $html .= \"</form>\\n\"; \n return $html;\n }", "title": "" }, { "docid": "fca7f19ee709431cd112952fbd630795", "score": "0.5743544", "text": "function searchWebsite($formvars=null)\n\t{\n\t\tif(isset($formvars['Catalog']))\n\t\t\theader(\"Location: \".$GLOBALS['SEARCH']['CATALOG'].$formvars['q']);\n\n\t\tif(isset($formvars['Databases']))\n\t\t\theader(\"Location: \".$GLOBALS['SEARCH']['DATABASE'].$formvars['q']);\n\t\n\t\t$xmlFile = implode(\"\", file( $GLOBALS['SEARCH']['WEBSITE'].$formvars['q']));\n\t\t$xml = new SimpleXMLElement($xmlFile);\n\t\t\n\t\t$i=0;\n\t\tforeach($xml->RES->R as $results)\n\t\t{\n\t\t\t$searchResults[$i] = array(\n\t\t\t\t'U' => (string)$results->U,\n\t\t\t\t'T' => (string)$results->T\n\t\t\t);\n\t\t\t$i++;\n\t\t}\n\t\tif(!isset($searchResults))\n\t\t$searchResults = \"\";\n\t\t\n\t\t$this->tpl->assign(\"results\", $searchResults);\n\t\t$this->tpl->display('searchResults.tpl');\n\t}", "title": "" }, { "docid": "db28f683a2a6b81c2048f31f94cbe011", "score": "0.5713313", "text": "public function listsAdvanceSearchUrl() {\n\t\t$search_key = \tInput::get('key');\n\t\t\n\t\tif (Input::get('cats') != '') {\n\t\t\t$cats_sql = \" AND categories.id IN(\". Input::get('cats') .\")\";\n\t\t} else {\n\t\t\tif (Input::get('parent_id')) {\n\t\t\t\t$cats_sql = ' AND ';\n\t\t\t} else {\n\t\t\t\t$cats_sql = \" AND categories.id IN(\". Input::get('parent_id') .\")\";\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($search_key != '') {\n\t\t\t$text_search = \t\" AND tags.name LIKE '%\". $search_key .\"%'\n\t\t\t\t\t\t\tOR books.name LIKE '%\". $search_key .\"%'\n\t\t\t\t\t\t\tOR books.description LIKE '%\". $search_key .\"%'\n\t\t\t\t\t\t\tOR documents.title LIKE '%\". $search_key .\"%'\";\t\n\t\t} else {\n\t\t\t$text_search = '';\n\t\t}\n\t\t\n\t\tif (Input::get('authors') != '') {\n\t\t\t$author_sql = \" AND book_users.user_id IN(\". Input::get('authors') .\")\";\n\t\t} else {\n\t\t\t$author_sql = '';\n\t\t}\n\t\t\n\t\t$query = \"SELECT\n\t\t\t\t\t\tbooks.id,\n\t\t\t\t\t\tbooks.name,\n\t\t\t\t\t\tbooks.slug,\n\t\t\t\t\t\tbooks.published_date,\n\t\t\t\t\t\tcategories.name as category\n\t\t\t\t\tFROM books\n\t\t\t\t\tLEFT JOIN book_tags ON(books.id=book_tags.book_id)\n\t\t\t\t\tLEFT JOIN tags ON(book_tags.tag_id=tags.id)\n\t\t\t\t\tLEFT JOIN documents ON(books.id=documents.book_id)\n\t\t\t\t\tLEFT JOIN book_users ON(book_users.book_id=books.id)\n\t\t\t\t\tINNER JOIN categories ON(books.category_id = categories.id)\n\t\t\t\t\tWHERE 1=1\n\t\t\t\t\t\t\".$cats_sql\n\t\t\t\t\t\t .$text_search\t\t\n\t\t\t\t\t\t .$author_sql\t\n\t\t\t\t\t\t .\" GROUP BY books.id\";\n\n\t\t$results = DB::select(DB::raw($query));\t\t\t\t\n\t\t$this->layout->content = View::make('frontend.adv-search_results', compact('results'));\n\t}", "title": "" }, { "docid": "3db36a7d465471a040d8bac068488ffd", "score": "0.5712775", "text": "function submit() {\n \n \tglobal $searchArgList;\n\n\t\tforeach ($searchArgList as $key=>$data) {\n\t\t\t\n\t\t\tif ($this->input->post($data))\n\t\t\t\t$segments[$data] = $this->input->post($data);\n\t\t\telse\n\t\t\t\t$segments[$data] = 0;\t\n\t\t\t\n\t\t}\n\t\t\n\t\t$url = \"/bodystyles/search/\";\n\t\t\n\t\tforeach ($segments as $data)\n\t\t\t$url .= $data . \"/\";\n\t\t\t\n\t\t\n\t\tredirect($url);\n\t\t\t\n\t\n \n }", "title": "" }, { "docid": "6dde023b01f72020ed26e29521046339", "score": "0.5703375", "text": "public function location() {\n if (empty($_GET)) {\n echo json_encode(array());\n return;\n }\n\n // $text = $_GET['q'];\n $text = $_GET['search'];\n if (empty($text)) {\n echo json_encode(array());\n } else {\n $result = $this->basicdata->search_location($text);\n $json_response = array();\n foreach ($result as $key => $value) {\n $json_response[] = array('id' => $key, 'text' => $value[0]);\n }\n echo json_encode($json_response);\n }\n }", "title": "" }, { "docid": "113d3e445d770468951cb23d5c2c51db", "score": "0.57020086", "text": "function um_get_search_query() {\r\n\t$query = UM()->permalinks()->get_query_array();\r\n\t$search = isset( $query['search'] ) ? $query['search'] : '';\r\n\r\n\treturn um_filter_search( $search );\r\n}", "title": "" }, { "docid": "c44fe4436e670f6c6951db9b2555778e", "score": "0.57009447", "text": "public function searchAction()\n {\n $post = new Zend_Controller_Request_Http();\n if (null === $post->getPost('recipe_search'))\n $search = $this->getSession()->search;\n else\n $search = $this->getSession()->search = $post->getPost('recipe_search');\n $this->view->search = $this->getSession()->search = $search;\n $this->browseAction();\n $this->render('browse');\n }", "title": "" }, { "docid": "744bdc666a25d82dc89202a79e138261", "score": "0.56840795", "text": "public function search() {\n }", "title": "" }, { "docid": "6c5f360338a2373dfd3d40a90be72ff8", "score": "0.5683631", "text": "function getOutput($data) {\n $this->initializeParams();\n $string = '';\n $this->initializeSearchForm($data);\n $string .= $this->getSearchForm($data);\n if (isset($this->params['search']) && $this->params['search']) {\n if (trim(@$this->params['searchfor']) != '' && $this->params['save']) {\n $this->searchLinks((int)$data['categ'], $this->params['searchfor']);\n if (isset($this->links) && is_array($this->links)) {\n $string .= $this->getXMLFoundedLinks($data);\n }\n }\n $tmp = $this->getLink(array('categ_id' => $data['categ']));\n $string .= sprintf('<backlink>%s</backlink>', $tmp);\n } else {\n // site location by Link-Id\n if (isset($this->params['link_id'])) {\n $this->loadLink($this->params['link_id']);\n if (isset($this->link) && is_array($this->link)) {\n $this->countClicks($this->params['link_id']);\n $GLOBALS['PAPAYA_PAGE']->sendHTTPStatus(301);\n header(\n 'Location: '.\n $this->getAbsoluteURL(\n $this->getWebLink(0, '', 'page', array('exit'=>$this->link['link_url'])),\n '',\n FALSE\n )\n );\n exit();\n }\n //define categ to show\n } elseif (isset($this->params['categ_id'])) {\n $callCateg = $this->params['categ_id'];\n } elseif (isset($data['categ'])) {\n $callCateg = $data['categ'];\n }\n if (isset($callCateg) && $callCateg >= 0) {\n if ($callCateg > 0) {\n $this->loadCateg($callCateg);\n }\n if (isset($this->categ) && is_array($this->categ)) {\n preg_match_all(\n '/\\d+/',\n $this->categ['linkcateg_path'].$callCateg.';',\n $regs,\n PREG_PATTERN_ORDER\n );\n $catIds = $regs[0];\n $this->loadCategsByIds($catIds);\n }\n if ($data['categ'] == 0 || $data['categ'] == $callCateg ||\n (isset($catIds) && is_array($catIds) && in_array($data['categ'], $catIds))) {\n $this->loadCategs($callCateg);\n if ($callCateg > 0) {\n $this->linksPerPage = $data['perpage'];\n $this->loadLinks($callCateg, TRUE);\n }\n $string .= $this->getXMLNavigation($data);\n $string .= $this->getXMLCategs($data);\n $string .= $this->getXMLLinks($data);\n $string .= $this->getXMLLinkNavigation(\n @(int)$this->params['offset'],\n $this->linksPerPage,\n $this->linkCount,\n 'offset',\n $callCateg,\n $data\n );\n if (isset($this->categ) && is_array($this->categ) && isset($data['categ'])) {\n //backlink\n if ($this->categ['linkcateg_id'] != $data['categ']) {\n $tmp = $this->getLink(\n array('categ_id' => $this->categ['linkcateg_parent_id'])\n );\n $string .= sprintf('<backlink>%s</backlink>', $tmp);\n }\n $tmp = $this->getLink(array('search' => 1));\n //searchlink\n $string .= sprintf('<search>%s</search>', $tmp);\n }\n }\n }\n }\n return $string;\n }", "title": "" }, { "docid": "de217a31eac59c30a3888f08f26d064e", "score": "0.56763655", "text": "function hc_redirect_single_search_result() {\n\n\tif( is_search() ) {\n\t\tglobal $wp_query;\n\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\n}", "title": "" }, { "docid": "e363483705e34be746da2492301f69a0", "score": "0.5651485", "text": "function displaySearch() {\r\n\t\t// Get the template\r\n\t\t$this->templateCode = $this->cObj->fileResource($this->conf['template.']['search']);\r\n\t\tif (is_null($this->templateCode)) {\r\n\t\t\treturn $this->pi_getLL('template_not_found');\r\n\t\t}\r\n\r\n\t\t// Get the parts out of the template\r\n\t\t$template['total'] = $this->cObj->getSubpart($this->templateCode, '###TEMPLATE###');\r\n\r\n\t\t// Get all the labels and the form data\r\n\t\t$markerArray = $this->getLabels() + $this->getFormData();\r\n\r\n\t\treturn $this->cObj->substituteMarkerArrayCached($template['total'], $markerArray);\r\n\t}", "title": "" }, { "docid": "d0fe10f26be0b338113e6afe5b64ef87", "score": "0.5650688", "text": "public function get_search() //Use Func Get Args. Each argument is a search string\n {\n \tif ( func_num_args() > 0 ){\n \t$args = func_get_args();\n \t$num = 0;\n \t}\n \tforeach($args as $arg)\n \t{\n \t\tif ($num == 0)\n \t\t{\n \t\t\t$url_string = $this->base_search_query_api.$arg;\n \t\t}\n \t\telse\n \t\t{\n \t\t\t$url_string = $url_string.'&'.$arg;\n \t\t}\n \t\t$num++;\n \t\t\n \t}\n \t$client = new Client();\n \t\n \t$response = $client->get($url_string);\n \t$response = $response->json();\n \treturn $response;\n }", "title": "" }, { "docid": "c159b0167f50edb14289ceb0c00019f2", "score": "0.56374466", "text": "public function showSearchResult($search) {\n\t\t$this->page_title = \"NARC :: Knowledgebase Managament System\";\n\t\t$search_key = urldecode($search);\n\t\t$query = \"SELECT\n\t\t\t\t\t\tbooks.id,\n\t\t\t\t\t\tbooks.photo,\n\t\t\t\t\t\tbooks.date_format,\n\t\t\t\t\t\tbooks.name,\n\t\t\t\t\t\tbooks.slug,\n\t\t\t\t\t\tbooks.published_date,\n\t\t\t\t\t\tcategories.name as category\n\t\t\t\t\tFROM books\n\t\t\t\t\tLEFT JOIN book_tags ON(books.id=book_tags.book_id)\n\t\t\t\t\tLEFT JOIN tags ON(book_tags.tag_id=tags.id)\n\t\t\t\t\tLEFT JOIN documents ON(books.id=documents.book_id)\n\t\t\t\t\tINNER JOIN categories ON(books.category_id = categories.id)\n\t\t\t\t\tWHERE 1=1\n\t\t\t\t\t\tAND tags.name LIKE '%\". $search_key .\"%'\n\t\t\t\t\t\tOR books.name LIKE '%\". $search_key .\"%'\n\t\t\t\t\t\tOR books.description LIKE '%\". $search_key .\"%'\n\t\t\t\t\t\tOR documents.title LIKE '%\". $search_key .\"%'\t\t\t\t\t\n\t\t\t\t\t\tGROUP BY books.id\";\n\t\t$results = DB::select(DB::raw($query));\t\t\t\t\t\t\n\t\t$this->layout->content = View::make('frontend.search_results', compact('search_key', 'results'));\n\t}", "title": "" }, { "docid": "7f2a253fdbe294376cf3141a8dc2baef", "score": "0.5627081", "text": "function displaySearchBox()\r\n{\r\n\techo \"<script type=\\\"text/javascript\\\" src=\\\"http://www.google.com/jsapi\\\"></script> \r\n\t<div class=\\\"searchbox\\\">\t\t\t\t\t\t\t\t\r\n\t\t<form action=\\\"\".ROOT_URL.\"\\\" id=\\\"cse-search-box\\\">\r\n\t\t<div>\r\n\t\t<input type=\\\"hidden\\\" name=\\\"pg\\\" value=\\\"bindex\\\" />\r\n\t\t<input type=\\\"hidden\\\" name=\\\"bsub\\\" value=\\\"search\\\" />\r\n\t\t<input type=\\\"hidden\\\" name=\\\"cx\\\" value=\\\"008976432297318053942:3gnilsveije\\\" />\r\n\t\t<input type=\\\"hidden\\\" name=\\\"cof\\\" value=\\\"FORID:11\\\" />\r\n\t\t<input type=\\\"hidden\\\" name=\\\"ie\\\" value=\\\"UTF-8\\\" />\r\n\t\t<input type=\\\"text\\\" name=\\\"q\\\" size=\\\"31\\\" />\r\n\t\t<input type=\\\"submit\\\" name=\\\"sa\\\" value=\\\"Search\\\" />\r\n\t\t</div>\r\n\t\t</form>\r\n\t\t</div>\";\r\n}", "title": "" }, { "docid": "5b309279c4d3e4c841d0419002dd2442", "score": "0.5624896", "text": "function xml_get_search()\n\t{\n\t\t$this->output = $this->ipsclass->compiled_templates['skin_buddy']->xml_search();\n\t}", "title": "" }, { "docid": "ccb734e4a757e03660f1a8a20d47b269", "score": "0.5624838", "text": "public function getUrlQ();", "title": "" }, { "docid": "46840f99182bd88f35009879b60e6177", "score": "0.5622633", "text": "function _govcms_ui_kit_get_search_keyword() {\n $params = drupal_get_query_parameters();\n return !empty($params['search']) ? check_plain($params['search']) : '';\n}", "title": "" }, { "docid": "8c8956fbc00042c11d1df3feae80d002", "score": "0.5619771", "text": "private function onSearch()\r\n {\r\n $wildCardCompanyName = '';\r\n $wildCardKeyTechnologies = '';\r\n\r\n /* Bail out to prevent an error if the GET string doesn't even contain\r\n * a field named 'wildCardString' at all.\r\n */\r\n if (!isset($_GET['wildCardString']))\r\n {\r\n $this->listByView(__('No wild card string specified.'));\r\n return;\r\n }\r\n\r\n $query = trim($_GET['wildCardString']);\r\n\r\n /* Set up sorting. */\r\n if ($this->isRequiredIDValid('page', $_GET))\r\n {\r\n $currentPage = $_GET['page'];\r\n }\r\n else\r\n {\r\n $currentPage = 1;\r\n }\r\n\r\n $searchPager = new SearchPager(\r\n CANDIDATES_PER_PAGE, $currentPage, $this->_siteID, $_GET\r\n );\r\n\r\n if ($searchPager->isSortByValid('sortBy', $_GET))\r\n {\r\n $sortBy = $_GET['sortBy'];\r\n }\r\n else\r\n {\r\n $sortBy = 'name';\r\n }\r\n\r\n if ($searchPager->isSortDirectionValid('sortDirection', $_GET))\r\n {\r\n $sortDirection = $_GET['sortDirection'];\r\n }\r\n else\r\n {\r\n $sortDirection = 'ASC';\r\n }\r\n\r\n $baseURL = osatutil::getFilteredGET(\r\n array('sortBy', 'sortDirection', 'page'), '&amp;'\r\n );\r\n $searchPager->setSortByParameters($baseURL, $sortBy, $sortDirection);\r\n\r\n if (!eval(Hooks::get('CLIENTS_ON_SEARCH_PRE'))) return;\r\n\r\n /* Get our current searching mode. */\r\n $mode = $this->getTrimmedInput('mode', $_GET);\r\n\r\n /* Execute the search. */\r\n $search = new SearchCompanies($this->_siteID);\r\n switch ($mode)\r\n {\r\n case 'searchByName':\r\n $wildCardCompanyName = $query;\r\n $rs = $search->byName($query, $sortBy, $sortDirection);\r\n break;\r\n\r\n case 'searchByKeyTechnologies':\r\n $wildCardKeyTechnologies = $query;\r\n $rs = $search->byKeyTechnologies($query, $sortBy, $sortDirection);\r\n break;\r\n\r\n default:\r\n $this->listByView(__('Invalid search mode.'));\r\n return;\r\n break;\r\n }\r\n\r\n foreach ($rs as $rowIndex => $row)\r\n {\r\n if ($row['isHot'] == 1)\r\n {\r\n $rs[$rowIndex]['linkClass'] = 'jobLinkHot';\r\n }\r\n else\r\n {\r\n $rs[$rowIndex]['linkClass'] = 'jobLinkCold';\r\n }\r\n\r\n if (!empty($row['ownerFirstName']))\r\n {\r\n $rs[$rowIndex]['ownerAbbrName'] = StringUtility::makeInitialName(\r\n $row['ownerFirstName'],\r\n $row['ownerLastName'],\r\n false,\r\n LAST_NAME_MAXLEN\r\n );\r\n }\r\n else\r\n {\r\n $rs[$rowIndex]['ownerAbbrName'] = __('None');\r\n }\r\n }\r\n\r\n $companyIDs = implode(',', ResultSetUtility::getColumnValues($rs, 'companyID'));\r\n $exportForm = ExportUtility::getForm(\r\n DATA_ITEM_COMPANY, $companyIDs, 40, 15\r\n );\r\n\r\n /* Save the search. */\r\n $savedSearches = new SavedSearches($this->_siteID);\r\n $savedSearches->add(\r\n DATA_ITEM_COMPANY,\r\n $query,\r\n $_SERVER['REQUEST_URI'],\r\n false\r\n );\r\n $savedSearchRS = $savedSearches->get(DATA_ITEM_COMPANY);\r\n\r\n $query = urlencode(htmlspecialchars($query));\r\n\r\n if (!eval(Hooks::get('CLIENTS_ON_SEARCH_POST'))) return;\r\n\r\n $this->_template->assign('savedSearchRS', $savedSearchRS);\r\n $this->_template->assign('active', $this);\r\n $this->_template->assign('subActive', 'Search Companies');\r\n $this->_template->assign('exportForm', $exportForm);\r\n $this->_template->assign('pager', $searchPager);\r\n $this->_template->assign('rs', $rs);\r\n $this->_template->assign('isResultsMode', true);\r\n $this->_template->assign('wildCardCompanyName', $wildCardCompanyName);\r\n $this->_template->assign('wildCardString', $query);\r\n $this->_template->assign('wildCardKeyTechnologies', $wildCardKeyTechnologies);\r\n $this->_template->assign('mode', $mode);\r\n $this->_template->display('./modules/companies/Search.tpl');\r\n }", "title": "" }, { "docid": "19b6959a0d899f8a717dc3d0d789913e", "score": "0.5616", "text": "public function index() {\n CakeLog::config('apache.log', array(\n 'engine' => 'CustomFileLog',\n 'path' => dirname(APP) . DS . \"app\" . DS . \"tmp\" . DS . \"logs\" . DS\n ));\n\n if (isset($this->request->query['u'])) {\n\n $externalUrl = $this->request->query['u'];\n\n $externalDomain = explode('?', $externalUrl);\n\n // Log a successful place search\n $message = array(\n 'clientIp' => $this->request->clientIp(),\n 'method' => $this->request->method(),\n 'here' => $this->request->here . \"?u=\" . $externalDomain[0],\n 'referer' => $this->request->referer(),\n 'status' => 302,\n 'filesize' => 0\n );\n CakeLog::write(\"apache_access\", $message);\n\n $this->redirect($externalUrl, 404, true);\n } else {\n $this->redirect(array('controller' => 'sites', 'action' => 'main'));\n }\n }", "title": "" }, { "docid": "858ddfb1e15c01b665e71567208bf341", "score": "0.56141496", "text": "public function actionSearch()\n {\n $values = Yii::$app->request->get('ApartmentFind');\n $model = new ApartmentFind();\n $model->attributes = $values;\n return $this->render('find', ['model' => $model]);\n }", "title": "" }, { "docid": "c0628097608e4539134edb6d61142248", "score": "0.5612972", "text": "public function getSearch()\n {\n return \"/V1/taxRules/search\";\n }", "title": "" }, { "docid": "92e8e5f9969fe219fe8cb8af1c6b062f", "score": "0.5609385", "text": "public function getSearchString()\n {\n return $this->searchString;\n }", "title": "" }, { "docid": "84caa548a4ca2b3eee37dd2034d0f66a", "score": "0.56068134", "text": "public function SearchPage() {\n\tglobal $wgOut,$wgRequest;\n\tglobal $vgPage;\n\n\t$strThis = 'SearchCustName';\n\n\t$strForm = $wgRequest->GetText('form');\n\t$doForm = ($strForm == $strThis);\n\n\t$strField = 'txtSearch.'.$strThis;\n\t$strFind = $wgRequest->GetText($strField);\n\t$htFind = '\"'.fcString::EncodeForHTML($strFind).'\"';\n\n\t$vgPage->UseHTML();\n\t$out = <<<__END__\n<h2>Customer Search</h2>\n<form method=post>\nName or email address:\n<input name=$strField size=40 value=$htFind>\n<input type=hidden name=form value=$strThis>\n<input type=submit name=btnSearch value=Go>\n</form>\n__END__;\n\t$wgOut->AddHTML($out); $out = '';\n\n\tif ($doForm && !empty($strFind)) {\n\n\t // search customer names\n\n\t $tblMain = $this;\n\t $rs = $tblMain->Search($strFind);\n\t $out .= 'SQL: '.$rs->sqlMake;\n\t $arRows = NULL;\n\t while ($rs->NextRow()) {\n\t\t$id = $rs->ID;\n\t\t$arRows[$id] = $rs->Values();\n\t }\n\n\t if (is_null($arRows)) {\n\t\t$out .= \"\\n<br>No matches found for <b>$htFind</b> in customer names.<br>\";\n\t } else {\n\t\t$out .= \"\\n<br>Matches for <b>$htFind</b> in customer names:<br>\";\n\t\t$wgOut->AddHTML($out); $out = '';\n\n\t\t$obj = $tblMain->SpawnItem();\n\n\t\t$out .= '<ul>';\n\t\tforeach ($arRows as $id => $row) {\n\t\t $obj->Values($row);\n\t\t $out .= \"\\n<li>\".$obj->AdminLink_details();\n\t\t}\n\t\t$out .= '</ul>';\n\t }\n\n\t // search customer emails\n\n\t // TODO\n\n\t $wgOut->AddHTML($out); $out = '';\n\t}\n\n\treturn $out;\n }", "title": "" }, { "docid": "c6c12d6f714cb1a075a76f2dfbf7077d", "score": "0.5604937", "text": "private function search()\r\n {\r\n $savedSearches = new SavedSearches($this->_siteID);\r\n $savedSearchRS = $savedSearches->get(DATA_ITEM_COMPANY);\r\n\r\n if (!eval(Hooks::get('CLIENTS_SEARCH'))) return;\r\n\r\n $this->_template->assign('wildCardString', '');\r\n $this->_template->assign('savedSearchRS', $savedSearchRS);\r\n $this->_template->assign('active', $this);\r\n $this->_template->assign('subActive', 'Search Companies');\r\n $this->_template->assign('isResultsMode', false);\r\n $this->_template->assign('wildCardCompanyName' , '');\r\n $this->_template->assign('wildCardKeyTechnologies', '');\r\n $this->_template->assign('mode', '');\r\n $this->_template->display('./modules/companies/Search.tpl');\r\n }", "title": "" }, { "docid": "e006e5aa5e95c2c8e84b53c59c8255a9", "score": "0.56030154", "text": "public function getSearchTermUrl()\n\t{\n\t\treturn $this->_getUrl('catalogsearch/term/popular');\n\t}", "title": "" }, { "docid": "ae7f91e2e9b0242e7a53237b2115fa21", "score": "0.5599402", "text": "function rs_search_help($path, $arg) {\n $output = '';\n switch ($path) {\n case \"admin/help#rs_search\":\n $output = '<p>'.t(\"Rocketseed search functionality.\").'</p>';\n break;\n }\n return $output;\n}", "title": "" }, { "docid": "a3677ef2fe0bdc74f223ece37c500509", "score": "0.5592894", "text": "public function getAdvancedSearchUrl()\n\t{\n\t\treturn $this->_getUrl('catalogsearch/advanced');\n\t}", "title": "" }, { "docid": "cefacd37c2aca2b4df9826f2a350b558", "score": "0.5592242", "text": "public function output() {\n\t\t\t\n\t\t\t$html = \"\";\n\t\t\t\n\t\t\tif ($this->flickr->getSearchTerm() === \"\") {\n\t\t\t\t$html = '<div class=\"fv-no-results\"><p>\n\t\t\t\t\t\t\tEnter any number of tags to view public Flickr images.\n\t\t\t\t\t\t</p></div>';\n\t\t\t}\n\t\t\t#Display message if there are no results\n\t\t\telse if ($this->flickr->getNumPhotos() === 0) {\n\t\t\t\t$html = '<div class=\"fv-no-results\"><p>\n\t\t\t\t\t\t\tNo results found for \"' . $this->flickr->getSearchTerm()\n\t\t\t\t\t\t. '\".</p></div>';\n\t\t\t} \n\t\t\t#Otherwise display images (simple wrapping list of img elements for now)\n\t\t\telse {\n\t\t\t\t$html = '<div class=\"fv-results-found\"><p>\n\t\t\t\t\t\t \tShowing top results for \"' . $this->flickr->getSearchTerm()\n\t\t\t\t\t\t. '\" (' . $this->flickr->getTotalResults() \n\t\t\t\t\t\t. ' images found in total):</p></div>';\n\n\t\t\t\tforeach($this->flickr->getPhotos() as $index=>$photo) {\n\n\t\t\t\t\t$html .= \"<a href='\" . $photo['fullImage'] . \"'>\"\n\t\t\t\t\t\t\t . \"<img class='fv-thumbnail' \"\n\t\t\t\t\t\t\t . \"src='\" . $photo['thumbnail'] . \"' \"\n\t\t\t\t\t\t\t . \"alt='\" . $photo['title'] . \"' \"\n\t\t\t\t\t\t\t . \"/></a>\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $html;\n\n\t\t}", "title": "" }, { "docid": "cbbfe5dbb4b8a7ddb777ccee7497aed2", "score": "0.55873835", "text": "public function searchAction()\n {\n $this->model = new Books(['%' . $this->route['alias'] . '%']);\n $data = $this->model->searchByString();\n $this->view->getView('default', $data);\n }", "title": "" }, { "docid": "0afb7fc0e88e92147ac55edec7e63a81", "score": "0.55824757", "text": "public function getUrlFormat()\r\n {\r\n return 'http://search.twitter.com/search.%format%';\r\n }", "title": "" }, { "docid": "a446751fc658a6f1d4c6171648edc2cd", "score": "0.5581755", "text": "public function getSearchSearch(): string {\n\t\treturn (string)$this->_getConfig('search.search');\n\t}", "title": "" }, { "docid": "e16417cdb805d257e4601d33a1191252", "score": "0.5575057", "text": "protected function url() {\n $url = $this->baseURL;\n if (count($this->filters)>0) {\n $glue = strpos($this->baseURL, '?') !== false ? '&' : '?';\n $url .= $glue . http_build_query($this->filters);\n }\n \n return $url;\n }", "title": "" }, { "docid": "8f9f64ec5668d0891658539f29195920", "score": "0.557472", "text": "function sp_display_search_field() {\n\techo get_template_part( 'searchform' );\n\n\treturn true;\n}", "title": "" }, { "docid": "2e4ec8a6202d5bf1a314f8b61608e09e", "score": "0.5568941", "text": "public function display_search($attr, $content = '')\n {\n }", "title": "" }, { "docid": "51d1d5df03e30dcc0347492d5af88e2d", "score": "0.5558379", "text": "function GFHref($page = false, $search = false, $sort = false) {\n $str = '';\n foreach ($this->aConfig as $sField => $aData) {\n if ($this->$sField !== false) {\n $str .= '&'.$sField.'='.$this->$sField;\n }\n }\n \n if ($page == true && !empty($_GET['page'])) {\n $str .= '&page=' . $_GET['page'];\n }\n if ($search == true && !empty($_GET['search'])) {\n $str .= '&search=' . $_GET['search'];\n }\n if ($sort == true && !empty($_GET['sort']) && !empty($_GET['sort_crit'])) {\n $str .= '&sort=' . $_GET['sort'] . '&sort_crit=' . $_GET['sort_crit'];\n }\n \n return $str;\n }", "title": "" }, { "docid": "d2f5b529ac09332f6ac5460a9640c15e", "score": "0.5556665", "text": "function amazonawsSearchUrl($title)\n{\n\tglobal $amazonAWSServer;\n\treturn $amazonAWSServer;\n}", "title": "" }, { "docid": "eedc55ff4a5f05b68d7b4f7efaf7f704", "score": "0.5550263", "text": "function create_search() {\n\t\t$this->include_scripts();\n\t\t$this->include_styles();\n\t\tob_start();\n\t\t?>\n\t\t<div class=\"searchbar\">\n\t\t <input id=\"searchfor\" type=\"text\" value=\"\" maxlength=\"75\" autocorrect=\"off\" spellcheck=\"false\" autocomplete=\"off\" autocapitalize=\"off\" placeholder=\"Zoek een abonnement...\" class=\"search\">\n\t\t</div>\n\t\t<div class=\"selection-list\">\n\t\t\t<div class=\"selection-container\" id=\"selection-container-id\" style=\"display: none;\">\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t\treturn ob_get_clean();\n\t}", "title": "" }, { "docid": "f83b4dfe07bdf3d4ad517a406db1fdab", "score": "0.55500984", "text": "public function searchAction()\n {\n if($isbn = filter_input(INPUT_GET, 'isbn', FILTER_SANITIZE_STRING))\n {\n $bookfound = Book::getBookByISBN($isbn);\n $books[0] = $bookfound;\n }\n elseif($title = filter_input(INPUT_GET, 'title', FILTER_SANITIZE_STRING))\n {\n $books = Book::getBooksByTitle($title);\n }\n\n $pagination = new \\Zebra_Pagination();\n $pagination->records(count($books));\n $pagination->records_per_page(10);\n\n $books = array_slice(\n $books,\n (($pagination->get_page() - 1) * 10),\n 10\n );\n\n $pagination = $pagination->render(true);\n View::renderTemplate('Books/index.html.twig', [\n 'books' => $books,\n 'pagination' => $pagination,\n ]);\n }", "title": "" }, { "docid": "80ec0d68e110d3134d4bd87b51a3e2a1", "score": "0.5544028", "text": "private function list_table_search_post_to_get() {\n\t\t$search_string = filter_input( INPUT_POST, 's' );\n\n\t\tif ( $search_string === null ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// When there is nothing being search and there is no search param in the url, break this method.\n\t\tif ( $search_string === '' && filter_input( INPUT_GET, 's' ) === null ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$url = ( $search_string !== '' ) ? add_query_arg( 's', $search_string ) : remove_query_arg( 's' );\n\n\t\t// Do the redirect.\n\t\twp_redirect( $url );\n\t\texit;\n\n\t}", "title": "" }, { "docid": "c85846eba8333c1e9b131b2ad6fffea0", "score": "0.55295336", "text": "public function search() {\n $filterTemplate = array(\"idField\" => FILTER_VALIDATE_INT,\n \"entity\" => FILTER_SANITIZE_STRING);\n $rawData = $_GET;\n $filteredData = filter_var_array($rawData, $filterTemplate);\n if($filteredData['idField']) {\n $entityController = Controllers\\ControllerFactory::genController($filteredData['entity']);\n $targetEntity = $entityController->getSpecific($filteredData['idField']);\n if($filteredData['idField'] == $targetEntity->getId()) {\n ob_start();\n $this->view->show(\"{$filteredData['entity']}s/edit\".ucfirst($filteredData['entity']).\".php\", $targetEntity);\n $editForm = gzcompress(ob_get_clean());\n $_SESSION['editForm'] = $editForm;\n header(\"Location: index.php?action={$filteredData['entity']}/listAll\"); \n } else {\n //header(\"Location: index.php?notFound&entity={$filteredData['entity']}\");\n }\n }\n //header(\"Location: index.php?fillTheFields\");\n }", "title": "" }, { "docid": "d8f6e3b1c115a1a165a4bf15868bc5c9", "score": "0.5526613", "text": "public function index()\n {\n //\n $request = request();\n $query = $request->query('query');\n if (empty($query)) {\n return '{error: \"No query found\"}';\n }\n\n $url = sprintf('https://maps.googleapis.com/maps/api/place/textsearch/json?query=%s&key=%s',\n urlencode($query),\n env('GOOGLE_API_KEY'));\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\n $response = curl_exec($ch);\n\n return $response;\n }", "title": "" }, { "docid": "009872f452c3449b2a44f43124c0d265", "score": "0.55162615", "text": "function SearchForm()\r\n{\r\n echo \"<form action=\\\"\".$GLOBALS['modurl'].\"&amp;req=search&query=$query\\\" method=\\\"post\\\">\"\r\n .\"<table border=\\\"0\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\" align=\\\"center\\\">\"\r\n .\"<tr><td><span class=\\\"pn-normal\\\"><input type=\\\"text\\\" size=\\\"25\\\" name=\\\"query\\\"> <input type=\\\"submit\\\" value=\\\"\"._SEARCH.\"\\\"></td></tr>\"\r\n .\"</table>\"\r\n .\"</form>\";\r\n}", "title": "" }, { "docid": "f8f628fe9030b3c04783651f5e0eacdc", "score": "0.5512901", "text": "public function search()\n {\n }", "title": "" }, { "docid": "f8f628fe9030b3c04783651f5e0eacdc", "score": "0.5512901", "text": "public function search()\n {\n }", "title": "" } ]
00575021a3e8363688859cd08a6ed9d2
Get the route matching the given name
[ { "docid": "fac178ca1d415635412ed6279cea57ee", "score": "0.8628642", "text": "public function getRoute(string $name): Route;", "title": "" } ]
[ { "docid": "becc967ed3c8a3fae9c45793118bf25e", "score": "0.90814656", "text": "public function getRoute($name);", "title": "" }, { "docid": "14d61bfdfb811a947d3a08ef6e4dd74b", "score": "0.8421382", "text": "public function getRouteByName($name)\n {\n }", "title": "" }, { "docid": "e1de3ddb542f65f337de02fea7e471f4", "score": "0.8244146", "text": "public function getRoute($name=\"\"){\n\t\tif(empty($name))$name=$this->getMatchedRouteName();\n\t\tif (isset($this->_routes[$name])) {\n\t\t\treturn $this->_routes[$name];\n\t\t}else{\n\t\t\ttian::throwException(\"73b3\");\n\t\t\treturn null;\n\t\t}\n\t}", "title": "" }, { "docid": "31b23d955fc785a5b3a3f1d2202200e1", "score": "0.816828", "text": "public function get($name)\n {\n foreach ($this->routeCollections as $routeCollection) {\n $route = $routeCollection->get($name);\n if (null !== $route) {\n return $route;\n }\n }\n }", "title": "" }, { "docid": "1544ee8a9301935f3c77c5da9049f576", "score": "0.81676406", "text": "public static function findRouteByName($name){\n $route = self::$namedRoute[$name];\n if (empty($route)){\n return null;\n }else{\n return $route;\n }\n }", "title": "" }, { "docid": "b1ab5ae5fc155755b031669851f06ce4", "score": "0.81237596", "text": "public function getRoute($name = null) {\n if ($name === null) {\n return $this->route;\n }\n return $this->routes[$name];\n }", "title": "" }, { "docid": "70bd2c66a48ae17c9fcd4657f308a0c0", "score": "0.79815227", "text": "public function getRoute($name) {\n\t\tif (!isset($this->_routes[$name]))\n\t\t{\n\t\t\treturn null;\n\t\t\t/* throw new Yaf_Exception_RouterFailed(\n\t\t\t\t\"Route $name is not defined\"\n\t\t\t); */\n\t\t}\n\n\t\treturn $this->_routes[$name];\n\t}", "title": "" }, { "docid": "d7c9f82df474649237590fdf5c8bde63", "score": "0.78550524", "text": "public static /*RouteObject*/ function getByName(/*string*/ $name)\r\n\t{\r\n\t\treturn static::$routes->getByName($name);\r\n\t}", "title": "" }, { "docid": "7ab418e8ea54eaae1e26361b76b27fcb", "score": "0.7852373", "text": "public function getRoute($name)\n {\n if (! $this->hasRoute($name)) {\n throw new \\Exception($name);\n }\n return $this->routes[$name];\n }", "title": "" }, { "docid": "f5ee5251140552a25dc7dc712d58bc0b", "score": "0.78053486", "text": "public function get(string $name)\n {\n return $this->routes->get($name);\n }", "title": "" }, { "docid": "dde00a2542e608f302ecdad460aee79d", "score": "0.7780659", "text": "public function findByName(string $routeName);", "title": "" }, { "docid": "580a011fdb497ab749ddb542865922d5", "score": "0.7695053", "text": "public function getRoute(string $name): Route\n {\n foreach ($this->routes as $routes) {\n foreach ($routes as $route) {\n if ($route->getName() === $name) {\n return $route;\n }\n }\n }\n return new Route(\"404\", '/404', function () {\n });\n }", "title": "" }, { "docid": "938808c5266cd2fbfcf60396b48842c8", "score": "0.7683141", "text": "public function getRoute($name)\n {\n if (array_key_exists($name, $this->routes)) {\n return Route::createFromRouteConfiguration($this->routes[$name]);\n } else {\n throw new RouteNotFoundException(\"Route not found\");\n }\n }", "title": "" }, { "docid": "846844284043e780f07ca4fc816636a0", "score": "0.765977", "text": "public function getRoute($name)\n {\n $route = $this->routes->get($name);\n if(!$route) {\n throw new \\Exception(\"Route '{$name}' does not exist\");\n }\n return $route;\n }", "title": "" }, { "docid": "e2891ed4e5b2fc5dfaf31c8d7d2012e1", "score": "0.7635982", "text": "public function getRoute(string $name = '') : RouteInterface;", "title": "" }, { "docid": "a2d798f6b60cbc4e2baa034fa0085339", "score": "0.7464407", "text": "public static function currentRouteNamed($name){\n\t\treturn Illuminate\\Routing\\Router::currentRouteNamed($name);\n\t }", "title": "" }, { "docid": "7870ff5e75c4afb26c9f53788c1be859", "score": "0.74454737", "text": "public function getRouteByName($name)\n {\n throw new RouteNotFoundException();\n }", "title": "" }, { "docid": "8837e7cdeb47c2c7e0776b389ceac369", "score": "0.7413625", "text": "public function getNamedRoute($name)\n {\n foreach ($this->routes as $route) {\n if ($name == $route->getName()) {\n return $route;\n }\n }\n throw new RuntimeException('Named route does not exist for name: ' . $name);\n }", "title": "" }, { "docid": "f088d1148350305eced87746a88eccf7", "score": "0.74105877", "text": "public function get($name) {\n if (!isset($this->routes[$name])) {\n throw new \\Exception(\"Route $name not added to the router.\");\n }\n return $this->routes[$name];\n }", "title": "" }, { "docid": "40209c804d51b80c5a198f4aab9aa80b", "score": "0.73374873", "text": "function route(string $name, $params = []) {\n $route = app()->router->getRouteByName($name);\n\n return $route->getUrl();\n}", "title": "" }, { "docid": "7d39a12d2b5a6040ee4430264b237131", "score": "0.7313017", "text": "function route($route_name)\n {\n return call_user_func_array(['Route', 'get'], func_get_args());\n }", "title": "" }, { "docid": "21a085de2544a91a51372d84d04ac3bd", "score": "0.7269074", "text": "public function getRouteParam($name = null);", "title": "" }, { "docid": "5d25fb93b694f34b6bdca1ecc1387655", "score": "0.7198655", "text": "public function __get(string $name)\r\n {\r\n $route = $this->route();\r\n\r\n if(!is_null($route))\r\n {\r\n $resource = $route['resource'];\r\n\r\n if(array_key_exists($name, $resource))\r\n {\r\n return $resource[$name];\r\n }\r\n }\r\n }", "title": "" }, { "docid": "2163f6f53836dacd33b75969018d4535", "score": "0.7126445", "text": "public static function getRouteInfo(String $name = \"\") {\n\t\t// FIND ROUTE BASED ON PROVIDED NAME\n\t\t// Check if a named route is requested.\n\t\tif( $name ) {\n\t\t\t// A named route is requested.\n\t\t\t// Loop through all routes till we find one that matches the name.\n\t\t\tforeach (Router::$routes as $route) {\n\t\t\t\t// Check if the route has a name registered and that it matches the requested name.\n\t\t\t\tif( array_key_exists('name', $route['options']) && $route['options']['name'] == $name ) {\n\t\t\t\t\t// Return the route info.\n\t\t\t\t\treturn $route;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// FIND CURRENT ROUTE BASED ON HOSTNAME AND URI\n\t\t// Loop through all routes.\n\t\tforeach (Router::$routes as $route) {\n\t\t\t// Match the route to the current URI\n\t\t\tif( $route['route'] == Request::uri() ) {\n\t\t\t\t// Check if a host option was registered, is a string, and matches the current host.\n\t\t\t\tif( array_key_exists('host', $route['options']) && is_string( $route['options']['host'] ) && $route['options']['host'] == Request::host() )\n\t\t\t\t\t// Return the route info.\n\t\t\t\t\treturn $route;\n\t\t\t\t// Check if a host option was registered, is an array, and contains the current host.\n\t\t\t\telse if( array_key_exists('host', $route['options']) && is_array( $route['options']['host'] ) && in_array( Request::host(), $route['options']['host'] ) )\n\t\t\t\t\t// Return the route info.\n\t\t\t\t\treturn $route;\n\t\t\t}\n\t\t}\n\n\t\t// FIND CURRENT ROUTE BASED ON URI\n\t\t// Loop through all routes.\n\t\tforeach (Router::$routes as $route) {\n\t\t\t// Match route to current URI\n\t\t\tif( $route['route'] == Request::uri() ) {\n\t\t\t\treturn $route;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "a196c54615ab9125220904189a590215", "score": "0.7040847", "text": "public function getRouteByName(string $name): RouteInterface\n {\n foreach ($this->routes as $route) {\n if ($name and $route->getName() === $name) {\n return $route;\n }\n }\n\n throw new RuntimeException('Can not find the route with name `'.$name.'`.');\n }", "title": "" }, { "docid": "98936187f3b7a45c9aaddfd2e49a0825", "score": "0.70122135", "text": "public function getRoute( $routeName )\n {\n $routeName = trim($routeName);\n\n if ( isset($this->staticRoutes[$routeName]) )\n {\n return $this->staticRoutes[$routeName];\n }\n\n if ( isset($this->routes[$routeName]) )\n {\n return $this->routes[$routeName];\n }\n\n return null;\n }", "title": "" }, { "docid": "ed3a0d249d03b4e3e85b03e32d5f996d", "score": "0.6988347", "text": "public function getNamedRoute(string $name): ?Route\n {\n return $this->namedRoutes[$name] ?? null;\n }", "title": "" }, { "docid": "3f5bada7c25680ddb93a41cf8b65aa69", "score": "0.6980053", "text": "public function to($name) {\n \n foreach ($this->routes as $route => $routeOptions) {\n if ($routeOptions['name'] == $name) {\n return '?' . $route;\n }\n }\n \n throw new RouteNotFoundException($name);\n }", "title": "" }, { "docid": "00bc24a69b1119c4c300ac59ad7037a8", "score": "0.6935999", "text": "abstract protected function routeName();", "title": "" }, { "docid": "2f18645523c8dac924ed4001510a14d6", "score": "0.69048077", "text": "public function withName(string $name): RouteInterface;", "title": "" }, { "docid": "e961dca47f4492c5880b508babad0e3a", "score": "0.68512017", "text": "public static function get($name, $namespace = null)\n\t{\n\t\t// make sure the namespace is loaded\n\t\tif (null !== $namespace AND ! isset(Route::$_routes[$namespace]))\n\t\t\tRoute::load_namespace($namespace);\n\n\t\tif (null !== $namespace ? ! isset(\n\t\t\t\tRoute::$_routes[$namespace][$name]\n\t\t\t) : ! isset(Route::$_routes[$name])\n\t\t)\n\t\t{\n\t\t\tthrow new Kohana_Exception(\n\t\t\t\t'The requested route does not exist: :route',\n\t\t\t\tarray(':route' => $name)\n\t\t\t);\n\t\t}\n\n\t\treturn $namespace !== null\n\t\t\t? Route::$_routes[$namespace][$name]\n\t\t\t: Route::$_routes[$name];\n\t}", "title": "" }, { "docid": "d62e2955b8d0ebf6e1dc31e99271ab92", "score": "0.681379", "text": "public function getRouteFromRequest(Request $request): Route;", "title": "" }, { "docid": "25b181ef9089e8b47f206543426acfef", "score": "0.67754215", "text": "public function getRouteByName($name, $parameters = array())\n {\n // TODO: Implement getRouteByName() method.\n }", "title": "" }, { "docid": "2aac9929d0a33cd81057d6ebe6a29cac", "score": "0.6754371", "text": "public function GetRouteParameterByName($name)\n\t{\n\t\tif(isset($this->routeParameters))\n\t\t{\n\t\t\tforeach($this->routeParameters as $routeParameter)\n\t\t\t{\n\t\t\t\tif($routeParameter->getName() === $name)\n\t\t\t\t{\n\t\t\t\t\treturn $routeParameter;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "title": "" }, { "docid": "762b762a03eefb0e9b491b74cd05ad41", "score": "0.6753946", "text": "public function route()\n {\n foreach ($this->routes as $route) {\n if ($route->matches($this->path)) {\n return $route->exec();\n }\n }\n\n throw new RouteNotFoundException(\"No routes matching {$this->path}\");\n }", "title": "" }, { "docid": "af839222b8f0d22aad18497b4f7e3a1f", "score": "0.6727778", "text": "public function name(): RouteNameInterface;", "title": "" }, { "docid": "c2a6975439c565de5a15ad445a9b83d0", "score": "0.6679359", "text": "protected function getRoute()\n {\n if ($this->route) {\n return $this->route;\n }\n\n // No route defined.\n // We find the full route from the request and get the base from there.\n $routeName = request()->route()->getName();\n\n return substr($routeName, 0, strrpos($routeName, '.'));\n }", "title": "" }, { "docid": "457f31a07e699e7aa956cefd723e1c1b", "score": "0.66578144", "text": "abstract protected function getRouteName(): string;", "title": "" }, { "docid": "2173e82fcca8519ea9afda7e82d4b2aa", "score": "0.6613663", "text": "public function getRoute(string $name) : RouteInterface\n {\n if (!isset($this->routes[$name])) {\n throw new RouteNotFoundException(sprintf(\n 'No route found for the name \"%s\".',\n $name\n ));\n }\n\n return $this->routes[$name];\n }", "title": "" }, { "docid": "c1af12a172e3a245271024b3fc2f9364", "score": "0.6586395", "text": "public function route()\n {\n foreach ($this->_routes as $name => $data) {\n $route = $data['route'];\n $route->process($this->_requestUrl, $data['options']);\n if ($route->getMatchFound() && $route->getCommand()->isPopulated()) {\n break;\n }\n }\n return $route->getCommand();\n }", "title": "" }, { "docid": "e665f86b8c625375f09116eb2745ee51", "score": "0.6574763", "text": "public function getRoute(): string;", "title": "" }, { "docid": "e5426f03188a416157bc8cbff335891b", "score": "0.6572946", "text": "private function getRoute()\n {\n $name = $this->app['router']->currentRouteName();\n if (!$name) {\n $name = $this->getController();\n }\n\n return $name;\n }", "title": "" }, { "docid": "0a36cb56ae6a3ded5559eb756267e11a", "score": "0.65675724", "text": "function path(string $routeName){\n return route($routeName, [], false);\n}", "title": "" }, { "docid": "75f43b454b738263a4e9182c70ad9800", "score": "0.6567406", "text": "public function route(string $route): string;", "title": "" }, { "docid": "75f43b454b738263a4e9182c70ad9800", "score": "0.6567406", "text": "public function route(string $route): string;", "title": "" }, { "docid": "16f0b4a1b5eb87fb7b02900f3b6fbba3", "score": "0.6553912", "text": "public function foundRoute();", "title": "" }, { "docid": "c06d92e637bf60bd3f812bd7450d7bc9", "score": "0.65494716", "text": "public function getRouteByName($name, $parameters = [])\n {\n $qb = $this->pageRepository->createQueryBuilder('p');\n $results = $qb\n ->select('p.route, p.controller, t.path, t.locale')\n ->join('p.translations', 't')\n ->andWhere($qb->expr()->eq('p.static', 0))\n ->andWhere($qb->expr()->eq('p.route', $qb->expr()->literal($name)))\n ->getQuery()\n ->getArrayResult()\n ;\n\n $routes = $this->transformResultsToRoutes($results);\n if (count($routes) == 1) {\n return current($routes);\n }\n\n return null;\n }", "title": "" }, { "docid": "69f68d5aed743362456bdaecfe78b522", "score": "0.6544304", "text": "function _route(string $routeName) : string\n{\n global $router;\n return $router->generate($routeName);\n}", "title": "" }, { "docid": "5c5bd7e0d833a793c5c30a7869576fa9", "score": "0.64428186", "text": "public function getRoute(){\r\n global $Routes;\r\n $uri = $_SERVER['REQUEST_URI'];\r\n\r\n //check if the route is in $Routes\r\n if(!in_array(explode('?',$uri)[0],$Routes)){\r\n //TODO :: DO a redirect to a error page\r\n die(\"Invalid Route!\");\r\n }\r\n\r\n return $uri;\r\n }", "title": "" }, { "docid": "8e5aa4862bdc60a46d9e0fc49a0d0b8c", "score": "0.64248264", "text": "protected function getRoute($sRouteName)\n {\n return $this->getUrlGenerator()->generate($sRouteName,[]);\n }", "title": "" }, { "docid": "8d5273f506a27116d3df620d0af098f5", "score": "0.63340986", "text": "static public function get($name, $lang = NULL)\n\t{\n\t\t// We use the current language if none given\n\t\tif($lang === NULL)\n\t\t{\n\t\t\t$lang = Request::$lang;\n\t\t}\n\n\t\t// We first look for a \"given_language.name\" route.\n\t\tif(isset(Route::$_routes[$lang.'.'.$name]))\n\t\t{\n\t\t\t$name = $lang.'.'.$name;\n\t\t\t// then the default language\n\t\t} elseif(isset(Route::$_routes[Kohana::$config->load('mlang.default').'.'.$name])) {\n\t\t\t$name = Kohana::$config->load('mlang.default').'.'.$name;\n\t\t}\n\t\t$route = parent::get($name);\n\t\tif($route !== NULL)\n\t\t{\n\t\t\t$route->_lang = $lang;\n\t\t}\n\t\treturn $route;\n\t}", "title": "" }, { "docid": "c92ee3316d50fc26fdde83d677f25b3d", "score": "0.63141805", "text": "public function getRoute()\n {\n $value = $this->get(self::route);\n return $value === null ? (string)$value : $value;\n }", "title": "" }, { "docid": "d56ff8703bf76a9e24a5b157d98e9429", "score": "0.62932706", "text": "function route($name, $params = []) {\n app()->request()->urlFor($name, $params);\n }", "title": "" }, { "docid": "e30f97ad102e0dfff22339f4916d1d8b", "score": "0.6238061", "text": "public function getEndpoint($name);", "title": "" }, { "docid": "fe0bfee4f9db18630db90a2d68e1b36b", "score": "0.6231947", "text": "public function getRoute($path) {\n foreach ($this->routes as $key => $route) {\n if($route == $path) {\n return call_user_func($this->callback[$key]);\n }\n }\n\n // If the path has no match\n return $this->getRoute('/');\n }", "title": "" }, { "docid": "2c557fffb097be3f54d3003c2871d270", "score": "0.6211877", "text": "private function getRoute()\n {\n //Uri\n $uri = $this->getUri();\n\n //Method\n $httpMethod = $this->request->getHttpMethod();\n\n //Valida as rotas\n foreach ($this->routes as $patternRoute => $methods) {\n\n //Verifica se a uri bate com o padrão\n if (preg_match($patternRoute, $uri, $matches)) {\n //Verifica o metodo\n if (isset($methods[$httpMethod])) {\n //Remove a primeira posição\n unset($matches[0]);\n\n //Variaveis processadas\n $keys = $methods[$httpMethod]['variables'];\n $methods[$httpMethod]['variables'] = array_combine($keys, $matches);\n $methods[$httpMethod]['variables']['request'] = $this->request;\n\n //Retorna os parametros da rota\n return $methods[$httpMethod];\n }\n\n throw new Exception('Método não permitido', 405);\n }\n }\n\n //Url não encontrada\n throw new Exception('URL não encontrada', 404);\n }", "title": "" }, { "docid": "47f797292fdce171c83c5fd1c28467ff", "score": "0.6196463", "text": "function getRouteGroup(string $groupName);", "title": "" }, { "docid": "b6b32b763afe5bf7d0919bef45eaadf0", "score": "0.61907923", "text": "static public function route() {\n return static::$route;\n }", "title": "" }, { "docid": "c49438eb172419f9a4a7bfc7333d0b8b", "score": "0.6179696", "text": "function search_routes_by_name($route_name) {\n\n\t\t$sql = \"select c.AreaName, b.CragName, a.RouteName,a.Grade, a.Pitches, a.Height, a.Rating\n\t\t\t\tfrom Route a, Crag b, Area c\n\t\t\t\twhere a.CragID = b.CragID\n\t\t\t\tand b.AreaID = c.AreaID\n\t\t\t\tand a.RouteName like '%$route_name%'\n\t\t\t\tOrder By a.RouteName, b.CragName, c.AreaName\";\n\n\t\t$db = new Data();//\n\n\t\treturn $results = $db->run($sql);\n\n\t}", "title": "" }, { "docid": "1b896afbca862e4864cadb0b7a45014a", "score": "0.6160356", "text": "public function route()\n {\n return call_user_func($this->getRouteResolver());\n }", "title": "" }, { "docid": "81312a515c66915865f7edaaf7e86b76", "score": "0.615936", "text": "public function getRoute()\r\n {\r\n if (!$this->route) {\r\n $this->setRoute();\r\n }\r\n return $this->route;\r\n }", "title": "" }, { "docid": "18bfc82b7bbede55dce21a58eba0675c", "score": "0.61545223", "text": "public function hasRoute(string $name): bool;", "title": "" }, { "docid": "7afc5b66d947a17c78c726a12191ca16", "score": "0.61469436", "text": "public function getRoute() {\n return strtolower(Inflector::pluralize($this->getName()));\n }", "title": "" }, { "docid": "f8495f2e59c06119cab9a6f1794e4993", "score": "0.6144825", "text": "public static function getRoute() {\n return self::$route;\n }", "title": "" }, { "docid": "f48d4941e2a1858749b80a5609d71d3b", "score": "0.61397845", "text": "private function matchRouteFromURI()\n {\n $uri = $this->getURI();\n \n foreach ($this->routes as $route)\n {\n $pattern = \"[\" . $route->uri . \"\\$]\";\n \n if (preg_match($pattern, $uri) == 1)\n {\n return $route;\n }\n \n //if (strcasecmp($uri, $route['uri']) == 0)\n //{\n // return $route;\n //}\n }\n\n return FALSE;\n }", "title": "" }, { "docid": "e24c43b05203a223594591b7213626c1", "score": "0.6115272", "text": "abstract public function getRouteForRequest (Gwilym_Request $request);", "title": "" }, { "docid": "fe100d7efbdc753af586f2a2b95a8221", "score": "0.61114967", "text": "protected function generateRouteByName(string $name, string $default)\n {\n if (\\is_null($this->extension)) {\n return $default;\n }\n\n return $this->extension->route($name, $default);\n }", "title": "" }, { "docid": "0f588a7595dc84c00b4da68cde8aeca7", "score": "0.61034626", "text": "public function getRoute()\n {\n $values = $this->getCultureRouteValues();\n\n if (!empty($values))\n {\n return $this->_routeName.'?'.http_build_query($values);\n }\n else\n {\n return $this->_routeName;\n }\n }", "title": "" }, { "docid": "b4d55247a3356af0232d2ec1420279cd", "score": "0.6088173", "text": "public static function getParam($name)\n {\n $routing = self::getRouting();\n return !empty($routing) && isset($routing['params'][$name]) ? $routing['params'][$name] : null;\n }", "title": "" }, { "docid": "ecbdd327653b4423f72fefeea02ea546", "score": "0.60818714", "text": "function get_path_from_route($routeName)\n {\n $path = parse_url(route($routeName), PHP_URL_PATH);\n\n return trim($path, '/');\n }", "title": "" }, { "docid": "5191bc7cddd3f8ef2666317f76e7fa9c", "score": "0.60804117", "text": "public static function getRequestedRoute()\r\n {\r\n //this is a helper function that needs to be improved because it does too much. I will look for this in grading\r\n $request_method = request::getRequestMethod();\r\n $page = request::getPage();\r\n $action = request::getAction();\r\n echo 'Action: ' . $action . '</br>';\r\n echo 'Page: ' . $page . '</br>';\r\n echo 'Request Method: ' . $request_method . '</br>';\r\n //this gets the routes objects, you need to add routes to add pages and follow the template of the route specified\r\n $routes = routes::getRoutes();\r\n //this figures out which route matches the page being requested in the URL and returns it so that the controller and method can be called\r\n foreach ($routes as $route) {\r\n if ($route->page == $page && $route->http_method == $request_method && $route->action == $action) {\r\n return $route;\r\n }\r\n }\r\n }", "title": "" }, { "docid": "cace4fc2a139851445d6364ee2c19ee1", "score": "0.60775983", "text": "public function getDynamicRoute();", "title": "" }, { "docid": "ad5c20f19849e455c791942714254843", "score": "0.6076304", "text": "protected function getRoute($path)\n {\n $verb = $this->request->method->get();\n $this->logger->info(__CLASS__ . \" $verb $path\");\n $route = $this->router->match($path, $this->request->server->get());\n //$this->logRoutesTried();\n return $route;\n }", "title": "" }, { "docid": "bab16a81f243e59d7a56de8e57d82b34", "score": "0.6064666", "text": "public function getRouteName(): ?string\n {\n return $this->routeName;\n }", "title": "" }, { "docid": "7d13ea079374b17df4ae889861b7423a", "score": "0.6047214", "text": "function findRoute($pattern)\n\t{\n\t\treturn Router::findRoute($pattern);\n\t}", "title": "" }, { "docid": "3aa66100210d4b97b88e5b1c495a5c88", "score": "0.6041362", "text": "public function getRouteName()\n {\n return $this->_routeName;\n }", "title": "" }, { "docid": "2afd6a4e7dd0789a0cda515dd56c675d", "score": "0.6038971", "text": "function get_route() {\r\n return self::$route;\r\n }", "title": "" }, { "docid": "8c06296b32ad2e6433749f86c795bb2a", "score": "0.6037955", "text": "public function getRoute(): string\n {\n return $this->route;\n }", "title": "" }, { "docid": "69188c258294da140fae3574a20f65d3", "score": "0.60293406", "text": "public function route()\r\n {\r\n return $this->context->route();\r\n }", "title": "" }, { "docid": "4f93b327a84daadcff10fcc772247225", "score": "0.60209334", "text": "public function getOption(string $name)\n\t{\n\t\treturn $this->route['options'][$name] ?? null;\n\t}", "title": "" }, { "docid": "ca11c3e157b65cd28dafdbeaa8484726", "score": "0.6011133", "text": "public function route() { return $this->route; }", "title": "" }, { "docid": "e45472e293d1c806e635e53a2fd58b8b", "score": "0.60039514", "text": "public function prefixRoute($name);", "title": "" }, { "docid": "37c3fa370f780a936e5bcc76ddeb37e4", "score": "0.5999891", "text": "public function getRouteParam($name, $default = null)\n {\n $matches = $this->getRouteMatch();\n if (null === $matches) {\n return $default;\n }\n\n return $matches->getParam($name, $default);\n }", "title": "" }, { "docid": "ae87e469aabbb880ae4fa052dee55c81", "score": "0.59967655", "text": "public function getRouteName()\n {\n return $this->routeName;\n }", "title": "" }, { "docid": "a664d3b4b4f90a044c40a1dc69acbb99", "score": "0.59933823", "text": "private function getDeclaredRoute () {\n return explode( \"@\" , $this->route )[0];\n }", "title": "" }, { "docid": "714f74588564e38332f494a4eb653d98", "score": "0.5976153", "text": "public static function getRouteOption(String $option, String $name = \"\") {\n\t\t// Get route info.\n\t\t$info = Router::getRouteInfo($name);\n\n\t\t// Check if option has been set.\n\t\tif( array_key_exists( $option, $info['options'] ) ) {\n\t\t\t// Check if the route option is an array with elements.\n\t\t\tif( is_array( $info['options'][$option] ) && count( $info['options'][$option] ) > 0 ) {\n\t\t\t\t// Return only the first element of the array.\n\t\t\t\treturn $info['options'][$option][0];\n\t\t\t// Otherwise the route option is probably a string.\n\t\t\t} else {\n\t\t\t\t// Return the value of the route option.\n\t\t\t\treturn $info['options'][$option];\n\t\t\t}\n\t\t}\n\n\t\t// Return empty string as fallback value.\n\t\treturn \"\";\n\t}", "title": "" }, { "docid": "2f747e8814d7b9613aedea321fa00598", "score": "0.59580487", "text": "public function getRouteName()\n {\n return $this->route_name;\n }", "title": "" }, { "docid": "c86395c13b3189f0d6abb6066a02aa54", "score": "0.59579307", "text": "function UrlFor(string $routeName, array $data = [], array $queryParams = []): string\n{\n return RouteParser()->urlFor($routeName, $data, $queryParams);\n}", "title": "" }, { "docid": "8dc9f350b3e68a8477894c2e25b2d0e9", "score": "0.59390426", "text": "public static function getRouteURL(String $name) {\n\t\t// Get route info\n\t\t$route = Router::getRouteInfo($name);\n\n\t\t// Check if route info was returned in the form of an array.\n\t\tif(is_array($route)) {\n\t\t\t// Check if a hostname has been specified\n\t\t\tif(array_key_exists(\"host\", $route['options'])) {\n\t\t\t\t// Check if a string and return the route with the hostname included\n\t\t\t\tif(is_string($route['options']['host'])) {\n\t\t\t\t\t// Do we have an HTTPS connection?\n\t\t\t\t\tif(isset($_SERVER['HTTPS']))\n\t\t\t\t\t\treturn \"https://\" . $route['options']['host'] . $route['route'];\n\t\t\t\t\treturn \"http://\" . $route['options']['host'] . $route['route'];\n\t\t\t\t}\n\t\t\t\t// Check if an array of hostnames and return the route with the first hostname included\n\t\t\t\telse if(is_array($route['options']['host'])) {\n\t\t\t\t\t// Do we have an HTTPS connection?\n\t\t\t\t\tif(isset($_SERVER['HTTPS']))\n\t\t\t\t\t\treturn \"https://\" . $route['options']['host'][0] . $route['route'];\n\t\t\t\t\treturn \"http://\" . $route['options']['host'][0] . $route['route'];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// No custom hostname specified.\n\t\t\t// Do we have an HTTPS connection?\n\t\t\tif(isset($_SERVER['HTTPS']))\n\t\t\t\t// Return an HTTPS URL.\n\t\t\t\treturn \"https://\" . $_SERVER['HTTP_HOST'] . $route['route'];\n\t\t\t// Return an HTTP URL.\n\t\t\treturn \"http://\" . $_SERVER['HTTP_HOST'] . $route['route'];\n\t\t}\n\t\treturn \"\";\n\t}", "title": "" }, { "docid": "738bb7f6d1cd06f302dba4878417204a", "score": "0.5931003", "text": "public function get($name);", "title": "" }, { "docid": "738bb7f6d1cd06f302dba4878417204a", "score": "0.5931003", "text": "public function get($name);", "title": "" }, { "docid": "738bb7f6d1cd06f302dba4878417204a", "score": "0.5931003", "text": "public function get($name);", "title": "" }, { "docid": "738bb7f6d1cd06f302dba4878417204a", "score": "0.5931003", "text": "public function get($name);", "title": "" }, { "docid": "738bb7f6d1cd06f302dba4878417204a", "score": "0.5931003", "text": "public function get($name);", "title": "" }, { "docid": "738bb7f6d1cd06f302dba4878417204a", "score": "0.5931003", "text": "public function get($name);", "title": "" }, { "docid": "64cad84e0211872755250f2098e43a46", "score": "0.5918137", "text": "public function route()\n {\n return $this->route;\n }", "title": "" }, { "docid": "d6a30585e5309556a5103f75cdc902a7", "score": "0.5916079", "text": "abstract public function addNamedRoute($routeName);", "title": "" }, { "docid": "b2206c6ad397221a0eef0c3244fc0ad8", "score": "0.5910523", "text": "public function getRoute()\n {\n return $this->route;\n }", "title": "" }, { "docid": "b2206c6ad397221a0eef0c3244fc0ad8", "score": "0.5910523", "text": "public function getRoute()\n {\n return $this->route;\n }", "title": "" } ]
a2c98987793d015a98a798f0fef61ae4
/ 12 color for loadout bin
[ { "docid": "05862b375ad37afd10d0c82836c3f43a", "score": "0.77134323", "text": "public function loadoutBinColor(){\n\n\t\t$color = array(\n\t\t\t'0'\t\t=>\t'#fca600',\n\t\t\t'1'\t\t=>\t'#C3C50A',\n\t\t\t'2'\t\t=>\t'#85fa00',\n\t\t\t'3'\t\t=>\t'#00fd69',\n\t\t\t'4'\t\t=>\t'#00ffc3',\n\t\t\t'5'\t\t=>\t'#02c5f5',\n\t\t\t'6'\t\t=>\t'#007fff',\n\t\t\t'7'\t\t=>\t'#5538ff',\n\t\t\t'8'\t\t=>\t'#bd3fff',\n\t\t\t'9'\t\t=>\t'#fe42d5',\n\t\t\t'10'\t=>\t'#ff2b7d',\n\t\t\t'11'\t=>\t'#fb2700'\n\t\t);\n\n\t\treturn $color;\n\n\t}", "title": "" } ]
[ { "docid": "df9c72c49db173e77c4106888ad0e738", "score": "0.601679", "text": "function wc_hex_lighter($color, $factor = 30)\n {\n }", "title": "" }, { "docid": "a10511d8f8ed0ed2806ae359db9b9792", "score": "0.59270215", "text": "function imagetruecolortopalette($image,$dither,$ncolors)\n{\n}", "title": "" }, { "docid": "4f245081cc2bc067b1997536e974a631", "score": "0.5914358", "text": "public function colorData()\n {\n return array(\n array('hex' => '000000', 'rgb' => array(0, 0, 0), 'hsl' => array(0, 0, 0)),\n array('hex' => 'FFFFFF', 'rgb' => array(255, 255, 255), 'hsl' => array(0, 0, 1)),\n array('hex' => 'FF0000', 'rgb' => array(255, 0, 0), 'hsl' => array(0, 1, 0.5)),\n array('hex' => '00FF00', 'rgb' => array(0, 255, 0), 'hsl' => array(120, 1, 0.5)),\n array('hex' => '0000FF', 'rgb' => array(0, 0, 255), 'hsl' => array(240, 1, 0.5)),\n array('hex' => 'FFFF00', 'rgb' => array(255, 255, 0), 'hsl' => array(60, 1, 0.5)),\n array('hex' => '00FFFF', 'rgb' => array(0, 255, 255), 'hsl' => array(180, 1, 0.5)),\n array('hex' => 'FF00FF', 'rgb' => array(255, 0, 255), 'hsl' => array(300, 1, 0.5)),\n array('hex' => 'C0C0C0', 'rgb' => array(192, 192, 192), 'hsl' => array(0, 0, 0.753)),\n array('hex' => '808080', 'rgb' => array(128, 128, 128), 'hsl' => array(0, 0, 0.5)),\n array('hex' => '800000', 'rgb' => array(128, 0, 0), 'hsl' => array(0, 1, 0.25)),\n array('hex' => '808000', 'rgb' => array(128, 128, 0), 'hsl' => array(60, 1, 0.25)),\n array('hex' => '008000', 'rgb' => array(0, 128, 0), 'hsl' => array(120, 1, 0.25)),\n array('hex' => '800080', 'rgb' => array(128, 0, 128), 'hsl' => array(300, 1, 0.25)),\n array('hex' => '008080', 'rgb' => array(0, 128, 128), 'hsl' => array(180, 1, 0.25)),\n array('hex' => '000080', 'rgb' => array(0, 0, 128), 'hsl' => array(240, 1, 0.25))\n );\n }", "title": "" }, { "docid": "8b62075a705802474881162ef4eb18f5", "score": "0.5874048", "text": "function SeparateRBG($col) \n{ \n $Color[\"R\"]= hexdec(substr($col, 0, 2 )); \n $Color[\"B\"] = hexdec(substr($col, 2, 2)); \n $Color[\"G\"] = hexdec(substr($col, -2)); \n\n return $Color ; \n}", "title": "" }, { "docid": "294a15a771d9a0ed3568b08cb1afbb38", "score": "0.57653725", "text": "public function colors();", "title": "" }, { "docid": "8cdac711654d679b4bfeece4d867921c", "score": "0.5757331", "text": "function get_color($poucentage, $mini = 0, $max = 100)\n{\n $valeur = (int) $poucentage - $mini;\n $div = $max - $mini;\n if ($div < 1) $div = 1;\n $couleur = 255 - ($valeur * 255 / ($div));\n if ($couleur > 16) $couleur = dechex($couleur);\n else $couleur = \"0\" . dechex($couleur);\n $couleurHexa = \"FF\" . $couleur . $couleur;\n return $couleurHexa;\n}", "title": "" }, { "docid": "354a9a073e836fc9320a4a8a2fc3273c", "score": "0.5749171", "text": "public function color();", "title": "" }, { "docid": "82b0470b7cb5eef04fb4494526d3bdb7", "score": "0.57351696", "text": "private function initColor() {\n \\MyLocalLogger\\Write::journal('IN');\n\n $this->color = $this->createPixel($this->colorSource);\n\n \\MyLocalLogger\\Write::journal('OUT');\n }", "title": "" }, { "docid": "7bb0f1b09180c241cff67994b59267ef", "score": "0.5729371", "text": "public function getColor();", "title": "" }, { "docid": "7bb0f1b09180c241cff67994b59267ef", "score": "0.5729371", "text": "public function getColor();", "title": "" }, { "docid": "045625e41269957d4036578f350b8968", "score": "0.57283175", "text": "public function rgbMode() {\n\t}", "title": "" }, { "docid": "6954e03854c9969f26a3a9b65433e759", "score": "0.5673308", "text": "function imagetruecolortopalette($image, $dither, $ncolors)\n{\n}", "title": "" }, { "docid": "1a884f0f1baad816b3f31ceec19f1ceb", "score": "0.56677234", "text": "function setColor($percent, $invert = false)\n{\n //Amount of red based on not low the percent is\n $R = min((2.0 * (1.0-$percent)), 1.0) * 255.0;\n //Green is default (100%) color\n $G = min((2.0 * $percent), 1.0) * 255.0;\n //No blue here\n $B = 0.0;\n //Return the hexadecimal version of this RGB color\n return (($invert) ? \nsprintf(\"%02X%02X%02X\",$R,$G,$B) \n: sprintf(\"%02X%02X%02X\",$R,$G,$B)); \n}", "title": "" }, { "docid": "28a7406762643fd158f45914d814cfc0", "score": "0.5663582", "text": "public function luma()\n {\n return (0.30 * $this->r +\n 0.59 * $this->g +\n 0.11 * $this->b) / 255;\n }", "title": "" }, { "docid": "b49d08a32d8d6fd893c6b454b10831d4", "score": "0.5653966", "text": "public function toXYBri(){\n $rgb = $this->toRgbInt();\n\n $r = $rgb['red'];\n $g = $rgb['green'];\n $b = $rgb['blue'];\n\n $r = $r / 255;\n $g = $g / 255;\n $b = $b / 255;\n\n if ($r < 0 || $r > 1 || $g < 0 || $g > 1 || $b < 0 || $b > 1) {\n throw new \\Exception(\"Invalid RGB array. [{$r},{$b},{$g}]\");\n }\n\n $rt = ($r > 0.04045) ? pow(($r + 0.055) / (1.0 + 0.055), 2.4) : ($r / 12.92);\n $gt = ($g > 0.04045) ? pow(($g + 0.055) / (1.0 + 0.055), 2.4) : ($g / 12.92);\n $bt = ($b > 0.04045) ? pow(($b + 0.055) / (1.0 + 0.055), 2.4) : ($b / 12.92);\n\n $cie_x = $rt * 0.649926 + $gt * 0.103455 + $bt * 0.197109;\n $cie_y = $rt * 0.234327 + $gt * 0.743075 + $bt * 0.022598;\n $cie_z = $rt * 0.0000000 + $gt * 0.053077 + $bt * 1.035763;\n\n if($cie_x + $cie_y + $cie_z == 0){\n $hue_x = 0.1;\n $hue_y = 0.1;\n }else {\n $hue_x = $cie_x / ($cie_x + $cie_y + $cie_z);\n $hue_y = $cie_y / ($cie_x + $cie_y + $cie_z);\n }\n return array('x'=>$hue_x,'y'=>$hue_y,'bri'=>$cie_y);\n }", "title": "" }, { "docid": "39c256d645468c119a76bcc1f510b837", "score": "0.56281674", "text": "function pixelColor($steps) {\n $coloring = array(\n 'red' => 0,\n 'green' => 0,\n 'blue' => 0\n );\n \n if ($steps < 6) {\n // outer blue region. Start dark blue towards extreme edges and move towards medium/light blue in the middle\n $coloring['red'] = $steps*$steps + $steps;\n $coloring['green'] = 255*($steps/255.0)*($steps/255.0);\n $coloring['blue'] = 170*($steps*$steps*$steps/125.0)+ 85*($steps*$steps/144.0) + 5*(6-$steps)+10;\n } else if ($steps < 10) {\n // purple/blue section. put more weight on red for closer to the centre to allow for \"smooth\" gradient\n $coloring['red'] = 2*$steps*$steps - $steps;\n $coloring['green'] = 255*($steps/255.0)*($steps/255.0)+10;\n $coloring['blue']= 185 - $steps*$steps + $steps; // from next section, sub in steps=5 to get 170 + 85*(25.0/144.0) = 185\n } else if ($steps <= 12) {\n // move from dark red/purple to pure red as steps increases\n $coloring['red'] = 255 - 70*(12-$steps); // 21 = 255/12\n $coloring['green'] = $steps;\n $coloring['blue'] = -2*($steps-8)*($steps-13); //the bigger the number, the less weighting on blue. hence use a concave function\n } else if ($steps <= 22) {\n // move from red to orange to yellow. red and blue values are constant. we need to change green\n $coloring['red'] = 255;// constant 255\n $coloring['green'] = 12+27*($steps-13); // start from 12 and increase to 255. steps is a number between 13 and 20. (255-12)/7=34\n // use linear interpolation\n $coloring['blue'] = 0; //constant 0\n } else if ($steps <= 32) {\n // move from yellow -> green\n $coloring['red'] = 255-(12+27*($steps-23)); // start from 12 and increase to 255. steps is a number between 13 and 20. (255-12)/7=34\n // use linear interpolation\n $coloring['green'] = 255;\n $coloring['blue'] = 0; //constant 0\n } else if ($steps <= 45) {\n // move from green -> cyan\n $coloring['red'] = 0; // start from 12 and increase to 255. steps is a number between 13 and 20. (255-12)/7=34\n // use linear interpolation\n $coloring['green'] = 255;\n $coloring['blue'] = 19*($steps-33); //constant 0\n } else if ($steps <= 75) {\n // move from cyan -> dark blue\n $coloring['red'] = 0; // start from 12 and increase to 255. steps is a number between 13 and 20. (255-12)/7=34\n // use linear interpolation\n $coloring['green'] = 255-(8.5*($steps-46));\n $coloring['blue'] = 255;\n } else if ($steps <= 110) {\n // move from pink/magenta -> purple -> blue\n $coloring['red'] = 7*($steps-76); //255/(110-75) = 7\n $coloring['green'] = 0;\n $coloring['blue'] = 255;\n } else if ($steps <= 130) {\n // move from magenta -> red\n $coloring['red'] = 255;\n $coloring['green'] = 0;\n $coloring['blue'] = 255-(12*($steps-111));\n } else if ($steps <= 160) {\n // move from red -> yellow\n $coloring['red'] = 255;\n $coloring['green'] = 8*($steps-131);\n $coloring['blue'] = 0;\n } else if ($steps <= 180) {\n // move from yellow -> green\n $coloring['red'] = 255-8*($steps-161);\n $coloring['green'] = 255;\n $coloring['blue'] = 0;\n } else if ($steps <= 210) {\n // green -> cyan\n $coloring['red'] = 0;\n $coloring['green'] = 255;\n $coloring['blue'] = 8*($steps-181);\n } else {\n // cyan -> dark blue\n $coloring['red'] = 0;\n $coloring['green'] = 255-5*($steps-211);\n $coloring['blue'] = 255;\n }\n return $coloring;\n}", "title": "" }, { "docid": "e7ff4bb1494de1a569ca8da19096eeca", "score": "0.5626941", "text": "private function getColorSwatch() {\r\n\r\n\t\treturn array(\r\n\t\t\t\"black\"=>array( \"red\"=>0x00, \"green\"=>0x00, \"blue\"=>0x00),\r\n\t\t\t\"maroon\"=>array( \"red\"=>0x80, \"green\"=>0x00, \"blue\"=>0x00),\r\n\t\t\t\"green\"=>array( \"red\"=>0x00, \"green\"=>0x80, \"blue\"=>0x00),\r\n\t\t\t\"olive\"=>array( \"red\"=>0x80, \"green\"=>0x80, \"blue\"=>0x00),\r\n\t\t\t\"navy\"=>array( \"red\"=>0x00, \"green\"=>0x00, \"blue\"=>0x80),\r\n\t\t\t\"purple\"=>array( \"red\"=>0x80, \"green\"=>0x00, \"blue\"=>0x80),\r\n\t\t\t\"teal\"=>array( \"red\"=>0x00, \"green\"=>0x80, \"blue\"=>0x80),\r\n\t\t\t\"gray\"=>array( \"red\"=>0x80, \"green\"=>0x80, \"blue\"=>0x80),\r\n\t\t\t\"silver\"=>array( \"red\"=>0xC0, \"green\"=>0xC0, \"blue\"=>0xC0),\r\n\t\t\t\"red\"=>array( \"red\"=>0xFF, \"green\"=>0x00, \"blue\"=>0x00),\r\n\t\t\t\"darkgoldenrod\"=>array( \"red\"=>0xB8, \"green\"=>0x86, \"blue\"=>0x0B),\r\n\t\t\t\"yellow\"=>array( \"red\"=>0xFF, \"green\"=>0xFF, \"blue\"=>0x00),\r\n\t\t\t\"blue\"=>array( \"red\"=>0x00, \"green\"=>0x00, \"blue\"=>0xFF),\r\n\t\t\t\"fuchsia\"=>array( \"red\"=>0xFF, \"green\"=>0x00, \"blue\"=>0xFF),\r\n\t\t\t\"aqua\"=>array( \"red\"=>0x00, \"green\"=>0xFF, \"blue\"=>0xFF),\r\n\t\t\t\"white\"=>array( \"red\"=>0xFF, \"green\"=>0xFF, \"blue\"=>0xFF),\r\n\t\t\t\"tomato\"=>array( \"red\"=>0xFF, \"green\"=>0x63, \"blue\"=>0x47),\r\n\t\t\t\"antiquewhite\"=>array( \"red\"=>0xFA, \"green\"=>0xEB, \"blue\"=>0xD7),\r\n\t\t\t\"aquamarine\"=>array( \"red\"=>0x7F, \"green\"=>0xFF, \"blue\"=>0xD4),\r\n\t\t\t\"brown\"=>array( \"red\"=>0xA5, \"green\"=>0x2A, \"blue\"=>0x2A),\r\n\t\t\t\"beige\"=>array( \"red\"=>0xF5, \"green\"=>0xF5, \"blue\"=>0xDC),\r\n\t\t\t\"blueviolet\"=>array( \"red\"=>0x8A, \"green\"=>0x2B, \"blue\"=>0xE2),\r\n\t\t\t\"azure\"=>array( \"red\"=>0xF0, \"green\"=>0xFF, \"blue\"=>0xFF),\r\n\t\t\t\"burlywood\"=>array( \"red\"=>0xDE, \"green\"=>0xB8, \"blue\"=>0x87),\r\n\t\t\t\"cadetblue\"=>array( \"red\"=>0x5F, \"green\"=>0x9E, \"blue\"=>0xA0),\r\n\t\t\t\"chartreuse\"=>array( \"red\"=>0x7F, \"green\"=>0xFF, \"blue\"=>0x00),\r\n\t\t\t\"chocolate\"=>array( \"red\"=>0xD2, \"green\"=>0x69, \"blue\"=>0x1E),\r\n\t\t\t\"coral\"=>array( \"red\"=>0xFF, \"green\"=>0x7F, \"blue\"=>0x50),\r\n\t\t\t\"cornflowerblue\"=>array( \"red\"=>0x64, \"green\"=>0x95, \"blue\"=>0xED),\r\n\t\t\t\"cornsilk\"=>array( \"red\"=>0xFF, \"green\"=>0xF8, \"blue\"=>0xDC),\r\n\t\t\t\"crimson\"=>array( \"red\"=>0xDC, \"green\"=>0x14, \"blue\"=>0x3C),\r\n\t\t\t\"darkblue\"=>array( \"red\"=>0x00, \"green\"=>0x00, \"blue\"=>0x8B),\r\n\t\t\t\"darkcyan\"=>array( \"red\"=>0x00, \"green\"=>0x8B, \"blue\"=>0x8B),\r\n\t\t\t\"lightgrey\"=>array( \"red\"=>0xD3, \"green\"=>0xD3, \"blue\"=>0xD3),\r\n\t\t\t\"darkgray\"=>array( \"red\"=>0xA9, \"green\"=>0xA9, \"blue\"=>0xA9),\r\n\t\t\t\"darkgreen\"=>array( \"red\"=>0x00, \"green\"=>0x64, \"blue\"=>0x00),\r\n\t\t\t\"darkkhaki\"=>array( \"red\"=>0xBD, \"green\"=>0xB7, \"blue\"=>0x6B),\r\n\t\t\t\"darkmagenta\"=>array( \"red\"=>0x8B, \"green\"=>0x00, \"blue\"=>0x8B),\r\n\t\t\t\"darkolivegreen\"=>array( \"red\"=>0x55, \"green\"=>0x6B, \"blue\"=>0x2F),\r\n\t\t\t\"darkorange\"=>array( \"red\"=>0xFF, \"green\"=>0x8C, \"blue\"=>0x00),\r\n\t\t\t\"darkorchid\"=>array( \"red\"=>0x99, \"green\"=>0x32, \"blue\"=>0xCC),\r\n\t\t\t\"darkred\"=>array( \"red\"=>0x8B, \"green\"=>0x00, \"blue\"=>0x00),\r\n\t\t\t\"darksalmon\"=>array( \"red\"=>0xE9, \"green\"=>0x96, \"blue\"=>0x7A),\r\n\t\t\t\"darkseagreen\"=>array( \"red\"=>0x8F, \"green\"=>0xBC, \"blue\"=>0x8F),\r\n\t\t\t\"darkslateblue\"=>array( \"red\"=>0x48, \"green\"=>0x3D, \"blue\"=>0x8B),\r\n\t\t\t\"darkslategray\"=>array( \"red\"=>0x2F, \"green\"=>0x4F, \"blue\"=>0x4F),\r\n\t\t\t\"darkturquoise\"=>array( \"red\"=>0x00, \"green\"=>0xCE, \"blue\"=>0xD1),\r\n\t\t\t\"darkviolet\"=>array( \"red\"=>0x94, \"green\"=>0x00, \"blue\"=>0xD3),\r\n\t\t\t\"deeppink\"=>array( \"red\"=>0xFF, \"green\"=>0x14, \"blue\"=>0x93),\r\n\t\t\t\"deepskyblue\"=>array( \"red\"=>0x00, \"green\"=>0xBF, \"blue\"=>0xFF),\r\n\t\t\t\"dimgray\"=>array( \"red\"=>0x69, \"green\"=>0x69, \"blue\"=>0x69),\r\n\t\t\t\"dodgerblue\"=>array( \"red\"=>0x1E, \"green\"=>0x90, \"blue\"=>0xFF),\r\n\t\t\t\"firebrick\"=>array( \"red\"=>0xB2, \"green\"=>0x22, \"blue\"=>0x22),\r\n\t\t\t\"floralwhite\"=>array( \"red\"=>0xFF, \"green\"=>0xFA, \"blue\"=>0xF0),\r\n\t\t\t\"forestgreen\"=>array( \"red\"=>0x22, \"green\"=>0x8B, \"blue\"=>0x22),\r\n\t\t\t\"gainsboro\"=>array( \"red\"=>0xDC, \"green\"=>0xDC, \"blue\"=>0xDC),\r\n\t\t\t\"ghostwhite\"=>array( \"red\"=>0xF8, \"green\"=>0xF8, \"blue\"=>0xFF),\r\n\t\t\t\"gold\"=>array( \"red\"=>0xFF, \"green\"=>0xD7, \"blue\"=>0x00),\r\n\t\t\t\"goldenrod\"=>array( \"red\"=>0xDA, \"green\"=>0xA5, \"blue\"=>0x20),\r\n\t\t\t\"greenyellow\"=>array( \"red\"=>0xAD, \"green\"=>0xFF, \"blue\"=>0x2F),\r\n\t\t\t\"honeydew\"=>array( \"red\"=>0xF0, \"green\"=>0xFF, \"blue\"=>0xF0),\r\n\t\t\t\"hotpink\"=>array( \"red\"=>0xFF, \"green\"=>0x69, \"blue\"=>0xB4),\r\n\t\t\t\"indianred\"=>array( \"red\"=>0xCD, \"green\"=>0x5C, \"blue\"=>0x5C),\r\n\t\t\t\"indigo\"=>array( \"red\"=>0x4B, \"green\"=>0x00, \"blue\"=>0x82),\r\n\t\t\t\"ivory\"=>array( \"red\"=>0xFF, \"green\"=>0xFF, \"blue\"=>0xF0),\r\n\t\t\t\"khaki\"=>array( \"red\"=>0xF0, \"green\"=>0xE6, \"blue\"=>0x8C),\r\n\t\t\t\"lavender\"=>array( \"red\"=>0xE6, \"green\"=>0xE6, \"blue\"=>0xFA),\r\n\t\t\t\"lavenderblush\"=>array( \"red\"=>0xFF, \"green\"=>0xF0, \"blue\"=>0xF5),\r\n\t\t\t\"lawngreen\"=>array( \"red\"=>0x7C, \"green\"=>0xFC, \"blue\"=>0x00),\r\n\t\t\t\"lemonchiffon\"=>array( \"red\"=>0xFF, \"green\"=>0xFA, \"blue\"=>0xCD),\r\n\t\t\t\"lightblue\"=>array( \"red\"=>0xAD, \"green\"=>0xD8, \"blue\"=>0xE6),\r\n\t\t\t\"lightcoral\"=>array( \"red\"=>0xF0, \"green\"=>0x80, \"blue\"=>0x80),\r\n\t\t\t\"tan\"=>array( \"red\"=>0xD2, \"green\"=>0xB4, \"blue\"=>0x8C),\r\n\t\t\t\"lightgoldenrodyellow\"=>array( \"red\"=>0xFA, \"green\"=>0xFA, \"blue\"=>0xD2),\r\n\t\t\t\"lightgreen\"=>array( \"red\"=>0x90, \"green\"=>0xEE, \"blue\"=>0x90),\r\n\t\t\t\"lime\"=>array( \"red\"=>0x00, \"green\"=>0xFF, \"blue\"=>0x00),\r\n\t\t\t\"lightpink\"=>array( \"red\"=>0xFF, \"green\"=>0xB6, \"blue\"=>0xC1),\r\n\t\t\t\"lightsalmon\"=>array( \"red\"=>0xFF, \"green\"=>0xA0, \"blue\"=>0x7A),\r\n\t\t\t\"lightseagreen\"=>array( \"red\"=>0x20, \"green\"=>0xB2, \"blue\"=>0xAA),\r\n\t\t\t\"lightskyblue\"=>array( \"red\"=>0x87, \"green\"=>0xCE, \"blue\"=>0xFA),\r\n\t\t\t\"lightslategray\"=>array( \"red\"=>0x77, \"green\"=>0x88, \"blue\"=>0x99),\r\n\t\t\t\"lightsteelblue\"=>array( \"red\"=>0xB0, \"green\"=>0xC4, \"blue\"=>0xDE),\r\n\t\t\t\"lightyellow\"=>array( \"red\"=>0xFF, \"green\"=>0xFF, \"blue\"=>0xE0),\r\n\t\t\t\"limegreen\"=>array( \"red\"=>0x32, \"green\"=>0xCD, \"blue\"=>0x32),\r\n\t\t\t\"linen\"=>array( \"red\"=>0xFA, \"green\"=>0xF0, \"blue\"=>0xE6),\r\n\t\t\t\"mediumaquamarine\"=>array( \"red\"=>0x66, \"green\"=>0xCD, \"blue\"=>0xAA),\r\n\t\t\t\"mediumblue\"=>array( \"red\"=>0x00, \"green\"=>0x00, \"blue\"=>0xCD),\r\n\t\t\t\"mediumorchid\"=>array( \"red\"=>0xBA, \"green\"=>0x55, \"blue\"=>0xD3),\r\n\t\t\t\"mediumpurple\"=>array( \"red\"=>0x93, \"green\"=>0x70, \"blue\"=>0xD0),\r\n\t\t\t\"mediumseagreen\"=>array( \"red\"=>0x3C, \"green\"=>0xB3, \"blue\"=>0x71),\r\n\t\t\t\"mediumslateblue\"=>array( \"red\"=>0x7B, \"green\"=>0x68, \"blue\"=>0xEE),\r\n\t\t\t\"mediumspringgreen\"=>array( \"red\"=>0x00, \"green\"=>0xFA, \"blue\"=>0x9A),\r\n\t\t\t\"mediumturquoise\"=>array( \"red\"=>0x48, \"green\"=>0xD1, \"blue\"=>0xCC),\r\n\t\t\t\"mediumvioletred\"=>array( \"red\"=>0xC7, \"green\"=>0x15, \"blue\"=>0x85),\r\n\t\t\t\"midnightblue\"=>array( \"red\"=>0x19, \"green\"=>0x19, \"blue\"=>0x70),\r\n\t\t\t\"mintcream\"=>array( \"red\"=>0xF5, \"green\"=>0xFF, \"blue\"=>0xFA),\r\n\t\t\t\"mistyrose\"=>array( \"red\"=>0xFF, \"green\"=>0xE4, \"blue\"=>0xE1),\r\n\t\t\t\"moccasin\"=>array( \"red\"=>0xFF, \"green\"=>0xE4, \"blue\"=>0xB5),\r\n\t\t\t\"navajowhite\"=>array( \"red\"=>0xFF, \"green\"=>0xDE, \"blue\"=>0xAD),\r\n\t\t\t\"oldlace\"=>array( \"red\"=>0xFD, \"green\"=>0xF5, \"blue\"=>0xE6),\r\n\t\t\t\"olivedrab\"=>array( \"red\"=>0x6B, \"green\"=>0x8E, \"blue\"=>0x23),\r\n\t\t\t\"orange\"=>array( \"red\"=>0xFF, \"green\"=>0xA5, \"blue\"=>0x00),\r\n\t\t\t\"orangered\"=>array( \"red\"=>0xFF, \"green\"=>0x45, \"blue\"=>0x00),\r\n\t\t\t\"orchid\"=>array( \"red\"=>0xDA, \"green\"=>0x70, \"blue\"=>0xD6),\r\n\t\t\t\"palegoldenrod\"=>array( \"red\"=>0xEE, \"green\"=>0xE8, \"blue\"=>0xAA),\r\n\t\t\t\"palegreen\"=>array( \"red\"=>0x98, \"green\"=>0xFB, \"blue\"=>0x98),\r\n\t\t\t\"paleturquoise\"=>array( \"red\"=>0xAF, \"green\"=>0xEE, \"blue\"=>0xEE),\r\n\t\t\t\"palevioletred\"=>array( \"red\"=>0xDB, \"green\"=>0x70, \"blue\"=>0x93),\r\n\t\t\t\"papayawhip\"=>array( \"red\"=>0xFF, \"green\"=>0xEF, \"blue\"=>0xD5),\r\n\t\t\t\"peachpuff\"=>array( \"red\"=>0xFF, \"green\"=>0xDA, \"blue\"=>0xB9),\r\n\t\t\t\"peru\"=>array( \"red\"=>0xCD, \"green\"=>0x85, \"blue\"=>0x3F),\r\n\t\t\t\"pink\"=>array( \"red\"=>0xFF, \"green\"=>0xC0, \"blue\"=>0xCB),\r\n\t\t\t\"plum\"=>array( \"red\"=>0xDD, \"green\"=>0xA0, \"blue\"=>0xDD),\r\n\t\t\t\"powderblue\"=>array( \"red\"=>0xB0, \"green\"=>0xE0, \"blue\"=>0xE6),\r\n\t\t\t\"rosybrown\"=>array( \"red\"=>0xBC, \"green\"=>0x8F, \"blue\"=>0x8F),\r\n\t\t\t\"royalblue\"=>array( \"red\"=>0x41, \"green\"=>0x69, \"blue\"=>0xE1),\r\n\t\t\t\"saddlebrown\"=>array( \"red\"=>0x8B, \"green\"=>0x45, \"blue\"=>0x13),\r\n\t\t\t\"salmon\"=>array( \"red\"=>0xFA, \"green\"=>0x80, \"blue\"=>0x72),\r\n\t\t\t\"sandybrown\"=>array( \"red\"=>0xF4, \"green\"=>0xA4, \"blue\"=>0x60),\r\n\t\t\t\"seagreen\"=>array( \"red\"=>0x2E, \"green\"=>0x8B, \"blue\"=>0x57),\r\n\t\t\t\"seashell\"=>array( \"red\"=>0xFF, \"green\"=>0xF5, \"blue\"=>0xEE),\r\n\t\t\t\"sienna\"=>array( \"red\"=>0xA0, \"green\"=>0x52, \"blue\"=>0x2D),\r\n\t\t\t\"skyblue\"=>array( \"red\"=>0x87, \"green\"=>0xCE, \"blue\"=>0xEB),\r\n\t\t\t\"slateblue\"=>array( \"red\"=>0x6A, \"green\"=>0x5A, \"blue\"=>0xCD),\r\n\t\t\t\"slategray\"=>array( \"red\"=>0x70, \"green\"=>0x80, \"blue\"=>0x90),\r\n\t\t\t\"snow\"=>array( \"red\"=>0xFF, \"green\"=>0xFA, \"blue\"=>0xFA),\r\n\t\t\t\"springgreen\"=>array( \"red\"=>0x00, \"green\"=>0xFF, \"blue\"=>0x7F),\r\n\t\t\t\"steelblue\"=>array( \"red\"=>0x46, \"green\"=>0x82, \"blue\"=>0xB4),\r\n\t\t\t\"lightcyan\"=>array( \"red\"=>0xE0, \"green\"=>0xFF, \"blue\"=>0xFF),\r\n\t\t\t\"thistle\"=>array( \"red\"=>0xD8, \"green\"=>0xBF, \"blue\"=>0xD8),\r\n\t\t\t\"aliceblue\"=>array( \"red\"=>0xF0, \"green\"=>0xF8, \"blue\"=>0xFF),\r\n\t\t\t\"turquoise\"=>array( \"red\"=>0x40, \"green\"=>0xE0, \"blue\"=>0xD0),\r\n\t\t\t\"violet\"=>array( \"red\"=>0xEE, \"green\"=>0x82, \"blue\"=>0xEE),\r\n\t\t\t\"wheat\"=>array( \"red\"=>0xF5, \"green\"=>0xDE, \"blue\"=>0xB3),\r\n\t\t\t\"whitesmoke\"=>array( \"red\"=>0xF5, \"green\"=>0xF5, \"blue\"=>0xF5),\r\n\t\t\t\"yellowgreen\"=>array( \"red\"=>0x9A, \"green\"=>0xCD, \"blue\"=>0x32)\r\n\t\t);\r\n\r\n\t}", "title": "" }, { "docid": "7f4beb2bfbec1364e1788edae88f1464", "score": "0.5617605", "text": "function hex2rgb($N){ \n $dou = str_split($N,2); \n return array( \n \"R\" => hexdec($dou[0]), \n \"G\" => hexdec($dou[1]), \n \"B\" => hexdec($dou[2]) \n ); \n }", "title": "" }, { "docid": "1af7ef758bcb5a9ed8b3ace1ee07616c", "score": "0.56121516", "text": "function wc_hex_darker($color, $factor = 30)\n {\n }", "title": "" }, { "docid": "876b69d9b7d314f0bffb046013fddb2f", "score": "0.55846584", "text": "public function getImageColors () {}", "title": "" }, { "docid": "fe60f273fca0545c424a423764c1aade", "score": "0.5581514", "text": "function convert_rgb($index_of_color)\n{\n // this code is from stackoverflow i wasn't familier with how to convert to Hex\n $red = round(round(($index_of_color['red'] / 0x33)) * 0x33);\n $green = round(round(($index_of_color['green'] / 0x33)) * 0x33);\n $blue = round(round(($index_of_color['blue'] / 0x33)) * 0x33);\n return $color_value_hexa = sprintf('%02X%02X%02X', $red, $green, $blue);\n}", "title": "" }, { "docid": "527c2d23cec497767f7fc105db611f54", "score": "0.5565429", "text": "function load_color ($value) {\n\n global $conf;\n\n $scaled_load = $value / $conf['load_scale'];\n if ($scaled_load>1.00) {\n $color = $conf['load_colors'][\"100+\"];\n }\n else if ($scaled_load>=0.75) {\n $color = $conf['load_colors'][\"75-100\"];\n }\n else if ($scaled_load >= 0.50) {\n $color = $conf['load_colors'][\"50-75\"];\n }\n else if ($scaled_load>=0.25) {\n $color = $conf['load_colors'][\"25-50\"];\n }\n else if ($scaled_load < 0.0)\n $color = $conf['load_colors'][\"down\"];\n else {\n $color = $conf['load_colors'][\"0-25\"];\n }\n\n return $color;\n}", "title": "" }, { "docid": "8da9e6856283e8be6f8820479066bda5", "score": "0.55393", "text": "public function __construct() {\r\n $args = func_get_args();\r\n $c = count($args);\r\n if ($c === 3) {\r\n $this->r = intval($args[0]);\r\n $this->g = intval($args[1]);\r\n $this->b = intval($args[2]);\r\n } elseif ($c === 1) {\r\n if (is_string($args[0]) && strlen($args[0]) === 7 && $args[0][0] === '#') { // Hex Value in String\r\n $this->r = intval(substr($args[0], 1, 2), 16);\r\n $this->g = intval(substr($args[0], 3, 2), 16);\r\n $this->b = intval(substr($args[0], 5, 2), 16);\r\n } else {\r\n if (is_string($args[0])) {\r\n $args[0] = self::getColor($args[0]);\r\n }\r\n\r\n $args[0] = intval($args[0]);\r\n $this->r = ($args[0] & 0xff0000) >> 16;\r\n $this->g = ($args[0] & 0x00ff00) >> 8;\r\n $this->b = ($args[0] & 0x0000ff);\r\n }\r\n } else {\r\n $this->r = $this->g = $this->b = 0;\r\n }\r\n }", "title": "" }, { "docid": "95a9bc8a029a3db5d70759ea463bf04b", "score": "0.55332804", "text": "public function colorPack($red, $green, $blue) {\n\t}", "title": "" }, { "docid": "3d31915ec0d3d3063c48eecd54f7147d", "score": "0.553032", "text": "private function color($value){ \n $rgb = $this->hex2rgb($value); \n return ImageColorAllocate($this->image, $rgb['r'], $rgb['g'], $rgb['b']); \n }", "title": "" }, { "docid": "dcb64cf014d0cc7e8879516d17b0106a", "score": "0.55213207", "text": "function partialDesatRGB( $Trgb)\n{\n\t\n\treturn tabCreateFromPng(\"../images/avous.png\");;\n}", "title": "" }, { "docid": "034663f5d983e01e176a3c9e3ce33593", "score": "0.5510892", "text": "function getwrcolor($input){\t\t\n\t$n = (float)substr($input, 0, strlen($input)-1);\n\tif ($n < 46.0) { return 0; }\n\tif ($n >= 46.0 and $n < 46.5) { return 1; }\n\tif ($n >= 46.5 and $n < 47.5) { return 2; }\n\tif ($n >= 48.5 and $n < 49.5) { return 3; }\n\tif ($n >= 49.5 and $n < 51.5) { return 4; }\n\tif ($n >= 51.5 and $n < 53.5) { return 5; }\n\tif ($n >= 53.5 and $n < 55.5) { return 6; }\n\tif ($n >= 55.5 and $n < 59.5) { return 7; }\n\tif ($n >= 59.5 and $n < 64.5) { return 8; }\n\tif ($n >= 64.5 and $n < 70.5) { return 9; }\n\tif ($n >= 70.5) { return 10; }\n\treturn 0;\n}", "title": "" }, { "docid": "84d251074fc083586f1e85f70d377eb8", "score": "0.5509212", "text": "public function getColorCode();", "title": "" }, { "docid": "a4ea7b1ff5745ac4b917434de4248d4a", "score": "0.54985744", "text": "function toColor($n)\n{\n\treturn(\"#\".substr(\"000000\".dechex($n),-6));\n}", "title": "" }, { "docid": "b1e91dcd180c63ad74bd8211e488f009", "score": "0.54771286", "text": "function wc_rgb_from_hex($color)\n {\n }", "title": "" }, { "docid": "38f2e8c7ae7f086a1271faf211fd024b", "score": "0.54709667", "text": "protected function convertToTrueColor()\n {\n }", "title": "" }, { "docid": "0f38ad8b399b956865b15128f0ea46b6", "score": "0.5461322", "text": "public function getImageMatteColor () {}", "title": "" }, { "docid": "d9ca3ae9f29197664173fb3661ebb0e2", "score": "0.5455924", "text": "function pickcolor($img, $data_array, $row, $col)\r\n{\r\n $d = $data_array[$row][$col+1]; // col+1 skips over the row's label\r\n if ($d >= $_GET[\"r2\"]) return 0;\r\n if ($d >= $_GET[\"r1\"]) return 1;\r\n return 2;\r\n}", "title": "" }, { "docid": "6abbf1b50bc4b31c139b9220f730c1a5", "score": "0.54542357", "text": "public function getColorQuantum() { }", "title": "" }, { "docid": "9cc06378cce4baa37565d3cb0cbd49a9", "score": "0.5449435", "text": "public function getImageColormapColor ($index) {}", "title": "" }, { "docid": "104ca1f59606c734d3a2e3d81726290f", "score": "0.54450494", "text": "function make_colors(){\n for ($i=0;$this->query->get_row();$i++)\n { \n if ($this->tipo!='comuni') $cod_reg=$this->query->row['COD_REG']+0; \n else $cod_reg=$this->query->row['COD_REG'];\n $result[$cod_reg]=$this->query->row['VALUE'];\n }\n $totval=0;\n $max=0;\n if ($this->query->numrows>0){\n\t foreach ($result as $key => $val) {\n\t $totval+=$val; \n\t if ($max<$val) $max=$val;\n\t }\n\t $rapp=150/$max; \n\t foreach ($result as $key => $val) {\n\t $valore=$rapp*$val;\n\t $valore=round($valore); \n\t $valore=255-$valore;\n\t $this->colors[$key]=\"$valore $valore 255\"; \n\t } \n\t } \n $this->totval=$totval; \n }", "title": "" }, { "docid": "0e6a76d6ca0d09390a5195cb21b0dfd3", "score": "0.5439328", "text": "public function getColorRBG($color){ }", "title": "" }, { "docid": "823e3a04734effa0f5da8d6a37572349", "score": "0.5418378", "text": "function color_rand()\n\t{\n\t\treturn sprintf('#%06x', mt_rand(0, 0xffffff));\n\t}", "title": "" }, { "docid": "c54e522aafbb2e6cc5bede4eb2951648", "score": "0.5413539", "text": "function imagecolorstotal($image)\n{\n return 0;\n}", "title": "" }, { "docid": "3a866f17167d63c43cf27820e5d0696f", "score": "0.54023015", "text": "function imagecolorstotal($image)\n{\n\treturn 0;\n}", "title": "" }, { "docid": "aa0934e79a90a96cad23bc1e77bcd586", "score": "0.5398881", "text": "public function colorMatrix() {}", "title": "" }, { "docid": "c79f401e573db761cf5c381b08d43ecb", "score": "0.53355664", "text": "public function getColorspace () {}", "title": "" }, { "docid": "2dc8c002058f2bfaa1fddd716a8d90e5", "score": "0.53245264", "text": "protected function generate_color()\n\t{\n\t\t$check_color = array(\n\t\t\tself::VERY_SINK =>\tarray(200, '<'),\n\t\t\tself::SINK =>\t\tarray(400, '<'),\n\t\t\tself::CLEAR =>\t\tarray(500, '>'),\n\t\t\tself::VERY_CLEAR =>\tarray(650, '>'),\n\t\t);\n\n\t\t$ok = false;\n\t\tdo\n\t\t{\n\t\t\t$red =\t\trand(0, 255);\n\t\t\t$green =\trand(0, 255);\n\t\t\t$blue =\t\trand(0, 255);\n\t\t\t$color =\t$red + $green + $blue;\n\n\t\t\t// On verifie si le ton de couleur corespond a l'arriere plan\n\t\t\tif (($check_color[$this->color_level][1] == '<' && $color < $check_color[$this->color_level][0]) \n\t\t\t\t|| ($check_color[$this->color_level][1] == '>' && $color > $check_color[$this->color_level][0]))\n\t\t\t{\n\t\t\t\t$ok = true;\n\t\t\t}\n\t\t}\n\t\twhile (!$ok);\n\n\t\treturn (array($red, $green, $blue));\n\t}", "title": "" }, { "docid": "f91719427fc920ed18d6ae28f8617ffe", "score": "0.53241956", "text": "public function __construct()\r\n {\r\n $this->foreground_colors['green'] = '0;32';\r\n $this->foreground_colors['light_green'] = '1;32';\r\n $this->foreground_colors['red'] = '0;31';\r\n $this->foreground_colors['light_red'] = '1;31';\r\n }", "title": "" }, { "docid": "535d1b1c788c0a5bbd6955a952aa241f", "score": "0.5316571", "text": "public function toRGB()\n {\n $hue = $this->hue / 360;\n $saturation = $this->saturation / 100;\n $value = $this->value / 100;\n if ($saturation == 0) {\n $red = $value * 255;\n $green = $value * 255;\n $blue = $value * 255;\n } else {\n $var_h = $hue * 6;\n $var_i = floor($var_h);\n $var_1 = $value * (1 - $saturation);\n $var_2 = $value * (1 - $saturation * ($var_h - $var_i));\n $var_3 = $value * (1 - $saturation * (1 - ($var_h - $var_i)));\n\n if ($var_i == 0) {\n $var_r = $value;\n $var_g = $var_3;\n $var_b = $var_1;\n } elseif ($var_i == 1) {\n $var_r = $var_2;\n $var_g = $value;\n $var_b = $var_1;\n } elseif ($var_i == 2) {\n $var_r = $var_1;\n $var_g = $value;\n $var_b = $var_3;\n } elseif ($var_i == 3) {\n $var_r = $var_1;\n $var_g = $var_2;\n $var_b = $value;\n } else {\n if ($var_i == 4) {\n $var_r = $var_3;\n $var_g = $var_1;\n $var_b = $value;\n } else {\n $var_r = $value;\n $var_g = $var_1;\n $var_b = $var_2;\n }\n }\n\n $red = round($var_r * 255);\n $green = round($var_g * 255);\n $blue = round($var_b * 255);\n }\n return new RGB($red, $green, $blue);\n }", "title": "" }, { "docid": "4fb975c054e9a9d1913b06d2267c4e70", "score": "0.5289505", "text": "function wc_hex_is_light($color)\n {\n }", "title": "" }, { "docid": "d25052ac0dbfe776e50fa7edd73a4627", "score": "0.5284984", "text": "function getwncolor($input){\t\t\n\t$n = (int)$input;\n\tif ($n < 300) { return 0; }\n\telse if (($n >= 300) and ($n < 450)) { return 1; }\n\telse if (($n >= 450) and ($n < 650)) { return 2; }\n\telse if (($n >= 650) and ($n < 900)) { return 3; }\n\telse if (($n >= 900) and ($n < 1200)) { return 4; }\n\telse if (($n >= 1200) and ($n < 1600)) { return 5; }\n\telse if (($n >= 1600) and ($n < 2000)) { return 6; }\n\telse if (($n >= 2000) and ($n < 2450)) { return 7; }\n\telse if (($n >= 2450) and ($n < 2900)) { return 8; }\n\telse if (($n >= 2900) and ($n < 3800)) { return 9; }\n\telse if ($n >= 3800) { return 10; }\n\telse return 0;\n}", "title": "" }, { "docid": "969b367343e74367005be476179c9579", "score": "0.528237", "text": "function imagecolorresolve($image,$red,$green,$blue)\n{\n\treturn 0;\n}", "title": "" }, { "docid": "19bd4d0fa3edeb1d2d94bba761f032a8", "score": "0.52712715", "text": "function Set2DrawColor() {\n\t\t//Set color for all stroking operations\n\t\tswitch(func_num_args()) {\n\t\t\tcase 1:\n\t\t\t\t$g = func_get_arg(0);\n\t\t\t\t$this->DrawColor = sprintf('%.3F G', $g / 100);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t$r = func_get_arg(0);\n\t\t\t\t$g = func_get_arg(1);\n\t\t\t\t$b = func_get_arg(2);\n\t\t\t\t$this->DrawColor = sprintf('%.3F %.3F %.3F RG', $r / 255, $g / 255, $b / 255);\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\t$c = func_get_arg(0);\n\t\t\t\t$m = func_get_arg(1);\n\t\t\t\t$y = func_get_arg(2);\n\t\t\t\t$k = func_get_arg(3);\n\t\t\t\t$this->DrawColor = sprintf('%.3F %.3F %.3F %.3F K', $c / 100, $m / 100, $y / 100, $k / 100);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->DrawColor = '0 G';\n\t\t}\n\t\tif($this->page > 0)\n\t\t\t$this->_out($this->DrawColor);\n\t}", "title": "" }, { "docid": "f2dd3599764293fd6ef46d5d02157056", "score": "0.52638733", "text": "public function getColorCount () {}", "title": "" }, { "docid": "0e94984fe34bd1245754b0614a486d3a", "score": "0.5254397", "text": "private function getColor( $_color, $_step )\r\n {\r\n\t\treturn imagecolorallocate($this->image, $_color[0]+$_step, $_color[1]+$_step, $_color[2]+$_step);\r\n\t}", "title": "" }, { "docid": "c432aeeb8f67e1ffc808ef2e04242946", "score": "0.5253349", "text": "function random_color()\n {\n return sprintf('#%06X', mt_rand(0, 0xFFFFFF));\n }", "title": "" }, { "docid": "c0221274441e2cb8782b2639f07b719e", "score": "0.52483624", "text": "public function colorUnpack($color) {\n\t}", "title": "" }, { "docid": "8ca58da13f506a8b23d697d6857b3e18", "score": "0.5233762", "text": "function get_color($temp,$saturation,$brightness)\n{\n\n\t// Calculate the color Hue\n\t// based on ocean temp\n\t// \n\t// Range = 32 (low) -> 78 (high)\n\t// 46 color values\n\t// 78 should be 1 (red)\n\t// 32 should be 270 (blue)\n\t\n\t$temp_mod = 49 - ($temp - 32);\n\t$hue = round((270 * $temp_mod)/49);\n\tif ($hue <= 0) $hue = 1;\n\t//$saturation = .75;\n\t// Set brightness to 100%\n\t//$brightness = .75;\n\t\n\t// echo \"Hue:\" . $hue . \"<br>\";\n\t\n\t// Calculate the HEX color\n\t$hex = hsv2hex ($hue, $saturation, $brightness);\n\n\treturn $hex;\n\n}", "title": "" }, { "docid": "19ce8654bb359f0f9723d413a8d95581", "score": "0.52325726", "text": "public function getImageGreenPrimary () {}", "title": "" }, { "docid": "0dc03424b84406d4fb593e203d1fae7c", "score": "0.5232516", "text": "function nombreDelColor($r, $g, $b) {\n return 'gris';\n }", "title": "" }, { "docid": "83df5294563b0bdd17ca7fcbbdfa2a22", "score": "0.522645", "text": "private function allocateColors()\n {\n\n $this->ink['red'] = imagecolorallocate($this->im, 0xff, 0x00, 0x00);\n $this->ink['orange'] = imagecolorallocate($this->im, 0xd2, 0x8a, 0x00);\n $this->ink['yellow'] = imagecolorallocate($this->im, 0xff, 0xff, 0x00);\n $this->ink['green'] = imagecolorallocate($this->im, 0x00, 0xff, 0x00);\n $this->ink['blue'] = imagecolorallocate($this->im, 0x00, 0x00, 0xff);\n\n $this->ink['purple'] = imagecolorallocate($this->im, 0x70, 0x70, 0xf9);\n $this->ink['white'] = imagecolorallocate($this->im, 0xff, 0xff, 0xff);\n $this->ink['black'] = imagecolorallocate($this->im, 0x00, 0x00, 0x00);\n $this->ink['gray'] = imagecolorallocate($this->im, 0xaf, 0xaf, 0xaf);\n\n $this->ink['axis'] = imagecolorallocate($this->im, 95, 95, 95);\n\n $this->ink['line'] = imagecolorallocate($this->im, 0xff, 0xff, 0x00);\n $this->ink['background'] = imagecolorallocate($this->im, 0x00, 0x00,\n 0x00);\n $this->ink['text'] = imagecolorallocate($this->im, 0xff, 0xff, 0xff);\n $this->ink['point'] = imagecolorallocate($this->im, 0xff, 0xff, 0xff);\n }", "title": "" }, { "docid": "1c5c3022f48ec20e49a2759fd70ecfd8", "score": "0.52206737", "text": "function biurnal_rgb_to_hsb($color) {\n list($n_red, $n_green, $n_blue) = $color;\n $n_min = min($n_red, $n_green, $n_blue);\n $n_max = max($n_red, $n_green, $n_blue);\n\n if ($n_min == $n_max) {\n // Grayscale\n $n_hue = 0.0;\n $n_saturation = 0.0;\n $n_brightness = $n_max;\n }\n else {\n if ($n_red == $n_min) {\n $d = $n_green - $n_blue;\n $h = 3.0;\n }\n elseif ($n_green == $n_min) {\n $d = $n_blue - $n_red;\n $h = 5.0;\n }\n else {\n $d = $n_red - $n_green;\n $h = 1.0;\n }\n\n $n_hue = ($h - ($d / ($n_max - $n_min))) / 6.0;\n $n_saturation = ($n_max - $n_min) / $n_max;\n $n_brightness = $n_max / 255.0;\n }\n\n return array($n_hue, $n_saturation, $n_brightness);\n}", "title": "" }, { "docid": "817a318356be7fa36a590300ede21b2c", "score": "0.521726", "text": "function getWLColor($a)\n {\n \t if($a==\"1\")\n \t \t return \"#99FF99\";\n \t else\n \t \t return \"#FF9999\";\n }", "title": "" }, { "docid": "573f683408538857f7458a3cb3963c73", "score": "0.52160335", "text": "function convert_color($hex) {\n\tif(strlen($hex) == 6) {\n\t\t//Grab the red values (first two chars)\n\t\t$r\t\t\t= substr($hex, 0, 2);\n\t\t//Grab the green values (second two chars)\n\t\t$g\t\t\t= substr($hex, 2, 2);\n\t\t//Grab the blue values (last two chars)\n\t\t$b\t\t\t= substr($hex, -2);\n\t\t\n\t\t// echo $r . '<br />' . $g . '<br />' . $b;\n\t\t\n\t\t$rgb_array \t= array(\t'r' => hexdec($r),\n\t\t\t\t\t\t\t\t'g' => hexdec($g),\n\t\t\t\t\t\t\t\t'b' => hexdec($b)\n\t\t\t\t\t\t\t);\n\t\t\n\t\treturn $rgb_array;\n\t}\n\telseif(strlen($hex) == 3) {\n\t\t\n\t\t//Grab the red values (first two chars)\n\t\t$r\t\t\t= substr($hex, 0, 1) . substr($hex, 0, 1);\n\t\t//Grab the green values (second two chars)\n\t\t$g\t\t\t= substr($hex, 1, 1) . substr($hex, 1, 1);\n\t\t//Grab the blue values (last two chars)\n\t\t$b\t\t\t= substr($hex, -1) . substr($hex, -1);\n\t\t\n\t\t$rgb_array \t= array(\t'r' => hexdec($r),\n\t\t\t\t\t\t\t\t'g' => hexdec($g),\n\t\t\t\t\t\t\t\t'b' => hexdec($b)\n\t\t\t\t\t\t\t);\n\t\t\n\t\treturn $rgb_array;\n\t\t\n\t}\n\telse {\n\t\treturn false;\n\t}\n\t\n}", "title": "" }, { "docid": "80358c4a6dbb4e1f2a82987a9ad48cec", "score": "0.52131796", "text": "function iv_vc_adjustColor($hex, $steps) {\r\n // Steps should be between -255 and 255. Negative = darker, positive = lighter\r\n $steps = max(-255, min(255, $steps));\r\n\r\n // Format the hex color string\r\n $hex = str_replace('#', '', $hex);\r\n if (strlen($hex) == 3) {\r\n $hex = str_repeat(substr($hex,0,1), 2).str_repeat(substr($hex,1,1), 2).str_repeat(substr($hex,2,1), 2);\r\n }\r\n\r\n // Get decimal values\r\n $r = hexdec(substr($hex,0,2));\r\n $g = hexdec(substr($hex,2,2));\r\n $b = hexdec(substr($hex,4,2));\r\n\r\n // Adjust number of steps and keep it inside 0 to 255\r\n $r = max(0,min(255,$r + $steps));\r\n $g = max(0,min(255,$g + $steps)); \r\n $b = max(0,min(255,$b + $steps));\r\n\r\n $r_hex = str_pad(dechex($r), 2, '0', STR_PAD_LEFT);\r\n $g_hex = str_pad(dechex($g), 2, '0', STR_PAD_LEFT);\r\n $b_hex = str_pad(dechex($b), 2, '0', STR_PAD_LEFT);\r\n\r\n return '#'.$r_hex.$g_hex.$b_hex;\r\n}", "title": "" }, { "docid": "ace28774e6381ac0767f8ba60b2f4ead", "score": "0.52117264", "text": "public function getImageColorspace () {}", "title": "" }, { "docid": "9ab9b248ab9a2ce422c710a724b508d8", "score": "0.52098614", "text": "function imagecolorresolve($image, $red, $green, $blue)\n{\n return 0;\n}", "title": "" }, { "docid": "93ad558ed7b606e9033b1ed01f4016d4", "score": "0.5206063", "text": "function initImageData(&$binData, $totalItems, $rows, $columns)\n{\n\t$binData = pack('C16',\n\t\t\t\t\t\t(2051 >> 24) & 0xFF,\n\t\t\t\t\t\t(2051 >> 16) & 0xFF,\n\t\t\t\t\t\t(2051 >> 8) & 0xFF,\n\t\t\t\t\t\t(2051 >> 0) & 0xFF,\n\t\t\t\t\t\t($totalItems >> 24) & 0xFF,\n\t\t\t\t\t\t($totalItems >> 16) & 0xFF,\n\t\t\t\t\t\t($totalItems >> 8) & 0xFF,\n\t\t\t\t\t\t($totalItems >> 0) & 0xFF,\n\t\t\t\t\t\t($rows >> 24) & 0xFF,\n\t\t\t\t\t\t($rows >> 16) & 0xFF,\n\t\t\t\t\t\t($rows >> 8) & 0xFF,\n\t\t\t\t\t\t($rows >> 0) & 0xFF,\n\t\t\t\t\t\t($columns >> 24) & 0xFF,\n\t\t\t\t\t\t($columns >> 16) & 0xFF,\n\t\t\t\t\t\t($columns >> 8) & 0xFF,\n\t\t\t\t\t\t($columns >> 0) & 0xFF\n\t\t\t\t\t );\n}", "title": "" }, { "docid": "666bdde569ad4107ebc1e17d811f1c85", "score": "0.5201686", "text": "function writeBits($value) {\n\t\t$this->r = ($this->r & 0xFE) + ($value >> 2 & 1);\n\t\t$this->g = ($this->g & 0xFE) + ($value >> 1 & 1);\n\t\t$this->b = ($this->b & 0xFE) + ($value >> 0 & 1);\n\t\t/* // debug colors\n\t\t$this->r = 0;\n\t\t$this->g = $value << 5;\n\t\t$this->b = 0;\n\t\t$this->a = 1;\n\t\t/**/\n\t}", "title": "" }, { "docid": "ccfbb6a52ca07eaf174288f461d1e5d7", "score": "0.51949775", "text": "public function getColor()\r\n {\r\n }", "title": "" }, { "docid": "72114626bb5f69dc959bee0c04cb4c4d", "score": "0.51907223", "text": "function luminosity() {\n\t\treturn ($this->r*0.6+$this->g+$this->b*0.3)/1.9;\n\t}", "title": "" }, { "docid": "f055c9435f9bdfb25070bc0a78f356c9", "score": "0.51850075", "text": "function get_color () {\n return (array) get_option($this->prefix . $this->_color , array());\n }", "title": "" }, { "docid": "0f42e71db1cf65538c7c8c8cf3076489", "score": "0.517621", "text": "function colorByHash($hash, $lumCap=0.82){\n\n\n $f = 255; //luminance scale factor\n\n mt_srand(crc32($hash));\n\n $r = mt_rand(0,255)/255;\n $g = mt_rand(0,255)/255;\n $b = mt_rand(0,255)/255;\n\n $luminance = 0.2126*$r + 0.7152*$g + 0.0722*$b;\n\n //reducing by same percentage of lumCap (darker colors)\n if($luminance>$lumCap)\n $f=$lumCap*255;\n\n $r*=$f;\n $g*=$f;\n $b*=$f;\n\n return sprintf('#%02X%02X%02X', $r,$g,$b);\n}", "title": "" }, { "docid": "b4c0bd772cfce399cc0fe2bf4142b336", "score": "0.51754457", "text": "public function getRedByte ()\n {\n return $this->red;\n }", "title": "" }, { "docid": "9dd52e1157ec38b223207d23cd65a602", "score": "0.5174568", "text": "function imageistruecolor($image)\n{\n}", "title": "" }, { "docid": "2d3e99297efda7043886968c331320a2", "score": "0.51731265", "text": "function export_color($color)\n{\n\tswitch (count($color))\n\t{\n\t\tcase 4:\n\t\tif ($color[3] < 1)\n\t\t\treturn 'rgba(' .\n\t\t\t\t(int)($color[0] * 255) . ',' .\n\t\t\t\t(int)($color[1] * 255) . ',' .\n\t\t\t\t(int)($color[2] * 255) . ',' .\n\t\t\t\t(int)($color[3] * 255) . ')';\n\n\t\tcase 3:\n\t\treturn sprintf('#%02x%02x%02x',\n\t\t\t(int)($color[0] * 255),\n\t\t\t(int)($color[1] * 255),\n\t\t\t(int)($color[2] * 255));\n\t}\n}", "title": "" }, { "docid": "45211529ca66fee8b5797de62d750a8b", "score": "0.5170617", "text": "public function __construct($color = null) {\n if(substr($color, 0, 1) == '#') {\n $this->rH = substr($color, 1, 2);\n $this->gH = substr($color, 3, 2);\n $this->bH = substr($color, 5, 2);\n $this->rD = hexdec($this->rH);\n $this->gD = hexdec($this->gH);\n $this->bD = hexdec($this->bH);\n }\n }", "title": "" }, { "docid": "734b120ae4bd8011b8eac0e129eb3420", "score": "0.5168526", "text": "function random_color_part() {\n return str_pad( dechex( mt_rand( 0, 255 ) ), 2, '0', STR_PAD_LEFT);\n}", "title": "" }, { "docid": "d0865ef3418516550ae73cbfba741e07", "score": "0.5163089", "text": "public function random_color_part() {\n return str_pad( dechex( mt_rand( 0, 255 ) ), 2,'0', STR_PAD_LEFT);\n }", "title": "" }, { "docid": "05acb5b88b220c776cb98b80a548863f", "score": "0.5159955", "text": "function light($num){\n\tif(is_array($num)){\n\t\treturn array(light($num[0]), light($num[1]), light($num[2]));\n\t}else{\n\t\t$diff = 255 - $num;\n\t\t$inc = round($diff*.85);\n\t\treturn $num+$inc;\n\t}\n}", "title": "" }, { "docid": "73f72bb8bebd30376de1bc1d2a0be40f", "score": "0.5156385", "text": "function rand_colorCode() {\n $r = mt_rand(0,180); // generate the red component\n $g = mt_rand(0,180); // generate the green component\n $b = mt_rand(0,180); // generate the blue component\n $rgb = $r.','.$g.','.$b;\n return $rgb;\n}", "title": "" }, { "docid": "4709414ef9847daf0d155f450565b5eb", "score": "0.515355", "text": "public function toCIELab(){\n return $this->toRGB()->toCIELab();\n }", "title": "" }, { "docid": "ca4ee02be6af82846708ca69bd9fe4ae", "score": "0.51427144", "text": "function random_color() {\r\n return sprintf('#%06X', mt_rand(0, 0xFFFFFF));\r\n}", "title": "" }, { "docid": "6bbcf4361f3db2f9683a8a7fbcd1f3db", "score": "0.5136576", "text": "public function getColorRange();", "title": "" }, { "docid": "cabcdea06e173e8fd49517c25b1429da", "score": "0.5130398", "text": "public function getDisplayColorMin();", "title": "" }, { "docid": "08581482f724fcc98b5c607ad43b10c1", "score": "0.5129788", "text": "function woobizz_lightbox_hextorgb($hex){\r\n\t$hex = str_replace(\"#\", \"\", $hex);\r\nif(strlen($hex) == 3){\r\n\t$r = hexdec(substr($hex,0,1).substr($hex,0,1));\r\n\t$g = hexdec(substr($hex,1,1).substr($hex,1,1));\r\n\t$b = hexdec(substr($hex,2,1).substr($hex,2,1));\r\n}else{\r\n\t$r = hexdec(substr($hex,0,2));\r\n\t$g = hexdec(substr($hex,2,2));\r\n\t$b = hexdec(substr($hex,4,2));\r\n}\r\n$rgb = array($r, $g, $b);\r\nreturn implode(\",\", $rgb); \r\n}", "title": "" }, { "docid": "0f887de0d20b380af6bbc435f9148838", "score": "0.5126262", "text": "function setColor($color)\n\t{\n\t\t$rgb = hexdec($color);\n\t\t$this->fgColor['r'] = ($rgb & 0xFF0000) >> 16;\n\t\t$this->fgColor['g'] = ($rgb & 0xFF00) >> 8;\n\t\t$this->fgColor['b'] = ($rgb & 0xFF);\n\t}", "title": "" }, { "docid": "d80e929d49225d6dac3a1a66744cfe0a", "score": "0.5124318", "text": "function cmap()\n\t\t{\n\t\t\t$f = 0xffff;\n\t\t\t$cmap = array(\n\t\t\t\t0x0080, 0xffff, 0, $f);\n\t\t\treturn $cmap;\n\t\t}", "title": "" }, { "docid": "837f32fefdb92909d91c804faa0e7939", "score": "0.511856", "text": "function get_color()\n\t{\n\t\t$vert = new vertex(\n\t\t\tfloor(127*round($this->x,FLOAT_PRECISION))+128,\n\t\t\tfloor(127*round($this->y,FLOAT_PRECISION))+128,\n\t\t\tfloor(127*round($this->z,FLOAT_PRECISION))+128\n\t\t);\n\t\tif($vert->x > 255) $vert->x = 255;\n\t\tif($vert->y > 255) $vert->y = 255;\n\t\tif($vert->z > 255) $vert->z = 255;\n\t\t\n\t\tif($vert->x < 0) $vert->x = 0;\n\t\tif($vert->y < 0) $vert->y = 0;\n\t\tif($vert->z < 0) $vert->z = 0;\n\t\t\n\t\treturn $vert;\n\t}", "title": "" }, { "docid": "9b8b357cdeeb379e48cb773be9d7fc46", "score": "0.5104169", "text": "private function getDefaultColors() {\n $sum=0;\n foreach($this->col as $col){\n $sum += $col;\n }\n for($i=0; $i<$this->row*$sum; $i++){\n array_push($this->colors,'secondary');\n }\n }", "title": "" }, { "docid": "3f70fc2fbee0ef3987dcd2f625b118a0", "score": "0.5093718", "text": "static function color() {\n }", "title": "" }, { "docid": "8df0a00b9ab8a134333e4958b1fe4516", "score": "0.509253", "text": "function imagecolorclosesthwb($image,$red,$green,$blue)\n{\n\treturn 0;\n}", "title": "" }, { "docid": "24d3c834ec7fe25fcf4bf81a336d8081", "score": "0.5086931", "text": "public function light($rgb, $light = 0) {\n $light = round($light/100,2);\n if(is_array($rgb)) {\n $r = $rgb[0] - (round($rgb[\"0\"])*$light);\n $g = $rgb[1] - (round($rgb[\"1\"])*$light);\n $b = $rgb[2] - (round($rgb[\"2\"])*$light);\n\n return array(\"r\"=> round(max(0,min(255,$r))),\n \"g\"=> round(max(0,min(255,$g))),\n \"b\"=> round(max(0,min(255,$b))));\n }\n else if(preg_match(\"/#/\",$color_code)) {\n $hex = str_replace(\"#\",\"\",$color_code);\n $r = (strlen($hex) == 3)? hexdec(substr($hex,0,1).substr($hex,0,1)):hexdec(substr($hex,0,2));\n $g = (strlen($hex) == 3)? hexdec(substr($hex,1,1).substr($hex,1,1)):hexdec(substr($hex,2,2));\n $b = (strlen($hex) == 3)? hexdec(substr($hex,2,1).substr($hex,2,1)):hexdec(substr($hex,4,2));\n $r = round($r - ($r*$light));\n $g = round($g - ($g*$light));\n $b = round($b - ($b*$light));\n\n return \"#\".str_pad(dechex( max(0,min(255,$r)) ),2,\"0\",STR_PAD_LEFT)\n .str_pad(dechex( max(0,min(255,$g)) ),2,\"0\",STR_PAD_LEFT)\n .str_pad(dechex( max(0,min(255,$b)) ),2,\"0\",STR_PAD_LEFT);\n }\n }", "title": "" }, { "docid": "8e8905719efced09b94847bd8eef2af5", "score": "0.50817436", "text": "function imagecolorsforindex($image,$color)\n{\n\treturn array();\n}", "title": "" }, { "docid": "2158eae11709999f60035c0417496e38", "score": "0.5074623", "text": "function printer_create_brush($style, $color)\n{\n}", "title": "" }, { "docid": "443782e972b81d7cde2e108b020e63d2", "score": "0.5066622", "text": "public static function color($args) {\r\n echo \"<div class='relative'>\";\r\n echo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='\".$args['name'].\"' class=\\\"picker field\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . self::placeholder('None') . \"' name='\" . $args['name'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n echo \"<div id='\" . $args['name'] . \"_picker' class='picker' style=''></div>\";\r\n echo self::description($args['description']); // print a description if there is one\r\n echo \"</div>\";\r\n }", "title": "" }, { "docid": "7c29e94226c6ab09c9703c68d2e16884", "score": "0.50602365", "text": "public function colorList() {}", "title": "" }, { "docid": "45019f5b46e7610c9a3648ea336059c1", "score": "0.5052861", "text": "function get_powerbar_color($power, $img){\r\n\tif($power >= 60 && $power < 80){\r\n\t\t$c = imagecolorallocate($img, 0, 0, 249);\r\n\t}\r\n\telseif($power >= 40 && $power < 60){\r\n\t\t$c = imagecolorallocate($img, 255, 255, 0);\r\n\t}\r\n\telseif($power >= 20 && $power < 40){\r\n\t\t$c = imagecolorallocate($img, 255, 164, 0);\r\n\t}\r\n\telseif($power >= 0 && $power < 20){\r\n\t\t$c = imagecolorallocate($img, 252, 3, 0);\r\n\t}\r\n\telse{\r\n\t\t$c = imagecolorallocate($img, 1, 128, 1);\r\n\t}\r\n\t\r\n\treturn $c;\r\n}", "title": "" }, { "docid": "236cc56d9806f3100554e2118a4f9870", "score": "0.5050253", "text": "function Scaffold_hsla($h,$s,$l,$a)\r\n{\r\n\t$h = intval($h)/360;\r\n\t$s = intval($s)/100;\r\n\t$l = intval($l)/100;\r\n\r\n\t$rgb = array();\r\n\tif ($s == 0) {\r\n\t $r = $g = $b = $l * 255;\r\n\t} else {\r\n\t\t$var_h = $h * 6;\r\n\t\t$var_i = floor( $var_h );\r\n\t\t$var_1 = $l * ( 1 - $s );\r\n\t\t$var_2 = $l * ( 1 - $s * ( $var_h - $var_i ) );\r\n\t\t$var_3 = $l * ( 1 - $s * (1 - ( $var_h - $var_i ) ) );\r\n\t\tif\t\t ($var_i == 0) { $var_r = $l\t ; $var_g = $var_3\t; $var_b = $var_1 ; }\r\n\t\telse if\t ($var_i == 1) { $var_r = $var_2 ; $var_g = $l\t\t; $var_b = $var_1 ; }\r\n\t\telse if\t ($var_i == 2) { $var_r = $var_1 ; $var_g = $l\t\t; $var_b = $var_3 ; }\r\n\t\telse if\t ($var_i == 3) { $var_r = $var_1 ; $var_g = $var_2\t; $var_b = $l\t ; }\r\n\t\telse if\t ($var_i == 4) { $var_r = $var_3 ; $var_g = $var_1\t; $var_b = $l\t ; }\r\n\t\telse\t\t\t\t { $var_r = $l\t ; $var_g = $var_1\t; $var_b = $var_2 ; }\r\n\t\t$r = ceil($var_r * 255);\r\n\t\t$g = ceil($var_g * 255);\r\n\t\t$b = ceil($var_b * 255);\r\n\t}\r\n\treturn \"rgba($r,$g,$b,$a)\";\r\n}", "title": "" }, { "docid": "a21d3e04710db06b177b4d3241f02f66", "score": "0.50490236", "text": "public function getImageBluePrimary () {}", "title": "" }, { "docid": "b799d75f1055efada2d0d818338b8a23", "score": "0.50387245", "text": "function genesis_sample_color_brightness( $color, $change ) {\n\n\t$hexcolor = str_replace( '#', '', $color );\n\n\t$red = hexdec( substr( $hexcolor, 0, 2 ) );\n\t$green = hexdec( substr( $hexcolor, 2, 2 ) );\n\t$blue = hexdec( substr( $hexcolor, 4, 2 ) );\n\n\t$red = max( 0, min( 255, $red + $change ) );\n\t$green = max( 0, min( 255, $green + $change ) );\n\t$blue = max( 0, min( 255, $blue + $change ) );\n\n\treturn '#' . dechex( $red ) . dechex( $green ) . dechex( $blue );\n\n}", "title": "" }, { "docid": "caede57e07004866ce6df3a888ac48c2", "score": "0.50371873", "text": "function rand_color() {\n\treturn '#' . str_pad( dechex( mt_rand( 0, 0xFFFFFF ) ), 6, '0', STR_PAD_LEFT );\n}", "title": "" }, { "docid": "1f36c6d91c9b9b4f3a6c36091c45353d", "score": "0.5026195", "text": "public function color()\n {\n }", "title": "" }, { "docid": "1f36c6d91c9b9b4f3a6c36091c45353d", "score": "0.5026195", "text": "public function color()\n {\n }", "title": "" } ]
6c93e189a458dbc13742e6b8e1122a74
tulis kode di sini
[ { "docid": "0db34fb9a44dbf4b2c9f78860df7599a", "score": "0.0", "text": "function palindrome_angka($angka) {\r\n if ($angka >=0 && $angka<10){\r\n $angka++;\r\n return $angka;\r\n }else{\r\n do{\r\n $angka+=1;\r\n $str = (string)$angka; // konversi dari int ke String\r\n $panjang = strlen ($str);\r\n $cek= \"\";\r\n for($i=$panjang-1 ;$i>=0;$i--){\r\n $cek.=$str[$i]; \r\n }\r\n }while($cek != $angka);\r\n return $angka ;\r\n } \r\n}", "title": "" } ]
[ { "docid": "f38b23d6347768af9c8f788f44ec224d", "score": "0.6168995", "text": "function getSuratDetailDikTest($odf,$id,$type,$connection){\n\t\t\t$query= \"select * from pidsus.get_data_jaksa_saksi_dik('\".$id.\"')\";\n\t\t\t$rows = $connection->createCommand($query)->queryAll();\n\t\t\t$type = \"sks\";\n\t\t\t$i=1;\n\t\t\t$jaksaSaksi = $odf->setSegment($type);\n\t\t\tforeach($rows as $currentRow) {\n\t\t\t\t$jaksaSaksi->nourut($i.\". \");\n\t\t\t\t$jaksaSaksi->nama($currentRow['nama']);\n\t\t\t\t$jaksaSaksi->nip($currentRow['nip']);\n\t\t\t\t$jaksaSaksi->pangkat($currentRow['pangkat']);\n\t\t\t\t$jaksaSaksi->merge();\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t$odf->mergeSegment($jaksaSaksi);\n\t\t}", "title": "" }, { "docid": "4b4723512f83a3ba36b6d266199c9e2e", "score": "0.614305", "text": "public function atraksi(){\n echo $this->nama.\" sedang \".$this->keahlian.\"<br><br>\";\n }", "title": "" }, { "docid": "67119569af111a43ef65f9795e80466a", "score": "0.6118742", "text": "public function jeSpustenProduktCosi() ;", "title": "" }, { "docid": "c7b95e27d9707863e01eebeff9e44ad9", "score": "0.6099827", "text": "public function wykonaj()\r\n {}", "title": "" }, { "docid": "f5f319c21301530f30f5ce7d80dc4fcb", "score": "0.6042403", "text": "public function kora()\n {\n }", "title": "" }, { "docid": "89aebec79625884701f501e7edb5e8ba", "score": "0.6041338", "text": "public function esSabadoNoche();", "title": "" }, { "docid": "f351919728e3587f427623fd5fbb1aae", "score": "0.6020502", "text": "function getSuratDetailDikTest2($odf,$id,$type,$connection){\n\t\t\t$query= \"select * from pidsus.get_data_jaksa_saksi_dik('\".$id.\"')\";\n\t\t\t$rows = $connection->createCommand($query)->queryAll();\n\t\t\t$i=1;\n\t\t\t$detail = $odf->setSegment($type);\n\t\t\tforeach($rows as $currentRow) {\n\t\t\t\t$detail->nourut($i.\". \");\n\t\t\t\t$detail->nama($currentRow['nama']);\n\t\t\t\t$detail->merge();\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t$odf->mergeSegment($detail);\n\t\t}", "title": "" }, { "docid": "b66252bdb3016b15dac93e3f69618c69", "score": "0.5988621", "text": "function subscriptos_grupos_datos()\n\t{\n\n\t\tparent::objeto();\n\n\t\t$this->tabla=\"subscriptos_datos\";\n\t\t$this->campoClave=array(\"IdSubscripto\",\"IdGrupo\");\n\t\t$this->id=null;\n\t\t\n\t\t\n$v=new Variable(2,$this->tabla,\"IdSubscripto\",1);\n$v->clave=true;\n$this->agregarVariable2($v);\n$v=new Variable(2,$this->tabla,\"IdGrupo\",1);\n$v->clave=true;\n$this->agregarVariable2($v);\n\n\t}", "title": "" }, { "docid": "27d230e0b69bbcc52903be25f9a9ca5e", "score": "0.59284335", "text": "public function fraiche () {\r\n\t}", "title": "" }, { "docid": "b3a1fe9fcd6e50913a39a4df093bc608", "score": "0.5897858", "text": "public function detalle_opin()\n\t{\n\t\t \n\n\t}", "title": "" }, { "docid": "e21793ef7eb316b59ddd78725be476a7", "score": "0.58686185", "text": "public function konstruktor(){\r\r\n\t \tif (isset($_SESSION['wuzek'])){\r\r\n\t \t\tforeach($_SESSION['wuzek'] as $id ) {\r\r\n\t \t\t\t$this->cena += $id['ilosc'] * $id['cena'];\r\r\n\t \t\t\t$this->ilosc += $id['ilosc'];\r\r\n\t\t\t\t//zwraca liste id produktow\r\r\n\t\t\t\t$this->p_id .= $id['id'];\r\r\n\t\t\t\t$this->p_id .= '::';\r\r\n\t\t\t\t//przygotowanie danych do umieszczenia w bazie zamowien\r\r\n\t\t\t\t$this->prod_id .= $id['id'].'::'.$id['ilosc'].'::'.$id['cena'].':|:';\r\r\n\t\t\t}\r\r\n\t\t\t//echo $this->p_id;\r\r\n\t \t}\r\r\n\t\t$this->user_id = $_SESSION['uid'];\r\r\n\r\r\n\t}", "title": "" }, { "docid": "65eaaf0cd0be74a3df8a01fd740dfdd1", "score": "0.58448607", "text": "function nomor_transaksi(){\n\t\t$tipe=$_POST['tipe'];\n\t\t$level=empty($_POST['level'])?\"1\":$_POST['level'];\n\t\t$nomor=$this->Admin_model->penomoran($tipe,$level);\n\t\techo $nomor;\t\n\t}", "title": "" }, { "docid": "96079aa1b15ebb874d685776822cd1fa", "score": "0.57984096", "text": "function pembentukan_tree($N_parent , $kasus){\r\n\t\t//mengisi kondisi\r\n\t\tif($N_parent!=''){\r\n\t\t\t$kondisi = $N_parent.\" AND \".$kasus;\r\n\t\t}else{\r\n\t\t\t$kondisi = $kasus;\r\n\t\t}\t\t\r\n\t\techo $kondisi.\"<br>\";\r\n\t\t//cek data heterogen / homogen???\r\n\t\t$cek = cek_heterohomogen('ipk',$kondisi);\t\t\r\n\t\tif($cek=='homogen'){\r\n\t\t\techo \"<br>LEAF \";\r\n\t\t\t$sql_keputusan = mysql_query(\"SELECT DISTINCT(ipk) FROM data_training WHERE $kondisi\");\r\n\t\t\t$row_keputusan = mysql_fetch_array($sql_keputusan);\t\r\n\t\t\t$keputusan = $row_keputusan['0'];\r\n\t\t\t//insert atau lakukan pemangkasan cabang\r\n\t\t\tpangkas($N_parent , $kasus , $keputusan);\r\n\t\t\t\r\n\t\t}//jika data masih heterogen\r\n\t\telse if($cek=='heterogen'){\r\n\t\t\t//cek jumlah data\r\n\t\t\t$jumlah = jumlah_data($kondisi);\t\t\t\t\r\n\t\t\tif($jumlah<8){\r\n\t\t\t\techo \"<br>LEAF \";\r\n\t\t\t\t$Ntinggi = $kondisi.\" AND ipk='tinggi'\";\r\n\t\t\t\t$Nrendah = $kondisi.\" AND ipk='rendah'\";\r\n\t\t\t\t$jumlahTinggi = jumlah_data(\"$Ntinggi\");\r\n\t\t\t\t$jumlahRendah = jumlah_data(\"$Nrendah\");\t\t\t\t\r\n\t\t\t\tif($jumlahTinggi <= $jumlahRendah){\r\n\t\t\t\t\t$keputusan = 'Rendah';\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$keputusan = 'Tinggi';\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t\t//insert atau lakukan pemangkasan cabang\r\n\t\t\t\tpangkas($N_parent , $kasus , $keputusan);\t\t\r\n\t\t\t}\r\n\t\t\t//lakukan perhitungan\r\n\t\t\telse{\t\t\t\r\n\t\t\t\t//jika kondisi tidak kosong kondisi_ipk=tambah and\r\n\t\t\t\t$kondisi_ipk='';\r\n\t\t\t\tif($kondisi!=''){\r\n\t\t\t\t\t$kondisi_ipk=$kondisi.\" AND \";\r\n\t\t\t\t}\r\n\t\t\t\t$jml_tinggi = jumlah_data(\"$kondisi_ipk ipk='Tinggi'\");\r\n\t\t\t\t$jml_rendah = jumlah_data(\"$kondisi_ipk ipk='Rendah'\");\r\n\t\t\t\t$jml_total = $jml_tinggi + $jml_rendah;\r\n\t\t\t\techo \"Jumlah data = \".$jml_total.\"<br>\";\r\n\t\t\t\techo \"Jumlah tinggi = \".$jml_tinggi.\"<br>\";\r\n\t\t\t\techo \"Jumlah rendah = \".$jml_rendah.\"<br>\";\r\n\t\t\t\t\r\n\t\t\t\t//hitung entropy semua\r\n\t\t\t\t$entropy_all = hitung_entropy($jml_tinggi , $jml_rendah);\r\n\t\t\t\techo \"Entropy = \".$entropy_all.\"<br>\";\r\n\t\t\t\t\r\n\t\t\t\t//cek berapa nilai setiap atribut\r\n\t\t\t\t$nilai_instansi = array();\r\n\t\t\t\t$nilai_instansi = cek_nilaiAtribut('instansi',$kondisi);\t\t\t\t\t\t\t\t\r\n\t\t\t\t$jmlInstansi = count($nilai_instansi);\t\t\t\t\t\t\t\t\r\n\t\t\t\t$nilai_status = array();\r\n\t\t\t\t$nilai_status = cek_nilaiAtribut('status',$kondisi);\t\t\t\t\t\t\t\t\r\n\t\t\t\t$jmlStatus = count($nilai_status);\r\n\t\t\t\t$nilai_jurusan = array();\r\n\t\t\t\t$nilai_jurusan = cek_nilaiAtribut('jurusan',$kondisi);\t\t\t\t\t\t\t\t\r\n\t\t\t\t$jmlJurusan = count($nilai_jurusan);\r\n\t\t\t\t$nilai_kerja = array();\r\n\t\t\t\t$nilai_kerja = cek_nilaiAtribut('kerja',$kondisi);\t\t\t\t\t\t\t\t\r\n\t\t\t\t$jmlKerja = count($nilai_kerja);\r\n\t\t\t\t$nilai_motivasi = array();\r\n\t\t\t\t$nilai_motivasi = cek_nilaiAtribut('motivasi',$kondisi);\t\t\t\t\t\t\t\t\r\n\t\t\t\t$jmlMotivasi = count($nilai_motivasi);\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t//hitung gain atribut\r\n\t\t\t\tmysql_query(\"TRUNCATE gain\");\r\n\t\t\t\t//instansi\r\n\t\t\t\tif($jmlInstansi!=1){\r\n\t\t\t\t\t$NA1Instansi=\"instansi='$nilai_instansi[0]'\";\r\n\t\t\t\t\t$NA2Instansi=\"\";\r\n\t\t\t\t\t$NA3Instansi=\"\";\r\n\t\t\t\t\tif($jmlInstansi==2){\r\n\t\t\t\t\t\t$NA2Instansi=\"instansi='$nilai_instansi[1]'\";\r\n\t\t\t\t\t}else if ($jmlInstansi==3){\r\n\t\t\t\t\t\t$NA2Instansi=\"instansi='$nilai_instansi[1]'\";\r\n\t\t\t\t\t\t$NA3Instansi=\"instansi='$nilai_instansi[2]'\";\r\n\t\t\t\t\t}\t\t\t\t\r\n\t\t\t\t\thitung_gain($kondisi , \"instansi\"\t, $entropy_all , $NA1Instansi, $NA2Instansi, $NA3Instansi, \"\" , \"\");\t\r\n\t\t\t\t}\r\n\t\t\t\t//status\r\n\t\t\t\tif($jmlStatus!=1){\r\n\t\t\t\t\t$NA1Status=\"status='$nilai_status[0]'\";\r\n\t\t\t\t\t$NA2Status=\"status='$nilai_status[1]'\";\r\n\t\t\t\t\thitung_gain($kondisi , \"status\" , $entropy_all , $NA1Status , $NA2Status , \"\" , \"\" , \"\");\r\n\t\t\t\t}\r\n\t\t\t\t//jurusan\r\n\t\t\t\tif($jmlJurusan!=1){\r\n\t\t\t\t\t$NA1Jurusan=\"jurusan='$nilai_jurusan[0]'\";\r\n\t\t\t\t\t$NA2Jurusan=\"\";\r\n\t\t\t\t\t$NA3Jurusan=\"\";\r\n\t\t\t\t\t$NA4Jurusan=\"\";\r\n\t\t\t\t\t$NA5Jurusan=\"\";\r\n\t\t\t\t\tif($jmlJurusan==2){\r\n\t\t\t\t\t\t$NA2Jurusan=\"jurusan='$nilai_jurusan[1]'\";\r\n\t\t\t\t\t}else if($jmlJurusan==3){\r\n\t\t\t\t\t\t$NA2Jurusan=\"jurusan='$nilai_jurusan[1]'\";\r\n\t\t\t\t\t\t$NA3Jurusan=\"jurusan='$nilai_jurusan[2]'\";\r\n\t\t\t\t\t}else if($jmlJurusan==4){\r\n\t\t\t\t\t\t$NA2Jurusan=\"jurusan='$nilai_jurusan[1]'\";\r\n\t\t\t\t\t\t$NA3Jurusan=\"jurusan='$nilai_jurusan[2]'\";\r\n\t\t\t\t\t\t$NA4Jurusan=\"jurusan='$nilai_jurusan[3]'\";\r\n\t\t\t\t\t}else if($jmlJurusan==5){\r\n\t\t\t\t\t\t$NA2Jurusan=\"jurusan='$nilai_jurusan[1]'\";\r\n\t\t\t\t\t\t$NA3Jurusan=\"jurusan='$nilai_jurusan[2]'\";\r\n\t\t\t\t\t\t$NA4Jurusan=\"jurusan='$nilai_jurusan[3]'\";\r\n\t\t\t\t\t\t$NA5Jurusan=\"jurusan='$nilai_jurusan[4]'\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\thitung_gain($kondisi , \"jurusan\" , $entropy_all , $NA1Jurusan , $NA2Jurusan , $NA3Jurusan , $NA4Jurusan , $NA5Jurusan);\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t\t//kerja\r\n\t\t\t\tif($jmlKerja!=1){\r\n\t\t\t\t\t$NA1Kerja=\"kerja='$nilai_kerja[0]'\";\r\n\t\t\t\t\t$NA2Kerja=\"kerja='$nilai_kerja[1]'\";\r\n\t\t\t\t\thitung_gain($kondisi , \"kerja\"\t , $entropy_all , $NA1Kerja , $NA2Kerja , \"\" , \"\" , \"\");\r\n\t\t\t\t}\r\n\t\t\t\t//motivasi\r\n\t\t\t\tif($jmlMotivasi!=1){\r\n\t\t\t\t\t$NA1Motivasi=\"motivasi='$nilai_motivasi[0]'\";\r\n\t\t\t\t\t$NA2Motivasi=\"\";\r\n\t\t\t\t\t$NA3Motivasi=\"\";\r\n\t\t\t\t\tif($jmlMotivasi==2){\r\n\t\t\t\t\t\t$NA2Motivasi=\"motivasi='$nilai_motivasi[1]'\";\r\n\t\t\t\t\t}else if ($jmlMotivasi==3){\r\n\t\t\t\t\t\t$NA2Motivasi=\"motivasi='$nilai_motivasi[1]'\";\r\n\t\t\t\t\t\t$NA3Motivasi=\"motivasi='$nilai_motivasi[2]'\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\thitung_gain($kondisi , \"motivasi\" , $entropy_all , $NA1Motivasi, $NA2Motivasi, $NA3Motivasi, \"\" , \"\");\r\n\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t//hitung gain atribut Numerik\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\thitung_gain($kondisi , \"rata UN posisi 6.5\"\t, $entropy_all , \"rata_un<=6.5\"\t, \"rata_un>6.5\" , \"\" , \"\" , \"\");\r\n\t\t\t\t\thitung_gain($kondisi , \"rata UN posisi 6.75\"\t, $entropy_all , \"rata_un<=6.75\", \"rata_un>6.75\", \"\" , \"\" , \"\");\r\n\t\t\t\t\thitung_gain($kondisi , \"rata UN posisi 7\"\t\t, $entropy_all , \"rata_un<=7\"\t, \"rata_un>7\"\t, \"\" , \"\" , \"\");\r\n\t\t\t\t\thitung_gain($kondisi , \"rata UN posisi 7.25\"\t, $entropy_all , \"rata_un<=7.25\", \"rata_un>7.25\", \"\" , \"\" , \"\");\r\n\t\t\t\t\thitung_gain($kondisi , \"rata UN posisi 7.5\" \t, $entropy_all , \"rata_un<=7.5\" , \"rata_un>7.5\" , \"\" , \"\" , \"\");\r\n\t\t\t\t\thitung_gain($kondisi , \"rata UN posisi 7.75\"\t, $entropy_all , \"rata_un<=7.75\", \"rata_un>7.75\", \"\" , \"\" , \"\");\r\n\t\t\t\t\thitung_gain($kondisi , \"rata UN posisi 8\"\t\t, $entropy_all , \"rata_un<=8\"\t, \"rata_un>8\" \t, \"\" , \"\" , \"\");\r\n\t\t\t\t\thitung_gain($kondisi , \"rata UN posisi 8.25\"\t, $entropy_all , \"rata_un<=8.25\", \"rata_un>8.25\", \"\" , \"\" , \"\");\r\n\t\t\t\t\thitung_gain($kondisi , \"rata UN posisi 8.5\"\t, $entropy_all , \"rata_un<=8.5\" , \"rata_un>8.5\" , \"\" , \"\" , \"\");\r\n\t\t\t\t\thitung_gain($kondisi , \"rata UN posisi 8.75\"\t, $entropy_all , \"rata_un<=8.75\", \"rata_un>8.75\", \"\" , \"\" , \"\");\r\n\t\t\t\t\t\r\n\t\t\t\t//ambil nilai gain tertinggi\r\n\t\t\t\t\t$sql_max = mysql_query(\"SELECT MAX(gain) FROM gain\");\r\n\t\t\t\t\t$row_max = mysql_fetch_array($sql_max);\t\r\n\t\t\t\t\t$max_gain = $row_max['0'];\r\n\t\t\t\t\t$sql = mysql_query(\"SELECT * FROM gain WHERE gain=$max_gain\");\r\n\t\t\t\t\t$row = mysql_fetch_array($sql);\t\r\n\t\t\t\t\t$atribut = $row['1'];\r\n\t\t\t\t\techo \"Atribut terpilih = \".$atribut.\", dengan nilai gain = \".$max_gain.\"<br>\";\t\t\t\t\t\r\n\t\t\t\t\techo \"<br>================================<br>\";\r\n\t\t\t\t//percabangan jika nilai atribut lebih dari 2 hitung rasio terlebih dahulu\r\n\t\t\t\t//INSTANSI TERPILIH\r\n\t\t\t\tif($atribut==\"instansi\"){\r\n\t\t\t\t\t//jika nilai atribut 3\r\n\t\t\t\t\tif($jmlInstansi==3){\r\n\t\t\t\t\t\t//hitung rasio\r\n\t\t\t\t\t\t$cabang = array();\r\n\t\t\t\t\t\t$cabang = hitung_rasio($kondisi , 'instansi',$max_gain,$nilai_instansi[0],$nilai_instansi[1],$nilai_instansi[2],'','');\r\n\t\t\t\t\t\t$exp_cabang = explode(\" , \",$cabang[1]);\t\t\t\t\t\t\r\n\t\t\t\t\t\tproses_DT($kondisi , \"($atribut='$cabang[0]')\",\"($atribut='$exp_cabang[0]' OR $atribut='$exp_cabang[1]')\");\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//jika nilai atribut 2\r\n\t\t\t\t\telse if($jmlInstansi==2){\r\n\t\t\t\t\t\tproses_DT($kondisi , \"($atribut='$nilai_instansi[0]')\" , \"($atribut='$nilai_instansi[1]')\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t\t//STATUS TERPILIH\r\n\t\t\t\telse if($atribut==\"status\"){\t\t\t\t\t\r\n\t\t\t\t\tproses_DT($kondisi , \"($atribut='Negeri')\",\"($atribut='Swasta')\");\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t//JURUSAN TERPILIH\r\n\t\t\t\telse if($atribut==\"jurusan\"){\r\n\t\t\t\t\t//jika nilai atribut 5\r\n\t\t\t\t\tif($jmlJurusan==5){\r\n\t\t\t\t\t\t//hitung rasio\r\n\t\t\t\t\t\t$cabang = array();\r\n\t\t\t\t\t\t$cabang = hitung_rasio($kondisi , 'jurusan',$max_gain,$nilai_jurusan[0],$nilai_jurusan[1],$nilai_jurusan[2],$nilai_jurusan[3],$nilai_jurusan[4]);\r\n\t\t\t\t\t\t$exp_cabang = explode(\" , \",$cabang[1]);\t\t\t\t\t\t\r\n\t\t\t\t\t\tproses_DT($kondisi,\"($atribut='$cabang[0]')\",\"($atribut='$exp_cabang[0]' OR $atribut='$exp_cabang[1]' OR $atribut='$exp_cabang[2]' OR $atribut='$exp_cabang[3]')\");\t\t\t\t\t\t\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t\t//jika nilai atribut 4\r\n\t\t\t\t\telse if($jmlJurusan==4){\r\n\t\t\t\t\t\t//hitung rasio\r\n\t\t\t\t\t\t$cabang = array();\r\n\t\t\t\t\t\t$cabang = hitung_rasio($kondisi , 'jurusan',$max_gain,$nilai_jurusan[0],$nilai_jurusan[1],$nilai_jurusan[2],$nilai_jurusan[3],'');\r\n\t\t\t\t\t\t$exp_cabang = explode(\" , \",$cabang[1]);\r\n\t\t\t\t\t\tproses_DT($kondisi,\"($atribut='$cabang[0]')\",\"($atribut='$exp_cabang[0]' OR $atribut='$exp_cabang[1]' OR $atribut='$exp_cabang[2]')\");\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t\t//jika nilai atribut 3\r\n\t\t\t\t\telse if($jmlJurusan==3){\r\n\t\t\t\t\t\t//hitung rasio\r\n\t\t\t\t\t\t$cabang = array();\r\n\t\t\t\t\t\t$cabang = hitung_rasio($kondisi , 'jurusan',$max_gain,$nilai_jurusan[0],$nilai_jurusan[1],$nilai_jurusan[2],'','');\r\n\t\t\t\t\t\t$exp_cabang = explode(\" , \",$cabang[1]);\r\n\t\t\t\t\t\tproses_DT($kondisi,\"($atribut='$cabang[0]')\",\"($atribut='$exp_cabang[0]' OR $atribut='$exp_cabang[1]')\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//jika nilai atribut 2\r\n\t\t\t\t\telse if($jmlJurusan==2){\r\n\t\t\t\t\t\tproses_DT($kondisi,\"($atribut='$nilai_jurusan[0]')\" , \"($atribut='$nilai_jurusan[1]')\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//RATA UN TERPILIH\r\n\t\t\t\telse if($atribut==\"rata UN posisi 6.5\"){\t\t\t\t\t\r\n\t\t\t\t\tproses_DT($kondisi,\"(rata_un<=6.5)\",\"(rata_un>6.5)\");\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse if($atribut==\"rata UN posisi 6.75\"){\t\t\t\t\t\r\n\t\t\t\t\tproses_DT($kondisi,\"(rata_un<=6.75)\",\"(rata_un>6.75)\");\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse if($atribut==\"rata UN posisi 7\"){\t\t\t\t\t\r\n\t\t\t\t\tproses_DT($kondisi,\"(rata_un<=7)\",\"(rata_un>7)\");\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse if($atribut==\"rata UN posisi 7.25\"){\t\t\t\t\t\r\n\t\t\t\t\tproses_DT($kondisi,\"(rata_un<=7.25)\",\"(rata_un>7.25)\");\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse if($atribut==\"rata UN posisi 7.5\"){\t\t\t\t\t\r\n\t\t\t\t\tproses_DT($kondisi,\"(rata_un<=7.5)\",\"(rata_un>7.5)\");\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse if($atribut==\"rata UN posisi 7.75\"){\t\t\t\t\t\r\n\t\t\t\t\tproses_DT($kondisi,\"(rata_un<=7.75)\",\"(rata_un>7.75)\");\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse if($atribut==\"rata UN posisi 8\"){\t\t\t\t\t\r\n\t\t\t\t\tproses_DT($kondisi,\"(rata_un<=8)\",\"(rata_un>8)\");\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse if($atribut==\"rata UN posisi 8.25\"){\t\t\t\t\t\r\n\t\t\t\t\tproses_DT($kondisi,\"(rata_un<=8.25)\",\"(rata_un>8.25)\");\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse if($atribut==\"rata UN posisi 8.5\"){\t\t\t\t\t\r\n\t\t\t\t\tproses_DT($kondisi,\"(rata_un<=8.5)\",\"(rata_un>8.5)\");\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse if($atribut==\"rata UN posisi 8.75\"){\t\t\t\t\t\r\n\t\t\t\t\tproses_DT($kondisi,\"(rata_un<=8.75)\",\"(rata_un>8.75)\");\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t//KERJA TERPILIH\r\n\t\t\t\telse if($atribut==\"kerja\"){\t\t\t\t\t\r\n\t\t\t\t\tproses_DT($kondisi,\"($atribut='Sudah')\",\"($atribut='Belum')\");\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t//MOTIVASI TERPILIH\r\n\t\t\t\telse if($atribut==\"motivasi\"){\r\n\t\t\t\t\t//jika nilai atribut 3\r\n\t\t\t\t\tif($jmlMotivasi==3){\r\n\t\t\t\t\t\t$cabang = array();\r\n\t\t\t\t\t\t$cabang = hitung_rasio($kondisi , 'motivasi',$max_gain,$nilai_motivasi[0],$nilai_motivasi[1],$nilai_motivasi[2],'','');\r\n\t\t\t\t\t\t$exp_cabang = explode(\" , \",$cabang[1]);\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tproses_DT($kondisi,\"($atribut='$cabang[0]')\",\"($atribut='$exp_cabang[0]' OR $atribut='$exp_cabang[1]')\");\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//jika nilai atribut 2\r\n\t\t\t\t\telse if($jmlMotivasi==2){\r\n\t\t\t\t\t\tproses_DT($kondisi,\"($atribut='$nilai_motivasi[0]')\" , \"($atribut='$nilai_motivasi[1]')\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t}\r\n\t\t}\t\t\t\t\t\t\r\n\t}", "title": "" }, { "docid": "669d3efe1cd7b662d3ef2c8f14f5b51a", "score": "0.5782598", "text": "function _kode_unik($tipe){\n\n\t\t $angka_unik = 1;\n\t\t if ($tipe == 1) {\n\t\t\t $angka_unik = 101;\n\t\t }elseif ($tipe == 2) {\n\t\t\t $angka_unik = 303;\n\t\t }elseif ($tipe == 3) {\n\t\t \t# code...\n\t\t\t$angka_unik = 403;\n\t\t}elseif ($tipe == 4) {\n\t\t\t# code...\n\t\t\t$angka_unik = 502;\n\t\t}elseif($tipe == 5){\n\t\t\t$angka_unik = 209;\n\t\t}\n\t\treturn $angka_unik;\n\t }", "title": "" }, { "docid": "50ff88612b34c4b28d4b5d618d34bb26", "score": "0.57782316", "text": "public function getOtsikko(){\n return $this->otsikko;\n }", "title": "" }, { "docid": "f65a47e5caae63fbccb6c18cb260702f", "score": "0.5764823", "text": "public function kir() {\r\n\t\t\r\n\r\n\t\t\t$data['data_kir'] = $this->ga_model->GetKir();\r\n\t\t\t$this->template_dua->load('template_dua','ga/sistem/kir/index',$data);\r\n\r\n\t\t\r\n\t}", "title": "" }, { "docid": "36c8895d2106be4d84f67f8e1e512d6e", "score": "0.5723912", "text": "public function kondisi_fisik()\n\t{\n\t\t$data['siswa'] = $this->m_guru->m_get_siswa_kondisi_fisik(); \n\t\t// print('<pre>');print_r($data);exit();\n\t\t$data['content'] = \"guru/kondisi_fisik/v_setup_kondisi_fisik\";\n\t\t$this->load->view('guru/index', $data);\n\t}", "title": "" }, { "docid": "2c6e8d9344b2e103b2ddaf48a72709d6", "score": "0.568804", "text": "public function esNoche();", "title": "" }, { "docid": "b7ffb826c7f276a6dc7b1efbe2ed818e", "score": "0.5677101", "text": "function einu()\n {\n // echo $this -> ugis;\n }", "title": "" }, { "docid": "7d749235f624d4fea5f2056ec7c6ebe2", "score": "0.5677001", "text": "public function esSemanaDia();", "title": "" }, { "docid": "fc72212f32d2cf0bf990fc2840aad808", "score": "0.5674428", "text": "function get_kode_peminatan($nim)\n\t\t{\n\t\t\t$CI =& get_instance();\n\t\t\t$kode = NULL;\n\t\t\t$data = $CI->s00_lib_api->get_api_json(\n\t\t\t\t\tURL_API_SIA.'/sia_mahasiswa/data_search',\n\t\t\t\t\t'POST',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'api_kode'\t\t=> 38000,\n\t\t\t\t\t\t'api_subkode'\t=> 2,\n\t\t\t\t\t\t'api_search'\t=> array($nim)\n\t\t\t\t\t)\n\t\t\t);\n\n\t\t\tif($data){\n\t\t\t\t$kode = $data[0]['KD_PEMINATAN'];\n\t\t\t}\n\n\t\t \treturn $kode;\n\t\t}", "title": "" }, { "docid": "b80006d8d124a505849567bb8651d44c", "score": "0.5656794", "text": "public function limpiar_estado()\n\t{\n\t}", "title": "" }, { "docid": "8c245c9276a9c8603c2adba322f9e5b5", "score": "0.565439", "text": "public function paket_soal(){\n $data['content']['paket_soal'] = $this->tes->get_paket_soal();\n $data['title_header'] = ['title' => 'Paket Soal'];\n\n //for load view\n $view['css_additional'] = 'website/lembaga/tes_online/paket_soal/css';\n $view['content'] = 'website/lembaga/tes_online/paket_soal/content';\n $view['js_additional'] = 'website/lembaga/tes_online/paket_soal/js';\n\n //get function view website\n $this->_generate_view($view, $data);\n }", "title": "" }, { "docid": "998790b03b127957f7e3dcef7c1e554d", "score": "0.5645995", "text": "function konversi(){\r\n\t\t//$this->inv_model->auto_data();\r\n\t\t$this->zetro_auth->menu_id(array('konversisatuan'));\r\n\t\t$this->list_data($this->zetro_auth->auth());\r\n\t\t$this->View('warehouse/material_konversi');\r\n\t}", "title": "" }, { "docid": "98af0ab591468212a708ed174a51b935", "score": "0.5630335", "text": "function pembentukan_tree($db_object, $N_parent, $kasus) {\n //mengisi kondisi\n if ($N_parent != '') {\n $kondisi = $N_parent . \" AND \" . $kasus;\n } else {\n $kondisi = $kasus;\n }\n echo $kondisi . \"<br>\";\n //cek data heterogen / homogen???\n $cek = cek_heterohomogen($db_object, 'kelas_asli', $kondisi);\n if ($cek == 'homogen') {\n echo \"<br>LEAF ||\";\n $sql_keputusan = $db_object->db_query(\"SELECT DISTINCT(kelas_asli) FROM \"\n . \"data_latih WHERE $kondisi\");\n $row_keputusan = $db_object->db_fetch_array($sql_keputusan);\n $keputusan = $row_keputusan['0'];\n //insert atau lakukan pemangkasan cabang\n pangkas($db_object, $N_parent, $kasus, $keputusan);\n }//jika data masih heterogen\n else if ($cek == 'heterogen') {\n //cek jumlah data\n // $jumlah = jumlah_data($kondisi);\n // if($jumlah<=3){\n // echo \"<br>LEAF \";\n // $Nlancar = $kondisi.\" AND kelas_asli='baik'\";\n // $Nmacet = $kondisi.\" AND kelas_asli='kurang'\";\n // $jumlahlancar = jumlah_data(\"$Nlancar\");\n // $jumlahmacet = jumlah_data(\"$Nmacet\");\n // if($jumlahlancar <= $jumlahmacet){\n // $keputusan = 'kurang';\n // }else{\n // $keputusan = 'baik';\n // }\n // //insert atau lakukan pemangkasan cabang\n // pangkas($N_parent , $kasus , $keputusan);\n // }\n // //lakukan perhitungan\n // else{\n //jika kondisi tidak kosong kondisi_kelas_asli=tambah and\n $kondisi_kelas_asli = '';\n if ($kondisi != '') {\n $kondisi_kelas_asli = $kondisi . \" AND \";\n }\n $jml_lancar = jumlah_data($db_object, \"$kondisi_kelas_asli kelas_asli='lancar'\");\n $jml_macet = jumlah_data($db_object, \"$kondisi_kelas_asli kelas_asli='macet'\");\n \n $jml_total = $jml_lancar + $jml_macet ;\n echo \"Jumlah data = \" . $jml_total . \"<br>\";\n echo \"Jumlah Lancar = \" . $jml_lancar . \"<br>\";\n echo \"Jumlah Macet = \" . $jml_macet . \"<br>\";\n\n //hitung entropy semua\n $entropy_all = hitung_entropy($jml_lancar, $jml_macet);\n echo \"Entropy All = \" . $entropy_all . \"<br>\";\n\n $nilai_status_pernikahan = array();\n $nilai_status_pernikahan = cek_nilaiAtribut($db_object, 'status_pernikahan',$kondisi);\n $jmlStatusPernikahan = count($nilai_status_pernikahan);\n\n echo \"<div class='table-responsive'>\n <table class='table table-striped table-bordered table-hover' id='sample-table-1'>\n <thead>\";\n echo \"<tr>\"\n . \"<th>Nilai Atribut</th> \"\n . \"<th>Jumlah data</th> \"\n . \"<th>Jumlah Lancar</th> \"\n . \"<th>Jumlah Macet</th> \"\n . \"<th>Entropy</th> \"\n . \"<th>Gain</th>\"\n . \"<tr>\";\n echo \"</thead>\"\n . \" <tbody>\";\n\n $db_object->db_query(\"TRUNCATE gain\");\n //hitung gain atribut KATEGORIKAL\n hitung_gain($db_object, $kondisi, \"status_rumah\", $entropy_all, \"status_rumah='rumah sendiri'\", \"status_rumah='kontrak'\", \"\", \"\", \"\");\n \n //hitung gain atribut KATEGORIKAL\n if($jmlStatusPernikahan!=1){\n $NA1StatusPernikahan=\"status_pernikahan='$nilai_status_pernikahan[0]'\";\n $NA2StatusPernikahan=\"\";\n $NA3StatusPernikahan=\"\";\n if($jmlStatusPernikahan==2){\n $NA2StatusPernikahan=\"status_pernikahan='$nilai_status_pernikahan[1]'\";\n }else if ($jmlStatusPernikahan==3){\n $NA2StatusPernikahan=\"status_pernikahan='$nilai_status_pernikahan[1]'\";\n $NA3StatusPernikahan=\"status_pernikahan='$nilai_status_pernikahan[2]'\";\n }\t\t\t\t\n hitung_gain($db_object, $kondisi , \"status_pernikahan\", $entropy_all , $NA1StatusPernikahan, $NA2StatusPernikahan, $NA3StatusPernikahan, \"\" , \"\");\t\n }\n\n //hitung gain atribut Numerik\n //Penghasilan\n hitung_gain($db_object, $kondisi, \"Penghasilan=1000000\", $entropy_all, \"penghasilan<=1000000\", \"penghasilan>1000000\", \"\", \"\", \"\");\n hitung_gain($db_object, $kondisi, \"Penghasilan=2000000\", $entropy_all, \"penghasilan<=2000000\", \"penghasilan>2000000\", \"\", \"\", \"\");\n hitung_gain($db_object, $kondisi, \"Penghasilan=3000000\", $entropy_all, \"penghasilan<=3000000\", \"penghasilan>3000000\", \"\", \"\", \"\");\n \n //Umur\n hitung_gain($db_object, $kondisi, \"Umur=35\", $entropy_all, \"umur<=35\", \"umur>35\", \"\", \"\", \"\");\n hitung_gain($db_object, $kondisi, \"Umur=40\", $entropy_all, \"umur<=40\", \"umur>40\", \"\", \"\", \"\");\n hitung_gain($db_object, $kondisi, \"Umur=45\", $entropy_all, \"umur<=45\", \"umur>45\", \"\", \"\", \"\");\n \n echo \"</tbody>\";\n echo \"</table>\";\n //ambil nilai gain terBesar\n $sql_max = $db_object->db_query(\"SELECT MAX(gain) FROM gain\");\n $row_max = $db_object->db_fetch_array($sql_max);\n $max_gain = $row_max[0];\n $sql = $db_object->db_query(\"SELECT * FROM gain WHERE gain=$max_gain\");\n $row = $db_object->db_fetch_array($sql);\n $atribut = $row[2];\n echo \"Atribut terpilih = \" . $atribut . \", dengan nilai gain = \" . $max_gain . \"<br>\";\n echo \"<br>================================<br>\";\n\n //jika max gain = 0 perhitungan dihentikan dan mengambil keputusan\n if ($max_gain == 0) {\n echo \"<br>LEAF \";\n $Nlancar = $kondisi . \" AND kelas_asli='lancar'\";\n $Nmacet = $kondisi . \" AND kelas_asli='macet'\";\n $jumlahlancar = jumlah_data($db_object, \"$Nlancar\");\n $jumlahmacet = jumlah_data($db_object, \"$Nmacet\");\n if($jumlahlancar >= $jumlahmacet ) {\n $keputusan = 'lancar';\n }\n else {\n $keputusan = 'macet';\n }\n //insert atau lakukan pemangkasan cabang\n pangkas($db_object, $N_parent, $kasus, $keputusan);\n }\n //jika max_gain >0 lanjut..\n else {\n //status rumah terpilih\n if ($atribut == \"status_rumah\") {\n proses_DT($db_object, $kondisi, \"($atribut='rumah sendiri')\", \"($atribut='kontrak')\");\n }\n \n //status pernikahan terpilih\n if ($atribut == \"status_pernikahan\") {\n //jika nilai atribut 3\n if($jmlStatusPernikahan==3){\n //hitung rasio\n $cabang = array();\n $cabang = hitung_rasio($db_object, $kondisi , 'status_pernikahan',$max_gain,$nilai_status_pernikahan[0],$nilai_status_pernikahan[1],$nilai_status_pernikahan[2],'','');\n $exp_cabang = explode(\" , \",$cabang[1]);\t\t\t\t\t\t\n proses_DT($db_object, $kondisi , \"($atribut='$cabang[0]')\",\"($atribut='$exp_cabang[0]' OR $atribut='$exp_cabang[1]')\");\t\t\t\t\t\t\n }\n //jika nilai atribut 2\n else if($jmlStatusPernikahan==2){\n proses_DT($db_object, $kondisi , \"($atribut='$nilai_status_pernikahan[0]')\" , \"($atribut='$nilai_status_pernikahan[1]')\");\n }\n }\n\n //Jawaban A Terpilih\n if ($atribut == \"Penghasilan=1000000\") {\n proses_DT($db_object, $kondisi, \"(penghasilan<=1000000)\", \"(penghasilan>1000000)\");\n } else if ($atribut == \"Penghasilan=2000000\") {\n proses_DT($db_object, $kondisi, \"(penghasilan<=2000000)\", \"(penghasilan>2000000)\");\n } else if ($atribut == \"Penghasilan=3000000\") {\n proses_DT($db_object, $kondisi, \"(penghasilan<=3000000)\", \"(penghasilan>3000000)\");\n }\n \n //Jawaban B Terpilih\n if ($atribut == \"Umur=35\") {\n proses_DT($db_object, $kondisi, \"(umur<=35)\", \"(umur>35)\");\n } else if ($atribut == \"Umur=40\") {\n proses_DT($db_object, $kondisi, \"(umur<=40)\", \"(umur>40)\");\n } else if ($atribut == \"Umur=45\") {\n proses_DT($db_object, $kondisi, \"(umur<=45)\", \"(umur>45)\");\n }\n \n }//end \n //else jika max_gain>0\n // }// end jumlah<3\n }//end else if($cek=='heterogen'){\n}", "title": "" }, { "docid": "a41fe752c9da4a383e8264214ef009b2", "score": "0.56301546", "text": "public function tijesto()\n {\n }", "title": "" }, { "docid": "b4d8defada3c68c18621c49f7ebd474b", "score": "0.561943", "text": "function get_kode_kurikulum($nim)\n\t\t{\n\t\t\t$CI =& get_instance();\n\t\t\t$kode = NULL;\n\t\t\t$data = $CI->s00_lib_api->get_api_json(\n\t\t\t\t\tURL_API_SIA.'/sia_kurikulum/data_search',\n\t\t\t\t\t'POST',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'api_kode'\t\t=> 40001,\n\t\t\t\t\t\t'api_subkode'\t=> 3,\n\t\t\t\t\t\t'api_search'\t=> array($nim)\n\t\t\t\t\t)\n\t\t\t);\n\n\t\t\tif($data){\n\t\t\t\t$kode = $data[0]['KD_KUR'];\n\t\t\t}\n\n\t\t \treturn $kode;\n\t\t}", "title": "" }, { "docid": "fb20aa6a23ee439970fb7e8cc8c2f176", "score": "0.56082743", "text": "public function slobodniTermini(){\n $termini1 = $this->ModelSlobodniTermini->dohvSlobodneTermine();\n $naredba1 = \"termini1\";\n\n $this->load->view(\"performer/index.php\", array('termini1'=>$termini1,'naredba1'=>\"termini1\")); \n }", "title": "" }, { "docid": "a390280848033983258aad0cd6031fea", "score": "0.5595607", "text": "protected function fijarId(){\n return \"cod_entrada_anon\";\n }", "title": "" }, { "docid": "3431969648f0154c4c97a589547d3f8a", "score": "0.5595015", "text": "public function getKodKraju()\n {\n return $this->kodKraju;\n }", "title": "" }, { "docid": "13e0b526c355d1a79a2c61ed052f694a", "score": "0.55945563", "text": "function komentar()\n\t{\n\t\t$data['komen'] = $this->admin_model->datakomentar();\n \t$this->template->load('adminweb/media','adminweb/mod_komentar/komentar',$data);\n\t}", "title": "" }, { "docid": "f8a8e38093b876fce3c2862fd653953c", "score": "0.5585934", "text": "function proses_DT($parent , $kasus_cabang1 , $kasus_cabang2){\t\r\n\t\techo \"cabang 1<br>\";\r\n\t\tpembentukan_tree($parent , $kasus_cabang1);\t\t\r\n\t\techo \"cabang 2<br>\";\r\n\t\tpembentukan_tree($parent , $kasus_cabang2);\t\t\r\n\t}", "title": "" }, { "docid": "50f9399d4740fbe238fc69e5a8f50ed1", "score": "0.5585707", "text": "public function zwischenspeichern(){\n \t\n }", "title": "" }, { "docid": "92987dfcca47d799a1fb7139b94892b7", "score": "0.55821764", "text": "public abstract function berekenOppervlakte();", "title": "" }, { "docid": "fa1696250816eca7649d5d54690e5af9", "score": "0.5571797", "text": "function cek_skpi($nim)\n\t\t{\n\t\t\t$temp = $this->get_skpi_mhs($nim);\n\t\t\t$data = 'BELUM';\n\t\t\tif($temp){\n\t\t\t\t$data = $temp['status'];\n\t\t\t}\t\t\n\n\t\t\treturn $data;\n\t\t}", "title": "" }, { "docid": "cda731180b08859f37f905b31282a79c", "score": "0.55627066", "text": "public function suntingSeo(){\n\t\t\tif(is_null($this->author)) trigger_error(\"Pesan error -> Seo::suntingSeo(): Mencoba untuk menambah objek kedalam database namun sudah memiliki ID (to $this->author). <br> Harap sampaikan pesan error ini kepada Jogjasite untuk tindak lebih lanjut\", E_USER_ERROR);\n\n\t\t\t//Menyunting kategori kedalam database\n\t\t\t$koneksi = new PDO(DB_DSN,DB_USERNAME,DB_PASSWORD);\n\t\t\t$sql = \"UPDATE seo SET author = :author,\n \t\t keywords = :keywords,\n \t\t description = :description\t\t \t\t \n\t\t\t\t\t\t \t\t WHERE author = :author_lama\";\n\t\t $st = $koneksi->prepare($sql);\t\t \t\t \t\t \n\t\t $st->bindValue(\":author\", $this->author, PDO::PARAM_STR);\n\t\t $st->bindValue(\":author_lama\", $this->author_lama, PDO::PARAM_STR);\t\t \n\t\t $st->bindValue(\":keywords\", $this->keywords, PDO::PARAM_STR);\n\t\t $st->bindValue(\":description\", $this->description, PDO::PARAM_STR);\t\t \t\t \n\t\t\t$st->execute();\n\t\t\t$hasilDb = $st->rowCount();\n\t\t\t$koneksi = null;\n\t\t\treturn $hasilDb;\n\t\t}", "title": "" }, { "docid": "c7cb47dd1fd546db58c2dfa4f14cca90", "score": "0.5543171", "text": "function halamanAdvCari() {\n }", "title": "" }, { "docid": "b6f2b2ccb06576dd5211b33542d99e4d", "score": "0.5534851", "text": "function elpiji()\n {\n $this->zetro_auth->menu_id(array('listtransaksilpg'));\n\t\t$this->list_data($this->zetro_auth->auth());\n\t\t$this->View('laporan/penjualan_lpg');\n }", "title": "" }, { "docid": "cbb73298950d4efaa55a1c389b7b5b11", "score": "0.5519613", "text": "function buatkode($nomor_terakhir, $kunci, $jumlah_karakter = 0)\n{\n//menambahkan nomor baru\n$nomor_baru = intval(substr($nomor_terakhir, strlen($kunci))) + 1;\n//menambahkan nol didepan nomor baru sesuai panjang jumlah karakter\n$nomor_baru_plus_nol = str_pad($nomor_baru, $jumlah_karakter, \"0\", STR_PAD_LEFT);\n//menyusun kunci dan nomor baru\n$kode = $kunci.'.'.$nomor_baru_plus_nol;\nreturn $kode;\n}", "title": "" }, { "docid": "943ea95eeee54d9c5de3c0574b479ef5", "score": "0.54991674", "text": "public function kunj_pasien()\n\t{\n\t\t$data['pasien_daftar']=$this->ModelPelayanan->get_pasien_daftar_today()->result();\n\t\t// $get_nm_poli=$this->ModelPelayanan->get_nm_poli($id_poli)->result();//untuk nav\n\t\t// foreach($get_nm_poli as $row){\n\t\t\t// $data['id_poli']=$row->$id_poli;\n\t\t// }\n\t\t// $data['id_poli']=$id_poli;\n\t\t$data['title'] = 'List Pasien Instalasi Rawat Darurat';\n\t\t \n\t\t//print_r($data);\n\t\t$this->load->view('ird/pasien_tindakan',$data);\n\t}", "title": "" }, { "docid": "ab5b5eafdbac9f0d67df170c11dde193", "score": "0.5490411", "text": "protected function set_default_value(){\n $this->set_view('sarung/admin/index');\n $this->set_min_power( 10 );\n\t\t$this->set_title('Kecamatan');\n\t\t$this->set_body_attribute( \" class='admin admin_sarung_body' \" );\n $this->set_name_for_text('Kecamatan');\n $this->set_table_name('Kecamatan');\n\n $this->set_negara_select_name('negara_name');\n $this->set_propinsi_select_name('propinsi_name');\n $this->set_kabupaten_select_name('kabupaten_name');\n\t\t//$this->set_kabupaten_name('kabupaten_beh');\n\t\t$this->set_kecamatan_name('kecamatan');\n \n //! for url\n $this->set_url_this_dele($this->get_url_admin_sarung().\"/kecamatan/eventdel\" );\n $this->set_url_this_edit($this->get_url_admin_sarung().\"/kecamatan/eventedit\");\n $this->set_url_this_add ($this->get_url_admin_sarung().\"/kecamatan/eventadd\" );\n $this->set_url_this_view($this->get_url_admin_sarung().\"/kecamatan\");\n\n $this->set_model_obj(new Kecamatan_Model() );\n \n $this->set_inputs_rules( array( $this->get_kecamatan_name() => 'required' ));\n //! special\n $this->set_js_to_submit();\n $this->set_redirect_name('redirect_name');\n }", "title": "" }, { "docid": "cf5ea7b4a99335696e9654b937d760ba", "score": "0.5490198", "text": "protected function noriuPusryciu() {\n $this->pusryciai = \"Sumustinis\";\n echo $this->pusryciai . \"<br />\";\n }", "title": "" }, { "docid": "e53214d07370b9b280e2c5c65de2146e", "score": "0.54893225", "text": "function ocifreedesc () {}", "title": "" }, { "docid": "c6df673e0e0065566e4cab50689a1a78", "score": "0.548614", "text": "public function getDini() {\n\t\t//\n\t}", "title": "" }, { "docid": "ed9c86185baa1451226ecd85e844124a", "score": "0.5479307", "text": "function Inicial() {\r\n extract($GLOBALS);\r\n global $w_Disabled;\r\n\r\n if ($O=='') $O='P';\r\n\r\n $w_erro = '';\r\n $w_chave = $_REQUEST['w_chave'];\r\n $w_chave_aux = $_REQUEST['w_chave_aux'];\r\n\r\n if ($w_raiz=='' && (strpos($_REQUEST['botao'],'Selecionar')===false)) {\r\n $w_raiz = f($RS,'sq_prop');\r\n $w_pessoa_atual = f($RS,'sq_prop');\r\n } elseif (strpos($_REQUEST['botao'],'Selecionar')===false) {\r\n $w_diretorio = f($RS,'w_diretorio');\r\n } \r\n if (Nvl($w_raiz,0)==0) $O='I'; else $O='A';\r\n // Verifica se há necessidade de recarregar os dados da tela a partir\r\n // da própria tela (se for recarga da tela) ou do banco de dados (se não for inclusão)\r\n if ($w_troca>'') {\r\n // Se for recarga da página\r\n $w_diretorio = $_REQUEST['w_diretorio'];\r\n } \r\n Cabecalho();\r\n head();\r\n ShowHTML(' <!-- CSS FILE for my tree-view menu -->');\r\n ShowHTML(' <link rel=\"stylesheet\" type=\"text/css\" href=\"'.$w_dir_volta.'classes/menu/xPandMenu.css\">');\r\n ShowHTML(' <!-- JS FILE for my tree-view menu -->');\r\n ShowHTML(' <script src=\"'.$w_dir_volta.'classes/menu/xPandMenu.js\"></script>');\r\n Estrutura_CSS($w_cliente);\r\n // Monta o código JavaScript necessário para validação de campos e preenchimento automático de máscara,\r\n // tratando as particularidades de cada serviço\r\n ScriptOpen('JavaScript');\r\n ValidateOpen('Validacao');\r\n if ($w_raiz=='' || !(strpos($_REQUEST['botao'],'Alterar')===false)) {\r\n Validate('w_raiz','Diretório raiz','1','1','4','80','1','1');\r\n ShowHTML(' theForm.Botao.disabled=true;');\r\n } else {\r\n Validate('w_caminho','Diretório destino','1','1','4','80','1','1');\r\n Validate('w_extensao','Extensão','1','1','2','20','ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890, ',null);\r\n ShowHTML(' theForm.Botao[0].disabled=true;');\r\n ShowHTML(' theForm.Botao[1].disabled=true;');\r\n } \r\n ValidateClose();\r\n ScriptClose();\r\n ShowHTML('</HEAD>');\r\n ShowHTML('<BASE HREF=\"'.$conRootSIW.'\">');\r\n if ($w_raiz=='' || !(strpos($_REQUEST['botao'],'Procurar')===false)) {\r\n // Se o diretório raiz de busca\r\n if (!(strpos($_REQUEST['botao'],'Procurar')===false)) {\r\n // Se está sendo feita busca por nome\r\n BodyOpen('onLoad=\\'this.focus()\\';');\r\n } else {\r\n BodyOpen('onLoad=\\'document.Form.w_raiz.focus()\\';');\r\n } \r\n } elseif ($w_troca>'') {\r\n BodyOpen('onLoad=\\'document.Form.'.$w_troca.'.focus()\\';');\r\n } else {\r\n BodyOpen('onLoad=\\'this.focus()\\';');\r\n } \r\n Estrutura_Topo_Limpo();\r\n Estrutura_Menu();\r\n Estrutura_Corpo_Abre();\r\n Estrutura_Texto_Abre();\r\n ShowHTML('<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">');\r\n if (!(strpos('IA',$O)===false)) {\r\n if ($w_raiz=='') {\r\n // Se o beneficiário ainda não foi selecionado\r\n ShowHTML('<FORM action=\"'.$w_dir.$w_pagina.$par.'\" method=\"POST\" name=\"Form\" onSubmit=\"return(Validacao(this));\">');\r\n } else {\r\n ShowHTML('<FORM action=\"'.$w_dir.$w_pagina.'Grava\" method=\"POST\" name=\"Form\" onSubmit=\"return(Validacao(this));\">');\r\n } \r\n ShowHTML('<INPUT type=\"hidden\" name=\"P1\" value=\"'.$P1.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"P2\" value=\"'.$P2.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"P3\" value=\"'.$P3.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"P4\" value=\"'.$P4.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"TP\" value=\"'.$TP.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"SG\" value=\"MIGRA\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"R\" value=\"'.$w_pagina.$par.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"O\" value=\"'.$O.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_troca\" value=\"\">');\r\n if ($w_raiz=='') {\r\n ShowHTML('<tr bgcolor=\"'.$conTrBgColor.'\"><td>');\r\n ShowHTML(' <table border=\"0\">');\r\n ShowHTML(' <tr><td>Informe o diretório raiz de busca e clique no botão \"Selecionar\" para continuar.</TD>');\r\n ShowHTML(' <tr><td><b><u>D</u>iretório raiz:<br><INPUT ACCESSKEY=\"D\" TYPE=\"text\" class=\"sti\" NAME=\"w_raiz\" VALUE=\"'.$w_raiz.'\" SIZE=\"80\" MaxLength=\"80\">');\r\n ShowHTML(' <tr><td><INPUT class=\"STB\" TYPE=\"submit\" NAME=\"Botao\" VALUE=\"Selecionar\">');\r\n ShowHTML(' </table>');\r\n } else {\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_raiz\" value=\"'.$w_raiz.'\">');\r\n ShowHTML('<tr bgcolor=\"'.$conTrBgColor.'\"><td>');\r\n ShowHTML(' <table width=\"100%\" border=\"0\">');\r\n ShowHTML(' <tr><td colspan=\"2\" align=\"center\" height=\"2\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=\"2\" align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=\"2\" align=\"center\" bgcolor=\"#D0D0D0\"><b>Configuração dos parâmetros de execução</td></td></tr>');\r\n ShowHTML(' <tr><td colspan=\"2\" align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=\"2\"><b>Diretório onde deverão ser gerados os arquivos:</b><br><INPUT TYPE=\"text\" class=\"STI\" NAME=\"w_caminho\" VALUE=\"d:\\temp\" SIZE=\"80\" MaxLength=\"80\">');\r\n ShowHTML(' <tr><td colspan=\"2\"><b>Aplicar busca a arquivos com a extensão:</b> (informe as extensões com letras maiúsculas e separe-as com vírgulas)<br><INPUT TYPE=\"text\" class=\"STI\" NAME=\"w_extensao\" VALUE=\"'.nvl($w_extensao,'PRC, FNC, SQL, TRG').'\" SIZE=\"80\" MaxLength=\"20\">');\r\n\r\n ShowHTML(' <tr><td colspan=\"2\" align=\"center\" height=\"2\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=\"2\" align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=\"2\" align=\"center\" bgcolor=\"#D0D0D0\"><b>Seleção de diretórios</td></td></tr>');\r\n ShowHTML(' <tr><td colspan=\"2\" align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=\"2\"><table border=\"0\" width=\"100%\">');\r\n ShowHTML(' <tr valign=\"top\"><td>');\r\n \r\n // verifica se o diretório informado atende aos requisitos de existência, leitura e escrita\r\n if (!testFile($l_erro, $w_raiz, true, true)) {\r\n ScriptOpen('JavaScript');\r\n ShowHTML(' alert(\\'ATENÇÃO: diretório '.$l_erro.'!\\');');\r\n ShowHTML(' location.href=\\''.montaURL_JS($w_dir,$R.'&O='.$O.'&SG='.$SG.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.MontaFiltro('GET')).'\\';');\r\n ScriptClose();\r\n exit();\r\n }\r\n \r\n // Recupera a estrutura do diretório informado\r\n $estrutura = retrieveTree($w_raiz, true);\r\n \r\n if (is_array($estrutura)) {\r\n // Inclusão do arquivo da classe\r\n include_once($w_dir_volta.'classes/menu/xPandMenu.php');\r\n $w_ImagemPadrao='images/Folder/SheetLittle.gif';\r\n\r\n // Instanciando a classe menu\r\n $root = new XMenu();\r\n\r\n // Inicializa contadores para identificação dos níveis da árvore\r\n $n1 = 0;\r\n $n2 = 0;\r\n $n3 = 0;\r\n $n4 = 0;\r\n $n5 = 0;\r\n $n6 = 0;\r\n $n7 = 0;\r\n $n8 = 0;\r\n $n9 = 0;\r\n\r\n // Cria o nó raiz\r\n eval('$noderaiz = &$root->addItem(new XNode(\\'<input type=\"checkbox\" class=\"STC\" name=\"w_dir[]\" value=\"\\'.$w_raiz.\\'\" checked>\\'. $w_raiz.\\' (\\'.count($estrutura, COUNT_RECURSIVE).\\')\\',false,LEAF_DEFAULT_IMG,LEAF_DEFAULT_ALT_IMG,null,null,true));');\r\n \r\n // Monta a árvore da estrutura\r\n foreach ($estrutura as $k1 => $v1) {\r\n if (is_array($v1)) {\r\n $n1 += 1;\r\n // se tiver subdiretórios, não coloca checkbox\r\n if (count($v1) == count($v1, COUNT_RECURSIVE)) {\r\n $w_valor = $w_raiz.$k1;\r\n eval('$node'.$n1.' = &$noderaiz->addItem(new XNode(\\'<input type=\"checkbox\" class=\"STC\" name=\"w_dir[]\" value=\"\\'.$w_valor.\\'\" checked>\\'. $k1.\\' (\\'.count($v1, COUNT_RECURSIVE).\\')\\',false,LEAF_DEFAULT_IMG,LEAF_DEFAULT_ALT_IMG,null,null,true));');\r\n } else {\r\n eval('$node'.$n1.' = &$noderaiz->addItem(new XNode($k1.\\' (\\'.count($v1, COUNT_RECURSIVE).\\')\\',false,LEAF_DEFAULT_IMG,LEAF_DEFAULT_ALT_IMG,null,null,true));');\r\n }\r\n foreach ($v1 as $k2 => $v2) {\r\n if (is_array($v2)) {\r\n $n2 += 1;\r\n if (count($v2) == count($v2, COUNT_RECURSIVE)) {\r\n $w_valor = $w_raiz.$k1.'/'.$k2;\r\n eval('$node'.$n1.'_'.$n2.' = &$node'.$n1.'->addItem(new XNode(\\'<input type=\"checkbox\" class=\"STC\" name=\"w_dir[]\" value=\"\\'.$w_valor.\\'\" checked>\\'. $k2.\\' (\\'.count($v2, COUNT_RECURSIVE).\\')\\',false,LEAF_DEFAULT_IMG,LEAF_DEFAULT_ALT_IMG,null,null,true));');\r\n } else {\r\n eval('$node'.$n1.'_'.$n2.' = &$node'.$n1.'->addItem(new XNode($k2.\\' (\\'.count($v2, COUNT_RECURSIVE).\\')\\',false,LEAF_DEFAULT_IMG,LEAF_DEFAULT_ALT_IMG,null,null,true));');\r\n }\r\n foreach ($v2 as $k3 => $v3) {\r\n if (is_array($v3)) {\r\n $n3 += 1;\r\n if (count($v3) == count($v3, COUNT_RECURSIVE)) {\r\n $w_valor = $w_raiz.$k1.'/'.$k2.'/'.$k3;\r\n eval('$node'.$n1.'_'.$n2.'_'.$n3.' = &$node'.$n1.'_'.$n2.'->addItem(new XNode(\\'<input type=\"checkbox\" class=\"STC\" name=\"w_dir[]\" value=\"\\'.$w_valor.\\'\" checked>\\'. $k3.\\' (\\'.count($v3, COUNT_RECURSIVE).\\')\\',false,LEAF_DEFAULT_IMG,LEAF_DEFAULT_ALT_IMG,null,null,true));');\r\n } else {\r\n eval('$node'.$n1.'_'.$n2.'_'.$n3.' = &$node'.$n1.'_'.$n2.'->addItem(new XNode($k3.\\' (\\'.count($v3, COUNT_RECURSIVE).\\')\\',false,LEAF_DEFAULT_IMG,LEAF_DEFAULT_ALT_IMG,null,null,true));');\r\n }\r\n foreach ($v3 as $k4 => $v4) {\r\n if (is_array($v4)) {\r\n $n4 += 1;\r\n if (count($v4) == count($v4, COUNT_RECURSIVE)) {\r\n $w_valor = $w_raiz.$k1.'/'.$k2.'/'.$k3.'/'.$k4;\r\n eval('$node'.$n1.'_'.$n2.'_'.$n3.'_'.$n4.' = &$node'.$n1.'_'.$n2.'_'.$n3.'->addItem(new XNode(\\'<input type=\"checkbox\" class=\"STC\" name=\"w_dir[]\" value=\"\\'.$w_valor.\\'\" checked>\\'. $k4.\\' (\\'.count($v4, COUNT_RECURSIVE).\\')\\',false,LEAF_DEFAULT_IMG,LEAF_DEFAULT_ALT_IMG,null,null,true));');\r\n } else {\r\n eval('$node'.$n1.'_'.$n2.'_'.$n3.'_'.$n4.' = &$node'.$n1.'_'.$n2.'_'.$n3.'->addItem(new XNode($k4.\\' (\\'.count($v4, COUNT_RECURSIVE).\\')\\',false,LEAF_DEFAULT_IMG,LEAF_DEFAULT_ALT_IMG,null,null,true));');\r\n }\r\n foreach ($v4 as $k5 => $v5) {\r\n if (is_array($v5)) {\r\n $n5 += 1;\r\n if (count($v5) == count($v5, COUNT_RECURSIVE)) {\r\n $w_valor = $w_raiz.$k1.'/'.$k2.'/'.$k3.'/'.$k4.'/'.$k5;\r\n eval('$node'.$n1.'_'.$n2.'_'.$n3.'_'.$n4.'_'.$n5.' = &$node'.$n1.'_'.$n2.'_'.$n3.'_'.$n4.'->addItem(new XNode(\\'<input type=\"checkbox\" class=\"STC\" name=\"w_dir[]\" value=\"\\'.$w_valor.\\'\" checked>\\'. $k5.\\' (\\'.count($v5, COUNT_RECURSIVE).\\')\\',false,LEAF_DEFAULT_IMG,LEAF_DEFAULT_ALT_IMG,null,null,true));');\r\n } else {\r\n eval('$node'.$n1.'_'.$n2.'_'.$n3.'_'.$n4.'_'.$n5.' = &$node'.$n1.'_'.$n2.'_'.$n3.'_'.$n4.'->addItem(new XNode($k5.\\' (\\'.count($v5, COUNT_RECURSIVE).\\')\\',false,LEAF_DEFAULT_IMG,LEAF_DEFAULT_ALT_IMG,null,null,true));');\r\n }\r\n foreach ($v5 as $k6 => $v6) {\r\n if (is_array($v6)) {\r\n $n6 += 1;\r\n if (count($v6) == count($v6, COUNT_RECURSIVE)) {\r\n $w_valor = $w_raiz.$k1.'/'.$k2.'/'.$k3.'/'.$k4.'/'.$k5.'/'.$k6;\r\n eval('$node'.$n1.'_'.$n2.'_'.$n3.'_'.$n4.'_'.$n5.'_'.$n6.' = &$node'.$n1.'_'.$n2.'_'.$n3.'_'.$n4.'_'.$n5.'->addItem(new XNode(\\'<input type=\"checkbox\" class=\"STC\" name=\"w_dir[]\" value=\"\\'.$w_valor.\\'\" checked>\\'. $k6.\\' (\\'.count($v6, COUNT_RECURSIVE).\\')\\',false,LEAF_DEFAULT_IMG,LEAF_DEFAULT_ALT_IMG,null,null,true));');\r\n } else {\r\n eval('$node'.$n1.'_'.$n2.'_'.$n3.'_'.$n4.'_'.$n5.'_'.$n6.' = &$node'.$n1.'_'.$n2.'_'.$n3.'_'.$n4.'_'.$n5.'->addItem(new XNode($k6.\\' (\\'.count($v6, COUNT_RECURSIVE).\\')\\',false,LEAF_DEFAULT_IMG,LEAF_DEFAULT_ALT_IMG,null,null,true));');\r\n }\r\n foreach ($v6 as $k7 => $v7) {\r\n if (is_array($v7)) {\r\n $n7 += 1;\r\n if (count($v7) == count($v7, COUNT_RECURSIVE)) {\r\n $w_valor = $w_raiz.$k1.'/'.$k2.'/'.$k3.'/'.$k4.'/'.$k5.'/'.$k6.'/'.$k7;\r\n eval('$node'.$n1.'_'.$n2.'_'.$n3.'_'.$n4.'_'.$n5.'_'.$n6.'_'.$n7.' = &$node'.$n1.'_'.$n2.'_'.$n3.'_'.$n4.'_'.$n5.'_'.$n6.'->addItem(new XNode(\\'<input type=\"checkbox\" class=\"STC\" name=\"w_dir[]\" value=\"\\'.$w_valor.\\'\" checked>\\'. $k7.\\' (\\'.count($v7, COUNT_RECURSIVE).\\')\\',false,LEAF_DEFAULT_IMG,LEAF_DEFAULT_ALT_IMG,null,null,true));');\r\n } else {\r\n eval('$node'.$n1.'_'.$n2.'_'.$n3.'_'.$n4.'_'.$n5.'_'.$n6.'_'.$n7.' = &$node'.$n1.'_'.$n2.'_'.$n3.'_'.$n4.'_'.$n5.'_'.$n6.'->addItem(new XNode($k7.\\' (\\'.count($v7, COUNT_RECURSIVE).\\')\\',false,LEAF_DEFAULT_IMG,LEAF_DEFAULT_ALT_IMG,null,null,true));');\r\n }\r\n foreach ($v7 as $k8 => $v8) {\r\n if (is_array($v8)) {\r\n $n8 += 1;\r\n if (count($v8) == count($v8, COUNT_RECURSIVE)) {\r\n $w_valor = $w_raiz.$k1.'/'.$k2.'/'.$k3.'/'.$k4.'/'.$k5.'/'.$k6.'/'.$k7.'/'.$k8;\r\n eval('$node'.$n1.'_'.$n2.'_'.$n3.'_'.$n4.'_'.$n5.'_'.$n6.'_'.$n7.'_'.$n8.' = &$node'.$n1.'_'.$n2.'_'.$n3.'_'.$n4.'_'.$n5.'_'.$n6.'_'.$n7.'->addItem(new XNode(\\'<input type=\"checkbox\" class=\"STC\" name=\"w_dir[]\" value=\"\\'.$w_valor.\\'\" checked>\\'. $k8.\\' (\\'.count($v8, COUNT_RECURSIVE).\\')\\',false,LEAF_DEFAULT_IMG,LEAF_DEFAULT_ALT_IMG,null,null,true));');\r\n } else {\r\n eval('$node'.$n1.'_'.$n2.'_'.$n3.'_'.$n4.'_'.$n5.'_'.$n6.'_'.$n7.'_'.$n8.' = &$node'.$n1.'_'.$n2.'_'.$n3.'_'.$n4.'_'.$n5.'_'.$n6.'_'.$n7.'->addItem(new XNode($k8.\\' (\\'.count($v8, COUNT_RECURSIVE).\\')\\',false,LEAF_DEFAULT_IMG,LEAF_DEFAULT_ALT_IMG,null,null,true));');\r\n }\r\n foreach ($v8 as $k9 => $v9) {\r\n if (is_array($v9)) {\r\n $n9 += 1;\r\n $w_valor = $w_raiz.$k1.'/'.$k2.'/'.$k3.'/'.$k4.'/'.$k5.'/'.$k6.'/'.$k7.'/'.$k8.'/'.$k9;\r\n eval('$node'.$n1.'_'.$n2.'_'.$n3.'_'.$n4.'_'.$n5.'_'.$n6.'_'.$n7.'_'.$n8.'_'.$n9.' = &$node'.$n1.'_'.$n2.'_'.$n3.'_'.$n4.'_'.$n5.'_'.$n6.'_'.$n7.'_'.$n8.'->addItem(new XNode(\\'<input type=\"checkbox\" class=\"STC\" name=\"w_dir[]\" value=\"\\'.$w_valor.\\'\" checked>\\'. $k9.\\' (\\'.count($v9, COUNT_RECURSIVE).\\')\\',false,LEAF_DEFAULT_IMG,LEAF_DEFAULT_ALT_IMG,null,null,true));');\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n ShowHTML($root->generateTree());\r\n }\r\n\r\n ShowHTML(' </table>');\r\n ShowHTML(' <tr><td align=\"center\" colspan=\"3\" height=\"1\" bgcolor=\"#000000\"></TD></TR>');\r\n ShowHTML(' <tr><td align=\"center\" colspan=\"3\">');\r\n ShowHTML(' <input class=\"stb\" type=\"submit\" name=\"Botao\" value=\"Executar\" onClick=\"Botao.value=this.value;\">');\r\n ShowHTML(' <input class=\"stb\" type=\"submit\" name=\"Botao\" value=\"Alterar raiz\" onClick=\"Botao.value=this.value; document.Form.w_raiz.value=\\'\\'; document.Form.action=\\''.$w_dir.$w_pagina.$par.'\\'; document.Form.submit();\">');\r\n ShowHTML(' </td>');\r\n ShowHTML(' </tr>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' </TD>');\r\n ShowHTML('</tr>');\r\n } \r\n ShowHTML('</FORM>');\r\n } else {\r\n ScriptOpen('JavaScript');\r\n ShowHTML(' alert(\"Opção não disponível\");');\r\n ShowHTML(' history.back(1);');\r\n ScriptClose();\r\n } \r\n ShowHTML('</table>');\r\n ShowHTML('</center>');\r\n Estrutura_Texto_Fecha();\r\n Estrutura_Fecha();\r\n Estrutura_Fecha();\r\n Estrutura_Fecha();\r\n Rodape();\r\n}", "title": "" }, { "docid": "3a56221dce1e3092adcf2a8bf7de3aaf", "score": "0.54776603", "text": "function senggara_ujian(){\n $data['title'] = \"Pengaktifan Ujian\";\n $data['list_kodUjian'] = $this->Eminda_model->get_select_list('_kodUjian', array('key'=>'kodUjian', 'val'=>'perihalUjian', 'orderby'=>'kodUjian'),1);\n $data['list_status_searching'] = array(''=>'-- Sila Pilih --', '1'=>'Aktif', '0'=>'Tidak Aktif'); \n $countActive = $this->Pengaktifanujian_model->checkActive(); // refer functiom dlm model\n $data['list_status'] = ($countActive) ? array(''=>'-- Sila Pilih --','0'=>'Tidak Aktif') : array(''=>'-- Sila Pilih --', '1'=>'Aktif', '0'=>'Tidak Aktif'); \n $data['list_siri'] = array(''=>'-- Sila Pilih --', '1'=>'1', '2'=>'2', '3'=>'3', '4'=>'4','5'=>'5', '6'=>'6', '7'=>'7', '8'=>'8', '9'=>'9','10'=>'10'); \n $data['tahun'] = date('Y');\n $this->_render_page($data);\n }", "title": "" }, { "docid": "0a162019bce6adcb3508980aeadcbad0", "score": "0.54769593", "text": "public function tampil(){\n echo $this->selectData(); // setelah panah pastikan tidak boleah ada tanda $ atau dolar(variabel)\n }", "title": "" }, { "docid": "07f697dd9bdf959e13709b4d2b951cd9", "score": "0.54762065", "text": "public function esSabadoDia();", "title": "" }, { "docid": "6dcca33e30816bc7ebdf5c0749a932ea", "score": "0.5458823", "text": "function cek_karakter($nim)\n\t\t{\n\t\t\t$CI =& get_instance();\n\t\t\t$data = $CI->s00_lib_api->get_api_json(\n\t\t\t\t\tURL_API_SKPI.'/skpi_basic/cek',\n\t\t\t\t\t'POST',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'api_kode'\t\t=> 1500,\n\t\t\t\t\t\t'api_subkode'\t=> 9,\n\t\t\t\t\t\t'api_search'\t=> array($nim)\n\t\t\t\t\t)\n\t\t\t);\n\n\t\t\treturn $data;\n\t\t}", "title": "" }, { "docid": "288a3b4ffbc5ce76fcfb189e7cbdf0ae", "score": "0.54584014", "text": "public function Kode()\n {\n $tgl = date('d.m.');\n $tahun = date('Y/');\n $date = date('d.m.');\n $this->db->like('kode_transaksi', $tgl);\n $this->db->like('kode_transaksi', $tahun);\n $this->db->select('RIGHT(orders.kode_transaksi,2) as kode', FALSE);\n $this->db->order_by('kode_transaksi', 'DESC');\n $this->db->limit(1);\n $query = $this->db->get('orders'); //cek dulu apakah ada sudah ada kode di tabel. \n if ($query->num_rows() <> 0) {\n //cek kode jika telah tersedia \n $data = $query->row();\n $kode = intval($data->kode) + 1;\n } else {\n $kode = 1; //cek jika kode belum terdapat pada table\n }\n $batas = str_pad($kode, 3, \"0\", STR_PAD_LEFT);\n $kodetampil = $date . 'PDR/' . $tahun . $batas; //format kode\n return $kodetampil;\n }", "title": "" }, { "docid": "a0b9bf0c477b4ff23862ae31d68f9386", "score": "0.54538894", "text": "function pengaturan()\n\t{\n $data['seting']=$this->admin_model->ambilidentitas();\n $this->template->load('adminweb/media','adminweb/mod_identitas/identitas',$data);\n\n }", "title": "" }, { "docid": "1a8ba2d3477e68d9f42bb01c2f52a254", "score": "0.5431953", "text": "function usuarios_niveles_datos()\n\t{\n\n\t\tparent::objeto();\n\n\t\t$this->tabla=\"usuarios_niveles\";\n\t\t$this->campoClave=\"Id\";\n\t\t$this->id=null;\n\t\t\n\t\t\n$v=new Variable(2,$this->tabla,\"Id\",1);\n\t\t\t\n$v->clave=true;\n\t\t\t\n\t\t\t\n$v->autonumerica=true;\n\t\t\t\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"Nivel\",2);\n$this->agregarVariable2($v);\n\n\t}", "title": "" }, { "docid": "414de3df12b2312e56642626eabb713b", "score": "0.5421797", "text": "public function saveTindakanKomponen(){\n\t\t\t$tindakankomponentersimpan = true;\n\t\t\t/* TRIGGER DILAKUKAN DI DATABASE (RND-8014)\n\t\t\t * \n\t\t\t */\n\t\t\treturn $tindakankomponentersimpan;\n\t\t}", "title": "" }, { "docid": "d27b3974c7980b5b315daa5284f423bc", "score": "0.5417867", "text": "function cl_ouvidoriaatendimentoretornotelefone() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"ouvidoriaatendimentoretornotelefone\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "ce60511ef06ffac8d13f3ee65dbeac59", "score": "0.541777", "text": "function cek_label_aktif()\n\t\t{\n\t\t\t$CI =& get_instance();\n\t\t\t$data = $CI->s00_lib_api->get_api_json(\n\t\t\t\t\tURL_API_SKPI.'/skpi_label/lihat',\n\t\t\t\t\t'POST',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'api_kode'\t\t=> 1500,\n\t\t\t\t\t\t'api_subkode'\t=> 2,\n\t\t\t\t\t\t'api_search'\t=> array()\n\t\t\t\t\t)\n\t\t\t);\n\n\t\t\tif($data){\n\t\t\t\t$temp = 1;\n\t\t\t}else{\n\t\t\t\t$temp = 0;\n\t\t\t}\n\n\t\t\treturn $temp;\n\t\t}", "title": "" }, { "docid": "f85174476be09447d5a68cda9c9591dd", "score": "0.5409146", "text": "public function getSegnom(){\n\t\treturn $this->segnom;\n\t}", "title": "" }, { "docid": "2e911903724b83798c5f12eb33b2f0dc", "score": "0.5403663", "text": "public function ctrTraerPlantilla(){\n /*include Se utiliza para cargar codigo proveniente desde otros archivos. */\n \n include \"vistas/parte_superior.php\";\n include \"vistas/parte_inferior.php\";\n \n }", "title": "" }, { "docid": "020c6f322a6e441a0edc1491d7611a4e", "score": "0.53985834", "text": "function vista_editar_kit($objeto) {\n\t// Si el objeto viene vacio(llamado desde el index) se le asigna el $_REQUEST que manda el Index\n\t// Si no conserva su valor normal\n\t\t$objeto = (empty($objeto)) ? $_REQUEST : $objeto;\n\t\t$panel = $objeto['panel'];\n\n\t// Consulta los productos\n\t\t$kits = $this -> configuracionModel -> listar_kits($objeto);\n\t\t$kits = $kits['rows'];\n\t\n\t// Obtiene los productos de los kits y los agrega\n\t\tforeach ($kits as $key => $value) {\n\t\t\t$productos = $this -> configuracionModel -> listar_productos($value);\n\t\t\t$value['productos'] = $productos['rows'];\n\t\t\t\n\t\t\t$horario = (!empty(strpos($value['dias'], \"0\"))) ? 'Do, ' : '' ;\n\t\t\t$horario .= (!empty(strpos($value['dias'], \"1\"))) ? 'Lu, ' : '' ;\n\t\t\t$horario .= (!empty(strpos($value['dias'], \"2\"))) ? 'Ma, ' : '' ;\n\t\t\t$horario .= (!empty(strpos($value['dias'], \"3\"))) ? 'Mi, ' : '' ;\n\t\t\t$horario .= (!empty(strpos($value['dias'], \"4\"))) ? 'Ju, ' : '' ;\n\t\t\t$horario .= (!empty(strpos($value['dias'], \"5\"))) ? 'Vi, ' : '' ;\n\t\t\t$horario .= (!empty(strpos($value['dias'], \"6\"))) ? 'Sa, ' : '' ;\n\t\t\t\n\t\t\t$value['horario'] = substr($horario, 0, -2);\n\t\t\t$value['horario'] .= ' == '.$value['inicio'].'-'.$value['fin'];\n\t\t\t\n\t\t// Agrega el elemento al array\n\t\t\t$datos[$key] = $value;\n\t\t}\n\t\t\n\t// Inicializa el array de los productos agregados\n\t\tsession_start();\n\t\t$_SESSION['productos_agregados'] = '';\n\t\n\t// Carga la vista de edicion por default si no existe una vista\n\t\t$vista = (!empty($objeto['vista'])) ? $objeto['vista'] : 'editar_kit';\n\t\t\n\t// Carga la vista\n\t\trequire ('views/configuracion/'.$vista.'.php');\n\t}", "title": "" }, { "docid": "bf0c0adbf6ab88e590c4668f42a5d4f9", "score": "0.5397568", "text": "public function __construct()\n\t{\n\t\t//$this->tipo = 'prod' ;\n\t\t//$this->tipo = 'paralelo' ;\n\t\t$this->tipo = 'respaldo' ;\n\t}", "title": "" }, { "docid": "e2659cb436b9fdc15a49c85c117d723e", "score": "0.53924435", "text": "function erstelle_neuen_sprachdatei_eintrag()\n\t\t{\n\t\t\t\t$lf=\"backend\";\n\t\t\t\tif ($_POST['rapid_lang']==\"front\")\n\t\t\t\t{\n\t\t\t\t\t$lf=\"frontend\";\n\t\t\t\t}\n\n\t\t\t\t//Inhalt auslesen\n\t\t\t\t$file_content = implode(\"\", file(ABS_PFAD . \"/language/lang.de.inc.php\"));\n\t\t\t\t//echo $file_content;\n\n\t\t\t\t//Spracheintrag erstellen $lang_dat['uebersicht']=\"Übersicht\";\n\t\t\t\t$spracheintrag = '$lang_dat[\\'plugin_' . $this->praefix . \"_\" . $this->\n\t\t\t\t\t\tname_org . '\\']=\\'' . $this->label . \"';\\n\";\n\n\t\t\t\t//Den neuen Inhalt einbauen und den Platzhalter wieder setzen\n\t\t\t\t$file_content2 = eregi_replace('#start#', $spracheintrag . \" #start#\", $file_content);\n\n\t\t\t\t//Inhalt speichern\n\t\t\t\t$this->write_to_file(\"/language/lang.de.inc.php\", $file_content2);\n\n\t\t\t\t\n\n\t\t}", "title": "" }, { "docid": "72727203f237fa9b20dcc74f63a11f78", "score": "0.5384872", "text": "protected function GetDatakey(){\n\t\treturn 'sys_seg_submodulos_id';\n\t}", "title": "" }, { "docid": "4434822e6ca38b4a343fd968f6e5516e", "score": "0.53800386", "text": "public function verDados(){\r\n\t\techo get_class($this) . \"<br>\";\r\n\r\n\t\techo $this->nome . \"<br>\";\r\n\t\techo $this->idade . \"<br>\";\r\n\t\techo $this->senha . \"<br>\";//exemplo que mostra que atributo senha nao è acessado pela classe Programador pq senha è private\r\n\t}", "title": "" }, { "docid": "401416dde131c671b948a056a37b51a5", "score": "0.53796", "text": "public function dtsd(){\n\t $id=$this->uri->segment(4);\n\t $data['pengumuman']=$this->mymodel->verifikasi_awal($id);\n\t $data['side']='tampil/side/sidedirektur';\n\t $data['content']='tampil/menu_admin_direktur/pengumuman/updatesd';\n\t $this->load->view('tampil/utama/main',$data);\n\t}", "title": "" }, { "docid": "caa0d7dfed13425864fe9eb76b8bbd35", "score": "0.5376425", "text": "static function izbrojPosetioce(){\n return self::$posetioci;\n }", "title": "" }, { "docid": "9d82c03cc806d25fabd802c1fc6e4ebf", "score": "0.5376221", "text": "public function konservu($datoj = Array() ){\n global $DB, $DB_DEBUG;\n \n $gxisdatigaro = array_merge($this->gxisdatigaro,$datoj);\n\n $DB_DEBUG[] = Array(\"konservu\", $this->gxisdatigaro);\n \n if(empty($gxisdatigaro)){ //povas okazi ke estas nenio por gxisdatigi \n return; //ekzample kiam oni provas agordi saman valoron kia estas en db\n }\n \n if(isset($gxisdatigaro['patro'])){ //permesu konservi al patron krom id ankaux Pagxon kaj vojon\n if( $gxisdatigaro['patro'] instanceof Pagxo ){\n $gxisdatigaro['patro'] = $gxisdatigaro['patro'][\"id\"]; \n }\n elseif( ! is_numeric($gxisdatigaro['patro']) ){ //traduku vojon al id\n $patro = $DB->pagxoj(\"vojo = ?\",$gxisdatigaro['patro'])->select(\"id\")->limit(1)->fetch();\n if(empty($patro)) throw PagxoException(\"Mankas patro ({$gxisdatigaro['patro']})\", MANKAS_PATRO);\n $gxisdatigaro['patro'] = $patro[\"id\"];\n }\n }\n \n \n //cxiam gxisdatigxu tempon\n $gxisdatigaro['sxangxita'] = time();\n \n\n \n //cxu krei aux gxisdatigi?\n if( isset($this->rikordo['id']) ){ //<----------------- GXISDATIGO\n \n \n //todo: unue ŝanĝi nomon, kaj poste provi ŝanĝi idojn!\n if(isset($gxisdatigaro[\"nomo\"]) ){\n if(empty($gxisdatigaro[\"nomo\"])){ //se ni gxisdtigas nomon de pagxo,gxi devas esti plenigita\n throw new PagxoException(\"Pagxo devas havi nomon\");\n }else{ //anstatuxigu novan nomon en la vojo\n $vojo = explode(\"/\",$this->rikordo[\"vojo\"]);\n array_pop($vojo);\n $vojo[] = SEOigu($gxisdatigaro[\"nomo\"]);\n $vojo = implode(\"/\",$vojo);\n \n $gxisdatigaro[\"vojo\"] = $vojo;\n \n self::gxisdatiguVojojn($this->rikordo[\"id\"], $vojo);\n }\n }\n \n try{\n //update redona \n $this->rikordo->update($gxisdatigaro);\n\n foreach($gxisdatigaro as $nomo => $valoro){\n $this->rikordo[$nomo] = $valoro;\n }\n\n }catch(PDOException $e){\n if($e->getCode() != \"HY000\") throw $e;\n \n //forĵetu novan nomon\n unset($this->gxisdatigaro[\"nomo\"]);\n \n //versxajne duplika nomo\n throw new PagxoException(\"Eraro! Versxajne duplika rikordo ({$e->getMessage()})\",self::DUPLIKA);\n } \n \n \n \n\n \n }else{ //<--------------------------------------------- NOVA\n //se ni kreas novan pagxon gxi devas havi nomon\n if(empty($gxisdatigaro[\"nomo\"])){\n throw new PagxoException(\"Pagxo devas havi nomon\"); \n }\n \n //akiro de propra vojo\n if( $gxisdatigaro[\"patro\"] ){\n $gxisdatigaro[\"vojo\"] = $DB->pagxoj[ $gxisdatigaro[\"patro\"] ][\"vojo\"].\"/\".SEOigu($gxisdatigaro[\"nomo\"]);\n }else{\n $gxisdatigaro[\"vojo\"] = SEOigu($gxisdatigaro[\"nomo\"]);\n }\n try{\n $this->rikordo = $DB->pagxoj()->insert($gxisdatigaro);\n }\n catch(PDOException $e){\n if($e->getCode() != \"HY000\") throw $e;\n //versxajne duplika nomo\n throw new PagxoException(\"Eraro! Versxajne duplika rikordo ({$e->getMessage()})\",self::DUPLIKA);\n \n } \n }\n \n $this->gxisdatigaro = Array();\n }", "title": "" }, { "docid": "3667f722355775064b6e48913d5b1d74", "score": "0.5375894", "text": "public function kerjakan_soal()\n {\n # code...\n echo view('template/header');\n echo view('kerjakansoal');\n }", "title": "" }, { "docid": "5a7feceea79e09aa640550c04c70c1f8", "score": "0.5374681", "text": "function get_detil_transaksi_st($idTr){\n\t\t\treturn $this->execute(\"SELECT\n\t\t\t\t\t\t\t\t\t\t\tidRekapSetoran As ID_TR,\n\t\t\t\t\t\t\t\t\t\t\ttanggalPenyetoran AS TANGGAL,\n\t\t\t\t\t\t\t\t\t\t\tidNamaRekapSetoran AS ID_NAMA,\n\t\t\t\t\t\t\t\t\t\t\tnominalRekapSetoran AS NOMINAL,\n\t\t\t\t\t\t\t\t\t\t\tketerangan AS KETERANGAN\n\t\t\t\t\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\t\t\t\t\tsis_nama_iuran\n\t\t\t\t\t\t\t\t\t\tJOIN sis_rekap_setoran ON idJenisIuran = idNamaRekapSetoran\n\t\t\t\t\t\t\t\t\t\tWHERE idRekapSetoran = '$idTr'\");\t\t\t\n\t\t}", "title": "" }, { "docid": "8765d171523b7651b245c5c07868f84d", "score": "0.5371716", "text": "function lee_menu()\n {\n\t if ($this->idmenu==\"\" && $this->descripcion==\"\")\n\t {\n\t \tmenerror(\"no esta definida la definicion del menu\");\n\t \tdie();\n \t }\t\n\t $menu = new menudata();\n \t $menu->connection=$this->connection;\n\t $menu->idmenu = $this->idmenu;\n\t $menu->descripcion = $this->descripcion;\n\t $menu->filtro = $this->filtro;\n\t $menu->damemetadata();\n\n\t $sql=$menu->camposm[\"fuente\"];\n\t $this->movto_mantto=$menu->camposm[\"movtos\"];\n\t $this->tabla=$menu->camposm[\"tabla\"];\n\t $this->titulos=$menu->camposm[\"descripcion\"];\n\t $this->menu=$menu->camposm;\n\t $this->menuc=$menu->camposmc;\n\t $this->menumce=$menu->camposmce;\t // 20070904\n\t $this->menue=$menu->camposme;\n\t $this->menum=$menu->camposmm;\t /* 20061101 */\t \n\t $this->menumht=$menu->camposmht;\t /* 20070627 */\t \t \t \n\t $this->metada=$menu; // 20070818\n\t $this->idmenu=$menu->idmenu;\n }", "title": "" }, { "docid": "03af5307bb8e7b66f458cbd0588ca469", "score": "0.5367234", "text": "function gempa_internsial_node (){\n $link_sumber = \"https://data.bmkg.go.id/autogempa.xml\";\n //load dah selesai wkwk\n //buka file xml dan parsing satu satu;v\n $buka_data = @simplexml_load_file($link_sumber)or die (\"gagal! Perbaiki internet nya gan...\");\n //cetak ke layar monitor\n print \"\\033[0;36m\"; //aku buta warna, ketoke cyan nek ra salah ;v\n print \"tanggal :\".$buka_data->gempa->Tanggal.PHP_EOL;\n print \"jam :\".$buka_data->gempa->Jam.PHP_EOL;\n print \"\\033[01;31m\"; //gabut warna ;v wkwk\n print \"lintang :\".$buka_data->gempa->Lintang.PHP_EOL;\n print \"Bujur :\".$buka_data->gempa->Bujur.PHP_EOL;\n print \"Magnitude :\".$buka_data->gempa->Magnitude.PHP_EOL;\n print \"Kedalaman :\".$buka_data->gempa->Kedalaman.PHP_EOL;\n print \"\\033[0;32m\"; // Hijau ketoe\n print \"Wilayah :\".$buka_data->gempa->Wilayah3.PHP_EOL;\n print \"Potensi :\".$buka_data->gempa->Potensi.PHP_EOL;\n \n\n}", "title": "" }, { "docid": "6cafdf2e09c202ee5ad32320c73788c7", "score": "0.53663063", "text": "function jenis(){\r\n\t\t//$this->inv_model->auto_data();\r\n\t\t$this->zetro_auth->menu_id(array('jenisbarang'));\r\n\t\t$this->list_data($this->zetro_auth->auth());\r\n\t\t$this->View('warehouse/material_jenis');\r\n\t}", "title": "" }, { "docid": "e3564ab66a4e382fb336cdaf5ca68f62", "score": "0.5364707", "text": "public function getSigla(){\n return $this->sigla;\n }", "title": "" }, { "docid": "71ea8f95a76212a9cf2039862e7052e2", "score": "0.53631353", "text": "function ekle(){\n $veri[\"ulke\"] = $this->datalar->ulke;\n $veri[\"kod\"] = $this->datalar->kod;\n $veri[\"diger\"] = $this->datalar->diger;\n \n // $this->db->query(\" \"); istenirse direk sql kodlar buraya yazilabilinir \n \n $this->db(core::insert(\"sirketler\", $veri));\n return $this->db->insert_id;\n }", "title": "" }, { "docid": "5a8449bf5e444bc979f2366af4610b6c", "score": "0.5360851", "text": "public function tinggi_berat()\n\t{\n\t\t$data['siswa'] = $this->m_guru->m_get_siswa_tinggi_berat(); \n\t\t// print('<pre>');print_r($data);exit();\n\t\t$data['content'] = \"guru/berat_tinggi/v_setup_berat_tinggi\";\n\t\t$this->load->view('guru/index', $data);\n\t}", "title": "" }, { "docid": "585441fca9e0d8606c1c8dbf00db6f2d", "score": "0.5357076", "text": "function jaminan_ditolak()\n\t{\n\t\t$data['izin'] =\n\t\t\t$this->db->query(\"SELECT * FROM data_izin as A\n\t\t\t\t\t\t\tJOIN data_izin as B\n\t\t\t\t\t\t\tON A.id_surat = B.id_surat\n\t\t\t\t\t\t\tJOIN data_status as C\n\t\t\t\t\t\t\tON A.id_surat = C.id_surat\n\t\t\t\t\t\t\tLEFT JOIN s_status as D\n\t\t\t\t\t\t\tON C.status = D.status\n\t\t\t\t\t\t\tJOIN tpbdetail as E \n\t\t\t\t\t\t\tON B.id_tpb = E.id_tpb\n\t\t\t\t\t\t\tLEFT JOIN penjamindetail as F \n\t\t\t\t\t\t\tON B.id_penjamin = F.id_penjamin\n\t\t\t\t\t\t\tJOIN data_perben as G \n\t\t\t\t\t\t\tLEFT ON B.id_jaminan = G.id_jaminan\n\t\t\t\t\t\t\tWHERE C.status = '13'\n\t\t\t\t\t\t\tORDER BY B.tgl_surat DESC\n\t\t\t\t\t\t\t\")->result();\n\n\t\t$this->load->view('perben/kasubsi/v_head');\n\t\t$this->load->view('perben/kasubsi/jaminan_ditolak', $data);\n\t\t$this->load->view('perben/kasubsi/v_foot');\n\t}", "title": "" }, { "docid": "f79c7ce0d4b82c18f158f558d75c885c", "score": "0.53440976", "text": "function transaksi() {\n $data['header'] = $this->m_transaksi->get_transaksi_header_kasir();\n $data['sale'] = $this->m_transaksi->get_transaksi_sale();\n $this->template->load('kasir/v_kasir', 'kasir/v_tbl_transaksi', $data);\n }", "title": "" }, { "docid": "8b1ea090197905fdf27ac69878385478", "score": "0.5341395", "text": "public function makan() // --> di sebut Method bukan di sebut function\n {\n return 'makan';\n }", "title": "" }, { "docid": "2777c52a22cf499ea71e6275c60ce28d", "score": "0.5340973", "text": "Private function choix(){\n\n $variable = $this->var_xml_petitchild;\n if($variable['egal'] == $this->var_valeur[strval($variable['variable'])])\n {\n \n foreach($variable as $child)\n {\n $this->var_xml_petitchild = $child;\n $vignette .= $this->{$child->getName()}();\n\n }\n\n return $vignette;\n }\n else\n {\n return ;\n }\n }", "title": "" }, { "docid": "6bcd916791d708bd77b53002d3046c17", "score": "0.5340628", "text": "static protected function readStructure(){\n // => static::$pk_name;\n }", "title": "" }, { "docid": "805cc7148d8290b1e2645069e6bb8c05", "score": "0.53360844", "text": "function get_kode_ta($nim)\n\t\t{\n\t\t\t$CI =& get_instance();\n\t\t\t$data = $CI->s00_lib_api->get_api_json(\n\t\t\t\t\tURL_API_SIA.'/sia_mahasiswa/data_search',\n\t\t\t\t\t'POST',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'api_kode'\t\t=> 30000,\n\t\t\t\t\t\t'api_subkode'\t=> 2,\n\t\t\t\t\t\t'api_search'\t=> array($nim)\n\t\t\t\t\t)\n\t\t\t);\n\n\t\t\treturn $data;\n\t\t}", "title": "" }, { "docid": "a3faff7d382cf56391a9a29086b0e248", "score": "0.533589", "text": "public function penilaianberproses() {\n $this->data['data_angkatan_aktif2'] = $this->siswa_m->get_data_angkatan_aktif_guru2();\n $this->data['data_angkatan_tidakaktif2'] = $this->siswa_m->get_data_angkatan_guru2();\n //Load Data View Penilaian Akhir\n $this->data['subview'] = 'guru/rekapnilai/penilaianberproses';\n $this->load->view('guru/admindesain', $this->data);\n \n }", "title": "" }, { "docid": "cec8a52303baa1704116dce3fde1d5d7", "score": "0.5334518", "text": "public function detail_insiden_keamanan_open_hari_ini(){\n if (!empty($this->input->get('id'))) {\n $data['cek_tiket_insiden_keamanan_open'] = $this->Beranda_model->tampil_detail_insiden_keamanan_open_hari_ini($this->input->get('id'));\n helper_log(\"baca\", \"melihat detail Insiden Keamanan Informasi Open Hari InI\");\n $this->load->view('v_detail_tiket_insiden_keamanan_hari_ini/v_detail_open',$data);\n }else{\n helper_log(\"baca\", \"melihat detail Insiden Keamanan Informasi Open Hari InI\");\n \techo \"<center><label style='font-size:20px;'>Data Tidak Tersedia</label></center>\";\n }\n }", "title": "" }, { "docid": "000e9ce7e456754b19d3175ff1b67843", "score": "0.5334096", "text": "function simpan_subKategori()\n {\n $id = $this->autoSubKategori();\n $data = array('kd_sub' => $id, 'nama' => $this->input->post('subKategori'), 'kd_kat' => $this->input->post('kd_kat'));\n $simpan = $this->data->simpanSubKat($data);\n if ($simpan == 1) :\n echo json_encode(\"berhasil\");\n else :\n echo json_encode(\"gagal\");\n endif;\n }", "title": "" }, { "docid": "ca9f5692535eec63dae1f618981b4f57", "score": "0.5331919", "text": "function __construct() {\n $this->pathclass = basename(dirname(__FILE__));\n parent::__construct();\n $this->title =\"Konsep Produk Baru\";\n \n }", "title": "" }, { "docid": "7af9226592db990d32d62fc0fc4d0caa", "score": "0.5331849", "text": "protected function fijarTabla(){\n \n return \"cons_entradas_anonimos\";\n \n }", "title": "" }, { "docid": "80d461d4af35eeba76e192438e6e3426", "score": "0.53308463", "text": "public function knjiga(){\n $data = [];\n $data['jela'] = $this->Korisnik->knjiga($this->session->userdata('korisnik')->idK);\n $this->prikazi(\"book-2-column.php\",$data);\n }", "title": "" }, { "docid": "aa6a65000f269e70d04c735003a8baf9", "score": "0.53238046", "text": "function get_auto_edit_hovaten(){\n\t//print_r($term);\n\t//$name =\"TenMayIn,TenReport\";\n\t$params = array();//tao param cho store\n\t $tam=connect_data(\"GD2_hovatennv_get\",\"()\",$params);\n\t $i=0;\n\tforeach ($tam as $v) {//duyet toan bo mang tra ve\n\t\tif(trim($v[1])!=\"\"){\n\t\t\tif($i!=count($tam)-1){\n\t\t\t\t$phancach=\";\";\n\t\t\t}else{\n\t\t\t\t$phancach=\"\";\n\t\t\t}\n\t\t\techo $v[0].\":\".$v[1].$phancach;\n\t\t\t$i++;\n\t\t}\n\t}\n\n}", "title": "" }, { "docid": "baac06b941b4a1e169ba1b0d47eb39b7", "score": "0.531654", "text": "abstract public function getInfoProduk();", "title": "" }, { "docid": "058a325cc65f927a4561b21f0f704936", "score": "0.53148645", "text": "public function simpan()\n\t{\n\t\t// app::debug($this->input->post());\n\n\t\t$org = explode(',', $this->input->post('inp_desa'));\n\t\t$keg = explode(',', $this->input->post('inp_keg'));\n\t\t// $org = app::arrkode($this->input->post('inp_desa'),',');\n\t\t// $keg = app::arrkode($this->input->post('inp_keg'),',');\n\n\t\t$data = array(\n\t\t\t// 'KODEURUSAN' => $this->session->kd_urusan, // berdasarkan sing login\n\t\t\t// 'KODESUBURUSAN' => $this->session->kd_suburusan, // berdasarkan sing login\n\t\t\t// 'KODEORGANISASI' => $this->input->post('inp_kec'),\n\t\t\t// 'KODEDESA' => $this->input->post('inp_desa'),\n\t\t\t'KODEURUSAN' => $org[0],\n\t\t\t'KODESUBURUSAN' => $org[1],\n\t\t\t'KODEORGANISASI' => lzero($org[2]), // harus 0n\n\t\t\t'KODEDESA' => lzero($org[3]), // harus 0n\n\t\t\t'KODEBIDANG' => (int)$keg[0], // harus int\n\t\t\t'KODEPROGRAM' => $keg[1],\n\t\t\t'KODEKEGIATAN' => $keg[2],\n\t\t\t\"USER_NAME\" => $this->session->username, // berdasarkan sing login\n\t\t\t\"USER_ID\" => $this->session->kd_user // berdasarkan sing login\n\t\t);\n\t\t// app::debug($data);\n\n\t\t$insert = $this->m_spp->store($this->input->post(), $data);\n\t\tif ($insert) redirect('spp/daftar');\n\t}", "title": "" }, { "docid": "dfe6eb47f4fa6d9dfd9b8d080e9741b7", "score": "0.5310029", "text": "public function Plantilla(){\n\t\trequire \"vistas/vista.php\";\n\t}", "title": "" }, { "docid": "e4d143562df91d30afb835aec5ec053b", "score": "0.53097034", "text": "public function tksvnoitru()\n {\n if (!$this->my_auth->is_CanBo()) {\n redirect(\"canbo/login\");\n }\n $data['cb_id'] = $this->cb_id;\n $data['cb_name'] = $this->cb->tencb;\n $data['task_name'] = \"Tìm kiếm sinh viên nội trú\";\n $data['sub_views'] = \"v_timkiemsvnoitru\";\n $data['ds_quan'] = $this->maddress->htmlQuan(48); //48 = Đà Nẵng\n $data['lopsh'] = $this->mlopsh->dsLopSH();\n $this->load->view('home/main_layout', $data);\n }", "title": "" }, { "docid": "3f0ffb4b0f77c910963ebe69f2a0e645", "score": "0.5305853", "text": "function init_config_nono() {\r\n\r\n\t$liste_meta = array(\r\n\t\t'nono_base_version' => '0.2',\r\n\t\t\r\n\t\t'keywords_nono' => '',\r\n\t\t'copyright_nono' => '',\r\n\t\t'redacteur_nono' => '',\r\n\t\t'directeur_nono' => '',\r\n\t\t\r\n\t\t'nb_evens_nono' => '0',\r\n\t\t'voir_cal_nono' => 'non',\r\n\t\t'voir_une_nono' => 'non',\r\n\t\t'nb_articles_nono' => '3',\r\n\t\t'nb_breves_nono' => '2',\r\n\t\t'nb_sites_nono' => '0',\r\n\t\t'nb_syndic_nono' => '0',\r\n\t\t'nb_messages_nono' => '0',\r\n\r\n\t\t'voir_menu_nono' => 'non',\r\n\t\t'nom_menu1_nono' => '',\r\n\t\t'url_menu1_nono' => '',\r\n\t\t'nom_menu2_nono' => '',\r\n\t\t'url_menu2_nono' => '',\r\n\t\t'nom_menu3_nono' => '',\r\n\t\t'url_menu3_nono' => '',\r\n\t\t'nom_menu4_nono' => '',\r\n\t\t'url_menu4_nono' => '',\r\n\t\t'nom_menu5_nono' => '',\r\n\t\t'url_menu5_nono' => '',\r\n\t\t\r\n\t\t'activer_edito' => 'non',\r\n\t\t'id_edito' => '0',\r\n\t\t'activer_meslogos' => 'non',\r\n\t\t'id_meslogos' => '0'\r\n\t\t);\r\n\twhile (list($nom, $valeur) = each($liste_meta)) {\r\n\t\tif (!$GLOBALS['meta'][$nom]) {\r\n\t\t\tecrire_meta($nom, $valeur);\r\n\t\t\t$modifs = true;\r\n\t\t}\r\n\t}\r\n\r\n\tif ($modifs) ecrire_metas();\r\n}", "title": "" }, { "docid": "fe19daa6f5922ebfb0cd3c6306484d7e", "score": "0.53045875", "text": "function KonfNIM() {\r\n global $_lf, $_maxbaris, $divider, $divider1, $_pmbaktif, $arrID, $_HeaderPrn;\r\n $nmf = HOME_FOLDER . DS . \"tmp/$_SESSION[_Login].dwoprn\";\r\n // Header\r\n $f = fopen($nmf, 'w');\r\n fwrite($f, $_HeaderPrn);\r\n $header = str_pad($arrID['Nama'], 79, ' ', STR_PAD_BOTH).$_lf;\r\n $header .= str_pad(\"Konfirmasi NIM Gelombang $_pmbaktif\", 79, ' ', STR_PAD_BOTH).$_lf.$divider;\r\n $header .= str_pad(\"Program Studi\", 38).\r\n str_pad(\"Sblmnya\", 12, ' ', STR_PAD_LEFT).\r\n str_pad($_SESSION['pmbaktif'], 12, ' ', STR_PAD_LEFT). \r\n str_pad(\"Total\", 15, ' ', STR_PAD_LEFT).\r\n $_lf . $divider1;\r\n fwrite($f, $header);\r\n $mrg = str_pad(' ', 3, ' ');\r\n \r\n // Buat array program studi\r\n $s = \"select prd.ProdiID, prd.Nama as PRD, fak.FakultasID, fak.Nama as FAK\r\n from prodi prd\r\n left outer join fakultas fak on prd.FakultasID=fak.FakultasID\r\n order by prd.FakultasID, prd.ProdiID\";\r\n $r = _query($s);\r\n $arrPrd = array();\r\n $_fak = '';\r\n // apakah ada periode sebelumnya?\r\n $thn = substr($_SESSION['pmbaktif'], 0, 4)+0;\r\n $ssa = substr($_SESSION['pmbaktif'], 4, 1)+0;\r\n $JmlSblm = 0; $TotSblm = 0;\r\n $JmlSkrg = 0; $TotSkrg = 0;\r\n $jml = 0; $tot = 0;\r\n while ($w = _fetch_array($r)) {\r\n if ($_fak != $w['FakultasID']) {\r\n if (!empty($_fak)) fwrite($f, $_lf);\r\n $_fak = $w['FakultasID'];\r\n fwrite($f, $w['FakultasID']. '. ' . $w['FAK'].$_lf);\r\n }\r\n fwrite($f, $mrg . str_pad($w['ProdiID'] . '. '.$w['PRD'], 35, ' '));\r\n // hitung periode sebelumnya\r\n if ($ssa > 1) {\r\n $jml0 = GetaField('pmb', \"PMBPeriodID like '$thn%' and PMBPeriodID<'$_SESSION[pmbaktif]' and NIM<>'' and ProdiID\",\r\n $w['ProdiID'], \"count(*)\")+0;\r\n $tot0 = GetaField('pmb', \"PMBPeriodID like '$thn%' and PMBPeriodID<'$_SESSION[pmbaktif]' and ProdiID\",\r\n $w['ProdiID'], \"count(*)\")+0;\r\n $JmlSkrg += $jml0;\r\n $TotSkrg += $tot0;\r\n fwrite($f, str_pad($jml0.'/'.$tot0, 12, ' ', STR_PAD_LEFT));\r\n } else fwrite($f, str_pad(' ', 12, ' '));\r\n \r\n // hitung periode ini\r\n $jml1 = GetaField('pmb', \"PMBPeriodID='$_SESSION[pmbaktif]' and NIM<>'' and ProdiID\",\r\n $w['ProdiID'], \"count(*)\")+0;\r\n $tot1 = GetaField('pmb', \"PMBPeriodID='$_SESSION[pmbaktif]' and ProdiID\",\r\n $w['ProdiID'], \"count(*)\")+0;\r\n fwrite($f, str_pad($jml1.'/'.$tot1, 12, ' ', STR_PAD_LEFT));\r\n $JmlSkrg += $jml1;\r\n $TotSkrg += $tot1;\r\n // hitung total kanan\r\n $jmlx = $jml0 + $jml1;\r\n $jml += $jmlx;\r\n $totx = $tot0 + $tot1;\r\n $tot += $totx;\r\n fwrite($f, str_pad($jmlx.'/'.$totx, 15, ' ', STR_PAD_LEFT));\r\n fwrite($f, $_lf);\r\n }\r\n fwrite($f, $divider);\r\n // Hitung Total\r\n fwrite($f, str_pad(\"Total: \", 38, ' ', STR_PAD_LEFT).\r\n str_pad($JmlSblm.'/'.$TotSblm, 12, ' ', STR_PAD_LEFT).\r\n str_pad($JmlSkrg.'/'.$TotSkrg, 12, ' ', STR_PAD_LEFT).\r\n str_pad($jml.'/'.$tot, 15, ' ', STR_PAD_LEFT).\r\n $_lf);\r\n fclose($f);\r\n TampilkanFileDWOPRN($nmf, 'pmblap');\r\n}", "title": "" }, { "docid": "9de80ef325b3b1da04c9f6032a83d642", "score": "0.53043854", "text": "function tambahkategori()\n\t{\n\t\t$this->template->load('adminweb/media','adminweb/mod_kategori/tambah_kategori');\n\t}", "title": "" }, { "docid": "6dfaf4b450520d7bf9c2c6fe3c05579f", "score": "0.53036875", "text": "public function pilih_dokter() {\n $data['listDokter'] = $this->jadwal_dokter_model->ambil_dokter($this->uri->segment(3));\n $this->load->view('v_drop_down_dokter',$data);\n }", "title": "" }, { "docid": "a260e0bcdeb8027d88f02ecb8dcef1be", "score": "0.5300738", "text": "function pegaSistemasI()\n\t{\n\t\terror_reporting(0);\n\t\tinclude_once($this->locaplic.\"/admin/php/xml.php\");\n\n\t\t$xmlsistemas = simplexml_load_string(geraXmlIdentifica(implode(\" \",$this->perfil),$this->locaplic));\n\t\t$sistemas = array();\n\t\tforeach($xmlsistemas->FUNCAO as $s)\n\t\t{\n\t\t\t$publicado = $this->ixml($s,\"PUBLICADO\");\n\t\t\tif(strtolower($publicado) != \"nao\" || $this->editor)\n\t\t\t{\n\t\t\t\t$nomesis = $this->ixml($s,\"NOMESIS\");\n\t\t\t\t$ps = $this->ixml($s,\"PERFIL\");\n\t\t\t\t$perfis = str_replace(\",\",\" \",$ps);\n\t\t\t\t$perfis = explode(\" \",$perfis);\n\t\t\t\tif (($this->array_in_array($this->perfil,$perfis)) || ($ps == \"\"))\n\t\t\t\t{\n\t\t\t\t\t$sistemas[] = array(\"PUBLICADO\"=>$publicado,\"NOME\"=>$nomesis,\"TARGET\"=>($this->ixml($s,\"TARGET\")),\"ABRIR\"=>($this->ixml($s,\"ABRIR\")));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $sistemas;\n\t}", "title": "" }, { "docid": "0601f757cf6fafcfa54783f23325869b", "score": "0.5296631", "text": "public function getKodPocztowy()\n {\n return $this->kodPocztowy;\n }", "title": "" }, { "docid": "23a370ec12e4d3f49815e83dba1186ee", "score": "0.52916557", "text": "public function cekBentrokEdit4($nim, $dosen1, $dosen2, $ketuaPenguji, $sekretarisPenguji, $anggotaPenguji, $ruang, $tanggal, $durasi) {\n $detail = NULL;\n $dataRuang = $this->Pendadaran_model->cekStatusRuangEdit($tanggal, $durasi);\n $dataRuang2 = $this->Pendadaran_model->cekStatusRuangEdit2($tanggal, $durasi, $ruang);\n $dataKolokium = $this->Kolokium_model->cekStatusRuangEdit($tanggal, $durasi);\n\n $detailBentrok = \"Ada bentrok jadwal pendadaran Mahasiswa\";\n $detailBentrok2 = \"Ada bentrok jadwal Kolokium Mahasiswa\";\n $durasiCut = '';\n $durasiCut2 = substr($durasi, 0, 2);\n $durasiCut3 = '';\n $durasiInt = 0;\n $durasiInt2 = (int) $durasiCut2;\n $durasiInt3 = 0;\n $dataKolokium2 = $this->Kolokium_model->cekStatusRuangEdit3($tanggal, $ruang);\n foreach ($dataRuang as $dr) {\n $durasiCut = substr($dr['durasi'], 0, 2);\n $durasiInt = (int) $durasiCut;\n if ($dr['nim'] == $nim) {\n if ($dr['tanggal'] == $tanggal && $dr['durasi'] == $durasi) {\n if ($dataRuang2 != NULL) {\n foreach ($dataRuang2 as $dr2) {\n $detailBentrok = $detailBentrok = $detailBentrok . \" bentrok dengan NIM =\" . $dr2['nim'] . \" dosbing1 = \" . $dr2['dosen1'] . \" dosbing2 = \" . $dr2['dosen2'] . \" Ketua Penguji = \"\n . $dr2['ketuaPenguji'] . \" Sekrterais Penguji = \" . $dr2['sekretarisPenguji'] . \" Anggota Penguji = \" . $dr2['anggotaPenguji'] . \" pada tanggal \" . $dr2['tanggal'] . \" Jam = \" . $dr2['durasi'] . \" ruang = \" . $dr2['ruang'] . \"\";\n $detail = $detailBentrok;\n $detail = $detailBentrok;\n }\n\n return $detail;\n }\n }\n } elseif ($dr['dosen1'] == $dosen1 || $dr['dosen1'] == $dosen2 || $dr['dosen1'] == $ketuaPenguji || $dr['dosen1'] == $sekretarisPenguji || $dr['dosen1'] == $anggotaPenguji ||\n $dr['dosen2'] == $dosen1 || $dr['dosen2'] == $dosen2 || $dr['dosen2'] == $ketuaPenguji || $dr['dosen2'] == $sekretarisPenguji || $dr['dosen2'] == $anggotaPenguji ||\n $dr['ketuaPenguji'] == $dosen1 || $dr['ketuaPenguji'] == $dosen2 || $dr['ketuaPenguji'] == $ketuaPenguji || $dr['ketuaPenguji'] == $sekretarisPenguji || $dr['ketuaPenguji'] == $anggotaPenguji ||\n $dr['sekretarisPenguji'] == $dosen1 || $dr['sekretarisPenguji'] == $dosen2 || $dr['sekretarisPenguji'] == $ketuaPenguji || $dr['sekretarisPenguji'] == $sekretarisPenguji || $dr['sekretarisPenguji'] == $anggotaPenguji ||\n $dr['anggotaPenguji'] == $dosen1 || $dr['anggotaPenguji'] == $dosen2 || $dr['anggotaPenguji'] == $ketuaPenguji || $dr['anggotaPenguji'] == $sekretarisPenguji || $dr['anggotaPenguji'] == $anggotaPenguji) {\n if ($dr['tanggal'] == $tanggal) {\n if ($dr['ruang'] == $ruang) {\n if ($durasiInt == $durasiInt2 || $durasiInt - 1 == $durasiInt2 || $durasiInt + 1 == $durasiInt2) {\n $detailBentrok = $detailBentrok . \" karena \" . $dr['ruang'] . \" dipakai oleh NIM =\" . $dr['nim'] . \" dosbing1 = \" . $dr['dosen1'] . \" dosbing2 = \" . $dr['dosen2'] . \" Ketua Penguji = \"\n . $dr['ketuaPenguji'] . \" Sekrterais Penguji = \" . $dr['sekretarisPenguji'] . \" Anggota Penguji = \" . $dr['anggotaPenguji'] . \" pada tanggal \" . $dr['tanggal'] . \" Jam = \" . $dr['durasi'] . \"\";\n $detail = $detailBentrok;\n }\n } else {\n if ($durasiInt == $durasiInt2 || $durasiInt - 1 == $durasiInt2 || $durasiInt + 1 == $durasiInt2) {\n $detailBentrok = $detailBentrok . \" bentrok dengan NIM =\" . $dr['nim'] . \" dosbing1 = \" . $dr['dosen1'] . \" dosbing2 = \" . $dr['dosen2'] . \" Ketua Penguji = \"\n . $dr['ketuaPenguji'] . \" Sekrterais Penguji = \" . $dr['sekretarisPenguji'] . \" Anggota Penguji = \" . $dr['anggotaPenguji'] . \" pada tanggal \" . $dr['tanggal'] . \" Jam = \" . $dr['durasi'] . \" ruang = \" . $dr['ruang'] . \"\";\n $detail = $detailBentrok;\n }\n }\n }\n } else {\n if ($dr['tanggal'] == $tanggal) {\n if ($dr['ruang'] == $ruang) {\n if ($durasiInt == $durasiInt2 || $durasiInt - 1 == $durasiInt2 || $durasiInt + 1 == $durasiInt2) {\n $detailBentrok = $detailBentrok . \" karena \" . $dr['ruang'] . \" dipakai oleh NIM =\" . $dr['nim'] . \" dosbing1 = \" . $dr['dosen1'] . \" dosbing2 = \" . $dr['dosen2'] . \" Ketua Penguji = \"\n . $dr['ketuaPenguji'] . \" Sekrterais Penguji = \" . $dr['sekretarisPenguji'] . \" Anggota Penguji = \" . $dr['anggotaPenguji'] . \" pada tanggal \" . $dr['tanggal'] . \" Jam = \" . $dr['durasi'] . \"\";\n $detail = $detailBentrok;\n }\n }\n }\n }\n }\n foreach ($dataKolokium as $dk) {\n $durasiCut3 = substr($dk['durasi'], 0, 2);\n $durasiInt3 = (int) $durasiCut3;\n if ($dk['tanggal'] == $tanggal) {\n if ($durasiInt3 == $durasiInt2 || $durasiInt3 + 1 == $durasiInt2 || $durasiInt3 - 1 == $durasiInt2) {\n if ($dataKolokium2 != null) {\n foreach ($dataKolokium2 as $dk2) {\n $durasiKolokiumCut = substr($dk2['durasi'], 0, 2);\n $durasiKolokiumInt = (int) $durasiKolokiumCut;\n if ($durasiKolokiumInt == $durasiInt2 || $durasiKolokiumInt + 1 == $durasiInt2 || $durasiKolokiumInt - 1 == $durasiInt2) {\n $detailBentrok2 = $detailBentrok2 . \" dengan mahasiswa NIM \" . $dk2['nim'] . \" dosbing 1 =\" . $dk2['dosen1'] .\n \" dosbing 2 =\" . $dk2['dosen2'] . \" reviewer = \" . $dk2['reviewer'] . \" tanggal = \" . $dk2['tanggal'] . \" Jam = \" . $dk2['durasi'] . \"\";\n $detail = $detailBentrok2;\n }\n }\n }\n }\n } elseif ($dk['dosen1'] == $dosen1 || $dk['dosen1'] == $dosen2 || $dk['dosen1'] == $ketuaPenguji || $dk['dosen1'] == $sekretarisPenguji || $dk['dosen1'] == $anggotaPenguji ||\n $dk['dosen2'] == $dosen1 || $dk['dosen2'] == $dosen2 || $dk['dosen2'] == $ketuaPenguji || $dk['dosen2'] == $sekretarisPenguji || $dk['dosen2'] == $anggotaPenguji ||\n $dk['reviewer'] == $dosen1 || $dk['reviewer'] == $dosen2 || $dk['reviewer'] == $ketuaPenguji || $dk['reviewer'] == $sekretarisPenguji || $dk['reviewer'] == $anggotaPenguji) {\n if ($dk['tanggal'] == $tanggal) {\n if ($dk['ruang'] == $ruang) {\n if ($durasiInt3 == $durasiInt2 || $durasiInt3 - 1 == $durasiInt2 || $durasiInt3 + 1 == $durasiInt2) {\n $detailBentrok2 = $detailBentrok2 . \" karena \" . $dk['ruang'] . \" dipakai oleh NIM \" . $dk['nim'] . \" dosbing 1 = \" . $dk['dosen1'] . \" reviewer = \"\n . $dk['reviewer'] . \" pada tanggal \" . $dk['tanggal'] . \" Jam = \" . $dk['durasi'] . \"\";\n $detail = $detailBentrok2;\n }\n } else {\n if ($durasiInt3 == $durasiInt2 || $durasiInt3 - 1 == $durasiInt2 || $durasiInt3 + 1 == $durasiInt2) {\n $detailBentrok2 = $detailBentrok2 . \" dengan NIM \" . $dk['nim'] . \" dosbing 1 = \" . $dk['dosen1'] . \" reviewer = \"\n . $dk['reviewer'] . \" pada tanggal \" . $dk['tanggal'] . \" Jam = \" . $dk['durasi'] . \" di ruang \" . $dk['ruang'] . \"\";\n $detail = $detailBentrok2;\n }\n }\n }\n } else {\n if ($dk['tanggal'] == $tanggal) {\n if ($dk['ruang'] == $ruang) {\n if ($durasiInt3 == $durasiInt2 || $durasiInt3 - 1 == $durasiInt2 || $durasiInt3 + 1 == $durasiInt2) {\n $detailBentrok2 = $detailBentrok2 . \" karena \" . $dk['ruang'] . \" dipakai oleh NIM \" . $dk['nim'] . \" dosbing 1 = \" . $dk['dosen1'] . \" reviewer = \"\n . $dk['reviewer'] . \" pada tanggal \" . $dk['tanggal'] . \" Jam = \" . $dk['durasi'] . \"\";\n $detail = $detailBentrok2;\n }\n }\n }\n }\n }\n return $detail;\n }", "title": "" }, { "docid": "43673f44689e2a349612d4b4301bb997", "score": "0.5291083", "text": "function vypisDetail(Predepsano $obrazec)\n{\n echo '<h3>' . get_class($obrazec) . '</h3>';\n echo 'Počet stran: '. $obrazec->ziskejPocetStran(). '<br>';\n echo 'Obvod: '. $obrazec->ziskejObvod().'<br><br>';\n}", "title": "" }, { "docid": "4176c895ad9b3350423863dc6603dd80", "score": "0.5287752", "text": "public function actionPedirkit() {\n echo \"fomulario de pedir kit\";\n }", "title": "" }, { "docid": "a92014e7d2079ec1ff3ef9698dc126a0", "score": "0.5283426", "text": "public function detail_insiden_open_hari_ini(){\n if (!empty($this->input->get('id'))) {\n $data['cek_tiket_insiden_open'] = $this->Beranda_model->tampil_detail_insiden_open_hari_ini($this->input->get('id'));\n helper_log(\"baca\", \"melihat detail Insiden Open Hari InI\");\n $this->load->view('v_detail_tiket_insiden_hari_ini/v_detail_open',$data);\n }else{\n helper_log(\"baca\", \"melihat detail Insiden Open Hari InI\");\n echo \"<center><label style='font-size:20px;'>Data Tidak Tersedia</label></center>\";\n }\n }", "title": "" }, { "docid": "350cf88f8e929beee77c6e9211d7507e", "score": "0.5278053", "text": "public function cekBentrokEdit2($nim, $dosen1, $ketuaPenguji, $sekretarisPenguji, $ruang, $tanggal, $durasi) {\n $detail = NULL;\n $dataRuang = $this->Pendadaran_model->cekStatusRuangEdit($tanggal, $durasi);\n $dataRuang2 = $this->Pendadaran_model->cekStatusRuangEdit2($tanggal, $durasi, $ruang);\n $dataKolokium = $this->Kolokium_model->cekStatusRuangEdit($tanggal, $durasi);\n\n $detailBentrok = \"Ada bentrok jadwal pendadaran Mahasiswa\";\n $detailBentrok2 = \"Ada bentrok jadwal Kolokium Mahasiswa\";\n $durasiCut = '';\n $durasiCut2 = substr($durasi, 0, 2);\n $durasiCut3 = '';\n $durasiInt = 0;\n $durasiInt2 = (int) $durasiCut2;\n $durasiInt3 = 0;\n $dataKolokium2 = $this->Kolokium_model->cekStatusRuangEdit3($tanggal, $ruang);\n foreach ($dataRuang as $dr) {\n $durasiCut = substr($dr['durasi'], 0, 2);\n $durasiInt = (int) $durasiCut;\n if ($dr['nim'] == $nim) {\n if ($dr['tanggal'] == $tanggal && $durasiInt == $durasiInt2) {\n if ($dataRuang2 != NULL) {\n foreach ($dataRuang2 as $dr2) {\n $detailBentrok = $detailBentrok = $detailBentrok . \" bentrok dengan NIM =\" . $dr2['nim'] . \" dosbing1 = \" . $dr2['dosen1'] . \" dosbing2 = \" . $dr2['dosen2'] . \" Ketua Penguji = \"\n . $dr2['ketuaPenguji'] . \" Sekrterais Penguji = \" . $dr2['sekretarisPenguji'] . \" Anggota Penguji = \" . $dr2['anggotaPenguji'] . \" pada tanggal \" . $dr2['tanggal'] . \" Jam = \" . $dr2['durasi'] . \" ruang = \" . $dr2['ruang'] . \"\";\n $detail = $detailBentrok;\n $detail = $detailBentrok;\n }\n return $detail;\n }\n }\n } elseif ($dr['dosen1'] == $dosen1 || $dr['dosen1'] == $ketuaPenguji || $dr['dosen1'] == $sekretarisPenguji ||\n $dr['ketuaPenguji'] == $dosen1 || $dr['ketuaPenguji'] == $ketuaPenguji || $dr['ketuaPenguji'] == $sekretarisPenguji ||\n $dr['sekretarisPenguji'] == $dosen1 || $dr['sekretarisPenguji'] == $ketuaPenguji || $dr['sekretarisPenguji'] == $sekretarisPenguji) {\n if ($dr['tanggal'] == $tanggal) {\n if ($dr['ruang'] == $ruang) {\n if ($durasiInt == $durasiInt2 || $durasiInt - 1 == $durasiInt2 || $durasiInt + 1 == $durasiInt2) {\n $detailBentrok = $detailBentrok . \" karena \" . $dr['ruang'] . \" dipakai oleh NIM =\" . $dr['nim'] . \" dosbing1 = \" . $dr['dosen1'] . \" Ketua Penguji = \"\n . $dr['ketuaPenguji'] . \" Sekrterais Penguji = \" . $dr['sekretarisPenguji'] . \" pada tanggal \" . $dr['tanggal'] . \" Jam = \" . $dr['durasi'] . \"\";\n $detail = $detailBentrok;\n }\n } else {\n if ($durasiInt == $durasiInt2 || $durasiInt - 1 == $durasiInt2 || $durasiInt + 1 == $durasiInt2) {\n $detailBentrok = $detailBentrok . \" dengan NIM =\" . $dr['nim'] . \" dosbing1 = \" . $dr['dosen1'] . \" Ketua Penguji = \"\n . $dr['ketuaPenguji'] . \" Sekrterais Penguji = \" . $dr['sekretarisPenguji'] . \" pada tanggal \" . $dr['tanggal'] . \" Jam = \" . $dr['durasi'] . \" di ruang \" . $dr['ruang'] . \"\";\n $detail = $detailBentrok;\n }\n }\n }\n } else {\n if ($dr['tanggal'] == $tanggal) {\n if ($dr['ruang'] == $ruang) {\n if ($durasiInt == $durasiInt2 || $durasiInt - 1 == $durasiInt2 || $durasiInt + 1 == $durasiInt2) {\n $detailBentrok = $detailBentrok . \" karena \" . $dr['ruang'] . \" dipakai oleh NIM =\" . $dr['nim'] . \" dosbing1 = \" . $dr['dosen1'] . \" Ketua Penguji = \"\n . $dr['ketuaPenguji'] . \" Sekrterais Penguji = \" . $dr['sekretarisPenguji'] . \" pada tanggal \" . $dr['tanggal'] . \" Jam = \" . $dr['durasi'] . \"\";\n $detail = $detailBentrok;\n }\n }\n }\n }\n }\n\n foreach ($dataKolokium as $dk) {\n $durasiCut3 = substr($dk['durasi'], 0, 2);\n $durasiInt3 = (int) $durasiCut3;\n if ($dk['tanggal'] == $tanggal) {\n if ($durasiInt3 == $durasiInt2 || $durasiInt3 + 1 == $durasiInt2 || $durasiInt3 - 1 == $durasiInt2) {\n if ($dataKolokium2 != null) {\n foreach ($dataKolokium2 as $dk2) {\n $durasiKolokiumCut = substr($dk2['durasi'], 0, 2);\n $durasiKolokiumInt = (int) $durasiKolokiumCut;\n if ($durasiKolokiumInt == $durasiInt2 || $durasiKolokiumInt + 1 == $durasiInt2 || $durasiKolokiumInt - 1 == $durasiInt2) {\n $detailBentrok2 = $detailBentrok2 . \" dengan mahasiswa NIM \" . $dk2['nim'] . \" dosbing 1 =\" . $dk2['dosen1'] .\n \" dosbing 2 =\" . $dk2['dosen2'] . \" reviewer = \" . $dk2['reviewer'] . \" tanggal = \" . $dk2['tanggal'] . \" Jam = \" . $dk2['durasi'] . \"\";\n $detail = $detailBentrok2;\n }\n }\n }\n }\n } elseif ($dk['dosen1'] == $dosen1 || $dk['dosen1'] == $ketuaPenguji || $dk['dosen1'] == $sekretarisPenguji ||\n $dk['dosen2'] == $dosen1 || $dk['dosen2'] == $ketuaPenguji || $dk['dosen2'] == $sekretarisPenguji ||\n $dk['reviewer'] == $dosen1 || $dk['reviewer'] == $ketuaPenguji || $dk['reviewer'] == $sekretarisPenguji) {\n if ($dk['tanggal'] == $tanggal) {\n if ($dk['ruang'] == $ruang) {\n if ($durasiInt3 == $durasiInt2 || $durasiInt3 - 1 == $durasiInt2 || $durasiInt3 + 1 == $durasiInt2) {\n $detailBentrok2 = $detailBentrok2 . \" karena \" . $dk['ruang'] . \" dipakai oleh NIM \" . $dk['nim'] . \" dosbing 1 = \" . $dk['dosen1'] . \" reviewer = \"\n . $dk['reviewer'] . \" pada tanggal \" . $dk['tanggal'] . \" Jam = \" . $dk['durasi'] . \"\";\n $detail = $detailBentrok2;\n }\n } else {\n if ($durasiInt3 == $durasiInt2 || $durasiInt3 - 1 == $durasiInt2 || $durasiInt3 + 1 == $durasiInt2) {\n $detailBentrok2 = $detailBentrok2 . \" dengan NIM \" . $dk['nim'] . \" dosbing 1 = \" . $dk['dosen1'] . \" reviewer = \"\n . $dk['reviewer'] . \" pada tanggal \" . $dk['tanggal'] . \" Jam = \" . $dk['durasi'] . \" di ruang \" . $dk['ruang'] . \"\";\n $detail = $detailBentrok2;\n }\n }\n }\n } else {\n if ($dk['tanggal'] == $tanggal) {\n if ($dk['ruang'] == $ruang) {\n if ($durasiInt3 == $durasiInt2 || $durasiInt3 - 1 == $durasiInt2 || $durasiInt3 + 1 == $durasiInt2) {\n $detailBentrok2 = $detailBentrok2 . \" karena \" . $dk['ruang'] . \" dipakai oleh NIM \" . $dk['nim'] . \" dosbing 1 = \" . $dk['dosen1'] . \" reviewer = \"\n . $dk['reviewer'] . \" pada tanggal \" . $dk['tanggal'] . \" Jam = \" . $dk['durasi'] . \"\";\n $detail = $detailBentrok2;\n }\n }\n }\n }\n }\n return $detail;\n }", "title": "" } ]
7b81c1861058eaf335b3a13514eebaf6
Enables a native PHP function to be run, using a platform agnostic wrapper.
[ { "docid": "0178eaba7cc518ad3d3c2cd1c5a82f4b", "score": "0.4652748", "text": "function call_function($function)\n\t{\n\t\t$driver = ($this->dbdriver == 'postgre') ? 'pg_' : $this->dbdriver.'_';\n\t\n\t\tif (FALSE === strpos($driver, $function))\n\t\t{\n\t\t\t$function = $driver.$function;\n\t\t}\n\t\t\n\t\tif ( ! function_exists($function))\n\t\t{\n\t\t\tif ($this->db_debug)\n\t\t\t{\n\t\t\t\treturn $this->display_error('db_unsupported_function');\n\t\t\t}\n\t\t\treturn FALSE;\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$args = (func_num_args() > 1) ? array_splice(func_get_args(), 1) : null;\n\n\t\t\treturn call_user_func_array($function, $args);\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "d655c2d3be89cfb2e7d9e9ef137755c2", "score": "0.5557934", "text": "public function registerPhpFunctions($restrict = null) {}", "title": "" }, { "docid": "b8be0fd227a9a2ae9430a9280671ba78", "score": "0.5439888", "text": "function _call_fast_func ($f_name) {\n\t// Currently admin is allowed to call only dynamic->php_func\n\tif (MAIN_TYPE_ADMIN && !in_array($f_name, array('php_func'))) {\n\t\treturn false;\n\t}\n\t$f_name = '_fast_'.$f_name;\n\t$fwork_fast_path = YF_PATH.'share/fast_init/';\n\t$path = $fwork_fast_path.'func_'.$f_name.'.php';\n\t$func = include ($path);\n\treturn is_callable($func) ? $func() : $func;\n}", "title": "" }, { "docid": "e26cef1674b95b1446a05cbb343c5033", "score": "0.53645253", "text": "public function registerPHPFunctions ($restrict = null) {}", "title": "" }, { "docid": "e26cef1674b95b1446a05cbb343c5033", "score": "0.53645253", "text": "public function registerPHPFunctions ($restrict = null) {}", "title": "" }, { "docid": "316251113127b5b7baa6e3f8ca3c1bbc", "score": "0.5254605", "text": "function disableNativeExtension()\n\t{\n\t\t$GLOBALS['amfphp']['native'] = false;\n\t}", "title": "" }, { "docid": "ffa979a132c5f67ca3052a8ce41dbb9c", "score": "0.5168603", "text": "function setRegisterPHPFunctions($flag) {\n\t\t$this->registerPHPFunctions = $flag;\n\t}", "title": "" }, { "docid": "056fad24e98b578e2d06a4029c725acd", "score": "0.5146359", "text": "function my_own_php_function() {\n echo \"on my_own_php_function\";\n}", "title": "" }, { "docid": "b7578f74dbebbb660ad5f5d9c3937f82", "score": "0.5135052", "text": "function tryphp(){\n echo \"This is function\";\n }", "title": "" }, { "docid": "5ad40972a708048ca352398d59f5a8fc", "score": "0.5044451", "text": "public function enable();", "title": "" }, { "docid": "56ef6018050bee2d008e2b94b8a406fd", "score": "0.5043888", "text": "private function allowNative($val) {\r\n\t\tif ($val != null) {\r\n\t\t\t$this->_except(\"Directive \\\"\" . $this->key . \"\\\" does not accept an argument\");\r\n\t\t}\r\n\t\t\r\n\t\t$execution_point = $this->precondition();\r\n\t\t$this->precondition(true);\r\n\t\t$unparsed = $this->caller->_code();\r\n\t\t\r\n\t\tinclude_once('Loader.php');\r\n\t\t$loader = new Loader();\r\n\t\t\r\n\t\t$parsed = $loader->loadSource($unparsed, \"TEST-TEST-TEST\");\r\n\t\t$parsed = $parser->parseSource($unparsed);\r\n\t\t$executed = $parsed->assemble();\r\n\t\t$this->caller->_code($executed);\r\n\t\t\r\n\t\t$this->precondition($execution_point);\r\n\t}", "title": "" }, { "docid": "7d296f17999efc62b95db29c3684815b", "score": "0.50392854", "text": "function SetupBuiltIn($defaultHost = 'localhost', $defaultPort = '9000')\n{\n if (PHP_SAPI !== 'cli') {\n echo 'Warning: Use this script only with CLI', PHP_EOL;\n exit;\n } elseif (defined('PHP_BINARY') === false) {\n echo 'Warning: versions older than PHP 5.4 don\\'t support \"Built-in web server\", for PHP 5.3.x use Apache or Nginx', PHP_EOL;\n return;\n }\n\n $php = PHP_BINARY;\n $ini = php_ini_loaded_file();\n $windows = strtoupper(substr(PHP_OS, 0, 3)) === 'WIN';\n\n if ($windows) {\n $data = '@echo off\n\n :: Setup PHP and PORT\n set PHP_BIN=\"' . $php . '\"\n set PHP_INI=\"' . $ini . '\"\n set HOST_HOST=' . $defaultHost . '\n set HOST_PORT=' . $defaultPort . '\n\n :: Current path\n set CURRENT_PATH=%~dp0\n set CURRENT_PATH=%CURRENT_PATH:~0,-1%\n\n if not exist %PHP_BIN% (\n echo.\n echo ERROR: %PHP_BIN% not found\n echo.\n ) else if not exist %PHP_INI% (\n echo.\n echo ERROR: %PHP_INI% not found\n echo.\n ) else (\n :: Router path\n set ROUTER=\"%CURRENT_PATH%\\system\\boot\\server.php\"\n\n :: Start built in server\n %PHP_BIN% -S \"%HOST_HOST%:%HOST_PORT%\" -c %PHP_INI% -t \"%CURRENT_PATH%\" %ROUTER%\n )\n\n :: Prevent close if PHP failed to start\n pause';\n } else {\n $data = '#!/bin/bash\n\n # Setup PHP and PORT\n PHP_BIN=\"' . $php . '\"\n PHP_INI=\"' . $ini . '\"\n HOST_HOST=' . $defaultHost . '\n HOST_PORT=' . $defaultPort . '\n\n # Used to restore current dir if using command line\n CURRENT_PATH=$(dirname \"${0}\")\n\n if [ ! -f \"$PHP_BIN\" ]; then\n echo \"ERROR: $PHP_BIN not found\"\n elif [ ! -f \"$PHP_INI\" ]; then\n echo \"ERROR: $PHP_INI not found\"\n else\n # Router path\n ROUTER=\"$CURRENT_PATH/system/boot/server.php\"\n\n # Start built in server\n $PHP_BIN -S \"$HOST_HOST:$HOST_PORT\" -c $PHP_INI -t \"$CURRENT_PATH\" $ROUTER\n fi';\n }\n\n $data = str_replace(\"\\n \", \"\\n\", $data);\n $script = 'server.sh';\n\n if ($windows) {\n $script = 'server.bat';\n $data = str_replace(\"\\n\", \"\\r\\n\", $data);\n }\n\n file_put_contents($script, $data);\n}", "title": "" }, { "docid": "96f95f3466ae126a2716d890f50f9538", "score": "0.5025532", "text": "function __call() {\n echo \"called ------ \";\n}", "title": "" }, { "docid": "ebab7388085df2d371e3571f3ff6209e", "score": "0.5010849", "text": "function exec_method($cmd) {\n\t\n\t$retval = true;\n\n\tif(is_callable('shell_exec') and !in_array('shell_exec',$disabled_funcs)) { \n\t\t$ret_exec=shell_exec($cmd); \n\t} else if (is_callable('passthru') and !in_array('passthru',$disabled_funcs)) { \n\t\tob_start(); passthru($cmd); $ret_exec=ob_get_contents(); ob_end_clean();\n\t} else if (is_callable('exec') and !in_array('exec',$disabled_funcs)) { \n\t\t$ret_exec=array(); exec($cmd,$ret_exec); \n\t} else if (is_callable('system') and !in_array('system',$disabled_funcs)) { \n\t\tob_start(); system($cmd); $ret_exec=ob_get_contents(); ob_end_clean(); \n\t} else if (is_callable('proc_open')and!in_array('proc_open',$disabled_funcs)) { \n\t\t$handle=proc_open($cmd,array(array(pipe,'r'),array(pipe,'w'),array(pipe,'w')),$pipes); $ret_exec=NULL; while(!feof($pipes[1])) { $ret_exec.=fread($pipes[1],1024); } @proc_close($handle); \n\t} else if(is_callable('popen')and!in_array('popen',$disabled_funcs)){ \n\t\t$fp=popen($cmd,'r'); $ret_exec=NULL; \n\t} else {\n\t\t$retval = false;\n\t}\n\n\treturn $retval;\n\n}", "title": "" }, { "docid": "7345eeb4731b641cce16ad203f713989", "score": "0.4987719", "text": "function register_tick_function ($function, $arg = null) {}", "title": "" }, { "docid": "d69de397a3f935a0a47340ecabda4bed", "score": "0.49302676", "text": "function my_custom_function() {\n return \"Hello from my custom function\";\n}", "title": "" }, { "docid": "5a19d59732c5f7581615951171d2128c", "score": "0.49099314", "text": "function exec_enabled()\n\t{\n\t$disabled = explode(', ', ini_get('disable_functions'));\n\treturn !in_array('exec', $disabled);\n\t}", "title": "" }, { "docid": "8406edb2d9cec25d2b9616885a976040", "score": "0.48972753", "text": "function __call($func, $params){\n\t\tforeach($this->extensions as $ext) {\n\t\t\tif(method_exists($ext, $func) && !in_array($func, $this->extensionSkipFunctions)) {\n\t\t\t\tarray_unshift($params, $this);\n\t\t\t\treturn call_user_func_array(array($ext, $func), $params);\n\t\t\t}\n\t\t}\n\t\tthrow new Exception(\"Call to undeclared function, or unknown extension method name'\".$func.\"'\", 1);\n\t}", "title": "" }, { "docid": "b59dced72dab117e78068e056b3ae5d4", "score": "0.48805693", "text": "function praisePHP() {\r\n echo \"PHP is fun!\";\r\n}", "title": "" }, { "docid": "f8d49d03b882d205c0ef3596d7926063", "score": "0.4853604", "text": "function has_function($function)\n{\n if (! function_exists($function)) {\n return false;\n }\n\n try {\n return strpos(ini_get('disable_functions'), $function) === false;\n } catch (Exception $e) {\n return false;\n }\n}", "title": "" }, { "docid": "763fb3b2a5ff571a54b6e7023d46c7fa", "score": "0.484864", "text": "function simpleFunction(){\n echo 'Hello World';\n }", "title": "" }, { "docid": "99af1a0d05a91ae5cc407beddbfc6435", "score": "0.4842415", "text": "public function checkAndEnableCODEServer() {\n\t\t$supportedArchs = array('x86_64', 'aarch64');\n\t\t$osFamily = PHP_VERSION_ID >= 70200 ? PHP_OS_FAMILY : PHP_OS;\n\t\tif ($osFamily !== 'Linux' || !in_array(php_uname('m'), $supportedArchs))\n\t\t\treturn;\n\n\t\t$CODEAppID = (php_uname('m') === 'x86_64') ? 'richdocumentscode' : 'richdocumentscode_arm64';\n\n\t\tif ($this->getContainer()->getServer()->getAppManager()->isEnabledForUser($CODEAppID)) {\n\t\t\t$appConfig = $this->getContainer()->query(AppConfig::class);\n\t\t\t$wopi_url = $appConfig->getAppValue('wopi_url');\n\t\t\t$isCODEEnabled = strpos($wopi_url, 'proxy.php?req=') !== false;\n\n\t\t\t// Check if we have the wopi_url set to custom currently\n\t\t\tif ($wopi_url !== null && $wopi_url !== '' && $isCODEEnabled === false) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$urlGenerator = \\OC::$server->getURLGenerator();\n\t\t\t$relativeUrl = $urlGenerator->linkTo($CODEAppID, '') . 'proxy.php';\n\t\t\t$absoluteUrl = $urlGenerator->getAbsoluteURL($relativeUrl);\n\t\t\t$new_wopi_url = $absoluteUrl . '?req=';\n\n\t\t\t// Check if the wopi url needs to be updated\n\t\t\tif ($isCODEEnabled && $wopi_url === $new_wopi_url) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$appConfig->setAppValue('wopi_url', $new_wopi_url);\n\t\t\t$appConfig->setAppValue('disable_certificate_verification', 'yes');\n\n\t\t\t$discoveryManager = $this->getContainer()->query(DiscoveryManager::class);\n\t\t\t$capabilitiesService = $this->getContainer()->query(CapabilitiesService::class);\n\n\t\t\t$discoveryManager->refetch();\n\t\t\t$capabilitiesService->clear();\n\t\t\t$capabilitiesService->refetch();\n\t\t}\n\t}", "title": "" }, { "docid": "6fe44d2dfa4d9a46860ff480133e2162", "score": "0.48358384", "text": "function basic_setup_func(){\n\techo 'amra hook banabo';\n}", "title": "" }, { "docid": "bd56e363adc29aee5ca5443eb522f183", "score": "0.48226422", "text": "function call_user_func ($function, $parameter = null) {}", "title": "" }, { "docid": "721764ba3321d02eefe15f7115f76245", "score": "0.4806274", "text": "function simpleFunction(){\n echo 'Hello World';\n }", "title": "" }, { "docid": "355d05f2febafdb181b5a4c4eb6f988c", "score": "0.48022038", "text": "function isEnabled($func) {\n return is_callable($func) && false === stripos(ini_get('disable_functions'), $func);\n}", "title": "" }, { "docid": "d7ff679b42367daaeb6862ad5c521681", "score": "0.47939602", "text": "function simpleFunction() {\n echo 'Hello World';\n }", "title": "" }, { "docid": "a3126b1e806c4cf08e8098c4034a9c93", "score": "0.47895736", "text": "private function disabledFunctionCheck()\n {\n $functions = [\n 'exec'\n ];\n // Functions needed by symfony process\n foreach($functions as $function){\n if (!function_exists($function)) {\n $this->console->error('Function \"'.$function.'\" is required. Is it disabled in php.ini?');\n $this->errors = true;\n }\n }\n }", "title": "" }, { "docid": "13a58c30a4f6d23892723f8557806416", "score": "0.4786235", "text": "function pre_system_hook() {\n echo \"<p><code>pre_system</code> hook executed!</p>\";\n}", "title": "" }, { "docid": "26dea1090962a2a1968b0dde80ebb202", "score": "0.4761155", "text": "#[Pure]\nfunction phpversion(?string $extension): string|false {}", "title": "" }, { "docid": "2624e1ba6090668750f45b4e9075f012", "score": "0.47364658", "text": "function addWrapper(string $name, $method) \n{\n $GLOBALS['PROXYZ_WRAPS'][$name] = $method;\n}", "title": "" }, { "docid": "f5e5b48e8f1bf53e0de2ec39c12f2ab7", "score": "0.472216", "text": "function function_tick_register ($function, $arg = null, ...$_)\n{\n return register_tick_function($function, $arg, ...$_);\n}", "title": "" }, { "docid": "e47ad0b0e67956ff58e92cd8772f8df3", "score": "0.47027475", "text": "function simpleFunction(){\n\t\t\techo 'Hello World';\n\t\t}", "title": "" }, { "docid": "a9856f8e9c36b75ff295c3c1f95e827c", "score": "0.46956998", "text": "function simpleFunction()\n{\n\techo 'Hello';\n}", "title": "" }, { "docid": "e3c709de1239f878508be37dfed6e75d", "score": "0.4694869", "text": "function simpleFunc(){\n echo \"fart\";\n}", "title": "" }, { "docid": "1ad3c5dbad5f7ab834ee54dd76f653b1", "score": "0.46868083", "text": "public static function dummyFunction()\n {\n return true;\n }", "title": "" }, { "docid": "1c5c279b6f43e744fe369d9a0a317430", "score": "0.4664706", "text": "function helloWorld() {\n echo \"Hello world!\";\n }", "title": "" }, { "docid": "f26e9761f3803907ecff14919e18a926", "score": "0.46566078", "text": "public function createNativeDriver()\n {\n return new NativeDriver();\n }", "title": "" }, { "docid": "bfce6456425ff406c86da5d449061bdd", "score": "0.46487144", "text": "function _handleFunction_true($arguments, $context) {\n return TRUE; // Return TRUE.\n }", "title": "" }, { "docid": "e245f49e640e7d793c691e387ba41223", "score": "0.46389017", "text": "public static function enable() {\n\t\t\\Config::inst()->update(get_called_class(), 'enabled', true);\n\t}", "title": "" }, { "docid": "6e5566e64372300f4e94ae68bbde00ac", "score": "0.46336615", "text": "#[Pure]\n#[ExpectedValues(['cli', 'phpdbg', 'embed', 'apache', 'apache2handler', 'cgi-fcgi', 'cli-server', 'fpm-fcgi', 'litespeed'])]\nfunction php_sapi_name(): string|false {}", "title": "" }, { "docid": "022827f53e3ca4e73bb1543bc48579f1", "score": "0.4618305", "text": "static function install();", "title": "" }, { "docid": "beef2ab2b75d02429b2e3ffe16cef6ec", "score": "0.4587783", "text": "function helloPHP(){\n echo 'hello PHP <br>';\n}", "title": "" }, { "docid": "6284cd5f02092b5d8a1292fb7986dac4", "score": "0.4579461", "text": "function register_function($function, $function_impl, $cacheable=true, $cache_attrs=null)\n {\n $this->_plugins['function'][$function] =\n array($function_impl, null, null, false, $cacheable, $cache_attrs);\n\n }", "title": "" }, { "docid": "ea53d354a82ada3e0f3cc50e65ec39e3", "score": "0.4570848", "text": "public function setUp(): void\n {\n // get the functions that are disabled in the php.ini\n $originalSetting = ini_get(\"disable_functions\");\n\n // check if exec is in there\n $pos = stripos($originalSetting,\"exec\");\n\n // if it has been found\n if ($pos === false) {\n\n // warn that it must be turned on for this test case\n echo Display::warning(\"Exec is turned on, for this test case, it must be disallowed.\");\n\n exit;\n\n }\n\n\n }", "title": "" }, { "docid": "4a5bb7aca99b2afcb908503c6b4777b4", "score": "0.45508486", "text": "function function_call($string) {\n if ($this->function_call_disable != true) {\n $this->write_info(\"FUNCTION CALL --> \" . $string . \"\\n\");\n }\n }", "title": "" }, { "docid": "6e9d806fbe30068c598d21abcf6a7f55", "score": "0.45307684", "text": "#[TentativeType]\n public function fpassthru(): int {}", "title": "" }, { "docid": "a2379bc2d6919f2c9e0532a58cd35471", "score": "0.45234048", "text": "function launchBuiltInWebServer($argv)\n{\n if (version_compare(PHP_VERSION, '5.4.0', '<')) {\n fprintf(STDERR,\n \"Unable to run example. The version of PHP you used to run this script (\".PHP_VERSION.\")\\n\".\n \"doesn't have a built-in web server. You need PHP 5.4 or newer.\\n\".\n \"\\n\".\n \"You can still run this example if you have a web server that supports PHP 5.3.\\n\".\n \"Copy the Dropbox PHP SDK into your web server's document path and access it there.\\n\");\n exit(2);\n }\n\n $php_file = $argv[0];\n if (count($argv) === 1) {\n $port = 5000;\n } else if (count($argv) === 2) {\n $port = intval($argv[1]);\n } else {\n fprintf(STDERR,\n \"Too many arguments.\\n\".\n \"Usage: php $argv[0] [server-port]\\n\");\n exit(1);\n }\n\n $host = \"localhost:$port\";\n $cmd = escapeshellarg(PHP_BINARY).\" -S \".$host.\" \".escapeshellarg($php_file);\n $descriptors = array(\n 0 => array(\"pipe\", \"r\"), // Process' stdin. We'll just close this right away.\n 1 => STDOUT, // Relay process' stdout to ours.\n 2 => STDERR, // Relay process' stderr to ours.\n );\n $proc = proc_open($cmd, $descriptors, $pipes);\n if ($proc === false) {\n fprintf(STDERR,\n \"Unable to launch PHP's built-in web server. Used command:\\n\".\n \" $cmd\\n\");\n exit(2);\n }\n fclose($pipes[0]); // Close the process' stdin.\n $exitCode = proc_close($proc); // Wait for process to exit.\n exit($exitCode);\n}", "title": "" }, { "docid": "5d5ef9b2ed7aeb72a7caabb257ccbdcc", "score": "0.45215094", "text": "function run_pre_processor()\r\n\t{\r\n\t\tif(strpos(getcwd(),\"upgrade\") === false)\r\n\t\t{\r\n\t\t\t$debug=@chdir(\"upgrade\");\r\n\t\t\tif($debug !== true)\r\n\t\t\t{\r\n\t\t\t\t$debug=@chdir(\"../upgrade\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$debug=true;\r\n\t\t}\r\n\t\tif($debug === true)\r\n\t\t{\r\n\t\t\tif(file_exists(\"preprocessor.php\"))\r\n\t\t\t{\r\n\t\t\t\trequire(\"preprocessor.php\");\r\n\t\t\t\tinsert_system_log($_SERVER['REMOTE_ADDR'],date(\"g:i:s\"),\"functions.php\",\"Running pre-processor.\");\r\n\t\t\t\t$debug=preprocessor_run();\r\n\t\t\t\treturn new UpgradeReturn($debug);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tinsert_system_log($_SERVER['REMOTE_ADDR'],date(\"g:i:s\"),\"functions.php\",\"No preprocessor script found, proceeding without running.\");\r\n\t\t\t\treturn new UpgradeReturn(0);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tinsert_system_log($_SERVER['REMOTE_ADDR'],date(\"g:i:s\"),\"functions.php\",\"Failed to change to temporary directory, terminating process.\");\r\n\t\t\treturn new UpgradeReturn(20);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "183c726c56e47981fb3c8ddb8ef46952", "score": "0.45183352", "text": "function hello()\n{\n echo \"Halo\";\n}", "title": "" }, { "docid": "7ec4e9b133702fa6cf3d39fae1cf18c7", "score": "0.4507256", "text": "function testping() {\n\techo \"testping\\n\" ;\n}", "title": "" }, { "docid": "f8cd238692c1c3189bf5490a25cb0d92", "score": "0.45065674", "text": "protected function registerNativeFilesystem()\n {\n $this->app->singleton('files', function () {\n return new Filesystem();\n });\n\n $this->app->alias('files', \\Roots\\Acorn\\Filesystem\\Filesystem::class);\n }", "title": "" }, { "docid": "22ff0403333b6cb47d295bdff2b87dec", "score": "0.44976187", "text": "public function __invoke();", "title": "" }, { "docid": "c9ea25d88d3cbf2a94c1af9e2d8b79c8", "score": "0.44900453", "text": "function disable_function() {\n die('Feature disabled.');\n }", "title": "" }, { "docid": "269a8ab59ad97b50d6eed2b5439df375", "score": "0.4474459", "text": "public static function isSupported(Phpfunc $phpfunc = null)\n\t{\n\t\tif (!is_object($phpfunc) || !($phpfunc instanceof $phpfunc))\n\t\t{\n\t\t\t$phpfunc = new Phpfunc();\n\t\t}\n\n\t\t$adapter = new OpenSSL();\n\n\t\tif (!$adapter->isSupported($phpfunc))\n\t\t{\n\t\t\t$adapter = new Mcrypt();\n\t\t}\n\n\t\tif (!$adapter->isSupported($phpfunc))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!$phpfunc->function_exists('base64_encode'))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!$phpfunc->function_exists('base64_decode'))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!$phpfunc->function_exists('hash_algos'))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t$algorightms = $phpfunc->hash_algos();\n\n\t\tif (!in_array('sha256', $algorightms))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "48486b532a37478c4140a3a03f54c388", "score": "0.44658747", "text": "function xu_load_extension($xmlrpc_php_dir=\"\") {\n $bSuccess = true;\n if(!extension_loaded('xmlrpc')) {\n putenv(\"LD_LIBRARY_PATH=/usr/lib/php4/apache/xmlrpc/\");\n if ($xmlrpc_php_dir) {\n $xmlrpc_php_dir .= '/';\n }\n if (!extension_loaded(\"xmlrpc\")) {\n $bSuccess = dl($xmlrpc_php_dir . \"xmlrpc-epi-php.so\");\n }\n }\n return $bSuccess;\n}", "title": "" }, { "docid": "f915b06da8bbc67e17019e51276fef11", "score": "0.44653964", "text": "function redcap_module_system_enable($version) {\n\t\t## It's not been tested thoroughly enough to leave in\n\t\treturn;\n\n\t\terror_log(\"Enabling Cross Project Piping\");\n\t\t$this->setupTestProjects();\n\t}", "title": "" }, { "docid": "307a0930683fd5ec8ee434e9834e957a", "score": "0.44608957", "text": "function mnet_server_dummy_method($methodname, $argsarray, $functionname) {\n global $MNET_REMOTE_CLIENT;\n \n if (!is_object($MNET_REMOTE_CLIENT->object_to_call)) {\n return @call_user_func_array($functionname, $argsarray);\n } else {\n return @call_user_method_array($functionname, $MNET_REMOTE_CLIENT->object_to_call, $argsarray);\n }\n}", "title": "" }, { "docid": "8ef808761a7b0779bf9576565de92634", "score": "0.44535983", "text": "function runExtraAlways() {\t\n\n\techo \"\\n\" . $GLOBALS['fgGreen'] . \"EXECUTE sqraperextra.php FUNCTION: \" . $GLOBALS['colorEnd'] . \"runExtraAlways\\n\";\n\t\n\t// Insert your custom code here.\n\n}", "title": "" }, { "docid": "c2c6ab353f32736f2124579b241a2aac", "score": "0.4451288", "text": "public static function supported(): bool {\n return \\extension_loaded('pcntl');\n }", "title": "" }, { "docid": "decf38eba809230874bba3586b603c2b", "score": "0.44507077", "text": "public function register_function($function, $function_impl, $cacheable = true, $cache_attrs = null) {\n $this->registerPlugin('function', $function, $function_impl, $cacheable, $cache_attrs);\n }", "title": "" }, { "docid": "74616eb3846d48f5459205eb4eb2aa24", "score": "0.44494292", "text": "public function enable(): bool {}", "title": "" }, { "docid": "d9a0bd79a300eb188341d64a432147ad", "score": "0.4448438", "text": "public static function enableAll();", "title": "" }, { "docid": "bec8282fbb1515207f408ffef5057778", "score": "0.44436824", "text": "function php_extension_functions ($module_name)\n{\n return get_extension_funcs($module_name);\n}", "title": "" }, { "docid": "4cf73b2eab2137a7a50f970c0a605ed2", "score": "0.44343603", "text": "public function enableGitHubIntegration() {\n // Write file that indicates an integration is enabled.\n // Save original git URI in it.\n chdir($this->extCurrentProject['repository_dir']);\n $git = $this->getService('git');\n $git->ensureInstalled();\n $git->setDefaultRepositoryDir($this->extCurrentProject['repository_dir']);\n file_put_contents($this->extCurrentProject['root_dir'] . '/' . $this->config()->get('local.integration.github_local_flag_file'),\n $git->getConfig('remote.platform.url'));\n // Remove \"platform\" remote.\n $git->execute([\n 'remote',\n 'rm',\n 'platform',\n ]);\n // Set the URL for \"origin\" remote to the GitHub repo.\n $git->execute([\n 'remote',\n 'set-url',\n 'origin',\n $this->config()->get('local.integration.github_base_uri') . '/' . $this->config()->get('local.integration.github_repo_prefix') . $this->extCurrentProject['internal_site_code'] . '.git',\n ]);\n // Fetch the remote.\n $git->execute(['fetch', 'origin']);\n // Change upstream for currently selected branch.\n $branch = $git->getCurrentBranch();\n $git->execute([\n 'branch',\n $branch,\n '--set-upstream',\n \"origin/$branch\"\n ]);\n // Pull the latest.\n $git->execute(['pull']);\n }", "title": "" }, { "docid": "0fe878ed84d0ed363ad6941e753585a2", "score": "0.44332898", "text": "public static function enable()\n {\n static::$_enabled = true;\n }", "title": "" }, { "docid": "a4f21b59ac0a9b616386ceae52869937", "score": "0.4430153", "text": "public function include_mobile_detect_function() {\n\t\tif (!class_exists('Mobile_Detect')) {\n\t\t\tinclude 'includes/utilities/mobile-detect/Mobile_Detect.php';\n\t\t}\n\t}", "title": "" }, { "docid": "911179a5f5e9a5d97391f09e3bc565f5", "score": "0.44185615", "text": "function callFunction($name, $args) \n{\n $path = explode('\\\\', $name);\n $id = $callable = array_pop($path);\n if (array_key_exists($id, $GLOBALS['PROXYZ_OVERRIDES'])) {\n // Call override method, passing in args\n return call_user_func_array($GLOBALS['PROXYZ_OVERRIDES'][$id], $args);\n }\n\n if (array_key_exists($id, $GLOBALS['PROXYZ_WRAPS'])) {\n // Call wrapper method passing in method args and method to call\n return call_user_func_array($GLOBALS['PROXYZ_WRAPS'][$id], [$args, $callable]);\n }\n\n // Make sure references are passed correctly\n $reflection = new \\ReflectionFunction($id);\n $parameters = $reflection->getParameters();\n foreach($parameters as $idx => $parameter) {\n if ($parameter->isPassedByReference()) {\n if (isset($args[$idx])) {\n $args[$idx] = &$args[$idx];\n }\n }\n }\n return call_user_func_array($id, $args);\n}", "title": "" }, { "docid": "49374b285dc723df8a74a85d76357b18", "score": "0.4418249", "text": "abstract function __invoke();", "title": "" }, { "docid": "09d4cae92886e86686b83f47cac2537d", "score": "0.44137776", "text": "function setEscapeProcessing($enable){\r\n\t\tdie('Not implemented');\r\n\t}", "title": "" }, { "docid": "1609a989aa1f7bbcbd2207831c111e8d", "score": "0.43984425", "text": "function payswarm_add_hook($hook, $func) {\n global $payswarm_hooks;\n $payswarm_hooks[$hook] = $func;\n}", "title": "" }, { "docid": "89c7b7a94fbcd0b5c17bc5b98b8925ef", "score": "0.43803465", "text": "function pmw_load_callable( $func, array $args = NULL )\r\n{\r\n\tif ( is_callable( $func ) )\r\n\t{\r\n\t\t( $args ) ? $func( $args ) : $func();\r\n\t}\r\n}", "title": "" }, { "docid": "9dd618f2c9e0e9bdb5e79d0792349a0d", "score": "0.4379738", "text": "function simpleFunction(){\r\n echo 'Hello Squirrel <br>';\r\n }", "title": "" }, { "docid": "f6dbabe6a364fefacf523b3e4e170f11", "score": "0.43753865", "text": "public function enableHooks()\n\t{\n\t\t$this->enableHooks = true;\n\t\t$this->hooks =& load_class('Hooks', 'core');\n\t}", "title": "" }, { "docid": "27a155ea5d6e1df0ce6a96ee7213aae5", "score": "0.43642884", "text": "function zing_activate() {\n}", "title": "" }, { "docid": "3455563df42e990518966a2087da65c4", "score": "0.43480468", "text": "function phpversion ($extension = null) {}", "title": "" }, { "docid": "9d8174ef790d707092c1dc200013eb4d", "score": "0.43396428", "text": "public function enableWith($flags = array(), $options = array());", "title": "" }, { "docid": "cc9adde05c117e70d116c76798041492", "score": "0.4336304", "text": "public function __call($func, $args) {\n\t\t\treturn $this->_library === null\n\t\t\t\t? call_user_func_array(self::load_helper($func), $args)\n\t\t\t\t: call_user_func_array(array($this->_library, $func), $args);\n\t\t}", "title": "" }, { "docid": "dff3ebbe645f297e50379cc27d21cd43", "score": "0.4327028", "text": "public function requiresToPhpCast(): bool\n {\n return true;\n }", "title": "" }, { "docid": "1aa40c7a11fd974f5fc2ea99ca1701d7", "score": "0.43250763", "text": "function shell_exec ($cmd) {}", "title": "" }, { "docid": "7e6e6169804f6aaa39a91bc75f5ec70b", "score": "0.4312221", "text": "#[Pure]\nfunction php_ini_loaded_file(): string|false {}", "title": "" }, { "docid": "f5d925863ad1fc80ce6a17d707d8a1ce", "score": "0.4309748", "text": "public function testOverrideFunction($platform, $config, $requiredExtension) {\n\t\t$this->initClient($requiredExtension, array('environment' => 'overrideFunction_' . $platform, 'config' => $config));\n\n\t\t$this->assertSame('Craue\\GeoBundle\\Doctrine\\Query\\Mysql\\GeoDistance',\n\t\t\t\t$this->getEntityManager()->getConfiguration()->getCustomNumericFunction('MY_GEO_DISTANCE'));\n\t}", "title": "" }, { "docid": "6239a91d87d507cdd75be821d30d8d6b", "score": "0.43060243", "text": "private function functionEnabled($func) {\n return is_callable($func) && false === stripos(ini_get('disable_functions'), $func);\n }", "title": "" }, { "docid": "a90f291edebab248ad520d18cfce69ee", "score": "0.42975396", "text": "public function registerRemoteFunction(string $sFuncName=null, callable $hFunc)\r\n\t{\r\n\t}", "title": "" }, { "docid": "99b4f35f6dcc09d5edfbd838dd53769f", "score": "0.42973864", "text": "public static function fromNative()\n {\n $value = func_get_arg(0);\n\n return new static($value);\n }", "title": "" }, { "docid": "f936e40d32b9a2905fc6ae91b7c6c7a3", "score": "0.42966086", "text": "function ctools_plugin_test_magic_func_cached_test() {}", "title": "" }, { "docid": "89a3103302521ef23a0171402bb99ef2", "score": "0.4296464", "text": "function create_function ($args, $code) {}", "title": "" }, { "docid": "153e378d5ad9e2d554f4c3d9c053d01f", "score": "0.4293691", "text": "function sqllib_install() {\n global $DB, $OUTPUT;\n\n $result = true;\n $rpc = new stdclass;\n $rpcmap = new stdclass;\n // Retrieve service.\n\n // Returning result.\n return $result;\n}", "title": "" }, { "docid": "6e34119db5a4eaf7c88bdb2547d33dda", "score": "0.42932838", "text": "public function system()\n {\n }", "title": "" }, { "docid": "c475449755df62a7f2124d5c893ddf5f", "score": "0.4292028", "text": "public function isPhp () {}", "title": "" }, { "docid": "9d2f8db757b8ef7a6da2080b2da4710b", "score": "0.42894447", "text": "public function enable(\\Closure $requestCallback);", "title": "" }, { "docid": "e82673b495ccfddcfe4d16f3b570249d", "score": "0.42816508", "text": "function sapi_windows_set_ctrl_handler(?callable $handler, bool $add = true): bool {}", "title": "" }, { "docid": "217fa5e4cddd21d25377382e45f890d4", "score": "0.42767128", "text": "public function addWrapperFunctions()\n {\n $this->content .= 'var _Debug = false; // set this to false to turn debugging off\n // and get rid of those annoying alert boxes.\n\n // Define exception/error codes\n var _NoError = 0;\n var _GeneralException = 101;\n var _ServerBusy = 102;\n var _InvalidArgumentError = 201;\n var _ElementCannotHaveChildren = 202;\n var _ElementIsNotAnArray = 203;\n var _NotInitialized = 301;\n var _NotImplementedError = 401;\n var _InvalidSetValue = 402;\n var _ElementIsReadOnly = 403;\n var _ElementIsWriteOnly = 404;\n var _IncorrectDataType = 405;\n\n\n // local variable definitions\n var apiHandle = null;\n var API = null;\n var findAPITries = 0;\n\n function doLMSInitialize()\n {\n var api = getAPIHandle();\n if (api == null)\n {\n alert(\"Unable to locate the LMS API Implementation.\\nLMSInitialize was not successful.\");\n return \"false\";\n }\n\n var result = api.LMSInitialize(\"\");\n\n if (result.toString() != \"true\")\n {\n var err = ErrorHandler();\n }\n\n return result.toString();\n }\n\n function doLMSFinish()\n {\n var api = getAPIHandle();\n if (api == null)\n {\n alert(\"Unable to locate the LMS API Implementation.\\nLMSFinish was not successful.\");\n return \"false\";\n }\n else\n {\n // call the LMSFinish function that should be implemented by the API\n\n var result = api.LMSFinish(\"\");\n if (result.toString() != \"true\")\n {\n var err = ErrorHandler();\n }\n\n }\n\n return result.toString();\n }\n\n function doLMSGetValue(name)\n {\n var api = getAPIHandle();\n if (api == null)\n {\n alert(\"Unable to locate the LMS API Implementation.\\nLMSGetValue was not successful.\");\n return \"\";\n }\n else\n {\n var value = api.LMSGetValue(name);\n var errCode = api.LMSGetLastError().toString();\n if (errCode != _NoError)\n {\n // an error was encountered so display the error description\n var errDescription = api.LMSGetErrorString(errCode);\n alert(\"LMSGetValue(\"+name+\") failed. \\n\"+ errDescription);\n return \"\";\n }\n else\n {\n\n return value.toString();\n }\n }\n }\n\n function doLMSSetValue(name, value)\n {\n var api = getAPIHandle();\n if (api == null)\n {\n alert(\"Unable to locate the LMS API Implementation.\\nLMSSetValue was not successful.\");\n return;\n }\n else\n {\n var result = api.LMSSetValue(name, value);\n if (result.toString() != \"true\")\n {\n var err = ErrorHandler();\n }\n }\n\n return;\n }\n\n function doLMSCommit()\n {\n var api = getAPIHandle();\n if (api == null)\n {\n alert(\"Unable to locate the LMS API Implementation.\\nLMSCommit was not successful.\");\n return \"false\";\n }\n else\n {\n var result = api.LMSCommit(\"\");\n if (result != \"true\")\n {\n var err = ErrorHandler();\n }\n }\n\n return result.toString();\n }\n\n function doLMSGetLastError()\n {\n var api = getAPIHandle();\n if (api == null)\n {\n alert(\"Unable to locate the LMS API Implementation.\\nLMSGetLastError was not successful.\");\n //since we can get the error code from the LMS, return a general error\n return _GeneralError;\n }\n\n return api.LMSGetLastError().toString();\n }\n\n function doLMSGetErrorString(errorCode)\n {\n var api = getAPIHandle();\n if (api == null)\n {\n alert(\"Unable to locate the LMS API Implementation.\\nLMSGetErrorString was not successful.\");\n }\n\n return api.LMSGetErrorString(errorCode).toString();\n }\n\n function doLMSGetDiagnostic(errorCode)\n {\n var api = getAPIHandle();\n if (api == null)\n {\n alert(\"Unable to locate the LMS API Implementation.\\nLMSGetDiagnostic was not successful.\");\n }\n\n return api.LMSGetDiagnostic(errorCode).toString();\n }\n\n function LMSIsInitialized()\n {\n // there is no direct method for determining if the LMS API is initialized\n // for example an LMSIsInitialized function defined on the API so we try\n // a simple LMSGetValue and trap for the LMS Not Initialized Error\n\n var api = getAPIHandle();\n if (api == null)\n {\n alert(\"Unable to locate the LMS API Implementation.\\nLMSIsInitialized() failed.\");\n return false;\n }\n else\n {\n var value = api.LMSGetValue(\"cmi.core.student_name\");\n var errCode = api.LMSGetLastError().toString();\n if (errCode == _NotInitialized)\n {\n return false;\n }\n else\n {\n return true;\n }\n }\n }\n\n function ErrorHandler()\n {\n var api = getAPIHandle();\n if (api == null)\n {\n alert(\"Unable to locate the LMS API Implementation.\\nCannot determine LMS error code.\");\n return;\n }\n\n // check for errors caused by or from the LMS\n var errCode = api.LMSGetLastError().toString();\n if (errCode != _NoError)\n {\n // an error was encountered so display the error description\n var errDescription = api.LMSGetErrorString(errCode);\n\n if (_Debug == true)\n {\n errDescription += \"\\n\";\n errDescription += api.LMSGetDiagnostic(null);\n // by passing null to LMSGetDiagnostic, we get any available diagnostics\n // on the previous error.\n }\n\n alert(errDescription);\n }\n\n return errCode;\n }\n\n\n\n function getAPIHandle()\n {\n if (apiHandle == null)\n {\n apiHandle = getAPI();\n }\n\n return apiHandle;\n }\n\n function findAPI(win)\n {\n while ((win.API == null) && (win.parent != null) && (win.parent != win))\n {\n findAPITries++;\n // Note: 7 is an arbitrary number, but should be more than sufficient\n if (findAPITries > 7)\n {\n alert(\"Error finding API -- too deeply nested.\");\n return null;\n }\n\n win = win.parent;\n\n }\n return win.API;\n }\n\n\n function getAPI()\n {\n var theAPI = findAPI(window);\n if ((theAPI == null) && (window.opener != null) && (typeof(window.opener) != \"undefined\"))\n {\n theAPI = findAPI(window.opener);\n }\n if (theAPI == null)\n {\n alert(\"Unable to find an API adapter\");\n }\n return theAPI\n }';\n\n }", "title": "" }, { "docid": "f6daf7f4a5258cf8e164f01726e456d1", "score": "0.4270153", "text": "function __set() {\n echo \"inside set\";\n}", "title": "" }, { "docid": "e6d56a76fba85434d756558161cca357", "score": "0.42694592", "text": "public function enable() {\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "f759d5746ed210bafaf45a98a78855b5", "score": "0.42580146", "text": "public function preInvoke()\n {\n // pre-invoke hook\n }", "title": "" }, { "docid": "9e711d90cb2b1a7ee6b6a38226c544ea", "score": "0.42574444", "text": "#[Pure(true)]\nfunction php_uname(#[PhpStormStubsElementAvailable(from: '7.0')] string $mode = 'a'): string {}", "title": "" }, { "docid": "0b367395dbeed7c83739324529613ecb", "score": "0.42536074", "text": "function run_flo_support() {\n\n\t$plugin = new Flo_Support();\n\t$plugin->run();\n\n}", "title": "" }, { "docid": "2be8311af524e5fb699eeee6f1a1e985", "score": "0.42502198", "text": "function extendFunction($callback, $function) {\n\treturn $callback($function);\n}", "title": "" }, { "docid": "064fc1f3058fe276c473ee60f7258fdc", "score": "0.42489213", "text": "function function_exists ($function_name) {}", "title": "" }, { "docid": "2e4df83a7df7428a5101303a6f3685a6", "score": "0.4247936", "text": "function abc()\n{\n \n echo \"tick_handler() called<br>\";\n \n}", "title": "" } ]
9636528f8e09cd68cd7f5e4d680e5edc
end of Get Trained Member Get Training
[ { "docid": "79c5587f778e5ca4b470c4ab9ac2e4d3", "score": "0.48665562", "text": "public function test_admin_training_list()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/MemberSkills', 'training_programs']);\n $this->assertResponseCode(404);\n }", "title": "" } ]
[ { "docid": "41ae8ab4378b1ee7a7a247709fff25a0", "score": "0.6578642", "text": "public function getTraining()\n {\n return Wrapper\\Player\\Senior::training($this->getId());\n }", "title": "" }, { "docid": "10e8f916b9eb222162d1f117e6878c86", "score": "0.58593535", "text": "protected function getExampleTraining() {\n\n\t\t$Data = array(\n\t\t\t'id'\t\t=> DataObject::$DEFAULT_ID,\n\t\t\t'sportid'\t=> Configuration::General()->runningSport(),\n\t\t\t'typeid'\t=> Configuration::General()->competitionType(),\n\t\t\t'time'\t\t=> time(),\n\t\t\t'created'\t=> time(),\n\t\t\t'edited'\t=> time(),\n\t\t\t'is_public'\t=> 1,\n\t\t\t'is_track'\t=> 1,\n\t\t\t'distance'\t=> 10,\n\t\t\t's'\t\t\t=> 51*60+27,\n\t\t\t'elevation'\t=> 57,\n\t\t\t'kcal'\t\t=> 691,\n\t\t\t'pulse_avg'\t=> 186,\n\t\t\t'pulse_max'\t=> 193,\n\t\t\t'vdot_with_elevation'\t=> Configuration::Data()->vdot() + 1,\n\t\t\t'vdot'\t\t=> Configuration::Data()->vdot() + 2,\n\t\t\t'use_vdot'\t=> 0,\n\t\t\t'fit_vdot_estimate'\t=> round(Configuration::Data()->vdot()),\n\t\t\t'fit_recovery_time'\t=> 800,\n\t\t\t'fit_hrv_analysis'\t=> 800,\n\t\t\t'jd_intensity'\t=> 27,\n\t\t\t'trimp'\t\t=> 121,\n\t\t\t'cadence'\t=> 90,\n\t\t\t'stride_length'\t=> 108,\n\t\t\t'groundcontact'\t=> 220,\n\t\t\t'vertical_oscillation'\t=> 76,\n\t\t\t'power'\t\t=> 520,\n\t\t\t'temperature'\t=> 17,\n\t\t\t'weatherid'\t=> 5,\n\t\t\t'splits'\t=> '5|26:51-5|24:36',\n\t\t\t'comment'\t=> str_replace(' ', '&nbsp;', __('Test activity')),\n\t\t\t'partner'\t=> 'Peter',\n\t\t\t'abc'\t\t=> 1,\n\t\t\t'notes'\t\t=> str_replace(' ', '&nbsp;', __('Great run!')),\n\t\t\t'accountid'\t=> SessionAccountHandler::getId(),\n\t\t\t'creator'\t=> '',\n\t\t\t'creator_details'\t=> '',\n\t\t\t'activity_id'\t=> '',\n\t\t\t'elevation_corrected'\t=> 1\n\t\t);\n\n\t\treturn $Data;\n\t}", "title": "" }, { "docid": "2e83bac7adde793f3d21765133d99890", "score": "0.5693374", "text": "public function run()\n {\n\t\t$training = App\\Training::find(1);\n\t\t$training->Trainee()->attach(1);\n\t\t$training->Trainee()->attach(2);\n\n\t\t$training = App\\Training::find(2);\n\t\t$training->Trainee()->attach(1);\n\t\t$training->Trainee()->attach(2);\n }", "title": "" }, { "docid": "26b37f014726ad7ce8f7241c1659d6e9", "score": "0.567701", "text": "public function show(Training $training)\n {\n //\n }", "title": "" }, { "docid": "a9da04da7f7fe304ae9714993534a867", "score": "0.5623889", "text": "public function getTrainingSession()\n {\n return $this->hasOne(TrainingSession::className(), ['id' => 'training_session_id'])->inverseOf('waitingLists');\n }", "title": "" }, { "docid": "518dc554cbe426bb643f743287e546bb", "score": "0.56136394", "text": "public function index()\n {\n return Training::latest()->paginate();\n }", "title": "" }, { "docid": "534841375212afcc60e1e983eb9cf9a1", "score": "0.5516992", "text": "public function getTrainingList()\n {\n $umg = $this->username;\n\n $this->db->select(\"th_ref_id,\n th_training_title,\n to_char(th_date_from, 'dd/mm/yyyy') th_date_from2,\n to_char(th_date_to, 'dd/mm/yyyy') th_date_to2\n \");\n $this->db->from(\"ims_hris.training_head\");\n \n $this->db->where(\"th_status = 'ENTRY'\");\n $this->db->where(\"th_dept_code = (select sm_dept_code from ims_hris.staff_main where upper(sm_apps_username) = UPPER('$umg'))\");\n $this->db->where(\"th_internal_external = 'EXTERNAL_AGENCY'\");\n $this->db->order_by(\"th_date_from, th_date_to, th_training_title, th_ref_id\");\n $q = $this->db->get();\n \n return $q->result_case('UPPER');\n }", "title": "" }, { "docid": "e2aea15ebfb93db9aaa38fb0b62a0f82", "score": "0.55133057", "text": "public function __construct($training)\n {\n $this->training = $training;\n }", "title": "" }, { "docid": "bc67215637750457d2d9c406d5a93a3e", "score": "0.5496143", "text": "public function gagnerExperience()\n {\n }", "title": "" }, { "docid": "143a3678ef408572a11bd18929649fd1", "score": "0.54598236", "text": "public function show(UserTrainingAuth $userTrainingAuth)\n {\n //\n }", "title": "" }, { "docid": "5fb545f9cfa96dc3d2c53b0957873efc", "score": "0.5459335", "text": "public function GetTrainer(){\n\t\t$sql = \"SELECT * from pl.pl_master_trainer order by trainer_status DESC\";\n\t\t$query = $this->db->query($sql);\n\t\treturn $query->result_array();\n\t}", "title": "" }, { "docid": "71cae24ad528ca0c365b97513cb6db92", "score": "0.5447742", "text": "public function GetTrainer(){\r\n\t\t$sql = \"select * from pl.pl_master_trainer order by trainer_status DESC\";\r\n\t\t$query = $this->db->query($sql);\r\n\t\treturn $query->result_array();\r\n\t}", "title": "" }, { "docid": "bde50ec29adca6ed43c2e0b8485903e5", "score": "0.5446988", "text": "public function index()\n {\n $allTrainings = Training::with('participants', 'participants.customer', 'participants.company', 'participants.position', 'participants_fill_in', 'participants_fill_in.customer', 'participants_fill_in.company', 'participants_fill_in.position', 'training_course', 'training_group', 'responsive_users')->where('type', Training::TYPE_PLANNED)->get();\n\n if ($allTrainings) {\n return response()->json($allTrainings, 200);\n } else {\n return response()->json([\n 'message' => 'Expectation Failed',\n 'status' => 417\n ], 417);\n }\n\n }", "title": "" }, { "docid": "33d9b3d3f1d5bf8d367e0235b0dbea35", "score": "0.53925085", "text": "function getTrainingTrainer($db, $strDataID = \"\")\n{\n global $words;\n global $strTargetElements;\n global $_REQUEST;\n $intMaxShow = 2; // tambahan yang perlu dimunculkan\n $intAdd = 50; // maksimum tambahan\n $intRows = 0;\n $intShown = 0;\n $strResult = \"\";\n $arrStatus = [\"ok\", \"cancel\"];\n $strResult .= \" <table border=0 class=gridTable cellpadding=0 cellspacing=0 >\\n\";\n $strResult .= \" <tr valign=top class=tableHeader>\\n\";\n $strResult .= \" <td nowrap>&nbsp;\" . getWords('no') . \"</td>\\n\";\n $strResult .= \" <td nowrap>&nbsp;\" . getWords('employee id') . \"</td>\\n\";\n $strResult .= \" <td nowrap>&nbsp;\" . getWords('name') . \"</td>\\n\";\n $strResult .= \" <td nowrap>&nbsp;\" . getWords('status') . \"</td>\\n\";\n $strResult .= \" <td nowrap>&nbsp;\" . getWords('delete') . \"</td>\\n\";\n $strResult .= \" </tr>\\n\";\n $arrParticipant = [];\n if ($strDataID != \"\") {\n $strSQL = \"\n SELECT t1.id, t1.status, t1.cost, t2.employee_id, t2.employee_name \n FROM hrd_training_request_trainer AS t1 \n LEFT JOIN hrd_employee AS t2 ON t2.id = t1.id_employee \n WHERE t1.id_request = '$strDataID' \n \";\n $resDb = $db->execute($strSQL);\n while ($rowDb = $db->fetchrow($resDb)) {\n $arrParticipant[$rowDb['id']] = $rowDb;\n }\n writeLog(ACTIVITY_VIEW, MODULE_PAYROLL, \"\", 0);\n } else if (isset($_REQUEST['btnCreateSharing'])) {\n $strPlanID = (isset($_REQUEST['id_plan'])) ? $_REQUEST['id_plan'] : \"\";\n if ($strPlanID != \"\") {\n $arrData['dataPlan'] = $strPlanID;\n $strSQL = \"\n SELECT t1.id, t1.status, t1.cost, t2.employee_id, t2.employee_name \n FROM hrd_training_request_participant AS t1 \n LEFT JOIN hrd_employee AS t2 ON t2.id = t1.id_employee \n WHERE t1.id_request = '$strPlanID' \n \";\n $resDb = $db->execute($strSQL);\n while ($rowDb = $db->fetchrow($resDb)) {\n $arrParticipant[$rowDb['id']] = $rowDb;\n }\n }\n writeLog(ACTIVITY_VIEW, MODULE_PAYROLL, \"\", 0);\n }\n foreach ($arrParticipant AS $id => $rowDb) {\n $intRows++;\n $intShown++;\n $strResult .= \"<tr valign=top id=\\\"detailTrainerRows$intRows\\\">\\n\";\n $strResult .= \" <td align=right nowrap><input type=hidden name=detailTrainerID$intRows value=\\\"\" . $rowDb['id'] . \"\\\">$intRows&nbsp;</td>\";\n $strAction = \"onFocus = \\\"AC_kode = 'detailTrainerEmployeeID$intRows';AC_nama='detailTrainerName$intRows';\\\" \";\n $strResult .= \" <td><input type=text size=20 maxlength=50 name=detailTrainerEmployeeID$intRows id=detailTrainerEmployeeID$intRows value=\\\"\" . $rowDb['employee_id'] . \"\\\" $strAction></td>\";\n $strResult .= \" <td nowrap>&nbsp;<strong id=\\\"detailTrainerName$intRows\\\">\" . $rowDb['employee_name'] . \"</strong></td>\";\n $strResult .= \" <td>\" . getComboFromArray($arrStatus, \"detailTrainerStatus$intRows\", $rowDb['status']) . \"</td>\";\n $strAction = \" onChange = \\\"chkTrainerDeleteChanged($intRows);\\\" \";\n $strResult .= \" <td align=center title='cost \" . standardFormat(\n $rowDb['cost']\n ) . \"'><input type=checkbox id='chkTrainerID$intRows' name='chkTrainerID$intRows' $strAction></td>\\n\";\n $strResult .= \"</tr>\\n\";\n $strTargetElements .= \",\\\"detailTrainerEmployeeID$intRows\\\"\";\n }\n // tambahkan dengan data kosong\n for ($i = 1; $i <= $intAdd; $i++) {\n $intRows++;\n if ($intRows <= $intMaxShow) {\n $strResult .= \"<tr valign=top id=\\\"detailTrainerRows$intRows\\\">\\n\";\n $intShown++;\n $strDisabled = \"\";\n } else {\n $strResult .= \"<tr valign=top id=\\\"detailTrainerRows$intRows\\\" style=\\\"display:none\\\">\\n\";\n $strDisabled = \"disabled\";\n }\n $strResult .= \" <td align=right nowrap>$intRows&nbsp;</td>\";\n $strAction = \"onFocus = \\\"AC_kode = 'detailTrainerEmployeeID$intRows';AC_nama='detailTrainerName$intRows';\\\" \";\n $strResult .= \" <td><input type=text size=20 maxlength=50 name=detailTrainerEmployeeID$intRows id=detailTrainerEmployeeID$intRows $strDisabled $strAction></td>\";\n $strResult .= \" <td nowrap>&nbsp;<strong id=\\\"detailTrainerName$intRows\\\"></strong></td>\";\n $strResult .= \" <td>\" . getComboFromArray($arrStatus, \"detailTrainerStatus$intRows\") . \"</td>\";\n $strAction = \" onChange = \\\"chkTrainerDeleteChanged($intRows);\\\" \";\n $strResult .= \" <td align=center><input type=checkbox id='chkTrainerID$intRows' name='chkTrainerID$intRows' $strAction></td>\\n\";\n $strResult .= \"</tr>\\n\";\n $strTargetElements .= \",\\\"detailTrainerEmployeeID$intRows\\\"\";\n }\n $strResult .= \" <tr valign=top><td>&nbsp;</td>\\n\";\n $strResult .= \" <td colspan=3>&nbsp;<a href=\\\"javascript:showMoreTrainerInput();\\\">\" . getWords(\n 'more'\n ) . \"</a></td></tr>\\n\";\n $strResult .= \" </table>\\n\";\n // tambahkan hidden data\n $strResult .= \"<input type=hidden id='maxTrainerDetail' name='maxTrainerDetail' value=$intRows>\";\n $strResult .= \"<input type=hidden id='numTrainerShow' name='numTrainerShow' value=$intShown>\";\n return $strResult;\n}", "title": "" }, { "docid": "e9e183918f2c6fbe1fb7699727b1366b", "score": "0.53809613", "text": "function getTrainingPlayers($training){\n\t$query = \"SELECT name FROM aquigaza_fsutt_local.players \"\n\t\t\t. \"WHERE training = \".$training.\" ORDER by rating DESC\";\n $resource = runQuery($query);\n\treturn ozRunQuery($resource);\n}", "title": "" }, { "docid": "af71306162236deb0d9018bc11aeb241", "score": "0.5376479", "text": "public function train(){\n\t\t\n\t\treturn $this->belongsTo('Alsaudi\\\\Eloquent\\\\TrainRelation');\n\t}", "title": "" }, { "docid": "90fffebefd81fb5296a6a4ad23bf9114", "score": "0.52939713", "text": "public function getAll()\n {\n \ttry {\n\t\t\t// Cargo los entrenamientos.\n\t\t\t$trainings = Training::with('distance','level','duration')->get();\n\n\t\t\t// Recorro los entrnamientos para cargar los stage.\n\t\t\tforeach ($trainings as $training) {\n $training = $this->loadCompletedTrainig($training, true);\n\n\t\t\t}\n \t} catch (\\Exception $e) {\n \t\treturn ResponseHelper::armyResponse(false, 400, \"Internal Error\", \"Error: \" . $e->getMessage()) ;\n \t}\n\n\t\treturn ResponseHelper::armyResponse(true, 200, $trainings, \"trainings\");\n }", "title": "" }, { "docid": "7e65cc9ac9983567b0884e15a4996aa2", "score": "0.52482396", "text": "protected function getTrainer()\n {\n return $this->selectOneByParameter();\n }", "title": "" }, { "docid": "8b3316a53ff0ae8531299cbab9d3fe8b", "score": "0.5247893", "text": "private function loadCompletedTrainig($training, $removeId = false, $camellCase = false)\n {\n $training->stage;\n foreach ($training->stage as $key => $stage) {\n $training->stage[$key]->checkpoint;\n\n foreach ($training->stage[$key]->checkpoint as $keyCheckpont => $checkpoint) {\n $this->loadCompletedCheckpoint($checkpoint, $removeId);\n }\n \n // Quito los id.\n if ($removeId){\n // unset($training->stage[$key]['id_stage']);\n // unset($training->stage[$key]['id_achievement']);\n // unset($training->stage[$key]['pivot']);\n }\n }\n\n // Quito el id de entrenamiento.\n if ($removeId){\n // unset($training[\"id_training\"]);\n // unset($training[\"id_level\"]);\n // unset($training[\"id_distance\"]);\n // unset($training[\"id_duration\"]);\n\n // unset($training->level[\"id_level\"]);\n // unset($training->distance[\"id_distance\"]);\n // unset($training->duration[\"id_duration\"]);\n }\n return $training; \n }", "title": "" }, { "docid": "a2f635ae2c5f69aa42a0c8229658d42b", "score": "0.52265894", "text": "public function getByName($name = '')\n {\n \ttry {\n \t\tif($name === ''){\n \t\t\treturn ResponseHelper::armyResponse(false, 200, \"Error\", \"Error: no se recibio el parametro de busqueda.\") ;\n \t\t}\n\t\t\t// Cargo los entrenamientos.\n\t\t\t$training = Training::with('distance','level','duration')->where('name' , '=', $name)->first();\n\n\t\t\tif( $training !== null )\n\t\t\t{\n\t\t\t\t// Recorro los entrnamientos para cargar los stage.\n\t\t\t\t$training->stage;\n\t\t\t\tforeach ($training->stage as $key => $stage) {\n\t\t\t\t\t$training->stage[$key]->checkpoint;\n\t\t\t\t}\n\t\t\t}\t\t\t\n \t} catch (\\Exception $e) {\n \t\treturn ResponseHelper::armyResponse(false, 400, \"Internal Error\", \"Error: \" . $e->getMessage()) ;\n \t}\n \treturn ResponseHelper::armyResponse(true, 200, $training, '');\n }", "title": "" }, { "docid": "5d0d62ae6a14ced4f36e174d70f0a54e", "score": "0.5180735", "text": "function getTrainingParticipant($db, $strDataID = \"\")\n{\n global $words;\n global $strTargetElements;\n global $_REQUEST;\n global $strEmptyOptions;\n global $bolIsEmployee;\n $intMaxShow = 4; // tambahan yang perlu dimunculkan\n if ($bolIsEmployee) {\n $intMaxShow = 1;\n }\n $intAdd = 50; // maksimum tambahan\n $intRows = 0;\n $intShown = 0;\n $strResult = \"\";\n $strButtons = \"\";\n $arrStatus = [\"ok\", \"cancel\"];\n $strResult .= \" <table border=0 class=gridTable cellpadding=0 cellspacing=0 >\\n\";\n $strResult .= \" <tr valign=top class=tableHeader>\\n\";\n $strResult .= \" <td nowrap>&nbsp;\" . getWords('no') . \"</td>\\n\";\n $strResult .= \" <td nowrap>&nbsp;\" . getWords('employee id') . \"</td>\\n\";\n $strResult .= \" <td nowrap>&nbsp;\" . getWords('name') . \"</td>\\n\";\n $strResult .= \" <td nowrap>&nbsp;\" . getWords('training cost') . \"</td>\\n\";\n $strResult .= \" <td nowrap>&nbsp;\" . getWords('other cost') . \"</td>\\n\";\n $strResult .= \" <td nowrap>&nbsp;\" . getWords('status') . \"</td>\\n\";\n $strResult .= \" <td nowrap>&nbsp;\" . getWords('note') . \"</td>\\n\";\n $strResult .= \" <td nowrap>&nbsp;\" . getWords('delete') . \"</td>\\n\";\n // $strResult .= \" <td nowrap>&nbsp;\" .getWords('form').\"</td>\\n\";\n // $strResult .= \" <td nowrap>&nbsp;\" .getWords('certificate').\"</td>\\n\";\n $strResult .= \" </tr>\\n\";\n $arrParticipant = [];\n if ($strDataID != \"\") {\n $strSQL = \"\n SELECT t1.id, t1.note, t1.status, t1.cost, t1.other_cost, \n t2.employee_id, t2.employee_name\n FROM hrd_training_request_participant AS t1 \n LEFT JOIN hrd_employee AS t2 ON t2.id = t1.id_employee \n WHERE t1.id_request = '$strDataID' \n \";\n $resDb = $db->execute($strSQL);\n while ($rowDb = $db->fetchrow($resDb)) {\n $arrParticipant[$rowDb['id']] = $rowDb;\n }\n writeLog(ACTIVITY_VIEW, MODULE_PAYROLL, \"\", 0);\n } else if (isset($_REQUEST['btnCreate'])) {\n $strPlanID = (isset($_REQUEST['id_plan'])) ? $_REQUEST['id_plan'] : \"\";\n if ($strPlanID != \"\") {\n /*\n $strSQL = \"\n SELECT t1.id, t1.note, t1.status, t2.employee_id, t2.employee_name, 0 as cost, 0 as other_cost\n FROM hrd_training_plan_participant AS t1\n LEFT JOIN hrd_employee AS t2 ON t2.id = t1.id_employee\n WHERE t1.id_plan = '$strPlanID' AND t1.status = 0\n \";\n */\n //Custom: hilangkan participant pada plan => mengacu participant pada request\n //EDIT : Harusnya kosong, ignore all\n /*\n $strSQL = \"SELECT t1.id, t1.note, t1.status, t2.employee_id, t2.employee_name, t1.cost, t1.other_cost\n FROM hrd_training_request_participant AS t1\n LEFT JOIN hrd_employee AS t2 ON t2.id = t1.id_employee\n LEFT JOIN hrd_training_request AS t3 ON t3.id = t1.id_request\n WHERE t3.id_plan = '$strPlanID'\";\n $resDb = $db->execute($strSQL);\n while ($rowDb = $db->fetchrow($resDb)) {\n $arrParticipant[$rowDb['id']] = $rowDb;\n }\n */\n }\n }\n $bolCurrentEmpIsParticipant = false;\n foreach ($arrParticipant AS $id => $rowDb) {\n $intRows++;\n $intShown++;\n //CUSTOM: bila employee - hide if not self\n $intRowsVisible = 1;\n $strCustomHide = \"\";\n global $arrUserInfo;\n if ($bolIsEmployee && $rowDb['employee_id'] != $arrUserInfo['employee_id']) {\n $strCustomHide = \" style=display:none \";\n $intShown--;\n $intRowsVisible = $intRows;\n } else {\n $bolCurrentEmpIsParticipant = true;\n }\n $strResult .= \"<tr valign=top $strCustomHide id=\\\"detailRows$intRows\\\">\\n\";\n //--------CUSTOM SELESAI-------------------\n $strResult .= \" <td align=right nowrap><input type=hidden name=detailID$intRows value=\\\"\" . $rowDb['id'] . \"\\\">$intRowsVisible&nbsp;</td>\";\n $strAction = \"onFocus = \\\"AC_kode = 'detailEmployeeID$intRows';AC_nama='detailName$intRows';\\\" \";\n $strResult .= \" <td><input type=text size=20 maxlength=50 name=detailEmployeeID$intRows id=detailEmployeeID$intRows value=\\\"\" . $rowDb['employee_id'] . \"\\\" $strAction></td>\";\n $strResult .= \" <td nowrap>&nbsp;<strong id=\\\"detailName$intRows\\\">\" . $rowDb['employee_name'] . \"</strong></td>\";\n $strResult .= \" <td><input type=text size=15 maxlength=20 name=detailAmount$intRows id=detailAmount$intRows value=\\\"\" . $rowDb['cost'] . \"\\\" class='numberformat numeric'></td>\";\n $strResult .= \" <td><input type=text size=15 maxlength=20 name=detailAmountOther$intRows id=detailAmountOther$intRows value=\\\"\" . $rowDb['other_cost'] . \"\\\" class='numberformat numeric'></td>\";\n $strResult .= \" <td>\" . getComboFromArray($arrStatus, \"detailStatus$intRows\", $rowDb['status']) . \"</td>\";\n $strResult .= \" <td><input type=text size=20 maxlength=50 name=detailNote$intRows id=detailNote$intRows value=\\\"\" . $rowDb['note'] . \"\\\"></td>\";\n $strAction = \" onChange = \\\"chkDeleteChanged($intRows);\\\" \";\n $strResult .= \" <td align=center title='cost \" . standardFormat(\n $rowDb['cost']\n ) . \"'>g<input type=checkbox id='chkID$intRows' name='chkID$intRows' $strAction></td>\\n\";\n // $strActionForm = \" onChange = \\\"chkPrintForm($intRows);\\\" \";\n // $strResult .= \" <td align=center title='id \" .$rowDb['employee_id'].\"'>f<input type=checkbox id='chkIDF$intRows' name='chkIDF$intRows' $strActionForm value='\" .$rowDb['id']. \"'></td>\\n\";\n // $strActionCertificate = \" onChange = \\\"chkPrintCertificate($intRows);\\\" \";\n // $strResult .= \" <td align=center title='id \" .$rowDb['employee_id'].\"'>f<input type=checkbox id='chkIDC$intRows' name='chkIDC$intRows' $strActionCertificate></td>\\n\";\n $strResult .= \"</tr>\\n\";\n $strTargetElements .= \",\\\"detailEmployeeID$intRows\\\"\";\n }\n // tambahkan dengan data kosong\n // Custom: bila employee - tampilkan max 1 data kosong; biar gampang langsung cek dia employee bukan\n if ($bolIsEmployee && !$bolCurrentEmpIsParticipant) {\n $intRows++;\n if ($intRows <= $intMaxShow) {\n $strResult .= \"<tr valign=top id=\\\"detailRows$intRows\\\">\\n\";\n $intShown++;\n $strDisabled = \"\";\n } else {\n $strResult .= \"<tr valign=top id=\\\"detailRows$intRows\\\" style=\\\"display:none\\\">\\n\";\n $strDisabled = \"disabled\";\n }\n $strResult .= \" <td align=right nowrap>$intRows&nbsp;</td>\";\n $strAction = \"onFocus = \\\"AC_kode = 'detailEmployeeID$intRows';AC_nama='detailName$intRows';\\\" \";\n //custom sedikit di sini\n global $arrUserInfo;\n $strResult .= \" <td><input type=text size=20 maxlength=50 name=detailEmployeeID$intRows id=detailEmployeeID$intRows $strDisabled $strAction value = '\" . $arrUserInfo['employee_id'] . \"' readonly></td>\";\n $strResult .= \" <td nowrap>&nbsp;<strong id=\\\"detailName$intRows\\\">\" . $arrUserInfo['employee_name'] . \"</strong></td>\";\n $strResult .= \" <td><input type=text size=15 maxlength=20 name=detailAmount$intRows id=detailAmount$intRows value=0 class='numberformat numeric'></td>\";\n $strResult .= \" <td><input type=text size=15 maxlength=20 name=detailAmountOther$intRows id=detailAmountOther$intRows value=0 class='numberformat numeric'></td>\";\n $strResult .= \" <td>\" . getComboFromArray($arrStatus, \"detailStatus$intRows\") . \"</td>\";\n $strResult .= \" <td><input type=text size=20 maxlength=50 name=detailNote$intRows id=detailNote$intRows></td>\";\n $strAction = \" onChange = \\\"chkDeleteChanged($intRows);\\\" \";\n $strResult .= \" <td align=center><input type=checkbox id='chkID$intRows' name='chkID$intRows' $strAction></td>\\n\";\n // $strActionForm = \" onChange = \\\"chkPrintForm($intRows);\\\" \";\n // $strResult .= \" <td align=center><input type=checkbox id='chkIDF$intRows' name='chkIDF$intRows' $strActionForm></td>\\n\";\n // $strActionCertificate = \" onChange = \\\"chkPrintCertificate($intRows);\\\" \";\n // $strResult .= \" <td align=center><input type=checkbox id='chkIDC$intRows' name='chkIDC$intRows' $strActionCertificate></td>\\n\";\n $strResult .= \"</tr>\\n\";\n $strTargetElements .= \",\\\"detailEmployeeID$intRows\\\"\";\n } else {\n //-------------CUSTOM SELESAI--------------------------\n for ($i = 1; $i <= $intAdd; $i++) {\n $intRows++;\n if ($intRows <= $intMaxShow) {\n $strResult .= \"<tr valign=top id=\\\"detailRows$intRows\\\">\\n\";\n $intShown++;\n $strDisabled = \"\";\n } else {\n $strResult .= \"<tr valign=top id=\\\"detailRows$intRows\\\" style=\\\"display:none\\\">\\n\";\n $strDisabled = \"disabled\";\n }\n $strResult .= \" <td align=right nowrap>$intRows&nbsp;</td>\";\n $strAction = \"onFocus = \\\"AC_kode = 'detailEmployeeID$intRows';AC_nama='detailName$intRows';\\\" \";\n $strResult .= \" <td><input type=text size=20 maxlength=50 name=detailEmployeeID$intRows id=detailEmployeeID$intRows $strDisabled $strAction></td>\";\n $strResult .= \" <td nowrap>&nbsp;<strong id=\\\"detailName$intRows\\\"></strong></td>\";\n $strResult .= \" <td><input type=text size=15 maxlength=20 name=detailAmount$intRows id=detailAmount$intRows value=0 class='numberformat numeric'></td>\";\n $strResult .= \" <td><input type=text size=15 maxlength=20 name=detailAmountOther$intRows id=detailAmountOther$intRows value=0 class='numberformat numeric'></td>\";\n $strResult .= \" <td>\" . getComboFromArray($arrStatus, \"detailStatus$intRows\") . \"</td>\";\n $strResult .= \" <td><input type=text size=20 maxlength=50 name=detailNote$intRows id=detailNote$intRows></td>\";\n $strAction = \" onChange = \\\"chkDeleteChanged($intRows);\\\" \";\n $strResult .= \" <td align=center><input type=checkbox id='chkID$intRows' name='chkID$intRows' $strAction></td>\\n\";\n // $strActionForm = \" onChange = \\\"chkPrintForm($intRows);\\\" \";\n // $strResult .= \" <td align=center><input type=checkbox id='chkIDF$intRows' name='chkIDF$intRows' $strActionForm></td>\\n\";\n // $strActionCertificate = \" onChange = \\\"chkPrintCertificate($intRows);\\\" \";\n // $strResult .= \" <td align=center><input type=checkbox id='chkIDC$intRows' name='chkIDC$intRows' $strActionCertificate></td>\\n\";\n $strResult .= \"</tr>\\n\";\n $strTargetElements .= \",\\\"detailEmployeeID$intRows\\\"\";\n }\n }\n $strButtons = \"\";\n //Custom: Employee cuma boleh lihat = 1 - dia or empty\n if (!$bolIsEmployee) {\n $strResult .= \" <tr valign=top><td>&nbsp;</td>\\n\";\n $strResult .= \" <td colspan=10>&nbsp;<a href=\\\"javascript:showMoreInput();\\\">\" . getWords(\n 'more'\n ) . \"</a></td></tr>\\n\";\n }\n $strResult .= \" <tr valign=top><td>&nbsp;</td>\\n\";\n // $strResult .= \" <td colspan=10><input name=\\\"btnPrintForm\\\" type=submit id=\\\"btnPrintForm\\\" value=\\\"\" .getWords('print form').\"\\\" onClick=\\\"goPrintForm();\\\">\";\n // $strResult .= \" &nbsp;<input name=\\\"btnPrintCertificate\\\" type=submit id=\\\"btnPrintCertificate\\\" value=\\\"\" .getWords('print certificate').\"\\\" onClick=\\\"goPrintCertificate();\\\"></td></tr>\";\n $strResult .= \" </table>\\n\";\n // tambahkan hidden data\n $strResult .= \"<input type=hidden id='maxDetail' name='maxDetail' value=$intRows>\";\n $strResult .= \"<input type=hidden id='numShow' name='numShow' value=$intShown>\";\n return $strResult;\n}", "title": "" }, { "docid": "741ef2c344bcf6e1486cfd7dfe27dd0d", "score": "0.51804566", "text": "public function providertestRequest()\r\n {\r\n return array(array(\"list\",\"course\"),array(\"list\",\"teacher\"));\r\n }", "title": "" }, { "docid": "cdfd5549ee4734b432b4d52ea4bf3333", "score": "0.515996", "text": "public function testResumeMember()\n {\n }", "title": "" }, { "docid": "d7d6f596d951018de54bdf74938543c3", "score": "0.51570845", "text": "public function dataprovider_learningobjectives() {\n // Array for storing our runs.\n $runs = array();\n\n // Records that we will be re-using.\n $sufficientgraderecord = array(\n 'classid' => 100,\n 'grade' => 100,\n 'completestatusid' => STUSTATUS_NOTCOMPLETE,\n 'locked' => 0\n );\n $sufficientgraderecordcompleted = array(\n 'classid' => 100,\n 'grade' => 100,\n 'completestatusid' => STUSTATUS_PASSED,\n 'locked' => 1\n );\n $insufficientgraderecord = array(\n 'classid' => 100,\n 'grade' => 0,\n 'completestatusid' => STUSTATUS_NOTCOMPLETE,\n 'locked' => 0\n );\n\n $sufficientlograderecord = array(\n 'completionid' => 1,\n 'classid' => 100,\n 'grade' => 100,\n 'locked' => 0\n );\n $insufficientlograderecord = array(\n 'completionid' => 1,\n 'classid' => 100,\n 'grade' => 0,\n 'locked' => 0\n );\n\n // Arrays specifying user ids.\n $firstuser = array('userid' => 103);\n $seconduser = array('userid' => 104);\n\n /*\n * run with sufficient enrolment grade but insufficient required LO grade\n */\n\n // Each user has an enrolment record with a sufficient grade.\n $enrolments = array();\n $enrolments[] = array_merge($sufficientgraderecord, $firstuser);\n $enrolments[] = array_merge($sufficientgraderecord, $seconduser);\n\n // Each user has an LO grade record with an insufficient grade.\n $logrades = array();\n $logrades[] = array_merge($insufficientlograderecord, $firstuser);\n $logrades[] = array_merge($insufficientlograderecord, $seconduser);\n\n // Each user has a matching in progress and unlocked record.\n $expectedenrolments = array();\n $expectedenrolments[] = array_merge($sufficientgraderecord, $firstuser);\n $expectedenrolments[] = array_merge($sufficientgraderecord, $seconduser);\n $runs[] = array($enrolments, $logrades, $expectedenrolments, 100);\n\n /*\n * run with insufficient enrolment grade but sufficient required LO grade\n */\n\n // Each user has an enrolment record with an insufficient grade.\n $enrolments = array();\n $enrolments[] = array_merge($insufficientgraderecord, $firstuser);\n $enrolments[] = array_merge($insufficientgraderecord, $seconduser);\n\n // Each user has an LO grade record with a sufficient grade.\n $logrades = array();\n $logrades[] = array_merge($sufficientlograderecord, $firstuser);\n $logrades[] = array_merge($sufficientlograderecord, $seconduser);\n\n // Each user has a matching in progress and unlocked record.\n $expectedenrolments = array();\n $expectedenrolments[] = array_merge($insufficientgraderecord, $firstuser);\n $expectedenrolments[] = array_merge($insufficientgraderecord, $seconduser);\n\n $runs[] = array($enrolments, $logrades, $expectedenrolments, 100);\n\n /*\n * run with sufficient enrolment grade and sufficient required LO grade\n */\n\n // Each user has an enrolment record with a sufficient grade.\n $enrolments = array();\n $enrolments[] = array_merge($sufficientgraderecord, $firstuser);\n $enrolments[] = array_merge($sufficientgraderecord, $seconduser);\n\n // Each user has an LO grade record with a sufficient grade.\n $logrades = array();\n $logrades[] = array_merge($sufficientlograderecord, $firstuser);\n $logrades[] = array_merge($sufficientlograderecord, $seconduser);\n\n // Each user has a matching passed and locked record.\n $expectedenrolments = array();\n $expectedenrolments[] = array_merge($sufficientgraderecordcompleted, $firstuser);\n $expectedenrolments[] = array_merge($sufficientgraderecordcompleted, $seconduser);\n\n $runs[] = array($enrolments, $logrades, $expectedenrolments, 100);\n\n // Return all data.\n return $runs;\n }", "title": "" }, { "docid": "a5f8a35bae3a214f2d76ff342e7d3794", "score": "0.5147478", "text": "public function traininglist()\n {\n return view('training.opentraining.index');\n }", "title": "" }, { "docid": "2ac6688dd0e86d561b63bc96c65a5a0f", "score": "0.5127697", "text": "public function show(Train $train)\n {\n //\n }", "title": "" }, { "docid": "9a5d0b3ae4ddf7c6bc7eb1e9195d9587", "score": "0.5124748", "text": "function train(){\n\t\t$sql = \"SELECT bow.idWord,COUNT(bow.idWord) as total from bow,sample WHERE bow.idTuit = sample.idTuit and sample.trainingSet = 1 and sample.class = 0 GROUP BY idWord\";\n\t\t$result = mysql_query($sql) or die(\"Classifier->train: error en consulta\".mysql_error().\"SQL: \".$sql);\n\t\t\n\t\twhile ($row = mysql_fetch_array($result, MYSQL_NUM)) {\n \t\t$idWord = $row[0]; \n\t\t\t$count = $row[1]; \n\t\t\t$sql = \"UPDATE dictionary SET n_nondoc = $count WHERE idWord = $idWord\";\n\t\t\tmysql_query($sql) or die(\"Classifier->train_2: error en consulta\".mysql_error().\"SQL: \".$sql);\n\t\t}\n\t\t\n\t\t//luego los no documentales\n\t\t$sql = \"SELECT bow.idWord,COUNT(bow.idWord) as total from bow,sample WHERE bow.idTuit = sample.idTuit and sample.trainingSet = 1 and sample.class = 1 GROUP BY idWord\";\n\t\t$result = mysql_query($sql) or die(\"Classifier->train_3: error en consulta\".mysql_error().\"SQL: \".$sql);\n\t\t\n\t\twhile ($row = mysql_fetch_array($result, MYSQL_NUM)) {\n \t\t$idWord = $row[0]; \n\t\t\t$count = $row[1]; \n\t\t\t$sql = \"UPDATE dictionary SET n_doc = $count WHERE idWord = $idWord\";\n\t\t\tmysql_query($sql) or die(\"Classifier->train_4: error en consulta\".mysql_error().\"SQL: \".$sql);\n\t\t}\n\t\n\t}", "title": "" }, { "docid": "57da6bb5e238fb2d8aff19eb0773c0b2", "score": "0.5114565", "text": "public function showTrails()\n {\n return $this->load->model('Trail')->fetchTrails();\n }", "title": "" }, { "docid": "07fd41498675829de382c2ed0a06e86c", "score": "0.5082285", "text": "function getRequestedTeamTeaches() {\n global $CFG;\n\n $sql = \"SELECT * FROM\n {$CFG->prefix}block_courseprefs_teamteach\n WHERE usersid = {$this->id}\n AND status != 'undo'\";\n\n $results = get_records_sql($sql);\n $teamteaches = array();\n\n // Return an empty array if there are no records to process\n if (!$results) {\n return $teamteaches;\n }\n\n foreach ($results as $result) {\n $teamteaches[$result->id] = new CoursePrefsTeamTeach($result->usersid, \n $result->sectionsid, $result->tt_sectionsid, $result->status,\n $result->approval_flag, $result->id);\n }\n return $teamteaches;\n }", "title": "" }, { "docid": "765ed3c244627c5dfa7c01c6729fb825", "score": "0.50457436", "text": "public function show()\n {\n $user = Auth::user();\n $pt = $user->trainings;\n \n return view('trainings.show',compact('pt'));\n }", "title": "" }, { "docid": "da990fcd3b4e9ddab28872812eb058cf", "score": "0.5045564", "text": "public function getAllTeachers() {\n\n return $this->allTeachers;\n}", "title": "" }, { "docid": "656b6bb76bd8301cd3a8018c036e7266", "score": "0.502879", "text": "private function get_data()\n\t{\n\t\treturn $this->member_model->get_data();\n\t}", "title": "" }, { "docid": "aa1c1a3b5b1f3f22f8826e253374117f", "score": "0.5016914", "text": "public function show(TrainingInstitute $trainingInstitute)\n {\n //\n }", "title": "" }, { "docid": "5c80db38634bdb19c6cc3dda46d716c4", "score": "0.50119275", "text": "function &getInvestigators() {\n\t\treturn $this->investigators;\n\t}", "title": "" }, { "docid": "acbe614c51b3087030f1bab22cb742b9", "score": "0.50090235", "text": "public function test_admin_training_list_b()\n {\n $this->request('GET', ['pages/MemberSkills', 'training_programs']);\n $this->assertResponseCode(404);\n }", "title": "" }, { "docid": "8f132442cd1027cfd1565b615ed477e7", "score": "0.4985524", "text": "public function gagnerExperience()\n {\n $this->_experience++;\n }", "title": "" }, { "docid": "0336e703f91908d2eb87bfd5f633976a", "score": "0.49821493", "text": "public function show(Trainer $trainer)\n {\n //\n }", "title": "" }, { "docid": "c7b3d221b6c6b1ad090c3d26247c5ccb", "score": "0.4953722", "text": "public function training()\n {\n return view('training');\n }", "title": "" }, { "docid": "16335368908fface8abb0d223d20ec97", "score": "0.49337983", "text": "public function showAction(Local $local)\n {\n\t\t$this->setActivity($local->getReference().\" have been seen by this user\");\n\t\t$em = $this->getDoctrine()->getManager();\n \t$deleteForm = $this->createDeleteForm($local);\n\t\t$oGroup=$aStudents=$aTeachers=$training=$bGroup=$oContract=null;\t\n\t\t$now = new \\DateTime();\n\t\t$aTraining=$aStudents=$aTeachers=$aGroup=$aTeacherSchedule=null;\n\t\t$aContracts = $this->getContractsInLocal($local);\n\t\tif($local->getStatus()==0 and count($aContracts)>0) $this->updateStatusByLocal($local);\n\t\tif(isset($aContracts[0])){\n\t\t\tforeach($aContracts as $oContract){\n\t\t\t\t$trainings = $em->getRepository('BoAdminBundle:Training')->findBy(array('contracts'=>$oContract));\n\t\t\t\t$aCTraining[$oContract->getId()] = $trainings;\n\t\t\t\t//if($oContract->getGroup()) $aGroup[] = $oContract->getGroup();\n\t\t\t\t$students = $oContract->getStudents();\n\t\t\t\t$aCStudents[$oContract->getId()] = $students;\n\t\t\t\t$teachers = $oContract->getEmployee();\t\n\t\t\t\t$aCTeachers[$oContract->getId()] = $teachers;\n\t\t\t\t$teacherschedule = $em->getRepository('BoAdminBundle:Agenda')->getTeacherschedule($teachers,$oContract);\t\n\t\t\t\t$aCTeacherSchedule[$oContract->getId()] = $teacherschedule[0];\n\t\t\t}\t\t\t\n\t\t}\n\t\t$aGroup=$this->getGroupInLocal($local);\n\t\tif($local->getStatus()==0 and count($aGroup)>0) $this->updateStatusByLocal($local);\n\t\tif(isset($aGroup[0])){\n\t\t\tforeach($aGroup as $oGroup){\n\t\t\t\t$trainings = $em->getRepository('BoAdminBundle:Training')->findBy(array('idgroup'=>$oGroup->getId()));\n\t\t\t\t$aGTraining[$oGroup->getId()] = $trainings;\n\t\t\t\t//$bGroup = 1;\t\n\t\t\t\t$teachers = $oGroup->getEmployee(); \n\t\t\t\t$aGTeachers[$oGroup->getId()] = $teachers;\n\t\t\t\t$students = $em->getRepository('BoAdminBundle:Students')->StudentByGroup($oGroup);\n\t\t\t\t$aGStudents[$oGroup->getId()] = $students;\n\t\t\t\t$aContracts=null;\t\n\t\t\t\t$teacherschedule = $em->getRepository('BoAdminBundle:Agenda')->getGTeacherschedule($teachers,$oGroup);\n\t\t\t\t$aGTeacherSchedule[$oGroup->getId()] = $teacherschedule;\n\t\t\t\t\n\t\t\t}\n\t\t}\n \treturn $this->render('local/show.html.twig', array(\n\t\t\t'ctrainings'=>isset($aCTraining)?$aCTraining:null,\n\t\t\t'gtrainings'=>isset($aGTraining)?$aGTraining:null,\n \t\t'local' => $local,\n\t\t\t'cstudents'=>isset($aCStudents)?$aCStudents:null,\n\t\t\t'gstudents'=>isset($aGStudents)?$aGStudents:null,\n\t\t\t'contracts'=>$aContracts,\n\t\t\t'status'=>$this->getLocalStatus(),\n\t\t\t'cteachers'=>isset($aCTeachers)?$aCTeachers:null,\n\t\t\t'gteachers'=>isset($aGTeachers)?$aGTeachers:null,\n\t\t\t'cteacherschedule'=>isset($aCTeacherSchedule)?$aCTeacherSchedule:null,\n\t\t\t'gteacherschedule'=>isset($aGTeacherSchedule)?$aGTeacherSchedule:null,\n\t\t\t'groups'=>$aGroup,\n\t\t\t'now' => $now,\n \t\t'delete_form' => $deleteForm->createView(),\n\t\t\t'pm'=>\"local\",\n\t\t\t'sm'=>\"local\",\n \t));\n }", "title": "" }, { "docid": "3971f000e2162165cf9f3bd7cc0438aa", "score": "0.49295107", "text": "public function index()\n {\n $user = auth()->user();\n\n if($user->hasRole(['admin'])){\n $trainings = Training::all();\n $trainings = Training::orderBy('day', 'desc')->paginate(5); \n }else if ($user->hasRole(['trainer'])){\n $trainings = Training::where('user_id' , $user->id)->orderBy('day', 'desc')->paginate(5);\n }\n\n // dd($trainings);\n\n return view('trainings.index' , compact('trainings'));\n }", "title": "" }, { "docid": "0584435fbea4922a1091d44165fb69eb", "score": "0.4909333", "text": "public function cetakUserTraining($nik){\n $userTraining = GleadsModulMember::\n join('trans_gleads_skill','trans_data_gleads_temp.skill_name','=','trans_gleads_skill.skill_name')\n ->join('trans_gleads_module','trans_data_gleads_temp.modul_id','=','trans_gleads_module.modul_id')\n ->where('user_id','=',$nik)\n ->where('trans_gleads_skill.valid','=','Y')\n ->where('trans_gleads_module.valid','=','Y')\n ->orderBy('jenis', 'DESC')\n ->orderBy('trans_data_gleads_temp.completed_on', 'ASC')\n ->get(['trans_data_gleads_temp.user_id',\n 'trans_data_gleads_temp.user_name',\n 'trans_gleads_skill.skill_name',\n 'trans_gleads_module.nama_training',\n 'trans_gleads_skill.mulai',\n 'trans_gleads_skill.selesai',\n 'trans_gleads_skill.jenis',\n 'trans_gleads_module.modul_name',\n 'trans_gleads_skill.program_name',\n 'trans_data_gleads_temp.completed_on',\n 'trans_gleads_skill.nama_training as skill_training'\n ]);\n //Table pegawai belum ada\n $karyawan = TransKaryawan::where('NIP','=',$nik)->first();\n \n $trainingAll = GleadsModulMember::all();\n $no = 0;\n Log::debug('Mulai...........');\n foreach ($trainingAll as $item) {\n $records = json_decode($item, true);\n $modulPegawai = new TransModulPegawai($records);\n // dd($item);\n // $modulPegawai = $item;\n // $modulPegawai->user_id=$item->user_id;\n // $modulPegawai->user_name=$item->user_name;\n // $modulPegawai->email=$item->email;\n // $modulPegawai->mobile_number=$item->mobile_number;\n // $modulPegawai->user_status=$item->user_status;\n // $modulPegawai->module_name=$item->module_name;\n // $modulPegawai->module_type=$item->module_type;\n // $modulPegawai->primary_tag=$item->primary_tag;\n // $modulPegawai->secondary_tag=$item->secondary_tag;\n // $modulPegawai->estimated_duration=$item->estimated_duration;\n // $modulPegawai->time_spent=$item->time_spent;\n // $modulPegawai->enrollment_type=$item->enrollment_type;\n // $modulPegawai->module_status=$item->module_status;\n // $modulPegawai->completion_percentage=$item->completion_percentage;\n // $modulPegawai->enrolled_on=$item->enrolled_on;\n // $modulPegawai->started_on=$item->started_on;\n // $modulPegawai->completed_on=$item->completed_on;\n // $modulPegawai->last_accessed_on=$item->last_accessed_on;\n // $modulPegawai->is_complete=$item->is_complete;\n // $modulPegawai->program_name=$item->program_name;\n // $modulPegawai->skill_name=$item->skill_name;\n // $modulPegawai->assessment_count=$item->assessment_count;\n // $modulPegawai->pass_count=$item->pass_count;\n // $modulPegawai->average_score=$item->average_score;\n // $modulPegawai->designation=$item->designation;\n // $modulPegawai->department=$item->department;\n // $modulPegawai->sub_department=$item->sub_department;\n // $modulPegawai->location=$item->location;\n // $modulPegawai->grade=$item->grade;\n // $modulPegawai->change_agent=$item->change_agent;\n // $modulPegawai->created_at=$item->created_at;\n // $modulPegawai->updated_at=$item->updated_at;\n // $modulPegawai->create_by=$item->create_by;\n // $modulPegawai->update_by=$item->update_by;\n // $modulPegawai->modul_id=$item->modul_id;\n // $modulPegawai->last_update=$item->last_update;\n \n $modulPegawai->save();\n $no++;\n }\n Log::debug($no.' '.$item->user_id.' '.$item->user_name);\n\n\n Log::debug('Selesai...............');\n return view('report/repusertrainingcetak',['karyawan'=>$karyawan,'nik'=>$nik,'usertraining'=>$userTraining]);\n // return view('report.repusertraining');//,['program'=>$programs]);\n }", "title": "" }, { "docid": "09d128f43e61ddca480c9166ad14cdf6", "score": "0.48982495", "text": "function getInterceptionPoints() ;", "title": "" }, { "docid": "082929cf8fd5a009767694ffe08a22c9", "score": "0.4897977", "text": "public function __wakeup()\n\t{\n\t $this->boolTrain = FALSE;\n\t}", "title": "" }, { "docid": "4d43e4198cf58ce998d2606f1041a2e8", "score": "0.48893097", "text": "public function trainingStatus()\n {\n return $this->hasOne('App\\TrainingStatus', 'log_id');\n }", "title": "" }, { "docid": "33d8cc61aeb8177ebeebaa6c78850407", "score": "0.4885814", "text": "public function run()\n {\n $trainer1 = Trainer::find(1);\n $trainer2 = Trainer::find(2);\n\n $edu1 = new Education();\n $edu1->school = 'Saint Louis University';\n $edu1->year_graduated = 2017;\n $edu1->trainer()->associate($trainer1)->save();\n \n $edu1 = new Education();\n $edu1->school = 'University of the Philippines';\n $edu1->year_graduated = 2018;\n $edu1->trainer()->associate($trainer1)->save();\n \n $edu2 = new Education();\n $edu2->school = 'University of Baguio';\n $edu2->year_graduated = 2018;\n $edu2->trainer()->associate($trainer2)->save();\n }", "title": "" }, { "docid": "3cc0a04bdc327a4c99ee57cb00d91a1f", "score": "0.4880942", "text": "public function Individualgetdata();", "title": "" }, { "docid": "9236d0c123f8f5a28b53e173a96fd827", "score": "0.48644578", "text": "function takeObjective() {\n return Engine::send('takeObjective');\n}", "title": "" }, { "docid": "234e0fb3fe10c9180240f8ca987695e6", "score": "0.48490578", "text": "public function dataprovider_nolearningobjectives() {\n // Array for storing our runs.\n $runs = array();\n\n // Records that we will be re-using.\n $sufficientgraderecord = array(\n 'classid' => 100,\n 'grade' => 100,\n 'completestatusid' => STUSTATUS_NOTCOMPLETE,\n 'locked' => 0\n );\n\n $sufficientgraderecordcompleted = array(\n 'classid' => 100,\n 'grade' => 100,\n 'completestatusid' => STUSTATUS_PASSED,\n 'locked' => 1\n );\n $insufficientgraderecord = array(\n 'classid' => 101,\n 'grade' => 0,\n 'completestatusid' => STUSTATUS_NOTCOMPLETE,\n 'locked' => 0\n );\n\n // Arrays specifying user ids.\n $firstuser = array('userid' => 103);\n $seconduser = array('userid' => 104);\n\n /*\n * run with just sufficient grades\n */\n\n // Each user has an enrolment record with a sufficient grade on class 100.\n $enrolments = array();\n $enrolments[] = array_merge($sufficientgraderecord, $firstuser);\n $enrolments[] = array_merge($sufficientgraderecord, $seconduser);\n\n // Each user has a matching expected passed and locked record.\n $expectedenrolments = array();\n $expectedenrolments[] = array_merge($sufficientgraderecordcompleted, $firstuser);\n $expectedenrolments[] = array_merge($sufficientgraderecordcompleted, $seconduser);\n $runs[] = array($enrolments, $expectedenrolments, array(100, 101));\n\n /*\n * run with just insufficient grades\n */\n\n // Each user has an enrolment record with an insufficient grade on class 101.\n $enrolments = array();\n $enrolments[] = array_merge($insufficientgraderecord, $firstuser);\n $enrolments[] = array_merge($insufficientgraderecord, $seconduser);\n\n // Each user has a matching expected in progress and unlocked record.\n $expectedenrolments = array();\n $expectedenrolments[] = array_merge($insufficientgraderecord, $firstuser);\n $expectedenrolments[] = array_merge($insufficientgraderecord, $seconduser);\n $runs[] = array($enrolments, $expectedenrolments, array(100, 101));\n\n /*\n * run with both sufficient and an insufficient grades\n */\n\n // Each user has one sufficient and one insufficient grade.\n $enrolments = array();\n $enrolments[] = array_merge($sufficientgraderecord, $firstuser);\n $enrolments[] = array_merge($sufficientgraderecord, $seconduser);\n $enrolments[] = array_merge($insufficientgraderecord, $firstuser);\n $enrolments[] = array_merge($insufficientgraderecord, $seconduser);\n\n // The matching expected output.\n $expectedenrolments = array();\n $expectedenrolments[] = array_merge($sufficientgraderecordcompleted, $firstuser);\n $expectedenrolments[] = array_merge($sufficientgraderecordcompleted, $seconduser);\n $expectedenrolments[] = array_merge($insufficientgraderecord, $firstuser);\n $expectedenrolments[] = array_merge($insufficientgraderecord, $seconduser);\n\n $runs[] = array($enrolments, $expectedenrolments, array(100, 101));\n\n // Return all data.\n return $runs;\n }", "title": "" }, { "docid": "a8308bfdde20109685a30c05185147b2", "score": "0.48266432", "text": "public function get_classtrainer(){\n $class = $this->input->get('class');\n $class_details = $this->class->get_class_details($this->tenant_id, $class);\n $trainer_details = $this->classtraineemodel->get_trainer_names($class_details->classroom_trainer);\n $trainers = array();\n foreach ($trainer_details as $trainer) {\n $trainers[] = array('user_id' => $trainer->user_id, 'trainer_name' => $trainer->first_name.' '.$trainer->last_name);\n }\n echo json_encode(array('success' => true, 'data' => $trainers));\n exit();\n }", "title": "" }, { "docid": "35b769783d808b4c2f21e906c1fe8181", "score": "0.4824787", "text": "public function testProfilePrototypeGetReviews()\n {\n\n }", "title": "" }, { "docid": "0c635c87cc9bac2ca6d927844c0bcf65", "score": "0.482396", "text": "public function getExtTrainList()\n {\n $this->db->select(\"th_ref_id, th_training_title, to_char(th_date_from,'DD/MM/YYYY') th_date_from, to_char(th_date_to,'DD/MM/YYYY') th_date_to\");\n $this->db->from(\"ims_hris.training_head\");\n $this->db->where(\"th_internal_external = 'EXTERNAL_AGENCY'\");\n $this->db->where(\"th_status = 'APPROVE'\");\n $q = $this->db->get();\n \n return $q->result_case('UPPER');\n }", "title": "" }, { "docid": "c04c835b59e6dbed22cd9748f1eef4a8", "score": "0.4822195", "text": "public function getGoal()\n{\nreturn $this->goal;\n}", "title": "" }, { "docid": "e398538ad49d9d4e275536f6cd050d5b", "score": "0.48212615", "text": "public function trainer()\n {\n return $this->hasOne('App\\Models\\Trainer');\n }", "title": "" }, { "docid": "220da6d5c2d5f86e796953de664391a8", "score": "0.48153043", "text": "public function getSkill();", "title": "" }, { "docid": "647e162f0366fccfee38cfa409eb9ac9", "score": "0.48153007", "text": "public function index()\n {\n $upcoming = Training::where('date', '>=', date('Y-m-d'))->with(['replies' => function ($query) {\n $query->where('user_id', '=', Auth::user()->id)->get();\n }])->orderBy('date', 'asc')->get();\n $past = Training::where('date', '<', date('Y-m-d'))->with(['replies' => function ($query) {\n $query->where('user_id', '=', Auth::user()->id)->get();\n }])->orderBy('date', 'asc')->get();\n\n $view_variables = [\n 'upcoming' => $upcoming,\n 'past' => $past,\n 'title' => 'Trainings',\n 'sidebar' => true,\n 'active' => $this->active,\n 'reply_legend' => true,\n ];\n\n if(count($upcoming) > 0) {\n $next_training = $upcoming[0];\n\n $date1 = new \\DateTime($next_training->date . ' ' . $next_training->start_time);\n $now = new \\DateTime();\n\n $next_training->diff = $date1->diff($now);\n\n $view_variables['next_training'] = $next_training;\n }\n\n if($max_players = $this->getMaxPlayers('trainings')) {\n $view_variables['game_name'] = 'Trainings';\n $view_variables['max_players'] = $max_players;\n }\n\n return view('games.trainings.index')->with($view_variables);\n }", "title": "" }, { "docid": "e3ec14c694751acc40540b78b29793d1", "score": "0.48124495", "text": "public function preRetrieve();", "title": "" }, { "docid": "f8ff0b2b3bab9beca39681a288abdd8e", "score": "0.4807586", "text": "public function testProfilePrototypeGetLikes()\n {\n\n }", "title": "" }, { "docid": "98920fc125a52628e4ef68526fb80a28", "score": "0.4796074", "text": "public function getTrainingInfo($training_id){\n\n\t\t$select = $this->select()\n\t\t->from($this->_name, array('*'))\n\t\t->setIntegrityCheck(false)\n\t// ->join(array('c' => 'course'), \"$this->_name.training_title_option_id = c.id\",'training_title_option_id')\n\t\t->join(array('t' => 'training_title_option'), \"training_title_option_id = t.id\", array('training_title' => 'training_title_phrase'))\n\t\t->joinLeft(array('tl' => 'training_location'), \"$this->_name.training_location_id = tl.id\", 'training_location_name')\n\t\t->joinLeft(array('tg' => 'training_got_curriculum_option'), \"$this->_name.training_got_curriculum_option_id = tg.id\",'training_got_curriculum_phrase')\n\t\t->joinLeft(array('tlvl' => 'training_level_option'), \"$this->_name.training_level_option_id = tlvl.id\", 'training_level_phrase')\n\t\t->joinLeft(array('torg' => 'training_organizer_option'), \"$this->_name.training_organizer_option_id = torg.id\", array('training_organizer' => 'training_organizer_phrase'))\n\t\t//->joinLeft(array('tt' => 'training_topic_option'), \"$this->_name.training_topic_option_id = tt.id\",'training_topic_phrase')\n\t\t->where(\"$this->_name.id = $training_id\");\n\t\t$rowRay = $this->fetchRow($select);\n\t\tif ($rowRay)\n\t\t\t$rowRay = $rowRay->toArray();\n\n\t\t// now get pepfar\n\t\t$select = $this->select()\n\t\t->from('training_to_training_pepfar_categories_option', array())\n\t\t->setIntegrityCheck(false)\n\t\t->join(array('tp' => 'training_pepfar_categories_option'), \"training_to_training_pepfar_categories_option.training_pepfar_categories_option_id = tp.id\",'pepfar_category_phrase')\n\t\t->where(\"training_to_training_pepfar_categories_option.training_id = $training_id\");\n\n\t\t$rows = $this->fetchAll($select);\n\t\tforeach($rows as $r) {\n\t\t\t$pepfar[] = $r->pepfar_category_phrase;\n\t\t}\n\t\tif(!isset($pepfar)) $pepfar = array('n/a');\n\t\t$rowRay['pepfar'] = implode(', ', $pepfar);\n\n\t\t// get training topic(s)\n\t\t$select = $this->select()\n\t\t->from('training_to_training_topic_option', array())\n\t\t->setIntegrityCheck(false)\n\t\t->join(array('tp' => 'training_topic_option'), \"training_to_training_topic_option.training_topic_option_id = tp.id\",'training_topic_phrase')\n\t\t->where(\"training_to_training_topic_option.training_id = $training_id AND training_topic_option_id != 0\");\n\n\t\t$rows = $this->fetchAll($select);\n\t\tforeach($rows as $r) {\n\t\t\t$topic[] = $r->training_topic_phrase;\n\t\t}\n\t\tif(!isset($topic)) $topic = array('n/a');\n\t\t$rowRay['training_topic_phrase'] = implode(', ', $topic);\n\n\t\treturn $rowRay;\n\t}", "title": "" }, { "docid": "8b293468ad44614e1e22cc69b504a7f9", "score": "0.4769988", "text": "public function getById($id = '')\n {\n \ttry {\n \t\tif($id === ''){\n \t\t\treturn ResponseHelper::armyResponse(false, 200, \"Error\", \"Error: no se recibio el parametro de busqueda.\") ;\n \t\t}\n\t\t\t// Cargo los entrenamientos.\n\t\t\t$training = Training::with('distance','level','duration')->find($id);\n\n\t\t\tif( $training !== null )\n\t\t\t{\n\t\t\t\t// Recorro los entrnamientos para cargar los stage.\n\t\t\t\t$training->stage;\n\t\t\t\tforeach ($training->stage as $key => $stage) {\n\t\t\t\t\t$training->stage[$key]->checkpoint;\n\t\t\t\t}\n\t\t\t}\t\t\t\n \t} catch (\\Exception $e) {\n \t\treturn ResponseHelper::armyResponse(false, 400, \"Internal Error\", \"Error: \" . $e->getMessage()) ;\n \t}\n \treturn ResponseHelper::armyResponse(true, 200, $training, '');\n }", "title": "" }, { "docid": "61f51e24946afda8e98663683c73e615", "score": "0.4765799", "text": "public function getResults()\n {\n }", "title": "" }, { "docid": "db626499aad4850ce4b0fee587c8d996", "score": "0.47599587", "text": "public function getTrainingProgramme() {\n\t\trequire_once(\"./Modules/TrainingProgramme/classes/class.ilObjTrainingProgramme.php\");\n\t\t$refs = ilObject::_getAllReferences($this->assignment->getRootId());\n\t\tif (!count($refs)) {\n\t\t\tthrow new ilException(\"ilTrainingProgrammeUserAssignment::getTrainingProgramme: \"\n\t\t\t\t\t\t\t\t .\"could not find ref_id for program '\"\n\t\t\t\t\t\t\t\t .$this->assignment->getRootId().\"'.\");\n\t\t}\n\t\treturn ilObjTrainingProgramme::getInstanceByRefId(array_shift($refs));\n\t}", "title": "" }, { "docid": "3364828155fb151d4d08434b8cf483ea", "score": "0.47562984", "text": "public function getnextgiftlevelAction()\n {\n \ttry {\n\t \t$uid = $this->uid;\n\t \t$result = Hapyfish2_Island_Bll_User::getUserNextBigGiftLevel($uid);\n\t \t$this->echoResult($result);\n \t} catch (Exception $e) {\n }\n }", "title": "" }, { "docid": "832f607eca3412d7964d490f145db4bd", "score": "0.47545332", "text": "public function getExperience();", "title": "" }, { "docid": "b1e1d593e2690ff5edf4ebc03eb931d9", "score": "0.47514606", "text": "public function getTrainingHead($refid)\n {\n $this->db->select(\"th_ref_id,\n th_type,\n th_category,\n th_level,\n th_training_title,\n th_training_desc,\n th_training_venue,\n th_training_country,\n th_training_state,\n to_char(th_date_from, 'dd/mm/yyyy') th_date_from2,\n to_char(th_date_to, 'dd/mm/yyyy') th_date_to2,\n th_total_hours,\n th_training_fee,\n th_internal_external,\n th_sponsor,\n th_max_participant,\n th_open,\n to_char(th_apply_closing_date, 'dd/mm/yyyy') th_apply_closing_date2,\n th_competency_code,\n to_char(th_evaluation_date_from, 'dd/mm/yyyy') th_evaluation_date_from2,\n to_char(th_evaluation_date_to, 'dd/mm/yyyy') th_evaluation_date_to2,\n th_organizer_level,\n th_organizer_name,\n th_evaluation_compulsory,\n th_attendance_type,\n th_print_certificate,\n th_status\n \");\n\n $this->db->from(\"ims_hris.training_head\");\n $this->db->where(\"th_ref_id\", $refid);\n $q = $this->db->get();\n \n return $q->row_case('UPPER');\n }", "title": "" }, { "docid": "d5751c2570f319e08410765c75e57f49", "score": "0.474446", "text": "public function index(){\n $this->existing_profile=$this->profile_model->read_highest_rank_profiles(1);\n \n //Fetch this profile with the api and ensure it matches\n $test_name=\"Checking API can be used to fetch the top profile\";\n $test1=$this->checkingApiCanFetchAProfile($this->existing_profile[0]['user_id']);\n $expected_result=TRUE;\n echo $this->unit->run($test1,$expected_result,$test_name,$notes=\"Assumes atleast 1 account is created\");\n\n //Fetch the same profile by searching for it using its first_name\n $test_name=\"Checking API can be used to fetch same profile using search\";\n $test2=$this->checkingApiCanFetchProfileUsingSearch($this->existing_profile[0]['first_name']);\n $expected_result=TRUE;\n echo $this->unit->run($test2,$expected_result,$test_name,$notes=\"Assumes first result found has identical first name\");\n \n }", "title": "" }, { "docid": "74ef66d58d3bc3ce86c4ed7868eee829", "score": "0.47433376", "text": "public function indexTrainer()\n {\n // Check Access\n has_access(generate_method(__METHOD__), Auth::user()->role);\n\n\t\tif(Auth::user()->is_admin == 1){\n // Data Sertifikat\n $sertifikat = Pelatihan::join('users','pelatihan.trainer','=','users.id_user')->orderBy('tanggal_pelatihan_from','desc')->get();\n\t\t\t\n // View\n return view('faturcms::admin.sertifikat.trainer', [\n 'sertifikat' => $sertifikat,\n ]);\n\t\t}\n\t\telseif(Auth::user()->is_admin == 0){\n\t\t\t// Data Sertifikat\n\t\t\t$sertifikat = Pelatihan::join('users','pelatihan.trainer','=','users.id_user')->where('users.id_user','=',Auth::user()->id_user)->orderBy('tanggal_pelatihan_from','desc')->get();\n\t\t\t\n\t\t\t// View\n\t\t\treturn view('faturcms::member.sertifikat.trainer', [\n\t\t\t\t'sertifikat' => $sertifikat,\n\t\t\t]);\n\t\t}\n }", "title": "" }, { "docid": "e0e0d64dc73fb58904b8cb37eb1ead40", "score": "0.47361618", "text": "public function trainer()\n\t{\n\t\treturn $this->belongsTo('App\\User', 'trainer_uuid', 'uuid');\n\t}", "title": "" }, { "docid": "7e1c082253fe83bf0f248cb7b70fb60e", "score": "0.47305813", "text": "public function waiting_requester(){\n\n }", "title": "" }, { "docid": "ac9e4e10b30e0f5599dfd2268d971843", "score": "0.47279635", "text": "public function loadTrainerName(){\r\n\t\t\t$objDBConn = DBManager::getInstance();\r\n\t\t\tif($objDBConn->dbConnect()){\r\n\t\t\t\t$query = \"select trainerid, firstname, lastname from trainer\";\r\n\t\t\t\t$result = mysql_query($query); \r\n\t\t\t}\r\n\t\t\t$objDBConn->dbClose();\r\n\t\t\treturn $result;\r\n\t\t\t\r\n\t\t}", "title": "" }, { "docid": "c453db165332204eb92ec82a1166e978", "score": "0.47237873", "text": "public function onlineMember(){\n\t\t$result=$this->model->memberOnline();\n\t\techo $result;\n\t}", "title": "" }, { "docid": "71bf79bf52e8152a115081e2fdb0a361", "score": "0.47206265", "text": "public function user_previlage()\n {\n\n\n }", "title": "" }, { "docid": "7d2ceab357efb39bfc5777373d1daf90", "score": "0.47116217", "text": "public function getFreeAgentTeam_post() {\n $this->form_validation->set_rules('SessionKey', 'SessionKey', 'trim|callback_validateSession');\n $this->form_validation->set_rules('ContestGUID', 'ContestGUID', 'trim|required|callback_validateEntityGUID[Contest,ContestID]');\n // $this->form_validation->set_rules('WeekID', 'WeekID', 'trim|required');\n $this->form_validation->set_rules('MatchGUID', 'MatchGUID', 'trim|required|callback_validateEntityGUID[Matches,MatchID]');\n $this->form_validation->set_rules('SubGameTypeKey', 'SubGameTypeKey', 'trim|required');\n $this->form_validation->validation($this); /* Run validation */\n /* Get Joined Contest Users Data */\n $AllMatchesList = $this->SnakeDrafts_model->getFreeAgentTeam($this->ContestID, $this->MatchID, $this->Post['SubGameTypeKey']);\n if (!empty($AllMatchesList)) {\n $this->Return['Data'] = $AllMatchesList;\n }\n }", "title": "" }, { "docid": "4ff2334c6fddf527576f5efb0f42155b", "score": "0.47051698", "text": "public function followUserProfile() {\n extract($_GET);\n $gender = $this->session->userdata('key_gender');\n $encodedkey = $this->session->userdata('PariKey_session');\n $key = base64_decode($encodedkey);\n $keyarr = explode('|', $key);\n $sessionUser_id = $keyarr[2];\n $result = $this->Searchbyprofileid_model->followUserProfile($profile_user_id, $sessionUser_id, $gender);\n echo $result;\n// print_r($result);\n// die();\n \n }", "title": "" }, { "docid": "72dfdcf38d5f94402d77da0a8a59d417", "score": "0.47038573", "text": "function emarking_get_markers_in_training($emarkingid, $context, $filterbyparticipation = false) {\n global $DB, $USER;\n $userismarker = false;\n if (! $filterbyparticipation) {\n $enrolledmarkers = get_enrolled_users($context, 'mod/assign:grade');\n $markers = array();\n foreach ($enrolledmarkers as $enrolledmarker) {\n if ($enrolledmarker->id == $USER->id) {\n $userismarker = true;\n }\n if (! has_capability('mod/emarking:supervisegrading', $context, $enrolledmarker)) {\n $markers [] = $enrolledmarker;\n }\n }\n return array(\n $markers,\n $userismarker);\n }\n $markers = $DB->get_records_sql(\n \"\n SELECT u.*\n FROM {emarking_draft} d\n INNER JOIN {emarking_submission} s ON (s.emarking = :emarking AND d.submissionid = s.id)\n INNER JOIN {user} u ON (d.teacher = u.id)\n GROUP BY u.id\", array(\n \"emarking\" => $emarkingid));\n $markersintraining = array();\n foreach ($markers as $marker) {\n if ($marker->id == $USER->id) {\n $userismarker = true;\n }\n $markersintraining [] = $marker;\n }\n return array(\n $markersintraining,\n $userismarker);\n}", "title": "" }, { "docid": "097a7c3125e3dc0e736927f4f1e58040", "score": "0.46919012", "text": "public function index()\n {\n $user=Auth::user();\n $cadet=$user->userable;\n $trainings = $cadet->trainings;\n\n // $cadets = Cadet::has('trainings')->with(['user' , 'trainings'])->paginate(5);\n \n foreach ($trainings as $training) {\n $in = new Carbon($training->startDate);\n $out = new Carbon($training->endDate);\n $training->totalDays = $out->diffInDays($in) + 1;\n }\n return view('cadet.manage-cadet-trainings', compact('trainings'));\n }", "title": "" }, { "docid": "98be8d9b949b2250296aa72fe85644ac", "score": "0.4669736", "text": "public function getTrial()\n {\n return $this->trial;\n }", "title": "" }, { "docid": "98be8d9b949b2250296aa72fe85644ac", "score": "0.4669736", "text": "public function getTrial()\n {\n return $this->trial;\n }", "title": "" }, { "docid": "b4cb49b77eeaa90ddcc9f49438b5805e", "score": "0.46666476", "text": "function addPrediction(){\n\t\n\t}", "title": "" }, { "docid": "8c3309e74fd90af97227372067fbf943", "score": "0.46634218", "text": "public function getProfessionList(){\n return $this->_get(20);\n }", "title": "" }, { "docid": "e1a6300f9b2130e26771c1b322d72f5a", "score": "0.4654629", "text": "abstract protected function getFeatures();", "title": "" }, { "docid": "c04ffb17e1ff46b2d92f61b34f0771db", "score": "0.4654588", "text": "public function show($id)\n {\n $training = Training::with('participants', 'participants.customer', 'participants.company', 'participants.position', 'participants_fill_in', 'participants_fill_in.customer', 'participants_fill_in.company', 'participants_fill_in.position', 'training_course', 'training_group', 'responsive_users')->where('id', $id)->first();\n\n if ($training) {\n return response()->json($training, 200);\n } else {\n return response()->json([\n 'message' => 'Expectation Failed',\n 'status' => 417\n ], 417);\n }\n }", "title": "" }, { "docid": "d65a0fe60f8a9e500407db661860d6a5", "score": "0.46499774", "text": "public function getTrialInfo(Request $request){\n $id = $request->id;\n\n if($request->planned === 'true'){\n $trial = Trials::with('sport')->with('user')->find($id);\n $teams = Teams::where('sports_id','=', $trial->sports_id)->get();\n return response()->json([\n 'trial' => $trial,\n 'teams' => $teams\n ]);\n }else{\n $trial_request = TrialRequests::with('sport')->with('user')->find($id);\n return response()->json($trial_request);\n }\n }", "title": "" }, { "docid": "c72148bc407d7053998eaf710a8e05ad", "score": "0.46481866", "text": "public function testGetUserrecordings()\n {\n }", "title": "" }, { "docid": "518b0ea3de60cea79b101aecddab3b3a", "score": "0.46473366", "text": "public function recommendation()\n {\n }", "title": "" }, { "docid": "ce67eca437b05dfdb1671bb2e97a1c40", "score": "0.4646836", "text": "public function get_userSkills_get(){\n\t\textract($_GET);\n\t\t$result = $this->dashboard_model->get_userSkills($user_id,$profile_type);\n\t\treturn $this->response($result);\t\t\t\n\t}", "title": "" }, { "docid": "9e16bad8a3deb193d350450c9e62fea3", "score": "0.46397504", "text": "public function get_meet_up_data()\n{\n\t// Meet Up Calculationm\t\n\t$user_address = $this->urs->getFullDetails(ADDRESS,'user_id',$this->session->userdata('user_id'),'address_id');\n\treturn $this->urs->getDetailsbyLimitCount(MEET_UP,$user_address[0]['city_id'],'city_id','status','meet_up_id');\n\t\n}", "title": "" }, { "docid": "08565a5c80a03a359927e13d1a6c37af", "score": "0.46366596", "text": "function getDecisionTeamTeaches() {\n\n global $CFG;\n\n $sql = \"SELECT team.*\n FROM {$CFG->prefix}block_courseprefs_teamteach team,\n {$CFG->prefix}block_courseprefs_teachers teach\n WHERE team.tt_sectionsid = teach.sectionsid\n AND teach.usersid = \" . $this->id . \"\n AND teach.primary_flag = 1\n AND team.approval_flag = 1\n AND team.status = 'todo'\";\n\n $results = get_records_sql($sql);\n $teamteaches = array();\n\n // Return an empty array if there are no records to process\n if (!$results) {\n return $teamteaches;\n }\n\n foreach ($results as $result) {\n $teamteaches[$result->id] = new CoursePrefsTeamTeach($result->usersid, \n $result->sectionsid, $result->tt_sectionsid, $result->status,\n $result->approval_flag, $result->id);\n }\n\n return $teamteaches;\n }", "title": "" }, { "docid": "a2a1f211cd1f67a0b8e559f04f26b29b", "score": "0.46357647", "text": "public function run()\n {\n Training::create([\n 'nombre' => 'Capacitacion para instructores nivel 1',\n 'descripcion' => 'En esta capacitacion se ...',\n 'tipo' => 'Precencial',\n 'docente_id' => 2,\n 'is_enabled' => true\n ]);\n\n Training::create([\n 'nombre' => 'Capacitacion para instructores nivel 2',\n 'descripcion' => 'En esta capacitacion se ...',\n 'tipo' => 'Precencial',\n 'docente_id' => 2,\n 'is_enabled' => true\n ]);\n\n Training::create([\n 'nombre' => 'Capacitacion para instructores nivel 3',\n 'descripcion' => 'En esta capacitacion se ...',\n 'tipo' => 'Virtual',\n 'docente_id' => 2,\n 'is_enabled' => true\n ]);\n }", "title": "" }, { "docid": "670712768d52a93bea1048b0b38bcec1", "score": "0.46306485", "text": "public function test_scenario1() {\n $data = array(array('filename' => 'data/iris.csv', 'local_file' => 'tmp/batch_predictions.csv', 'predictions_file' => 'data/batch_predictions.csv')); \n\n\n foreach($data as $item) {\n print \"I create a data source uploading a \". $item[\"filename\"]. \" file\\n\";\n $source = self::$api->create_source($item[\"filename\"], $options=array('name'=>'local_test_source'));\n $this->assertEquals(BigMLRequest::HTTP_CREATED, $source->code);\n $this->assertEquals(1, $source->object->status->code);\n\n print \"check local source is ready\\n\";\n $resource = self::$api->_check_resource($source->resource, null, 20000, 30);\n $this->assertEquals(BigMLRequest::FINISHED, $resource[\"status\"]);\n\n print \"create dataset with local source\\n\";\n $dataset = self::$api->create_dataset($source->resource);\n $this->assertEquals(BigMLRequest::HTTP_CREATED, $dataset->code);\n $this->assertEquals(BigMLRequest::QUEUED, $dataset->object->status->code);\n\n print \"check the dataset is ready \" . $dataset->resource . \" \\n\";\n $resource = self::$api->_check_resource($dataset->resource, null, 20000, 30);\n $this->assertEquals(BigMLRequest::FINISHED, $resource[\"status\"]);\n\n print \"create model\\n\";\n $model = self::$api->create_model($dataset->resource);\n $this->assertEquals(BigMLRequest::HTTP_CREATED, $model->code);\n \n print \"check model is ready\\n\";\n $resource = self::$api->_check_resource($model->resource, null, 3000, 30);\n $this->assertEquals(BigMLRequest::FINISHED, $resource[\"status\"]);\n\n print \"I create a batch prediction\\n\";\n $batch_prediction=self::$api->create_batch_prediction($model,$dataset);\n\t $this->assertEquals(BigMLRequest::HTTP_CREATED, $batch_prediction->code);\n \n\t print \"check a batch_predicion is ready\\n\";\n $resource = self::$api->_check_resource($batch_prediction, null, 3000, 50);\n\t $this->assertEquals(BigMLRequest::FINISHED, $resource[\"status\"]);\n\n print \"download batch predictions file\\n\";\n\t $filename = self::$api->download_batch_prediction($batch_prediction, $item[\"local_file\"]);\n\t $this->assertNotNull($filename);\n\n print \"i compare the prediction file is correct\\n\";\n $this->assertTrue(compareFiles($item[\"local_file\"], $item[\"predictions_file\"]));\n\n } \n }", "title": "" }, { "docid": "21fdb908c0561722ab4e9ee40419dccc", "score": "0.46297896", "text": "public function add_userSkills_get(){\n\t\textract($_GET);\n\t\t$result = $this->dashboard_model->add_userSkills($user_id,$skill_id,$profile_type);\n\t\treturn $this->response($result);\t\t\t\n\t}", "title": "" }, { "docid": "a216091d40cf3ca5cdf41b79413c38f7", "score": "0.46249172", "text": "public function workoutDetail(){\n \n $this->autoRender = false;\n \n //initialize an empty array for response\n $success = true;\n $message = '';\n $respData = []; \n \n if(!$this->request->is('get')){\n $success = false;\n $message = 'Invalid request method';\n }\n \n $workoutId = isset($this->request->query['workoutId'])?urldecode($this->request->query['workoutId']):''; \n $programWorkoutId = isset($this->request->query['programWorkoutId'])?$this->request->query['programWorkoutId']:''; \n \n if(empty($workoutId)){\n return;\n }\n \n \n $this->loadModel('WorkoutActivity');\n \n //get fitness level id and check authentication\n $fitnessLevelId = $this->Session->check('User.fitness_level')?$this->Session->read('User.fitness_level'):'';\n if(empty($fitnessLevelId)){\n $success = false;\n $message = 'Authentication Failed';\n //prepare response \n $resp = $this->WorkoutActivity->prepareResponse($success, $message, $respData); \n return $resp;\n }\n //echo $workoutId.','.$fitnessLevelId;die;\n try{\n $workoutActivities = $this->WorkoutActivity->getWorkoutActivities($workoutId,$fitnessLevelId); \n if(empty($workoutActivities)){\n $this->loadModel('Workout');\n $workoutActivities = $this->Workout->findById($workoutId);\n unset($workoutActivities['WorkoutVideo']);\n }\n $workoutActivities['Workout']['program_workout_id'] = $programWorkoutId;\n $respData = $workoutActivities;\n } catch (Exception $ex) {\n $message = $ex->getMessage();\n $success = false;\n }\n \n //prepare response \n $resp = $this->WorkoutActivity->prepareResponse($success, $message, $respData); \n return $resp;\n }", "title": "" }, { "docid": "a2716a4ec02c28211ea8893bf0b2ea45", "score": "0.461836", "text": "public function gettraininglist(Request $request)\n {\n $data = trim($request->get('q'));\n $trainings = Training::where('name','like',\"%{$data}%\")->get();\n return json_decode($trainings);\n }", "title": "" }, { "docid": "a61bf9136935d5bfecc0e056831aced8", "score": "0.46177793", "text": "public function seekerjob(){\n\t\t\t$query=$this->db->select('Title,Posting_time,Skills,Eligibility,Salary,City,Job_id')->get('job');\n\t\t\treturn $query->result();\n\t\t}", "title": "" }, { "docid": "9ae8355bdf3ce3268ba208618ebf89e7", "score": "0.46075973", "text": "public function training()\n {\n if ( ! auth()->guard('admin')->user()->can('access training ' . $this->table)) {\n return redirect()->route('admin.setting.index')->with('alert-danger', __($this->noPermission));\n }\n\n $trainings = json_decode(setting('training_settings'));\n $implementations = Department::pluck('abbreviation', 'abbreviation')->toArray();\n $registerredCount = [];\n $registerredSum = [];\n\n foreach ($trainings as $training){\n foreach ($implementations as $implementation){\n $count = Training::registerredCount($training->name, $implementation, setting($training->setting_created_at_slug));\n $registerredCount += [$implementation => $count];\n if ( ! next($implementations)){\n $registerredCount += [\"total\" => array_sum($registerredCount)];\n }\n }\n $registerredSum += [$training->name => $registerredCount];\n }\n $view = [\n 'back' => route('admin.setting.index'),\n 'title' => __('Training Settings'),\n 'breadcrumbs' => [\n route('admin.setting.index') => __('Setting'),\n route('admin.setting.training.index') => __('Training'),\n null => __('Edit')\n ],\n 'subtitle' => __('All About Training Settings'),\n 'description' => __('You can adjust all training settings here'),\n 'navs' => $this->settings,\n 'setting' => $this->settings->where('slug', 'training')->first(),\n 'forms' => $trainings,\n 'formLimiters' => [\n 'None' => __('None'),\n 'Quota' => __('Quota'),\n 'Datetime' => __('Datetime'),\n 'Both' => __('Both'),\n ],\n 'schoolLevels' => [\n 'Binaan' => __('Binaan'),\n 'Rintisan' => __('Rintisan'),\n 'Dalam Proses' => __('Dalam Proses'),\n ],\n 'schoolImplementations' => $implementations,\n 'registerredSum' => $registerredSum,\n ];\n return view('admin.setting.training.index', $view);\n }", "title": "" }, { "docid": "22edd685b21c222ca58c9a1f82078fe9", "score": "0.46064517", "text": "public function getInvestigatorsList() {\n return $this->_get(6);\n }", "title": "" }, { "docid": "f64e60abc528d4c53797f4920e1ee7e4", "score": "0.4606195", "text": "public function api_entry_getprofile() {\n parent::validateParams(array('user'));\n\n $user = $this->Mdl_Users->get($_POST[\"user\"]);\n\n if ($user == null)\n parent::returnWithErr(\"User id is not valid.\");\n\n unset($user->password);\n\n $this->load->model('Mdl_Requests');\n $this->load->model('Mdl_Prays');\n\n $user->ipray_praying_for_me = 0;\n $user->ipray_i_am_praying_for = 0;\n $user->ipray_request_attended = 0;\n\n $prays = $this->Mdl_Prays->getAll();\n $requests = array();\n\n if (count($prays)) {\n foreach ($prays as $key => $val) {\n $request = $this->Mdl_Requests->get($val->request);\n $prayer = $this->Mdl_Users->get($val->prayer);\n\n if ($_POST[\"user\"] == $request->host) {\n if ($val->status == 1) $user->ipray_request_attended++;\n $user->ipray_praying_for_me++;\n }\n if ($_POST[\"user\"] == $val->prayer) {\n $user->ipray_i_am_praying_for++;\n }\n }\n }\n \n\n parent::returnWithoutErr(\"User profile fetched successfully.\", $user);\n }", "title": "" }, { "docid": "66a5fd0ff4f1020baa176ac46a098ea5", "score": "0.460358", "text": "function training_services_callback() {\n $server = url($GLOBALS['base_url'] . '/xmlrpc.php', array('external' => TRUE));\n $options = array(\n 'training_services.test' => array(\n 1,\n '2',\n ),\n );\n $results = xmlrpc($server, $options);\n\n return array(\n array(\n '#type' => 'markup',\n '#markup' => $results,\n ),\n );\n}", "title": "" }, { "docid": "9142fbd5ee5a8dad0349535cc239d34b", "score": "0.4603172", "text": "public function index()\n\t{\n\t\t$trainers = [];\n\t\t$roleId = 3;\n\t\t$trainers = $this->User->getData($roleId);\n\t\treturn view('backend.TrainerManagement.list',compact('trainers'));\n\t}", "title": "" }, { "docid": "c6a1ab8fccb9d219b5194b7a62efbe71", "score": "0.46014988", "text": "function get_offered($course)\n{\n return $course->offered;\n}", "title": "" }, { "docid": "53a8e2a8ebbf435d31d761af98a26e12", "score": "0.4600935", "text": "public function testGetFeatureDetailsUsingGET()\n {\n }", "title": "" } ]
9e14d72d5b5b1e992932c0f0e559bc15
Admin: mods POST & DELETE // POST /admin/mods/new
[ { "docid": "9d36d516a7431938273c1d8d547f1bed", "score": "0.61552083", "text": "public function createModerator()\n { }", "title": "" } ]
[ { "docid": "47ca37587c938fd91341b000e48b8b02", "score": "0.65124315", "text": "protected function actionNew() {\n $this->adminReload(getLinkAdminHref($this->getArrModule(\"modul\")));\n }", "title": "" }, { "docid": "ca695e3ed9705e67d774c105d57e6008", "score": "0.6309916", "text": "public function create()\n {\n // Si no tiene permisos para ver el listado lo echa.\n if (!auth()->user()->can('admin-modulos-crud-create')) {\n app()->abort(403);\n }\n\n $module = new Module();\n $form_data = array(\n 'route' => array('crud-generator.store'),\n 'method' => 'POST',\n 'id' => 'formData',\n 'class' => 'form-horizontal'\n );\n $page_title = trans(\"crud-generator::modules/admin_lang.new\");\n\n $entries_page_list = CrudGeneratorController::ENTRIES_PER_PAGE;\n $order_direction_list = CrudGeneratorController::ORDER_DIRECTION;\n\n /*\n $order_by_field_list = ModuleField::where('crud_module_id', $module->id)\n ->where('in_list', true)\n ->orderBy('order_list', 'ASC')\n ->pluck('column_title', 'column_name')\n ->toArray();\n */\n // En la creación forzamos a mínimo el ID ya que no tenemos campos\n $order_by_field_list = [\n \"id\" => \"ID\"\n ];\n\n return view(\n 'crud-generator::modules.admin_edit',\n compact(\n 'page_title',\n 'module',\n 'form_data',\n 'entries_page_list',\n 'order_direction_list',\n 'order_by_field_list'\n )\n );\n }", "title": "" }, { "docid": "d969a24daf873e7e3cd1f3b290b68207", "score": "0.6260873", "text": "public function add_new_admin_post(){\n $data = $this->security->xss_clean($_POST);\n $data = $this->Admin_model->add_new_admin($data);\n if (isset($data['status']) == 'FALSE')\n {\n $this->response($data, REST_Controller::HTTP_SEE_OTHER);\n }\n $this->set_response($data, REST_Controller::HTTP_CREATED);\n }", "title": "" }, { "docid": "73fab964943de8ddd717b64471028f71", "score": "0.617764", "text": "public function createAction()\n\t{\n\t\t$this->view->modules = Modules::find(array(\n\t\t \"application_id={$this->session->get('auth-identity')['Application_ID']}\"\n ));\n\t}", "title": "" }, { "docid": "0469422dd18eda5cfbb553501013843c", "score": "0.6073042", "text": "public function create(){\n return view('pages.addModerator',[]);\n }", "title": "" }, { "docid": "f3cd412c95d413cacd77de8817f53256", "score": "0.6012426", "text": "function postModule(array $module)\n {\n $data = $this->model->create($module);\n $idModule = $data->id;\n $arrayIdRoles = $this->modelRol->select('id')->pluck('id')->toArray();\n $arrayRoles = array();\n $dataId = array();\n foreach ($arrayIdRoles as $key) {\n\n $arrayRoles['id_rol'] = $key;\n\n $arrayRoles['id_module'] = $idModule;\n\n $dataInserted = $this->modelRolHasModule->create($arrayRoles);\n $dataId['id_rol_has_module'] = $dataInserted->id;\n if ($key == 1) {\n $dataId['r'] = 1;\n $dataId['w'] = 1;\n $dataId['d'] = 1;\n $dataId['u'] = 1;\n } else {\n $dataId['r'] = 0;\n $dataId['w'] = 0;\n $dataId['d'] = 0;\n $dataId['u'] = 0;\n }\n $this->modelPermission->create($dataId);\n }\n }", "title": "" }, { "docid": "ecad6b76994d271584b92f2cae13ff06", "score": "0.6012215", "text": "function blocks_admin_create()\n{ \n // Get parameters\n list($title,\n $blockid,\n $language,\n $collapsable,\n $defaultstate,\n $position) = pnVarCleanFromInput('title',\n 'blockid',\n 'language',\n 'collapsable',\n 'defaultstate',\n 'position');\n\n list($mid, $bkey) = split(':', $blockid); \n\n // Fix for null language\n if (!isset($language)) {\n $language = '';\n } \n\n // Confirm authorisation code\n if (!pnSecConfirmAuthKey()) {\n pnSessionSetVar('errormsg', _BADAUTHKEY);\n pnRedirect(pnModURL('Blocks', 'admin', 'view'));\n return true;\n } \n\n // Pass to API\n $bid = pnModAPIFunc('Blocks',\n 'admin',\n 'create', array('bkey' => $bkey,\n 'title' => $title,\n 'mid' => $mid,\n 'language' => $language,\n 'collapsable' => $collapsable,\n 'defaultstate' => $defaultstate,\n 'position' => $position));\n if ($bid != false) {\n // Success\n pnSessionSetVar('statusmsg', _BLOCKCREATED); \n\n // Send to modify page to update block specifics\n pnRedirect(pnModURL('Blocks', 'admin', 'modify', array('bid' => $bid)));\n\n return true;\n } \n\n pnRedirect(pnModURL('Blocks', 'admin', 'view'));\n\n return true;\n}", "title": "" }, { "docid": "5987a9352ac2bf0c45727e120d980c62", "score": "0.60072386", "text": "public function actionCreate()\n {\t\t\n $model = new Modulset();\n if ($model->load(Yii::$app->request->post())){\n\t\t\t\tif($model->validate()){\n\t\t\t\tif($model->save()) {\n\t\t\t\t\treturn $this->redirect(['view', 'id' => $model->MDL_ID]);\t\n\t\t\t\t} \n\t\t\t}\n\t\t}else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "915d7243a42d19c998f99832b8ba569c", "score": "0.5991126", "text": "public function actionCreate()\n {\n Console::clearScreenBeforeCursor();\n $moduleType = $this->select('What kind of Module you want to create?', ['frontend' => 'Frontend Modules are mainly used to render views.', 'admin' => 'Admin Modules are mainly used when you Data-Managment should be done inside the Administration area.']);\n switch ($moduleType) {\n case 'admin':\n $isAdmin = true;\n $text = 'Name of your new Admin-Module (e.g. newsadmin)';\n break;\n case 'frontend':\n $isAdmin = false;\n $text = 'Name of your new Frontend-Module (e.g. news)';\n break;\n }\n\n $moduleName = $this->prompt($text);\n\n if ($isAdmin && substr($moduleName, -5) !== 'admin') {\n return $this->outputError(\"The provided Modulename ($moduleName) must have the suffix 'admin' as it is an Admin-Module!\");\n }\n\n if (!$this->confirm('Are you sure you want to create the '.(($isAdmin) ? 'Admin' : 'Frontend').\" Module '\".$moduleName.\"' now?\")) {\n return $this->outputError('abort by user.');\n }\n\n $basePath = Yii::$app->basePath;\n\n $modulesDir = $basePath.DIRECTORY_SEPARATOR.'modules';\n\n if (!file_exists($modulesDir)) {\n mkdir($modulesDir);\n }\n\n $moduleDir = $modulesDir.DIRECTORY_SEPARATOR.$moduleName;\n\n if (!file_exists($moduleDir)) {\n mkdir($moduleDir);\n } else {\n return $this->outputError(\"The Module '$moduleName' folder already exists!\");\n }\n\n $content = '<?php'.PHP_EOL;\n $content .= 'namespace app\\modules\\\\'.$moduleName.';'.PHP_EOL.PHP_EOL;\n $content .= '/**'.PHP_EOL;\n $content .= ' * Module created with Luya Module Creator Version '.\\luya\\Boot::VERSION.' at '.date('d.m.Y H:i').PHP_EOL;\n $content .= ' */'.PHP_EOL;\n $content .= 'class Module extends '.(($isAdmin) ? '\\admin\\base\\Module' : '\\luya\\base\\Module').PHP_EOL;\n $content .= '{'.PHP_EOL;\n $content .= ' // add your custom Module properties here.'.PHP_EOL;\n $content .= '}';\n\n $modulephp = $moduleDir.DIRECTORY_SEPARATOR.'Module.php';\n\n if (file_put_contents($modulephp, $content)) {\n $out = PHP_EOL.\"'modules' => [\".PHP_EOL;\n $out .= \" '$moduleName' => [\".PHP_EOL;\n $out .= \" 'class' => '\\\\app\\\\modules\\\\$moduleName\\\\Module'\".PHP_EOL;\n $out .= ' ],'.PHP_EOL;\n $out .= ']'.PHP_EOL.PHP_EOL;\n\n return $this->outputSuccess($out);\n }\n\n return $this->outputError(\"Unable to write module file '$modulephp'.\");\n }", "title": "" }, { "docid": "2bf616fb9b0ffb0c20b1b6a714b0dd76", "score": "0.58545494", "text": "function Admin_admin_new()\n{\n // Create output object - this object will store all of our output so that\n // we can return it easily when required\n $pnRender = new pnRender('Admin');\n\n // As Admin output changes often, we do not want caching.\n $pnRender->caching = false;\n\n // Security check - important to do this as early as possible to avoid\n // potential security holes or just too much wasted processing\n if (!pnSecAuthAction(0, 'Admin::Item', '::', ACCESS_ADD)) {\n return pnVarPrepHTMLDisplay(_MODULENOAUTH);\n }\n\n // Return the output that has been generated by this function\n return $pnRender->fetch('admin_admin_new.htm');\n}", "title": "" }, { "docid": "6514f1f060ca6160f89e80e3ccf9d288", "score": "0.5804262", "text": "public function createModuleAction()\n {\n // FIXME: esta accion tiene varios save que deberia verificar por errores,\n // y si alguno falla deberia garantizar que el sistema queda en un\n // estado consistente, el problema es que deberia soportar la session\n // de DB para hacer rollback en caso de error, sino me queda basura activa.\n \n if (isset($this->params['doit']))\n {\n // Donde se va a ubicar el modulo\n $pageZone = PageZone::getByPageAndName( $this->params['pageId'], $this->params['zone'] );\n \n // Si la pageZone del layout seleccionado no esta creada para esta pagina, lo creo.\n if ($pageZone == NULL)\n {\n // crea la zona y la socia a la pagina\n $page = Page::get($this->params['pageId']);\n $pageZone = new PageZone(array('name'=>$this->params['zone'], 'page'=>$page));\n $page->addToZones($pageZone);\n $pageZone->save();\n $page->save(); // Esto NO guarda la zona en la pagina\n }\n \n \n $module = new $this->params['class']($this->params);\n $module->setShowContainer( isset($this->params['showContainer']) );\n $module->setShowInAllPages( isset($this->params['showInAllPages']) ); // TODO: si es true, tengo que crear el modulo en las demas paginas\n \n \n // ------ logica parecida a la que esta en createModule\n // Si tengo que poner los modulos en todas las paginas\n if ($module->getShowInAllPages())\n {\n // DIFERENCIA CON EDIT: \n // Como este modulo es nuevo, no esta en ninguna pagina,\n // entonces agrego directamente.\n \n // Zonas con el mismo nombre que la zona donde se esta mostrando actualmente el modulo.\n $zones = PageZone::findBy(\n Condition::EQ(PageZone::TABLE, 'name', $this->params['zone']),\n new ArrayObject()\n );\n \n \n // Para cada zona, me fijo:\n // 1. Que la zona no sea la actual\n // 2. Que el modulo no esté ya en esa zona (TODO)\n foreach ($zones as $zone)\n {\n // Agrega el modulo a cada zona\n $zone->addToModules( $module );\n \n //echo 'agrega a zona '. $zone->getId() .'<br/>';\n \n // FIXME: al salvar la zona, se salva el modulo (y el modulo ya se salva al final). Es sacarle el belongsTo.\n // Ademas si guarda aca el modulo, se deberian limpiar los dirtys, y en los proximos intentnos no deberia\n // guardar por estar limpia, pero se ve que en el guardado en cascada no se limpian los dirtys! \n if ( !$zone->save() ) print_r($zone->getErrors());\n }\n }\n else // Si no hay showInAllPages se agrega solo a la zona indicada en la pagina actual.\n {\n $pageZone->addToModules( $module );\n if (!$pageZone->save()) print_r($pageZone->getErrors());\n }\n \n \n // Como la pantalla ahora es modal, no tengo que redireccionar a otra accion\n //return $this->redirect(array('action'=>'displayPage', 'params'=>array('pageId'=>$this->params['pageId'])));\n //return $this->renderString('Modulo creado con exito');\n \n // Tengo que decirle a la pagina el id del nuevo modulo\n // Para el display, se necesita tambien la pagina.\n header('Content-type: application/json');\n return $this->renderString('{\"status\":\"ok\", \"id\":\"'.$module->getId().'\", \"pageId\":\"'.$this->params['pageId'].'\"}');\n }\n \n // Necesito los nombres de las zonas para indicar en que zona se pondra el modulo.\n $zones = array();\n $layout = Layout::getActive();\n foreach ($layout->getZones() as $zone)\n {\n $zones[$zone->getName()] = $zone->getName(); // FIXME: para que hago un array con key/value igual?\n }\n \n // Necesito las clases de modulos para indicar de cual quiero crear.\n $mclasses = ModelUtils::getAllSubclassesOf( 'Module' );\n $classes = array();\n foreach ($mclasses as $mclass) $classes[$mclass] = $mclass;\n \n return array('zones'=>$zones, 'classes'=>$classes);\n }", "title": "" }, { "docid": "9f6ae21dedb03d69a19648a1b42521fc", "score": "0.5765006", "text": "function Admin_admin_create($args)\n{\n // Get parameters from whatever input we need. All arguments to this\n // function should be obtained from pnVarCleanFromInput(), getting them\n // from other places such as the environment is not allowed, as that makes\n // assumptions that will not hold in future versions of PostNuke\n list($catname,\n $description) = pnVarCleanFromInput('catname',\n 'description');\n // Admin functions of this type can be called by other modules. If this\n // happens then the calling module will be able to pass in arguments to\n // this function through the $args parameter. Hence we extract these\n // arguments *after* we have obtained any form-based input through\n // pnVarCleanFromInput().\n extract($args);\n\n // Confirm authorisation code. This checks that the form had a valid\n // authorisation code attached to it. If it did not then the function will\n // proceed no further as it is possible that this is an attempt at sending\n // in false data to the system\n if (!pnSecConfirmAuthKey()) {\n pnSessionSetVar('errormsg', _BADAUTHKEY);\n pnRedirect(pnModURL('Admin', 'admin', 'view'));\n return true;\n }\n\n // Notable by its absence there is no security check here. This is because\n // the security check is carried out within the API function and as such we\n // do not duplicate the work here\n\n // The API function is called. Note that the name of the API function and\n // the name of this function are identical, this helps a lot when\n // programming more complex modules. The arguments to the function are\n // passed in as their own arguments array\n $cid = pnModAPIFunc('Admin',\n 'admin',\n 'create',\n array('catname' => $catname,\n 'description' => $description));\n\n // The return value of the function is checked here, and if the function\n // suceeded then an appropriate message is posted. Note that if the\n // function did not succeed then the API function should have already\n // posted a failure message so no action is required\n if ($cid != false) {\n // Success\n pnSessionSetVar('statusmsg', _ADMINCATEGORYCREATED);\n }\n\n // This function generated no output, and so now it is complete we redirect\n // the user to an appropriate page for them to carry on their work\n pnRedirect(pnModURL('Admin', 'admin', 'view'));\n\n // Return\n return true;\n}", "title": "" }, { "docid": "961903dbddebb83eaf402c7d7e86481e", "score": "0.5683417", "text": "private function _module()\n { \n $isAdded = false;\n if (($module = $this->_req->get('module')))\n {\n $exists = Core::getLib('database')->select('COUNT(*)')->from('module')->where('module_id = ' . Core::getLib('database')->escape($module['module_id']))->exec('field');\n \n if ( ! $exists)\n {\n Core::getLib('database')->insert('module', $module);\n \n Core::getLib('cache')->remove('modules');\n \n $isAdded = true;\n } \n }\n \n $modules = Core::getLib('database')->select('*')->from('module')->exec('rows');\n \n $this->_tpl->title('Módulos')\n ->assign(array(\n 'modules' => $modules,\n 'isAdded' => $isAdded\n ));\n }", "title": "" }, { "docid": "f607a72ea8c2b15a3a555d95f5f99271", "score": "0.5669123", "text": "public function createAction(Request $request)\n {\n if ($this->get('session')->has('module')) {\n // get the last module from the session to fill some defaults for the new one\n $tmpModule = $this->get('session')->get('module');\n\n // setup a fresh module object\n $module = new Module();\n $module->setStyle($tmpModule->getStyle());\n }\n else {\n // setup a fresh module object\n $module = new Module();\n\n // fill it with some defaults\n $module->setStyle('less');\n }\n\n // create form\n $form = $this->createForm(new ModuleType(), $module);\n\n if ($request->getMethod() == 'POST') {\n $form->bindRequest($request);\n\n if ($form->isValid()) {\n // set default templates\n $module->addTemplate(strtolower($module->getName()));\n\n // save the module in the session\n $this->get('session')->set('module', $module);\n\n // create the module in the filesystem\n try {\n $moduleManager = $this->get('terrific.composer.module.manager');\n $moduleManager->createModule($module);\n\n $this->get('session')->setFlash('notice', 'Module ' . ucfirst($module->getName()) . ' created successfully');\n }\n catch (\\Exception $e) {\n $logger = $this->get('logger');\n $logger->err($e->getMessage());\n\n $this->get('session')->setFlash('notice', 'Module could not be created: ' . $e->getMessage());\n }\n\n if ($request->get('addskin', false)) {\n // redirect to the add skin form\n return $this->redirect($this->generateUrl('composer_add_skin'));\n }\n else {\n // redirect to the create module form\n return $this->redirect($this->generateUrl('composer_create_module'));\n }\n }\n }\n\n return array('form' => $form->createView());\n }", "title": "" }, { "docid": "9457e4bab5cfd0bd4269ae797ec78557", "score": "0.5662147", "text": "public function create()\n {\n if(!hasPermissions('admin.module.create')){\n abort(403);\n }\n $module = new ModuleFormFields();\n $data = $module->handle();\n return view('backend.module.create', $data);\n }", "title": "" }, { "docid": "25890bf433f30428c7d3531f4767a95a", "score": "0.56438655", "text": "public function modules()\n {\n $github = new GitHub();\n $modules = Module::all();\n $readmees = [];\n foreach($modules as $module){\n Module::updateOrInsert(\n\n [\n 'id' => $module->id,\n // 'slug' => $module->slug,\n ],\n [\n 'readme' => $github->get_global_readme($module->slug)->content,\n ]\n );\n }\n return redirect()->route('admin');\n \n }", "title": "" }, { "docid": "48b814d62005e39dc0e8346f42cd7460", "score": "0.5634921", "text": "public function create()\n {\n return view('admin.modules.new-module');\n }", "title": "" }, { "docid": "10bb8f41e73dbf9ae39a7e83fca4f397", "score": "0.56099", "text": "public function create() {\n $module = Module::get('Comp_Off_Managements');\n if (Module::hasAccess(\"Comp_Off_Managements\", \"create\")) {\n return view('la.comp_off_managements.add', [\n 'module' => $module,\n ]);\n } else {\n return redirect(config('laraadmin.adminRoute') . \"/\");\n }\n }", "title": "" }, { "docid": "579e9b4debcf8e01a9bc623ab84c7a37", "score": "0.56060314", "text": "public function create($params = []) {\n $params['action'] = 'ModuleCreate';\n return $this->submitRequest($params);\n }", "title": "" }, { "docid": "ccc9f01f64c2a194f24b8588f81b1dd0", "score": "0.55981416", "text": "public function actionCreate()\n {\n $model = new Package();\n\n if ($model->load(Yii::$app->request->post()) && $model->harvestModInfo() && $model->save()) {\n Yii::$app->getSession()->setFlash('success', Yii::t('app', 'Mod has been registered.'));\n return $this->redirect(['view', 'name' => $model->name]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "454aef6f1e39e5f605cc23573d630a39", "score": "0.5561042", "text": "public function create()\n {\n $data['page_title']=\"Create Module\";\n return view('backend.modules.create',compact('data'));\n }", "title": "" }, { "docid": "342ba4d0b1accd2168b0295dae67c765", "score": "0.5553979", "text": "public function createAction()\n {\n $form = $this->getServiceLocator()->get('FormElementManager')\n ->get('TranslationModule\\Form\\Module');\n\n $viewModel = $this->createViewModel([\n 'form' => $form,\n ]);\n\n if (! $this->request->isPost()) {\n return $viewModel;\n }\n\n $isValid = $form->setData($this->request->getPost())->isValid();\n if (! $isValid) {\n return $viewModel;\n }\n\n $moduleService = $this->getServiceLocator()\n ->get('TranslationModule\\Service\\Translation');\n $module = $moduleService->createModule($form->getData());\n\n $this->flashMessenger()\n ->addSuccessMessage('message.translation.module.created');\n\n return $this->redirect()->toRoute('translation/module');\n }", "title": "" }, { "docid": "312cd4144f009859ad4ad2520626b39e", "score": "0.5548509", "text": "public function action_create_admin()\n {\n /** @var Users $users */\n $users = $this->getContext()->getService('users');\n $check_users = $users->getAll();\n\n if ($check_users['count'] > 0) {\n return new RedirectResponse($this->uri->create('install/modules'));\n }\n\n if ($this->getPost()) {\n $validator = new Validator();\n $validator\n ->add('username', _i('Username'), [new Trim(), new Assert\\NotBlank(), new Assert\\Length(['min' => 4, 'max' => 32])])\n ->add('email', _i('Email'), [new Trim(), new Assert\\NotBlank(), new Assert\\Email()])\n ->add('password', _i('Password'), [new Trim(), new Assert\\NotBlank(), new Assert\\Length(['min' => 4, 'max' => 64])])\n ->add('confirm_password', _i('Confirm Password'), [new EqualsField(['field' => _i('Password'), 'value' => $this->getPost('password')])]);\n\n $validator->validate($this->getPost());\n\n if (!$validator->getViolations()->count()) {\n $input = $validator->getFinalValues();\n\n $auth = new Auth($this->getContext());\n\n list($id, $activation_key) = $auth->createUser($input['username'], $input['password'], $input['email']);\n $auth->activateUser($id, $activation_key);\n $auth->authenticateWithId($id);\n $user = $auth->getUser();\n $user->save(['group_id' => 100]);\n\n // leave the module installation later in case we must do something with users\n $this->install->install_modules();\n\n return new RedirectResponse($this->uri->create('install/complete'));\n } else {\n $this->notices->set('warning', $validator->getViolations()->getText());\n }\n }\n\n $this->process('create_admin');\n $this->param_manager->setParam('method_title', _i('Admin Account'));\n\n $this->builder->createPartial('body', 'install/create_admin');\n return new Response($this->builder->build());\n }", "title": "" }, { "docid": "f8afc5172b16ceb7bfefbbe86c62ee31", "score": "0.5540513", "text": "public function store(Request $request)\n {\n $request->validate([\n 'module'=>'required',\n 'prix'=>'required',\n 'description'=>'required',\n \n ]);\n \n modules::create($request->all());\n\n return redirect()->route('admin.modules')\n ->with('success',' Ajout reussie!');\n }", "title": "" }, { "docid": "c3f8c5d105e05452a74d4ba288ec4b0f", "score": "0.55264366", "text": "function addmodule($id){ \n $data['iapp_erpmodule'] = $id;\n $data['row'] = $this->M_application_mod->get_by_id($id);\n $data['url_back'] = base_url().'m_application';\n $data['delete'] = base_url().'m_application/deletemodule'; \n $this->template->load('core_template','addmodule',$data); \n }", "title": "" }, { "docid": "720d88a9a9a354e134bff676811405d2", "score": "0.551202", "text": "function xoops_module_list()\r\n{\r\n xoops_cp_header();\r\n //OpenTable();\r\n echo \"\r\n <h4 style='text-align:left'>\"._MD_AM_MODADMIN.\"</h4>\r\n <form action='admin.php' method='post' name='moduleadmin' id='moduleadmin'>\r\n <table class='outer' width='100%' cellpadding='4' cellspacing='1'>\r\n <tr align='center'><th>\"._MD_AM_MODULE.\"</th><th>\"._MD_AM_VERSION.\"</th><th>\"._MD_AM_LASTUP.\"</th><th>\"._MD_AM_ACTIVE.\"</th><th>\"._MD_AM_ORDER.\"<br /><small>\"._MD_AM_ORDER0.\"</small></th><th>\"._MD_AM_ACTION.\"</th></tr>\r\n \";\r\n $module_handler =& xoops_gethandler('module');\r\n $installed_mods =& $module_handler->getObjects();\r\n $listed_mods = array();\r\n $count = 0;\r\n foreach ( $installed_mods as $module ) {\r\n if ($count % 2 == 0) {\r\n $class = 'even';\r\n } else {\r\n $class = 'odd';\r\n }\r\n $count++;\r\n echo \"<tr class='$class' align='center' valign='middle'>\\n\";\r\n echo \"<td valign='bottom'>\";\r\n if ( $module->getVar('hasadmin') == 1 && $module->getVar('isactive') == 1) {\r\n echo '<a href=\"'.XOOPS_URL.'/modules/'.$module->getVar('dirname').'/'.$module->getInfo('adminindex').'\"><img src=\"'.XOOPS_URL.'/modules/'.$module->getVar('dirname').'/'.$module->getInfo('image').'\" alt=\"'.$module->getVar('name', 'E').'\" border=\"0\" /></a><br /><input type=\"text\" name=\"newname['.$module->getVar('mid').']\" value=\"'.$module->getVar('name', 'E').'\" maxlength=\"150\" size=\"20\" />';\r\n } else {\r\n echo '<img src=\"'.XOOPS_URL.'/modules/'.$module->getVar('dirname').'/'.$module->getInfo('image').'\" alt=\"'.$module->getVar('name', 'E').'\" border=\"0\" /><br /><input type=\"text\" name=\"newname['.$module->getVar('mid').']\" value=\"'.$module->getVar('name', 'E').'\" maxlength=\"150\" size=\"20\" />';\r\n }\r\n echo '<input type=\"hidden\" name=\"oldname['.$module->getVar('mid').']\" value=\"' .$module->getVar('name').'\" /></td>';\r\n echo \"<td align='center'>\".round($module->getVar('version') / 100, 2).\"</td><td align='center'>\".formatTimestamp($module->getVar('last_update'),'m').\"<br />\";\r\n if ($module->getVar('dirname') != 'system' && $module->getVar('isactive') == 1) {\r\n echo '</td><td><input type=\"checkbox\" name=\"newstatus['.$module->getVar('mid').']\" value=\"1\" checked=\"checked\" /><input type=\"hidden\" name=\"oldstatus['.$module->getVar('mid').']\" value=\"1\" />';\r\n $extra = '<a href=\"'.XOOPS_URL.'/modules/system/admin.php?fct=modulesadmin&amp;op=update&amp;module='.$module->getVar('dirname').'\"><img src=\"'.XOOPS_URL.'/modules/system/images/update.gif\" alt=\"'._MD_AM_UPDATE.'\" /></a>';\r\n } elseif ($module->getVar('dirname') != 'system') {\r\n echo '</td><td><input type=\"checkbox\" name=\"newstatus['.$module->getVar('mid').']\" value=\"1\" /><input type=\"hidden\" name=\"oldstatus['.$module->getVar('mid').']\" value=\"0\" />';\r\n $extra = '<a href=\"'.XOOPS_URL.'/modules/system/admin.php?fct=modulesadmin&amp;op=update&amp;module='.$module->getVar('dirname').'\"><img src=\"'.XOOPS_URL.'/modules/system/images/update.gif\" alt=\"'._MD_AM_UPDATE.'\" /></a>&nbsp;<a href=\"'.XOOPS_URL.'/modules/system/admin.php?fct=modulesadmin&amp;op=uninstall&amp;module='.$module->getVar('dirname').'\"><img src=\"'.XOOPS_URL.'/modules/system/images/uninstall.gif\" alt=\"'._MD_AM_UNINSTALL.'\" /></a>';\r\n } else {\r\n echo '</td><td><input type=\"checkbox\" name=\"newstatus['.$module->getVar('mid').']\" value=\"1\" checked=\"checked\" /><input type=\"hidden\" name=\"oldstatus['.$module->getVar('mid').']\" value=\"1\" />';\r\n $extra = '<a href=\"'.XOOPS_URL.'/modules/system/admin.php?fct=modulesadmin&amp;op=update&amp;module='.$module->getVar('dirname').'\"><img src=\"'.XOOPS_URL.'/modules/system/images/update.gif\" alt=\"'._MD_AM_UPDATE.'\" /></a>';\r\n }\r\n echo \"</td><td>\";\r\n if ($module->getVar('hasmain') == 1) {\r\n echo '<input type=\"hidden\" name=\"oldweight['.$module->getVar('mid').']\" value=\"'.$module->getVar('weight').'\" /><input type=\"text\" name=\"weight['.$module->getVar('mid').']\" size=\"3\" maxlength=\"5\" value=\"'.$module->getVar('weight').'\" />';\r\n } else {\r\n echo '<input type=\"hidden\" name=\"oldweight['.$module->getVar('mid').']\" value=\"0\" /><input type=\"hidden\" name=\"weight['.$module->getVar('mid').']\" value=\"0\" />';\r\n }\r\n echo \"\r\n </td>\r\n <td>\".$extra.\"&nbsp;<a href='javascript:openWithSelfMain(\\\"\".XOOPS_URL.\"/modules/system/admin.php?fct=version&amp;mid=\".$module->getVar('mid').\"\\\",\\\"Info\\\",300,230);'>\";\r\n echo '<img src=\"'.XOOPS_URL.'/modules/system/images/info.gif\" alt=\"'._INFO.'\" /></a><input type=\"hidden\" name=\"module[]\" value=\"'.$module->getVar('mid').'\" /></td>\r\n </tr>\r\n ';\r\n $listed_mods[] = $module->getVar('dirname');\r\n }\r\n echo \"<tr class='foot'><td colspan='6' align='center'><input type='hidden' name='fct' value='modulesadmin' />\r\n <input type='hidden' name='op' value='confirm' />\r\n <input type='submit' name='submit' value='\"._MD_AM_SUBMIT.\"' />\r\n </td></tr></table>\r\n </form>\r\n <br />\r\n <table width='100%' border='0' class='outer' cellpadding='4' cellspacing='1'>\r\n <tr align='center'><th>\"._MD_AM_MODULE.\"</th><th>\"._MD_AM_VERSION.\"</th><th>\"._MD_AM_ACTION.\"</th></tr>\r\n \";\r\n $modules_dir = XOOPS_ROOT_PATH.\"/modules\";\r\n $handle = opendir($modules_dir);\r\n $count = 0;\r\n while ($file = readdir($handle)) {\r\n clearstatcache();\r\n $file = trim($file);\r\n if ($file != '' && strtolower($file) != 'cvs' && !preg_match(\"/^[.]{1,2}$/\",$file) && is_dir($modules_dir.'/'.$file)) {\r\n if ( !in_array($file, $listed_mods) ) {\r\n $module =& $module_handler->create();\r\n $module->loadInfo($file);\r\n if ($count % 2 == 0) {\r\n $class = 'even';\r\n } else {\r\n $class = 'odd';\r\n }\r\n echo '<tr class=\"'.$class.'\" align=\"center\" valign=\"middle\">\r\n <td align=\"center\" valign=\"bottom\"><img src=\"'.XOOPS_URL.'/modules/'.$module->getInfo('dirname').'/'.$module->getInfo('image').'\" alt=\"'.htmlspecialchars($module->getInfo('name')).'\" border=\"0\" /></td>\r\n <td align=\"center\">'.round($module->getInfo('version'), 2).'</td>\r\n <td>\r\n <a href=\"'.XOOPS_URL.'/modules/system/admin.php?fct=modulesadmin&amp;op=install&amp;module='.$module->getInfo('dirname').'\"><img src=\"'.XOOPS_URL.'/modules/system/images/install.gif\" alt=\"'._MD_AM_INSTALL.'\" /></a>';\r\n echo \"&nbsp;<a href='javascript:openWithSelfMain(\\\"\".XOOPS_URL.\"/modules/system/admin.php?fct=version&amp;mid=\".$module->getInfo('dirname').\"\\\",\\\"Info\\\",300,230);'>\";\r\n echo '<img src=\"'.XOOPS_URL.'/modules/system/images/info.gif\" alt=\"'._INFO.'\" /></a></td></tr>\r\n ';\r\n unset($module);\r\n $count++;\r\n }\r\n }\r\n }\r\n echo \"</table>\";\r\n //CloseTable();\r\n xoops_cp_footer();\r\n}", "title": "" }, { "docid": "1267904042995b36165f8789c30b6efe", "score": "0.5483436", "text": "public function makeadminAction() {\n $this->validateRequestMethod('POST');\n\n if (!$this->_helper->requireUser()->isValid())\n $this->respondWithError('unauthorized');\n Engine_Api::_()->getApi('Core', 'siteapi')->setView();\n\n $viewer = Engine_Api::_()->user()->getViewer();\n $viewer_id = $viewer->getIdentity();\n\n $group_id = $this->_getParam('group_id', null);\n $sitegroup = Engine_Api::_()->getItem('sitegroup_group', $group_id);\n $owner_id = $sitegroup->owner_id;\n\n //EDIT PRIVACY\n $isManageAdmin = Engine_Api::_()->sitegroup()->isManageAdmin($sitegroup, 'edit');\n\n $manageAdminAllowed = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitegroup.manageadmin', 1);\n if (empty($isManageAdmin) || empty($manageAdminAllowed)) {\n $this->respondWithError('unauthorized');\n }\n\n $manageadminsTable = Engine_Api::_()->getDbtable('manageadmins', 'sitegroup');\n\n //FETCH DATA\n $manageHistories = $manageadminsTable->getManageAdminUser($group_id);\n\n $values = $this->_getAllParams();\n $selected_user_id = $values['user_id'];\n\n if (empty($selected_user_id))\n $this->respondWithError('unauthorized');\n\n try {\n $row = $manageadminsTable->createRow();\n $row->user_id = $selected_user_id;\n $row->group_id = $group_id;\n $row->save();\n\n //START SITEGROUPMEMBER PLUGIN WORK\n $sitegroupMemberEnabled = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitegroupmember');\n\n if ($sitegroupMemberEnabled) {\n $membersTable = Engine_Api::_()->getDbtable('membership', 'sitegroup');\n $membersTableName = $membersTable->info('name');\n\n $select = $membersTable->select()\n ->from($membersTableName)\n ->where('user_id = ?', $selected_user_id)\n ->where($membersTableName . '.resource_id = ?', $group_id);\n $select = $membersTable->fetchRow($select);\n\n if (empty($select)) {\n $row = $membersTable->createRow();\n $row->resource_id = $group_id;\n $row->group_id = $group_id;\n $row->user_id = $selected_user_id;\n $row->save();\n }\n }\n\n //END SITEGROUPMEMBER PLUGIN WORK\n $newManageAdmin = Engine_Api::_()->getItem('user', $selected_user_id);\n $sitegroup_title = $sitegroup->title;\n $group_title_with_link = '<a href = http://' . $_SERVER['HTTP_HOST'] . Zend_Controller_Front::getInstance()->getRouter()->assemble(array('group_url' => Engine_Api::_()->sitegroup()->getGroupUrl($group_id)), 'sitegroup_entry_view') . \">$sitegroup_title</a>\";\n\n $host = $_SERVER['HTTP_HOST'];\n $group_url = $host . Zend_Controller_Front::getInstance()->getRouter()->assemble(array('group_url' => Engine_Api::_()->sitegroup()->getGroupUrl($group_id)), 'sitegroup_entry_view');\n\n Engine_Api::_()->getApi('mail', 'core')->sendSystem($newManageAdmin->email, 'SITEGROUP_MANAGEADMIN_EMAIL', array(\n 'group_title_with_link' => $group_title_with_link,\n 'sender' => $viewer->toString(),\n 'group_url' => $group_url,\n 'queue' => true\n ));\n\n $notifyApi = Engine_Api::_()->getDbtable('notifications', 'activity');\n $notifyApi->addNotification($newManageAdmin, $viewer, $sitegroup, 'sitegroup_manageadmin');\n\n //INCREMENT MESSAGE COUNTER.\n Engine_Api::_()->getDbtable('statistics', 'core')->increment('messages.creations');\n $this->successResponseNoContent('no_content', true);\n } catch (Exception $ex) {\n $this->respondWithError('internal_server_error', $ex->getMessage());\n }\n }", "title": "" }, { "docid": "2246306ea56c49deac5e044af40f04cf", "score": "0.54833364", "text": "public function edit_modules()\n {\n PHPWS_Core::initCoreClass('File.php');\n $this->title = sprintf(dgettext('branch', 'Module access for \"%s\"'), $this->branch->branch_name);\n\n $content = null;\n\n $core_mods = PHPWS_Core::coreModList();\n $all_mods = PHPWS_File::readDirectory(PHPWS_SOURCE_DIR . 'mod/', true);\n $all_mods = array_diff($all_mods, $core_mods);\n\n foreach ($all_mods as $key => $module) {\n if (is_file(PHPWS_SOURCE_DIR . 'mod/' . $module . '/boost/boost.php')) {\n $dir_mods[] = $module;\n }\n }\n\n $db = new PHPWS_DB('branch_mod_limit');\n $db->addWhere('branch_id', $this->branch->id);\n $db->addColumn('module_name');\n $branch_mods = $db->select('col');\n\n unset($dir_mods[array_search('branch', $dir_mods)]);\n sort($dir_mods);\n $form = new PHPWS_Form('module_list');\n $form->useRowRepeat();\n\n $form->addHidden('module', 'branch');\n $form->addHidden('command', 'save_branch_modules');\n $form->addHidden('branch_id', $this->branch->id);\n\n $form->addCheck('module_name', $dir_mods);\n $form->setLabel('module_name', $dir_mods);\n if (!empty($branch_mods)) {\n $form->setMatch('module_name', $branch_mods);\n }\n\n $form->addSubmit('submit', dgettext('branch', 'Save'));\n\n $form->addTplTag('CHECK_ALL', javascript('check_all', array('checkbox_name' => 'module_name')));\n\n $template = $form->getTemplate();\n\n $template['DIRECTIONS'] = dgettext('branch', 'Unchecked modules cannot be installed on this branch.');\n\n $content = PHPWS_Template::process($template, 'branch', 'module_list.tpl');\n $this->content = & $content;\n }", "title": "" }, { "docid": "428d217589fd299d10beb28d217fae0e", "score": "0.54707927", "text": "function add_course_module($mod) {\n GLOBAL $db;\n\n $mod->added = time();\n\n return insert_record(\"course_modules\", $mod);\n}", "title": "" }, { "docid": "739610cd05c5de4797ef6b7ddc0a892e", "score": "0.54679537", "text": "function add_course_module($mod) {\n\n $mod->added = time();\n\n return insert_record(\"course_modules\", $mod);\n}", "title": "" }, { "docid": "032e69558a45524022535a54c337bde2", "score": "0.54391986", "text": "public function modulesAction()\n {\n //Check if this user can access this page\n $logedUser = $this->getServiceLocator()->get('user')->getUserSession();\n $permission = $this->getServiceLocator()->get('permissions')->havePermission($logedUser[\"idUser\"], $logedUser[\"idWebsite\"], $this->moduleId);\n if($this->getServiceLocator()->get('user')->checkPermission($permission, \"edit\")){\n // Get the Website ID\n $id = (int) $this->params()->fromRoute('id', 0);\n // Will check if this id exists at the database\n $website = $this->getWebsiteTable()->getWebsite($id);\n if ($website) {\n //Check if this user are not trying to get another ID, from another company\n if(($website->id_company!=$logedUser[\"idCompany\"])&& $logedUser[\"idCompany\"]!=1){\n return $this->redirect()->toRoute('noPermission');\n }\n $website = new Website();\n \n // If is a POST\n $message = $this->getServiceLocator()->get('systemMessages');\n $request = $this->getRequest();\n if ($this->params()->fromRoute('idModule', 0)) {\n $idModule = $this->params()->fromRoute('idModule', 0);\n \n //TODO - funções já criadas, é só implantar\n //Check if the module is already associated with this website\n if($this->getWebsiteTable()->moduleWebsiteExist($idModule, $id)){\n //If it exists, just remove relationship\n $result = $this->getWebsiteTable()->deleteModule($id, $idModule);\n }else{\n $result = $this->getWebsiteTable()->saveModule($idModule, $id);\n }\n $message->setCode($result);\n $this->getServiceLocator()\n ->get('systemLog')\n ->addLog(0, $message->getMessage(), $message->getLogPriority());\n }\n // Get from the Database the Company data\n $data = $this->getWebsiteTable()->getWebsite($id);\n \n $modulesAlreadySelected = $this->getServiceLocator()\n ->get('websiteModules')\n ->select(array(\n \"company_website_idWebsite\" => $id\n ));\n \n // Get Modules avaliables\n $modules = $this->getServiceLocator()\n ->get('modules')\n ->select(function (Select $select) {\n $select->order('name ASC');\n });\n \n return array(\n \"message\" => $message->getMessage(),\n \"website\" => $data,\n \"modules\" => $modules,\n \"modulesSelected\" => $modulesAlreadySelected\n );\n } else { // If we not found this ID at the Database, will return to the list\n $this->getServiceLocator()\n ->get('systemLog')\n ->addLog(0, \"This website ID \" . $id . \" was not found at our system\", 5);\n return $this->redirect()->toRoute('website');\n }\n }else{\n return $this->redirect()->toRoute(\"noPermission\");\n }\n }", "title": "" }, { "docid": "4ab52fe0ef014fd71c6a2a8e248e7422", "score": "0.5437966", "text": "public function create()\n {\n if(Auth::check() === true) {\n $typesModules = TypeModule::all();\n $modules = Module::all();\n foreach ($modules as $key => $value){\n $permission[] = Permission::where('user', $_SESSION['user']['id'])->where('module', $value->id)->first();\n if ($value->slug == 'tiposModulo'){\n $permissao = Permission::where('user', $_SESSION['user']['id'])->where('module', $value->id)->first();\n }\n }\n if ($permissao && $permissao->register) {\n return view('admin.newTypeModule', ['modules' => $modules, 'typesModules' => $typesModules, 'permission' => $permission]);\n }\n else{\n return view('admin.semPermissao', ['modules' => $modules, 'typesModules' => $typesModules, 'permission' => $permission]);\n }\n }\n return redirect()->route('admin.login');\n }", "title": "" }, { "docid": "6d56272825f30ae3a3ca102d632b6d53", "score": "0.5432531", "text": "public function create()\n {\n $checkrights = \\App\\Models\\Admin::checkPermission(\\App\\Models\\Admin::$ADD_HOME_SLIDER);\n\n if($checkrights)\n {\n return $checkrights;\n }\n\n $data = array();\n $data['formObj'] = $this->modelObj;\n $data['page_title'] = \"Add \".$this->module;\n $data['action_url'] = $this->moduleRouteText.\".store\";\n $data['action_params'] = 0;\n $data['buttonText'] = \"Save\";\n $data[\"method\"] = \"POST\";\n\t\t$data['months'] = getMonths();\n $data['graphs'] = \\App\\Models\\Securities::pluck('security_name','id')->all();\n $data['countries'] = \\App\\Models\\Country::getCountryList();\n\t\t$data['orderMax'] = \\App\\Models\\HomeSlider::getMaxOrder();\n $data['languages']= \\App\\Custom::getLanguages();\n $data['graphTypes']= ['line'=>'Line Graph','yield_curve'=>'Yield Curve (Scatter)', 'relval' => 'Relval Historical Chart',];\n\n $data['maturities']= ['maturity'=>'Maturity','duration'=>'Duration'];\n $data['prices']= ['price'=>'Price','yield'=>'Yield','spread'=>'Spread'];\n\n return view($this->moduleViewName.'.newAdd', $data);\n }", "title": "" }, { "docid": "dbea7fa32b5411b846ec3cecb87f841a", "score": "0.54310143", "text": "public function store() {\n $data = array(\n 'name' => Input::get(\"name\"),\n 'alias' => Input::get(\"alias\"),\n 'child' => array_values(Input::get(\"child\")),\n );\n\n //Loại bỏ phần tử cuối cùng trong trường hợp user không nhập đầy đủ thông tin\n foreach ($data['child'] as $key => $child) {\n if ($child['menu-title'] === \"\" || $child['tab-title'] === \"\" || $child['url'] === \"\") {\n unset($data['child'][$key]);\n }\n }\n\n $rules = array(\n \"name\" => \"required|max:255\",\n \"alias\" => \"required|unique:modules|max:40|alpha\",\n );\n\n $validator = Validator::make($data, $rules);\n if ($validator->fails()) {\n return Redirect::route('admin.modules.create')->withErrors($validator)->withInput();\n } else {\n $model = new Module();\n $model->name = $data['name'];\n $model->alias = $data['alias'];\n $model->childs = json_encode($data['child']);\n if ($model->save()) {\n Session::flash('success', \"Đã thêm module $model->name thành công\");\n return Redirect::route('admin.modules.create');\n } else {\n Session::flash('error', \"Xảy ra lỗi trong quá trình thêm module $model->name\");\n return Redirect::route('admin.modules.create');\n }\n }\n }", "title": "" }, { "docid": "7107bcd20af2135c5eab5b9e0d5d9b40", "score": "0.5412018", "text": "public function adminAction()\n {\n return new DynamicForm();\n }", "title": "" }, { "docid": "631517596faa165a1d3bf96f1aa580cb", "score": "0.54063076", "text": "public function newAction() {\n\n if ($this->values['permisos']['permisosModulo']['IN']) {\n switch ($this->request[\"METHOD\"]) {\n\n case 'POST': //CREAR NUEVO REGISTRO\n $entidad = $this->request[$this->entity]['Entity'];\n $idEntidad = $this->request[$this->entity]['IdEntity'];\n $tipo = $this->request[$this->entity]['Type'];\n\n $variables = new CpanVariables('Mod', 'Env', $entidad);\n $this->varEnvMod = $variables->getValores();\n unset($variables);\n $this->values['varEnvMod'] = $this->varEnvMod;\n\n $datos = new CpanDocs();\n $datos->bind($this->request['CpanDocs']);\n $datos->setArrayDoc($this->request['FILES']['documento']);\n\n $rules = $this->getRules($this->request[$this->entity]['Type']);\n\n switch ($this->request[$this->entity]['Type']) {\n case 'galery':\n if ($datos->valida($rules)) {\n $documento = $datos->getArrayDoc();\n $documento['maxWidth'] = $this->varEnvMod['galery']['maxWidthImage'];\n $documento['maxHeight'] = $this->varEnvMod['galery']['maxHeightImage'];\n $documento['modoRecortar'] = $this->request['modoRecortar']; \n $datos->setArrayDoc($documento);\n $lastId = $datos->create();\n if (!$lastId)\n $this->values['errores'] = $datos->getErrores();\n\n // Subir Miniatura\n if (($lastId) and ($this->varEnvMod['galery']['generateThumbnail'] == '1')) {\n $thumb = new CpanDocs();\n $thumb->bind($this->request['CpanDocs']);\n $thumb->setBelongsTo($lastId);\n $documento = $this->request['FILES']['documento'];\n $documento['maxWidth'] = $this->varEnvMod['galery']['widthThumbnail'];\n $documento['maxHeight'] = $this->varEnvMod['galery']['heightThumbnail'];\n $thumb->setArrayDoc($documento);\n $thumb->setIsThumbnail(1);\n if ($thumb->valida($rules))\n $lastId = $thumb->create();\n $this->values['errores'] = $thumb->getErrores();\n }\n } else {\n $this->values['errores'] = $datos->getErrores();\n }\n break;\n\n case 'tiny':\n if ($datos->valida($rules)) {\n $documento = $datos->getArrayDoc();\n $documento['maxWidth'] = $this->varEnvMod['galery']['maxWidthImage'];\n $documento['maxHeight'] = $this->varEnvMod['galery']['maxHeightImage'];\n $documento['modoRecortar'] = $this->request['modoRecortar']; \n $datos->setArrayDoc($documento);\n $lastId = $datos->create();\n if (!$lastId)\n $this->values['errores'] = $datos->getErrores();\n } else {\n $this->values['errores'] = $datos->getErrores();\n }\n break;\n\n case 'document':\n case 'video':\n case 'audio':\n if ($datos->valida($rules)) {\n\n $lastId = $datos->create();\n if (!$lastId)\n $this->values['errores'] = $datos->getErrores();\n\n $this->values['alertas'] = $datos->getAlertas();\n\n //Recargo el objeto para refrescar las propiedas que\n //hayan podido ser objeto de algun calculo durante el proceso\n //de guardado.\n $datos = new CpanDocs($lastId);\n $this->values['datos'] = $datos;\n } else {\n $this->values['datos'] = $datos;\n $this->values['errores'] = $datos->getErrores();\n }\n break;\n }\n\n return $this->listPopupAction($entidad, $idEntidad, $tipo, $this->request['formato']);\n break;\n }\n } else {\n return array('template' => '_global/forbiden.html.twig');\n }\n }", "title": "" }, { "docid": "44b91a4cb3ebb4f322b95ef75d0078f3", "score": "0.53853005", "text": "public function postForm(Request $request, $mod)\n {\n $model = ModelHandler::getObject($mod);\n $this->validateRequest($request, $model); \n return $this->saveUpdate($model, $request->all());\n }", "title": "" }, { "docid": "7cc8eb49aa7f9e636094acf77b00e714", "score": "0.53838754", "text": "public function create ()\n {\n if (!check_admin_auth ($this->module_name . '_' . __FUNCTION__)) {\n return auth_error_return ();\n }\n $menu = $this->repository->makeModel ();\n $_method = 'POST';\n $menus = Menu::orderBy ('sort', 'asc')->get ();\n $menus = $menus->toArray ();\n $menuPidList = list_to_tree ($menus);\n $maxSort = Menu::max ('sort');\n $menu->sort = $maxSort ? $maxSort + 1 : 99;\n\n return view ('admin.' . $this->module_name . '.add', compact ('menu', '_method', 'menuPidList'));\n }", "title": "" }, { "docid": "ee98a2ec8d8bf933819e3a591794f534", "score": "0.53777146", "text": "public function store(Request $request)\n {\n $module = New Module();\n $module->name = $request->name;\n if(empty($request->is_analog)) {\n $module->is_analog = 0;\n } else {\n $module->is_analog = 1;\n $module->range_min = $request->rmin;\n $module->range_max = $request->rmax;\n }\n\n $module->save();\n\n return Redirect::to('/admin/modules');\n }", "title": "" }, { "docid": "8c4e732a800c3c1a23a6d2c411fb5606", "score": "0.53774655", "text": "public function actionCreate()\n\t{\n\t\tif(Yii::app()->request->isPostRequest)\n\t\t{\n\t\t\tYii::app()->clientScript->scriptMap['jquery.js'] = false;\n\t\t\t$model=new ModClient;\n\t\t\t$model->attributes=$_POST['ModClient'];\n\t\t\t$model->salt=md5($model->generateSalt());\n\t\t\t$model->ip=$_SERVER['REMOTE_ADDR'];\n\t\t\t$model->date_entry=date(c);\n\t\t\tif($model->save()){\n\t\t\t\t$model->password=$model->hashPassword($model->password,$model->salt);\n\t\t\t\t$model->update(array('password'));\n\t\t\t\techo CJSON::encode(array(\n\t\t\t\t\t'status'=>'success',\n\t\t\t\t\t'div'=>'Data berhasil disimpan',\n\t\t\t\t));\n\t\t\t}else{\n\t\t\t\techo CJSON::encode(array(\n\t\t\t\t\t'status'=>'failed',\n\t\t\t\t\t'div'=>$this->renderPartial('_form_client',array('model'=>$model),true,true),\n\t\t\t\t));\n\t\t\t}\n\t\t\texit;\n\t\t}\n\t}", "title": "" }, { "docid": "91299d9a292a3677f8ff23bcd5c041f6", "score": "0.5373463", "text": "function permissions_adminapi_create($args)\n{\n // Get arguments from argument array\n extract($args);\n\n // Security check (if not ADMIN, we wouldn't be here.)\n\t// security check moved until we have the required variables\n // $pid changes to $id as this is the form item name\n if (!pnSecAuthAction(0, 'Permissions::', \"$type::$id\", ACCESS_ADMIN)) {\n pnSessionSetVar('errormsg', _MODULENOAUTH);\n return false;\n }\n\n // Argument check\n\t// MMaes, 2003-06-20: Insert Capability: added $insseq\n if ((!isset($type)) ||\n (!isset($realm)) ||\n (!isset($id)) ||\n (!isset($component)) ||\n (!isset($instance)) ||\n (!isset($level)) ||\n (!isset($insseq))) {\n pnSessionSetVar('errormsg', _MODARGSERROR);\n return false;\n }\n\n // Work out which tables to operate against\n $dbconn =& pnDBGetConn(true);\n $pntable =& pnDBGetTables();\n if ($type == \"user\") {\n $permtable = $pntable['user_perms'];\n $permcolumn = &$pntable['user_perms_column'];\n $idfield = $permcolumn['uid'];\n $view = \"secviewuserperms\";\n } else {\n $permtable = $pntable['group_perms'];\n $permcolumn = &$pntable['group_perms_column'];\n $idfield = $permcolumn['gid'];\n $view = \"secviewgroupperms\";\n }\n\n\t// MMaes, 2003-06-20: Insert Capability\n\tif ($insseq == -1) {\n\t $maxseq = permissions_adminapi_maxsequence(array('table' => $permtable,\n\t 'column' => $permcolumn['sequence']));\n\t $newseq = $maxseq + 1;\n\t} else {\n\t // Increase sequence numbers\n\t $query = \"UPDATE $permtable\n\t SET $permcolumn[sequence] = $permcolumn[sequence] + 1\n\t WHERE $permcolumn[sequence] >= '\" . (int)pnVarPrepForStore($insseq) . \"'\";\n\t $dbconn->Execute($query);\n\t if ($dbconn->ErrorNo() != 0) {\n\t pnSessionSetVar('errormsg', _PERM_INSERR);\n\t return false;\n\t }\n\t\t$newseq = $insseq;\n\t}\n\n $nextId = $dbconn->GenId($permtable);\n\n $query = \"INSERT INTO $permtable\n ($permcolumn[pid],\n $permcolumn[realm],\n $idfield,\n $permcolumn[sequence],\n $permcolumn[component],\n $permcolumn[instance],\n $permcolumn[level],\n $permcolumn[bond])\n VALUES\n ('\" . (int)pnVarPrepForStore($nextId) . \"',\n '\" . (int)pnVarPrepForStore($realm) . \"',\n '\" . (int)pnVarPrepForStore($id) . \"',\n '\" . (int)pnVarPrepForStore($newseq) . \"',\n '\" . pnVarPrepForStore($component) . \"',\n '\" . pnVarPrepForStore($instance) . \"',\n '\" . (int)pnVarPrepForStore($level) . \"',\n 0)\";\n $dbconn->Execute($query);\n\n if ($dbconn->ErrorNo() != 0) {\n pnSessionSetVar('errormsg', \"Error adding $type permission\");\n return false;\n }\n\n\t// MMaes, 2003-06-20: Clean-up\n permissions_adminapi_resequence(array('type' => $type));\n\n return true;\n}", "title": "" }, { "docid": "66862fc2160ce646c20d1919b2f93333", "score": "0.53643894", "text": "public function create()\n {\n //return the modules adding view.\n return view('dashboard.modules.create');\n }", "title": "" }, { "docid": "c9b6aed0a2a7e693e9e017c460df636f", "score": "0.5362089", "text": "public function adminCreate()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "88f2c3374cdba5db944170da57d12642", "score": "0.5360247", "text": "public function createModerator(Request $request){\n\n $user = null;\n\n try{\n DB::beginTransaction();\n\n $user = User::create([\n 'username' => $request->input('username'),\n 'password' => bcrypt($request->input('password')),\n 'email' => $request->input('email'),\n 'role' => 'MOD'\n\n ]);\n\n $moderator = Moderator::create([\n 'user_username' => $user['username'],\n ]);\n $moderator->save();\n\n DB::commit();\n\n } catch(\\Exception $e){\n DB::rollBack();\n }\n\n return redirect(route('moderation'));\n }", "title": "" }, { "docid": "253ef8838dd4a8e8dd207da67c7e4e6e", "score": "0.53546876", "text": "public function crear_plantilla_admin(){\n $plantilla = [\n 'nombre' => 'nueva',\n 'descripcion' => 'Plantilla nueva'\n ];\n $headers = ['X-CSRF-TOKEN' => csrf_token() ];\n $this->actingAs($this->admin, 'admin')\n ->post('plantilla', $plantilla, $headers)\n ->assertStatus(201)\n ->assertSee('Plantilla nueva');\n }", "title": "" }, { "docid": "1cde01f7f1c44019a913c5bd4326b203", "score": "0.53540367", "text": "public function createAction() {\n\n //GET THE MENU NAME WHICH IS BEING EDITED\n $name = $this->_getParam('name');\n\n //GET THE MODULE LIST THAT CAN BE CHOOSEN TO SHOW CONTENT\n $moduleArray = Engine_Api::_()->getDbtable('modules', 'sitemenu')->getContentList();\n\n if ($name == 'core_main') {\n // Get form\n $this->view->form = $form = new Sitemenu_Form_Admin_Menu_ItemCreate(array('moduleArray' => $moduleArray, 'isCustom' => '1'));\n\n // Check stuff\n if (!$this->getRequest()->isPost()) {\n return;\n }\n if (!$form->isValid($this->getRequest()->getPost())) {\n return;\n }\n // Save\n $values = $form->getValues();\n\n if ($values['show_in_tab'] == 1 && empty($values['icon'])) {\n $form->addError(\"Please enter icon as you have selected only icon.\");\n return;\n }\n $label = $values['label'];\n unset($values['label']);\n\n // IF THE OPTION SELECTED MENU ITEM IS NOT A SUBMENU\n if ($values['is_submenu'] == 0) {\n $values['root_id'] = 0;\n $values['parent_id'] = 0;\n }\n\n //IF THE MENU ITEM IS NOT A SUBMENU THEN SET THE VIEW TYPE AS OF PARENT MENU\n $menuItemsTable = Engine_Api::_()->getDbtable('menuItems', 'core');\n if (!empty($values['root_id'])) {\n $params = Engine_Api::_()->getDbtable('modules', 'sitemenu')->getMenuItemColum(array('params'), $values['root_id']);\n\n if (!empty($params) && isset($params['menu_item_view_type'])) {\n $params = Zend_Json::decode($params);\n if ($params['menu_item_view_type'] == 1 || $params['menu_item_view_type'] == 2) {\n $values['content'] = 0;\n $values['viewby'] = 0;\n $values['is_category'] = 0;\n $values['category_id'] = 0;\n $values['content_height'] = 0;\n }\n }\n }\n\n if (empty($values['root_id'])) {\n if (isset($values['menu_item_view_type']) && $values['menu_item_view_type'] != 1 && $values['menu_item_view_type'] != 2) {\n if (!is_numeric($values['content_height']) || $values['content_height'] <= 0) {\n $form->addError(\"Please enter valid height. Height should be a number. \");\n return;\n }\n }\n }\n\n if (empty($values['is_sub_navigation'])) {\n $values['sub_navigation'] = 0;\n }\n unset($values['select_sub_navigation']);\n unset($values['message']);\n unset($values['noSubMenuMessage']);\n unset($values['is_submenu']);\n if (isset($values['lumious_enabled_message']))\n unset($values['lumious_enabled_message']);\n\n if (isset($values['data_rel'])) {\n $values['data-rel'] = $values['data_rel'];\n unset($values['data_rel']);\n }\n\n if (!empty($values['parent_id'])) {\n $menuItemEnabled = Engine_Api::_()->getDbtable('modules', 'sitemenu')->getMenuItemColum(array('enabled'), $values['parent_id']);\n $order = Engine_Api::_()->getDbtable('modules', 'sitemenu')->getMenuItemColum(array('order'), $values['parent_id']);\n if ($menuItemEnabled != $values['enabled']) {\n if (empty($menuItemEnabled)) {\n $form->addError(\"Please uncheck the 'Enabled?' checkbox. Parent sub menu is disabled therefore this menu cannot be enabled.\");\n return;\n }\n }\n } elseif (!empty($values['root_id'])) {\n $menuItemEnabled = Engine_Api::_()->getDbtable('modules', 'sitemenu')->getMenuItemColum(array('enabled'), $values['root_id']);\n $order = Engine_Api::_()->getDbtable('modules', 'sitemenu')->getMenuItemColum(array('order'), $values['root_id']);\n if ($menuItemEnabled != $values['enabled']) {\n if (empty($menuItemEnabled)) {\n $form->addError(\"Please uncheck the 'Enabled?' checkbox. Parent menu is disabled therefore this menu cannot be enabled.\");\n return;\n }\n }\n }\n\n $db = $menuItemsTable->getAdapter();\n $db->beginTransaction();\n\n try {\n include APPLICATION_PATH . '/application/modules/Sitemenu/controllers/license/license2.php';\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n $this->view->status = false;\n $this->view->error = true;\n }\n\n $this->_forward('success', 'utility', 'core', array(\n 'smoothboxClose' => true,\n 'parentRedirect' => $this->view->url(array('module' => 'sitemenu', 'action' => 'editor', 'controller' => 'menu-settings'), 'admin_default', true),\n 'format' => 'smoothbox',\n 'messages' => \"Your Menu Item has been created successfully.\"\n ));\n }\n }", "title": "" }, { "docid": "56d0c9393f7ffaf3c9a8c3d71a53b01b", "score": "0.5346509", "text": "function blocks_admin_new()\n{\n // Security check - important to do this as early as possible to avoid\n // potential security holes or just too much wasted processing\n if (!pnSecAuthAction(0, 'Blocks::', '::', ACCESS_ADMIN)) {\n return pnVarPrepHTMLDisplay(_MODULENOAUTH);\n }\n\n // Create output object - this object will store all of our output so that\n // we can return it easily when required\n\t$pnRender =& new pnRender('Blocks');\n\n\t// As Admin output changes often, we do not want caching.\n\t$pnRender->caching = false;\n\n // Block\n // Load all blocks (trickier than it sounds)\n $blocks = pnBlockLoadAll();\n if (!$blocks) {\n return pnVarPrepHTMLDisplay(_BLOCKLOADFAILED);\n } \n\n $blockinfo = array();\n foreach ($blocks as $moduleblocks) {\n\t\tforeach ($moduleblocks as $block) {\n\t $blockinfo[$block['mid'] . ':' . $block['bkey']] = $block['module'] . '/' . $block['text_type_long'];\n\t\t}\n } \n $pnRender->assign('blockids', $blockinfo);\n\n // Language\n $pnRender->assign('blocklanguages', languagelist());\n\n // Return the output that has been generated by this function\n return $pnRender->fetch('blocks_admin_new.htm');\n\n}", "title": "" }, { "docid": "344967b96216bd63a69ee778c38fb7ba", "score": "0.5341574", "text": "public function actionCreate(){\n $this->unset($_POST);\n $this->defaults($_POST);\n $this->validate($_POST);\n $this->modify($_POST);\n $this->create($_POST);\n $this->renderText(__('Entry added.'));\n}", "title": "" }, { "docid": "574b03e5fe1733bb8dc6f33bdb58675c", "score": "0.53358895", "text": "public function create()\n {\n $data['module'] = $this->_module;\n $data['module_name'] = $this->_module_name;\n $data['page_active'] = $this->_module . '_create';\n $data['page_title'] = \"Add New \" . $this->_module_name;\n\n\n\n // load the views\n $data['layout'] = $this->load->view($this->_module.'/create', $data, true);\n $this->load->view('template', $data);\n }", "title": "" }, { "docid": "f0ec90109db6226d422e56f3dc589e18", "score": "0.53354245", "text": "public function create() {\r\n not_permissions_redirect(have_premission(array(112)));\r\n $data['action'] = \"Add\";\r\n\t\t// $data['package'] = null ;\r\n return view('admin.PandaCrmPackages.edit')->with($data);\r\n }", "title": "" }, { "docid": "d389133c02b7e6e3b0a2511427a449d5", "score": "0.5333899", "text": "public function testAdminNewItem(): void\n {\n $client = static::createClient([], self::SERVER);\n\n $crawler = $client->request('GET', '/en/admin/menu/new');\n\n $form = $crawler->selectButton('Save changes')->form([\n 'menu[title]' => self::TITLE,\n 'menu[url]' => self::URL,\n 'menu[locale]' => self::LOCALE,\n ]);\n $client->submit($form);\n\n $this->assertSame(Response::HTTP_FOUND, $client->getResponse()->getStatusCode());\n $item = $client->getContainer()->get('doctrine')\n ->getRepository(Menu::class)->findOneBy([\n 'url' => self::URL,\n 'locale' => self::LOCALE,\n ]);\n\n $this->assertNotNull($item);\n $this->assertSame(self::TITLE, $item->getTitle());\n $this->assertSame(self::URL, $item->getUrl());\n }", "title": "" }, { "docid": "de3363f76a22e17795f120a45e399438", "score": "0.5329393", "text": "public function store(Request $request)\n {\n $name = $request->input('name');\n $url = $request->input('url');\n $icon = $request->input('icon');\n $type = $request->input('type');\n\n if ($type == 'module') {\n $module_id = $request->input('module_id');\n $module = LAModule::find($module_id);\n if (isset($module->id)) {\n $name = $module->name;\n $url = $module->name_db;\n $icon = $module->fa_icon;\n } else {\n return response()->json([\n 'status' => 'failure',\n 'message' => 'Module does not exists'\n ], 200);\n }\n }\n $menu = LAMenu::create([\n 'name' => $name,\n 'url' => $url,\n 'icon' => $icon,\n 'type' => $type,\n 'parent' => 0\n ]);\n\n // Set Menu Access For All Role\n $menu->set_access_to('all');\n\n if ($type == 'module') {\n return response()->json([\n 'status' => 'success'\n ], 200);\n } else {\n return redirect(config('laraadmin.adminRoute').'/la_menus');\n }\n }", "title": "" }, { "docid": "96909cc3018f82c7578de2bcb40c5158", "score": "0.5329023", "text": "public function testModVersionAddPost()\n\t{\n\t\t$response = $this->call('POST', '/mod/add-version/', array(\"add-version\"=>\"1.7.10-4.0.0\",\"add-md5\"=>\"0925fb5cca71b6e8dd81fac9b257c6d4\",\"mod-id\"=>\"2\"),\n\t\t\t\t\t\tarray(), array(\"HTTP_X_REQUESTED_WITH\"=>\"XMLHttpRequest\"));\n\n\t\t$this->assertResponseOk();\n\t\t$this->assertTrue(is_a($response,'Illuminate\\Http\\JsonResponse'));\n\t\t$json = $response->getData(true);\n\n\t\t$this->assertTrue(array_key_exists('status', $json));\n\t\t$this->assertTrue(array_key_exists('version', $json));\n\t\t$this->assertTrue(array_key_exists('filesize', $json));\n\t\t$this->assertTrue(array_key_exists('md5', $json));\n\t\t$this->assertEquals('success', $json['status']);\n\t\t$this->assertEquals('1.7.10-4.0.0', $json['version']);\n\t\t$this->assertEquals('0925fb5cca71b6e8dd81fac9b257c6d4', $json['md5']);\n\t\t$this->assertEquals('0.01 MB', $json['filesize']);\n\t}", "title": "" }, { "docid": "6aa7cf136931c809aeeb4e15489c9a6b", "score": "0.5327528", "text": "function showDelete( $option, $type, $items, $modules ) {\n\t\t?>\n\t\t<form action=\"index2.php\" method=\"post\" name=\"adminForm\">\n\t\t<table class=\"adminheading\">\n\t\t<tr>\n\t\t\t<th>\n\t\t\tУдаление меню: <?php echo $type;?>\n\t\t\t</th>\n\t\t</tr>\n\t\t</table>\n\n\t\t<br />\n\t\t<table class=\"adminform\">\n\t\t<tr>\n\t\t\t<td width=\"3%\"></td>\n\t\t\t<td align=\"left\" valign=\"top\" width=\"20%\">\n\t\t\t<?php\n\t\t\tif ( $modules ) {\n\t\t\t\t?>\n\t\t\t\t<strong>Модуль(и) для удаления:</strong>\n\t\t\t\t<ol>\n\t\t\t\t<?php\n\t\t\t\tforeach ( $modules as $module ) {\n\t\t\t\t\t?>\n\t\t\t\t\t<li>\n\t\t\t\t\t<font color=\"#000066\">\n\t\t\t\t\t<strong>\n\t\t\t\t\t<?php echo $module->title; ?>\n\t\t\t\t\t</strong>\n\t\t\t\t\t</font>\n\t\t\t\t\t</li>\n\t\t\t\t\t<input type=\"hidden\" name=\"cid[]\" value=\"<?php echo $module->id; ?>\" />\n\t\t\t\t\t<?php\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t\t</ol>\n\t\t\t\t<?php\n\t\t\t}\n\t\t\t?>\n\t\t\t</td>\n\t\t\t<td align=\"left\" valign=\"top\" width=\"25%\">\n\t\t\t<strong>Будут удалены пункты меню:</strong>\n\t\t\t<br />\n\t\t\t<ol>\n\t\t\t<?php\n\t\t\tforeach ( $items as $item ) {\n\t\t\t\t?>\n\t\t\t\t<li>\n\t\t\t\t<font color=\"#000066\">\n\t\t\t\t<?php echo $item->name; ?>\n\t\t\t\t</font>\n\t\t\t\t</li>\n\t\t\t\t<input type=\"hidden\" name=\"mids[]\" value=\"<?php echo $item->id; ?>\" />\n\t\t\t\t<?php\n\t\t\t}\n\t\t\t?>\n\t\t\t</ol>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t* Эта команда <strong><font color=\"#FF0000\">Удалит</font></strong> само меню, <br />все пункты меню и модуль(и) этого меню *\n\t\t\t<br /><br /><br />\n\t\t\t<div style=\"border: 1px dotted gray; width: 70px; padding: 10px; margin-left: 100px;\">\n\t\t\t<a class=\"toolbar\" href=\"javascript:if (confirm('Вы уверены, что хотите удалить это меню? \\nЭта команда удалит само меню, все его пункты и модуль меню.')){ submitbutton('deletemenu');}\" onmouseout=\"MM_swapImgRestore();\" onmouseover=\"MM_swapImage('remove','','images/delete_f2.png',1);\">\n\t\t\t<img name=\"remove\" src=\"images/delete.png\" alt=\"Удалить\" border=\"0\" align=\"middle\" />\n\t\t\t&nbsp;Удалить\n\t\t\t</a>\n\t\t\t</div>\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>&nbsp;</td>\n\t\t</tr>\n\t\t</table>\n\t\t<br /><br />\n\n\t\t<input type=\"hidden\" name=\"option\" value=\"<?php echo $option;?>\" />\n\t\t<input type=\"hidden\" name=\"task\" value=\"\" />\n\t\t<input type=\"hidden\" name=\"type\" value=\"<?php echo $type; ?>\" />\n\t\t<input type=\"hidden\" name=\"boxchecked\" value=\"1\" />\n\t\t<input type=\"hidden\" name=\"<?php echo josSpoofValue(); ?>\" value=\"1\" />\n\t\t</form>\n\t\t<?php\n\t}", "title": "" }, { "docid": "21132788a8bfab4b99e9a740f94c2088", "score": "0.5324992", "text": "public function store()\n {\n $this->authorize('create', Modpack::class);\n\n request()->validate([\n 'name' => ['required'],\n 'slug' => ['required', 'unique:modpacks', 'alpha_dash'],\n 'status' => ['required', 'in:public,private,draft'],\n 'modpack_icon' => ['nullable', 'image', Rule::dimensions()->minWidth(50)->ratio(1)],\n ]);\n\n $modpack = Modpack::create([\n 'name' => request('name'),\n 'slug' => request('slug'),\n 'status' => request('status'),\n 'icon_path' => request('modpack_icon', new NullFile)->store('modpack_icons'),\n 'team_id' => request()->user()->currentTeam->id,\n ]);\n\n $modpack->addCollaborator(auth()->user()->id);\n\n return redirect('/modpacks/'.request('slug'));\n }", "title": "" }, { "docid": "239536c8d3ddb35d02dc2dc05ceacfb4", "score": "0.5323817", "text": "public function create()\n {\n $checkrights = \\App\\Models\\Admin::checkPermission(\\App\\Models\\Admin::$ADD_PROJECT);\n \n if($checkrights) \n {\n return $checkrights;\n }\n \n $data = array();\n $data['formObj'] = $this->modelObj;\n $data['page_title'] = \"Add \".$this->module;\n $data['action_url'] = $this->moduleRouteText.\".store\";\n $data['action_params'] = 0;\n $data['buttonText'] = \"Save\";\n $data[\"method\"] = \"POST\"; \n $data['clients'] = Client::pluck(\"name\",\"id\")->all();\n\t\t\n\t\t$auth_id = \\Auth::guard('admins')->user()->user_type_id;\n if($auth_id == CLIENT_USER)\n $data['action_url'] = $this->moduleRouteText . \".clientStore\"; \n else\n $data['action_url'] = $this->moduleRouteText.\".store\";\n\n $data = customBackUrl($this->moduleRouteText, $this->list_url, $data);\n return view($this->moduleViewName.'.add', $data);\n }", "title": "" }, { "docid": "c7ee6e5b081b6db9078162697597681c", "score": "0.53195834", "text": "public function actionCreate($parent = 0)\n {\n $installModel = new CreateModule(['tc' => $this->module->tcModule]);\n\n $post = Yii::$app->request->post();\n if (empty($post)) {\n $installModel->loadDefaultValues();\n $installModel->parentUid = ModulesManager::numberedIdFromDbId($parent);\n } else {\n $installModel->load($post);\n $installModel->moduleClassFile = UploadedFile::getInstance($installModel, 'moduleClassFile');\n $result = $installModel->validate();\n if ($result) {\n //$modelManager = new Modmgr(['tc' => $this->module->tcModule]);\n $modelManager = new Modmgr();\n $modelManager->loadData($installModel);\n if (!$modelManager->hasErrors() && $modelManager->save()) {\n //return $this->redirect(['view', 'id' => $modelManager->id]);\n return $this->redirect(['update', 'id' => $modelManager->id]);\n }\n\n // merge errors to $installModel\n foreach ($modelManager->errors as $attribute => $errors) {\n if ($attribute == 'module_id') {\n foreach ($errors as $error) $installModel->addError('moduleId', $error);\n } elseif ($attribute == 'module_class') {\n foreach ($errors as $error) $installModel->addError('moduleClassFile', $error);\n } else { //?? need error message not attached to any field\n foreach ($errors as $error) $installModel->addError('moduleClassFile', $error);\n }\n }\n }\n }\n return $this->render('create', [\n 'model' => $installModel,\n ]);\n }", "title": "" }, { "docid": "36c02c033e3f8e65d0186cc298b25827", "score": "0.5313341", "text": "public function createAction() {\n\t\t$this->_helper->layout()->disableLayout();\n\t\t\n\t\t$form = new Admin_Form_Managerial();\n\t\t$form->getElement('userGroupId')->setMultiOptions($this->getUserGroups());\n\t\t$form->getElement('sex')->setMultiOptions(array(Model_Person::SEX_MALE => _(\"Male\"), Model_Person::SEX_FEMALE => _(\"Female\")));\n\t\t$form->getElement('sex')->setOptions(array('separator' => '')); \n\t\t\n $this->view->form = $form;\n\t}", "title": "" }, { "docid": "72a9a1490d96dd27cfa98f4e095f9953", "score": "0.5303362", "text": "public function actionCreate()\n {\n $model = new Modulerp();\n\n if ($model->load(Yii::$app->request->post())) {\n\n if($model->save())\n {\n $datauser = Userlogin::find()->all();\n foreach ($datauser as $key => $value) {\n # code...\n $connection = Yii::$app->db;\n $profile=Yii::$app->getUserOpt->Profile_user();\n $usercreate = $profile->username;\n $connection->createCommand()->batchInsert('modul_permission',['USER_ID','MODUL_ID','CREATED_BY'],[[$value['id'],$model->MODUL_ID,$usercreate]])->execute();\n }\n }\n return $this->redirect('index');\n } else {\n return $this->renderAjax('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "f792de1b6493cecc975f13b4b01b057b", "score": "0.5303295", "text": "public function actionModule()\n {\n $this->_layout = null;\n $this->_view = null;\n $f_args = func_get_args();\n $ret = array(\n 'success' => false,\n 'message' => '',\n );\n // Check if module exists and is enabled\n if (isset($f_args[0]) && $this->_model->modules->isEnabled($f_args[0])) {\n $module_name = ucfirst(strtolower($f_args[0]));\n array_shift($f_args);\n $data = array(\n 'POST' => $this->_request->post(),\n 'GET' => $this->_request->get(),\n 'PARAMS' => $f_args,\n );\n\n $module_output = $this->_modules->processAjaxRequest($module_name, $data);\n if ($module_output && $module_output != '') {\n $ret = array(\n 'success' => true,\n 'message' => $module_output,\n );\n }\n }\n $this->_response->content = json_encode($ret);\n }", "title": "" }, { "docid": "849451946c193ca43e83d5d80208006f", "score": "0.5303268", "text": "public function admin_add() \n{\n\t//$cat=$this->Package->find('list',array('fields'=>array('Package'),'conditions'=>array('parent_id'=>0))); \n\t\t\n\t$this->set('title','Add Package');\n\t$this->Package->set($this->request->data);\n\tif($this->request->is('post')){\n\t\t//pr($this->request->data); die();\n\t\t\n\t\tif($this->Package->save($this->request->data))\n\t\t{\n\t\t\t\n\t\t\t$this->Flash->success('Package added Successfully', array('key' => 'positive'));\n\t\t\t $this->redirect(array('action'=>'packagelist'));\n\t\t}\n\t}\n\t \n}", "title": "" }, { "docid": "93b71bc6af879609caf14caf293cb5b8", "score": "0.53010434", "text": "public function create() {\n $this->data['mode'] = 'admin';\n $this->data['pagebody'] = 'admin/post-edit';\n $this->data['action'] = 'create';\n \n $this->data['id'] = '';\n $this->data['title'] = '';\n $this->data['description'] = '';\n $this->data['post'] = '';\n $this->data['images'] = array();\n \n $this->presentForm();\n $this->submit();\n $this->render();\n }", "title": "" }, { "docid": "5c230a8097ff38d5a3e7245fd2246919", "score": "0.52997285", "text": "public function updateModulesAction()\n {\n Logger::getInstance()->pm_log(\"updateModulesAction1 -------------------------------- --- ---\");\n /*\n $log = '';\n foreach ($this->params as $key => $val)\n {\n if (is_array($val))\n {\n $log .= $key .'=';\n foreach ($val as $val1) $log .= $val1 .', ';\n }\n else\n $log .= $key .'='. $val .', ';\n }\n return $this->renderString($log);\n */\n \n $pageZone = PageZone::getByPageAndName($this->params['pageId'], $this->params['zone']);\n \n //Logger::getInstance()->pm_log('pageZone: id: '.$pagezone->getId() .', name: '.$this->params['zone']);\n \n // Si la pagina no tiene la zona que esta definida en el layout actual, la creo\n if ($pageZone == NULL)\n {\n // crea la zona y la socia a la pagina\n $page = Page::get($this->params['pageId']);\n $pageZone = new PageZone(array('name'=>$this->params['zone'], 'page'=>$page));\n $page->addToZones($pageZone);\n $pageZone->save();\n $page->save(); // Esto NO guarda la zona en la pagina\n }\n \n \n // Saco los modulos actuales\n foreach ($pageZone->getModules() as $module)\n {\n // Hay un problema al querer quitar modulos de la relacion.\n // En la tabla de join se guarda como ref_id el id de la superclase\n // Modulo, no el id de la instancia que puede ser una subclase de\n // Modulo. Y al querer eliminar, usa el id de la instancia especializada\n // no el id del modulo, por lo que en la tabla de join no encuentra\n // cual es el registro a elminar.\n // Sol 1: que remove se de cuenta su lo que quiero remover es una\n // instancia especializada o no, y que si no lo es, se use\n // el id de la superclase de nivel 1 (podrian haber varios\n // niveles de herencia, por eso no uso el super_id directo).\n // Sol 2: que se de cuenta de que se esta usando una clase especializada\n // al hacer addTo, entonces que guarde el id de la especializada\n // como ref_id en la tabla de join, en lugar de usar el id de la\n // superclase de nivel 1.\n \n // FIXME:\n // Ver PM desde linea 193\n \n $pageZone->removeFromModules($module);\n }\n \n // Pongo los modulos nuevos, en el orden correcto\n // TODO: Optimizacion si el modulo ya fue cargado en los modulos de la pagezone,\n // lo puedo guardar antes de hacer el removeFrom, en lugar de cargarlo de\n // nuevo de la base. Ojo, si fue cargado, deberia estar en el cache de objetos,\n // entonces no lo carga de nuevo de la base.\n $i = 0;\n if (isset($this->params['module_ids']) && is_array($this->params['module_ids']) && count(array_filter($this->params['module_ids']))>0) // Sin chequeo, si viene un string vacio o un array con un elemento vacio, falla el eval.\n {\n //print_r($this->params['module_ids']);\n foreach ($this->params['module_ids'] as $moduleId)\n {\n //eval( '$module = '. $this->params['module_classes'][$i] .'::get($moduleId);' ); // Si hiciera Module::get($id), id deberia ser el de Module, no el de MenuModule o de HtmlModule.\n $module = Module::get($moduleId);\n $pageZone->addToModules($module);\n $i++;\n }\n }\n \n //print_r($pagezone); // Quiero ver si saco el modulo de la pagezone\n \n if (!$pageZone->save())\n {\n //print_r($pageZone->getErrors()); // TODO poner los errores en el json\n header('Content-type: application/json');\n return $this->renderString('{\"status\":\"error\"}');\n }\n \n //return $this->renderString('fin update');\n header('Content-type: application/json');\n return $this->renderString('{\"status\":\"ok\"}');\n \n }", "title": "" }, { "docid": "4531bebfded8090ac09ce9316a685ae5", "score": "0.52974755", "text": "public function modify()\n {\n $id = (int) FormUtil::getPassedValue('id', null, 'GET');\n if (!is_numeric($id)) {\n return LogUtil::registerArgsError(ModUtil::url('Extensions', 'admin', 'view'));\n }\n\n $obj = ModUtil::getInfo($id);\n if (!isset($id) || $obj == false) {\n return LogUtil::registerError($this->__('Error! No such module ID exists.'),\n 404,\n ModUtil::url('Extensions', 'admin', 'modify', array('id' => $id)));\n }\n\n if (!SecurityUtil::checkPermission('Extensions::', \"$obj[name]::$id\", ACCESS_ADMIN)) {\n return LogUtil::registerPermissionError();\n }\n\n $restore = (bool)FormUtil::getPassedValue('restore', false, 'GET');\n if ($restore) {\n // load the version array\n $baseDir = ($obj['type'] == ModUtil::TYPE_SYSTEM) ? 'system' : 'modules';\n \n // load gettext domain for 3rd party modules\n if ($baseDir == 'modules' && is_dir(\"modules/$obj[directory]/locale\")) {\n // This is required here since including pnversion automatically executes the pnversion code\n // this results in $this->__() caching the result before the domain is bounded. Will not occur in zOO\n // since loading is self contained in each zOO application.\n ZLanguage::bindModuleDomain($obj['directory']);\n }\n \n $modversion = Extensions_Util::getVersionMeta($obj['directory'], $baseDir);\n\n // load defaults\n $name = (isset($modversion['name']) ? $modversion['name'] : '');\n $displayname = (isset($modversion['displayname']) ? $modversion['displayname'] : $name);\n $url = (isset($modversion['url']) ? $modversion['url'] : $displayname);\n $description = (isset($modversion['description']) ? $modversion['description'] : '');\n\n $obj = array(\n 'id' => $id,\n 'displayname' => $displayname,\n 'url' => $url,\n 'description' => $description);\n }\n\n $this->view->assign($obj);\n\n // Return the output that has been generated by this function\n return $this->view->fetch('extensions_admin_modify.tpl');\n }", "title": "" }, { "docid": "517aec61c213f25bb55bb2d200c554a5", "score": "0.5295521", "text": "public function newAction() {\n\n if ($this->values['permisos']['permisosModulo']['IN']) {\n\n switch ($this->request[\"METHOD\"]) {\n case 'GET': //MOSTRAR FORMULARIO VACIO \n //SI EN LA POSICION 2 DEL REQUEST VIENE ALGO,\n //SE ENTIENDE QUE ES EL VALOR DE LA CLAVE PARA LINKAR CON LA ENTIDAD PADRE\n //ESTO SE UTILIZA PARA LOS FORMULARIOS PADRE->HIJO\n if ($this->request['2'] != '')\n $this->values['linkBy']['value'] = $this->request['2'];\n\n $datos = new $this->entity();\n $datos->setDefaultValues((array) $this->varEnvMod['columns']);\n $this->values['datos'] = $datos;\n $this->values['errores'] = array();\n $template = $this->entity . '/new.html.twig';\n break;\n\n case 'POST': //CREAR NUEVO REGISTRO\n //COGER EL LINK A LA ENTIDAD PADRE\n if ($this->values['linkBy']['id'] != '') {\n $this->values['linkBy']['value'] = $this->request[$this->entity][$this->values['linkBy']['id']];\n }\n\n $datos = new $this->entity();\n $datos->bind($this->request[$this->entity]);\n\n $rules = $this->form->getRules();\n\n if ($datos->valida($rules)) {\n $lastId = $datos->create();\n\n $this->values['errores'] = $datos->getErrores();\n $this->values['alertas'] = $datos->getAlertas();\n\n //Recargo el objeto para refrescar las propiedades que\n //hayan podido ser objeto de algun calculo durante el proceso\n //de guardado\n if ($lastId) {\n $datos = new $this->entity($lastId);\n }\n $this->values['datos'] = $datos;\n $template = $this->entity . '/edit.html.twig';\n } else {\n $this->values['datos'] = $datos;\n $this->values['errores'] = $datos->getErrores();\n $this->values['alertas'] = $datos->getAlertas();\n $template = $this->entity . '/new.html.twig';\n }\n break;\n }\n } else {\n $template = '_global/forbiden.html.twig';\n }\n\n return array('template' => $template, 'values' => $this->values);\n }", "title": "" }, { "docid": "2dd310e818bee6c233e087b33585220a", "score": "0.52939975", "text": "function vntModule ()\n {\n global $Template, $vnT, $func, $DB, $conf;\n\n //load skin\n $this->loadSkinModule($this->action);\n\n $lang = ($vnT->input['lang']) ? $lang = $vnT->input['lang'] : $func->get_lang_default();\n $this->linkUrl = \"?mod=\" . $this->module . \"&act=\" . $this->action . \"&lang=\" . $lang;\n\n\n if ((isset($_GET['id'])) && (is_numeric($_GET['id'])))\n $id = $_GET['id'];\n else\n $id = 0;\n if (! isset($_POST['d2']))\n $_POST['d2'] = date(\"d\");\n if (! isset($_POST['m2']))\n $_POST['m2'] = date(\"m\");\n if (! isset($_POST['y2']))\n $_POST['y2'] = date(\"Y\");\n if (! isset($_POST['d1']))\n $_POST['d1'] = 1;\n if (! isset($_POST['m1']))\n $_POST['m1'] = 1;\n if (! isset($_POST['y1']))\n $_POST['y1'] = 2006;\n $this->time1 = mktime(0, 0, 0, $_POST['m1'], $_POST['d1'], $_POST['y1']);\n $this->time2 = mktime(23, 59, 59, $_POST['m2'], $_POST['d2'], $_POST['y2']);\n\n $nd['f_title'] = $vnT->lang['manage_adminlog'];\n $nd['content'] .= $this->get_admin_session();\n $nd['content'] .= $this->get_admin_list();\n\n\t\t$nd['icon'] = 'icon-'.$this->module;\n $Template->assign(\"data\", $nd);\n $Template->parse(\"box_main\");\n $vnT->output .= $Template->text(\"box_main\");\n }", "title": "" }, { "docid": "c6ba8dba60ccaadc453e183e79447866", "score": "0.52884257", "text": "public function setPermissions() {\n\n if (isset( $_POST) && !empty($_POST)) {\n $intRolId = intval($_POST['rolId']);\n $arrModules = $_POST['modules'];\n\n\n foreach($arrModules as $module) {\n $moduleId = $module['id'];\n $can_create = empty($module['can_create']) ? 0 : 1;\n $can_read = empty($module['can_read']) ? 0 : 1;\n $can_update = empty($module['can_update']) ? 0 : 1;\n $can_delete = empty($module['can_delete']) ? 0 : 1;\n\n // Si existe el permiso lo editamos si no lo creamos\n $requestPermissionRol = $this->model->getPermissionByRolAndModule($intRolId, $moduleId);\n\n\n if($requestPermissionRol > 0) {\n $request = $this->model->updatePermissionRol($can_create, $can_read, $can_update, $can_delete, $intRolId, $moduleId);\n } else {\n $request = $this->model->insertPermission($can_create, $can_read, $can_update, $can_delete, $intRolId, $moduleId);\n }\n }\n\n if ($request > 0) {\n $arrResponse = array('success'=>true,'message'=>'Se han otorgado permisos correctametne');\n } else if ($request == \"updated\") {\n $arrResponse = array('success'=>true,'message'=>'Se han actualizado los permisos correctamente');\n } else {\n $arrResponse = array('success'=>false,'message'=>'Ha ocurrido un error');\n }\n\n echo json_encode($arrResponse,JSON_UNESCAPED_UNICODE);\n die();\n }\n }", "title": "" }, { "docid": "d2eabd33cfdaa7939052794777015def", "score": "0.52801526", "text": "public function admin_add() {\n\t\t\n\t}", "title": "" }, { "docid": "16f7e66055fecc2d1aa6f0f7b9c30935", "score": "0.5266741", "text": "public function testModVersionAddPostEmptyModID()\n\t{\n\t\t$response = $this->call('POST', '/mod/add-version/', array(\"add-version\"=>\"v1.5.2.v01\",\"add-md5\"=>\"9ece64de3e11a0f15f55ef34f2194760\"),\n\t\t\t\t\t\tarray(), array(\"HTTP_X_REQUESTED_WITH\"=>\"XMLHttpRequest\"));\n\n\t\t$this->assertResponseOk();\n\t\t$this->assertTrue(is_a($response,'Illuminate\\Http\\JsonResponse'));\n\t\t$json = $response->getData(true);\n\n\t\t$this->assertTrue(array_key_exists('status', $json));\n\t\t$this->assertTrue(array_key_exists('reason', $json));\n\t\t$this->assertEquals('error', $json['status']);\n\t\t$this->assertEquals('The mod-id field is required.', $json['reason']);\n\t}", "title": "" }, { "docid": "e5a1469b4748e51731810d6806284063", "score": "0.5266013", "text": "protected function crearModulo()\n\t{\n\t\n\t\t$idProyecto =1;// $this->getRequestParameter('idProyecto');\n\t\t$padre=$this->getRequestParameter('modPadre');\n //validar dependencias en actualizacion\n\t\t$salida\t='';\n\t\t\n\t\t\t $modulo = new AgilhuModulo();\t\t\t \n\t\t\t $modulo->setModNombre($this->getRequestParameter('modNombre'));\n\t\t\t $modulo->setModEstado($this->getRequestParameter('modEstado'));\n\t\t\t $modulo->setModDescripcion($this->getRequestParameter('modDescripcion'));\n\t\t\t $modulo->setProId($this->getUser()->getAttribute('proyectoSeleccionado'));\n\t\t\t $modulo->setModHabilitado($this->getRequestParameter('modHabilitado'));\n\t\t\t if($padre != '')\n\t\t\t {\n\t\t\t\t $modulo->setModPadre($padre); \n\t\t\t }\n else{\n \t $modulo->setModPadre(NULL); \n\t\t\t \n }\n\t\t\t \n\t\t\t \n\t\t\t \n\t\t\t try\n\t {\n\t \t$modulo->save();\n\t }\n\t catch (Exception $excepcionModulo)\n\t {\n\t $salida = \"({success: false, errors: { reason: 'Hubo un problema creando el modulo: \".$this->getRequestParameter('modNombre').\"'}})\";\n\t return $salida;\n\t }\n\t\t\t $salida = \"({success: true, mensaje:'El Modulo fue creado exitosamente'})\";\n\t\t \n\t\t return $salida;\n\t}", "title": "" }, { "docid": "3d1be6a8e05a88e65fdf6c6dabb8ae81", "score": "0.5260673", "text": "public function create()\n {\n //return the modules adding view.\n return view('dashboard.Modules.create');\n }", "title": "" }, { "docid": "7b4cb9a79b7cf23a44c967757fd3bead", "score": "0.52592945", "text": "public function cloneAction()\n {\n if ($this->request->isPost()) {\n $data = $this->request->getPost();\n $base = $data['id'];\n $baseRow = Pi::model('block')->find($base);\n if (!$baseRow) {\n $message = _a('Base block is not found.');\n $this->jump(\n ['action' => 'index'],\n $message,\n 'error'\n );\n return;\n }\n $root = $baseRow->root;\n $rootRow = Pi::model('block_root')->find($root);\n /*\n if (!$rootRow->render) {\n $message = _a('The block is not allowed to clone.');\n $this->jump(\n array('action' => 'index', 'name' => $rootRow->module),\n $message,\n 'error'\n );\n return;\n }\n */\n $form = new BlockModuleForm('block-edit', $rootRow, true);\n $form->setData($data);\n if ($form->isValid()) {\n $values = $baseRow->toArray();\n $values = array_replace($values, $form->getData());\n //$values = $form->getData();\n $values['cloned'] = 1;\n //$values['root'] = $rootRow->id;\n //$values['module'] = $rootRow->module;\n //$values['render'] = $rootRow->render;\n //$values['content'] = $baseRow->content;\n unset($values['id']);\n\n $result = Pi::api('block', 'system')->add($values);\n if (!empty($result['status'])) {\n $message = _a('Block data saved successfully.');\n $this->jump(\n ['action' => 'index', 'name' => $rootRow->module],\n $message\n );\n return;\n } else {\n $message = _a('Block data not saved.');\n }\n } else {\n $message = _a('Invalid data, please check and re-submit.');\n }\n } else {\n $base = $this->params('id');\n $baseRow = Pi::model('block')->find($base);\n if (!$baseRow) {\n $message = _a('Base block is not found.');\n $this->jump(\n ['action' => 'index'],\n $message,\n 'error'\n );\n return;\n }\n $root = $baseRow->root;\n $rootRow = Pi::model('block_root')->find($root);\n /*\n if (!$rootRow->render) {\n $message = _a('The block is not allowed to clone.');\n $this->jump(\n array('action' => 'index', 'name' => $rootRow->module),\n $message,\n 'error'\n );\n return;\n }\n */\n $form = new BlockModuleForm('block-edit', $rootRow, true);\n // Fetch block data\n $data = $baseRow->toArray();\n // Set cloned title\n $data['title'] = sprintf(_a('%s clone'), $data['title']);\n // Set cloned name\n $data['name'] = sprintf('%s-clone', $data['name']);\n // Set root id\n //$data['root'] = $root;\n // Remove root id\n //unset($data['id']);\n // Fetch config values\n if (!empty($data['config'])) {\n foreach ($data['config'] as $key => $config) {\n if (isset($config['value'])) {\n $data['config'][$key] = $config['value'];\n } else {\n unset($data['config'][$key]);\n }\n }\n }\n\n $form->setData($data);\n $form->setAttribute(\n 'action',\n $this->url('', ['action' => 'clone'])\n );\n $message = '';\n }\n\n $title = sprintf(_a('Block clone from: %s'), $baseRow->title);\n\n $this->view()->assign('title', $title);\n $this->view()->assign('name', $rootRow->module);\n $this->view()->assign('form', $form);\n $this->view()->assign('message', $message);\n $this->view()->setTemplate('system:component/forms');\n }", "title": "" }, { "docid": "f9a58011266dc36a40aed61ab22fcf36", "score": "0.5258363", "text": "public function editModuleAction()\n {\n // Como no se de que clase sera el modulo, tengo que cargar todos los\n // modulos para poder hacer la consulta.\n YuppLoader::loadModel(); // Carga todo el Model de la aplicacion CMS\n\n // El problema es que los ids de los modulos no son unicos entre si, ya que \n // distintas clases de modulos se guardan en distintas tablas, y el id es\n // unico por tabla.\n \n // TODO: verificar que viene id\n $module = Module::get($this->params['id']);\n \n // Si se quiere salvar...\n if (isset($this->params['doit']))\n {\n $module->setTitle($this->params['title']);\n $module->setShowContainer( isset($this->params['showContainer']) );\n $module->setStatus($this->params['status']);\n \n $setSIAP = isset($this->params['showInAllPages']);\n \n // Si tengo que ocultar los modulos de todas las paginas\n if ($module->getShowInAllPages() && !$setSIAP)\n {\n // Quita de todas las paginas\n // FIXME: esta no deberia quitar el modulo, deberia solo apagar la bandera.\n // Deberia haber otra accion que se encargue de sacar un modulo de todas las paginas.\n // El problema es que aca no deberia sacar el modulo de la pagina actual, y si se saca\n // deberia marcar como deleted para que la lista de huerfanos lo vea, sino se pierde en el limbo.\n //\n // Mas abajo se setea la bandera en el nuevo valor.\n \n /*\n // Busca las zonas en la que esta el modulo ahora, para luego mostrar\n // el modulo en las zonas que se llamen igual de las demas paginas\n // que no tengan el modulos.\n $dal = new DAL('cms2');\n $res = $dal->sqlQuery('SELECT owner_id FROM cms_page_zone_modules_cms_module WHERE ref_id='. $module->getId());\n \n // Recorro cada PageZone y voy sacando el modulo.\n foreach ($res as $r)\n {\n $pz = PageZone::get($r['owner_id']);\n $pz->removeFromModules($module); // Ya actualiza la base\n }\n */\n \n // TODO: tendria que marcar algo de que el modulo NO SE MUESTRA EN NINGUNA PAGINA!\n // Esto seria tambien que la consulta SQL de arriba devuelve 0 registros.\n }\n // Si tengo que poner los modulos en todas las paginas\n else if (!$module->getShowInAllPages() && $setSIAP)\n {\n // Agrega en todas las paginas que no lo tenian\n \n // Busca las zonas en la que esta el modulo ahora, para luego mostrar\n // el modulo en las zonas que se llamen igual de las demas paginas\n // que no tengan el modulos.\n $dal = new DAL('cms2');\n $res = $dal->sqlQuery('SELECT owner_id FROM cms_page_zone_modules_cms_module WHERE ref_id='. $module->getId());\n\n /*\n * array(\n * 0 => array(\n * owner_id => x\n * name => y\n * )\n * 1 => array(\n * owner_id => x\n * name => y\n * )\n * 2 => ...\n * )\n */\n \n //print_r($res);\n \n // TODO: si se elimina un modulo de una pagina, y ese se muestra en todas las paginas,\n // le deberia preguntar al usuario si quiere eliminarlo de todas las paginas.\n // Si dice que no, se deberia eliminar SOLO de la pagina actual, y desmarcar el modulo como que\n // se muestra en todas las paginas. En este caso el modulo se mostraria en todas menos una.\n // Hay que tenermo en cuenta. ***\n \n \n // CHECK: deberia haber una sola zona con ese modulo!\n //if (count($res)>1) throw new Exception('deberia haber una sola zona con ese modulo!');\n \n // Obtengo la zona de la pagina donde se esta mostrando el modulo actualmente.\n // Por lo comentado antes *** podria estar mostrandose en varias paginas,\n // pero no en todas, o sea que pueden haber varios ids de zonas en $res.\n $zone_id = $res[0]['owner_id'];\n $current_zone = PageZone::get($zone_id);\n $zoneName = $current_zone->getName();\n \n // en la tabla de join no tengo name..\n //$zoneName = $res[0]['name']; // Me ahorro una consulta pidiendo el name de la zona\n \n \n // FIXME: el problema es que pueden haber zonas definidas en el layout\n // pero que aun no han sido creadas en la pagina. Entonces si busco por\n // PageZone, solo me aparecen las zonas creadas. Para las demas paginas,\n // deberia crear tambien la zona.\n \n \n // Pregunta: cuando hay que crear las zonas de una pagina con respecto al layout activo?\n // Seria cuando se establece el nuevo layout? \n // Tambien cuando se crea una nueva pagina?\n // O solo cuando quiero poner un modulo en la zona del layout que todabia no esta en la pagina?\n // Si hago las 2 primeras, la tercera no es necesaria.\n // Cuando se cambia de layout, ademas deberia borrar las zonas del layout anterior\n // que no tienen el mismo nombre en el layout actual.\n \n\n // ==================================================\n // FIXME: esto obtiene todas las zonas del mismo nombre en todas las paginas, pero\n // pueden haber paginas que todavia no crearon esa zona, y que para agregar\n // el moulo habria que crearla.\n \n // Necesito el NOT IN de los ids de las paginas porque son las paginas que no tienen la zona.\n //$pagesWithoutZone = $dal->sqlQuery('SELECT owner_id FROM cms_page_zones_cms_page_zone pzns, cms_page_zone pz WHERE pzns.ref_id=pz.id AND pz.name='. $zoneName);\n \n // Quiero los ids de las paginas\n // Que no estan en..\n // Las paginas que tienen una zona que se llama $zoneName\n //Logger::getInstance()->setFile(\"logger_edit_module.txt\");\n //Logger::getInstance()->on();\n \n /*\n $pagesWithoutZone = $dal->sqlQuery(\n \"SELECT id FROM cms_page\n WHERE id NOT IN (\n SELECT owner_id\n FROM cms_page_zones_cms_page_zone pzns, cms_page_zone pz\n WHERE pzns.ref_id=pz.id AND pz.name='$zoneName'\n )\");\n */\n \n //Logger::struct( $pagesWithoutZone );\n //Logger::getInstance()->off();\n // ==================================================\n \n \n // Zonas con el mismo nombre que la zona donde se esta mostrando actualmente el modulo.\n $zones = PageZone::findBy(\n Condition::EQ(PageZone::TABLE, 'name', $zoneName), //$current_zone->getName()),\n new ArrayObject()\n );\n \n \n // Quiero un array con los ids de las zonas que ya tienen el modulo\n $zoneIds = array();\n foreach ($res as $r)\n {\n $zoneIds[] = $r['owner_id'];\n }\n \n //echo 'zoneIds';\n //print_r($zoneIds);\n \n // Para cada zona, me fijo:\n // 1. Que la zona no sea la actual\n // 2. Que el modulo no esté ya en esa zona (TODO)\n foreach ($zones as $zone)\n {\n // Agrega el modulo a cada zona, menos a la zona en la que ya esta.\n //if ($zone_id != $zone->getId()) // No lo agrego a la zona que ya esta\n \n // Si el modulo no esta en la zona (me fijo contra los ids de las zonas donde si esta el modulo).\n if (!in_array($zone->getId(), $zoneIds))\n {\n $zone->addToModules( $module );\n \n //echo 'agrega a zona '. $zone->getId() .'<br/>';\n \n // FIXME: al salvar la zona, se salva el modulo (y el modulo ya se salva al final). Es sacarle el belongsTo.\n // Ademas si guarda aca el modulo, se deberian limpiar los dirtys, y en los proximos intentnos no deberia\n // guardar por estar limpia, pero se ve que en el guardado en cascada no se limpian los dirtys! \n if ( !$zone->save() ) print_r($zone->getErrors());\n }\n }\n }\n \n \n // Setea la bandera de que se muestra en todas las paginas\n $module->setShowInAllPages( $setSIAP ); // TODO: si es true, tengo que crear el modulo en las demas paginas\n \n \n if (!$module->save()) print_r($module->getErrors());\n \n // No vuelve porque es una ventana modal!\n // TODO: devolver algo de estado, como el modulo que se cambio, la pagina, o si salio todo bien o no.\n header('Content-type: application/json');\n return $this->renderString('{\"status\":\"ok\", \"class\":\"'.$module->getClass().'\", \"moduleId\":\"'.$this->params['id'].'\"}');\n //return $this->renderString('Hecho');\n \n // Vuelve a la pagina en la que estaba\n //return $this->redirect(array('action'=>'displayPage', 'params'=>array('pageId'=>$this->params['pageId'])));\n }\n \n return array('module'=>$module);\n \n }", "title": "" }, { "docid": "e4b745f61b37d9724b4b9d34b789acbf", "score": "0.524624", "text": "public function store(ModuleRequest $request)\n {\n if (!auth()->user()->can('admin-modulos-crud-create')) {\n app()->abort(403);\n }\n\n $module = new Module();\n $this->saveData($module, $request);\n\n return redirect()->to('admin/crud-generator/' . $module->id . \"/edit\")\n ->with('success', trans('crud-generator::modules/admin_lang.save_ok'));\n }", "title": "" }, { "docid": "bac7de0abd566b375cfcf1360a7a52d0", "score": "0.52433383", "text": "function multi_mod()\n\t{\t\t\n\t\t/**\n\t\t* Security Check\n\t\t**/\n\t\t$can_del = 0;\n\t\tif( $this->ipsclass->check_perms( $this->category['perms_moderate'] ) )\n\t\t{\n\t\t\t$can_del = 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif( ( $this->img['member_id'] == $this->ipsclass->member['id'] && $this->ipsclass->member['g_del_own'] ) || $this->ipsclass->member['g_mod_albums'] )\n\t\t\t{\n\t\t\t\t$can_del = 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\t/**\n\t\t* What kind of multi moderation are we doing?\n\t\t**/\n\t\tif( $this->ipsclass->input['type'] != 'comment' )\n\t\t{\n\t\t\tif( empty( $this->ipsclass->input['selectedimgids'] ) ) {\n\t\t\t\t$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'gallery_noimgids') );\n\t\t\t}\n\t\t\t$img_ids = explode( \",\", $this->ipsclass->input['selectedimgids'] );\n\n\t\t\tforeach( $img_ids as $img )\n\t\t\t{\n\t\t\t\t$img = $this->glib->validate_int( $img );\n\t\t\t\tswitch( $this->ipsclass->input['galleryact'] )\n\t\t\t\t{\n\t\t\t\t\tcase 'approve':\n\t\t\t\t\t\t$this->approve_image( $img );\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\tcase 'unapprove':\n\t\t\t\t\t\t$this->decline_image( $img );\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\tcase 'delete':\n\t\t\t\t\t\t$this->delete_image( $img, 0 );\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase 'pin':\n\t\t\t\t\t\t$this->pin_image( $img, 0 );\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\tcase 'unpin':\n\t\t\t\t\t\t$this->unpin_image( $img, 0 );\n\t\t\t\t\tbreak;\t\n\t\t\t\t\t\n\t\t\t\t\tcase 'move':\n\t\t\t\t\t\t$this->process_move( $img, $this->ipsclass->input['move_cat'], true );\n\t\t\t\t \tbreak;\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t/**\n\t\t\t* Redirect\n\t\t\t**/\n\t\t\tif ( $this->ipsclass->input['cat'] )\n\t\t\t{\n\t\t\t\t$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['inline_mod'], \"automodule=gallery&amp;cmd=sc&amp;cat={$this->ipsclass->input['cat']}\" );\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\t$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['inline_mod'], \"automodule=gallery&amp;cmd=si&amp;img={$this->ipsclass->input['img']}\" );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif( empty( $this->ipsclass->input['selectedgcids'] ) ) \n\t\t\t{\n\t\t\t\t$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'gallery_nogcids') );\n\t\t\t}\n\t\t\t\n\t\t\t$cids = explode( \",\", $this->ipsclass->input['selectedgcids'] );\n\t\t\t$type = ( !empty( $this->ipsclass->input['cat'] ) ) ? 'cat' : 'album';\n\t\t\tforeach( $cids as $cid )\n\t\t\t{\n\t\t\t\t$cid = $this->glib->validate_int( $cid );\n\t\t\t\tswitch( $this->ipsclass->input['galleryact'] )\n\t\t\t\t{\n\t\t\t\t\tcase 'delcomments':\n\t\t\t\t\t\t$this->delete_reply( $cid, 0 );\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase 'approvecomments':\n\t\t\t\t\t\t$this->approve_comment( $cid, $this->glib->validate_int( $this->ipsclass->input['img'] ), $type );\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase 'unapprovecomments':\n\t\t\t\t\t\t$this->unapprove_comment( $cid, $this->glib->validate_int( $this->ipsclass->input['img'] ), $type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\t\n\t\t\t}\n\t\t\t\n\t\t\t/**\n\t\t\t* Redirect\n\t\t\t**/\n\t\t\t$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['inline_mod'], \"automodule=gallery&amp;cmd=si&amp;img={$this->ipsclass->input['img']}#comments\" );\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "b85afd688a56403e05cd2ac750f5b044", "score": "0.52377933", "text": "public function store()\n\t{\n $input = Request::all();\n $type = $input['module'];\n\n $moduleData = ['file_loc' => 'path\\to\\python\\script',\n 'screen_loc' => 'position1',\n 'type' => $type];\n\n if ($type == 'rtu')\n {\n $moduleData['name'] = 'RTU_name';\n }\n else if ($type == 'hmi')\n {\n $moduleData['name'] = 'HMI_name';\n }\n\n // add project to logged-in user's projects\n $project = Project::find($input['projectId']);\n $newModule = $project->modules()->create($moduleData);\n\n flash()->success('Your module has been added');\n\n return redirect('/projects/open/' . $project->id);\n\t}", "title": "" }, { "docid": "706cbcb6c11a79b5db242bbcd2f8d01c", "score": "0.52339256", "text": "public function listModulesAction()\n {\n // Lista todos los modulos, borrados o activos\n // FIXME: http://code.google.com/p/yupp/issues/detail?id=109\n \n // Sino se piden los herfanos, listo todos\n if (!isset($this->params['h']))\n {\n $cond = Condition::_OR()\n ->add( Condition::EQ(Module::TABLE, 'deleted', true) )\n ->add( Condition::EQ(Module::TABLE, 'deleted', false) );\n }\n else // Listo solo los herfanos (deleted)\n {\n $cond = Condition::EQ(Module::TABLE, 'deleted', true);\n }\n \n $modules = Module::findBy( $cond, $this->params );\n \n /*\n // Mientras lo resuelvo de otra forma\n $active = Module::listAll($this->params); // OJO, puede paginar solo\n \n $tableName = YuppConventions::tableName( 'Module' );\n $cond = Condition::EQ($tableName, 'deleted', true);\n $deleted = Module::findBy( $cond, $this->params ); // OJO, puede paginar solo\n \n return array('modules'=>array_merge($active, $deleted));\n */\n \n // Si se indica que quiero ver la modal, muestro la modal con los modulos huerfanos para poder agregarlos a alguna zona de la pagina actual.\n // No puedo hacer isAjax porque el request viene normal, no ajax, porque es poner la url en el iframe de la modal.\n if (isset($this->params['m']))\n {\n /* No necesito mandarle JSON, tengo que mandarle HTML a la modal...\n YuppLoader::load('core.persistent.serialize', 'JSONPO');\n \n // FIXME: armo el array JSON porque toJSON aun no soporta que le pase un array de PersistentObject (con esto resuelvo: http://code.google.com/p/yupp/issues/detail?id=125)\n $json = '['; \n foreach ($modules as $module)\n {\n $json .= JSONPO::toJSON( $module ) .', ';\n }\n \n $json = substr($json, 0, -2);\n $json .= ']';\n \n header('Content-type: application/json');\n return $this->renderString('{\"status\":\"ok\", \"id\":\"'.$page->getId().'\", \"parentId\":\"'.$this->params['parentId'].'\"}');\n */\n \n // Necesito los nombres de las zonas para indicar en que zona se pondra el modulo.\n $zones = array();\n $layout = Layout::getActive();\n foreach ($layout->getZones() as $zone)\n {\n $zones[] = $zone->getName();\n }\n \n $this->params['zones'] = $zones;\n $this->params['modules'] = $modules;\n return $this->render('listOrphanModules'); // FIXME: poder pasarle el model en el render.\n }\n\n return array('modules'=>$modules);\n }", "title": "" }, { "docid": "989141037c312422d8155e86ba83a556", "score": "0.5229834", "text": "public function addOrphanModuleToPageZoneAction()\n {\n // Codigo similar a createModule\n //print_r($this->params);\n \n // Donde se va a ubicar el modulo\n $pageZone = PageZone::getByPageAndName( $this->params['pageId'], $this->params['zone'] );\n \n // Si la pageZone del layout seleccionado no esta creada para esta pagina, lo creo.\n // TODO: ahora al cambiar de layout se crean todas las zonas faltantes, asi que esto deberia ser redundante.\n if ($pageZone == NULL)\n {\n // crea la zona y la socia a la pagina\n $page = Page::get($this->params['pageId']);\n $pageZone = new PageZone(array('name'=>$this->params['zone'], 'page'=>$page));\n $page->addToZones($pageZone);\n $pageZone->save();\n $page->save(); // Esto NO guarda la zona en la pagina, // TODO: respuesta con error\n }\n \n // El modulo huerfano (tiene deleted en true)\n $module = Module::get($this->params['moduleId']);\n \n // Undelete\n $module->setDeleted(false);\n if (!$module->save()) print_r($module->getErrors()); // TODO: respuesta con error\n \n \n // Agrega el modulo a la zona\n $pageZone->addToModules( $module );\n if (!$pageZone->save()) print_r($pageZone->getErrors()); // TODO: respuesta con error\n \n // La respuesta es JSON porque el request es AJAX\n header('Content-type: application/json');\n return $this->renderString('{\"status\":\"ok\", \"id\":\"'.$module->getId().'\", \"zoneId\":\"'.$pageZone->getId().'\", \"pageId\":\"'.$this->params['pageId'].'\"}');\n }", "title": "" }, { "docid": "6cdb748c9c0029aa387c19d8cfa53739", "score": "0.52273214", "text": "public function create()\n {\n $checkrights = \\App\\Models\\Admin::checkPermission(\\App\\Models\\Admin::$ADD_CLIENT_USER);\n \n if($checkrights) \n {\n return $checkrights;\n }\n \n $data = array();\n $data['formObj'] = $this->modelObj;\n $data['page_title'] = \"Add \".$this->module;\n $data['action_url'] = $this->moduleRouteText.\".store\";\n $data['action_params'] = 0;\n $data['buttonText'] = \"Save\";\n $data[\"method\"] = \"POST\"; \n $data[\"clients\"] = \\App\\Models\\Client::pluck('name','id')->all();\n $data = customBackUrl($this->moduleRouteText, $this->list_url, $data);\n\n return view($this->moduleViewName.'.add', $data);\n }", "title": "" }, { "docid": "17cfc5830599d721ef325cbee6e149e5", "score": "0.5215686", "text": "public function actionAdd()\n\t{\n\t\tif(!craft()->request->getPost('name')){\n\n\t\t\t$this->renderTemplate('galleryoots/_new');\n\n\t\t}else{\n\t\t\n\t\t\t//call the service to add this to db\n\t\t\t$gallery = new GalleryootsModel();\n\n\t\t\t$gallery->name = craft()->request->getPost('name');\n\t\t\t$gallery->assets_folder_id = craft()->request->getPost('assets_folder_id');\n\t\t\t$gallery->transformation = craft()->request->getPost('transformation');\n\t\t\t$gallery->total_images = craft()->request->getPost('total_images');\n\t\t\t$gallery->selected_images = \"none\"; //when adding set selected images to \"none\" to avoid setting null\n\t\t\t$gallery->status = craft()->request->getPost('status');\n\n\t\t\tcraft()->galleryoots->add($gallery); //call to save gallery\n\n\t\t\t$this->returnSuccess(); //this is where it redirects to the edit route\n \n\t\t}\n\t}", "title": "" }, { "docid": "068b6e5ab162bb32d0233275e15acd80", "score": "0.52094585", "text": "public function create()\n {\n $title = $this->title;\n $module_name = $this->module_name;\n $module_icon = $this->module_icon;\n $module_action = \"Create\";\n\n $roles = Role::lists('name', 'id');\n\n return view(\"backend.$module_name.create\", compact('title', 'module_name', 'module_icon', 'module_action', 'roles'));\n }", "title": "" }, { "docid": "a51f7358a76ff9118ac50e1e0bbba7ff", "score": "0.52061653", "text": "public function create()\n\t{\t\n\t\t$modulos_list = Modulo::all()->lists('id', 'id');\n\n\t\t// load the create form (app/views/Aula/create.blade.php)\n\t\t$this->layout->content = View::make('Aula.create')\n->with('modulos_list', $modulos_list);\n\t}", "title": "" }, { "docid": "dee7ccdc54429c4a9a5e0a3bfe2b713e", "score": "0.5204406", "text": "public function actionAdd()\n\t{\n\t\t$model=new SBAdmin;\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['SBAdmin']))\n\t\t{\n\t\t\t$model->attributes=$_POST['SBAdmin'];\n\t\t\tif(!isset($_POST['SBAdmin']['server_groups']))\n\t\t\t\t$model->server_groups=array();\n\t\t\tif($model->save())\n\t\t\t{\n\t\t\t\tSourceBans::log('Admin added', 'Admin \"' . $model . '\" was added');\n\t\t\t\tYii::app()->user->setFlash('success', Yii::t('sourcebans', 'Saved successfully'));\n\t\t\t\t\n\t\t\t\t$this->redirect(array('admin/admins','#'=>$model->id));\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "b71eaa75538919420910baf1a46101f3", "score": "0.51975477", "text": "public function create()\n {\n return view('User.Modules.create');\n }", "title": "" }, { "docid": "0041dbcc6b8d1aa5d429b10c45b795dd", "score": "0.5194888", "text": "public function post_new(){\n\t\treturn $this->response(array(),200);\n\t}", "title": "" }, { "docid": "a0eb075fcc3ee9c5337151e839501c83", "score": "0.5188906", "text": "public function removeModuleAction()\n {\n YuppLoader::loadModel(); // Carga todo el Model de la aplicacion CMS, si no falla en:\n // Fatal error: Class 'HtmlModule' not found in \n // C:\\wamp\\www\\YuppPHPFramework\\core\\persistent\\core.persistent.PersistentManager.class.php on line 690\n // El problema es que la clase especifica del Module no esta cargada, igual cargar todo el modelo puede ser innecesario...\n \n // FIXME: antes de eliminar el modulo tengo que eliminarlo de la pageZone de la pagina actual\n // necesito una operacion que me pueda decir en que pageZone de una pagina esta un modulo, o\n // necesito un dato en el modelo que me lo diga, p.e. poniendo una referencia para atras en el modulo.\n // Si no se hace removeFrom del modulo de los modulos de la pageZone, y se hace el delete, ocurre un error al volver a mostrar la pagina. \n \n // El problema es que un mismo modulo puede estar en varios pageZone de distintas paginas, incluso de la misma.\n // Es el tipico caso del menu que aparece en todas las paginas.\n \n $module = Module::get($this->params['moduleId']);\n \n $pageZone = PageZone::getByPageAndName($this->params['pageId'], $this->params['zone']);\n $pageZone->removeFromModules($module); // TODO: Siempre dederia existir esta pageZone, pero igual verificar si existe (podria haber problemas de concurrencia que hagan que no exista)\n \n /* esto se hace con las 2 lineas de arriba\n $page = Page::get($this->params['pageId']);\n foreach ($page->getZones() as $pageZone)\n {\n if ($pageZone->modulesContains($module))\n {\n $pageZone->removeFromModules($module);\n break;\n }\n }\n */\n \n \n // TICKET #11: http://code.google.com/p/yupp-cms/issues/detail?id=11\n // Codigo de editmodule:\n \n // Busca las zonas en la que esta el modulo ahora, para luego mostrar\n // el modulo en las zonas que se llamen igual de las demas paginas\n // que no tengan el modulos.\n $dal = new DAL('cms2');\n $res = $dal->sqlQuery('SELECT count(owner_id) as c FROM cms_page_zone_modules_cms_module WHERE ref_id='. $module->getId());\n \n /*\n * Array( 0 => Array (c => xx) )\n */\n \n /*\n Logger::getInstance()->setFile(\"logger_remove_module.txt\");\n Logger::getInstance()->on();\n Logger::struct($res);\n Logger::struct($res[0]['c'] === \"0\"); // 1\n Logger::struct($res[0][\"c\"] === \"0\"); // 1\n Logger::struct($res[0]['c'] === '0'); // 1\n Logger::struct($res[0][\"c\"] === '0'); // 1\n //Logger::struct($res[0]['c']); // '0'\n Logger::struct(gettype($res[0]['c'])); // es un string no un numero!\n Logger::getInstance()->off();\n */\n \n \n // FIXME: si el modulo se muestra en otras paginas NO deberia borrarse!\n // deberia preguntarle al usuario si quiere que lo borre de todas\n // las paginas o solo de esta.\n if ($res[0]['c'] === \"0\")\n $module->delete(true); // logico\n \n \n // Ahora responde json\n //$this->flash['message'] = 'Module eliminado con exito';\n \n // Si se quita de la pagina actual y se mostraba en todas las pagians, tengo que apagar la bandera\n $module->setShowInAllPages(false);\n if (!$module->save()) print_r($module->getErrors); // TODO: check error\n \n\n // Ahora es ajax: http://code.google.com/p/yupp-cms/issues/detail?id=8\n header('Content-type: application/json');\n return $this->renderString('{\"status\":\"ok\", \"class\":\"'.$this->params['class'].'\", \"moduleId\":\"'.$this->params['moduleId'].'\"}');\n }", "title": "" }, { "docid": "c76e32ce4c6bcd517f275a953872513b", "score": "0.5188265", "text": "public function create()\n {\n return view('modules.create');\n }", "title": "" }, { "docid": "cffb917c6166c8ee07e8411f9ce82101", "score": "0.5182634", "text": "public function modificar_plantilla_no_admin(){\n $plantilla = [\n 'idPlantilla' => PlantillaSesion::first()->id,\n 'nombre' => 'Nuevo nombre',\n 'descripcion' => 'Descripcion nueva'\n ];\n $headers = ['X-CSRF-TOKEN' => csrf_token() ];\n $this->post('plantilla/modificar', $plantilla, $headers)\n ->assertStatus(302)\n ->assertRedirect('/admin');\n }", "title": "" }, { "docid": "190a825c4464454ffe8d7d6c6a87bd39", "score": "0.5178696", "text": "public function store(Request $request)\n {\n\n // $this->validate($request, [\n // 'year'=> 'required',\n // 'semester'=>'required'\n\n // ]);\n\n //We need to first take the year and semester. \n\n $year = $request->input('year');\n $semester = $request->input('semester');\n \n //create module, using default year and semester\n\n //test one lets get the num_mods out.\n for($i = 1; $i <= $request->input('num_mods'); $i++){\n $module = new Module;\n $module->module_code = $request->input('mod_code' . $i);\n $module->grade = $request->input('grade' . $i);\n $module->mc_worth = $request->input('mc_worth' . $i);\n $module->year_taken = $year;\n $module->sem_taken = $semester;\n $module->user_id = auth()->user()->id;\n $module->save();\n\n }\n\n\n return redirect('/modules');\n ;\n \n\n }", "title": "" }, { "docid": "798f30aaec0ca0ca9bef934239f34a9f", "score": "0.51777136", "text": "public function add_admin() {\n\t\t$_MML = M('MemberModel')->get_modelList(false);\n\t\tif(empty($_MML)) {\n\t\t\t$this->error(L('ADD_MODEL_FIRST'), Url::U('member_model/add_model'));\n\t\t}\n\t\t$this->assign('_MML', $_MML);\n\n\t\t/* member level list */\n\t\t$_MLL = M('MemberLevel')->get_LevelList();\n\t\tif(empty($_MLL)) {\n\t\t\t$this->error(L('ADD_LEVEL_FIRST'), Url::U('member_level/add_level'));\n\t\t}\n\t\t$this->assign('_MLL', $_MLL);\n\n\t\t/* admin role list */\n\t\t$_ARL = M('AdminRole')->get_roleList();\n\t\tif(empty($_ARL)) {\n\t\t\t$this->error(L('ADD_ROLE_FIRST'), Url::U('admin_role/add_role'));\n\t\t}\n\t\t$this->assign('_ARL', $_ARL);\n\n\t\t/* archive channel list */\n\t\t$_ACL = M('ArchiveChannel')->get_myChannelList();\n\t\t$act = new ATree($_ACL, array(\n\t\t\t'archive_channel_id',\n\t\t\t'ac_parent_id',\n\t\t\t'ac_sub_channel'));\n\t\t$_ACLStr = $act->get_leafStr(0, \"<option value='\\$archive_channel_id'>\\$spacer \\$ac_name</option>\\r\\n\");\n\t\t$this->assign('_ACLStr', $_ACLStr);\n\n\t\t$this->display();\n\t}", "title": "" }, { "docid": "5847a73ae4e707d75f72e7baf32745b0", "score": "0.5173683", "text": "public function create()\r\n {\r\n \r\n $module=Module::select('id','module_name')->where(['is_active'=>'Y','is_delete'=>'N'])->get();\r\n return view('backend.moduleaction.create_form',['module'=>$module]);\r\n }", "title": "" }, { "docid": "f13d2cdb64956132273c586fc848a206", "score": "0.5170511", "text": "public function store(StoreModuleRequest $request)\n {\n $this->moduleRepository->storeNewModule();\n return redirect()->route('admin.module.index')->with('success','Module created successfully');\n }", "title": "" }, { "docid": "3bbfacb26ff65df5f943739531bc94cb", "score": "0.51610446", "text": "function Admin_admin_modify($args)\n{\n // Get parameters from whatever input we need. All arguments to this\n // function should be obtained from pnVarCleanFromInput(), getting them\n // from other places such as the environment is not allowed, as that makes\n // assumptions that will not hold in future versions of PostNuke\n list($cid,\n $objectid)= pnVarCleanFromInput('cid',\n 'objectid');\n // Admin functions of this type can be called by other modules. If this\n // happens then the calling module will be able to pass in arguments to\n // this function through the $args parameter. Hence we extract these\n // arguments *after* we have obtained any form-based input through\n // pnVarCleanFromInput().\n extract($args);\n\n // At this stage we check to see if we have been passed $objectid, the\n // generic item identifier. This could have been passed in by a hook or\n // through some other function calling this as part of a larger module, but\n // if it exists it overrides $tid\n //\n // Note that this module couuld just use $objectid everywhere to avoid all\n // of this munging of variables, but then the resultant code is less\n // descriptive, especially where multiple objects are being used. The\n // decision of which of these ways to go is up to the module developer\n if (!empty($objectid)) {\n $cid = $objectid;\n\n }\n // Create output object - this object will store all of our output so that\n // we can return it easily when required\n $pnRender = new pnRender('Admin');\n\n // As Admin output changes often, we do not want caching.\n $pnRender->caching = false;\n\n // The user API function is called. This takes the item ID which we\n // obtained from the input and gets us the information on the appropriate\n // item. If the item does not exist we post an appropriate message and\n // return\n $item = pnModAPIFunc('Admin',\n 'admin',\n 'get',\n array('cid' => $cid));\n\n if ($item == false) {\n return pnVarPrepHTMLDisplay(_ADMINNOSUCHITEM);\n }\n\n // Security check - important to do this as early as possible to avoid\n // potential security holes or just too much wasted processing. However,\n // in this case we had to wait until we could obtain the item name to\n // complete the instance information so this is the first chance we get to\n // do the check\n if (!pnSecAuthAction(0, 'Admin::Category', \"$item[catname]::$cid\", ACCESS_EDIT)) {\n return pnVarPrepHTMLDisplay(_MODULENOAUTH);\n }\n\n // Assign the item\n $pnRender->assign($item);\n\n // Return the output that has been generated by this function\n return $pnRender->fetch('admin_admin_modify.htm');\n}", "title": "" }, { "docid": "75c04ff6a1388432c3cc6b3c0059fde5", "score": "0.5159499", "text": "public function admin_add() {\n\t\t$model=$this->model;\n\t\t$controller=$this->controller;\n\n\t\tif ($this->request->is('post')) {\n\t\t\tif(!empty($this->request->data)) {\n\t\t\t\tif (!isset($this->request->params['data']['_Token']['key']) || ($this->request->params['data']['_Token']['key'] != $this->request->params['_Token']['key'])) {\n\t\t\t\t\t$blackHoleCallback = $this->Security->blackHoleCallback;\n\t\t\t\t\t$this->$blackHoleCallback();\n\t\t\t\t}\n\n\t\t\t\t//validate user data\n\n\t\t\t\t$this->$model->set($this->request->data);\n\t\t\t\t$this->$model->setValidation('admin');\n\t\t\t\tif ($this->$model->validates()) {\n\t\t\t\t\tif ($this->$model->saveAll($this->request->data)) {\n\t\t\t\t\t\t$this->Session->setFlash(__(''.$model.' has been saved successfully'), 'admin_flash_success');\n\t\t\t\t\t\t$this->redirect(array('action'=>'index'));\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->Session->setFlash(__('The '.$model.' could not be saved. Please, try again.'), 'admin_flash_error');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$this->Session->setFlash('The '.$model.' could not be saved. Please, correct errors.', 'admin_flash_error');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "title": "" }, { "docid": "b22a7c4c6311d8900b7b46484dbcc119", "score": "0.5159133", "text": "public function nuevo() {\n $this->modelo = new EntPermisos();\n $this->modelo->__set('idRol', $_REQUEST['rol']);\n $this->modelo->__set('idModulo', $_REQUEST['modulo']);\n $Nuevo = isset($_REQUEST['Nuevo']) ? $_REQUEST['Nuevo'] : '0';\n $this->modelo->__set('nuevo', $Nuevo);\n $Modificar = isset($_REQUEST['Modificar']) ? $_REQUEST['Modificar'] : '0';\n $this->modelo->__set('modificar', $Modificar);\n $Eliminar = isset($_REQUEST['Eliminar']) ? $_REQUEST['Eliminar'] : '0';\n $this->modelo->__set('eliminar', $Eliminar);\n $Visualizar = isset($_REQUEST['Visualizar']) ? $_REQUEST['Visualizar'] : '0';\n $this->modelo->__set('visualizar', $Visualizar);\n $this->dao = new DaoPermisosModel();\n $a = $this->dao->consultarpermisoexistente($_REQUEST['rol'], $_REQUEST['modulo']);\n if ($a == 'true') {\n $this->dao->crearPermisos($this->modelo);\n header(\"Location:../Vista/ListarPermisos.php\");\n } else {\n header(\"Location:../Vista/ManPermisos.php?opc=nuevo\");\n }\n }", "title": "" }, { "docid": "df467d20e7ca2f9077042415302a98ad", "score": "0.5158586", "text": "function ModBlockNotes()\n{\n\tglobal $context, $txt;\n\n\t// Are we saving a note?\n\tif (isset($_POST['makenote'], $_POST['new_note']))\n\t{\n\t\tcheckSession();\n\n\t\t$_POST['new_note'] = westr::htmlspecialchars(trim($_POST['new_note']));\n\t\t// Make sure they actually entered something.\n\t\tif (!empty($_POST['new_note']) && $_POST['new_note'] !== $txt['mc_click_add_note'])\n\t\t{\n\t\t\t// Insert it into the database then!\n\t\t\twesql::insert('',\n\t\t\t\t'{db_prefix}log_comments',\n\t\t\t\tarray(\n\t\t\t\t\t'id_member' => 'int', 'member_name' => 'string', 'comment_type' => 'string', 'recipient_name' => 'string',\n\t\t\t\t\t'body' => 'string', 'log_time' => 'int',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\tMID, we::$user['name'], 'modnote', '', $_POST['new_note'], time(),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t// Clear the cache.\n\t\t\tcache_put_data('moderator_notes', null, 240);\n\t\t\tcache_put_data('moderator_notes_total', null, 240);\n\t\t}\n\n\t\t// Redirect otherwise people can resubmit.\n\t\tredirectexit('action=moderate');\n\t}\n\n\t// Bye... bye...\n\tif (isset($_GET['notes'], $_GET['delete']) && is_numeric($_GET['delete']))\n\t{\n\t\tcheckSession('get');\n\n\t\t// Let's delete it.\n\t\twesql::query('\n\t\t\tDELETE FROM {db_prefix}log_comments\n\t\t\tWHERE id_comment = {int:note}\n\t\t\t\tAND comment_type = {literal:modnote}',\n\t\t\tarray(\n\t\t\t\t'note' => $_GET['delete'],\n\t\t\t)\n\t\t);\n\n\t\t// Clear the cache.\n\t\tcache_put_data('moderator_notes', null, 240);\n\t\tcache_put_data('moderator_notes_total', null, 240);\n\n\t\tredirectexit('action=moderate');\n\t}\n\n\t// How many notes in total?\n\tif (($moderator_notes_total = cache_get_data('moderator_notes_total', 240)) === null)\n\t{\n\t\t$request = wesql::query('\n\t\t\tSELECT COUNT(*)\n\t\t\tFROM {db_prefix}log_comments AS lc\n\t\t\t\tLEFT JOIN {db_prefix}members AS mem ON (mem.id_member = lc.id_member)\n\t\t\tWHERE lc.comment_type = {literal:modnote}'\n\t\t);\n\t\tlist ($moderator_notes_total) = wesql::fetch_row($request);\n\t\twesql::free_result($request);\n\n\t\tcache_put_data('moderator_notes_total', $moderator_notes_total, 240);\n\t}\n\n\t// Grab the current notes. We can only use the cache for the first page of notes.\n\t$offset = isset($_GET['notes'], $_GET['start']) ? $_GET['start'] : 0;\n\tif ($offset != 0 || ($moderator_notes = cache_get_data('moderator_notes', 240)) === null)\n\t{\n\t\t$request = wesql::query('\n\t\t\tSELECT IFNULL(mem.id_member, 0) AS id_member, IFNULL(mem.real_name, lc.member_name) AS member_name,\n\t\t\t\tlc.log_time, lc.body, lc.id_comment AS id_note\n\t\t\tFROM {db_prefix}log_comments AS lc\n\t\t\t\tLEFT JOIN {db_prefix}members AS mem ON (mem.id_member = lc.id_member)\n\t\t\tWHERE lc.comment_type = {literal:modnote}\n\t\t\tORDER BY id_comment DESC\n\t\t\tLIMIT {int:offset}, 10',\n\t\t\tarray(\n\t\t\t\t'offset' => $offset,\n\t\t\t)\n\t\t);\n\t\t$moderator_notes = array();\n\t\twhile ($row = wesql::fetch_assoc($request))\n\t\t\t$moderator_notes[] = $row;\n\t\twesql::free_result($request);\n\n\t\tif ($offset == 0)\n\t\t\tcache_put_data('moderator_notes', $moderator_notes, 240);\n\t}\n\n\t// Let's construct a page index.\n\t$context['page_index'] = template_page_index('<URL>?action=moderate;area=index;notes', $_GET['start'], $moderator_notes_total, 10);\n\t$context['start'] = $_GET['start'];\n\n\t$context['notes'] = array();\n\tforeach ($moderator_notes as $note)\n\t{\n\t\t$context['notes'][] = array(\n\t\t\t'author' => array(\n\t\t\t\t'id' => $note['id_member'],\n\t\t\t\t'link' => $note['id_member'] ? ('<a href=\"<URL>?action=profile;u=' . $note['id_member'] . '\" title=\"' . strip_tags(on_timeformat($note['log_time'])) . '\">' . $note['member_name'] . '</a>') : $note['member_name'],\n\t\t\t),\n\t\t\t'time' => timeformat($note['log_time']),\n\t\t\t'text' => parse_bbc($note['body'], 'mod-note', array('user' => $note['id_member'])),\n\t\t\t'delete_href' => '<URL>?action=moderate;area=index;notes;delete=' . $note['id_note'] . ';' . $context['session_query'],\n\t\t);\n\t}\n\n\treturn 'notes';\n}", "title": "" }, { "docid": "9a34670afe18225ef78df67c2dd01f63", "score": "0.5156396", "text": "function addNew()\r\r\n {\r\r\n if($this->isAdmin() == TRUE)\r\r\n {\r\r\n $this->loadThis();\r\r\n }\r\r\n else\r\r\n {\r\r\n \r\r\n $data = array();\r\r\n $this->global['pageTitle'] = ': Add New languages';\r\r\n\r\r\n $this->loadViews(\"admin/languages/add\", $this->global, $data, NULL);\r\r\n }\r\r\n }", "title": "" }, { "docid": "1368644b17b6837c85ad0f96f629b860", "score": "0.51528823", "text": "public function actionEditModules()\n {\n $user = Yii::app()->user->getModel();\n $this->render('editModules', array('user' => $user, 'availableModules' => $user->getAvailableModules()));\n }", "title": "" }, { "docid": "2a97eaecd7c83962e3094c827310a751", "score": "0.51510507", "text": "public function store(Request $request)\n {\n $rol = new Module();\n $rsp = $request->all();\n\n $rol->nombre = $rsp['nombre'];\n $rol->ruta = $rsp['ruta'];\n\n $rol->save();\n\n return Redirect('modules')->with('message','Guardado Satisfactoriamente !');\n }", "title": "" }, { "docid": "8002c8785e2c752e14e5d5a983aa08cc", "score": "0.51496756", "text": "public function handle(array $data): Mod\n {\n return $this->repository->create($data);\n }", "title": "" } ]
d44bc0854653ea116da0d3c2f322523c
Parses the input to render based on markup type
[ { "docid": "f9443032b6e0fff1e81f1db22592708a", "score": "0.57903576", "text": "protected function parseMarkup($input)\n {\n $css = $this->disabled ? ' disabled' : '';\n if ($this->type == self::TYPE_INPUT || $this->type == self::TYPE_INLINE) {\n if (isset($this->size)) {\n Html::addCssClass($this->options, 'input-' . $this->size . $css);\n }\n } elseif (isset($this->size)) {\n Html::addCssClass($this->_container, 'input-group input-group-' . $this->size . $css);\n }\n Html::addCssClass($this->_container, 'input-group' . $css);\n if ($this->type == self::TYPE_INPUT) {\n return $input;\n }\n $part1 = $part2 = $part3 = $part4 = '';\n if (!empty($this->addon) && $this->_hasAddon) {\n $part1 = ArrayHelper::getValue($this->addon, 'part1', '');\n $part2 = ArrayHelper::getValue($this->addon, 'part2', '');\n $part3 = ArrayHelper::getValue($this->addon, 'part3', '');\n $part4 = ArrayHelper::getValue($this->addon, 'part4', '');\n }\n if ($this->_hasAddon) {\n Html::addCssClass($this->_container, 'icon');\n $picker = $this->renderAddon($this->pickerButton);\n $remove = $this->renderAddon($this->removeButton, 'remove');\n if ($this->type == self::TYPE_COMPONENT_APPEND) {\n $content = $part1 . $part2 . $input . $part3 . $remove . $picker . $part4;\n } else {\n $content = $part1 . $picker . $remove . $part2 . $input . $part3 . $part4;\n }\n return Html::tag('div', $content, $this->_container);\n }\n if ($this->type == self::TYPE_INLINE) {\n return Html::tag('div', '', $this->_container) . $input;\n }\n }", "title": "" } ]
[ { "docid": "bec0fe2f820bb7c8a095501b2646349f", "score": "0.6663419", "text": "private function parse_type(){\n\t\tswitch($this->text[0]){\n\t\tcase \">\":\n\t\t\t$this->type=TYPE_QUOTE;\n\t\t\tbreak;\n\t\tcase \"``\":\n\t\t\t$this->type=TYPE_CODE;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$this->type=TYPE_PARAGRAPH;\n\t\t}\n\t\tif($this->type!=TYPE_PARAGRAPH)\n\t\t\t//Strip type identifier\n\t\t\t$this->text=ltrim(substr($this->text, 1, strlen($this->text)));\n\t}", "title": "" }, { "docid": "0cfb7c7c311854d074f375bf5fb056e3", "score": "0.5980269", "text": "public static function parse($input);", "title": "" }, { "docid": "d6a1e3a215d36ec83716c16e28c7b216", "score": "0.59529746", "text": "function _parse_accept($input)\n\t{\n\t\tstatic $_types = array(\n\t\t\t'xml' => 'application/xml',\n\t\t\t'html' => 'text/html',\n\t\t\t'xhtml' => 'application/xhtml+xml',\n\t\t\t'json' => 'application/json',\n\t\t\t'text' => 'text/plain',\n\t\t\t'txt' => 'text/plain',\n\t\t\t'plain' => 'text/plain',\n\t\t\t'php_serialized' => 'application/vnd.php.serialized',\n\t\t\t'php' => 'application/php',\n\t\t);\n\n\t\tif (isset($_types[$input]))\n\t\t{\n\t\t\treturn $_types[$input];\n\t\t}\n\n\t\treturn '';\n\t}", "title": "" }, { "docid": "161caafcad01971f3572494fa0449fb3", "score": "0.59351987", "text": "public function parseArray($array){\n //check what type it is\n //if input add to html text etc..\n \n}", "title": "" }, { "docid": "2ca8a056432226d9c59602e4dc63f82d", "score": "0.58973765", "text": "protected abstract function _parse();", "title": "" }, { "docid": "996f1a45ae391f6e37d5e15b8ea92fd6", "score": "0.58897096", "text": "public function parseControl($text,$entity='input',$type='text',$content='') {\n//$text : the text to be parse\n//$entity : the entity type radio, etc\n//$type : the type of control \n $attributes=self::parseAll($text);\n //echo_array($attributes);\n $s1=self::attributesText($attributes);\n $s=sprintf('<%s type=\"%s\" %s />',$entity,$type,$s1);\n return ($s);\n}", "title": "" }, { "docid": "d4ffc0629c87f08b0b744c801567967d", "score": "0.58825135", "text": "abstract protected function getHtmlType();", "title": "" }, { "docid": "4ef79f296ebe93622a96b52a5f21f602", "score": "0.585018", "text": "public function scanTypeHTML(){\n\n if(!current_user_can('manage_options'))\n return;\n\n $html = $_POST['html'];\n $current_type = $_POST['type'];\n $have_match = false;\n\n foreach($this->ad_types as $id => $type)\n if($id !== $current_type && ($have_match = $type->match($html))) break;\n\n if($have_match):\n $label = '<strong>'.$type->getLabel().'</strong>'; ?>\n\n <p class=\"notice\">\n <?php printf(__('The code you entered appears to belong to %s. Would you like to change the type of this ad to %s?', self::ID), $label, $label); ?>\n <a href=\"#\" class=\"button-secondary auto-change-type\" data-type=\"<?php echo $id; ?>\"><?php _e('Yes', self::ID); ?></a>\n <a href=\"#\" class=\"button-secondary ignore-type\"><?php _e('No', self::ID); ?></a>\n </p> <?php\n endif;\n\n exit;\n }", "title": "" }, { "docid": "2e405409c6d20132023dde42b60c9ef4", "score": "0.5810812", "text": "abstract protected function parse();", "title": "" }, { "docid": "ab51db8eca541c81d6093d96da9fd9ab", "score": "0.57872397", "text": "protected function parseType()\n {\n\n if ( $this->type ) {\n return 'type=\"' . $this->type . '\"';\n }\n\n }", "title": "" }, { "docid": "8b06fdc0cafc27946d4648ba4888d65e", "score": "0.57564473", "text": "private function __parse()\n\t{\n\t\tswitch ($this->type) {\n\t\tcase 'day':\n\t\t\t$this->__parseDailyMenu();\n\t\t\tbreak;\n\t\tcase 'week':\n\t\t\t$this->__parseWeeklyMenu();\n\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "f6ffc37dbb7078b52a4595236e641f4c", "score": "0.5629093", "text": "public function parseTextInput($text){\n $names=self::getValues('names',$text);\n $values=self::getValues('values',$text);\n $number=count($names);\n $labels=self::getValues('labels',$text);\n $status=self::getAttribute('status',$text);\n $labelsTop=self::getAttribute('label-top',$text);\n $image=self::getAttribute('image',$text);\n echo '<label>'.$labelsTop.'</label>';\n echo '<div style=\"width:100%;background:#FAFAFA\">';\n for ($i=0;$i<$number;$i++){\n $default=self::getDefaults($names[$i],$values[$i]);\n $s=\"\";\n echo'<div style=\"padding:2px;margin:1px;border:1px solid #ff0000\">';\n $s.='<label style=\"float:left;width:50%;font-size:12px;font-weight:bold;font-family:georgia,arial;border:1px solid #bebebe;margin:3px\">'.$labels[$i]. ' </label>';\n $s.='<INPUT name=\"'.$names[$i].'\" ';\n $s.=' type=\"text\" ';\n $s.=' value=\"'.$default.'\"'.$status.' ';\n $s.= ' style=\"float:left;width:30%;margin:3px;\" > ';\n \n echo $s;\n if (isset($image)){echo '<img src=\"'.$image.'\" />';}\n echo '<div style=\"clear:both\"></div>';\n echo '</div>';\n } \n echo '</div>';\n \n \nreturn $input; \n\n}", "title": "" }, { "docid": "d04b7079e8c8981abb2eaad19535f7ba", "score": "0.56198466", "text": "protected function parseInput($source, $markup, $typography)\n {\n $result = $source;\n\n if ($markup) {\n $result = craft()->smartDown->parseMarkup($result);\n }\n\n if ($typography) {\n $result = craft()->smartDown->parseTypography($result);\n }\n\n return $result;\n }", "title": "" }, { "docid": "8a7a67ff75889ca5a7f423b20bfd916e", "score": "0.5566084", "text": "Function display_from_type($input_type, $value){\n\tswitch (strtolower($input_type)){\t\t\n\t\t//display wysiwyg value\n\t\tCase strtolower(\"wysiwyg\"):\n\t\t\techo \"&lt;HTML&gt;\";\n\t\tbreak;\n\t\t\n\t\t//display image value\n\t\tCase strtolower(\"image\"):\n\t\t\tif (strlen($value) == 0){\n\t\t\t\t$value=\"images/no_image.gif\";\n\t\t\t}\n\t\t\techo \"<a target=\\\"_blank\\\" href=\\\"/\".$value.\"\\\" class=\\\"image_link\\\">\";\n\t\t\techo \"<img src=\\\"ThumbGenerate.php?Width=50&VFilePath=\".$value.\"\\\"></a>\";\t\n\t\tbreak;\n\t\t\n\t\t//display checkbox value\n\t\tCase strtolower(\"checkbox\"):\n\t\t\techo \"<input type=\\\"checkbox\\\" DISABLED \";\n\t\t\tif (intval($value) == 1){\n\t\t\t\techo \"CHECKED\";\n\t\t\t}\n\t\t\techo \">\";\t\n\t\tbreak;\n\t\t\n\t\t//display select value\n\t\tCase strtolower(\"select\"):\t\n\t\t\techo get_display_from_value($tempObj, $value);\n\t\tbreak;\n\t\t\n\t\t//display date value\n\t\tCase strtolower(\"datetime\"):\n\t\t\tif(strlen($value) > 0){\n\t\t\t\techo date(\"m/d/y h:i a\",strtotime( $value ));\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\t//display date value\n\t\tCase strtolower(\"date\"):\n\t\t\tif(strlen($value) > 0){\n\t\t\t\techo date(\"m/d/y\",strtotime( $value ));\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\t//display text value\n\t\tCase strtolower(\"text\"):\n\t\t\tif(strlen($value) > 20){\n\t\t\t\techo substr($value, 0, 20) . \"...\";\n\t\t\t}else{\n\t\t\t\techo $value;\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\tdefault:\n\t\t\t//display value\n\t\t\techo $value; \n\t}\n}", "title": "" }, { "docid": "12e8932094785e71fb3597206490b876", "score": "0.5556162", "text": "function feed_formatter_type_process($formatter, $hook, &$variables) {\r\n $variables['#values'] = array();\r\n \r\n foreach (feed_formatter_type_info_by_hook($formatter, $hook) as $name => $formatter_type) {\r\n if (feed_formatter_type_validate($formatter_type, $variables)) {\r\n $variables['#values'] = feed_formatter_type_format($formatter_type, $variables);\r\n \r\n if (!empty($variables['#values']) && is_array($variables['#values'])) {\r\n $variables['#values'] = feed_formatter_type_filter($formatter_type, $variables['#values']);\r\n }\r\n \r\n if (!empty($formatter_type['theme'])) {\r\n $variables['#content'] = theme($formatter_type['theme'], $variables['#values']);\r\n }\r\n return TRUE;\r\n }\r\n }\r\n return FALSE;\r\n}", "title": "" }, { "docid": "3e3d419d8eefd653d032cb54b9c12eb6", "score": "0.55363625", "text": "public function type($input);", "title": "" }, { "docid": "508094b2946054fb5bd8c38504d5525b", "score": "0.55170304", "text": "abstract public function parse();", "title": "" }, { "docid": "508094b2946054fb5bd8c38504d5525b", "score": "0.55170304", "text": "abstract public function parse();", "title": "" }, { "docid": "508094b2946054fb5bd8c38504d5525b", "score": "0.55170304", "text": "abstract public function parse();", "title": "" }, { "docid": "508094b2946054fb5bd8c38504d5525b", "score": "0.55170304", "text": "abstract public function parse();", "title": "" }, { "docid": "508094b2946054fb5bd8c38504d5525b", "score": "0.55170304", "text": "abstract public function parse();", "title": "" }, { "docid": "a43a1a471efcd2a5f8eb353b91f132cb", "score": "0.550905", "text": "public static function is( $input ) {\n\t\tif ( is_array( $input ) ) {\n\t\t\treturn 'raw_html' == $input['type'];\n\t\t}\n\t\treturn preg_match( '/^<[^>]*(><[^>]*)*>$/', $input ) ? true : false;\n\t}", "title": "" }, { "docid": "bbe9d4bc1255ad2b2c3865bd0dfe923e", "score": "0.5500847", "text": "public abstract function parse($content);", "title": "" }, { "docid": "ee624050d41185d329e546a14cd6f41d", "score": "0.5478211", "text": "abstract public function renderInput(): string;", "title": "" }, { "docid": "ee624050d41185d329e546a14cd6f41d", "score": "0.5478211", "text": "abstract public function renderInput(): string;", "title": "" }, { "docid": "1f9cd17b91ccfabe0b72accefeb641d4", "score": "0.5474625", "text": "private function getHtmlInput() {\n\n\t\tif ($this->field['datatype'] == 'text') {\n\t\t\t$html = $this->getHtmlInputText();\n\t\t}\n\n\t\telse if ($this->field['datatype'] == 'numeric') {\n\t\t\t$html = $this->getHtmlInputNumeric();\n\t\t}\n\n\t\telse if ($this->field['datatype'] == 'date') {\n\t\t\t$html = $this->getHtmlInputDate();\n\t\t}\n\n\t\telse if ($this->field['datatype'] == 'select_single') {\n\t\t\t$html = $this->getHtmlInputSelectSingle();\n\t\t}\n\n\t\telse if ($this->field['datatype'] == 'select_multiple') {\n\t\t\t$html = $this->getHtmlInputSelectMulti();\n\t\t}\n\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "60d63d96a2ed9f68ae74627593f21fc4", "score": "0.5444309", "text": "private function getInputForTypeAndOptions($type, $options){\n\n\t\t$inputHtml = \"\";\n\n\t\t//for not just assume we only have \"input\" and \"button\" types so it is quicker\n\t\tswitch ($type) {\n\t\t\tcase \"select\":\n\t\t\t\t$id = isset($options['attributes']) && isset($options['attributes']['id']) ? $options['attributes']['id'] : \"\";\n\t\t\t\tif(isset($options['attributes'])){ unset($options['attributes']['id']);}\n\t\t\t\t$options['tag'] = $type;\n\t\t\t\t$input = new Select($id, $options);\n\t\t\t\t$inputHtml = $input->getView();\n\t\t\t\tbreak;\n\t\t\tcase \"textarea\":\n\t\t\tcase \"div\":\n\t\t\tcase \"button\":\n\t\t\t\t$id = isset($options['attributes']) && isset($options['attributes']['id']) ? $options['attributes']['id'] : \"\";\n\t\t\t\tif(isset($options['attributes'])){ unset($options['attributes']['id']);}\n\t\t\t\t$options['tag'] = $type;\n\t\t\t\t$input = new SingularContentView($id, $options);\n\t\t\t\t$inputHtml = $input->getView();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$id = isset($options['id']) ? $options['id'] : \"\";\n\t\t\t\tunset($options['id']);\n\t\t\t\t$input = new SingularView($id, array(\"attributes\" => $options, \"tag\" => $type));\n\t\t\t\t$inputHtml = $input->getView();\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn $inputHtml;\t\t\n\t}", "title": "" }, { "docid": "410d814df7ecd7afb40f07ab4ced608e", "score": "0.5442192", "text": "private static final function htmlInputType ($type, $value) {\n \n $_html = '';\n \n switch(strtolower($type)) {\n \n case \"text\" : $_html = \"<input type='text' value='{$value}'/>\"; break;\n \n case \"submit\" : $_html = \"<input type='submit' value='{$value}'/>\"; break;\n \n case \"reset\" : $_html = \"<input type='reset' value='{$value}'/>\"; break;\n \n case \"password\" : $_html = \"<input type='password' value='{$value}'/>\"; break;\n \n case \"image\" : $_html = \"<input type='image' value='{$value}'/>\"; break;\n \n case \"hidden\" : $_html = \"<input type='hidden' value='{$value}'/>\"; break;\n \n case \"file\" : $_html = \"<input type='file' />\"; break;\n \n case \"button\" : $_html = \"<input type='button' value='{$value}'/>\"; break;\n \n case \"control:button\" : $_html = \"<button>{$value}</button>\"; break;\n \n /**\n * The radio case flow as follows:\n * \n * 1. It first initializes $ctr to 0. This is used to create ID per radio instance.\n * 2. $_html is then concatenated with an HTML markup.\n * 3. Then we walk thru the list of radio instances -- bind values and labels.\n * Each radios and label can be modified via CSS.\n * 4. It then concatenates $_html again with a closing HTML markup.\n * 5. It then unsets $ctr;\n * \n */\n case \"radio\" : \n \n $ctr = 0;\n\n $_html .= \"<div class='\".self::$formPrefix.\"_radioContainer'>\";\n \n foreach($value[1] as $k => $v) {\n\n $_html .= \"<span class='\".self::$formPrefix.\"_radio'>\n <input type='radio' value='{$v[1]}' id='\".self::$formPrefix.\"_radio_{$ctr}' name='{$value[0]}'/></span>\n <span class='\".self::$formPrefix.\"_radioLabel'>\n <label for='\".self::$formPrefix.\"_radio_{$ctr}'>{$v[0]}</label></span>\";\n\n $ctr++;\n\n }\n \n $_html .= \"</div>\";\n \n unset($ctr);\n \n break;\n \n /**\n * The checkbox case flow as follows:\n * \n * 1. It first initializes $ctr to 0. This is used to create ID per checkbox instance.\n * 2. $_html is then concatenated with an HTML markup.\n * 3. Then we walk thru the list of checkbox instances -- bind values and labels.\n * Each checkbox and label can be modified via CSS.\n * 4. It then concatenates $_html again with a closing HTML markup.\n * 5. It then unsets $ctr;\n * \n */\n case \"checkbox\" : \n \n $ctr = 0;\n\n $_html .= \"<div class='\".self::$formPrefix.\"_checkboxContainer'>\";\n \n foreach($value[1] as $k => $v) {\n\n $_html .= \"<span class='\".self::$formPrefix.\"_checkbox'>\n <input type='checkbox' value='{$v[1]}' id='\".self::$formPrefix.\"_checkbox_{$ctr}' name='{$value[0]}'/></span>\n <span class='\".self::$formPrefix.\"_checkboxLabel'>\n <label for='\".self::$formPrefix.\"_checkbox_{$ctr}'>{$v[0]}</label></span>\";\n\n $ctr++;\n\n }\n \n $_html .= \"</div>\";\n \n unset($ctr);\n \n break;\n \n /**\n * The select case flow as follows:\n * \n * 1. Special to select control is the grouping parameter. And so, the block\n * first checks if optgroup is true or false. If it is true, then it goes to the\n * else block.\n * 2. The ELSE Block as follows:\n * 2.1. $_html is concatenated with SELECT markup.\n * 2.2. It then walks thru the optgroups values. It first bind the optgroup markup\n * followed by the list of options.\n * 2.3 This block is then ended by concatenating $_html with the SELECT closing \n * markup.\n * 3. The IF block is similar to the ELSE block, the only difference is that in the IF block\n * there is no optgroup markup.\n * \n */\n case \"select\" : \n\n if(!$value[\"optgroup\"]) {\n \n $_html .= \"<select class='\".self::$formPrefix.\"_select' name='{$value[0]}'>\";\n\n foreach($value[1] as $k => $v) {\n\n $_html .= \"<option class='\".self::$formPrefix.\"_options' value='{$v[1]}'>{$v[0]}</option>\";\n\n }\n\n $_html .= \"</select>\";\n \n }\n else {\n \n $_html .= \"<select class='\".self::$formPrefix.\"_select' name='{$value[0]}'>\";\n\n foreach($value[1] as $k => $v) {\n\n $_html .= \"<optgroup label='{$v[0]}' class='\".self::$formPrefix.\"_optgroup'>\";\n \n foreach($v[1] as $kx => $vx) {\n \n $_html .= \"<option class='\".self::$formPrefix.\"_options' value='{$vx[1]}'>{$vx[0]}</option>\";\n \n }\n \n $_html .= \"</optgroup>\";\n\n }\n\n $_html .= \"</select>\";\n \n }\n \n break; \n \n case \"textarea\" : $_html = \"<textarea>{$value}</textarea>\"; break;\n \n \n default: $_html = \"<input type='text' value='{$value}' />\";\n \n }\n \n return $_html;\n \n }", "title": "" }, { "docid": "e5d0876201dc2b5384260e2977340891", "score": "0.54328763", "text": "function F_parseContent($input, $parselevel) {\n\n global $syntax;\n //abort out on simple cases\n if ($parselevel == 0) {\n return stripslashes($input);\n }\n if ($parselevel == 5) {\n return htmlspecialchars(stripslashes($input));\n }\n\n $htmlOut = \"\";\n\n $strings = explode(\"\\n\",$input);\n $lines = count($strings);\n\n for ($i=0; $i<$lines; $i++) {\n\n //working memory...add spaces to string ends to make regexps easier\n $ostring = \" \".trim($strings[$i]).\" \\n\";\n // print \"pristine |$ostring|\\n\\n\";\n\n //find tags we recognize with this parselevel and subst them to\n //<tag> ===> [tag]\n //and then subst the rest < --> &lt; > --> &gt;\n if ($parselevel == 2) {\n reset($syntax);\n $k = current($syntax);\n while ($k) {\n $k = key($syntax);\n $htmlk = \"<(\" . $k . \")>\"; //construct the html key\n $ostring = eregi_replace($htmlk,\"[\\\\1]\",$ostring);\n $k = next($syntax);\n }\n $ostring = htmlspecialchars($ostring);\n }\n\n// print \"ps|$ostring|sp\\n\\n\";\n\n //interpret tags for parse levels 1 and 2\n if ($parselevel <= 2) {\n reset($syntax);\n $k = current($syntax);\n while ($k) {\n $k = key($syntax);\n $v = $syntax[$k];\n\n $bracketk = \"\\[\" . $k . \"\\]\";\n $ostring = eregi_replace($bracketk,$v,$ostring);\n\n $bracketk = \"<\" . $k . \">\";\n $ostring = eregi_replace($bracketk,$v,$ostring);\n\n $k = next($syntax);\n }\n }\n \n //for level 3,4, start with htmlspecialchars\n if ($parselevel >= 3) {\n $ostring = htmlspecialchars($ostring);\n }\n\n\n //do in-lining of http://xxx.xxx to link, [email protected] to email\n if ($parselevel < 4) {\n //mailto\n $ostring = eregi_replace(\"([ ]+)([[:alnum:]\\.\\-]+\\@[[:alnum:]\\-]+\\.[\\.[:alnum:]]+)([^\\.[:alnum:]])\",\"\\\\1<a href=\\\"mailto:\\\\2\\\">\\\\2</A>\\\\3\", $ostring);\n\n //urls\n $ostring = eregi_replace(\"([ ]+)((http|https|ftp)\\:\\/\\/[[:alnum:]\\-]+\\.[[:alnum:]\\-]+[^[:space:]]*)([ ]+)\",\"\\\\1<a target=_blank href=\\\"\\\\2\\\">\\\\2</A>\\\\4\", $ostring);\n }\n\n //do the blank-line ---> <P> substitution.\n //everybody gets this; if you don't want even that, just save\n //the htmlspecialchars() version of the input\n if (strlen(trim($strings[$i]))==0) {\n $ostring = \"<p>\";\n }\n\n if ($parselevel > 1) {\n $htmlOut = $htmlOut . trim($ostring) . \"<br>\\n\";\n } else {\n $htmlOut = $htmlOut . trim($ostring) . \"\\n\";\n }\n\n }\n\n return stripslashes($htmlOut);\n}", "title": "" }, { "docid": "04855062178bacae7ec137ea62826c5e", "score": "0.542439", "text": "public function parseTextInput($text){\n //\n // change to parse all attributes - attribute and action to return \n // back \n // name->insertintohtml\n // \n $names=self::getValues('names',$text);\n $values=self::getValues('values',$text);\n $number=count($names);\n $labels=self::getValues('labels',$text);\n $status=self::getAttribute('status',$text);\n $labelsTop=self::getAttribute('label-top',$text);\n $image=self::getValues('image',$text);\n \n $rules=self::getRules($text);\n $s1='<label>'.$labelsTop.'</label>';\n $s1.='<div style=\"width:100%;background:#FAFAFA\">';\n $this->html_text[]=$s1;\n //echo $s1;\n for ($i=0;$i<$number;$i++){\n $this->elements[]='text';\n $default=self::getDefaults($names[$i],$values[$i]);\n $s=\"\";\n $s.='<div style=\"padding:2px;margin:1px;\">'.\"\\n\";\n $s.='<label style=\"float:left;width:50%;font-size:12px;font-weight:bold;font-family:georgia,arial;margin:3px\">'.$labels[$i]. \" </label>\\n\";\n $s.='<INPUT name=\"'.$names[$i].'\" id=\"'.$names[$i].'\" ';\n $s.=' type=\"text\" ';\n $s.=' value=\"'.$default.'\"'.$status.' ';\n $s.= ' style=\"float:left;width:30%;margin:3px;\"'.\" > \\n\";\n //echo $s;\n $this->html_text[]=$s;\n if (isset($image[$i])){\n $s4='<a href=\"\"><img src=\"'.$image[$i].'\" /></a>';\n $this->html_text[]=$s4;\n }\n $s2='<div style=\"clear:both\"></div>';\n $s2.='</div>';\n $this->html_text[]=$s2;\n //echo $s2;\n } \n $s3='</div>';\n $this->html_text[]=$s3;\n //echo $s3; \n \nreturn $input; \n\n}", "title": "" }, { "docid": "ab05b3b5ab1f6facde6e6ec563abba09", "score": "0.5413876", "text": "public function getHTMLType();", "title": "" }, { "docid": "0c1f99b23e102ce293cd13c5f2bbf8b8", "score": "0.5400835", "text": "function input_style($type){\n \n $vec_estilos = array(\n 'text' => 'type-text', \n 'select' => 'type-select',\n 'checkbox'=> 'type-check',\n 'radio'=>'type-check',\n 'textarea'=>'type-text'\n );\n if(array_key_exists($type, $vec_estilos))\n {\n return $vec_estilos[$type]; \n }\n}", "title": "" }, { "docid": "3e9a867dad628c03d5f9816c5abcdb08", "score": "0.53859395", "text": "protected function _detect_input_format()\n {\n // Get the CONTENT-TYPE value from the SERVER variable\n $content_type = $this->input->server('CONTENT_TYPE');\n\n if (empty($content_type) === false) {\n // If a semi-colon exists in the string, then explode by ; and get the value of where\n // the current array pointer resides. This will generally be the first element of the array\n $content_type = (strpos($content_type, ';') !== false ? current(explode(';', $content_type)) : $content_type);\n\n // Check all formats against the CONTENT-TYPE header\n foreach ($this->_supported_formats as $type => $mime) {\n // $type = format e.g. csv\n // $mime = mime type e.g. application/csv\n\n // If both the mime types match, then return the format\n if ($content_type === $mime) {\n return $type;\n }\n }\n }\n }", "title": "" }, { "docid": "b0dd58b6544f7176b5ef1daeddcb4244", "score": "0.5372374", "text": "function extractType( array $find ) : string {\n\treturn lowercase( labelName( $html['label'] ?? \\POST_TYPE ) );\n}", "title": "" }, { "docid": "9ab4f508344df14336e4d72c206a3f74", "score": "0.534331", "text": "protected function parse_inputs() {\n\n if(!empty($this->controller->inputs)){\n\n foreach($this->controller->inputs as $type => $filters){\n\n $data = array();\n\n if(is_string($type)){\n\n switch($type) {\n case \"HEADERS\":\n\n if(function_exists(\"apache_request_headers\")){\n $headers = apache_request_headers();\n\n $data = filter_var_array($headers, $filters);\n }\n\n break;\n }\n\n } elseif($type == INPUT_GET || $type == INPUT_POST || $type == INPUT_COOKIE){\n\n $data = filter_input_array($type, $filters);\n\n foreach($filters as $var => $filter){\n if(!isset($data[$var]) && isset($filter[\"default\"])){\n $data[$var] = $filter[\"default\"];\n }\n }\n\n }\n\n switch($type){\n case \"HEADERS\":\n $this->HEADERS = $data;\n break;\n case INPUT_GET:\n $this->GET = $data;\n break;\n case INPUT_POST:\n $this->POST = $data;\n break;\n case INPUT_COOKIE:\n $this->COOKIE = $data;\n break;\n default:\n trigger_error(\"Invalid input type defined.\", E_USER_WARNING);\n }\n\n }\n\n }\n\n }", "title": "" }, { "docid": "9d4d077816b4df33dec3f067cee3875c", "score": "0.5334576", "text": "private function parse()\n\t{\n\t\t$this->frm->parse($this->tpl);\n\t}", "title": "" }, { "docid": "83adbc2164b6f25f2dba457c49e37c4e", "score": "0.53255033", "text": "abstract public function handles(InputType $inputType);", "title": "" }, { "docid": "ff17d0ad996437fe1e5b73fe24d68b1e", "score": "0.5323256", "text": "function filter_item_input_field($item_attribute_type_r, $value) {\n\t// set to NULL which is pretty much the same thing.\n\tif ($value === FALSE) {\n\t\treturn NULL;\n\t}\n\t\n\tif (! is_array ( $value )) {\n\t\t$tmpval = trim ( $value );\n\t\tunset ( $value );\n\t\t\n\t\tif (strlen ( $tmpval ) > 0) {\n\t\t\t// only support text type for now\n\t\t\tif ($item_attribute_type_r ['input_type'] == 'text' && $item_attribute_type_r ['multi_attribute_ind'] == 'Y') {\n\t\t\t\t$value = explode ( \"\\n\", replace_newlines ( $tmpval ) );\n\t\t\t} else {\n\t\t\t\t$value [] = $tmpval;\n\t\t\t}\n\t\t} else {\n\t\t\treturn NULL;\n\t\t}\n\t}\n\t\n\tfor($i = 0; $i < count ( $value ); $i ++) {\n\t\t$value [$i] = trim ( replace_newlines ( $value [$i] ) );\n\t\t\n\t\tif ($item_attribute_type_r ['lookup_attribute_ind'] != 'Y' && strlen ( $value [$i] ) > 0) {\n\t\t\t// Now we have to work out how to parse the input_type\n\t\t\tswitch ($item_attribute_type_r ['input_type']) {\n\t\t\t\tcase 'hidden' :\n\t\t\t\tcase 'readonly' :\n\t\t\t\tcase 'text' :\n\t\t\t\tcase 'password' :\n\t\t\t\tcase 'textarea' :\n\t\t\t\t\t$value [$i] = strip_tags ( $value [$i] );\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'htmlarea' :\n\t\t\t\t\t$value [$i] = strip_tags ( $value [$i], '<' . implode ( '><', get_opendb_config_var ( 'widgets', 'legal_html_tags' ) ) . '>' );\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'check_boxes' : // deprecated\n\t\t\t\tcase 'vertical_check_boxes' : // deprecated\n\t\t\t\tcase 'horizontal_check_boxes' : // deprecated\n\t\t\t\tcase 'radio_group' : // deprecated\n\t\t\t\tcase 'vertical_radio_group' : // deprecated\n\t\t\t\tcase 'horizontal_radio_group' : // deprecated\n\t\t\t\tcase 'simple_checkbox' :\n\t\t\t\tcase 'checkbox' :\n\t\t\t\tcase 'radio_grid' :\n\t\t\t\tcase 'checkbox_grid' :\n\t\t\t\tcase 'single_select' :\n\t\t\t\tcase 'multi_select' :\n\t\t\t\tcase 'value_radio_grid' :\n\t\t\t\tcase 'value_select' :\n\t\t\t\t\t// do nothing\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'url' :\n\t\t\t\t\t// do nothing\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'email' :\n\t\t\t\t\t// do nothing\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'datetime' :\n\t\t\t\t\t$components = get_timestamp_components_for_datetime ( $value [$i], $item_attribute_type_r ['input_type_arg1'] );\n\t\t\t\t\tif ($components !== FALSE) {\n\t\t\t\t\t\t// This is the 'YYYYMMDDHH24MISS' mask.\n\t\t\t\t\t\t$value [$i] = str_pad ( $components ['year'], 4, '0', STR_PAD_LEFT ) . str_pad ( $components ['month'], 2, '0', STR_PAD_LEFT ) . str_pad ( $components ['day'], 2, '0', STR_PAD_LEFT ) . str_pad ( $components ['hour'], 2, '0', STR_PAD_LEFT ) . str_pad ( $components ['minute'], 2, '0', STR_PAD_LEFT ) . str_pad ( $components ['second'], 2, '0', STR_PAD_LEFT );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'number' :\n\t\t\t\t\t$value [$i] = remove_illegal_chars ( $value [$i], expand_chars_exp ( '0-9' ) );\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'filtered' :\n\t\t\t\t\t$value [$i] = remove_illegal_chars ( $value [$i], expand_chars_exp ( $item_attribute_type_r ['input_type_arg3'] ) );\n\t\t\t\t\tbreak;\n\t\t\t\tdefault :\n\t\t\t\t\t// do nothing\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tif ($item_attribute_type_r ['lookup_attribute_ind'] == 'Y' || $item_attribute_type_r ['multi_attribute_ind'] == 'Y')\n\t\treturn $value;\n\telse\n\t\treturn $value [0];\n}", "title": "" }, { "docid": "bfd06cda35ad9e9846a473231338ed3c", "score": "0.5315077", "text": "public function render()\r\n\t{\r\n\t\tswitch (key($this->type)) {\r\n\t\t\tcase \"text\":\r\n\t\t\t\treturn $this->renderText();\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"textarea\":\r\n\t\t\t\treturn $this->renderTextarea();\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"select\":\r\n\t\t\t\treturn $this->renderSelect();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\treturn $this->value;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "904ca9cbaa905207b92d919e783bd3b3", "score": "0.5300142", "text": "public function autoParse()\n {\n $type = $this->getMimeType();\n $contents = '';\n\n if ($type == 'application/json' || $type == 'text/json' || $type == 'application/javascript') {\n $contents = $this->parseJson(true);\n } elseif ($type == 'application/xml' || $type == 'text/xml') {\n $contents = $this->parseXml();\n } elseif ($type == 'application/x-yaml' || $type == 'text/yaml') {\n $contents = $this->parseYaml();\n } else {\n $contents = $this->getContents();\n }\n\n return $contents;\n }", "title": "" }, { "docid": "dbd070396090507c5d917d60c70ccd76", "score": "0.5288052", "text": "function GetHtmlForType($name,$type,$value) {\r\n\t$type = trim(preg_replace('/unsigned/iu','',$type));\r\n\tswitch(strtolower($type)) {\r\n\t\t//text\r\n\t\tcase 'hidden':\r\n\t\t\t$ret = '<INPUT TYPE=\"hidden\" NAME=\"field['.$name.']\" value=\"'.$value.'\">';\r\n\t\t\tbreak;\r\n\t\tcase 'disabled':\r\n\t\t\t$ret = '<INPUT DISABLED TYPE=\"text\" NAME=\"field['.$name.']\" value=\"'.$value.'\">';\r\n\t\t\tbreak;\r\n\t\tcase 'char':\r\n\t\tcase 'nchar':\r\n\t\t\t$ret = '<INPUT TYPE=\"text\" NAME=\"field['.$name.']\" style=\"width:7%;\" value=\"'.$value.'\">';\r\n\t\t\tbreak;\r\n\t\tcase 'varchar':\r\n\t\tcase 'nvarchar':\r\n\t\t\t$ret = '<INPUT TYPE=\"text\" NAME=\"field['.$name.']\" style=\"width:40%;\" value=\"'.$value.'\">';\r\n\t\t\tbreak;\r\n\t\tcase 'tinyblob':\r\n\t\tcase 'tinytext':\r\n\t\tcase 'blob':\r\n\t\tcase 'text':\r\n\t\t\t$ret = '<TEXTAREA NAME=\"field['.$name.']\" style=\"width:70%;\">'.$value.'</TEXTAREA>';\r\n\t\t\tbreak;\r\n\t\tcase 'mediumblob':\r\n\t\tcase 'mediumtext':\r\n\t\tcase 'longblob':\r\n\t\tcase 'longtext':\r\n\t\t\t$ret = '<TEXTAREA NAME=\"field['.$name.']\" style=\"width:70%;height:150px;\">'.$value.'</TEXTAREA>';\r\n\t\t\tbreak;\r\n\t\t//int\r\n\t\tcase 'bit':\r\n\t\tcase 'bool':\r\n\t\t\t$ret = '<INPUT TYPE=\"checkbox\" NAME=\"field['.$name.']\">';\r\n\t\t\tbreak;\r\n\t\tcase 'tinyint':\r\n\t\tcase 'smallint':\r\n\t\tcase 'mediumint':\r\n\t\tcase 'integer':\r\n\t\tcase 'int':\r\n\t\tcase 'bigint':\r\n\t\tcase 'datetime':\r\n\t\tcase 'time':\r\n\t\t\t$ret = '<INPUT TYPE=\"text\" NAME=\"field['.$name.']\" style=\"width:15%;\" value=\"'.$value.'\">';\r\n\t\t\tbreak;\r\n\t\t//real\r\n\t\tcase 'real':\r\n\t\tcase 'float':\r\n\t\tcase 'decimal':\r\n\t\tcase 'numeric':\r\n\t\tcase 'double':\r\n\t\tcase 'double precesion':\r\n\t\t\t$ret = '<INPUT TYPE=\"text\" NAME=\"field['.$name.']\" style=\"width:15%;\" value=\"'.$value.'\">';\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\treturn false;\r\n\t}\r\n\treturn $ret;\r\n}", "title": "" }, { "docid": "82d07c9b18673ee98d0172272e7f2462", "score": "0.52825844", "text": "protected function parse()\n {\n $this->output = '';\n # drop tags\n $this->parser->html = preg_replace('#<(' . implode('|', $this->drop) . ')[^>]*>.*</\\\\1>#sU', '', $this->parser->html);\n while ($this->parser->nextNode()) {\n switch ($this->parser->nodeType) {\n case 'doctype':\n break;\n case 'pi':\n case 'comment':\n if ($this->keepHTML) {\n $this->flushLinebreaks();\n $this->out($this->parser->node);\n $this->setLineBreaks(2);\n }\n # else drop\n break;\n case 'text':\n $this->handleText();\n break;\n case 'tag':\n if (in_array($this->parser->tagName, $this->ignore)) {\n break;\n }\n if ($this->parser->isStartTag) {\n $this->flushLinebreaks();\n }\n if ($this->skipConversion) {\n $this->isMarkdownable(); # update notConverted\n $this->handleTagToText();\n continue;\n }\n if (!$this->parser->keepWhitespace && $this->parser->isBlockElement && $this->parser->isStartTag) {\n $this->parser->html = ltrim($this->parser->html);\n }\n if ($this->isMarkdownable()) {\n if ($this->parser->isBlockElement && $this->parser->isStartTag && !$this->lastWasBlockTag && !empty($this->output)) {\n if (!empty($this->buffer)) {\n $str =& $this->buffer[count($this->buffer) - 1];\n } else {\n $str =& $this->output;\n }\n if (substr($str, -strlen($this->indent) - 1) != \"\\n\" . $this->indent) {\n $str .= \"\\n\" . $this->indent;\n }\n }\n $func = 'handleTag_' . $this->parser->tagName;\n $this->$func();\n if ($this->linkPosition == self::LINK_AFTER_PARAGRAPH && $this->parser->isBlockElement && !$this->parser->isStartTag && empty($this->parser->openTags)) {\n $this->flushFootnotes();\n }\n if (!$this->parser->isStartTag) {\n $this->lastClosedTag = $this->parser->tagName;\n }\n } else {\n $this->handleTagToText();\n $this->lastClosedTag = '';\n }\n break;\n default:\n trigger_error('invalid node type', E_USER_ERROR);\n break;\n }\n $this->lastWasBlockTag = $this->parser->nodeType == 'tag' && $this->parser->isStartTag && $this->parser->isBlockElement;\n }\n if (!empty($this->buffer)) {\n // trigger_error('buffer was not flushed, this is a bug. please report!', E_USER_WARNING);\n while (!empty($this->buffer)) {\n $this->out($this->unbuffer());\n }\n }\n ### cleanup\n $this->output = rtrim(str_replace('&amp;', '&', str_replace('&lt;', '<', str_replace('&gt;', '>', $this->output))));\n # end parsing, flush stacked tags\n $this->flushFootnotes();\n $this->stack = array();\n }", "title": "" }, { "docid": "ec3160675e360c5c62f937ef758adff4", "score": "0.5265366", "text": "public function process() \n {\n $parser = $this->getParser();\n $content = $this->getPage()->getInputStream();\n\n // parse for Pagstract markup\n $pagstarctTokenizer = new PagstractTokenizer($this->throwOnError);\n $parser->setTokenizer($pagstarctTokenizer);\n $result = $parser->parse($content);\n \n return $result;\n }", "title": "" }, { "docid": "b8223fe2a4aea86f2325fe39072e2e09", "score": "0.5263273", "text": "abstract public function parse(string $text);", "title": "" }, { "docid": "3f7dc3ec2236ee09ad232ad362c84a4a", "score": "0.52417654", "text": "function _parse(){\r\n\t\t\t$this->HTML = preg_replace_callback('/\\(([{A-Z0-9_\\.}\\s!=<>]+)\\?(.*):(.*)\\)/iU',array('EasyTemplate','_iif_callback'),$this->HTML);\r\n\t\t\t$this->HTML = preg_replace_callback('/<(IF|ELSEIF) (.+)>/iU',array($this,'_if_callback'),$this->HTML);\r\n\t\t\t$this->HTML = preg_replace_callback('/<LOOP (.+)>/iU',array($this,'_loop_callback'),$this->HTML);\r\n\t\t\t$this->HTML = preg_replace_callback($this->reg['var'],array($this,'_vars_callback'),$this->HTML);\r\n\t\t\t$this->HTML = preg_replace_callback($this->reg['color'],array($this,'_color_callback'),$this->HTML);\r\n\t\t\t$this->HTML = preg_replace('/<SWITCH\\s+NAME\\s*=\\s*\"([A-Z0-9_]{1,})\"\\s*CASE\\s*=\\s*\"(.+)\"\\s*VALUE\\s*=\\s*\"(.+)\"\\s*>/i','<?= $this->_switch($this->vars[\"\\\\1\"],\"\\\\2\",\"\\\\3\")?>',$this->HTML);\r\n\t\t\t$this->HTML = preg_replace('/<INCLUDE\\s+NAME\\s*=\\s*\"(.+)\"\\s*>/iU','<?= EasyTemplate::_include(\"\\\\1\"); ?>',$this->HTML);\r\n\t\t\t$this->HTML = preg_replace('/<\\/LOOP>/i','<? } $akeys = array_keys($this->loop); $this->vars[end($akeys)]= array_pop($this->loop); ?>',$this->HTML);\r\n\t\t\t$this->HTML = preg_replace('/<\\/IF>/i','<? } ?>',$this->HTML);\r\n\t\t\t$this->HTML = preg_replace('/(<ELSE>|<ELSE \\/>)/i','<? }else{ ?>',$this->HTML);\r\n\t\t}", "title": "" }, { "docid": "5f50483ef10cf580a51dd363250629e2", "score": "0.5227841", "text": "function process_text() {\r\n //sends the params to get a space seperator, returns it\r\n return $this->process([\r\n \"type\" => \"string\"\r\n ]);\r\n }", "title": "" }, { "docid": "69bedd0d7842e17729f9e65987f009ee", "score": "0.5220279", "text": "public function parseTextArea($text,$entity='input',$type='text',$content=''){\n//input, passsword,textarea,select etc\n//needs to be renamed afterwards\n//\n $content='';\n $attributes=self::parseAll($text);\n \n //echo_array($attributes);\n \n \n foreach ($attributes as $key=>$val){\n $keys[$key]=split(',',$val);\n }\n \n //echo_array($keys);\n $number=count($keys['name']);\n \n //put in the form control[property,property,property]\n //ie normalize as if single control\n //must cater for errors if \"\" use first \n //this is easier to display and add to form\n //also to cater for auto variables\n foreach($keys as $key=>$value){\n for ($i=0;$i<$number;$i++){\n $controls[$i][$key]=$value[$i];\n //handles repetitive attributes gets value from [0]\n if ($controls[$i][$key]==''){$controls[$i][$key]=$controls[0][$key];}\n } \n } \n //echo 'CONTROLS';\n //echo_array($controls);\n \n //$entity=\"textarea\";\n //if ($entity=='') $type='text';\n \n if ($keys[$key]){$this->html_text[]='<div id=\"'.$attributes['wrapid'].'\" class=\"wrap adorn\">'.\"\\n\";}\n //add header if it exists\n $this->html_text[]=$attributes['header'];\n for ($i=0;$i<$number;$i++){\n $s1=self::attributesText($controls[$i]);\n $s0='<div id=\"inner2\">'.\"\\n\";\n //heart of checking must make it into case\n if ($attributes['type']=='multi'){\n if ($controls[$i]['types']=='select'){$entity='select';$type='select';}\n elseif ($controls[$i]['types']=='textarea'){$entity='textarea';$type='textarea';}\n else{\n $entity='input';$type='text';}\n ;}\n \n //check for multi\n if ($entity=='select'){$s=self::selectToHTML($controls[$i]);} else {$s=self::renderControl($s1,$entity,$type,$content);}\n if (!empty($keys['label'])){$s3='<label style=\"float:left;width:13em;clear:both\">'.\"\\n\".$controls[$i]['label'].'</label>'.\"\\n\";}\n if (!empty($keys['after'])){$s4='<label style=\"float:left;width:auto;\">'.$controls[$i]['after'].'</label>';}\n $s5='<div class=\"clearer\"></div></div>';\n $this->html_text[]=$s0.$s3.$s.$s4.$s5;\n }\n //add footer if it exists\n $this->html_text[]=$attributes['footer'];\n if ($keys[$key]){$this->html_text[]='</div><!--wrap-->'.\"\\n\";}\n \n}", "title": "" }, { "docid": "68ed7c6a1a50a3d1b7e656c4d7dba1d0", "score": "0.5218807", "text": "abstract protected function validateParse();", "title": "" }, { "docid": "ba37d1b0fd6d6e9af27f30ac92c66b3b", "score": "0.5216854", "text": "private function parse()\n\t{\n\t\tforeach (preg_split('/\\s*,\\s*/', $this->header) as $type)\n\t\t{\n\t\t\t$this->types[$type] = $this->parseType($type);\n\t\t}\n\t}", "title": "" }, { "docid": "d9ddf74175fbdf98f9dbd41df316f91a", "score": "0.52040285", "text": "public function parse()\n {\n $this->parser->setContent($this->content);\n $this->setFactors([\n Factor::TITLE => $this->parser->getTitle(),\n ]);\n }", "title": "" }, { "docid": "f4e44dee5143cddfdd45046a7c32ada0", "score": "0.51999456", "text": "private static function convert_content_element( $function_name, $input, $type = '' ) {\n\t\t// Get all available content element types.\n\t\t$types = self::get_supported_content_element_types();\n\n\t\t// The type is known; convert the data using the corresponding class.\n\t\tif ( ! empty( $type ) && isset( $types[ $type ] ) ) {\n\t\t\treturn $types[ $type ]::$function_name( $input );\n\t\t}\n\n\t\t// The type is not known; determine the type, then convert the data using the corresponding class.\n\t\tforeach ( $types as $type => $obj ) {\n\t\t\tif ( $obj::is( $input ) ) {\n\t\t\t\treturn $obj::$function_name( $input );\n\t\t\t}\n\t\t}\n\n\t\t// Anything else must be plain text.\n\t\treturn Text::$function_name( $input );\n\t}", "title": "" }, { "docid": "176c4555a560799549f0884625f48d56", "score": "0.5198374", "text": "public function parse();", "title": "" }, { "docid": "ff709b4c61506ccf6d6ade3f1ddc1e63", "score": "0.51774174", "text": "public abstract function parse($input, $rules = array());", "title": "" }, { "docid": "a1bf0147af568ea8469432448ed4a1f9", "score": "0.51670164", "text": "function acf_parse_types($array) {}", "title": "" }, { "docid": "7e0efe567c57e93f5514f68b8e4b934a", "score": "0.51567084", "text": "public function render()\n\t{\n\t\t$rendererStates = array(\n\t\t\t'miniParser' => true,\n\t\t\t'miniParserTagRules' => $this->getTagsRules(),\n\t\t\t'miniParserFormatter' => ($this->_externalFormatter) ? false : true,\n\t\t\t'miniParserNoHtmlspecialchars' => (!$this->_htmlspecialcharsForContent) ? true : false\n\t\t);\n\n\t\tif(!empty($this->_renderStates))\n\t\t{\n\t\t\t$rendererStates = array_merge($rendererStates, $this->_renderStates);\n\t\t}\n\t\t\n\t\tif($this->_externalFormatter)\n\t\t{\n\t\t\tlist($class, $method) = $this->_externalFormatter;\n\t\t\t$output = call_user_func_array(array($class, $method), array($this->_tree, $rendererStates));\n\t\t\treturn $output;\n\t\t}\n\n\t\treturn $this->renderTree($this->_tree, $rendererStates);\n\t}", "title": "" }, { "docid": "3535c2556c3f08d248d4a14bc85de6e8", "score": "0.5153643", "text": "function renderUML( $input, $args, Parser $parser, PPFrame $frame ) {\n global $plantumlImagetype;\n \n if (isset($args[\"format\"])) {\n \t $format=$args[\"format\"];\n \t $format=$parser->recursiveTagParse( $format, $frame );\n } else {\n $format=setProperty( 'Format', $plantumlImagetype );\n }\n $image = getImage($input, $args, $parser);\n \n if ($image['src'] == false) {\n $text = \"[An error occured in PlantUML extension]\";\n } else {\n if ($format == 'svg') {\n $text = renderSVG($image);\n } else if ($format == 'png') {\n \t\t$text = renderPNG($image);\n } else {\n $text =\"<span style='color:red'>PlantUML extension error - unknown format: \".$format.\"</span>\";\n }\n }\n return $text;\n}", "title": "" }, { "docid": "5f24b718703ed9fd3e79da33895fdac8", "score": "0.51513165", "text": "public function parseHtml($text){\n//\n$s=preg_replace('/(type:html;|type:markdown;)/isx','',$text);\n$s=preg_replace('/\\;\\}*$/isx','',$s);\n$value=self::getAttribute('value',$text);\n\nif ($value=='file'){\n $text1=file_get_contents($value);\n $s=preg_replace('//sx',$text1,$text);} \nif ($debug){echo $s;}\n//$z='<textarea style=\"width:78%\">'.$s.'</textarea>';\n$this->html_text[]=$s;\n return $s;\n}", "title": "" }, { "docid": "877bb941a5aaad441061c9b30dbecfb8", "score": "0.51468617", "text": "public function render()\n\t{\n\t\t$output = $this->render_start();\n\t\t\n\t\tif(isset($this->info['pretext']))\n\t\t\t$output .= $this->info['pretext'];\n\t\t\n\t\tswitch($this->type) {\n\t\t\tcase 'text':\n\t\t\tcase 'password':\n\t\t\tcase 'hidden':\n\t\t\tcase 'file':\n\t\t\t\t\t$output .= $this->render_input($this->type);\n\t\t\t\t\tbreak;\n\t\t\tcase 'checkbox':\n\t\t\t\t\t$output .= $this->render_checkbox();\n\t\t\t\t\tbreak;\n\t\t\tcase 'checkboxes':\n\t\t\t\t\t$output .= $this->render_checkboxes();\n\t\t\t\t\tbreak;\n\t\t\tcase 'radio':\n\t\t\t\t\t$output .= $this->render_radios();\n\t\t\t\t\tbreak;\n\t\t\tcase 'select':\n\t\t\t\t\t$output .= $this->render_select();\n\t\t\t\t\tbreak;\n\t\t\tcase 'textarea':\n\t\t\t\t\t$output .= $this->render_textarea();\n\t\t\t\t\tbreak;\n\t\t\tcase 'submit':\n\t\t\tcase 'button':\n\t\t\t\t\t$output .= $this->render_button($this->type);\n\t\t\t\t\tbreak;\n\t\t\tcase 'plaintext':\n\t\t\t\t\t$output .= $this->render_plaintext();\n\t\t\t\t\tbreak;\n\t\t}\n\n\t\tif(isset($this->info['posttext']))\n\t\t\t$output .= $this->info['posttext'];\n\n\t\t$output .= $this->render_end();\n\t\t\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "7ae14675965d9e08add6f377639428fe", "score": "0.5122984", "text": "protected static function tagDispatcher($input)\n\t{\n\t\t// textarea, pre, code tags and comments are to be left alone to avoid any non-wanted whitespace inside them so it just outputs them as they were\n\t\tif (substr($input[1],0,9) == \"<textarea\" || substr($input[1],0,4) == \"<pre\" || substr($input[1],0,5) == \"<code\" || substr($input[1],0,4) == \"<!--\" || substr($input[1],0,9) == \"<![CDATA[\") {\n\t\t\treturn $input[1] . $input[3];\n\t\t}\n\t\t// closing textarea, code and pre tags and self-closed tags (i.e. <br />) are printed as singleTags because we didn't use openTag for the formers and the latter is a single tag\n\t\tif (substr($input[1],0,10) == \"</textarea\" || substr($input[1],0,5) == \"</pre\" || substr($input[1],0,6) == \"</code\" || substr($input[1],-2) == \"/>\") {\n\t\t\treturn self::singleTag($input[1],$input[3],$input[2]);\n\t\t}\n\t\t// it's the closing tag\n\t\tif ($input[0][1]==\"/\"){\n\t\t\treturn self::closeTag($input[1],$input[3],$input[2]);\n\t\t}\n\t\t// opening tag\n\t\treturn self::openTag($input[1],$input[3],$input[2]);\n\t}", "title": "" }, { "docid": "9138f4ed81287da96a0f84ff2ef235c3", "score": "0.5117547", "text": "public function parseHtmlInput($htmlInput)\n {\n $this->htmlInput = $htmlInput;\n $this->htmlValues = [];\n\n if (empty($htmlInput)) {\n $this->htmlType = 'text';\n return;\n }\n\n $inputsArr = explode(',', $htmlInput);\n $this->htmlType = array_shift($inputsArr);\n\n if (count($inputsArr) > 0) {\n $this->htmlValues = $inputsArr;\n }\n }", "title": "" }, { "docid": "4f0d3cf259ce1b37b1be206b60b0780d", "score": "0.51104623", "text": "public function tagsinput($type=NULL)\n\t{\n\t\t// No CSS Available\n\t\t\n\t\t// JavaScript File(s)\n\t\tif ($type == 'javascript') {\t\t\n\t\t\t$this->CI->output->append_output(\n\t\t\t\tscript_tag('assets/global/plugins/js/jquery.pulsate.min.js')\n\t\t\t);\n\t\t}\n\t\n\t}", "title": "" }, { "docid": "38a3f2daea1335244329951882f5e100", "score": "0.50845206", "text": "private function checkControlType($text){\n $s=self::getAttribute('type',$text);\n $this->elements[]=$s;\n return $s;\n\n}", "title": "" }, { "docid": "32ee1321b62cddeb74ac1749ee7d3d04", "score": "0.5077918", "text": "public function process($input)\n\t{\n\t\tself::$tabCount = -1;\n\n\t\t// auto indent all but textareas & pre (or we have weird tabs inside)\n\t\t$input = preg_replace_callback(\"#(<[^>]+>)(\\s*)([^<]*)#\", array('self', 'tagDispatcher'), $input);\n\n\t\treturn $input;\n\t}", "title": "" }, { "docid": "c508e4fe9ae1408775a133dfea8b049b", "score": "0.5076389", "text": "static function parse($data = array()){\n\t\tif(is_array($data)){\n\t\t\tforeach ($data as $key => $value) {\n\t\t\t\tif(is_null(self::$_tag) === true){\n\t\t\t\t\tself::$_tag = self::findElement(trim($value));\n\t\t\t\t}\n\t\t\t\tdo{\n\t\t\t\t\t$found = self::findTextElement(self::$_tag);\n\t\t\t\t}\n\t\t\t\twhile($found);\n\t\t\t}\n\t\t}else{\n\t\t\tif(is_null(self::$_tag) === true){\n\t\t\t\tself::$_tag = self::findElement(trim($data));\n\t\t\t}\n\t\t\tdo{\n\t\t\t\t$found = self::findTextElement(self::$_tag);\n\t\t\t}\n\t\t\twhile($found);\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "80b279c3aca0ef88460dfb60803b83a7", "score": "0.507385", "text": "protected function renderTemplate()\n {\n if (null !== $this->data) {\n $this->output = $this->template;\n\n // Parse array values\n $this->output = Stream\\Parser::parseArrays($this->template, $this->data, $this->output);\n\n // Parse conditionals\n $this->output = Stream\\Parser::parseConditionals($this->template, $this->data, $this->output);\n\n // Parse scalar values\n $this->output = Stream\\Parser::parseScalars($this->data, $this->output);\n }\n }", "title": "" }, { "docid": "98248b296030d477a578cd96d47f054e", "score": "0.50661635", "text": "abstract public function parse($parser);", "title": "" }, { "docid": "88e4a5ac54d590a2b0dcc93b9dc36fab", "score": "0.5061562", "text": "function parse() {\n $text = $this->skipToElement();\n if ($text != \"\") {\n $this->iNodeType = NODE_TYPE_TEXT;\n $this->iNodeName = \"Text\";\n $this->iNodeValue = $text;\n return true;\n }\n return $this->readTag();\n }", "title": "" }, { "docid": "4f35ed50d3f031bc6c2eb115294facfb", "score": "0.5042027", "text": "function acf_get_text_input($attrs = array()) {}", "title": "" }, { "docid": "5b8d151026b769a238ec74d4bfc1e323", "score": "0.50385", "text": "public function parse(string $content);", "title": "" }, { "docid": "92a1741e3684b3f9ec6fd8c0ce38f36b", "score": "0.5036525", "text": "protected abstract function parseEstilos($xtpl);", "title": "" }, { "docid": "079eec35e21d4456a5c6eed58f0b9bf1", "score": "0.50361776", "text": "private function parse_inputs() {\n // All enable keys are processed the same way.\n $enaKeys = [self::KDB_E_TITLE, self::KDB_E_RATING, self::KDB_E_PHONE];\n foreach( $enaKeys as $wpKey ) {\n\n $this->parse_checkbox($wpKey);\n }\n\n if( isset( $this->formInArr[self::KDB_RATING] ) ) {\n //$this->messages[] = 'Rating is set: ' . $this->formInArr[self::KDB_RATING];\n $this->parse_rating( $this->formInArr[self::KDB_RATING] );\n }\n\n if( isset( $this->formInArr[self::KDB_TITLE] ) ) {\n //$this->messages[] = 'Ttile is set: ' . $this->formInArr[self::KDB_TITLE];\n $this->parse_title( $this->formInArr[self::KDB_TITLE] );\n }\n\n if( isset( $this->formInArr[self::KDB_PHONE] ) ) {\n //$this->messages[] = 'Phone is set: ' . $this->formInArr[self::KDB_PHONE];\n $this->parse_phone( $this->formInArr[self::KDB_PHONE] );\n }\n }", "title": "" }, { "docid": "4c86c38920681dfebcb288e3234cf956", "score": "0.5031167", "text": "function input_handle($input_name, $length, $type = TYPE_NUM_TEXT, $index = null, $required = true)\n{\n\tif (array_key_exists($input_name, $_REQUEST))\n\t{\n\t\tif (!is_null($index))\n\t\t{\n\t\t\t$str = $_REQUEST[$input_name][$index];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$str = $_REQUEST[$input_name];\n\t\t}\n\t}\n\n\tif ($str === array() || $str === '' || $str === null)\n\t{\n\t\tif ($required === true)\n\t\t\treturn false;\n\t\telse\n\t\t\treturn;\n\t}\n\n\tif ($type === TYPE_NUMBER) $str = preg_replace( '/[^0-9]/' , '', $str ); // replace all non-alphanumeric\n\telseif ($type === TYPE_NUM_TEXT) $str = preg_replace( '/[^a-z0-9]/i' , '', $str ); // replace all non-alphanumeric\n\telseif ($type === TYPE_EMAIL) $str = preg_replace( '/[^a-z_\\.@\\-\\d]/i', '', $str ); // replace all non-alphanumeric\n\telseif ($type === TYPE_NUM_TEXT_SPACE) $str = preg_replace( '/[^a-z0-9 ]/i', '', $str ); // replace all non-alphanumeric\n\telseif ($type === TYPE_TEXT_SPACE) $str = preg_replace( '/[^a-z ]/i', '', $str ); // replace all non-alphanumeric\n\telseif ($type === TYPE_DATE) $str = preg_replace( '/[^0-9\\-]/', '', $str ); // replace all non-digits and dashes\n\telseif ($type === TYPE_NUMBER_FLOAT) $str = preg_replace( '/[^0-9\\.]/', '', $str ); // replace all non-digits and non-dots\n\telseif ($type === TYPE_TEXT_UNDERSCORE) $str = preg_replace( '/[^a-z_]/i', '', $str ); // replace all non-alphanumeric\n\telseif($type == TYPE_NUM_TEXT_SPACE_DOT) $str = preg_replace( '/[^a-z0-9\\.\\/\\-\\)\\( ]/i', '', $str ); // replace all non-alphanumeric\n\telseif($type == TYPE_NUMERIC) $str = preg_replace( '/[^0-9]/', '', $str );\n\telseif($type == TYPE_EMAIL_SPACE) $str = preg_replace( '/[^a-z_\\.\\-\\d\\w\\)\\(\\/ ]/i', '', $str ); // replace all non-alphanumeric\n\telse $str = preg_replace( '/[^a-z0-9\\-]/i', '', $str ); // default\n\n\treturn substr($str, 0, $length);\n}", "title": "" }, { "docid": "17c3836d9d21ecb7e74d933fc810ae76", "score": "0.50302994", "text": "protected function _detect_input_format()\n {\n if (ee()->input->server('CONTENT_TYPE'))\n {\n // Check all formats against the HTTP_ACCEPT header\n foreach ($this->_supported_formats as $format => $mime)\n {\n if (strpos($match = ee()->input->server('CONTENT_TYPE'), ';'))\n {\n $match = current(explode(';', $match));\n }\n\n if ($match == $mime)\n {\n return $format;\n }\n }\n }\n\n return NULL;\n }", "title": "" }, { "docid": "5e9f9cf5e8f87024db0004c5c3f5b08e", "score": "0.50264215", "text": "public function parse($data);", "title": "" }, { "docid": "5e9f9cf5e8f87024db0004c5c3f5b08e", "score": "0.50264215", "text": "public function parse($data);", "title": "" }, { "docid": "1c08463ee7ff038682ae23c655d0091d", "score": "0.50216806", "text": "function parse() {\n\t global $wbibtechreport;\n\t global $wbibmastersthesis;\n\t global $wbibphdthesis;\n\t global $wbibunpublished;\n\t $this->parse_author();\n\n\t switch (trim($this->type_specifier)) {\n\t case 'inproceedings':\n\t $this->where_published=$this->get_field('booktitle');\n\t $this->publishing_details=$this->get_field('volume');\n\t if (''!=$this->publishing_details) {\n\t\t if (''!=$this->get_field('pages')) {\n\t\t\t $this->publishing_details.=':'.$this->fields['pages'];\n\t\t }\n\t } else if (''!=$this->get_field('pages')) {\n\t\t $this->publishing_details='pp. '.$this->fields['pages'];\n\t }\n\t break;\n\t case 'article':\n\t $this->where_published=$this->get_field('journal') ;\n\t $this->publishing_details=$this->get_field('volume');\n\t if (''!=$this->get_field('number')) {\n\t\t $this->publishing_details.='('.$this->fields['number'].')';\n\t }\n\t if (''!=$this->publishing_details) {\n\t\t if (''!=$this->get_field('pages')) {\n\t\t\t $this->publishing_details.=':'.$this->fields['pages'];\n\t\t }\n\t } else if (''!=$this->get_field('pages')) {\n\t\t $this->publishing_details='pp. '.$this->fields['pages'];\n\t }\n\t break;\n\t case 'techreport':\n\t $this->where_published=$wbibtechreport;\n\t if ( '' != $this->get_field('type'))\n\t \t\t$this->where_published .= \" - \".$this->fields['type'];\n\t $this->where_published .=\", \".$this->get_field('institution');\n\t if (''!=$this->get_field('number')) {\n\t\t $this->publishing_details='('.$this->fields['number'].')';\n\t }\n\t break;\n\t case 'mastersthesis':\n if ( '' != $this->get_field('type'))\n $this->where_published = $this->fields['type'];\n\t\telse \n\t\t\t$this->where_published=$wbibmastersthesis;\n\t\t$this->where_published .= \", \".$this->get_field('school');\n\t break;\n\t case 'phdthesis':\n\t $this->where_published=$wbibphdthesis.\", \".$this->get_field('school');\n\t break;\n\t case 'unpublished':\n\t $this->where_published=$wbibunpublished;\n\t break;\n\t case 'book' :\n\t\tif ( '' != $this->get_field('volume') )\n\t\t\t$this->publishing_details .= \"Vol. \".$this->fields['volume'].\", \";\n\t\tif ( '' != $this->get_field('edition') )\n\t\t\t$this->publishing_details .= $this->fields['edition'].\", \";\n\t\t$this->publishing_details .= $this->get_field('publisher');\n\t\tbreak;\n\t }\n\t \n if ('' != $this->get_field('address')){\n\t $this->publishing_details .= ', '.$this->get_field('address');\n\t }\n\t \n\t $comma = ',';\n if ('' != $this->get_field('month')){\n\t $this->publishing_details .= ', '.$this->get_field('month');\n\t $comma = ' ';\t\t/* not needed now */\n\t }\n\t\t\t \n\t if ('' != $this->get_field('year'))\n\t $this->publishing_details .= $comma . $this->get_field('year');\n\t\t\n }", "title": "" }, { "docid": "196febd440470549efd37f0a716f1df3", "score": "0.5013962", "text": "function processInputText($inptext)\n{\n $rasatext = file_get_contents(\"http://localhost:5000/parse?q=\" . urlencode($inptext));\n //Decode the response text as a json array\n $rasajson = json_decode($rasatext, true);\n \n //Extract the intent\n $rasa_intent = !empty($rasajson[\"topScoringIntent\"][\"intent\"]) ? $rasajson[\"topScoringIntent\"][\"intent\"] : '';\n \n //Extract the entities\n $rasa_entities = '';\n if(!empty($rasajson[\"entities\"]))\n {\n foreach ($rasajson[\"entities\"] as $entity)\n {\n $rasa_entities = $rasa_entities . $entity[\"type\"] . '=>' . $entity[\"entity\"] . \"<br>\";\n }\n }\n //Prepare a reponse text. \n return '<b>Input:</b> ' . $inptext . '<br><b>Intent:</b> ' . $rasa_intent . '<br><b>Entities:</b><br>' . $rasa_entities; \n}", "title": "" }, { "docid": "2ea8abd5abf3f0bade2fa725a36610e7", "score": "0.5011995", "text": "protected function parse()\n {\n\n }", "title": "" }, { "docid": "fbbca37eb1d621cc5e4ac53a8fe1b2be", "score": "0.50105524", "text": "function &process(&$input) {\n\t\t// Set the adapter mode and convert the input.\n\t\tswitch (true) {\n\t\t\tcase is_array($input):\n\t\t\t\t$output =& $this->injectMetadataIntoDataObject($input[0], $input[1], $input[2]);\n\t\t\t\tbreak;\n\n\t\t\tcase is_a($input, 'MetadataDescription'):\n\t\t\t\t$nullVar = null;\n\t\t\t\t$output =& $this->injectMetadataIntoDataObject($input, $nullVar, false);\n\t\t\t\tbreak;\n\n\t\t\tcase is_a($input, $this->getDataObjectClass()):\n\t\t\t\t$output =& $this->extractMetadataFromDataObject($input);\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t// Input should be validated by now.\n\t\t\t\tassert(false);\n\t\t}\n\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "7417a50f9835b2439af9ad966e81374b", "score": "0.5010425", "text": "public function parseTemplate()\n {\n \n //parse included files {@include 'file.htm'}\n $this->output = \\lib\\view\\parsers\\ParseInclude::parse($this->output);\n //parse if statements\n $this->output = \\lib\\view\\parsers\\ParseCondition::parse($this->output);\n //parse blocks\n $this->output = ParseBlock::parse($this->output);\n //insert blocks (or stacks)\n $this->output = ParseBlock::put($this->output);\n //process while loops\n $this->output = ParseLoop::parseWhile($this->output);\n //process embed\n $this->output = \\lib\\view\\parsers\\ParseEmbed::parse($this->output);\n //process data\n $this->output = \\lib\\view\\parsers\\ParseData::parse($this->output);\n //process loads\n $this->output = \\lib\\view\\parsers\\ParseLoad::parse($this->output);\n \n }", "title": "" }, { "docid": "c441f836e35997105ab616822b7c9307", "score": "0.5006282", "text": "function cleanInput($input, $type) {\n if ($type == \"string\") {\n $output = htmlspecialchars($input, ENT_QUOTES);\n $output = trim($output);\n $output = str_replace(\"\\n\", \" \",$output); // For LF replace with space as messages shown as single lines\n $output = stripslashes($output);\n $output = filter_var($output, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH | FILTER_FLAG_STRIP_LOW);\n } elseif ($type == \"int\") {\n $output = filter_var($input, FILTER_SANITIZE_NUMBER_INT);\n } elseif ($type == \"float\") {\n $output = filter_var($input, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION);\n } elseif ($type = \"email\") {\n $output = htmlspecialchars($input);\n $output = trim($output);\n $output = filter_var($output, FILTER_SANITIZE_EMAIL);\n }\n return $output;\n}", "title": "" }, { "docid": "b2d61a2cdd9b03099ff643413cbda276", "score": "0.4991367", "text": "abstract public function parse($template, $data = array(), $return = FALSE, $options = array());", "title": "" }, { "docid": "334de208fa1b828a7187fccfa1135970", "score": "0.49851498", "text": "private function applyRawInput($format, $data) {\n if ($data) {\n// switch (\\Snug\\Http::getContentType($format)) {\n// case 'json':\n// $data = \\Snug\\decode_json($data);\n// break;\n//\n// case 'xml':\n// $data = \\Snug\\decode_xml($data);\n// break;\n//\n// case 'form':\n// $data = $data;\n// break;\n//\n// default:\n// // we can only decode xml and json\n// $data = null;\n// }\n }\n return $data;\n }", "title": "" }, { "docid": "ae1630652784d799aa6ba5d0740e8639", "score": "0.4978936", "text": "function render($xmlfile, $type) {\n\n switch (strtolower($type)) {\n \n case \"class\":\n $this->classrenderer->renderClass($xmlfile);\n break;\n\n case \"classtree\":\n $this->indexrenderer->addClasstree($xmlfile);\n break;\n\n case \"module\":\n $this->modulerenderer->renderModule($xmlfile);\n break; \n\n case \"modulegroup\":\n $this->indexrenderer->addModulegroup($xmlfile);\n break;\n\n case \"warning\":\n $this->warningrenderer->addWarnings($xmlfile);\n break;\n\n }\n\n }", "title": "" }, { "docid": "41651a3b64424775c2d0127eebf7da9f", "score": "0.49721998", "text": "protected function parseCode()\n {\n \n $attr = \\shortcode_parse_atts($this->originalCode);\n //parse image ids\n $this->parseImageIds($attr);\n //parsing and escaping gallery title\n $this->parseTitle($attr);\n //parsing gallery config\n $this->parseConfig($attr);\n }", "title": "" }, { "docid": "9bad2c17f5b7d719ffbdd262ac3aee83", "score": "0.49721113", "text": "function libero_mikado_get_post_format_html($type = \"\") {\n\n\t\t$post_format = get_post_format();\n\t\t$post_format_array = array(\"audio\",\"video\",\"gallery\",\"link\",\"quote\");\n\t\tif($post_format === false || !in_array($post_format, $post_format_array)){\n\t\t\t$post_format = 'standard';\n\t\t}\n\t\t$slug = '';\n\t\tif($type !== \"\"){\n\t\t\t$slug = $type;\n\t\t}\n\n\t\t$params = array();\n\n\t\tlibero_mikado_get_module_template_part('templates/lists/post-formats/' . $post_format, 'blog', $slug, $params);\n\n\t}", "title": "" }, { "docid": "77587b6c1af2d1896e60faec31490b55", "score": "0.49704218", "text": "public static function parse($content);", "title": "" }, { "docid": "2e3941863472c003308884c972513e82", "score": "0.49699914", "text": "function convert($html)\n {\n if (!$html) return;\n if (get_magic_quotes_gpc())\n {\n $html = stripslashes($html);\n }\n $html = str_replace(\"\\n\", '' , $html);\n\n //replace <span class=formitem...eltype=\"datebox\"...>...</span>\n $html = preg_replace_callback(\"'<span class=formitem ([^>]+)eltype=\\\"datebox\\\"([^>]+)>(.*?)</span>'si\", array($this, 'replace_datebox'), $html);\n\n //replace <textarea>...</textarea> with inner text\n $html = preg_replace_callback(\"/<textarea([^>]*)>([^<]*)<\\/textarea>/is\",\n array($this, 'replaceTextArea'),\n $html);\n\n //replace <input[...]type=[\"]text[\"][...]> with VALUE text\n $html = preg_replace_callback(\"/<input([^>]*)type=\\\"?text\\\"?([^>]*)>/is\",\n array($this, 'replaceInputText'),\n $html);\n\n //replace <input[...]type=[\"]checkbox[\"][...]> with icons\n $html = preg_replace_callback(\"/<input([^>]*)type=\\\"?checkbox\\\"?([^>]*)>/is\",\n array($this, 'replaceCheckBox'),\n $html);\n\n //replace <input[...]type=[\"]radio[\"][...]> with image\n $html = preg_replace_callback(\"/<input([^>]*)type=\\\"?radio\\\"?([^>]*)>/is\",\n array($this, 'replaceRadioItem'),\n $html);\n\n\n //replace <select>...</select>\n $html = preg_replace_callback(\"/<select[^>]*>(.*)<\\/select>/is\",\n array($this, 'replaceSelect'),\n $html);\n\n\n $search = array (\n \"'<([\\w]+) class=([^ |>]*)([^>]*)'si\", //remove class=\"...\"\n \"'<([\\w]+) style=\\\"([^\\\"]*)\\\"([^>]*)'si\", //remove style=\"...\"\n \"'<\\?xml[^>]*>'si\", //remove <?xml...>\n \"'<\\/?\\w+:[^>]*>'si\", //remove <?...:...>\n \"'<p([^>])*>(&nbsp;)*\\s*<\\/p>'si\", //remove <p...>[&nbsp;...]</p>\n \"'<span([^>]+)>(.*?)<\\/span>'si\", //remove <span...>...</span>\n \"'<v:imagedata([^>])*><\\/v:imagedata>'si\" //remove <v:imagedata></v:imagedata>\n );\n\n $replace = array (\n \"<$1$3\",\n \"<$1$3\",\n \"\",\n \"\",\n \"\",\n \"$2\",\n \"\"\n );\n\n $html = preg_replace ($search, $replace, $html);\n $html = str_replace('\\\"', '\\&quot;', $html); // \\\" -> \\&quot;\n $html = str_replace('<?', '&lt;?', $html); // <? -> &lt;?\n $html = str_replace('\"<img', '\"&lt;img', $html); // <img -> &lt;img\n $html = str_replace('$', '\\$', $html); // $ -> \\$\n $html = str_replace('\"', '\\\"', $html); // \" -> \\\"\n\n header('Content-Type: application/pdf');\n header('Content-Disposition: inline; filename=\"'.$this->pdf_filename.'\"');\n flush();\n passthru('echo \"'.$html.'\"|'.$this->htmldoc.' --no-compression -t '.$this->pdf_version.' --quiet --jpeg --webpage -');\n //print 'echo \"'.$html.'\"|'.$this->htmldoc.' --no-compression -t '.$this->pdf_version.' --quiet --jpeg --webpage -';\n //exit;\n }", "title": "" }, { "docid": "630375cbfe4a64c47fe9ce7c5fa3caea", "score": "0.4965732", "text": "public function getInputType()\n {\n if (!is_object($this->getAttributeObject())) {\n return 'string';\n }\n $input = $this->getAttributeObject()->getFrontendInput();\n switch ($input) {\n case 'boolean':\n return 'select';\n case 'select':\n case 'multiselect':\n case 'date':\n return $input;\n default:\n return 'string';\n }\n }", "title": "" }, { "docid": "e305909bc785c26b11bd490a84794c13", "score": "0.4964192", "text": "public static function getInputTypes()\n {\n return [\n 'text' => 'Generic Text',\n 'tel' => 'Phone Number',\n 'email' => 'Email Address',\n 'number' => 'Number',\n 'date' => 'Date',\n 'time' => 'Time',\n 'url' => 'Url',\n ];\n }", "title": "" }, { "docid": "c1509f0ee43c40b45c288e74dd9623fb", "score": "0.49608785", "text": "function parse()\n {\n // first, decode any entities already in the text so that they\n // don't get double-encoded\n $trans_table = get_html_translation_table(HTML_SPECIALCHARS);\n $this->_wiki->_source = strtr($this->_wiki->_source,\n array_flip($trans_table));\n \n // now encode all html special characters\n $this->_wiki->_source = htmlspecialchars($this->_wiki->_source);\n }", "title": "" }, { "docid": "bdd7161d3b7da3fe2fc65f9d63ee3a83", "score": "0.49588123", "text": "public static function get_content_element( $input, $output_format = 'json', $type = '' ) {\n\t\t// Ensure this is a valid conversion (ie. JSON to HTML or HTML to JSON; not something like JSON to int)\n\t\t$function_name = self::get_conversion_function_name( $input, $output_format );\n\t\tif ( empty( $function_name ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// If the input is a shortcode, convert it using the shortcode's JSON in/out attributes.\n\t\t$output = self::convert_shortcode( $input, $output_format );\n\t\tif ( ! empty( $output ) ) {\n\t\t\treturn $output;\n\t\t}\n\n\t\t// Otherwise, the input must be a regular content element.\n\t\treturn self::convert_content_element( $function_name, $input, $type );\n\t}", "title": "" }, { "docid": "b4a14d8c0b4c33b2dc6b829659227d70", "score": "0.49531794", "text": "public function renderInput()\n {\n if(isset(self::$coreTypes[$this->type]))\n {\n $method=self::$coreTypes[$this->type];\n// $value = Language::t(Yii::app()->language,'Backend.Admin.Setting-Value',$this->param->name);\n// if($value == $this->param->name)\n// \t$value=$this->param->value;\n $value=$this->param->value;\n if(strpos($method,'List')!==false)\n return CHtml::$method($this->param->name, $value, $this->items, $this->htmlOptions);\n else\n return CHtml::$method($this->param->name, $value, $this->htmlOptions);\n }\n else\n {\n $attributes=$this->param->attributes;\n $attributes['model']=get_class($this->param);\n $attributes['attribute']=$this->param->name;\n// $attributes=$this->attributes;\n// $attributes['model']=$this->getParent()->getModel();\n// $attributes['attribute']=$this->name;\n ob_start();\n Yii::app()->controller->widget($this->type, $attributes);\n return ob_get_clean();\n }\n }", "title": "" }, { "docid": "c1736c1b533b120268e316b9d275fb75", "score": "0.4951903", "text": "private function parse(): void\n {\n $this->template->assign('widgetFaqOwnQuestion', true);\n\n // parse the form or a status\n if (empty($this->status)) {\n $this->form->parse($this->template);\n\n return;\n }\n\n $this->template->assign($this->status, true);\n }", "title": "" }, { "docid": "bcec4d2bf6cff4ed0b55b18da7a805be", "score": "0.49477237", "text": "function mgallery2_filter_attr_value($text, $value_type = MG2_FILTER_WORD)\n{\n $first = substr($text, 0, 1);\n if ($first == '\"' || $first == ';') {\n if (substr($text, -1, 1) == $first) {\n $text = substr($text, 1, -1);\n }\n }\n switch($value_type) {\n case MG2_FILTER_WORD :\n return preg_replace(\"/\\W/\", '', $text);\n case MG2_FILTER_INTEGER :\n return preg_replace(\"/\\D/\", '', $text);\n case MG2_FILTER_PIPEDSTRING :\n return preg_replace(\"/[^\\w|]/\", '', $text);\n default :\n return check_plain($text);\n }\n}", "title": "" }, { "docid": "3bd810bb936a46ea631c9718c6ebc00d", "score": "0.49438855", "text": "private function parse()\n\t{\n\t\t// assign tags\n\t\t$this->tpl->assign('tagsModules', $this->record);\n\n\t\t// update breadcrumb\n\t\t$this->breadcrumb->addElement(FrontendTagsModel::getName($this->id));\n\t}", "title": "" }, { "docid": "10189e1506b8bb88c4233cb29ab02661", "score": "0.4940433", "text": "function cast_and_filter_item( &$return, $type, $key, $value, $types = array(), $for_output = false ) {\n\t\tif ( is_string( $type ) ) {\n\t\t\t$type = compact( 'type' );\n\t\t}\n\n\t\tswitch ( $type['type'] ) {\n\t\tcase 'false' :\n\t\t\t$return[$key] = false;\n\t\t\tbreak;\n\t\tcase 'url' :\n\t\t\t$return[$key] = (string) esc_url_raw( $value );\n\t\t\tbreak;\n\t\tcase 'string' :\n\t\t\t// Fallback string -> array\n\t\t\tif ( is_array( $value ) ) {\n\t\t\t\tif ( !empty( $types[0] ) ) {\n\t\t\t\t\t$next_type = array_shift( $types );\n\t\t\t\t\treturn $this->cast_and_filter_item( $return, $next_type, $key, $value, $types, $for_output );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Fallback string -> false\n\t\t\tif ( !is_string( $value ) ) {\n\t\t\t\tif ( !empty( $types[0] ) && 'false' === $types[0]['type'] ) {\n\t\t\t\t\t$next_type = array_shift( $types );\n\t\t\t\t\treturn $this->cast_and_filter_item( $return, $next_type, $key, $value, $types, $for_output );\n\t\t\t\t}\n\t\t\t}\n\t\t\t$return[$key] = (string) $value;\n\t\t\tbreak;\n\t\tcase 'html' :\n\t\t\t$return[$key] = (string) $value;\n\t\t\tbreak;\n\t\tcase 'media' :\n\t\t\tif ( is_array( $value ) ) {\n\t\t\t\tif ( isset( $value['name'] ) ) {\n\t\t\t\t\t// It's a $_FILES array\n\t\t\t\t\t// Reformat into array of $_FILES items\n\n\t\t\t\t\t$files = array();\n\t\t\t\t\tforeach ( $value['name'] as $k => $v ) {\n\t\t\t\t\t\t$files[$k] = array();\n\t\t\t\t\t\tforeach ( array_keys( $value ) as $file_key ) {\n\t\t\t\t\t\t\t$files[$k][$file_key] = $value[$file_key][$k];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$return[$key] = $files;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\t// no break - treat as 'array'\n\t\t\t}\n\t\t\t// nobreak\n\t\tcase 'array' :\n\t\t\t// Fallback array -> string\n\t\t\tif ( is_string( $value ) ) {\n\t\t\t\tif ( !empty( $types[0] ) ) {\n\t\t\t\t\t$next_type = array_shift( $types );\n\t\t\t\t\treturn $this->cast_and_filter_item( $return, $next_type, $key, $value, $types, $for_output );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( isset( $type['children'] ) ) {\n\t\t\t\t$children = array();\n\t\t\t\tforeach ( (array) $value as $k => $child ) {\n\t\t\t\t\t$this->cast_and_filter_item( $children, $type['children'], $k, $child, array(), $for_output );\n\t\t\t\t}\n\t\t\t\t$return[$key] = (array) $children;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$return[$key] = (array) $value;\n\t\t\tbreak;\n\t\tcase 'iso 8601 datetime' :\n\t\tcase 'datetime' :\n\t\t\t// (string)s\n\t\t\t$dates = $this->parse_date( (string) $value );\n\t\t\tif ( $for_output ) {\n\t\t\t\t$return[$key] = $this->format_date( $dates[1], $dates[0] );\n\t\t\t} else {\n\t\t\t\tlist( $return[$key], $return[\"{$key}_gmt\"] ) = $dates;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'float' :\n\t\t\t$return[$key] = (float) $value;\n\t\t\tbreak;\n\t\tcase 'int' :\n\t\tcase 'integer' :\n\t\t\t$return[$key] = (int) $value;\n\t\t\tbreak;\n\t\tcase 'bool' :\n\t\tcase 'boolean' :\n\t\t\t$return[$key] = (bool) WPCOM_JSON_API::is_truthy( $value );\n\t\t\tbreak;\n\t\tcase 'object' :\n\t\t\t// Fallback object -> false\n\t\t\tif ( is_scalar( $value ) || is_null( $value ) ) {\n\t\t\t\tif ( !empty( $types[0] ) && 'false' === $types[0]['type'] ) {\n\t\t\t\t\treturn $this->cast_and_filter_item( $return, 'false', $key, $value, $types, $for_output );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( isset( $type['children'] ) ) {\n\t\t\t\t$children = array();\n\t\t\t\tforeach ( (array) $value as $k => $child ) {\n\t\t\t\t\t$this->cast_and_filter_item( $children, $type['children'], $k, $child, array(), $for_output );\n\t\t\t\t}\n\t\t\t\t$return[$key] = (object) $children;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif ( isset( $type['subtype'] ) ) {\n\t\t\t\treturn $this->cast_and_filter_item( $return, $type['subtype'], $key, $value, $types, $for_output );\n\t\t\t}\n\n\t\t\t$return[$key] = (object) $value;\n\t\t\tbreak;\n\t\tcase 'post' :\n\t\t\t$return[$key] = (object) $this->cast_and_filter( $value, $this->post_object_format, false, $for_output );\n\t\t\tbreak;\n\t\tcase 'comment' :\n\t\t\t$return[$key] = (object) $this->cast_and_filter( $value, $this->comment_object_format, false, $for_output );\n\t\t\tbreak;\n\t\tcase 'tag' :\n\t\tcase 'category' :\n\t\t\t$docs = array(\n\t\t\t\t'name' => '(string)',\n\t\t\t\t'slug' => '(string)',\n\t\t\t\t'description' => '(HTML)',\n\t\t\t\t'post_count' => '(int)',\n\t\t\t\t'meta' => '(object)',\n\t\t\t);\n\t\t\tif ( 'category' === $type ) {\n\t\t\t\t$docs['parent'] = '(int)';\n\t\t\t}\n\t\t\t$return[$key] = (object) $this->cast_and_filter( $value, $docs, false, $for_output );\n\t\t\tbreak;\n\t\tcase 'post_reference' :\n\t\tcase 'comment_reference' :\n\t\t\t$docs = array(\n\t\t\t\t'ID' => '(int)',\n\t\t\t\t'type' => '(string)',\n\t\t\t\t'link' => '(URL)',\n\t\t\t);\n\t\t\t$return[$key] = (object) $this->cast_and_filter( $value, $docs, false, $for_output );\n\t\t\tbreak;\n\t\tcase 'geo' :\n\t\t\t$docs = array(\n\t\t\t\t'latitude' => '(float)',\n\t\t\t\t'longitude' => '(float)',\n\t\t\t\t'address' => '(string)',\n\t\t\t);\n\t\t\t$return[$key] = (object) $this->cast_and_filter( $value, $docs, false, $for_output );\n\t\t\tbreak;\n\t\tcase 'author' :\n\t\t\t$docs = array(\n\t\t\t\t'ID' => '(int)',\n\t\t\t\t'email' => '(string|false)',\n\t\t\t\t'name' => '(string)',\n\t\t\t\t'URL' => '(URL)',\n\t\t\t\t'avatar_URL' => '(URL)',\n\t\t\t\t'profile_URL' => '(URL)',\n\t\t\t);\n\t\t\t$return[$key] = (object) $this->cast_and_filter( $value, $docs, false, $for_output );\n\t\t\tbreak;\n\t\tcase 'attachment' :\n\t\t\t$docs = array(\n\t\t\t\t'ID' => '(int)',\n\t\t\t\t'URL' => '(URL)',\n\t\t\t\t'guid' => '(string)',\n\t\t\t\t'mime_type' => '(string)',\n\t\t\t\t'width' => '(int)',\n\t\t\t\t'height' => '(int)',\n\t\t\t\t'duration' => '(int)',\n\t\t\t);\n\t\t\t$return[$key] = (object) $this->cast_and_filter( $value, apply_filters( 'wpcom_json_api_attachment_cast_and_filter', $docs ), false, $for_output );\n\t\t\tbreak;\n\t\tcase 'metadata' :\n\t\t\t$docs = array(\n\t\t\t\t'id' => '(int)',\n\t\t\t\t'key' => '(string)',\n\t\t\t\t'value' => '(string|false|float|int|array|object)',\n\t\t\t\t'previous_value' => '(string)',\n\t\t\t\t'operation' => '(string)',\n\t\t\t);\n\t\t\t$return[$key] = (object) $this->cast_and_filter( $value, apply_filters( 'wpcom_json_api_attachment_cast_and_filter', $docs ), false, $for_output );\n\t\t\tbreak;\n\t\tdefault :\n\t\t\ttrigger_error( \"Unknown API casting type {$type['type']}\", E_USER_WARNING );\n\t\t}\n\t}", "title": "" }, { "docid": "fc9ac0390511de3cd3e00cc333e8d310", "score": "0.49354154", "text": "abstract function render($name,$value,$attrs=null);", "title": "" }, { "docid": "d231411e58adcf6159174bc9cd820ecf", "score": "0.4933334", "text": "protected function handleTypeParsedContext($tag)\n\t{\n\t\t$chunk = $this->implodeChunk($this->msg_parts, '', $this->next_closing_bracket + 1, $this->pos);\n\n\t\t// Autolink\n\t\t// Smilies\n\n\t\t$this->return .= $tag[Codes::ATTR_BEFORE] . $chunk . $tag[Codes::ATTR_AFTER];\n\n\t\t//var_dump('aaaa', $this->msg_parts, '', $this->last_pos, $this->pos);\n\n\t\treturn false;\n\t\t// @todo Check for end tag first, so people can say \"I like that [i] tag\"?\n\t\t$this->addOpenTag($tag);\n\t\t//$this->message = substr($this->message, 0, $this->pos) . \"\\n\" . $tag[Codes::ATTR_BEFORE] . \"\\n\" . substr($this->message, $this->pos1);\n\t\t//$this->message = substr_replace($this->message, \"\\n\" . $tag[Codes::ATTR_BEFORE] . \"\\n\", $this->pos, $this->pos1 - $this->pos);\n\t\t$tmp = $this->noSmileys($tag[Codes::ATTR_BEFORE]);\n\t\t$this->message = substr_replace($this->message, $tmp, $this->pos, $this->pos1 - $this->pos);\n\t\t//$this->pos += strlen($tag[Codes::ATTR_BEFORE]) + 1;\n\t\t$this->pos += strlen($tmp) - 1;\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "fc21477328bec66067e38541f4279208", "score": "0.49234903", "text": "public function parse(SpoonTemplate $template = null)\n\t{\n\t\t// start element\n\t\t$output = '<input type=\"'. $this->type .'\" value=\"'. $this->value .'\"';\n\n\t\t// add attributes\n\t\t$output .= $this->getAttributesHTML(array('[id]' => $this->attributes['id'], '[name]' => $this->attributes['name'], '[value]' => $this->getValue())) .' />';\n\n\t\t// parse\n\t\tif($template !== null) $template->assign('btn'. SpoonFilter::toCamelCase($this->attributes['name']), $output);\n\n\t\treturn $output;\n\t}", "title": "" } ]
a5d3a0a331d65a2d4b59d8e701cfb858
Get the relationships that are touched on save.
[ { "docid": "2f6804b39cb65e36f1065f6f3fc55661", "score": "0.6896151", "text": "public function getTouchedRelations()\n {\n return $this->touches;\n }", "title": "" } ]
[ { "docid": "3130386f5bf8f35d5d3461c6db6b4a4c", "score": "0.73179305", "text": "public function relationships()\n {\n return $this->relationships;\n }", "title": "" }, { "docid": "bcb1bfbf85761eb8c80bf146135f5898", "score": "0.7049915", "text": "public function relations()\n {\n return $this->relationship()->relations();\n }", "title": "" }, { "docid": "bd6eec4e81f6c79a3b5fc8adc3a95431", "score": "0.69622946", "text": "function getRelations() {\r\n\t\treturn $this->relations;\r\n\t}", "title": "" }, { "docid": "88d278208ef9632e3ab587b51636a5d9", "score": "0.69472766", "text": "public function getRelations()\n {\n return $this->relations;\n }", "title": "" }, { "docid": "88d278208ef9632e3ab587b51636a5d9", "score": "0.69472766", "text": "public function getRelations()\n {\n return $this->relations;\n }", "title": "" }, { "docid": "3e1ae9ad9a3e7ead0a6ddf1993469f1b", "score": "0.6938427", "text": "protected function relations() {\n return $this->model->relationsToArray();\n }", "title": "" }, { "docid": "85aa387fccb1ba246d555142d5c98c20", "score": "0.69169235", "text": "public function relationships(){\n // return method specific rules\n if(isset($this->relationships) && is_array($this->relationships)){\n return $this->relationships;\n }\n // or empty array if none are set\n return [];\n }", "title": "" }, { "docid": "6f0c4ab69fbb5af1aa5e8e57fb5cc365", "score": "0.6916468", "text": "public function getRelations() {\r\n\t\treturn $this->relations;\r\n\t}", "title": "" }, { "docid": "a5a53d50beccd186784f45e08dcbdfdd", "score": "0.69136894", "text": "protected function getRelations(): array\n {\n return $this->relations;\n }", "title": "" }, { "docid": "e83b045aebd6b7f3e00b2d33a684a28c", "score": "0.6896126", "text": "public function relations()\n {\n $audit = Yii::app()->getModule('audit');\n if (!empty($audit->modelMap[get_class($this)]['relations']))\n return $audit->modelMap[get_class($this)]['relations'];\n return parent::relations();\n }", "title": "" }, { "docid": "b0ade5026a9e745bfee95e59484f7492", "score": "0.6885877", "text": "public function getRelations(): array\n {\n return $this->relations;\n }", "title": "" }, { "docid": "ed9a37009a26c8652ee10f962f7c7d73", "score": "0.6833054", "text": "public function getRelations()\n {\n return array();\n }", "title": "" }, { "docid": "acd28684594eeee4712d8042810c550b", "score": "0.6805731", "text": "public static function getRelations() {\n return array();\n }", "title": "" }, { "docid": "b98a350f61963cf1017d666d7f2a4bda", "score": "0.6716149", "text": "protected function getRelations()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "97425d4e625a610dc7efb076682766fb", "score": "0.6691342", "text": "public static function getRelations()\n {\n return [];\n }", "title": "" }, { "docid": "b9bb836f7059498bc298047a87fc76f9", "score": "0.6649914", "text": "public static function relations()\n {\n return array();\n }", "title": "" }, { "docid": "4294dc36ab1b0940bc4b74294f4a8396", "score": "0.650923", "text": "public function relations(): array\n {\n if (!$this->relations) {\n $this->relations = $this->findRelations($this->request);\n }\n\n return $this->relations;\n }", "title": "" }, { "docid": "3d8e9bb9e42998e0772ef540f08070fd", "score": "0.6504807", "text": "protected function relations()\r\n {\r\n return [];\r\n }", "title": "" }, { "docid": "3d8e9bb9e42998e0772ef540f08070fd", "score": "0.6504807", "text": "protected function relations()\r\n {\r\n return [];\r\n }", "title": "" }, { "docid": "cdbc450d6386eee14b333953ca64ce41", "score": "0.63821596", "text": "public function relations()\n {\n return array();\n \n }", "title": "" }, { "docid": "96a8ddd42d0a8ca18a9c37c6103b1aec", "score": "0.6360203", "text": "public static function metaGetRelationships(){\n\t\treturn static::$RELATIONSHIPS;\n\t}", "title": "" }, { "docid": "bca56391f3b0a61dbf072ba361fddb2a", "score": "0.6355621", "text": "public function getRelationships();", "title": "" }, { "docid": "990db67c4368efcc00c50a274925b5b7", "score": "0.6341343", "text": "public function getRelations();", "title": "" }, { "docid": "c19b25ddb801f5fd83dbbf76d1615a57", "score": "0.63060373", "text": "public function getRelated();", "title": "" }, { "docid": "e01254464186d531fc3a00e392fbeefa", "score": "0.6297477", "text": "public function getReverseRelatedObjects();", "title": "" }, { "docid": "0659fa8e883af04b4a27fcd45157aea6", "score": "0.62631994", "text": "public function getRelations(): array;", "title": "" }, { "docid": "d11e6c446fd063ff59a584aa1aaab6a2", "score": "0.6199547", "text": "public function getRelatedObjects()\n {\n return isset($this->RelatedObjects) ? $this->RelatedObjects : null;\n }", "title": "" }, { "docid": "d5112291e01ab10f3c3e4d0c1e2e09b0", "score": "0.61943364", "text": "public function getForeignKeys()\n {\n return $this->foreignKeys;\n }", "title": "" }, { "docid": "5da623afd1de1d86398614c958c03b11", "score": "0.6172235", "text": "public static function getRelationshipProperties(): array;", "title": "" }, { "docid": "c9f73cb618e8ee086a3575ce02b385a9", "score": "0.61549747", "text": "public function &getForeignRelationshipsMapping(): array {\n return $this->foreignRelationshipsMapping;\n }", "title": "" }, { "docid": "cc324d32f42f4c4ed2fa05df239f689c", "score": "0.6139898", "text": "protected function relations()\n {\n if ($this->relations instanceof RelationsLibrary) {\n return $this->relations->toArray();\n }\n\n return $this->relations;\n }", "title": "" }, { "docid": "d79a8f2e4cc7cded9f7facdc77d64775", "score": "0.60910094", "text": "public function getRelations(){\n\t\t$r= array_merge($this->relations(), self::$_addedRelations);\n\n\t\tif(isset($this->columns['user_id']) && !isset($r['user'])){\n\t\t\t$r['user']=array(\n\t\t\t\t\t'type'=>self::BELONGS_TO,\n\t\t\t\t\t'model'=>'GO\\Base\\Model\\User',\n\t\t\t\t\t'field'=>'user_id',\n\t\t\t\t\t'labelAttribute'=>function($model){return $model->user->name;}\n\t\t\t\t\t);\n\t\t}\n\n\t\tif(isset($this->columns['muser_id']) && !isset($r['mUser'])){\n\t\t\t$r['mUser']=array(\n\t\t\t\t\t'type'=>self::BELONGS_TO,\n\t\t\t\t\t'model'=>'GO\\Base\\Model\\User',\n\t\t\t\t\t'field'=>'muser_id',\n\t\t\t\t\t'labelAttribute'=>function($model){return !empty($model->mUser) ? $model->mUser->name : '';}\n\t\t\t\t\t);\n\t\t}\n\t\t\n\t\t\n//\\GO::debug($cfMod);\n\t\tif($this->customfieldsModel()){\n\t\t\t$r['customfields']=array(\n\t\t\t\t\t'type'=>self::BELONGS_TO,\n\t\t\t\t\t'model'=>$this->customfieldsModel(),\n\t\t\t\t\t'field'=>'id'\n\t\t\t\t\t);\n\t\t}\n\n\t\treturn $r;\n\t}", "title": "" }, { "docid": "f759898d2a4a9848c3c9c88757b3170d", "score": "0.6072185", "text": "public function associations()\n {\n return $this->associations;\n }", "title": "" }, { "docid": "e88a6f509cd58d27a129767245d8d4d4", "score": "0.6070395", "text": "public function getCascadeRelations(): array\n {\n return [];\n }", "title": "" }, { "docid": "21264b83e7fb07f05efa125fe0d28cd7", "score": "0.60504705", "text": "public function getForeignKeys() { }", "title": "" }, { "docid": "6892831326d164d27bb810ed4a8562e0", "score": "0.6047368", "text": "public function getRelated()\n {\n return $this->related;\n }", "title": "" }, { "docid": "6892831326d164d27bb810ed4a8562e0", "score": "0.6047368", "text": "public function getRelated()\n {\n return $this->related;\n }", "title": "" }, { "docid": "6892831326d164d27bb810ed4a8562e0", "score": "0.6047368", "text": "public function getRelated()\n {\n return $this->related;\n }", "title": "" }, { "docid": "d0a60e10ee7cf788b48e735153885ca1", "score": "0.60268617", "text": "protected function _retrieveCollection()\n {\n return $this->getStoreRelations();\n }", "title": "" }, { "docid": "672b28b906a114217af03d7a003ae517", "score": "0.5976745", "text": "public function getRelated() {\n return $this->related;\n }", "title": "" }, { "docid": "1ec8b14e7f17a6c904978796b8063ce3", "score": "0.5945357", "text": "public function relationships(Request $request)\n {\n return [];\n }", "title": "" }, { "docid": "682f2de31c44cac9b82f4194e2d253a1", "score": "0.594422", "text": "public function associations(): array\n {\n return $this->associations;\n }", "title": "" }, { "docid": "9470e3f72e931ba5a326173c881925a5", "score": "0.5942393", "text": "public static function getRelations()\n {\n return [\n 'author' => [DbRelations::BELONGS_TO, '\\app\\models\\User', 'user_id'],\n ];\n }", "title": "" }, { "docid": "60d81230f3c930f8f7e46de2855919c6", "score": "0.5900396", "text": "public function relatedChangesets()\n {\n return $this->hasMany(Changeset::class, 'related_changeset_id');\n }", "title": "" }, { "docid": "0aed3ddb91a9dbf28b653e53c0946df2", "score": "0.5899113", "text": "public function getForeignKeys() : array\n {\n return array(\n // todo\n );\n }", "title": "" }, { "docid": "04f17ae5102e16cc856752ac788665af", "score": "0.5892041", "text": "public function getChildAndParentsRelationships()\n {\n return $this->childAndParentsRelationships;\n }", "title": "" }, { "docid": "43aa0273d77ddaa2ac5ca9aff238f674", "score": "0.58862424", "text": "abstract protected function getRelations();", "title": "" }, { "docid": "5b8eb8e8cb34b686d595c7f46b4dbc32", "score": "0.58575505", "text": "public function relations()\r\n\t{\r\n\t\t// class name for the relations automatically generated below.\r\n\t\treturn array(\r\n\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "544be509f1194c82642c69edbf405b69", "score": "0.5854011", "text": "function getRelationship()\n\t\t{\r\n\t\t\treturn $this->relationship;\n\t\t}", "title": "" }, { "docid": "8c5bff5489b75c8e892f9950ba862f30", "score": "0.58536327", "text": "public function refered()\n {\n return $this->hasMany(self::class, 'referer_id');\n }", "title": "" }, { "docid": "42ab82992c9a040871e39736d7012858", "score": "0.5838459", "text": "public static function getRelations()\n {\n return [\n 'event' => [DbRelations::BELONGS_TO, '\\mpf\\modules\\calendar\\models\\Event', 'event_id'],\n 'requirement' => [DbRelations::BELONGS_TO, '\\mpf\\modules\\calendar\\models\\EventRequirement', 'event_requirement_id'],\n 'user' => [DbRelations::BELONGS_TO, '\\app\\models\\User', 'user_id']\n ];\n }", "title": "" }, { "docid": "57408ec44f467eb14d58478d3c727ed2", "score": "0.5826315", "text": "public function getUserRelationships() {\n\n\t\tif (!isset($this->userRelationships)) {\n\t\t\t$relationships = array();\n\n\t\t\t$query = \"SELECT DISTINCT(er.relationship)\n\t\t\t\tFROM {$this->dbprefix}entity_relationships er\n\t\t\t\tJOIN {$this->dbprefix}entities e1 ON e1.guid = er.guid_one\n\t\t\t\tJOIN {$this->dbprefix}entities e2 ON e2.guid = er.guid_two\n\t\t\t\tWHERE (e1.type = 'user' AND e2.type = 'user')\";\n\n\t\t\t$data = get_data($query);\n\t\t\tforeach ($data as $rel) {\n\t\t\t\t$relationships[] = $rel->relationship;\n\t\t\t}\n\n\t\t\t$this->userRelationships = $relationships;\n\t\t}\n\t\treturn $this->userRelationships;\n\t}", "title": "" }, { "docid": "ec7beb0203a19a9dc54302944bfc782d", "score": "0.58228177", "text": "final protected function getActiveRelations()\n\t{\n\t\t$relations = [];\n\n\t\t$fields = explode(',', $this->request->input('fields'));\n\n\t\tforeach ($this->relations as $key => $value) {\n\t\t\tif (in_array($value, $fields)) {\n\t\t\t\tarray_push($relations, $value);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t\treturn $relations;\n\t}", "title": "" }, { "docid": "64b3bfba19e51a3eb0df298efe346b04", "score": "0.5814303", "text": "public function getRelatedLinks()\n {\n return $this->_relLinks;\n }", "title": "" }, { "docid": "64b3bfba19e51a3eb0df298efe346b04", "score": "0.5814303", "text": "public function getRelatedLinks()\n {\n return $this->_relLinks;\n }", "title": "" }, { "docid": "64b3bfba19e51a3eb0df298efe346b04", "score": "0.5814303", "text": "public function getRelatedLinks()\n {\n return $this->_relLinks;\n }", "title": "" }, { "docid": "64b3bfba19e51a3eb0df298efe346b04", "score": "0.5814303", "text": "public function getRelatedLinks()\n {\n return $this->_relLinks;\n }", "title": "" }, { "docid": "64b3bfba19e51a3eb0df298efe346b04", "score": "0.5814303", "text": "public function getRelatedLinks()\n {\n return $this->_relLinks;\n }", "title": "" }, { "docid": "64b3bfba19e51a3eb0df298efe346b04", "score": "0.5814303", "text": "public function getRelatedLinks()\n {\n return $this->_relLinks;\n }", "title": "" }, { "docid": "64b3bfba19e51a3eb0df298efe346b04", "score": "0.5814303", "text": "public function getRelatedLinks()\n {\n return $this->_relLinks;\n }", "title": "" }, { "docid": "64b3bfba19e51a3eb0df298efe346b04", "score": "0.5814303", "text": "public function getRelatedLinks()\n {\n return $this->_relLinks;\n }", "title": "" }, { "docid": "ddac04fc47c7e46840a1c15495d67e19", "score": "0.57904345", "text": "public function getRels();", "title": "" }, { "docid": "8bf8f7e2f17f2124c0b2a1119fd9b09c", "score": "0.57837874", "text": "protected function getRelations()\n\t{\n\t\treturn ['contentItems', 'sectionTypes'];\n\t}", "title": "" }, { "docid": "5ad6519251f29f2fd9fa2342f2a1ef32", "score": "0.57751995", "text": "public function relations()\n\t{\n\t\t// class name for the relations automatically generated below.\n\t\treturn array(\n\t\t);\n\t}", "title": "" }, { "docid": "5ad6519251f29f2fd9fa2342f2a1ef32", "score": "0.57751995", "text": "public function relations()\n\t{\n\t\t// class name for the relations automatically generated below.\n\t\treturn array(\n\t\t);\n\t}", "title": "" }, { "docid": "5ad6519251f29f2fd9fa2342f2a1ef32", "score": "0.57751995", "text": "public function relations()\n\t{\n\t\t// class name for the relations automatically generated below.\n\t\treturn array(\n\t\t);\n\t}", "title": "" }, { "docid": "22f447e24416674263509f57cd8ee416", "score": "0.5773337", "text": "protected abstract function getForeignKeys();", "title": "" }, { "docid": "d60abe5cf586eb345dcdf53bfb549536", "score": "0.57605845", "text": "public function getReferences(){\n $currentUser = auth()->user();\n return $currentUser->references;\n }", "title": "" }, { "docid": "65c2f3a24a538113721e964e55466ce2", "score": "0.5755406", "text": "public function getRelationships() {\n // 2501 : constrains\n // 2500 : constrained by\n // 0 : duplicate of\n // 1 : related to\n // 2 : parent of\n\n if (NULL == $this->relationships) {\n\n\n $this->relationships = array();\n\n $query = 'SELECT * FROM `mantis_bug_relationship_table` '.\n 'WHERE source_bug_id='.$this->bugId.' OR destination_bug_id='.$this->bugId;\n\n $result = SqlWrapper::getInstance()->sql_query($query);\n if (!$result) {\n echo \"<span style='color:red'>ERROR: Query FAILED</span>\";\n exit;\n }\n while($row = SqlWrapper::getInstance()->sql_fetch_object($result)) {\n if($row->source_bug_id == $this->bugId) {\n // normal\n $this->relationships[\"$row->relationship_type\"][] = $row->destination_bug_id;\n } else {\n // revert\n if (Constants::$relationship_constrained_by == $row->relationship_type) {\n $this->relationships[''.Constants::$relationship_constrains][] = $row->source_bug_id;\n\n } else if (Constants::$relationship_constrains == $row->relationship_type) {\n $this->relationships[''.Constants::$relationship_constrained_by][] = $row->source_bug_id;\n\n } else {\n // parent_of (2), duplicate_of (0)\n $this->relationships[$row->relationship_type.'_REV'][] = $row->source_bug_id;\n }\n }\n }\n }\n return $this->relationships;\n }", "title": "" }, { "docid": "a3b6540452dff49ba6ce0e91d948995f", "score": "0.5738702", "text": "public function getEager()\n {\n return Collection::make($this->relations)->map(function($relation) {\n return $relation->getEager();\n });\n }", "title": "" }, { "docid": "010548641f2a7eae02aedc3b5b0c07ee", "score": "0.57289857", "text": "public function getQueueableRelations()\n {\n // TODO: Implement getQueueableRelations() method.\n }", "title": "" }, { "docid": "010548641f2a7eae02aedc3b5b0c07ee", "score": "0.57289857", "text": "public function getQueueableRelations()\n {\n // TODO: Implement getQueueableRelations() method.\n }", "title": "" }, { "docid": "c0ffed849c7e841ed6fe251e050a8d16", "score": "0.5727637", "text": "public function findAll()\n {\n return $this->related->findAll();\n }", "title": "" }, { "docid": "1ec876b761baecdeb6f9d5e148b09df6", "score": "0.5726292", "text": "public function hasRelationships();", "title": "" }, { "docid": "88b1ac2f7cc2c2b7d35cb4bf2ab63774", "score": "0.57137924", "text": "public function getRelationship();", "title": "" }, { "docid": "2a698ec0100aae09e9391f407f68657d", "score": "0.5702597", "text": "public function relations()\n {\n //get all relations from base class\n $relations = parent::relations();\n\n //pass through all\n foreach($relations as $name => $relation)\n {\n //if found extended file for this related class\n if(file_exists(dirname(__FILE__).DS.'Ext'.$relation[1].'.php'))\n {\n $relations[$name][1] = 'Ext'.$relation[1];\n }\n }\n\n //return modified relations\n return $relations;\n }", "title": "" }, { "docid": "2a698ec0100aae09e9391f407f68657d", "score": "0.5702597", "text": "public function relations()\n {\n //get all relations from base class\n $relations = parent::relations();\n\n //pass through all\n foreach($relations as $name => $relation)\n {\n //if found extended file for this related class\n if(file_exists(dirname(__FILE__).DS.'Ext'.$relation[1].'.php'))\n {\n $relations[$name][1] = 'Ext'.$relation[1];\n }\n }\n\n //return modified relations\n return $relations;\n }", "title": "" }, { "docid": "6413b45d24392c085f25cc31176904bb", "score": "0.57002944", "text": "public function relations()\n {\n return $this->hasMany('App\\Models\\Relation');\n }", "title": "" }, { "docid": "d01d64e4e14faa8b5bc2c4d07efb6fb7", "score": "0.5698061", "text": "function getRelationship() {\n return $this->relationship;\n }", "title": "" }, { "docid": "2efc2d549135e1a6bf7b75b93d5c07e3", "score": "0.5692049", "text": "public function getRelations() {\n return $this->hasMany(Relations::className(), ['article' => 'id']);\n }", "title": "" }, { "docid": "41f5c3fc7afdd85ed26faccf1120422a", "score": "0.5691536", "text": "public function getForeignKeys() {\n\n if (empty($this->foreignKeys) && isset($this->metadata['properties'])) {\n\n foreach ($this->metadata['properties'] as $name => $settings) {\n\n if (isset($settings['foreignKey'])) {\n\n $this->foreignKeys[$settings['foreignKey']] = $name;\n }\n }\n }\n\n return $this->foreignKeys;\n }", "title": "" }, { "docid": "a745d136a8e567d8f2d56c9854d62aaa", "score": "0.56824964", "text": "public function relationships()\n {\n return $this->belongsToMany(User::class, 'user_relationships', 'user_1', 'user_2')\n ->withPivot('relation_id')\n ->withTimestamps();\n }", "title": "" }, { "docid": "e3eb7e4a73ce21c646365ba80adb81e9", "score": "0.5677706", "text": "public function getModelRelations()\r\n {\r\n $relations= [];\r\n foreach ($this->getModelMethods() as $modelMethod){\r\n if($this->validateModelMethods($modelMethod)){\r\n $invoker = $this->reflectionMethodInvoke($modelMethod);\r\n if($invoker instanceof Relation){\r\n $relations[$modelMethod->name]['relation']=\r\n camel_case((new ReflectionClass($invoker))->getShortName());\r\n $relations[$modelMethod->name]['related']=\r\n (new ReflectionClass($invoker->getRelated()))->name;\r\n $relations[$modelMethod->name]['fillable']=\r\n $invoker->getRelated()->getFillable();\r\n }\r\n }\r\n }\r\n return $relations;\r\n }", "title": "" }, { "docid": "59d4d52510754899a106fc7686f244df", "score": "0.56523937", "text": "protected function getMoloquentChangedAttributes()\n {\n return $this->getDirty();\n }", "title": "" }, { "docid": "38d6186e79ac308a3aaa42991116cf25", "score": "0.5634846", "text": "public function getRelated(): object;", "title": "" }, { "docid": "90196019f2e6b87d8a2a1579608065e2", "score": "0.56247354", "text": "public function toArray()\n {\n $attributes = $this->getAttributes();\n\n foreach ($this->relations() as $name => $v) {\n if ($this->hasRelated($name)) {\n $relation = $this->getRelated($name);\n if (is_array($relation)) {\n foreach ($relation as $key => $val) {\n $relation[$key] = $val->toArray();\n }\n $attributes[$name] = $relation;\n } else {\n $attributes[$name] = $relation->toArray();\n }\n }\n }\n\n $attributes = array_merge($attributes, $this->extraAttributes);\n\n return array_diff_key($attributes, array_flip($this->hidden));\n }", "title": "" }, { "docid": "2b4d8edb191fa35ca0ac79eebfc2486e", "score": "0.56144655", "text": "public function relationship()\n {\n if (!$this->relationship && ($model = $this->model())) {\n\n $json = $this->json()->all();\n\n if (array_key_exists('data', $json)) {\n\n $data = array_get($json, 'data');\n\n if (is_array($data) && !Arr::isAssoc($data)) {\n $this->relationship = new HasManyRelationship($json);\n } else {\n $this->relationship = new BelongsToRelationship($json);\n }\n }\n }\n\n return $this->relationship;\n }", "title": "" }, { "docid": "fed5a2a4b1934bf3adeedcdb423fe170", "score": "0.56111234", "text": "public function getRelatedUris()\n {\n return $this->related_uris;\n }", "title": "" }, { "docid": "f79e4d7eeee9504ad65499735ffd77e8", "score": "0.56090176", "text": "public function afterSave()\n {\n if (!$this->_cycling) {\n $this->_cycling = true;\n foreach (array_keys($this->relatedData) as $name) {\n $relation = $this->getOwnerRelation($name);\n if ($relation->multiple) {\n $this->saveMany($name);\n $this->owner->populateRelation($name, $this->relatedModels[$name]);\n unset($this->relatedData[$name]);\n }\n }\n $this->_cycling = false;\n }\n }", "title": "" }, { "docid": "2b27bd78b1c49664c44047ef4638e777", "score": "0.56080425", "text": "public function getRelationship()\n {\n return $this->relationship;\n }", "title": "" }, { "docid": "c2b6b32ca452c69d3539896781371a2f", "score": "0.5598467", "text": "public static function get_relationship_map()\n\t{\n\t\tif (!self::$relationship_map)\n\t\t{\n\t\t\tself::$relationship_map = array(\n\t\t\t\t'Single' => 'single',\n\t\t\t\t'In a Relationship' => 'relationship',\n\t\t\t\t'Engaged' => 'engaged',\n\t\t\t\t'Married' => 'married'\n\t\t\t);\n\t\t}\n\t\treturn self::$relationship_map;\n\t}", "title": "" }, { "docid": "07ed57c286d9b7b570b22d39a6a43e39", "score": "0.5594395", "text": "final protected function save_has_and_belongs_to_many() {\n\t\tforeach ($this->_has_and_belongs_to_many as $relation => $options) {\n\t\t\tif (is_numeric($relation))\n\t\t\t\t$relation = $options;\n\n\t\t\tif (isset($this->_attributes[$relation]))\n\t\t\t\t$this->add_has_and_belongs_to_many($relation, $this->_attributes[$relation]);\n\t\t}\n\t}", "title": "" }, { "docid": "b53b021cc18414a17cbbdfe1e09b6dcb", "score": "0.5580651", "text": "protected function getRelationsToProxy()\n {\n $proxies = [];\n $attributes = $this->getEntityAttributes();\n\n foreach ($this->entityMap->getNonEmbeddedRelationships() as $relation) {\n //foreach ($this->entityMap->getRelationships() as $relation) {\n\n if (!array_key_exists($relation, $attributes) || is_null($attributes[$relation])) {\n $proxies[] = $relation;\n }\n }\n\n return $proxies;\n }", "title": "" }, { "docid": "ba41c8fd3fdfeddf319b6f17ddfee046", "score": "0.5557704", "text": "final protected function save_has_many() {\n\t\tforeach ($this->_has_many as $relation => $options) {\n\t\t\tif (is_numeric($relation))\n\t\t\t\t$relation = $options;\n\t\t\tif (isset($this->_attributes[$relation]))\n\t\t\t\t$this->add_has_many($relation, $this->_attributes[$relation]);\n\t\t}\n\t}", "title": "" }, { "docid": "cca7fb55cd94de853f8656fe14056431", "score": "0.5556424", "text": "public function getStaticRelations();", "title": "" }, { "docid": "02a2d26ef3abb43627a2d3b680f974da", "score": "0.55471563", "text": "public function referedUsers()\n {\n return $this->hasMany(User::class, 'referrer_id');\n }", "title": "" }, { "docid": "1f98d2d371ec5d792bf2ac98443d5622", "score": "0.55388415", "text": "public function save_rel()\n\t{\n\t\tforeach ($this->_habtm_relationships as $values)\n\t\t{\n\t\t\t$this->model->{$values['method']}($values['alias'], $values['value']);\n\t\t}\n\n\t\tforeach ($this->_has_many_relationships as $values)\n\t\t{\n\t\t\t$alias = $values['alias'];\n\t\t\t$foreign_key = $this->_has_many['definitions'][$alias]['foreign_key'];\n\t\t\t$model = $this->_has_many['definitions'][$alias]['model'];\n\t\t\t$primary_key = ORM::factory($model)->primary_key();\n\n\t\t\t$table_name = ORM::factory($model)->table_name();\n\n\t\t\t// Remove the appropriate records\n\t\t\t$remove_query = DB::update($table_name)\n\t\t\t\t->set(array($foreign_key => NULL))\n\t\t\t\t->where($foreign_key, '=', $this->model->pk());\n\n\t\t\tif ($values['value'])\n\t\t\t{\n\t\t\t\t// Add the applicable fields if there is a value\n\t\t\t\t$remove_query->where($primary_key, 'NOT IN', (array) $values['value']);\n\n\t\t\t\t// Add the appropriate records\n\t\t\t\t$add_query = DB::update($table_name)\n\t\t\t\t\t->set(array($foreign_key => $this->model->pk()))\n\t\t\t\t\t->where($primary_key, 'IN', (array) $values['value'])\n\t\t\t\t\t->execute();\n\t\t\t}\n\n\t\t\t$remove_query->execute();\n\t\t}\n\n\t\tforeach ($this->_has_one_relationships as $values)\n\t\t{\n\t\t\t$alias = $values['alias'];\n\t\t\t$value = $values['value'];\n\n\t\t\t$foreign_key = $this->_has_one['definitions'][$alias]['foreign_key'];\n\t\t\t$model = $this->_has_one['definitions'][$alias]['model'];\n\n\t\t\tif ($this->model->$alias->pk() != $value)\n\t\t\t{\n\t\t\t\t$this->model->$alias->$foreign_key = NULL;\n\t\t\t\t$this->model->$alias->save();\n\n\t\t\t\t$record = ORM::factory($model, $value);\n\t\t\t\t$record->$foreign_key = $this->model->pk();\n\t\t\t\t$record->save();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "5721bca1f74473a8619895414c3d56e5", "score": "0.55293787", "text": "public function getRelationAttributes();", "title": "" }, { "docid": "fa8816309405b889d070d77cddac2acc", "score": "0.5526058", "text": "public function getRelationships($model){\n if($model->getRelations() == []){ return false; }\n\n // Initialize relationships array\n $relationships = [];\n\n // Loop through relationships array\n foreach ($model->getRelations() as $relation => $related) {\n\n // Checks if relationship is a collection by determining if the\n // method 'isEmpty' exists on the object\n if(method_exists($related, 'isEmpty')){\n // If the key has no value (no related records returned), break;\n if($related->isEmpty()){ break; }\n\n // If the key is in the includes collection, merge the them\n if(in_array($relation, $this->includes)){\n $this->includedObjects = $this->includedObjects->merge($related);\n }\n\n // And set the relationship key and value\n $relationships[$relation]['data'] = $related->map(function($item){\n return $item->rid();\n });\n } else {\n if($related == NULL){ break; }\n\n // If the key is in the includes collection, merge the them\n if(in_array($relation, $this->includes)){\n $this->includedObjects = $this->includedObjects->push($related);\n }\n\n // And set the relationship key and value\n $relationships[$relation]['data'] = $related->rid();\n\n }\n\n }\n\n // If there still aren't any relationships, return false\n if($relationships == []){ return false; }\n\n // Otherwise return the relationships array\n return $relationships;\n\n }", "title": "" }, { "docid": "be6ee7a864e6bf7b04996d1d3d2dfd73", "score": "0.551841", "text": "public function revisers()\n {\n return $this->morphTo();\n }", "title": "" } ]
ff36981c0e0eef2dc2cd384f7bf01460
Boot up the repository, pushing criteria
[ { "docid": "9997f354d8e5b78fc462b1709eca1cc4", "score": "0.0", "text": "public function boot()\n {\n $this->pushCriteria(app(RequestCriteria::class));\n }", "title": "" } ]
[ { "docid": "934c5b1c843379fd8d44f2e2075983db", "score": "0.6183281", "text": "private function initRepository(): void\n {\n $kernel = static::$kernel;\n\n $application = new Application($kernel);\n\n $command = $application->find('doctrine:phpcr:repository:init');\n $commandTester = new CommandTester($command);\n $commandTester->execute(\n ['command' => $command->getName()]\n );\n }", "title": "" }, { "docid": "d53de45d3a91a9e199bbc1ab50969d6a", "score": "0.562282", "text": "function __construct(){\n\t\tparent::__construct();\n\t\t$this->load->database();\n\t\t//Testing push in git\n\t}", "title": "" }, { "docid": "1460e5d04801b76a3861960d27041940", "score": "0.5459937", "text": "protected static function addRepositories() {\n foreach(Addons::getRequire() as $require) {\n File::addContent(self::$config_composer, $require, 'silverstripe/installer');\n }\n File::replaceContent(self::$config_composer, '\"silverstripe/installer\": \"3.1.12\"', '\"silverstripe/installer\": \"3.1.12\",');\n \n // run composer again which triggered Installer.php again\n passthru(\"composer update\");\n \n // add some customized extensions to addons\n Addons::addExtensions(self::$event);\n \n self::changeOwner();\n }", "title": "" }, { "docid": "105b367e5bdce73d013c90351035636f", "score": "0.5402389", "text": "public function __construct()\n {\n $this->payableManagerRepo = new PayableManagerRepository();\n $this->stateRepo = new StatesRepository();\n\n }", "title": "" }, { "docid": "6a19f21a89fd5e6275d10a325340bcc7", "score": "0.53943026", "text": "public function startup() {\n\t\t// If we are dealing with multiple organisations then enqueue separate instances\n\t\t// which will contain errors and issues to a single organisation.\n\t\t$organisations = $this->findOrganisations();\n\t\tif (count($organisations) !== 1) {\n\t\t\tforeach ($organisations as $organisation) {\n\t\t\t\t$this->enqueueUpdate($organisation['Organisation']['id']);\n\t\t\t}\n\n\t\t\t$this->_stop(0); // Exit with success\n\t\t}\n\n\t\t$organisation = reset($organisations);\n\t\t$this->params['organisation'] = $organisation['Organisation']['id'];\n\n\t\tif ($this->params['verbose'] === true) {\n\t\t\t$this->XeroContact->setVerbose();\n\t\t}\n\t}", "title": "" }, { "docid": "c2a71f36c13e1832bbf7b252170be361", "score": "0.5274133", "text": "public function setup() {\n\t\t$this->db->loadSQLFile($this->moduleName, 'whompah_cities');\n\t\t\n\t\t$this->commandAlias->register($this->moduleName, 'whompah', 'whompahs');\n\t\t$this->commandAlias->register($this->moduleName, 'whompah', 'whompa');\n\t\t$this->commandAlias->register($this->moduleName, 'whompah', 'whompas');\n\t}", "title": "" }, { "docid": "adb1e4db208cf2c4c534a9120da6e3ef", "score": "0.52316993", "text": "public function __construct(){\n $this->repos = new UserRepository();\n $this->fighterRepos = new FighterRepository();\n }", "title": "" }, { "docid": "3c1aef0c5473437ef8b4677caa708e74", "score": "0.52228457", "text": "function setup()\n {\n //$user = Auth::user();\n $this->src(\"elo\")->query(\n Incident::where('status', '!=', 'draft')\n ->orderBy('id', 'desc')\n ->take(10)\n )\n ->pipe($this->dataStore(\"incidents\"));\n }", "title": "" }, { "docid": "182d17c0945f1dcfb9f9e722a04a221b", "score": "0.5211186", "text": "private function installAndUpdate(){\n $this->setupAttributeTypes()\n ->setupAttributeTypeAssociations()\n ->setupCollectionAttributes()\n ->setupFileAttributes()\n ->setupUserAttributes()\n ->setupFileSets()\n ->setupStacks()\n ->setupTheme()\n ->setupTemplates()\n ->setupPageTypes()\n ->assignPageTypes()\n ->setupSinglePages()\n ->setupBlockTypeSets()\n ->setupBlocks()\n ->setupThumbnailTypes();\n }", "title": "" }, { "docid": "8de7fa5fc81ad588f7ad52d022fa7f07", "score": "0.51950985", "text": "public function setupCriteria()\n {\n }", "title": "" }, { "docid": "fed034ed7f7538fb5baf0348ec5b1db6", "score": "0.51673377", "text": "protected static function build() {\n // build database\n passthru('sake dev/build \"flush=all\"');\n self::$event->getIO()->write(\":: build database and flush cache\");\n }", "title": "" }, { "docid": "ab405d62b0a22fa2c49ccb5bf9130a98", "score": "0.5149539", "text": "public abstract function bootstrap();", "title": "" }, { "docid": "337fe415a7e9b6666d50956ba1cd6c9b", "score": "0.51488614", "text": "public function __construct()\n {\n $this->inventoryRepo = new InventoryRepository();\n }", "title": "" }, { "docid": "f02f8b09e4a961966378b7df71283e2e", "score": "0.5138055", "text": "private function installAndUpdate(){\n $this->setupAttributeTypes()\n ->setupAttributeTypeAssociations()\n ->setupCollectionAttributes()\n ->setupFileAttributes()\n ->setupFileSets()\n ->setupTheme()\n ->setupTemplates()\n ->setupPageTypes()\n ->assignPageTypes()\n ->setupSinglePages()\n ->setupBlockTypeSets()\n ->setupBlocks()\n ->setupThumbnailTypes();\n }", "title": "" }, { "docid": "79fcf9e821bc84c1ffbe91469e68d4cd", "score": "0.5134913", "text": "public function install()\n\t{\n\t\t$this->maybeUpdateDb();\n\t}", "title": "" }, { "docid": "6020c9510bfa72419436365f958adfcc", "score": "0.5126011", "text": "public function init()\n {\n $this->taskComposerInstall('./composer.phar')\n ->run();\n\n //Update the dependancies/requirements through composer\n $this->taskComposerUpdate('./composer.phar')\n ->run();\n\n //Install Wienre\n $this->taskExec('sudo npm -g install weinre')\n ->run();\n\n //Install PhantomJS\n $this->taskExec('npm install phantomjs')\n ->run();\n\n //Copy over master yaml\n $this->taskExec('cp -r ./vendor/saucey/framework/ymls/behat.yml.master.dist ./behat.yml')\n ->run();\n\n //Copy over bin\n $this->taskExec('cp -R ./vendor/saucey/framework/bin/* ./bin/')\n ->run();\n\n //Pull develop and master\n $this->taskGitStack()\n ->pull('origin', 'master')\n ->pull('origin', 'develop')\n ->run();\n\n //Make directory for reports\n $this->taskExec('mkdir reports/')\n ->run();\n\n //Make directory for ADSCR726\n $this->taskExec('mkdir reports/ADSCR726/')\n ->run();\n\n //View saucey introduction\n $this->taskExec('cat ./run/saucey.txt')\n ->run();\n }", "title": "" }, { "docid": "ae8b148b1602d8fc3dde28e534af2d94", "score": "0.5108701", "text": "protected function prepareDatabase()\n {\n $this->migrator->setConnection($this->option('database'));\n\n if (! $this->migrator->repositoryExists()) {\n $options = ['--database' => $this->option('database')];\n\n // This is the modified line\n $this->call('artificer:migrate:install', $options);\n }\n }", "title": "" }, { "docid": "bc2e1b47c0fcb1cdd9cae11157832666", "score": "0.51086134", "text": "protected function initialize()\n {\n $this->apiHelper = $this->di->get('apiHelper');\n $this->repo = $this->di->get(JobsRepository::class, [$this->getDI()]);\n }", "title": "" }, { "docid": "7d9fed058c44004fc7cf6593a7b9f2d9", "score": "0.5101357", "text": "public function install() {}", "title": "" }, { "docid": "f05cd7c0ca39eaeb6855971ece36f0c4", "score": "0.50942546", "text": "private function initializeMinimumData() {\n $dataSet = new YamlDataSet(dirname(__FILE__) . '/files/buyer_jump/buyer_jump.yml');\n $this->databaseTester = null;\n $this->getDatabaseTester()->setSetUpOperation($this->getSetUpOperation());\n $this->getDatabaseTester()->setDataSet($dataSet);\n $this->getDatabaseTester()->onSetUp();\n }", "title": "" }, { "docid": "7d2d5b4db6641559b66aa308dfaea786", "score": "0.50914186", "text": "public function run()\n {\n factory(App\\User::class, 1)->create();\n factory(App\\Category::class, 1)->create();\n factory(App\\Supplier::class, 1)->create();\n // factory(App\\Menu::class, 10)->create();\n // factory(App\\Receipt::class, 5)->create();\n factory(App\\Company::class, 1)->create();\n factory(App\\SystemSetting::class, 1)->create();\n // factory(App\\Order::class, 10)->create();\n<<<<<<< HEAD\n factory(App\\Table::class, 5)->create();\n factory(App\\Theme::class, 1)->create();\n=======\n>>>>>>> 558c21e6c26f9043810d916b07f52d9311b946c3\n }", "title": "" }, { "docid": "bc1db2c19701379eb0b84242c9fd5592", "score": "0.50892895", "text": "public function prepare()\n {\n $this->config->create();\n\n $this->initialPreparation = $this->config->wasRecentlyCreated;\n }", "title": "" }, { "docid": "d3bfcd14eaa2a179ba1de5280eff4c63", "score": "0.5085882", "text": "protected function setUp() : void\n {\n parent::setUp();\n\n $this->countryRepository = new CountryRepository();\n $this->stateRepository = new StateRepository();\n $this->cityRepository = new CityRepository();\n }", "title": "" }, { "docid": "ad90cabd9ffe8517897e33a760f8bf1d", "score": "0.50786614", "text": "public function run()\n {\n factory(\\App\\Models\\Project::class, 7)->states('unpublished')->create();\n factory(\\App\\Models\\Project::class, 9)->states('published')->create();\n }", "title": "" }, { "docid": "8fbb0f219145ac5e7027b653fe4f7d32", "score": "0.5076755", "text": "public function __construct()\n {\n parent::__construct();\n\n $this->authors = new AuthorRepository();\n $this->novels = new NovelRepository();\n $this->novelSections = new NovelSectionRepository();\n\n $this->disk = config('filesystems.default');\n //$this->disk = 'local';\n\n $this->initConfig(); // 实例化配置\n }", "title": "" }, { "docid": "115ca1a74ca964bed102a624461e1f5c", "score": "0.5075387", "text": "public function setUp()\r\n {\r\n $this->criteria = new EmploymentCriteria();\r\n }", "title": "" }, { "docid": "4fb4f478189a601b681bc9688bdfba26", "score": "0.5069737", "text": "public function install() { }", "title": "" }, { "docid": "d07ff28b8d8415b05fbd22a55227e633", "score": "0.5056588", "text": "protected static function boot()\n {\n parent::boot();\n\n static::addGlobalScope(new RevisionScope());\n }", "title": "" }, { "docid": "70b1021e83be1f00a237bbcaded480fb", "score": "0.50031096", "text": "abstract public function boot();", "title": "" }, { "docid": "af2405fd3fde2fe7b418737a93ffac09", "score": "0.49925303", "text": "protected function initializeAction() {\r\n\t\t$this->opengraphRepository = t3lib_div::makeInstance('Tx_In2facebook_Domain_Repository_OpengraphRepository');\r\n\t}", "title": "" }, { "docid": "54ef05f75b95b183d709373c26018e23", "score": "0.4983394", "text": "protected function initializeAction() {\n\t\t$this->categorieRepository = t3lib_div::makeInstance('Tx_Extbasenews_Domain_Repository_CategorieRepository');\n\t}", "title": "" }, { "docid": "3546aea11f08133fbb5a41579cc53de3", "score": "0.49762294", "text": "public function startup() {\n\t\tif (isset($this->params['silent']) && $this->params['silent']) {\n\t\t\t$this->silent = TRUE;\n\t\t}\n\n\t\tif (isset($this->params['table']) && $this->params['table']) {\n\t\t\t$modelName = Inflector::classify($this->params['table']);\n\t\t\t$this->model = ClassRegistry::init($modelName);\n\t\t} else {\n\t\t\t$this->model = ClassRegistry::init($this->model);\n\t\t}\n\n\t\tif (isset($this->params['field']) && $this->params['field']) {\n\t\t\t$this->field = $this->params['field'];\n\t\t}\n\n\t\tif (isset($this->params['all']) && $this->params['all']) {\n\t\t\t\t$this->strict = FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "28c10da811797523c172e5a77529a810", "score": "0.49714112", "text": "protected function setUp()\n {\n $this->repo = Bootstrap::getObjectManager()->create(PageRepositoryInterface::class);\n $this->auth = Bootstrap::getObjectManager()->get(Auth::class);\n $this->criteriaBuilder = Bootstrap::getObjectManager()->get(SearchCriteriaBuilder::class);\n $this->aclBuilder = Bootstrap::getObjectManager()->get(Builder::class);\n }", "title": "" }, { "docid": "26f11fe4c3b62fa29c2350cc5966df44", "score": "0.49712473", "text": "public function initProboCI()\n {\n $dktl_dir = Util::getDktlDirectory();\n $project_dir = Util::getProjectDirectory();\n $collection = $this->collectionBuilder();\n $collection->addTask($this->taskExec(\"cp -r {$dktl_dir}/assets/.probo.yml {$project_dir}\"));\n $collection->addTask($this->taskExec(\"cp -r {$dktl_dir}/assets/settings.probo.php {$project_dir}/src/site\"));\n return $collection->run();\n }", "title": "" }, { "docid": "540d742cf1a652c5238406b27eb5058a", "score": "0.49654558", "text": "protected function prepareDatabase()\n {\n $this->migrator->setConnection($this->input->getOption('database'));\n\n if (!$this->migrator->repositoryExists()) {\n $options = ['--database' => $this->input->getOption('database')];\n\n $this->call('structured:install', $options);\n }\n }", "title": "" }, { "docid": "096b78346c1b11d76fe3b19baca37c3a", "score": "0.49613753", "text": "public function assemble()\n {\n $this->callback(\n function () {\n $this->checkoutPackages(\n array_unique(array_merge((array) $this->get('branch'), ['master'])),\n $this->get('merge'),\n $this->get('create')\n );\n }\n );\n }", "title": "" }, { "docid": "4abbd137dc1d7751d971e3c7ede8013b", "score": "0.49527615", "text": "public static function install(){\n\t}", "title": "" }, { "docid": "901a146b24a52013d5827133d6fbe6e9", "score": "0.49488682", "text": "public function install()\n {\n // Check if upload directories exist and if needed create them\n try {\n $controllerHelper = new Weekly_Util_Controller($this->serviceManager);\n $controllerHelper->checkAndCreateAllUploadFolders();\n } catch (\\Exception $e) {\n return LogUtil::registerError($e->getMessage());\n }\n // create all tables from according entity definitions\n try {\n DoctrineHelper::createSchema($this->entityManager, $this->listEntityClasses());\n } catch (\\Exception $e) {\n if (System::isDevelopmentMode()) {\n LogUtil::registerError($this->__('Doctrine Exception: ') . $e->getMessage());\n }\n $returnMessage = $this->__f('An error was encountered while creating the tables for the %s extension.', array($this->name));\n if (!System::isDevelopmentMode()) {\n $returnMessage .= ' ' . $this->__('Please enable the development mode by editing the /config/config.php file in order to reveal the error details.');\n }\n return LogUtil::registerError($returnMessage);\n }\n \n // set up all our vars with initial values\n $this->setVar('pageSize', 20);\n $this->setVar('pictureSize', 102400);\n $this->setVar('showManager', true);\n $this->setVar('showComanager', true);\n $this->setVar('showKind', true);\n $this->setVar('showLocation', true);\n $this->setVar('showParticipants', true);\n $this->setVar('maxParticipantsDefault', 0);\n $this->setVar('allowDeactivating', false);\n \n $categoryRegistryIdsPerEntity = array();\n \n // create the default data\n $this->createDefaultData($categoryRegistryIdsPerEntity);\n \n // register persistent event handlers\n $this->registerPersistentEventHandlers();\n \n // register hook subscriber bundles\n HookUtil::registerSubscriberBundles($this->version->getHookSubscriberBundles());\n \n \n // initialisation successful\n return true;\n }", "title": "" }, { "docid": "65616b80131a072f45aff562ea905765", "score": "0.49443576", "text": "function install () {\t\n\t}", "title": "" }, { "docid": "9de11b8a076ac095f286c0e9f18e380c", "score": "0.49397078", "text": "abstract public function install();", "title": "" }, { "docid": "9de11b8a076ac095f286c0e9f18e380c", "score": "0.49397078", "text": "abstract public function install();", "title": "" }, { "docid": "bcdc67a95b1d58efa6be5396b129bc49", "score": "0.4930135", "text": "public function boot(): void", "title": "" }, { "docid": "e8dfc584ac5bfa345757e570cc51a87f", "score": "0.49241582", "text": "public function init()\n {\n $this->config = new ConfigRepository([\n 'social' => require get_template_directory() . '/config/social.php',\n 'theme' => require get_template_directory() . '/config/theme.php'\n ]);\n }", "title": "" }, { "docid": "e3783929260fc848eaada670d787152c", "score": "0.49227363", "text": "public function setUp() {\n\t\t$this->requireEasyDeployClassesOrSkip();\n\t}", "title": "" }, { "docid": "dccfdcc33e365b083956bc4ea9e69152", "score": "0.49146912", "text": "function install() {}", "title": "" }, { "docid": "f80647f264213539224d07c8df13dfb6", "score": "0.49106687", "text": "protected function createRepository()\n {\n if ($this->option('repository')) {\n $model = ucwords($this->getNameInput());\n\n $this->call('starter:repository', ['name' => $model . 'Repository']);\n }\n }", "title": "" }, { "docid": "5da73c16b6449d09c5f26600744c5969", "score": "0.4906273", "text": "protected function prepareDatabase()\n {\n $this->migrator->setConnection($this->option('database'));\n\n if (!$this->migrator->repositoryExists()) {\n $options = array('--database' => $this->option('database'));\n\n $this->call('migrate:install', $options);\n }\n }", "title": "" }, { "docid": "422e55a627540fbc3ca90d5c7c4c5867", "score": "0.49060678", "text": "public function provision()\n {\n EnableProjectApis::withChain([\n new WaitForProjectApisToBeEnabled($this),\n new CreateAppEngineShellApp($this),\n new SyncDatabaseInstances($this),\n ])->dispatch($this);\n }", "title": "" }, { "docid": "081c742bd1ac909d26470ea0c95ed873", "score": "0.49024412", "text": "public function startup()\n {\n $this->Room = new Room();\n $this->Network = new Network();\n\n //Initialize the UserManager.\n $this->UserManager = new UserManager();\n\n //Initialize the ModuleManager.\n $modulesPriorities = [];\n if (Configure::check('Modules.priority')) {\n $modulesPriorities = Configure::read('Modules.priority');\n }\n\n $this->ModuleManager = new ModuleManager($modulesPriorities);\n\n //Initialize the PacketManager.\n $packetsPriorities = [];\n if (Configure::check('Packets.priority')) {\n $packetsPriorities = Configure::read('Packets.priority');\n }\n\n $this->PacketManager = new PacketManager($packetsPriorities);\n\n $this->login();\n }", "title": "" }, { "docid": "019d4de4642b0988de8eaa685ed90261", "score": "0.4900678", "text": "protected function prepareDatabase()\n {\n $this->migrator->setConnection($this->option('database'));\n if (!$this->migrator->repositoryExists()) {\n $options = ['--database' => $this->option('database')];\n $this->call('migrate:install', $options);\n }\n }", "title": "" }, { "docid": "3dfd28102fc5c2d693d1a1ab09f3f615", "score": "0.4877094", "text": "public static function boot()\n {\n parent::boot();\n static::addGlobalScope(new VendorScope());\n static::addGlobalScope(new BranchScope());\n }", "title": "" }, { "docid": "76ad6bd840a69ca8b37d22ffe346ff37", "score": "0.48713988", "text": "protected function setUp()\n {\n $this->object = new GithubHelper();\n $this->repo = new Repo();\n $this->repo->setSlug('pdenis/monitoring');\n }", "title": "" }, { "docid": "d3ad9b561cf61c7145c495e52c78f6e7", "score": "0.48703444", "text": "protected function setUp()\n {\n $this->object = new \\Yana\\Plugins\\Repositories\\MyRepository();\n }", "title": "" }, { "docid": "280e83ea896ce04c23f85029e3315390", "score": "0.4868893", "text": "public function __construct()\n {\n parent::__construct();\n\n $this->novels = new NovelRepository();\n $this->novelSections = new NovelSectionRepository();\n $this->commonSets = new CommonSetRepository();\n $this->nowAt = time();\n $this->disk = config('filesystems.default');\n }", "title": "" }, { "docid": "8519fa5e99176f31806121203e1a8684", "score": "0.48675188", "text": "public function setUp()\r\n {\r\n $this->criteria = new CreditScoreCriteria();\r\n\r\n $this->reference = new ReferencingApplication();\r\n $this->decisionDetails = new ReferencingDecisionDetails();\r\n $this->creditReference = new CreditReference();\r\n $this->rrpReference = new RentRecoveryPlusReference();\r\n\r\n $this->rrpReference->setParent($this->reference);\r\n $this->rrpReference->setDecisionDetails($this->decisionDetails);\r\n $this->decisionDetails->setCreditReference($this->creditReference);\r\n }", "title": "" }, { "docid": "f7feacfacc879b5d7f567e6200d7421c", "score": "0.48644257", "text": "public function setUp()\n {\n $this->orPredicate = new OrPredicate(\n function($value) { return 'bar' === $value; },\n function($value) { return 'foo' === $value; }\n );\n }", "title": "" }, { "docid": "1a5b9432087d0e25456d9fa9fb8d76fb", "score": "0.48614076", "text": "public function main()\n {\n $projectFile = '../project.yml';\n\n $projectConfig = App::loadYmlFileEx($projectFile);\n $apps = array_try_get($projectConfig, 'app', []);\n $dbServers = array_try_get($projectConfig, 'db_server', []);\n\n foreach ($dbServers as &$server)\n {\n $this->_setDbServerDefaultSettings($server);\n }\n $this->_dbServers = $dbServers;\n\n foreach ($apps as $appName => $appconfig)\n {\n $this->_processApp($appName, $appconfig);\n }\n }", "title": "" }, { "docid": "3450341c82571431f78e9113309f4e4e", "score": "0.48580596", "text": "public function run()\n {\n $this->findByNameOrCreate('Home', 'home', true, true);\n $this->findByNameOrCreate('About', 'about');\n $this->findByNameOrCreate('The Cars', 'cars', true, true);\n $this->findByNameOrCreate('Pictures and Press', 'press', false, true);\n $this->findByNameOrCreate('The Team', 'team', false, true);\n $this->findByNameOrCreate('Join the team', 'join');\n $this->findByNameOrCreate('Sponsors', 'sponsors');\n $this->findByNameOrCreate('Contact', 'contact');\n $this->findByNameOrCreate('Privacy Policy', 'privacy', true, true, false);\n }", "title": "" }, { "docid": "f4959300d02dc7175ad93aa2e1ba8e7c", "score": "0.48551872", "text": "public static function install(): void\n {\n self::createStorage(dirname(__DIR__))->prepareDB();\n }", "title": "" }, { "docid": "8bfa4f9b6aae362d989caf9f40f0c3e8", "score": "0.48523298", "text": "static function bootstrap()\n {\n if ( is_file( 'pake ' ) )\n {\n echo \"Error: could not create 'pake' directory to install the extension because a file named 'pake' exists\";\n exit( -1 );\n }\n\n if ( is_dir( 'pake') )\n {\n /// @todo test: if dir is not empty, ask for confirmation,\n /// least we overwrite something\n }\n\n if ( !is_dir( 'pake' ) && !mkdir( 'pake' ) )\n {\n echo \"Error: could not create 'pake' directory to install the extension\";\n exit( -1 );\n }\n\n // download components\n /// @todo use a recursive fget, so that we do not need to download a zip\n $src = self::$installurl.'/pake/ezpublishbuilder_pakedir.zip';\n $zipfile = tempnam( \"tmp\", \"zip\" );\n if ( !file_put_contents( $zipfile, file_get_contents( $src ) ) )\n {\n echo \"Error: could not download source file $src\";\n exit -1;\n }\n\n // unzip them\n $zip = new ZipArchive;\n if ( $zip->open( $zipfile ) !== true )\n {\n echo \"Error: downloaded source file $src is not a valid zip file\";\n exit -1;\n }\n if ( !$zip->extractTo( 'pake' ) )\n {\n echo \"Error: could not decompress source file $zipfile\";\n $zip->close();\n exit -1;\n }\n $zip->close();\n unlink( $zipfile );\n }", "title": "" }, { "docid": "9043885cc8c0fad874a3d0fef6863cf2", "score": "0.48506323", "text": "public function setUp() {\n\t\t$this->commandManager = new CommandManager(false);\n\t\t$this->manager = new VersionManager($this->commandManager);\n\t}", "title": "" }, { "docid": "d8bf2c1510f2e774242c9f364958fd14", "score": "0.48479486", "text": "protected function setUp() {\n\t\tparent::setUp();\n\t\t$this->repository = new ArrayRepository([\n\t\t\t'EUR' => [\n\t\t\t\t'code' => 'EUR',\n\t\t\t\t'iso' => 978,\n\t\t\t\t'name' => 'Euro',\n\t\t\t\t'symbol_left' => '',\n\t\t\t\t'symbol_right' => '€',\n\t\t\t\t'decimal_place' => 2,\n\t\t\t\t'decimal_mark' => ',',\n\t\t\t\t'thousands_separator' => '.',\n\t\t\t\t'unit_factor' => 100\n\t\t\t]\n\t\t]);\n\t}", "title": "" }, { "docid": "a99887ec7e923efeee57ef46a4095cf5", "score": "0.48464406", "text": "public function install()\n {\n // leave this empty\n }", "title": "" }, { "docid": "13c47eaa573b09f416e364a4f6b50a57", "score": "0.4842502", "text": "public function __construct()\n {\n $this->enderecoRepository = app(EnderecoRepository::class);\n $this->contatoRepository = app(ContatoRepository::class);\n }", "title": "" }, { "docid": "a3201ecd581c9a6e5730af5632d7e2c8", "score": "0.48420152", "text": "protected function setUp(): void\n {\n $container = $this->getAppInstance()->getContainer();\n\n $this->userRepository = new PDOUserRepository($container);\n }", "title": "" }, { "docid": "333f347b8753d8b8c1383f8a18dd6e01", "score": "0.4841703", "text": "public function bootstrap()\n {\n if ($this->container->isInstalled()) {\n $this->module->enabled()->each(function (Module $module) {\n $this->module->registerExcept($module->get('csrf', []));\n collect($module->get('events', []))->each(function ($data, $key) {\n switch ($key) {\n case 'subscribes':\n collect($data)->each(function ($subscriber) {\n if (class_exists($subscriber)) {\n $this->events->subscribe($subscriber);\n }\n });\n break;\n }\n });\n $schemas = $module->get('graphql.schemas', []);\n foreach ($schemas as $key => $value) {\n if (isset($value['query']) && is_array($value['query']) && count($value['query']) > 0) {\n $key = 'graphql.schemas.' . $key . '.query';\n $queries = collect($this->config->get($key, []));\n if ($queries->isEmpty()) {\n $queries = collect($value['query']);\n } else {\n $queries = $queries->merge((array)$value['query']);\n }\n $this->config->set($key, $queries->toArray());\n }\n if (isset($value['mutation']) && is_array($value['mutation']) && count($value['mutation']) > 0) {\n $key = 'graphql.schemas.' . $key . '.mutation';\n $mutations = collect($this->config->get($key, []));\n if ($mutations->isEmpty()) {\n $mutations = collect($value['query']);\n } else {\n $mutations = $mutations->merge((array)$value['query']);\n }\n $this->config->set($key, $mutations->toArray());\n }\n }\n $types = collect($this->config->get('graphql.types'));\n $types = $types->merge($module->get('graphql.types', []));\n $this->config->set('graphql.types', $types->toArray());\n $providers = collect($this->config->get('app.providers'));\n $providers->push($module->service());\n collect($module->get('providers', []))->each(function ($provider) use ($providers) {\n $providers->push($provider);\n });\n $this->config->set('app.providers', $providers->toArray());\n });\n }\n $this->event->dispatch(new ModuleLoaded());\n }", "title": "" }, { "docid": "129a0b22bcd1af56fd06b6e77cf40b09", "score": "0.4837624", "text": "public function install()\n\t{\n\t}", "title": "" }, { "docid": "266dd9b9fc3b095555b789317ec58d61", "score": "0.4836844", "text": "public function run()\n {\n \n \n \\App\\Models\\LDXPS\\Vendor::factory(10)\n ->has(Customer::factory(13))\n ->create();\n\n }", "title": "" }, { "docid": "194d8f7b5369f12bfd3967fcd0011742", "score": "0.48326394", "text": "public function __construct()\n {\n $this->addressRepository = new AddressRepository();\n }", "title": "" }, { "docid": "3876f254a266609f251b2ec9d1169d9b", "score": "0.48313382", "text": "public function boot()\n {\n parent::boot();\n $this->pushCriteria(app(ProjectCriteria::class));\n\n }", "title": "" }, { "docid": "5b75144a6d061136c60c009d552469a1", "score": "0.48272175", "text": "private function setup()\n {\n $this->runner = $this->specHelper->getRunner();\n\n $this->setupWorkspace();\n $this->setupTargets();\n\n // call initializers\n foreach ($this->application->config('spec.initializers.*') as $initializer) {\n $initializer($this->application);\n }\n }", "title": "" }, { "docid": "4003ba0485bb4f8e06328fb3b32d8233", "score": "0.48269692", "text": "public function run()\n {\n $this->disableForeignKeys(\"users\");\n\n $user_repo = new UserRepository();\n $exists = $user_repo->query()->where('email', '[email protected]')->count();\n \\Illuminate\\Support\\Facades\\Log::info($exists);\n if($exists == 0)\n {\n $admin = $user_repo->query()->firstOrCreate(['firstname' => 'Administrator'], [\n 'username' => 'admin',\n 'firstname' => 'Administrator',\n 'lastname' => 'Administrator',\n 'middlename' => 'Administrator',\n 'email' => '[email protected]',\n 'phone' => '+255700000000',\n 'password' => bcrypt('nexttask123?'),\n 'confirmed' => '1',\n// 'uuid' => Uuid::generate()->string\n ]);\n\n\n if (isset($admin))\n {\n\n\n //Attach user with admin role\n $admin->attachRole(1);\n\n// $user_repo->attachRolePermissions($admin);\n }\n }\n\n $this->enableForeignKeys(\"users\");\n\n// $this->disableForeignKeys(\"users\");\n// $this->delete('users');\n// \\DB::table('users')->where('id', 1)->delete();\n// $userRepo = new \\App\\Repositories\\Access\\UserRepository();\n// $user = $userRepo->query()->updateOrCreate([\n// //'id' => '1',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('TBSOASadmin'),\n// 'confirmed' => '1',\n// ]);\n// $this->enableForeignKeys(\"users\");\n//\n// $this->disableForeignKeys('staffs');\n// $staff = new \\App\\Repositories\\Staff\\StaffRepository();\n// $staff->query()->updateOrCreate([\n// 'user_id' => $user->id,\n// 'staff_identity' => 'Tbs-001',\n// 'firstname' => 'Admin',\n// 'lastname' => 'TBS',\n// 'email' => '[email protected]',\n// 'created_by' => '0',\n// 'designation_id' => 6,\n// 'unit_id' => 2,\n// 'port_id' => 1,\n// ]);\n// $this->enableForeignKeys(\"staffs\");\n//\n// $this->disableForeignKeys('role_user');\n// \\DB::table('role_user')->where('user_id', $user->id)->delete();\n//\n//\n// \\DB::table('role_user')->insert(array (\n// 0 =>\n// array(\n// 'id' => '1',\n// 'user_id' => $user->id,\n// 'role_id' => '1'\n// )\n// ));\n// $this->enableForeignKeys(\"role_user\");\n\n }", "title": "" }, { "docid": "28b5b3cca8c21d1da6830af7444431e2", "score": "0.4825397", "text": "protected static function booted()\n {\n static::observe(CompanyObserver::class);\n\n static::addGlobalScope(new CompanyScope);\n }", "title": "" }, { "docid": "a54f155fd495bdc4e16bce0d1a02e3ef", "score": "0.48211694", "text": "function install() {\n $TablesRepository = new TablesRepository();\n $TablesRepository->createProductTable();\n $TablesRepository->createProfitTable();\n $TablesRepository->createTemporaryHardwareMaterialsTable();\n $TablesRepository->createTemporaryHardwarePricesTable();\n $TablesRepository->createTemporarySoftwareTable();\n $TablesRepository->createFtpConfigTable();\n $TablesRepository->createOrdersTable();\n $TablesRepository->createOrderItemsTable();\n $TablesRepository->createOrdersHardwareTable();\n $TablesRepository->alterWpPostsTable();\n\n }", "title": "" }, { "docid": "48a80f346fbec789c080c73857c0496f", "score": "0.48169333", "text": "public function bootstrap(): void;", "title": "" }, { "docid": "c37c1710ce53f844b4724331361ed571", "score": "0.4813277", "text": "public function install()\n {\n ORM::createTable($this->getConfigTable());\n $query = \"SELECT id FROM config where name='url' AND module = 'Core'\";\n $id = DB::getCell($query);\n if(empty($id)) {\n $query = \"insert into config (module, name, value) values ('Core', 'url', '')\";\n DB::query($query);\n }\n }", "title": "" }, { "docid": "c6ba27527ccb4c21976d138d80932eb2", "score": "0.481288", "text": "public function run()\n {\n factory(App\\ProjectStatus::class)->create(\n [\n 'name' => 'Active',\n ]\n );\n\n factory(App\\ProjectStatus::class)->create(\n [\n 'name' => 'Pending',\n ]\n );\n\n factory(App\\ProjectStatus::class)->create(\n [\n 'name' => 'Finished',\n ]\n );\n\n factory(App\\ProjectStatus::class)->create(\n [\n 'name' => 'Cancelled',\n ]\n );\n }", "title": "" }, { "docid": "44a44ac9a30f3800719d242cd1a13374", "score": "0.48117995", "text": "public function setUp()\n {\n $container = Robo::createDefaultContainer(null, new NullOutput());\n $this->setContainer($container);\n $this->setConfig(Robo::config());\n $this->getConfig()->set('digipolis.root.project', null);\n }", "title": "" }, { "docid": "4e7ec25e6ecd6fc18aefc6f5d8ed1a4d", "score": "0.48115453", "text": "public function run()\n\t{\n\t\tProject::factory(3)\n\t\t->hasAttached(\n\t\t\tUser::inRandomOrder()->limit(5)->get(),\n\t\t)\n\t\t->create();\n\t}", "title": "" }, { "docid": "8268b9282392e12f6440dd873aa5a0f2", "score": "0.4808522", "text": "function start() {\n\t\tif (isset($this->_fixtures) && isset($this->db)) {\n\t\t\tforeach ($this->_fixtures as $fixture) {\n\t\t\t\t$query = $fixture->create();\n\t\t\t\tif (isset($query) && $query !== false) {\n\t\t\t\t\t$this->db->execute($query);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "8263153e0688b15fe9e279cdf6cbf436", "score": "0.48077336", "text": "public function main()\n {\n try {\n $this->_setupDb();\n\n $this->_determineRevisionsAlreadyInDb();\n\n $this->_determineScriptsToBeApplied();\n\n if ($this->_checkall) {\n $this->log(\n 'Applying all scripts regardless of delta number order.'\n );\n }\n\n $this->deploy();\n\n } catch (Exception $e) {\n throw new BuildException($e);\n }\n\n }", "title": "" }, { "docid": "ebf35b59258737d126cbdd10137a2551", "score": "0.48073885", "text": "public static function install(){\n \t\t\n \t\t$dbh = new CandyDB();\n \t\t$dbh->exec(\"INSERT INTO \". DB_PREFIX .\"options (option_key, option_value) VALUES ('twitteraccount', 'steve228uk')\");\n \t\t$dbh->exec(\"INSERT INTO \". DB_PREFIX .\"options (option_key, option_value) VALUES ('tweetnumber', '3')\");\n \t\t\n \t}", "title": "" }, { "docid": "007ea78ca73e6a28fa8af7f1a625f8b4", "score": "0.48021907", "text": "public function setup()\n\t{\n\t\t$environment = $this->ci->session->userdata('environment');\n\n\t\t/*\n\t\t\t1. Save our database configuration\n\t\t*/\n\t\t$hostname\t= $this->ci->session->userdata('hostname');\n\t\t$db_user\t= $this->ci->session->userdata('username');\n\t\t$db_pass\t= $this->ci->session->userdata('password');\n\t\t$database\t= $this->ci->session->userdata('database');\n\t\t$driver\t\t= $this->ci->session->userdata('driver');\n\t\t$prefix\t\t= $this->ci->session->userdata('db_prefix');\n\t\t$port\t\t= $this->ci->session->userdata('port');\n\n\t\t$db_debug\t= $environment == 'production' ? FALSE : TRUE;\n\n\t\t$this->ci->load->helper('config_file');\n\n\t\t$db_data = array(\n\t\t\t'hostname'\t=> $hostname,\n\t\t\t'port'\t\t=> $port,\n\t\t\t'username'\t=> $db_user,\n\t\t\t'password'\t=> $db_pass,\n\t\t\t'database'\t=> $database,\n\t\t\t'dbdriver'\t=> $driver,\n\t\t\t'dbprefix'\t=> $prefix,\n\t\t\t'db_debug'\t=> $db_debug\n\t\t);\n\n\t\t// Write main database config file.\n\t\tif (write_db_config( array('main' => $db_data), $this->APPPATH ) === false)\n\t\t{\n\t\t\t$str = lang('in_db_config_error');\n\t\t\treturn str_replace('{file}', 'config/database.php', $str);\n\t\t}\n\n\t\t// Write environment database config file.\n\t\tif (copy($this->APPPATH . '/config/database.php', $this->APPPATH . \"/config/\" . $environment .\"/database.php\") === false)\n\t\t{\n\t\t\t$str = lang('in_db_config_error');\n\t\t\treturn str_replace('{file}', \"config/$environment/database.php\", $str);\n\t\t}\n\n\n\t\t/*\n\t\t\t2. Install default info into our database.\n\n\t\t\tThis happens by running the app, core and module-specific migrations.\n\t\t*/\n\n\t\t// use the entered Database settings to connect before calling the Migrations\n\t\t$this->ci->load->database($db_data);\n\n\t\t//\n\t\t// Now install the database tables.\n\t\t//\n\t\t$this->ci->load->library('Migrations', array('migrations_path' => $this->BFPATH .'migrations'));\n\n\t\tif (!$this->ci->migrations->install())\n\t\t{\n\t\t\treturn $this->ci->migrations->error;\n\t\t}\n\n\t\t/*\n\t\t\tSave the information to the settings table\n\t\t*/\n\n\t\t$settings = array(\n\t\t\t'site.title'\t=> $this->ci->session->userdata('site_title'),\n\t\t\t'site.system_email'\t=> $this->ci->session->userdata('user_email'),\n\t\t\t'updates.do_check' => $this->curl_update,\n\t\t\t'updates.bleeding_edge' => $this->curl_update\n\t\t);\n\n\t\tforeach\t($settings as $key => $value)\n\t\t{\n\t\t\t$setting_rec = array('name' => $key, 'module' => 'core', 'value' => $value);\n\n\t\t\t$this->ci->db->where('name', $key);\n\t\t\tif ($this->ci->db->update('settings', $setting_rec) == false)\n\t\t\t{\n\t\t\t\treturn lang('in_db_settings_error');\n\t\t\t}\n\t\t}\n\n\t\t// update the emailer sender_email\n\t\t$setting_rec = array('name' => 'sender_email', 'module' => 'email', 'value' => $this->ci->session->userdata('user_email'));\n\n\t\t$this->ci->db->where('name', 'sender_email');\n\t\tif ($this->ci->db->update('settings', $setting_rec) == false)\n\t\t{\n\t\t\treturn lang('in_db_settings_error');\n\t\t}\n\n\t\t//\n\t\t// Install the user in the users table so they can actually login.\n\t\t//\n\t\t$data = array(\n\t\t\t'role_id'\t=> 1,\n\t\t\t'email'\t\t=> $this->ci->session->userdata('user_email'),\n\t\t\t'username'\t=> $this->ci->session->userdata('user_username'),\n\t\t\t'active' => 1,\n\t\t);\n\n\t\t// As of 0.7, we've switched to using phpass for password encryption...\n\t\trequire ($this->BFPATH .'modules/users/libraries/PasswordHash.php' );\n\n\t\t$iterations\t= $this->ci->config->item('password_iterations');\n\t\t$hasher = new PasswordHash($iterations, false);\n\n\t\t$password = $hasher->HashPassword($this->ci->session->userdata('user_password'));\n\n\t\t$data['password_hash'] = $password;\n\t\t$data['password_iterations'] = $iterations;\n\t\t$data['created_on'] = date('Y-m-d H:i:s');\n\t\t$data['display_name'] = $data['username'];\n\n\t\tif ($this->ci->db->insert('users', $data) == false)\n\t\t{\n\t\t\t$this->errors = lang('in_db_account_error');\n\t\t\treturn false;\n\t\t}\n\n\t\t// Create a unique encryption key\n\t\t$this->ci->load->helper('string');\n\t\t$key = random_string('unique', 40);\n\n\t\t$config_array = array('encryption_key' => $key);\n\n\t\twrite_config('config', $config_array, '', $this->APPPATH);\n\n\t\t/*\n\t\t\tRun custom migrations last. In particular this comes after\n\t\t\tthe core migrations, and after we've populated the user table.\n\t\t */\n\n\t\t// get the list of custom modules in the main application\n\t\t$module_list = $this->get_module_versions();\n\n\t\tif (is_array($module_list) && count($module_list))\n\t\t{\n\t\t\tforeach($module_list as $module_name => $module_detail)\n\t\t\t{\n\t\t\t\t// install the migrations for the custom modules\n\t\t\t\tif (!$this->ci->migrations->install($module_name.'_'))\n\t\t\t\t{\n\t\t\t\t\treturn $this->ci->migrations->error;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Write a file to /public/install/installed.txt as a simpler\n\t\t// check whether it's installed, so developing doesn't require\n\t\t// us to remove the install folder.\n\t\t$filename = FCPATH .'installed.txt';\n\n\t\t$msg = 'Installed On: '. date('r') .\"\\n\";\n\t\t$this->ci->load->helper('file');\n\t\twrite_file($filename, $msg);\n\n\t\t// We made it to the end, so we're good to go!\n\t\treturn true;\n\t}", "title": "" }, { "docid": "0daddd8a7500a92bf6013d223395a268", "score": "0.4799435", "text": "public function setup() {}", "title": "" }, { "docid": "713758681b88dd6d5f926520137c1b6a", "score": "0.4793792", "text": "public function run()\n {\n if ($this->settings->withLgtmConfiguration()) {\n $this->filesystem->copy(\n __DIR__ . '/../stubs/MAINTAINERS.stub',\n $this->settings->getProjectLower() . '/' . 'MAINTAINERS'\n );\n\n $this->filesystem->copy(\n __DIR__ . '/../stubs/lgtm.stub',\n $this->settings->getProjectLower() . '/' . '.lgtm'\n );\n\n $this->gitAttributes->addExportIgnore('MAINTAINERS');\n $this->gitAttributes->addExportIgnore('.lgtm');\n }\n }", "title": "" }, { "docid": "aff9c33da88d1aea1866b042930cb19c", "score": "0.47915182", "text": "static function bootstrap()\n {\n if ( is_file( 'pake ' ) )\n {\n echo \"Error: could not create 'pake' directory to install the extension because a file named 'pake' exists\";\n exit( -1 );\n }\n\n if ( is_dir( 'pake') )\n {\n /// @todo test: if dir is not empty, ask for confirmation,\n /// least we overwrite something\n }\n\n if ( !is_dir( 'pake' ) && !mkdir( 'pake' ) )\n {\n echo \"Error: could not create 'pake' directory to install the extension\";\n exit( -1 );\n }\n\n // download components\n /// @todo use a recursive fget, so that we do not need to download a zip\n $src = self::$installurl.'/pake/ezextensionbuilder_pakedir.zip';\n $zipfile = tempnam( \"tmp\", \"zip\" );\n if ( !file_put_contents( $zipfile, file_get_contents( $src ) ) )\n {\n echo \"Error: could not download source file $src\";\n exit -1;\n }\n\n // unzip them\n $zip = new ZipArchive;\n if ( $zip->open( $zipfile ) !== true )\n {\n echo \"Error: downloaded source file $src is not a valid zip file\";\n exit -1;\n }\n if ( !$zip->extractTo( 'pake' ) )\n {\n echo \"Error: could not decompress source file $zipfile\";\n $zip->close();\n exit -1;\n }\n $zip->close();\n unlink( $zipfile );\n }", "title": "" }, { "docid": "b9aa6c7e1511bd05efc7c93ce6ed5f99", "score": "0.4790622", "text": "public function install() {\n \n }", "title": "" }, { "docid": "8c7d4082ced782a321a80694b74d42d4", "score": "0.47899753", "text": "public function setup() {\n \\RightNow\\Libraries\\AbuseDetection::check();\n $objectTypes = $this->input->get('object_types');\n if ($objectTypes && in_array('user', explode(',', $objectTypes))) {\n echo PHP_EOL . \" ========================= Creating social users - Start ========================= \" . PHP_EOL;\n $this->createSocialUsers();\n echo PHP_EOL . \" ========================= Creating social users - End ========================= \" . PHP_EOL;\n if ($objectTypes && in_array('question', explode(',', $objectTypes))) {\n echo PHP_EOL . \" ========================= Creating social questions - Start ========================= \" . PHP_EOL;\n $this->createSocialQuestions();\n echo PHP_EOL . \" ========================= Creating social questions - End ========================= \" . PHP_EOL;\n if ($objectTypes && in_array('comment', explode(',', $objectTypes))) {\n echo PHP_EOL . \" ========================= Creating social comments - Start ========================= \" . PHP_EOL;\n $this->createSocialComments();\n echo PHP_EOL . \" ========================= Creating social comments - End ========================= \" . PHP_EOL;\n }\n }\n }\n }", "title": "" }, { "docid": "31dcceabc0ed60d0ae440491807e9043", "score": "0.47898167", "text": "protected static function boot()\n {\n parent::boot();\n\n //Adding this makes queries conform to the EnabledScope, i.e Only enabled items are returned.\n static::addGlobalScope(new EnabledScope());\n }", "title": "" }, { "docid": "89a48c19b44581719dbe777cab061d50", "score": "0.4788067", "text": "function install () {\r\n\r\n }", "title": "" }, { "docid": "3b94712da49e47d3650cad84c677d96a", "score": "0.47865397", "text": "public function install();", "title": "" }, { "docid": "3b94712da49e47d3650cad84c677d96a", "score": "0.47865397", "text": "public function install();", "title": "" }, { "docid": "3b94712da49e47d3650cad84c677d96a", "score": "0.47865397", "text": "public function install();", "title": "" }, { "docid": "3b94712da49e47d3650cad84c677d96a", "score": "0.47865397", "text": "public function install();", "title": "" }, { "docid": "3d41ef7b8087aa62ee08c2f208b25e63", "score": "0.4785229", "text": "protected function booting()\n {\n //\n }", "title": "" }, { "docid": "77ef33a646b6d9f01dc938520ec5a207", "score": "0.47760168", "text": "protected static function booting()\n {\n //\n }", "title": "" }, { "docid": "c629f044a34eae1368dc6b75775548c2", "score": "0.47743174", "text": "public function onLeafcutterConstructed()\n {\n foreach (Addons::addons() as $class) {\n $this->leafcutter->logger()->debug(\"AddonProvider: Addon registered from Composer: $class\");\n $this->register($class);\n }\n // register any addons from config\n foreach ($this->leafcutter->config('addons.register') ?? [] as $class) {\n $this->leafcutter->logger()->debug(\"AddonProvider: Addon registered from config: $class\");\n $this->register($class);\n }\n // load addons from config\n foreach ($this->leafcutter->config('addons.activate') ?? [] as $name) {\n $this->leafcutter->logger()->debug(\"AddonProvider: Addon loaded from config: $name\");\n $this->activate($name);\n }\n }", "title": "" }, { "docid": "15b4e2ab8373aa90b6207575c0cc0bcc", "score": "0.47727764", "text": "public function run()\n {\n PostStatus::firstOrCreate(['status' => PostStatus::STATUS_PUBLISHED]);\n PostStatus::firstOrCreate(['status' => PostStatus::STATUS_UNPUBLISHED]);\n PostStatus::firstOrCreate(['status' => PostStatus::STATUS_DRAFT]);\n }", "title": "" }, { "docid": "6293c04f1c49a7b651a5de438ef0b7be", "score": "0.4771507", "text": "abstract public function install(): void;", "title": "" }, { "docid": "272d36796030692db3d1e8c28795a383", "score": "0.4770776", "text": "public function run()\n {\n $faker = Faker::create();\n\n $type = new InstallationStatus();\n $type->owner_clients_id = 1;\n $type->status = 'Rechazado';\n $type->colour = $faker->hexcolor();\n $type->dark = $faker->boolean();\n $type->save();\n\n $type = new InstallationStatus();\n $type->owner_clients_id = 1;\n $type->status = 'Por Asignar';\n $type->colour = $faker->hexcolor();\n $type->dark = $faker->boolean();\n $type->save();\n\n $type = new InstallationStatus();\n $type->owner_clients_id = 1;\n $type->status = 'En Espera De Aceptacion';\n $type->colour = $faker->hexcolor();\n $type->dark = $faker->boolean();\n $type->save();\n\n $type = new InstallationStatus();\n $type->owner_clients_id = 1;\n $type->status = 'Asignado';\n $type->colour = $faker->hexcolor();\n $type->dark = $faker->boolean();\n $type->save();\n\n $type = new InstallationStatus();\n $type->owner_clients_id = 1;\n $type->status = 'Confirmado';\n $type->colour = $faker->hexcolor();\n $type->dark = $faker->boolean();\n $type->save();\n\n $type = new InstallationStatus();\n $type->owner_clients_id = 1;\n $type->status = 'Re-Asignado';\n $type->colour = $faker->hexcolor();\n $type->dark = $faker->boolean();\n $type->save();\n\n $type = new InstallationStatus();\n $type->owner_clients_id = 1;\n $type->status = 'Finalizado';\n $type->colour = $faker->hexcolor();\n $type->dark = $faker->boolean();\n $type->save();\n }", "title": "" }, { "docid": "b6d71ebace08058762c91afecbe301bd", "score": "0.47699195", "text": "public function boot()\n {\n $repositoryConfig = realpath(basePath().'/config/repository.php');\n $this->mergeConfigFrom($repositoryConfig,'repository');\n }", "title": "" } ]
c1f60a87bad48a6e4222fa9f1ffa2c27
Metodo que calcula la fecha en base a la quincena
[ { "docid": "8961c635cde969cd26321f0aa11cb554", "score": "0.0", "text": "private function calcular_quincenas($fecha) {\n $fecha_ingreso = explode('-', $fecha);\n $anio = $fecha_ingreso[0];\n $mes = $fecha_ingreso[1];\n if($fecha_ingreso[2] <= 15) {\n $dia = '15';\n } else {\n $dia = cal_days_in_month(CAL_GREGORIAN, $mes, $anio);\n }\n return array($anio, $mes, $dia);\n }", "title": "" } ]
[ { "docid": "0ae11d9a7d7f5275551a66cbee366559", "score": "0.72464925", "text": "public function get_fecha_actual_amd(){\n\t\t//GUARDAR EN LA BASE DE DATOS EN ESTE CASO LA TABLA detalle_correspondencia \n\t\t//CAMPO fecha QUE ES DATETIME \n\t\tdate_default_timezone_set('America/Bogota'); \n\t\t$fecharegistro=date('Y-m-d'); //FORMA PARA XP\n\t\t//$fecharegistro = date('Y-m-d g:i'); \n\t\t\n\t\treturn $fecharegistro; \n\t\t\n\t\n\t}", "title": "" }, { "docid": "ef9c896866f52024d1b1ab6cf9bc9442", "score": "0.70725346", "text": "public function get_fecha_actual(){\n\t\n\t\n\t\t//FORMA WIN 7 Y 8, YA QUE DE LA FORMA ANTERIOR TOMA EL AM O PM Y DA CONFLICTOS PARA \n\t\t//GUARDAR EN LA BASE DE DATOS EN ESTE CASO LA TABLA detalle_correspondencia \n\t\t//CAMPO fecha QUE ES DATETIME \n\t\tdate_default_timezone_set('America/Bogota'); \n\t\t$fecharegistro=date('Y-m-d g:ia'); //FORMA PARA XP\n\t\t//$fecharegistro = date('Y-m-d g:i'); \n\t\t\n\t\treturn $fecharegistro; \n\t\t\n\t\n\t}", "title": "" }, { "docid": "97bde65de7dd220a7b82e9aa0eaf5a05", "score": "0.685994", "text": "function obtener_fecha(){\n return date (\"d/m/y\");/* calcula la fecha actual en dicho formato; \n despues del return no se ejecutara nada y solo retorna el resultado*/\n}", "title": "" }, { "docid": "c1606fc9c569c18bb294cf5c73e449f0", "score": "0.68434507", "text": "function la_date($give){\n $today = microtime(true);\n $micro = sprintf(\"%06d\",($today - floor($today)) * 1000000);\n $dates = new DateTime(date('Y-m-d'.$micro,$today));\n#scinder la date.\n $today_sep= explode('/', $dates);\n#identifier la table avec le jour et le mois.\n $le_jour = $today_sep[0];\n $le_mois = $today_sep[1];\n $l_annee = $today_sep[2];\n $le_mois = array ('1' => 'JANVIER','2' => 'FEVRIER','3' => 'MARS','4' => 'AVRIL','5' => 'MAI','6' => 'JUIN','7' => 'JUILLET','8' => 'AOUT','9' => 'SEPTEMBRE','10' => 'OCTOBRE','11' => 'NOVEMBRE','12' => 'DECEMBRE');\n\n#verifier que le nombre de seconde entré est arrondi à un int.\n $count_days = round($give/60/60/24);\n#trouver le nouveau jour.\n $day_of_event = $le_jour - $count_days;\n#donner la date reelle.\n $le_jour = $day_of_event;\n echo \"L'évènement a eu lieu le \" . $le_jour . \" \". $le_mois . \" \" . $le_mois ;\n}", "title": "" }, { "docid": "751a6b5f5766e57e1d4c248c2392e9ea", "score": "0.66111827", "text": "public function getFechaRecarga()\n {\n //to-do\n }", "title": "" }, { "docid": "b064122b6c9215f79de8e3fe24cf5066", "score": "0.66009915", "text": "public function FechaHijo()\n {\n $tiempo = parent::Fecha(1994)+25;\n echo \"Hijo: Tu edad sera: \" . $tiempo . \"<br>\";\n }", "title": "" }, { "docid": "bfd964bbdce1f4be5b94a086c83de711", "score": "0.6594205", "text": "function obtener_fecha(){\n date_default_timezone_set(\"America/Costa_Rica\"); \n $fecha = Date(\"d-m-Y\");\n $hora = Date(\" h:i a\");\n $fe = $fecha.$hora;\n return $fe;\n }", "title": "" }, { "docid": "5ab48120ef8b11120545775723d5dd66", "score": "0.6572867", "text": "function crea_fecha($vigencia,$mes)\n {\n $cur_dia_mes=mssql_query(\"select day(dateadd(d,-1,dateadd(m,1,convert(datetime, '\".$vigencia.\"' + '\".$mes.\"' + '01')))) AS ultimo_dia\");\n if($datos_dia_mes=mssql_fetch_array($cur_dia_mes))\n {\n $ultimo_dia=$datos_dia_mes[\"ultimo_dia\"];\n }\n return($ultimo_dia);\n \n }", "title": "" }, { "docid": "faabeeffa51f36dc04fc0c3d15e1cc6f", "score": "0.65698063", "text": "function retornar_fecha()\r\n\t{\r\n\t\t//$fecha=\"2016-01-01\";\r\n\t\t//$fecha=\"la fecha actual es \" . date(\"d\") . \" del \" . date(\"m\") . \" de \" . date(\"Y\");\r\n\t\t$fecha=date('Y-m-d');\r\n\t\treturn $fecha;\t\t\r\n\t}", "title": "" }, { "docid": "feb63d0be633df2297535040b880857e", "score": "0.65318537", "text": "public function buscarTicketxFecha(){\n \n }", "title": "" }, { "docid": "2646b469a845c789a714611683bc9afd", "score": "0.6519663", "text": "public function getFechaDetail()\n {\n \t$conversiones = $this->getDI()->getConversiones();\n \t// La función substr me recorta la variable o campo ingresado, en este caso obtiene los primeros 10 dígitos\n \tif(substr($this->fechahora, 0, 10) == date(\"Y-m-d\")){\n \t\treturn \"Hoy\";\n \t}\n \treturn $conversiones->fecha(4, $this->fechahora);\n \t\n }", "title": "" }, { "docid": "9d2b3a8f06abb5c2b5cc6dc9902e7879", "score": "0.6467451", "text": "function calcDates($id_estancia, $dateIni, $dateFin, $cursoActual)\r\n{\r\n\t//$dateI = new date($dateIni);\r\n\tfunction calcFechaFinal($porcentaje, $dateI, $dateF){\r\n\t\t//var_dump($dateI);\r\n\t\t$dataFTS = strtotime($dateF); \r\n\t\t$dataITS = strtotime($dateI);\r\n\t\t$restafechas = $dataFTS - $dataITS;\r\n\t\t//print_r($restafechas);\r\n\t\tif($porcentaje != '100'){\r\n\t\t\t$fecha = $restafechas*($porcentaje/100) + $dataITS;\r\n\t\t//print_r($fecha);\r\n\t\t\treturn date('Y-m-d',$fecha); \r\n\t\t}\r\n\t\telse{\r\n\r\n\t\t\t$fecha = $dateF;\r\n\t\t\treturn $fecha;\r\n\t\t}\r\n\t\t//print_r($fecha);\r\n\t\t//return $dateI;\r\n\t\t\r\n\t}\r\n\t\r\n\t$conexion = conBD(); \r\n\t//SACAR TIMESTAMP\r\n\t//$consulta = \"SELECT UNIX_TIMESTAMP(fecha_inicio) as fecha_ini, UNIX_TIMESTAMP(fecha_fin) as fecha_fin FROM estancia\";\r\n\t//$consulta = \"SELECT fecha_inicio as fecha_ini, UNIX_TIMESTAMP(fecha_fin) as fecha_fin FROM estancia\";\r\n\t//PORCENTAJES\r\n\r\n\t$curso_prueba = $cursoActual;\r\n\t\r\n\t//$curso_prueba = \"'\" . '%' . '2019/20' . '%' . \"'\";\r\n\tprint_r(\"ES CURSO: \" . $curso_prueba);\r\n\t//print_r($curso_prueba);\r\n\t$pasosToInsert = getEtapas($curso_prueba);\r\n\t$pasos = getPasos($cursoActual);\r\n\t//print_r($pasos);\r\n\t$id_estancia = getIdEstancia(NULL);\r\n\t//foreach($pasosToInsert as $etapa){\r\n\t\t//$done = false; \r\n\t\tforeach($pasos as $paso){\r\n\r\n\t\t//CALCULAR FECHA FINAL\r\n\t\t\t//print_r($paso['porcentaje']);\r\n\t\t\t$fecha = calcFechafinal($paso['porcentaje'], $dateIni, $dateFin);\r\n\t\t\t$fechaToInsert = '\\'' . $fecha . '\\'';\r\n\t\t\t//print_r($fecha);\r\n\t\t\t//print_r(\"FECHA TO INSERT\");\r\n\t\t\t$id_paso = $paso['id_paso'];\r\n\t\t\t//for($i = 0; $i < $etapa['pasos']; $i++){\r\n\r\n\t\t\t\t//$porcentaje = $pasos[]\r\n\t\t\t\t//$fecha = calcFechafinal(,$dateIni, $dateFin);\r\n\t\t\t\t$consulta = \"INSERT INTO seguimiento_pasos(id_paso,fecha_final, id_estancia) values($id_paso,$fechaToInsert,$id_estancia)\";\r\n\t\t\t\t$conexion->set_charset('utf8');\r\n\t\t\t\t$resultado = mysqli_query( $conexion, $consulta ) or die ( \"Algo ha ido mal en la consulta a la base de datos - calcDates\");\t\r\n\t\t//calcFechafinal(,$dateIni, $dateFin);\r\n\t\t\t\t//break;\r\n\t\t}\r\n\t\t//$done = true; \r\n\t//}//\r\n\t\r\n\t//print_r($date['porcentaje'] . $date['pasos']);\r\n\t\t//$consulta = \"INSERT INTO pasos FROM etapas WHERE curso_etapa like $curso_prueba\";\r\n\t\t//INSERT INTO seguimiento_pasos`(`id_paso`, `finalizado`, `fecha_final`, `fecha_real`, `id_estancia`, `id`, `fecha_pas1`, `fecha_pas2`, `fecha_pas3`) VALUES ([value-1],[value-2],[value-3],[value-4],[value-5],[value-6],[value-7],[value-8],[value-9])\r\n\t/*$restaFechas = $data['fecha_fin'] - $data['fecha_ini'];\r\n\t//5%\r\n\t//$restaFechas*(5/100)) + $data['fecha_ini']);\r\n\t//30%\r\n\t//print_r(($restaFechas*(30/100)) + $data['fecha_ini']);\r\n\t//50%\r\n\t//print_r(($restaFechas*(50/100)) + $data['fecha_ini']);\r\n\t//60%\r\n\t//print_r(($restaFechas*(60/100)) + $data['fecha_ini']);\r\n\t//90%\r\n\tprint_r(($restaFechas*(90/100)) + $data['fecha_ini']);\r\n\t//100%\r\n\tprint_r($data['fecha_fin']);\r\n\t//return($data['']);\r\n\t//return mysqli_fetch_assoc($resultado);\t*/\r\n}", "title": "" }, { "docid": "60c3ba2df2aab5ffd9a4cef16cc85fbc", "score": "0.64385206", "text": "function cursoActual(){\r\n\r\n\t\t$fecha = getdate();\r\n\t\t$mes = $fecha['mon'];\r\n\t\t$dia = $fecha['mday'];\r\n\t\t$year = $fecha['year'];\r\n\t\tswitch ($mes) {\r\n\t\t\tcase '9':\r\n\t\t\t\t$curso = $curso = $year . '/' . ($year + 1);\r\n\t\t\t\tif($dia <= 8){\r\n\r\n\t\t\t\t\t$curso = ($year - 1) . '/' . $year;\r\n\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tif($mes < 9){\r\n\r\n\t\t\t\t\t$curso = ($year - 1) . '/' . $year;\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\r\n\r\n\t\t\t\t\t$curso = $year . '/' . ($year + 1);\r\n\t\t\t\t}\r\n\t\t\t\t\t\t# code...\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\treturn $curso;\r\n\t}", "title": "" }, { "docid": "6792b44a4022dd1a01cca6eea00f6446", "score": "0.6430581", "text": "public function FechaActual(){\n date_default_timezone_set('America/El_Salvador'); \n $date = date('Y-m-d H:i:s');\n return $date;\n }", "title": "" }, { "docid": "e835fc7bd53a57d157727bbb7db9f61a", "score": "0.64010185", "text": "function get_fecha(){\r\n\t\tdate_default_timezone_set(\"America/Bogota\");\r\n\t\t$this->fecha=date(\"Y:m:d\");\r\n\t\treturn $this->fecha;\r\n\r\n\t\t \r\n\t\t \r\n\t}", "title": "" }, { "docid": "7096186c3527e16c773701415dde166d", "score": "0.6388658", "text": "public function get_hora_actual(){\n\t\t//GUARDAR EN LA BASE DE DATOS EN ESTE CASO LA TABLA detalle_correspondencia \n\t\t//CAMPO fecha QUE ES DATETIME \n\t\tdate_default_timezone_set('America/Bogota'); \n\t\t$hora_actual = date('H:i:s'); //FORMA PARA XP\n\t\t//$fecharegistro = date('Y-m-d g:i'); \n\t\t\n\t\treturn $hora_actual; \n\t\t\n\t\n\t}", "title": "" }, { "docid": "425329f082cba89c6741dd4d36ccbf8b", "score": "0.63609594", "text": "function calcFechaFinal($porcentaje, $dateI, $dateF){\r\n\t\t//var_dump($dateI);\r\n\t\t$dataFTS = strtotime($dateF); \r\n\t\t$dataITS = strtotime($dateI);\r\n\t\t$restafechas = $dataFTS - $dataITS;\r\n\t\t//print_r($restafechas);\r\n\t\tif($porcentaje != '100'){\r\n\t\t\t$fecha = $restafechas*($porcentaje/100) + $dataITS;\r\n\t\t//print_r($fecha);\r\n\t\t\treturn date('Y-m-d',$fecha); \r\n\t\t}\r\n\t\telse{\r\n\r\n\t\t\t$fecha = $dateF;\r\n\t\t\treturn $fecha;\r\n\t\t}\r\n\t\t//print_r($fecha);\r\n\t\t//return $dateI;\r\n\t\t\r\n\t}", "title": "" }, { "docid": "c178b7d0f3a21c62b5dd6d962b1da40d", "score": "0.6342015", "text": "public function getDate();", "title": "" }, { "docid": "c178b7d0f3a21c62b5dd6d962b1da40d", "score": "0.6342015", "text": "public function getDate();", "title": "" }, { "docid": "d028e25df3524360ce4c03b51c3c3c25", "score": "0.6327298", "text": "function fecha_suma($fec,$anyos,$meses,$dias,$horas,$minutos,$segundos){\n\t$fecha = new DateTime($fec);\n\t$cambios = 'P';\n\tif($anyos != ''){\n\t\t$cambios .= $anyos.'Y';\n\t}\n\tif($meses != ''){\n\t\t$cambios .= $meses.'M';\n\t}\n\tif($dias != ''){\n\t\t$cambios .= $dias.'D';\n\t}\n\tif($horas != ''){\n\t\t$cambios .= $horas.'H';\n\t}\n\tif($minutos != ''){\n\t\t$cambios .= $minutos.'M';\n\t}\n\tif($segundos != ''){\n\t\t$cambios .= $segundos.'S';\n\t}\n\t$fecha->add(new DateInterval((string)$cambios));\n\treturn $fecha->format('Y-m-d H:i:s');\n}", "title": "" }, { "docid": "ba1e5bed9dbb8ff3a816880662438c6e", "score": "0.63086176", "text": "public function getFechaInicio()\n {\n // Se establece date por si choca con alguna validación\n setlocale(LC_TIME,\"es_MX\",\"esp\");\n $dateInicio= strtotime($this->cur_fechainicio);\n\n if(strftime(\"%Y\", $dateInicio) == (string)date('Y'))\n $fecha = strftime(\"%e de %B\", $dateInicio);\n else\n $fecha = strftime(\"%e de %B de %Y\", $dateInicio);\n\n return $fecha;\n }", "title": "" }, { "docid": "21e214e649f7a39d67e71bcce63beca4", "score": "0.6262902", "text": "public static function ahoraLarga(){\n \t\t$obj=new DateTime();\n \t\treturn FechaUtils::dateTimeACadena($obj);\n \t}", "title": "" }, { "docid": "63bef10a7e9f9dd3c29551faaec76761", "score": "0.6260829", "text": "function getSemanaFechasMySQL($fechaActual){\r\n\r\n$v_fecha=getdate(strtotime($fechaActual));\r\n$NumeroDiaActual=$v_fecha[\"wday\"];\r\n\r\n//calculo la cantidad de dias hasta el lunes pasado\r\n$dif=getLastMonDif($NumeroDiaActual);\r\n$fechaLunesPasado=suma_fechas($fechaActual,$dif);\r\n//echo \"Desde: \".$fechaLunesPasado.\"<br>\";\r\n\r\n//pido la fecha del proximo domingo\r\n$fechaProxDomingo=getNextDayDate($fechaActual,1,\"1\");\r\n//echo \"Hasta: \".$fechaProxDomingo.\"<br>\";\r\n\r\n$v_fechas=getRangoFechasMySQL($fechaLunesPasado.\" 00:00:00\", $fechaProxDomingo.\" 00:00:00\");\r\n\r\nreturn $v_fechas;\r\n\r\n\r\n}", "title": "" }, { "docid": "1c1cf9f923c357eabf1cab2169f009df", "score": "0.622855", "text": "function dia_habil_anterior($fecha){\r\n$fecha_aux=$fecha;\r\n$feriado=0;\r\n$dia_anterior=0;\r\n\r\nwhile(!$dia_anterior) {\r\n $fecha_total=split(\"/\",$fecha_aux);\r\n $dfecha=date(\"d/m/Y\",mktime(0,0,0,$fecha_total[1],$fecha_total[0]-1,$fecha_total[2]));\r\n $fecha_aux=date(\"d/m/Y/w\",mktime(0,0,0,$fecha_total[1],$fecha_total[0]-1,$fecha_total[2]));\r\n $fecha_test=split(\"/\",$fecha_aux);\r\n if($fecha_test[3]!=0 && !feriado($dfecha))\r\n $dia_anterior=1;\r\n}\r\n\r\n$fecha_retornar=split(\"/\",$fecha_aux);\r\n$a=date(\"d/m/Y\",mktime(0,0,0,$fecha_retornar[1],$fecha_retornar[0],$fecha_retornar[2]));\r\n\r\nreturn $a;\r\n\r\n}", "title": "" }, { "docid": "aa8d2c1fb55a1b7e9b4d8d9723140f82", "score": "0.6225995", "text": "function anos_servicio($f_ingreso,$f_actual)\r\n{\r\n$fecha_fin=explode(\"-\",$f_actual);\r\n$dia=$fecha_fin[2];\r\n$mes=$fecha_fin[1];\r\n$ano=$fecha_fin[0];\r\n//fecha de nacimiento\r\n$fecha=explode(\"/\", $f_ingreso);\r\n$dia_ingreso=$fecha[0];\r\n$mes_ingreso=$fecha[1];\r\n$ano_ingreso=$fecha[2];\r\n//si el mes es el mismo pero el dia inferior aun no ha cumplido años, le quitaremos un año al actual\r\nif (($mes_ingreso == $mes) && ($dia_ingreso > $dia)) {\r\n$ano=($ano-1); }\r\n//si el mes es superior al actual tampoco habra cumplido años, por eso le quitamos un año al actual\r\nif ($mes_ingreso > $mes) {\r\n$ano=($ano-1);}\r\n//ya no habria mas condiciones, ahora simplemente restamos los años y mostramos el resultado como su edad\r\n$anos_servicio=($ano-$ano_ingreso);\r\nreturn($anos_servicio);\r\n}", "title": "" }, { "docid": "d4b3a0bf34b0732c9bb633b09ba5edfb", "score": "0.6185213", "text": "function getDatee($fecha, $avance, $tipo, $habil) {\n $contador = 0;\n if ( $avance < 0 )\n $signo = -1;\n else\n $signo = 1;\n $contador = 0;\n // echo 'ok';\n if ( $tipo == 'hour' ) {\n while ( (24 * $contador) < ($avance * $signo) ) {\n $fecha = date ( 'Y-m-j H:i:s' , strtotime ( (24 * $signo) . \" hours\" , strtotime ($fecha) ));\n if ( ($habil && esFechaHabil($fecha)) || !$habil )\n $contador ++;\n }\n } else if ($tipo == 'day' ) {\n while ( ( $contador ) < ( $avance * $signo ) ) {\n $fecha = date ( 'Y-m-j' , strtotime ( (1 * $signo) . \" day\" , strtotime ($fecha) )) . ' 23:59:59';\n if ( ($habil && esFechaHabil($fecha)) || !$habil )\n $contador ++;\n }\n }\n // echo $fecha . br(2);\n return $fecha;\n}", "title": "" }, { "docid": "155e58ee56ae6c6fa642a5dbb4e5c9f2", "score": "0.61694306", "text": "function afficherDate($lang) {\n$jours[\"AR\"] = array(\"الأحد\",\"الإثنين\",\"الثلاثاء\",\"الأربعاء\",\"الخميس\",\"الجمعة\",\"السبت\");\n$jours[\"FR\"] = array(\"Dimanche\",\"Lundi\",\"Mardi\",\"Mercredi\",\"Jeudi\",\"Vendredi\",\"Samedi\");\n$jours[\"EN\"] = array(\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\");\n\n$months[\"AR\"]=[\"يناير \", \"فبراير\", \"مارس \", \"أبريل\", \"ماي \", \"يونيو\" , \"يوليوز\" , \"غشت \", \"شتنبر\" ,\"أكتوبر\" , \"نونبر\" , \"دجنبر\"];\n\n$months[\"EN\"]= [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"];\n\n$months[\"FR\"]= [\"Janvier\",\"Février\",\"Mars\", \"Avril\",\"Mai\",\"juin\",\"Juillet\",\"Aôut\",\"Septembre\",\"Octobre\",\"Novembre\",\"Décembre\"];\n\n$d = getdate();\n\n$wj = $d[\"wday\"];\n$mj = $d[\"mday\"];\n$m = $d[\"mon\"];\n$y = $d[\"year\"];\n\n$d= $jours[$lang][$wj]. \" \" . $mj . \" \" . $months[$lang][$m-1] . \" \" . $y;\nreturn $d;\n \n}", "title": "" }, { "docid": "496d532d4cc3394e0b7a039da3fdc22b", "score": "0.6128418", "text": "function fecha($separador=\"\",$fecha=\"\"){\n if ($fecha==\"\")\n $hoy=getdate(time()); \n else\n $hoy=getdate(strtotime($fecha));\n \n $dia=$hoy[\"wday\"];\n switch ($dia){\n case 1:\n $dia = \"Lunes\";\n break;\n case 2:\n $dia = \"Martes\";\n break;\n case 3:\n $dia = \"Miércoles\";\n break;\n case 4:\n $dia = \"Jueves\";\n break;\n case 5:\n $dia = \"Viernes\";\n break;\n case 6:\n $dia = \"Sábado\";\n break;\n case 0:\n $dia = \"Domingo\";\n break;\n }\n $mes=$hoy[\"mon\"];\n switch ($mes){\n case 1:\n $mes = \"Enero\";\n break;\n case 2:\n $mes = \"Febrero\";\n break;\n case 3:\n $mes = \"Marzo\";\n break;\n case 4:\n $mes = \"Abril\";\n break;\n case 5:\n $mes = \"Mayo\";\n break;\n case 6:\n $mes = \"Junio\";\n break;\n case 7:\n $mes = \"Julio\";\n break;\n case 8:\n $mes = \"Agosto\";\n break;\n case 9:\n $mes = \"Septiembre\";\n break;\n case 10:\n $mes = \"Octubre\";\n break;\n case 11:\n $mes = \"Noviembre\";\n break;\n case 12:\n $mes = \"Diciembre\";\n break;\n }\n if ($separador ==\"\"){\n $fecha=$hoy[\"mday\"].\" de \".$mes.\" del \".$hoy[\"year\"];\n }else{\n $fecha= $dia.\"$separador \".$hoy[\"mday\"].\" de \".$mes.\" del \".$hoy[\"year\"];\n }\n return $fecha; //Ejm. Lunes, 12 Octubre del 2006\n}", "title": "" }, { "docid": "f2b413eb4d70b81e4ea0729531152549", "score": "0.6123388", "text": "function obtenerPeriodoActual($conexion)\n{\n $anoActual = date('Y');\n $mesActual = date('m');\n\n if ($mesActual > 6) {\n $sentencia = \"select idPeriodo from periodo where AnoInicio=\" . $anoActual;\n } elseif ($mesActual <= 6) {\n $sentencia = \"select idPeriodo from periodo where AnoInicio=\" . ($anoActual - 1);\n }\n\n $conexion->Ejecuto($sentencia);\n $periodo = $conexion->Siguiente();\n return $periodo['idPeriodo'];\n}", "title": "" }, { "docid": "930afdb9de40083d4e373cfd7159614e", "score": "0.6122555", "text": "public function ActualiceDiasCartera(){\t\t\r\n $FechaActual=date(\"Y-m-d\");\r\n //$FechaActual='2016-05-10';\r\n $sql=\"UPDATE `cartera` SET `DiasCartera`= DATEDIFF('$FechaActual', `FechaVencimiento`)\";\r\n $this->Query($sql);\r\n $SumatoriaDias=$this->Sume(\"cartera\", 'DiasCartera', '');\r\n $sql=\"SELECT COUNT(idCartera) as NumRegistros FROM cartera\";\r\n $Consulta=$this->Query($sql);\r\n $DatosCartera=$this->FetchArray($Consulta);\r\n $NumRegistros=$DatosCartera[\"NumRegistros\"];\r\n if($NumRegistros>0){\r\n $Promedio=$SumatoriaDias/$NumRegistros;\r\n }else{\r\n $Promedio=\"\";\r\n }\r\n return($Promedio);\r\n }", "title": "" }, { "docid": "729b2d55450bbf6e1791834a9b3892f7", "score": "0.61206067", "text": "function getFechaNacimiento($id){\r\n\t\t$mysqli = new mysqli(\"127.0.0.1\", \"root\",\"\", \"u569800724_evebd\");\r\n\t\tif ( mysqli_connect_errno() ) {\r\n\t\tdie(\"ERROR: No se estableció la conexión. \". mysqli_connect_error());\r\n\t\t}\r\n \t$acentos = $mysqli->query(\"SET NAMES 'utf8'\");\r\n\t\t$query=\"SELECT fecha_n FROM usuario WHERE id ='$id'\";\r\n\t\t$resultado=$mysqli->query($query) or die($mysqli->error. \" en la línea \".(__LINE__-1));\r\n\t\t$numregistros=$resultado->num_rows;\t\r\n\t\tif($numregistros == 1){\r\n\t\t\twhile($fila = $resultado->fetch_row()){\r\n\t\t\t\t$fecha = $fila[0];\r\n\t\t\t}\r\n\t\t}\r\n\t\t$mysqli->close();\r\n\t\tlist($ano, $mes, $dia) = explode(\"-\", $fecha); //Devuelve un array de strings con las separaciones en '-'\r\n\t\t$edad = date(\"Y\")-$ano; //Devuelve el ańo actual y le quita el de la fecha\r\n\t\t$mes = date(\"m\")-$mes; //Devuelve el mes actual y le quita el de la fecha\r\n\t\t$dia = date(\"d\")-$dia; //Devuelve el dia actual y le quita el de la fecha\r\n\t\tif($mes==0 && $dia < 0 || $mes < 0) $edad--;\r\n\t\treturn $edad;\r\n}", "title": "" }, { "docid": "612e9c885567c3933b0577bb67118acd", "score": "0.61164504", "text": "function fecha_actual()\n{\n $time = time() +9000;\n $fecha = date(\"Y-m-d H:i:s\", $time);\n return($fecha);\n}", "title": "" }, { "docid": "22cd2a78326e89a4197b6ebe6b2e1e0d", "score": "0.6112922", "text": "function fecha_es()\r\n{\r\n \r\n $arrayMeses = array('Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio',\r\n 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre');\r\n \r\n $arrayDias = array( 'Domingo', 'Lunes', 'Martes',\r\n 'Miercoles', 'Jueves', 'Viernes', 'Sabado');\r\n \r\n $hora = date('H').':'.date('m').':'.date('s');\r\n return $arrayDias[date('w')].\", \".date('d').\" de \".$arrayMeses[date('m')-1].\" de \".date('Y').', a '.$hora;\r\n\r\n}", "title": "" }, { "docid": "a15992712601dca090a776ce34804e3c", "score": "0.6107583", "text": "function getNextDayDate($fechaStart,$dia,$primero){\r\n\r\n$cont=0;\r\n\r\n$dia=$dia-1;//ajusto para comienzo por 0\r\n\r\n$fechaActual=date(\"Y-m-d\");\r\nif($fechaStart==\"\"){//si no paso nada asumo q es hoy\r\n\t$v_fecha=getdate(strtotime($fechaActual));\r\n\t$fechaStart=$fechaActual;\r\n}\r\nelse{\r\n\t$v_fecha=getdate(strtotime($fechaStart));\r\n}\r\n\r\n$NumeroDiaActual=$v_fecha[\"wday\"];//empieza por 0\r\n\r\n//echo \"<br><br>dia: \".$dia.\"<br>\";\r\n//echo \"Para la fecha: \".$fechaStart.\" el Numero del Dia es: \".$NumeroDiaActual.\"<br>\";\r\n//echo \"fechaStart: \".$fechaStart.\"<br>\";\r\n//echo \"primero: \".$primero.\"<br>\";\r\n\r\n$notYet=true;\r\n$a=0;\r\n\r\nwhile($notYet){\r\n\t//if($NumeroDiaActual!=$dia ){//si el dia pasado no es el dia de hoy\r\n\tif($NumeroDiaActual!=$dia || $cont<=0 && $primero==0){//si el dia pasado no es el dia de hoy\r\n\t\tif($NumeroDiaActual<6){\r\n\t\t\t$NumeroDiaActual++;\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$NumeroDiaActual=0;\r\n\t\t}\r\n\t\t//echo \"numero a comparar: \".$NumeroDiaActual.\"<br>\";\r\n\t\t$primero=0;\r\n\t\t$cont++;\r\n\t}\r\n\telse{//si es igual termino\r\n\t\t$notYet=false;\r\n\t}\r\n\t$a++;\r\n}\r\n//echo \"Diferencia: \".$cont.\"<br>\";\r\n\r\n//ahora se cuantos dias le tengo que sumar a la fecha para llegar al dia pasado por parametro.\r\n$fechaNueva=suma_fechas($fechaStart,$cont);\r\n\r\n//echo \"fechaNueva: \".$fechaNueva.\"<br>\";\r\nreturn $fechaNueva;\r\n\r\n}", "title": "" }, { "docid": "a3a2ab5735d6e852da9574ab7507d8d7", "score": "0.60917664", "text": "public function obtenerFecha(){\n $this->objetoDato->conectar();\n $rs=$this->objetoDato->ejecutar(\"SELECT (NOW()) AS fecha;\");\n if(count($rs)){\n for($i=0; $i<count($rs); $i++){\n return $rs[$i]['fecha'];\n }\n }\n $this->objetoDato->desconectar();\n }", "title": "" }, { "docid": "a9b4f7019fda210c1bb27a5cc72d1f60", "score": "0.60768265", "text": "public function getDatecrea()\n {\n return $this->datecrea;\n }", "title": "" }, { "docid": "87852ade05c9e14eeefa61046529318a", "score": "0.6062142", "text": "function proximoVencimiento($numDias) {\n $txtAviso = \"\";\n $txtAviso = date(\"Y-m-d\", strtotime($numDias . \" days\"));\n return $txtAviso;\n}", "title": "" }, { "docid": "2e4f8afc7e8e66724f7325f6fb4b1185", "score": "0.6058158", "text": "function MySQL_Tasa_Fecha_Venta_General() {\n\t\t$sql = \"SELECT tasa FROM tasa_ventas where moneda = 'Dolar'\";\n\t\treturn $sql;\n\t}", "title": "" }, { "docid": "fe5a739c85b0d6bd0ee7b9eca5ddd42e", "score": "0.6042222", "text": "function resta_dias_Date($dias){\r\n /* si no se emplea moment hay que habilitar las lineas que siguen\r\n $fecha = date(gmdate(DATE_ISO8601, time())); \r\n $new_fecha = strtotime($fecha.'+ 6 hours 20 seconds');\r\n return date(DATE_ISO8601,$new_fecha); \r\n */ \r\n \r\n $fecha = date(DATE_ISO8601, time()); \r\n $m = new \\Moment\\Moment($fecha, 'CET');\r\n return $m->subtractDays($dias)->format(\"d-m-Y H:i:s\");\r\n}", "title": "" }, { "docid": "39705b0444320dec4e09889a348c3b71", "score": "0.60394603", "text": "function date_spa($formato,$fecha_db=false)\r\n{\r\n\r\nif ($fecha_db)\r\n\t$timestamp=strtotime($fecha_db);\r\n\r\nif ($timestamp)\r\n\t$fecha=date($formato,$timestamp);\r\nelse\r\n\t$fecha=date($formato);\r\n\r\nif (!(strpos($formato,\"l\")===false))//dia de la semana texto completo\r\n{\r\n\tif ($timestamp)\r\n\t\t$dia_eng=date(\"l\",$timestamp);\r\n\telse\r\n\t\t$dia_eng=date(\"l\");\r\n\r\n\tswitch($dia_eng)\r\n\t{\r\n\t case \"Sunday\":$dia=\"Domingo\";break;\r\n\t case \"Monday\":$dia=\"Lunes\";break;\r\n\t case \"Tuesday\":$dia=\"Martes\";break;\r\n\t case \"Wednesday\":$dia=\"Miércoles\";break;\r\n\t case \"Thursday\":$dia=\"Jueves\";break;\r\n\t case \"Friday\":$dia=\"Viernes\";break;\r\n\t case \"Saturday\":$dia=\"Sabado\";break;\r\n\t}\r\n}\r\n//reemplaza el/los dias en ingles por el/los dias en español\r\n$fecha=str_replace($dia_eng,$dia,$fecha);\r\n\r\nif (!(strpos($formato,\"D\")===false))//dia de la semana texto 3 letras\r\n{\r\n\tif ($timestamp)\r\n\t\t$dia_eng=date(\"D\",$timestamp);\r\n\telse\r\n\t\t$dia_eng=date(\"D\");\r\n\tswitch($dia_eng)\r\n\t{\r\n\t case \"Sun\":$dia=\"Dom\";break;\r\n\t case \"Mon\":$dia=\"Lun\";break;\r\n\t case \"Tue\":$dia=\"Mar\";break;\r\n\t case \"Wed\":$dia=\"Mie\";break;\r\n\t case \"Thu\":$dia=\"Jue\";break;\r\n\t case \"Fri\":$dia=\"Vie\";break;\r\n\t case \"Sat\":$dia=\"Sab\";break;\r\n\t}\r\n\r\n}\r\n\r\n//reemplaza el/los dias en ingles por el/los dias en español\r\n$fecha=str_replace($dia_eng,$dia,$fecha);\r\n\r\nif ((!(strpos($formato,\"F\")===false)) || //mes texto completo\r\n\t (!(strpos($formato,\"M\")===false)))//mes texto 3 letras\r\n{\r\n\tif ($timestamp)\r\n\t\t$mes_eng=date(\"F\",$timestamp);\r\n\telse\r\n\t\t$mes_eng=date(\"F\");\r\n\tswitch($mes_eng)\r\n\t{\r\n\t case \"Jan\":\r\n\t case \"January\":\r\n\t \t\t$mes=\"Enero\";break;\r\n\t case \"Feb\":\r\n\t case \"February\":\r\n\t \t\t$mes=\"Febrero\";break;\r\n\t case \"Mar\":\r\n\t case \"March\":\r\n\t \t\t$mes=\"Marzo\";break;\r\n\t case \"Apr\":\r\n\t case \"April\":\r\n\t \t\t$mes=\"Abril\";break;\r\n\t case \"May\":\r\n\t \t\t$mes=\"Mayo\";break;\r\n\t case \"Jun\":\r\n\t case \"June\":\r\n\t \t\t$mes=\"Junio\";break;\r\n\t case \"Jul\":\r\n\t case \"July\":\r\n\t \t\t$mes=\"Julio\";break;\r\n\t case \"Aug\":\r\n\t case \"August\":\r\n\t \t\t$mes=\"Agosto\";break;\r\n\t case \"Sep\":\r\n\t case \"September\":\r\n\t \t\t$mes=\"Septiembre\";break;\r\n\t case \"Oct\":\r\n\t case \"October\":\r\n\t \t\t$mes=\"Octubre\";break;\r\n\t case \"Nov\":\r\n\t case \"November\":\r\n\t \t\t$mes=\"Noviembre\";break;\r\n\t case \"Dec\":\r\n\t case \"December\":\r\n\t \t\t$mes=\"Diciembre\";break;\r\n\t}\r\n//reemplaza el/los dias en ingles por el/los dias en español\r\n$fecha=str_replace($mes_eng,$mes,$fecha);\r\n\r\n}\r\n return $fecha;\r\n}", "title": "" }, { "docid": "24bc045a80dd03f5d33fd0e30829fcc3", "score": "0.602853", "text": "function fecha_mostrar2($fecha)\r\n\t{\r\n\t\tdate_default_timezone_set('America/Lima');\r\n\t\tsetlocale(LC_TIME, 'spanish');\r\n\t\t//poner fecha como ejemplo miercoles 02 de enero del 2020\r\n\t\t$fecha_ver2=strftime('%A',strtotime($fecha)).\" \".date('d',strtotime($fecha)).strftime(' de %B',strtotime($fecha)).\" del \".date('Y',strtotime($fecha));\r\n\t\treturn $fecha_ver2;\r\n\t}", "title": "" }, { "docid": "88bd83e4b071f16fa7d001a152e4f4a6", "score": "0.60096675", "text": "function sumar2fecha($fecha, $dias, $meses, $anos) {\n\tlist ( $ano, $mes, $dia ) = split ( \"-\", $fecha );\n\treturn date ( 'Y-m-d', mktime ( 0, 0, 0, $mes + $meses, $dia + $dias, $ano + $anos ) );\n}", "title": "" }, { "docid": "e9ffc7a8b12ebdaddce40494eade9f79", "score": "0.6009303", "text": "public function getFechaFinal()\n {\n // Se establece date por si choca con alguna validación\n setlocale(LC_TIME,\"es_MX\",\"esp\");\n $dateFinal= strtotime($this->cur_fechafinal);\n\n if(strftime(\"%Y\", $dateFinal) == (string)date('Y'))\n $fecha = strftime(\"%e de %B\", $dateFinal);\n else\n $fecha = strftime(\"%e de %B de %Y\", $dateFinal);\n\n return $fecha;\n }", "title": "" }, { "docid": "29e26090a640f4f4e49ce71bf4a03320", "score": "0.5996056", "text": "function obtenerFechaEnLetra($fecha){\n\n $dia= conocerDiaSemanaFecha($fecha);\n\n $num = date(\"j\", strtotime($fecha));\n\n $anno = date(\"Y\", strtotime($fecha));\n\n $mes = array('enero', 'febrero', 'marzo', 'abril', 'mayo', 'junio', 'julio', 'agosto', 'septiembre', 'octubre', 'noviembre', 'diciembre');\n\n $mes = $mes[(date('m', strtotime($fecha))*1)-1];\n\n return $dia.', '.$num.' de '.$mes.' del '.$anno;\n\n}", "title": "" }, { "docid": "4d3ad6d6f1f0fbe7d5b7dfda50411a31", "score": "0.59935945", "text": "private function getDate()\n {\n return manager_tools::getLeadingZeroes($this->year)\n . '-' . manager_tools::getLeadingZeroes($this->month)\n . '-' . manager_tools::getLeadingZeroes($this->day);\n }", "title": "" }, { "docid": "5bee4da31d22b4cc94649a1240e62b9c", "score": "0.59844655", "text": "function agora ($padraoBrasileiro=false)\n{\n\tif ( $padraoBrasileiro ) {\n\t\treturn date(\"d/m/Y H:i:s\");\n\t} else {\n\t\treturn date(\"Y-m-d H:i:s\");\n\t}\n}", "title": "" }, { "docid": "6dfcdbefcde4dd43e44e4c546b26aa67", "score": "0.5982784", "text": "function cb_recalcularDia($row)\n{\n\t$row .=\" 20:45:00\";\n\tif ($row < gmdate('Y-m-d H:i:s')) {\n\t\t// esta vencido: recalcular\n\t\tif (gmdate('H:i:s') > '20:45:00') {\n\t\t\t// para o dia seguinte\n\t\t\t$row = gmdate('Y-m-d', time() + 86400);\n\t\t} else {\n\t\t\t// para hoje\n\t\t\t$row = gmdate('Y-m-d');\n\t\t}\n\t}\n\t$row = substr($row, 0,10);\n\treturn $row;\n}", "title": "" }, { "docid": "0c15a9cbfb224df24eb75bc5a65f5c9d", "score": "0.59811735", "text": "function tiempo_transcurrido($fecha_nacimiento, $fecha_control){\n $fecha_actual = $fecha_control;\n\n if(!strlen($fecha_actual))\n {\n $fecha_actual = date('d/m/Y');\n }\n\n // separamos en partes las fechas\n $array_nacimiento = explode ( \"/\", $fecha_nacimiento );\n $array_actual = explode ( \"/\", $fecha_actual );\n\n $anos = $array_actual[2] - $array_nacimiento[2]; // calculamos años\n $meses = $array_actual[1] - $array_nacimiento[1]; // calculamos meses\n $dias = $array_actual[0] - $array_nacimiento[0]; // calculamos días\n\n //ajuste de posible negativo en $días\n if ($dias < 0)\n {\n --$meses;\n\n //ahora hay que sumar a $dias los dias que tiene el mes anterior de la fecha actual\n switch ($array_actual[1]) {\n case 1:\n $dias_mes_anterior=31;\n break;\n case 2:\n $dias_mes_anterior=31;\n break;\n case 3:\n if (bisiesto($array_actual[2]))\n {\n $dias_mes_anterior=29;\n break;\n }\n else\n {\n $dias_mes_anterior=28;\n break;\n }\n case 4:\n $dias_mes_anterior=31;\n break;\n case 5:\n $dias_mes_anterior=30;\n break;\n case 6:\n $dias_mes_anterior=31;\n break;\n case 7:\n $dias_mes_anterior=30;\n break;\n case 8:\n $dias_mes_anterior=31;\n break;\n case 9:\n $dias_mes_anterior=31;\n break;\n case 10:\n $dias_mes_anterior=30;\n break;\n case 11:\n $dias_mes_anterior=31;\n break;\n case 12:\n $dias_mes_anterior=30;\n break;\n }\n\n $dias=$dias + $dias_mes_anterior;\n\n if ($dias < 0)\n {\n --$meses;\n if($dias == -1)\n {\n $dias = 30;\n }\n if($dias == -2)\n {\n $dias = 29;\n }\n }\n }\n\n //ajuste de posible negativo en $meses\n if ($meses < 0)\n {\n --$anos;\n $meses=$meses + 12;\n }\n\n $tiempo[0] = $anos;\n $tiempo[1] = $meses;\n $tiempo[2] = $dias;\n\n return $tiempo;\n}", "title": "" }, { "docid": "6122eb125b17e1a74f275964df5824f4", "score": "0.5975723", "text": "public function getDate()\n {\n }", "title": "" }, { "docid": "c7465a72b8d18380470851f29b582c99", "score": "0.5970933", "text": "public function SumeDiasFecha($Datos){\t\t\r\n $Fecha=$Datos[\"Fecha\"]; \r\n $Dias=$Datos[\"Dias\"]; \r\n $nuevafecha = date('Y-m-d', strtotime($Fecha) + 86400);\r\n $nuevafecha = date('Y-m-d', strtotime(\"$Fecha + $Dias day\"));\r\n\r\n return($nuevafecha);\r\n\r\n }", "title": "" }, { "docid": "ebcab862dc402dd7453cd498428da79b", "score": "0.59671694", "text": "public function get_date_permastruct() {}", "title": "" }, { "docid": "85e109adda665b55987f03b7553a8b6c", "score": "0.59550244", "text": "function calculaEdad($fechanacimiento)\n {\n list($ano,$mes,$dia) = explode(\"-\",$fechanacimiento);\n $ano_diferencia = date(\"Y\") - $ano;\n $mes_diferencia = date(\"m\") - $mes;\n $dia_diferencia = date(\"d\") - $dia;\n //print ($ano_diferencia.\"-\".$ano.\"-\".$mes_diferencia.\"-\".$mes.\"-\".$dia_diferencia.\"-\".$dia);\n if ($dia_diferencia < 0 || $mes_diferencia < 0)\n $ano_diferencia--;\n return $ano_diferencia;\n }", "title": "" }, { "docid": "bba1ab1e5770b83f2712564f818ae6f4", "score": "0.5943014", "text": "function dia_mes_anio($fecha_desde,$fecha_hasta){\n $array_nacimiento = explode ( \"-\", $fecha_desde );\n $array_actual = explode ( \"-\", $fecha_hasta );\n \n $anos = $array_actual[0] - $array_nacimiento[0]; // calculamos años\n $meses = $array_actual[1] - $array_nacimiento[1]; // calculamos meses\n $dias = $array_actual[2] - $array_nacimiento[2]; // calculamos días\n \n //ajuste de posible negativo en $días\n if ($dias < 0)\n {\n --$meses;\n \n //ahora hay que sumar a $dias los dias que tiene el mes anterior de la fecha actual\n switch ($array_actual[1]) {\n case 1: $dias_mes_anterior=31; break;\n case 2: $dias_mes_anterior=31; break;\n case 3: \n if (bisiesto($array_actual[0]))\n {\n $dias_mes_anterior=29; break;\n } else {\n $dias_mes_anterior=28; break;\n }\n case 4: $dias_mes_anterior=31; break;\n case 5: $dias_mes_anterior=30; break;\n case 6: $dias_mes_anterior=31; break;\n case 7: $dias_mes_anterior=30; break;\n case 8: $dias_mes_anterior=31; break;\n case 9: $dias_mes_anterior=31; break;\n case 10: $dias_mes_anterior=30; break;\n case 11: $dias_mes_anterior=31; break;\n case 12: $dias_mes_anterior=30; break;\n }\n \n $dias=$dias + $dias_mes_anterior;\n }\n \n //ajuste de posible negativo en $meses\n if ($meses < 0)\n {\n --$anos;\n $meses=$meses + 12;\n }\n return array (\"anios\"=>$anos, \"meses\"=> $meses, \"dias\"=> $dias);\n}", "title": "" }, { "docid": "43fc90584a0ae6369581d3cf3f7d875f", "score": "0.59427315", "text": "function suma_fecha($fecha,$dias){\n\n$inicio=strtotime($fecha); \n$dias=($dias*86400); \nreturn date(\"Y-m-d\",$inicio+$dias); \n \n}", "title": "" }, { "docid": "c123a6bea50374517c4e40b4e3d6f1fb", "score": "0.5938128", "text": "function affDateTime() {\n $jour = date('d');\n $mois = date('m');\n $annee = date('Y');\n $heure = date('H');\n $minute = date('i');\n\n // Affichage date et heure\n echo '<p class=\"affDateTime\">Bonjour! Nous sommes le ' . $jour . '/' . $mois . '/' . $annee . ' et il est ' . $heure. ' h ' . $minute.'</p>';\n\n}", "title": "" }, { "docid": "9c148594820ad0d927ceaad33ca4b164", "score": "0.5937721", "text": "function date2($formato=false,$fecha_db=false)\r\n{\r\n\t\t$formato=strtoupper($formato);\r\n\r\n\t\tswitch ($formato)\r\n\t\t{\r\n\t\t\t//formato largo de fecha\r\n\t\t\tcase \"L\":\r\n\t\t\t\treturn date_spa(\"l, j \\de F \\de Y\",$fecha_db);\r\n\t\t\tbreak;\r\n\t\t\t//formato largo de fecha y hora(unicamernte)\r\n\t\t\tcase \"LH\":\r\n\t\t\t\treturn date_spa(\"l, j \\de F \\de Y H\\h\\s\",$fecha_db);\r\n\t\t\tbreak;\r\n\t\t\t//formato largo de fecha, hora y minutos\r\n\t\t\tcase \"LHM\":\r\n\t\t\t\treturn date_spa(\"l, j \\de F \\de Y H:i\\h\\s\",$fecha_db);\r\n\t\t\tbreak;\r\n\t\t\t//formato largo de fecha, hora minutos y segundos\r\n\t\t\tcase \"LHMS\":\r\n\t\t\t\treturn date_spa(\"l, j \\de F \\de Y H:i:s\\h\\s\",$fecha_db);\r\n\t\t\tbreak;\r\n\t\t\t//formato corto de fecha y hora(unicamernte)\r\n\t\t\tcase \"SH\":\r\n\t\t\t\treturn date_spa(\"d/m/Y H\\h\\s\",$fecha_db);\r\n\t\t\tbreak;\r\n\t\t\t//formato corto de fecha, hora y minutos\r\n\t\t\tcase \"SHM\":\r\n\t\t\t\treturn date_spa(\"d/m/Y H:i\\h\\s\",$fecha_db);\r\n\t\t\tbreak;\r\n\t\t\t//formato corto de fecha, hora y minutos\r\n\t\t\tcase \"SHMS\":\r\n\t\t\t\treturn date_spa(\"d/m/Y H:i:s\\h\\s\",$fecha_db);\r\n\t\t\tbreak;\r\n\t\t\t//formato corto de fecha\r\n\t\t\tdefault: //case \"S\":\r\n\t\t\t\treturn date_spa(\"d/m/Y\",$fecha_db);\r\n\t\t}\r\n}", "title": "" }, { "docid": "c76aeb71379621827d8be9c3faf45a8a", "score": "0.5934789", "text": "function get_date($date_concert, $test) {\n $date_format = (date_create($date_concert, timezone_open('Europe/Paris')));\n $data['date_2'] = date_format($date_format, \"N-j-n-Y-G-i\");\n $nom_jour_fr = array(\"\", \"Lundi\", \"Mardi\", \"Mercredi\", \"Jeudi\", \"Vendredi\", \"Samedi\", \"Dimanche\",);\n $mois_fr = array(\"\", \"janvier\", \"février\", \"mars\", \"avril\", \"mai\", \"juin\", \"juillet\", \"août\", \"septembre\", \"octobre\", \"novembre\", \"Decembre\");\n $mois_fr_trois = array(\"\", \"JAN\", \"FEV\", \"MAR\", \"AVR\", \"MAI\", \"JUIN\", \"JUIL\", \"AOU\", \"SEP\", \"OCT\", \"NOV\", \"DEC\");\n list($nom_jour, $jour_chiffre, $mois_text, $annee, $heure, $minutes) = explode('-', $data['date_2']);\n $date['complete'] = $nom_jour_fr[$nom_jour] . ' ' . $jour_chiffre . ' ' . $mois_fr[$mois_text] . ' ' . $annee . ' - ' . $heure . 'h' . $minutes;\n $date['mois_trois'] = $mois_fr_trois[$mois_text];\n $date['jour_texte'] = $jour_chiffre;\n echo $date[$test];\n }", "title": "" }, { "docid": "54450493b6204eae6c17b8fd80a4d23a", "score": "0.5933737", "text": "private function retrieve_date()\n {\n }", "title": "" }, { "docid": "27ee36736a8abaeea0454fc5eaf63b56", "score": "0.59304714", "text": "function hoje ($padraoBrasileiro=FALSE)\n{\n\tif ( $padraoBrasileiro ) {\n\t\treturn date(\"d/m/Y\");\n\t} else {\n\t\treturn date(\"Y-m-d\");\n\t}\n}", "title": "" }, { "docid": "8f286b00be9b4d615724a799afd673da", "score": "0.59175885", "text": "public function getQuestionnaireDate();", "title": "" }, { "docid": "edc99a5d802685a1244696a397e70c8b", "score": "0.59107804", "text": "public function getCurDate()\n {\n $date=getdate();\n return $this->getDateEnLettre($date[0],0);\n }", "title": "" }, { "docid": "91fd10a6299edbdeea51aa3e8494735e", "score": "0.58997804", "text": "static function descuento_gobierno()\n {\n if (date(\"m-d-y\") > \"10-10-2022\") {\n self::$ayuda = 4500;\n }\n }", "title": "" }, { "docid": "72480c7284f1cc3ab72e6187f5921f33", "score": "0.58989275", "text": "function DIAS_FECHA($_DESDE, $_HASTA) {\r\n\tglobal $_ARGS;\r\n\tglobal $_PARAMETRO;\r\n\t$sql = \"SELECT DATEDIFF('$_HASTA', '$_DESDE');\";\r\n\t$query = mysql_query($sql) or die(getErrorSql(mysql_errno(), mysql_error(), $sql));\r\n\t$field = mysql_fetch_array($query);\r\n\t$dias = ++$field[0];\r\n\tif (substr($_HASTA, 5, 5) == \"02-28\") $dias+=2;\r\n\telseif (substr($_HASTA, 5, 5) == \"02-29\") $dias+=1;\r\n\treturn intval($dias);\r\n}", "title": "" }, { "docid": "afaaf804a4219b01116c2af7a5d55b10", "score": "0.5897938", "text": "public function getFecha(){\n \treturn $this->fecha;\n\t}", "title": "" }, { "docid": "da578b01dc266bebfc86488ed6f626bb", "score": "0.58920497", "text": "function faltan($hoy){\n $ahora = date(\"d/m/Y\",$hoy);//seteamos la hora\n \n $evento = mktime(0,0,0,11,25,2019); //dia del evento\n $dia_evento = date(\"d/m/Y\",$evento);\n \n $fecha_evento=explode(\"/\",$dia_evento);//sacamos las barras\n $fecha=explode(\"/\",$ahora);\n //calculamos los dias \n $anios=($fecha[2]-$fecha_evento[2]);\n $mes=($fecha[1]-$fecha_evento[1]);\n $dias=($fecha[0]-$fecha_evento[0]);\n \n $dias= -(($anios*365)+($mes*30.5)+($dias));\n //se muestra con intval que redondea \n echo intval($dias);\n }", "title": "" }, { "docid": "8154836fee3940f5453293d9ec8c2b4c", "score": "0.58814347", "text": "public static function ahoraDMA(){\n \t\t$obj=new DateTime();\n \t\treturn FechaUtils::dateTimeACadenaDMA($obj);\n \t}", "title": "" }, { "docid": "2fc5b32e1ac9e380c66c9c9bf6ac8c5f", "score": "0.58807874", "text": "function dateObj( $baseDate = '' ) {\r\n\t\t$this->dateSeparator = '-';\r\n\t\t$this->dateSeparator2 = '/';\r\n\t\t$this->timeSeparator = ':';\r\n\t\t$this->dateTimeSeparator = ' ';\r\n\t\tif ( empty($baseDate) ) $this->baseDate = date(\"Y-m-d H:i:s\");\r\n\t\telse $this->baseDate = $baseDate;\r\n\t\t$this->timestamp = $this->date_to_timestamp();\r\n\r\n\t\t$this->lgueDays = array(\r\n\t\t\t'Sunday'=>'dimanche',\r\n\t\t\t'Sun'=>'dim',\r\n\t\t\t'Monday'=>'lundi',\r\n\t\t\t'Mon'=>'lun',\r\n\t\t\t'Tuesday'=>'mardi',\r\n\t\t\t'Tue'=>'mar',\r\n\t\t\t'Wednesday'=>'mercredi',\r\n\t\t\t'Wed'=>'mer',\r\n\t\t\t'Thursday'=>'jeudi',\r\n\t\t\t'Thu'=>'jeu',\r\n\t\t\t'Friday'=>'vendredi',\r\n\t\t\t'Fri'=>'ven',\r\n\t\t\t'Saturday'=>'samedi',\r\n\t\t\t'Sat'=>'sam'\r\n\t\t);\r\n\r\n\t\t$this->lgueMonths = array(\r\n\t\t\t'January'=>'janvier',\r\n\t\t\t'Jan'=>'jan',\r\n\t\t\t'February'=>'février',\r\n\t\t\t'Feb'=>'fév',\r\n\t\t\t'March'=>'mars',\r\n\t\t\t'Mar'=>'mar',\r\n\t\t\t'April'=>'avril',\r\n\t\t\t'Apr'=>'avr',\r\n\t\t\t'May'=>'mai',\r\n\t\t\t'June'=>'juin',\r\n\t\t\t'Jun'=>'juin',\r\n\t\t\t'July'=>'juillet',\r\n\t\t\t'Jul'=>'juil',\r\n\t\t\t'August'=>'août',\r\n\t\t\t'Aug'=>'aoû',\r\n\t\t\t'September'=>'septembre',\r\n\t\t\t'Sep'=>'sep',\r\n\t\t\t'October'=>'octobre',\r\n\t\t\t'Oct'=>'oct',\r\n\t\t\t'November'=>'novembre',\r\n\t\t\t'Nov'=>'nov',\r\n\t\t\t'December'=>'décembre',\r\n\t\t\t'Dec'=>'déc'\r\n\t\t);\r\n\r\n\t}", "title": "" }, { "docid": "4f4f96368284461edac860819492e6d1", "score": "0.5866119", "text": "function calculaData($databanco,$data){\r\n\t $data_calc = $databanco;\r\n\t // Pega o ano da variavel $data\r\n\t $ano_banco = substr($data_calc,0,4);\r\n\t // Pega o mês da variavel $data\r\n\t $mes_banco = substr($data_calc,5,2);\r\n\t // Pega o dia da variavel $data\r\n\t $dia_banco = substr($data_calc,8,2);\r\n\t // Concatena as partes da data no formato dd-mm-aaaa\r\n\t $data_calculo = $dia_banco.\"-\".$mes_banco.\"-\".$ano_banco;\r\n\t \r\n\t \r\n\t // Pega a data atual\r\n\t $data_atual = $data;\r\n\t // Pega o ano da variavel $data_atual\r\n\t $ano_atual = substr($data_atual,0,4);\r\n\t // Pega o mês da variavel $data_atual\r\n\t $mes_atual = substr($data_atual,5,2);\r\n\t // Pega o dia da variavel $data_atual\r\n\t $dia_atual = substr($data_atual,8,2);\r\n\t // Concatena as partes da data atual no formato dd-mm-aaaa\r\n\t $data_atual = $dia_atual.\"-\".$mes_atual.\"-\".$ano_atual;\r\n\t \r\n\t // Obtém um timestamp Unix para a data do banco onde o 0\r\n\t // ( zero ) são respectivamente horas , minutos , segundos\r\n\t $data_calc = mktime(0,0,0,$mes_banco,$dia_banco,$ano_banco);\r\n\t // Obtém um timestamp Unix para a data atual onde os 0\r\n\t // ( zeros ) são respectivamente horas , minutos , segundos\r\n\t $data_atual = mktime(0,0,0,$mes_atual,$dia_atual,$ano_atual);\r\n\t \r\n\t \r\n\t // Faz o calculo da diferença em dias entre as duas datas\r\n\t //24 horas * 60 Min * 60 seg = 86400\r\n\t $dias = ($data_atual - $data_calc)/86400;\r\n\t // Pega a parte inteira da variavel $dias\r\n\t $dias = ceil($dias);\r\n\t return $dias;\r\n\t}", "title": "" }, { "docid": "4782744febaa2fa547ad691c180405d4", "score": "0.58649737", "text": "function ante_date_jour($moins,$formater=false) {\r\n\tif($formater) {\r\n\t\t$ante = date('d/m', mktime(0, 0, 0, date(\"m\"), date(\"d\")-$moins, date(\"Y\")));\r\n\t}\r\n\telse {\r\n\t\t$ante = mktime(0, 0, 0, date(\"m\"), date(\"d\")-$moins, date(\"Y\"));\r\n\t}\r\n\treturn $ante;\r\n}", "title": "" }, { "docid": "958e50c738783a9f5c8398c6b895a500", "score": "0.58626425", "text": "function tramitacionElectronica($n=\"\",$ci=0,$id=\"\",$f=\"\"){\n// $fv = substr(dateadd($f,0,0,1,0,0,0),0,10); // suma 1 año a la fecha\n list($d,$m,$a) = explode('/', $f); //fecha es dd/mm/yyyy\n $fi = $f;\n $fv = \"$d/$m/\".strval($a+1);\n $cedula = number_format($ci,0,',','.');\n return \"Por medio de la presente se hace constar que el(la) ciudadano(a): $n portador del documento de identidad $cedula, ha tramitado electrónicamente en el portal de esta Dirección de Recursos Humanos una solicitud de empleo número $id la cual será objeto de análisis con la finalidad de ser incluida en el Banco de Potenciales administrados por ella, específicamente para ofertar sus servicios como personal administrativo u obrero, de acuerdo con el estudio de: nivel de instrucción, credenciales y experiencia laboral. Queda entendido que la tramitación electrónica de solicitud de empleo no indica la existencia de ningún compromiso laboral entre las partes, y que su vigencia en el Banco de Potenciales será de un (1) año a partir de la fecha de su envío (desde $fi hasta $fv), teniendo el interesado derecho a actualización curricular y/o renovación, al finalizar dicho periodo.\";\n}", "title": "" }, { "docid": "ddaf9bc1097372ed749ebe091a5ee111", "score": "0.58622664", "text": "function day($fecha)\n{\n $fc1 = new Jenssegers\\Date\\Date($fecha);\n return $fc1->day;\n}", "title": "" }, { "docid": "7462b53c1594e6dc38056bee3e77abd6", "score": "0.5861562", "text": "function formatearFecha($valor)\n\t{\n\t\t$data= strtotime($valor);\n\t\t//setlocale(LC_TIME,'es_ES');\n\t\t//UGII_LANG=spanish //en XAMPP\n\t\tsetlocale(LC_TIME,'spanish');\n\t\t//return iconv(\"iso-8859-1\",\"utf-8\",(ucfirst(strftime(\"%A, %d de %B de %Y\", $data))));\n\t\treturn utf8_encode(ucfirst(strftime(\"%d de %B de %Y\", $data)));\n\t\t//return ucfirst(strftime(\"%#x\", $data));\n\t\t\n }", "title": "" }, { "docid": "ac32fd80e149c700fc6a5a35fd2c542d", "score": "0.5847664", "text": "function DIAS_JERARQUIA() {\r\n\tglobal $_ARGS;\r\n\tglobal $_PARAMETRO;\r\n\t$suma = 0;\r\n\t$sql = \"SELECT\r\n\t\t\t\t en.Fecha,\r\n\t\t\t\t en.FechaHasta,\r\n\t\t\t\t p.Grado,\r\n\t\t\t\t ns.SueldoPromedio AS SueldoBasico\r\n\t\t\tFROM\r\n\t\t\t\t rh_empleadonivelacion en\r\n\t\t\t\t INNER JOIN rh_puestos p ON (en.CodCargo = p.CodCargo)\r\n\t\t\t\t INNER JOIN rh_nivelsalarial ns ON (p.CategoriaCargo = ns.CategoriaCargo AND p.Grado = ns.Grado)\r\n\t\t\tWHERE\r\n\t\t\t\t en.CodOrganismo = '\".$_ARGS['_ORGANISMO'].\"' AND\r\n\t\t\t\t en.CodPersona = '\".$_ARGS['_PERSONA'].\"' AND\r\n\t\t\t\t en.TipoAccion <> 'ET' AND\r\n\t\t\t\t ((en.FechaHasta = '0000-00-00' AND en.Fecha <= '\".$_ARGS['_HASTA'].\"') OR\r\n\t\t\t\t ('\".$_ARGS['_DESDE'].\"' <= en.FechaHasta))\r\n\t\t\tORDER BY en.Fecha\";\r\n\t$query = mysql_query($sql) or die(getErrorSql(mysql_errno(), mysql_error(), $sql));\r\n\twhile ($field = mysql_fetch_array($query)) {\r\n\t\tif ($field['Fecha'] < $_ARGS['_DESDE']) $desde = $_ARGS['_DESDE'];\r\n\t\telse $desde = $field['Fecha'];\r\n\t\tif ($field['FechaHasta'] == \"0000-00-00\" || $field['FechaHasta'] > $_ARGS['_HASTA']) $hasta = $_ARGS['_HASTA'];\r\n\t\telse $hasta = $field['FechaHasta'];\r\n\t\tif ($field['Grado'] == \"90\" || $field['Grado'] == \"96\" || $field['Grado'] == \"97\" || $field['Grado'] == \"98\" || $field['Grado'] == \"99\") {\r\n\t\t\t$dias = DIAS_FECHA($desde, $hasta);\r\n\t\t\t$suma += $dias;\r\n\t\t}\r\n\t}\r\n\treturn intval($suma);\r\n}", "title": "" }, { "docid": "29e5b260e383e6071fa60fe345c3977c", "score": "0.58345985", "text": "function calculaedad($fechanacimiento){\n\t\tlist($ano,$mes,$dia) = explode(\"-\",$fechanacimiento);\n\t\t$ano_diferencia = date(\"Y\") - $ano;\n\t\t$mes_diferencia = date(\"m\") - $mes;\n\t\t$dia_diferencia = date(\"d\") - $dia;\n\t\tif ($dia_diferencia < 0 || $mes_diferencia < 0)\n\t\t $ano_diferencia--;\n\t\treturn $ano_diferencia;\n\t }", "title": "" }, { "docid": "b95fcc8e4a0ff65aeab191495e9ec64d", "score": "0.58324224", "text": "private function getDate() {\n\t\tif(isset($_REQUEST[\"day\"])) {\n\t\t\tif($_REQUEST[\"datum\"]) {\n\t\t\t\t$day = $this->DatumToDate($_REQUEST[\"datum\"])+($_REQUEST[\"day\"]*90000);\n\t\t\t}\n\t\t\telse $day = time()+($_REQUEST[\"day\"]*90000);\n\n\t\t}\n\t\telseif($_REQUEST[\"datum\"]) $day = $this->DatumToDate($_REQUEST[\"datum\"]);\n\t\telse $day = time();\n\t\treturn $day;\n\t}", "title": "" }, { "docid": "c835f69fb1c9b77e967e9fc751f2a8cf", "score": "0.5829188", "text": "function set_date()\n\t{\n\t\t$this->date = date('d'); // tanggal 01-28/29/30/31\n\t\t$this->bulan = date('m'); // bulan 01-12\n\t\t$this->year = date('Y'); // tahun 4 digit\n\t\t$this->jml_hari = date('t'); // jumlah hari\n\t\t$this->is_kabisat = date('Y') % 4; // jika 0 = kabisat selain itu tidak\n\t}", "title": "" }, { "docid": "5852a64079312b28b4039f7019fb264c", "score": "0.58250856", "text": "function calculaEdad($fecha)\n\t{\n\tlist($Y,$m,$d) = explode(\"-\",$fecha);\n\treturn( date(\"md\") < $m.$d ? date(\"Y\")-$Y-1 : date(\"Y\")-$Y );\n\t}", "title": "" }, { "docid": "e69c9e246ff790cf9729c5b10c81318b", "score": "0.5823218", "text": "function resta2Fechas($t1,$t2){\n/* convierte una fecha al timestamp tipo unix y como resultado da el numero de segundo */\n$tot_segundos = (strtotime($t1)-strtotime($t2)); /* total de segundos */\n$dias=(int)($segundos/86400); /* obtiene el numero de dias */\n$tot_segundos=$tot_segundos- ($dias*86400); /* lo resto para obtener el saldo */\n$hora=(int)($tot_segundos/3600); /* obtiene el numero de hora */\n$tot_segundos=$tot_segundos- ($hora*3600);\n$minuto=(int)($tot_segundos/60); /* numero de minutos */\n$tot_segundos=$tot_segundos- ($minuto*60);\n$segundo = $tot_segundos;\n$tiempo=$dias.\" Dias \".$hora.\":\".$minuto;\nreturn $tiempo;\n}", "title": "" }, { "docid": "0c35639d628c4e2662e64c0f6aa31ec7", "score": "0.58145314", "text": "function fecha()\n {\n $fecha = date('Y-m-j H:i:s');\n $nuevafecha = strtotime ( '-6 hour' , strtotime ( $fecha ) ) ;\n $fecha = date ( 'Y-m-j' , $nuevafecha );\n return $fecha;\n }", "title": "" }, { "docid": "eea46cf4c7197fca12f943604fc284b3", "score": "0.58120567", "text": "function nb_jour_mois($mois_select,$annee_select)\n {\n $mois_d = mktime( 0, 0, 0, $mois_select, 1, $annee_select);\n //$date_select_exp[1] = mois\n //$date_select_exp[2] = jour\n $date_select_exp = explode('-', $date_select);\n\n //Mois précédent\n //calcul des positions des mois\n $mois = $date_select_exp[1];\n if($mois == 12)\n {\n $prochain_mois = 1 ;\n $prochaine_annee = $annee + 1 ;\n $precedent_mois = $mois - 1 ;\n $precedente_annee = $annee ;\n }\n else if($mois == 1)\n {\n $prochain_mois = $mois + 1 ;\n $prochaine_annee = $annee ;\n $precedent_mois = 12 ;\n $precedente_annee = $annee - 1 ;\n }\n else\n {\n $prochain_mois = $mois + 1 ;\n $prochaine_annee = $annee ;\n $precedent_mois = $mois - 1 ;\n $precedente_annee = $annee ;\n }\n $date_moins1 = $precedente_annee.\"-\".$precedent_mois.\"-\".$date_select_exp[2];\n $date_plus1 = $prochain_annee.\"-\".$prochain_mois.\"-\".$date_select_exp[2];\n return($date_moins1);\n return($date_plus1);\n }", "title": "" }, { "docid": "174e8d02f21dfd528a10afe457e4f3ab", "score": "0.5806", "text": "function myDate($fecha = null){\r\n /* si no se emplea moment hay que habilitar las lineas que siguen\r\n $fecha = date(gmdate(DATE_ISO8601, time())); \r\n $new_fecha = strtotime($fecha.'+ 6 hours 20 seconds');\r\n return date(DATE_ISO8601,$new_fecha); \r\n */ \r\n \r\n if ($fecha == null){\r\n $fecha = date(DATE_ISO8601, time());\r\n }\r\n \r\n $m = new \\Moment\\Moment($fecha, 'CET');\r\n return $m->addHours(3)->addMinutes(20)->addSeconds(15)->format();\r\n}", "title": "" }, { "docid": "0357c51f7f10222f21a1294b34c896b4", "score": "0.5802131", "text": "function tharu_date_today()\n{\n $yy = date('Y');\n $mm = date('m');\n $dd = date('d');\n $tharu_date = get_tharu_date($yy, $mm, $dd);\n return $tharu_date['date'] . ' ' . $tharu_date['month_name'] . ' ' . $tharu_date['year'] . ', ' . $tharu_date['day'];\n}", "title": "" }, { "docid": "a9e7589d574d1b5f5eac28d6d3c6120d", "score": "0.5798349", "text": "public function sumar_fecha($fecha,$cantidad,$tipo,$formato){\r\n\t\t$actual = strtotime($fecha);\r\n \t\t$nuevo = date($formato, strtotime($cantidad . \" \" . $tipo, $actual));\r\n \t\treturn($nuevo);\r\n\t}", "title": "" }, { "docid": "0dbea9650ca52190d895a65ba317925d", "score": "0.5796986", "text": "public function fecha(){\n \treturn Carbon::createFromFormat('Y-m-d', $this->fecha)->format('d/m/Y');\n }", "title": "" }, { "docid": "7ac08c2e4afec6bd8cd822b8a648e7f3", "score": "0.5795058", "text": "function getDate() {\n\n include(\"./settings/template.php\");\n\n $month_full = date(\"n\", $this->timestamp);\n\n $month_full = $getmonth[$month_full];\n\n $Fday = date(\"d.\",$this->timestamp);\n $Fyear = date(\"Y\",$this->timestamp);\n\n $date = $Fday.\" \".$month_full.\" \".$Fyear;\n\n // $date = date(\"d.m.Y, H:i\",$this->timestamp);\n\n return $date;\n\n }", "title": "" }, { "docid": "eb7e5d815c00cbf4a0c6136ced1f58ab", "score": "0.5790279", "text": "function getFinOferta($idproducto)\n {\n\t $codigo=\"\";\n\t $stmt = $this->conexion->prepare(\"select codigo from productos where id='\".$idproducto.\"'\");\n\t\t $stmt->execute();\n\t\t$result = $stmt->fetchAll();\n\t\tforeach($result as $row)\n\t\t{\n\t\t\t$codigo=$row['codigo'];\n\t\t}\n\n\t\t$stmt = $this->conexion->prepare(\"select * from ofertas where idproducto='\".$codigo.\"'\");\n $stmt->execute();\n\t\t$result = $stmt->fetchAll();\n\t\tforeach($result as $row)\n\t\t{\n\t\t\t$phpdate = strtotime( $row[\"fechahasta\"] );\n\t\t\treturn date( 'd-m-Y', $phpdate );\n\t\t}\n }", "title": "" }, { "docid": "a76d39336fa9e3cb923ff48f30c48a2c", "score": "0.5784019", "text": "function calendrier($m_donne,$a_donne){\n\tinclude(\"calandar_config.php\");\n\t\n\t// On récupère le mois et l'année dans la barre de navigation\n\t$m = $m_donne;\n\t$a = $a_donne;\n\n\t// Si rien n'est spécifié, cela veut dire qu'il faut afficher le mois et l'année donnés par la fonction\n\tif ($m == \"\") { $m = $m_donne; }\n\tif ($a == \"\") { $a = $a_donne; }\n\n\t// Calcul du nombre de jours dans chaque mois en prenant compte des années bisextiles. les tableaux PHP commençant à 0 et non à 1, le premier mois est un mois \"factice\"\n\tif (($a % 4) == 0){\n\t\t$nbrjour = array(0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);\n\t}else{\n\t\t$nbrjour = array(0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);\n\t}\n\n\t// On cherche grâce à cette fonction à quel jour de la semaine correspond le 1er du mois \n\t$premierdumois = jddayofweek(cal_to_jd($CAL_FRENCH, $m, 1, $a), 0);\n\tif($premierdumois == 0){\n\t\t$premierdumois = 7;\n\t}\n\n\t//Préparation du tableau avec le nom du mois et la liste des jours de la semaine\n\n\techo \"<table border=0 background='../img/calendrier.png' width=\\\"251\\\" height=\\\"120\\\" cellpadding=\\\"0\\\"><tr><td class=\\\"fleches\\\">\";\n\techo mois_precedent($m,$mois[$m],$a);\n\techo \"</td><td class=\\\"nom_mois\\\" colspan=\\\"5\\\">$mois[$m] $a</td><td class=\\\"fleches\\\">\";\n\techo mois_suivant($m,$a);\n\techo \"</td></tr><tr class=\\\"noms_jours\\\">\";\n\techo \"<td>$jours[1]</td><td>$jours[2]</td><td>$jours[3]</td><td>$jours[4]</td><td>$jours[5]</td><td>$jours[6]</td><td>$jours[7]</td></tr><tr>\";\n\n\t$jour=1;\t//Cette variable est celle qui va afficher les jours de la semaine\n\t$joursmoisavant = $nbrjour[$m-1] - $premierdumois+2;\t\t//Celle-ci sert à afficher les jours du mois précédent qui apparaissent\n\t$jourmoissuivant = 1; //Et celle-ci les jours du mois suivant\n\tif($m == 1){\n\t\t$joursmoisavant = $nbrjour[$m+11] - $premierdumois+2; //Si c'est janvier, le mois d'avant n'est pas à 0 mais 31 jours!\n\t}\n\n\t//Et c'est parti pour la boucle for qui va créer l'affichage de notre calendrier !\n\tfor($i=1;$i<40;$i++){\t\t\n\t\tif($i < $premierdumois){\t// Tant que la variable i ne correspond pas au premier jour du mois, on fait des cellules de tableau avec les derniers jours du mois précédent\n\t\techo \"<td class=\\\"cases_vides\\\">$joursmoisavant</td>\";\n\t\t$joursmoisavant++;\n\t\t}else{\n\t\t \n\t\t\t\n\t\t\t//$d=mktime(0,0,0,$m,$jour,$a);\n\t\t\t//$affich=0;\n\t\t\t\n\t\t\t$d=mktime(0,0,0,$m,$jour,$a);\n\t\t\tif ( array_search($d,$_SESSION['tab_timestamp'])===false )// cas n'existe\n\t\t\t{\n\t\t\t\t$affich=0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$affich=1;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//if($jour == date(\"d\") && $m == date(\"n\") ){ \t//Si la variable $jour correspond à la date d'aujourd'hui, la case est d'une couleur différente\n\t\t\tif($jour == date(\"d\") && $m == date(\"n\") && $affich==0 ) //Si la variable $jour correspond à la date d'aujourd'hui, la case est d'une couleur différente\n\t\t\t{ \n\t\t\t\techo \"<td class=\\\"aujourdhui\\\">$jour</td>\";\n\t\t\t}\n\t\t\telseif($jour == date(\"d\") && $m == date(\"n\") && $affich==1 ) //Si la variable $jour correspond à la date d'aujourd'hui, la case est d'une couleur différente\n\t\t\t{ \n\t\t\t\techo \"<td class=\\\"jourconcert\\\"><a onClick='goo(\".$d.\")' style='cursor:pointer;' >$jour</a></td>\";\n\t\t\t}\n\t\t\telseif($affich==1)\n\t\t\t{\n\t\t\t\techo \"<td class=\\\"jourconcert\\\"><a onClick='goo(\".$d.\")' style='cursor:pointer;' >$jour</a></td>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{ \n\t\t\t\techo \"<td class=\\\"jours\\\">$jour</td>\";\n\t\t\t}\n\t\t\t$jour++;\t//On passe au lendemain ^^\n\t\t\n\t\t\t/*Si la variable $jour est plus élevée que le nombre de jours du mois, c'est que c'est la fin du mois! \n\t\t\t On remplit les cases vides avec les premiers jours des mois suivants\n\t\t\t Hop on ferme le tableau, \n\t\t\t et on met la variable $i à 41 pour sortir de la boucle */\n\t\t\tif($jour > ($nbrjour[$m])){\n\t\t\t\twhile($i % 7 != 0){\n\t\t\t\t\techo \"<td class=\\\"cases_vides\\\">$jourmoissuivant</td>\";\n\t\t\t\t\t$i++;\n\t\t\t\t\t$jourmoissuivant++;\n\t\t\t\t}\n\t\t\techo \"</tr></table>\";\n\t\t\t$i=41;\n\t\t\t}\n\t\t}\n\t\n\t\t// Si la variable i correspond à un dimanche (multiple de 7), on passe à la ligne suivante dans le tableau\n\t\tif($i % 7 == 0){\n\t\t\techo \"</tr><tr>\";\n\t\t}\n\n\t}\n\n}", "title": "" }, { "docid": "a6f0405047567748d465ffd99b3a53e0", "score": "0.57816875", "text": "function fecha_aleatoria($formato = \"Y-m-d\", $limiteInferior = \"2013-01-01\", $limiteSuperior = \"2019-01-01\")\n {\n $milisegundosLimiteInferior = strtotime($limiteInferior);\n $milisegundosLimiteSuperior = strtotime($limiteSuperior);\n\n // Buscamos un número aleatorio entre esas dos fechas\n $milisegundosAleatorios = mt_rand($milisegundosLimiteInferior, $milisegundosLimiteSuperior);\n\n // Regresamos la fecha con el formato especificado y los milisegundos aleatorios\n return date($formato, $milisegundosAleatorios);\n }", "title": "" }, { "docid": "c61b6afb9a769cb6b5e4ae2edd232781", "score": "0.57771295", "text": "function es_dia_habil($fecha) {\r\n return es_fecha_habil($fecha);\r\n }", "title": "" }, { "docid": "8021129079e8d70688bf0825f6b86625", "score": "0.5776438", "text": "public static function getDataENNow()\n\t{\t\n\t\t/**\n\t\t * Retorna ano,mes e dia.\n\t\t * @return Y-m-d\n\t\t */\n\t\treturn date(\"Y-m-d\");\n\t}", "title": "" }, { "docid": "6861f51b311b7bbafc14bafec3c7625a", "score": "0.57748806", "text": "function DiaHoje(){\n//dia atual\n$dia=date(\"l\");\nswitch($dia)\n{\ncase \"Monday\":\n$dia_port = \"segunda-feira\";\nbreak; \ncase \"Tuesday\":\n$dia_port = \"terça-feira\";\nbreak; \ncase \"Wednesday\":\n$dia_port = \"quarta-feira\";\nbreak; \ncase \"Thursday\":\n$dia_port = \"quinta-feira\";\nbreak; \ncase \"Friday\":\n$dia_port = \"sexta-feira\";\nbreak; \ncase \"Saturday\":\n$dia_port = \"sábado\";\nbreak; \ncase \"Sunday\":\n$dia_port = \"domingo\";\nbreak; \n}\n$mes = date(\"n\");\nswitch($mes) \n{\ncase \"1\":\n$mes_port = \"janeiro\";\nbreak; \ncase \"2\":\n$mes_port = \"fevereiro\";\nbreak; \ncase \"3\":\n$mes_port = \"março\";\nbreak; \ncase \"4\":\n$mes_port = \"abril\";\nbreak; \ncase \"5\":\n$mes_port = \"maio\";\nbreak; \ncase \"6\":\n$mes_port = \"junho\";\nbreak; \ncase \"7\":\n$mes_port = \"julho\";\nbreak; \ncase \"8\":\n$mes_port = \"agosto\";\nbreak; \ncase \"9\":\n$mes_port = \"setembro\";\nbreak; \ncase \"10\":\n$mes_port = \"outubro\";\nbreak; \ncase \"11\":\n$mes_port = \"novembro\";\nbreak; \ncase \"12\":\n$mes_port = \"dezembro\";\nbreak; \n}\necho ($dia_port); \necho (\", \");\necho (date(\"d\"));\necho (\" de \");\necho ($mes_port); \necho (\" de \");\necho (date(\"Y\"));\n}", "title": "" }, { "docid": "e93ff962267798b6b067b7481255d6a3", "score": "0.576836", "text": "function suma_minutos_a_fechas($fecha,$minutos)\r\n{\r\n\r\n\t$v_fechas=explode(\" \",$fecha);\r\n\tlist($anio,$mes,$dia)=explode(\"-\",$v_fechas[0]);\r\n\tlist($hora,$min,$seg)=explode(\":\",$v_fechas[1]);\r\n\t\r\n $nueva = mktime($hora,$min,$seg,$mes,$dia,$anio) + ($minutos * 60) ;\r\n $nuevafecha=date(\"Y-m-d H:i:s\",$nueva);\r\n\r\n\treturn ($nuevafecha); ; \r\n \r\n}", "title": "" }, { "docid": "ce56d61496db1abee6ddbceaa6833045", "score": "0.5747117", "text": "public function getFechaInicioPeriodo( ){\n\t\treturn $this->fechaInicio;\n\t}", "title": "" }, { "docid": "272ad35c9dedbc8ca667a34f56564352", "score": "0.5744856", "text": "function tiempoTranscurridoFechas($fechaInicio, $fechaFin){\n\t\t\t $fecha1 = new DateTime($fechaInicio);\n\t\t\t $fecha2 = new DateTime($fechaFin);\n\t\t\t $fecha = $fecha1->diff($fecha2);\n\t\t\t $tiempo = 0;\n\t\t\t\t$sw = 0;\n\t\t\t \n\t\t\t //años\n\t\t\t if($fecha->y > 0)\n\t\t\t {\n\t\t\t $tiempo = 0;\n\t\t\t\t\t$sw = 1;\n\t\t\t\t\t\n\t\t\t }\n\t\t\t \n\t\t\t //meses\n\t\t\t if($fecha->m > 0)\n\t\t\t {\n\t\t\t $tiempo = 0;\n\t\t\t\t\t$sw = 1;\n\t\t\t }\n\t\t\t \n\t\t\t //dias\n\t\t\t if($fecha->d > 0)\n\t\t\t {\n\t\t\t \n\t\t\t\t if($sw == 0){\n\t\t\t\t \t\n\t\t\t\t\t$cantidadDias = $fecha->d;\n\t\t\t\t\t $tiempo = $cantidadDias * 24;\n\t\t\t\t\t\n\t\t\t\t }\n\t\t\t\t \n\t\t\t }\n\t\t\t \n\t\t\t //horas\n\t\t\t if($fecha->h > 0)\n\t\t\t {\n\t\t\t \t\n\t\t\t\t\tif($sw == 0){\n\t\t\t\t\t\t\n\t\t\t\t\t\t$cantidadHoras = $fecha->h;\n\t\t\t\t\t\t\t$tiempo = $tiempo+$cantidadHoras;\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t }\n\t\t\t \n\t\t\t //minutos\n\t\t\t if($fecha->i > 0)\n\t\t\t {\n\t\t\t \t//si es mayor a 20 minutos se toma como una hora\n\t\t\t\t\t\tif($sw == 0 AND $fecha->i >= 20){\n\t\t\t\t\t\t\t$tiempo = $fecha->i;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t }\n\t\t\t //else if($fecha->i == 0) //segundos\n\t\t\t // $tiempo .= $fecha->s.\" segundos\";\n\t\t\t \n\t\t\t return $tiempo;\n\t\t\t}", "title": "" }, { "docid": "afec5bbe237037523a2afb1c525a8d92", "score": "0.5743097", "text": "public function get_date_permastruct()\n {\n }", "title": "" }, { "docid": "9f38fce7c0ec0c210d0e7436bfeaf978", "score": "0.573121", "text": "function DateAdd($intervalo,$numero,$date)\n\n\t\t\t{\n\t\t\t\t$date_array = explode(\"/\",$date);\n\n\t\t\t\t$dia = $date_array[0];\n\t\t\t\t$mes = $date_array[1];\n\t\t\t\t$ano = $date_array[2];\n\n\t\t\t\tswitch($intervalo)\n\t\t\t\t\t{\n\t\t\t\t\t case 'd':\n\t\t\t\t\t \t$dia += $numero;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t case 'm':\n\t\t\t\t\t \t$mes += $numero;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t case 'aaaa':\n\t\t\t\t\t \t$ano += $numero;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\t\t\t\tif($mes == 2 && $dia > 28)\n\t\t\t\t {\n\t\t\t\t $dia = 28;\n\t\t\t\t\t if(checkdate(2,29,$ano))\n\t\t\t\t\t {\n\t\t\t\t\t \t $dia = 29;\n\t\t\t\t\t }\n\t\t\t\t }\n\n\t\t\t\tif($mes != 2 && $dia == 31 && ($mes == 4 || $mes == 6 || $mes == 9 || $mes == 11))\n\t\t\t\t {\n\t\t\t\t $dia = 30;\n\t\t\t\t }\n\n\t\t\t\t$date = mktime(0, 0, 0, $mes, $dia, $ano);\n\t\t\t\t$date = gmstrftime(\"%d/%m/%Y\",$date);\n\t\t\t\treturn $date;\n\n\t\t\t}", "title": "" }, { "docid": "0a4307f1969749cac05f8eb2b8feed27", "score": "0.5726474", "text": "function data_hoje(){\n\t\n\t$dthoje=date(\"d-m-Y\");\n\techo \"$dthoje\";\n\n}", "title": "" }, { "docid": "56d29a86918da88b82cf6d881f4cd5b1", "score": "0.57234085", "text": "function restaHoras($horaFin, $horaIni)\n {\n// echo '<br>^^^^^^^^^^^^<br>hora_menor: ' . $horaIni;\n// echo '<br>hora_mayor: ' . $horaFin;\n $resta = date(\"H:i:s\", strtotime(\"00:00:00\") + strtotime($horaFin) - strtotime($horaIni));\n// echo '<br>resta: ' . $resta . '<br>^^^^^^^^^^^^<br>';\n return $resta;\n }", "title": "" }, { "docid": "962071f7ca59dc711c4a9ea04dd1d8cd", "score": "0.57230455", "text": "public function tiempoRestanteReserva(){\r\n\t\t$fecha = $this->fechaDeComienzo();\r\n\t\t$año = substr($fecha, 0, 4);\r\n\t\t$mes = substr($fecha, 5, 2);\r\n\t\t$dia = substr($fecha, 8, 2);\r\n\t\t$fecha = date_create();\r\n\t\treturn $this->difereciaAHoy(date_date_set($fecha, $año, $mes, $dia));\r\n\t}", "title": "" }, { "docid": "15671dfb095df70337a4fdfa6fbf79c5", "score": "0.5720713", "text": "public function getDate(){\r\n\t\tdate_default_timezone_set(\"Asia/Manila\");\r\n\t\t//$date = date_create(\"1/1/1990\");\r\n\r\n\t\t$dates = date(\"Y-m-d H:i:s\");\r\n\t\t$date = date_create($dates);\r\n\t\tdate_sub($date, date_interval_create_from_date_string('15 hours'));\r\n\r\n\t\t// $current_date_time = date_format($date, 'Y-m-d H:i:s');\r\n\t\t$current_date_time = date_format($date, 'Y-m-d');\r\n\r\n\t\t//$sure_date_now = date_create($current_date_time);\r\n\t\t//$sure_current_date_now = date_format($sure_date_now,'Y-m-d');\r\n\r\n\t\treturn $current_date_time;\r\n\r\n\t}", "title": "" }, { "docid": "697b0e5ee764eccf99e48cae1114d987", "score": "0.5719715", "text": "function affiche_date_locale($moment){\r\n$decalage_hiver=1;\r\nif (!$moment){\r\n$temps=time();\r\n}\r\nelse {\r\n$temps=$moment;\r\n}\r\n/*l'heure d'hiver commence le dernier dimanche de mars à 1h GMT et finit le dernier dimanche d'hiver à 1h GMT*/\r\n$jourdesemaine=gmdate(\"w\", mktime(1,0,0, 3,31,gmdate(\"Y\")));\r\n//variable pour connaître le jour de semaine du 31 mars\r\n$limite_inf=mktime(1,0,0, 3,31-$jourdesemaine,gmdate(\"Y\"));\r\n//variable pour trouver le dernier dimanche de mars pour l'année courante\r\n$jourdesemaine=gmdate(\"w\", mktime(1,0,0, 10,31,gmdate(\"Y\")));\r\n//variable pour connaître le jour de semaine du 31 octobre\r\n$limite_sup=mktime(1,0,0, 10,31-$jourdesemaine,gmdate(\"Y\"));\r\n//variable pour trouver le dernier dimanche d'octobre pour l'année courante\r\n/*maintenant nous testons la date pour savoir si elle est comprise entre les deux limites et dans ce cas elle est en heure d'été*/\r\nif ($temps>$limite_inf && $temps<$limite_sup){\r\n$decalage=$decalage_hiver+1;\r\n}\r\nelse {\r\n$decalage=$decalage_hiver;\r\n}\r\n$moment=mktime(gmdate(\"G\")+$decalage,gmdate(\"i\"),0, gmdate(\"n\"),gmdate(\"j\"),gmdate(\"Y\"));\r\n//ici nous fabriquons le timestamp avec mktime() en incluant le décalage\r\n$ladate=affiche_jour($moment) .\" \".date(\"j\", $moment).\" \". affiche_mois($moment) .\" \". date(\"Y\", $moment);\r\n/*la date inclut le mois en français grâce à l'appel de la fonction. Vous pouvez dans certains cas faire précéder la fonction du @ pour éviter le message d'erreur si vous n'envoyez pas de paramètre par exemple alors que la fonction en utilise un.*/\r\n$heure = date(\"G\",$moment);\r\n$minute = date(\"i\", $moment);\r\n$ladate.=\"<BR>\"; \r\n$ladate.=\"$heure\"; \r\n$ladate.=\"h\"; \r\n$ladate.=\"$minute\";\r\nreturn $ladate;\r\n }", "title": "" } ]
d53b3d0eef6c3f96b99f0ccfc41dcbef
Create the status table
[ { "docid": "58a5d94291c3d04f55c8ca0c895e844c", "score": "0.0", "text": "public function __construct() {\n\n $this->tableName = \"core_j_spaces_user\";\n $this->setColumnsInfo(\"id\", \"int(11)\", 0);\n $this->setColumnsInfo(\"id_user\", \"varchar(100)\", \"\");\n $this->setColumnsInfo(\"id_space\", \"varchar(100)\", \"\");\n $this->setColumnsInfo(\"status\", \"varchar(100)\", \"\");\n $this->setColumnsInfo(\"date_convention\", \"date\", \"0000-00-00\");\n $this->setColumnsInfo(\"convention_url\", \"varchar(255)\", \"\");\n $this->setColumnsInfo(\"date_contract_end\", \"date\", \"0000-00-00\");\n $this->primaryKey = \"id\";\n\n }", "title": "" } ]
[ { "docid": "e263a315c73e74f52884d3d269971b85", "score": "0.6910683", "text": "public function run()\n {\n $table = [\n [\n 'name' => 'Fixed',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ],\n [\n 'name' => 'In Progress',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ],\n [\n 'name' => 'Verified',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ],\n [\n 'name' => 'Submitted',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ],\n [\n 'name' => 'To be Discussed',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ],\n [\n 'name' => 'Deleted',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]\n ];\n\n DB::table('status')->insert($table);\n }", "title": "" }, { "docid": "cae13b49906460db3290698cad108b2a", "score": "0.6842706", "text": "protected function populateDBStatusesTable(): void {\n $this->emptyDB('statuses');\n $this->listings = $this->listingAPI->getStatusesFromApi();\n foreach ($this->listings as $listing) {\n $query = $this->dbConnection->prepare('INSERT INTO `statuses` (`status_name`) VALUES (:status_name);');\n $query->bindParam(':status_name', $listing->STATUS_NAME);\n $query->execute();\n }\n }", "title": "" }, { "docid": "df0c8dc4c6ee3d8b2acf78d26915d4e3", "score": "0.6653391", "text": "public function createTable() {\r\n\r\n $sql = \"CREATE TABLE IF NOT EXISTS `ps_project_types` (\r\n\t\t`id` int(11) NOT NULL AUTO_INCREMENT,\r\n\t\t`name` varchar(30) NOT NULL,\r\n `who_can_see` int(11) NOT NULL,\r\n PRIMARY KEY (`id`)\r\n\t\t);\";\r\n\r\n $this->runRequest($sql);\r\n }", "title": "" }, { "docid": "9391b76adb46f34e3422c411e324bcdc", "score": "0.66040224", "text": "private function create_table() {\t\t\n\t\t\t$this->check_code();\n\t\t\t\n\t\t\tif ( $this->cfg->DB_TYPE == 'sqlite' ) \n\t\t\t\t{ $this->create_table_sqlite(); }\n\t\t\telse \n\t\t\t\t{ $this->create_table_mysql(); }\n\t\t\t\n\t\t}", "title": "" }, { "docid": "5c0b23eaf0d610339021de1aaf68a7f0", "score": "0.6574603", "text": "private function create()\n {\n try {\n $this->db->exec(\"CREATE TABLE IF NOT EXISTS `$this->tableName` (\n `id` INT UNSIGNED PRIMARY KEY AUTO_INCREMENT,\n `script_name` VARCHAR(25) NOT NULL,\n `start_time` INT UNSIGNED NOT NULL,\n `end_time` INT UNSIGNED NOT NULL,\n `result` ENUM(\n 'illegal', 'failed', 'success'\n ) NOT NULL\n );\");\n } catch (PDOException $e) {\n echo $e->getMessage();\n }\n }", "title": "" }, { "docid": "d8f532f9647afe1472096f438de502b0", "score": "0.6528642", "text": "public function createTables();", "title": "" }, { "docid": "a9c61cd93699bfab6c924962808ae390", "score": "0.65059114", "text": "private function get_status_list_table() {\n $status_list_table = new WPDT_Status_List_Table();\n\n return $status_list_table;\n }", "title": "" }, { "docid": "34be62e823732d836724a8c82d1796d5", "score": "0.64754814", "text": "public function run()\n {\n Status::truncate();\n\n Status::create(['name'=>'pending']);\n Status::create(['name'=>'accepted']);\n Status::create(['name'=>'declined']);\n }", "title": "" }, { "docid": "95d64a11b27b6f74224f6b90a807035b", "score": "0.6446093", "text": "function create_table(){\n\t\t$tables = array();\n\t\t/**\n\t\t* Table structure for table 'user_info'\n\t\t*/\n\t\t\n\t\t$fields = array(\n\t\t\tarray(\"user_identifier\"\t\t\t,\"unsigned integer\"\t,\"NOT NULL\"\t,\"auto_increment\", \"key\"),\n\t\t\tarray(\"user_login_name\"\t\t\t,\"varchar(20)\"\t\t,\"NOT NULL\"\t,\"default ''\"),\n\t\t\tarray(\"user_login_pwd\"\t\t\t,\"varchar(40)\"\t\t,\"NOT NULL\"\t,\"default ''\"),\n\t\t\tarray(\"user_creation_date\"\t\t,\"datetime\"\t\t\t,\"\" \t\t,\"default NULL\"),\n\t\t\tarray(\"user_date_grace\"\t\t\t,\"datetime\"\t\t\t,\"\" \t\t,\"default NULL\"),\n\t\t\tarray(\"user_date_review\"\t\t,\"datetime\"\t\t\t,\"\" \t\t,\"default NULL\"),\n\t\t\tarray(\"user_date_expires\"\t\t,\"datetime\"\t\t\t,\"\" \t\t,\"default NULL\"),\n\t\t\tarray(\"user_group\"\t\t\t\t,\"unsigned integer\"\t,\"NOT NULL\"\t,\"default '0'\"),\n\t\t\tarray(\"user_status\"\t\t\t\t,\"unsigned integer\"\t,\"NOT NULL\"\t,\"default '1'\"),\n\t\t\tarray(\"user_client\"\t\t\t\t,\"unsigned integer\"\t,\"NOT NULL\"\t,\"default '0'\"),\n\t\t\tarray(\"user_uid\"\t\t\t\t,\"varchar(6)\"\t\t,\"\"\t\t\t,\"default ''\")\n\t\t);\n\t\t$primary =\"user_identifier\";\n\t\t$tables[count($tables)] = array(\"user_info\", $fields, $primary);\n\t\t/**\n\t\t* Table data for table 'user_info'\n\t\t*/\n\t\t$now = date(\"d/m/Y H:i:s\");\n\t\t//$this->call_command(\"DB_QUERY\",array(\"INSERT INTO user_info (user_login_name, user_login_pwd, user_creation_date, user_group, user_status, user_client) VALUES('admin', '6f5393979d674de36c433b47b7d8908e', '$now', '2', '2', '1');\"));\n\t\t/**\n\t\t* Table structure for table 'user_status'\n\t\t*/\n\t\t$fields = array(\n\t\tarray(\"user_status_identifier\"\t,\"unsigned integer\"\t,\"NOT NULL\"\t,\"auto_increment\"),\n\t\tarray(\"user_status_label\"\t\t,\"varchar(255)\"\t\t,\"NOT NULL\"\t,\"default ''\")\n\t\t);\n\t\t$primary=\"user_status_identifier\";\n\t\t/**\n\t\t* Table data for table 'user_status'\n\t\t*/\n\t\t$data = array(\n\t\t\t'INSERT INTO user_status (user_status_label) VALUES (\"LOCALE_USER_NOT_CONFIRMED\");',\n\t\t\t'INSERT INTO user_status (user_status_label) VALUES (\"LOCALE_USER_CONFIRMED\");',\n\t\t\t'INSERT INTO user_status (user_status_label) VALUES (\"LOCALE_USER_BLOCKED\");'\n\t\t);\n\t\t$tables[count($tables)] = array(\"user_status\", $fields, $primary, $data);\n\t\t/**\n\t\t* Table structure for table 'user_management_access'\n\t\t*/\n\t\t$fields = array(\n\t\tarray(\"user_identifier\"\t\t,\"unsigned integer\"\t,\"NOT NULL\"\t,\"default ''\"),\n\t\tarray(\"menu_identifier\"\t\t,\"unsigned integer\"\t,\"NOT NULL\"\t,\"default ''\")\n\t\t);\n\t\t$primary=\"\";\n\t\t$tables[count($tables)] = array(\"relate_user_menu\", $fields, $primary);\n\t\t/**\n\t\t* Table structure for table 'user_extended_functionality' \t\t\t\t\t\t\t\t -\n\t\t*/\n\t\t$fields = array(\n\t\t\tarray(\"tag_identifier\"\t\t,\"unsigned integer\"\t,\"NOT NULL\"\t,\"auto_increment\"),\n\t\t\tarray(\"user_identifier\"\t\t,\"unsigned integer\"\t,\"NOT NULL\"\t,\"default ''\"),\n\t\t\tarray(\"client_identifier\"\t,\"unsigned integer\"\t,\"NOT NULL\"\t,\"default ''\"),\n\t\t\tarray(\"function_tag\"\t\t,\"varchar(30)\"\t\t,\"NOT NULL\"\t,\"default ''\"),\n\t\t\tarray(\"function_value\"\t\t,\"varchar(30)\"\t\t,\"\"\t\t\t,\"default ''\")\n\t\t);\n\t\t$primary=\"tag_identifier\";\n\t\t$tables[count($tables)] = array(\"user_admin_functions\", $fields, $primary);\n\t\treturn $tables;\n\t}", "title": "" }, { "docid": "fa03ac5b93782ba8be81171d2b00d4ca", "score": "0.64417076", "text": "protected function tableCreation() {\n\t\t$this->log('Ensuring Tables are Created');\n\t\t$tablesInstalled = DbHelper::getTablesInstalled();\n\t\tif (count($tablesInstalled) === 0) {\n\t\t\tDbHelper::createTables();\n\t\t\tDbHelper::createAnonymousUser();\n\t\t\t$this->updateComponents();\n\t\t}\n\t}", "title": "" }, { "docid": "7e604e8da8581c3e83b7ed4a72109947", "score": "0.63924485", "text": "public function createRequestTable()\n {\n if (! Capsule::schema()->hasTable('mo')) \n {\n\n Capsule::schema()->create('mo', function ($table) {\n $table->increments('id');\n $table->integer('msisdn');\n $table->integer('operatorid');\n $table->integer('shortcodeid');\n $table->string('text');\n $table->integer('status')->default(0);\n $table->timestamps();\n });\n \n return \"table created\";\n }\n else\n {\n\n return \"table exists\";\n }\n\n }", "title": "" }, { "docid": "4b278d382a0d3d11140abb511c9d03ac", "score": "0.63661563", "text": "public function generateTable() {\r\n $stmt = \"CREATE TABLE $this->tablename (\r\n `id` int(11) NOT NULL,\r\n `email` varchar(255) NOT NULL,\r\n `password` varchar(255) NOT NULL,\r\n `active` tinyint(1) DEFAULT 0,\r\n `optionA` tinyint(1) DEFAULT 0,\r\n `optionB` tinyint(1) DEFAULT 0,\r\n `optionC` tinyint(1) DEFAULT 0,\r\n PRIMARY KEY (`id`),\r\n UNIQUE KEY `id` (`id`)\r\n ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT\";\r\n\r\n $this->sql->query(null, $stmt);\r\n }", "title": "" }, { "docid": "8eab0ea684677e7b1370710f2c9062bf", "score": "0.63628626", "text": "public function create_table ()\n {\n $this->get_fields ();\n if ( $this->run_query ( $this->form_query_create () ) )\n display ( \"The table '\" . $this->_tablename . \"' was created successfully\\n\\n\" );\n\n else\n display ( \"The table '\" . $this->_tablename . \"' could not be created at this time. Try again or check the script.\\n\\n\" );\n }", "title": "" }, { "docid": "1d9290af8d0ba2cc6708abd54322346a", "score": "0.6360186", "text": "public function create_table()\n {\n $CI =& get_instance();\n $CI->load->model('config_model');\n\n $CI->config_model->create_tb_komentar();\n\n return true;\n }", "title": "" }, { "docid": "3b7ea6d93553741e55e8718a3b75c875", "score": "0.63451725", "text": "public function createTable() {\n $sql = \"CREATE TABLE IF NOT EXISTS `ac_j_user_anticorps` (\n `id` int(11) NOT NULL,\n `id_anticorps` int(11) NOT NULL,\n `id_utilisateur` int(11) NOT NULL,\t\n `disponible` int(2) NOT NULL,\t\t\n `date_recept` DATE NOT NULL,\n `no_dossier` varchar(12) NOT NULL,\n PRIMARY KEY (`id`)\n );\n \";\n\n $this->runRequest($sql);\n }", "title": "" }, { "docid": "b5e9210620043323f13549ebcdd8d604", "score": "0.6294107", "text": "public function run()\n {\n DB::table('statuses')->insert([\n 'status_name' => 'Signed up',\n 'status_description' => 'Signed up',\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n\n ]);\n\n DB::table('statuses')->insert([\n 'status_name' => 'Pricing Added',\n 'status_description' => 'admin has set pricing',\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n\n ]);\n\n DB::table('statuses')->insert([\n 'status_name' => 'Active',\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'status_description' => 'activated by admin or customer added (pickers) or location of dropper is added',\n\n ]);\n\n DB::table('statuses')->insert([\n 'status_name' => 'Inactive',\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'status_description' => 'manually deactivated by admin',\n\n ]);\n\n DB::table('statuses')->insert([\n 'status_name' => 'Billing Generated',\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'status_description' => 'Billing is generated for the picker',\n\n ]);\n\n DB::table('statuses')->insert([\n 'status_name' => 'Payment Due',\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'status_description' => 'When due date of billing exceeds',\n\n ]);\n\n DB::table('statuses')->insert([\n 'status_name' => 'Payment Received',\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'status_description' => 'Amount of Request or Amount of Billing received',\n\n ]);\n\n DB::table('statuses')->insert([\n 'status_name' => 'Payment Transferred',\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'status_description' => 'Amount of Request transferred to courier',\n\n ]);\n }", "title": "" }, { "docid": "3358308d042c304f5d189060f64ce9af", "score": "0.62873393", "text": "public function run() {\n Status::create([\n 'name' => 'Nuevo'\n ]);\n Status::create([\n 'name' => 'Aceptado'\n ]);\n Status::create([\n 'name' => 'Completado'\n ]);\n Status::create([\n 'name' => 'Cancelado'\n ]);\n }", "title": "" }, { "docid": "6a9749918a2fb9179235d56d861205ce", "score": "0.62771773", "text": "public function run()\n {\n Status::create([\n\n \t'name' \t\t\t=> 'Pending',\n \t'slug' \t\t\t=> slug('pending'),\n \t'created_at' \t=> now(),\n \t'updated_at' \t=> now(),\n ]);\n\n Status::create([\n\n 'name' => 'Progress',\n 'slug' => slug('progress'),\n 'created_at' => now(),\n 'updated_at' => now(),\n ]);\n\n Status::create([\n\n \t'name' \t\t\t=> 'Approved',\n \t'slug' \t\t\t=> slug('approved'),\n \t'created_at' \t=> now(),\n \t'updated_at' \t=> now(),\n ]);\n }", "title": "" }, { "docid": "a84f58d26ec255917afaebda7d80b258", "score": "0.6264226", "text": "private function createStatus()\n\t{\n\t\t$status = $this->record->get('activitystatus');\n\t\tif ('VEVENT' === (string) $this->vcomponent->name) {\n\t\t\t$values = [\n\t\t\t\t'PLL_PLANNED' => 'TENTATIVE',\n\t\t\t\t'PLL_OVERDUE' => 'CANCELLED',\n\t\t\t\t'PLL_POSTPONED' => 'CANCELLED',\n\t\t\t\t'PLL_CANCELLED' => 'CANCELLED',\n\t\t\t\t'PLL_COMPLETED' => 'CONFIRMED',\n\t\t\t];\n\t\t} else {\n\t\t\t$values = [\n\t\t\t\t'PLL_PLANNED' => 'NEEDS-ACTION',\n\t\t\t\t'PLL_IN_REALIZATION' => 'IN-PROCESS',\n\t\t\t\t'PLL_OVERDUE' => 'CANCELLED',\n\t\t\t\t'PLL_POSTPONED' => 'CANCELLED',\n\t\t\t\t'PLL_CANCELLED' => 'CANCELLED',\n\t\t\t\t'PLL_COMPLETED' => 'COMPLETED',\n\t\t\t];\n\t\t}\n\t\tif ($status && isset($values[$status])) {\n\t\t\t$value = $values[$status];\n\t\t} else {\n\t\t\t$value = reset($values);\n\t\t}\n\t\tif (isset($this->vcomponent->STATUS)) {\n\t\t\t$this->vcomponent->STATUS = $value;\n\t\t} else {\n\t\t\t$this->vcomponent->add($this->vcalendar->createProperty('STATUS', $value));\n\t\t}\n\t}", "title": "" }, { "docid": "8e0f55557fb743a2fbcecd177fa5286f", "score": "0.6250263", "text": "public function run()\n {\n Rollstatus::truncate();\n\n Rollstatus::create(['id' => 1, 'status_id' => 'A', 'Status' => 'Away']);\n Rollstatus::create(['id' => 2, 'status_id' => 'C', 'Status' => 'Present/Paid']);\n Rollstatus::create(['id' => 3, 'status_id' => 'V', 'Status' => 'Present/Voucher']);\n Rollstatus::create(['id' => 4, 'status_id' => 'P', 'Status' => 'Present/Not Paid']);\n }", "title": "" }, { "docid": "2d4a6848dd893e4c431b4fdb46b497a7", "score": "0.62464756", "text": "public function run() {\n DB::table('status')->truncate();\n\n factory('codeCommerce\\Status')->create(\n [\n 'description' => 'Em processamento',\n ]\n );\n \n factory('codeCommerce\\Status')->create(\n [\n 'description' => 'Aguardando Pagamento',\n ]\n );\n \n factory('codeCommerce\\Status')->create(\n [\n 'description' => 'Pagamento em Análise',\n ]\n );\n \n factory('codeCommerce\\Status')->create(\n [\n 'description' => 'Pago',\n ]\n );\n \n factory('codeCommerce\\Status')->create(\n [\n 'description' => 'Separado para entrega',\n ]\n );\n \n factory('codeCommerce\\Status')->create(\n [\n 'description' => 'Postado',\n ]\n );\n \n factory('codeCommerce\\Status')->create(\n [\n 'description' => 'Entregue',\n ]\n );\n \n factory('codeCommerce\\Status')->create(\n [\n 'description' => 'Cancelado',\n ]\n );\n \n factory('codeCommerce\\Status')->create(\n [\n 'description' => 'Extraviado',\n ]\n );\n \n \n }", "title": "" }, { "docid": "0b5f457c3b5dbedd5b920fb885d0fc2f", "score": "0.6227963", "text": "private function createTable() {\n\t\t$columns = [];\n\t\tforeach ($this->game->getColumns() as $column) {\n\t\t\t$columns[] = $column.' INT(6) DEFAULT 0';\n\t\t}\n\t\t$sql = 'CREATE TABLE '.$this->sortingTable.'(\n\t\t\tcl_broj INT(3) UNSIGNED PRIMARY KEY,\n\t\t\tpl_name VARCHAR(30),\n\t\t\tpl_faction VARCHAR(30),\n\t\t\tto_id INT(6) UNSIGNED, '.implode(', ', $columns).'\n\t\t\t)';\n\t\tself::dbConn()->query($sql);\n\t\t\n\t}", "title": "" }, { "docid": "6f0844566a37cf60f06c128aaa498533", "score": "0.6217449", "text": "private function createTables() {\n\n\t\t$userTable = User::getDataType();\n\t\t$userTableSQL =\n\t\t\t\"CREATE TABLE IF NOT EXISTS $userTable (\n\t\t\t`id` INT NOT NULL AUTO_INCREMENT,\n\t\t\tPRIMARY KEY(id),\n\t\t\t`uuid` VARCHAR(255) NOT NULL,\n\t\t\t`username` VARCHAR(32) NOT NULL,\n\t\t\t`email` VARCHAR(64),\n\t\t\t`firstname` VARCHAR(32),\n\t\t\t`lastname` VARCHAR(32),\n\t\t\t`phone` VARCHAR(32),\n\t\t\t`location` VARCHAR(255),\n\t\t\t`password` VARCHAR(255) NOT NULL,\n\t\t\t`active` BOOLEAN NULL DEFAULT '0',\n\t\t\t`deleted` INT(11) NULL DEFAULT '0',\n\t\t\t`timestamp` VARCHAR(32) NULL DEFAULT 'unix_timestamp()'\n\t\t\t);\";\n\t\t$this->runQuery( $userTableSQL );\n\t}", "title": "" }, { "docid": "c14677b702397394306ef603b6d6e220", "score": "0.62030107", "text": "public function run()\n {\n Status::create([\n 'description' => 'novo',\n 'final' => false,\n ]);\n\n Status::create([\n 'description' => 'em analise',\n 'final' => false,\n ]);\n\n Status::create([\n 'description' => 'em andamento',\n 'final' => false,\n ]);\n\n Status::create([\n 'description' => 'inrecuperavel',\n 'final' => true,\n ]);\n\n Status::create([\n 'description' => 'resolvido',\n 'final' => true,\n ]);\n }", "title": "" }, { "docid": "3a99ec668b66ee367e3d68278c9cb04e", "score": "0.618922", "text": "public function run()\n {\n Status::create([\n 'name' => 'Activo',\n 'description' => 'Estado activo'\n ]);\n Status::create([\n 'name' => 'Inactivo',\n 'description' => 'Estado inactivo'\n ]);\n }", "title": "" }, { "docid": "fa2923595edbd6d7dc7bd14c9461b04b", "score": "0.6176324", "text": "public function run()\n {\n $userStatus = new UserStatus();\n $userStatus->name = '待审';\n $userStatus->title = 'pending';\n $userStatus->description = '等待审查';\n $userStatus->save();\n\n $userStatus = new UserStatus();\n $userStatus->name = '审核';\n $userStatus->title = 'checking';\n $userStatus->description = '审核中';\n $userStatus->save();\n\n $userStatus = new UserStatus();\n $userStatus->name = '激活';\n $userStatus->title = 'active';\n $userStatus->description = '激活';\n $userStatus->save();\n\n $userStatus = new UserStatus();\n $userStatus->name = '屏蔽';\n $userStatus->title = 'banned';\n $userStatus->description = '屏蔽';\n $userStatus->save();\n\n $userStatus = new UserStatus();\n $userStatus->name = '删除';\n $userStatus->title = 'deleted';\n $userStatus->description = '删除';\n $userStatus->save();\n }", "title": "" }, { "docid": "a0d910e564531d266369a188c53515b9", "score": "0.6175152", "text": "function create_table() {\n if($this->table_name == '') { return; }\n \n $this->table_declaration();\n $this->table_head();\n $this->table_body();\n echo \"</table>\\n\";\n\n }", "title": "" }, { "docid": "108768a3a1a2f2e9eed34869f2e8840d", "score": "0.6144929", "text": "public function run()\n {\n $status = [\n ['title' => 'init'],\n ['title' => 'submitted'],\n ['title' => 'delivered'],\n ['title' => 'canceled'],\n ];\n\n\n DB::table('order_status')->insert($status);\n }", "title": "" }, { "docid": "ac472a6f62c7879e7156fba13037a24b", "score": "0.6118867", "text": "public function createTable()\n\t{\n\t\t$platform = new MySqlPlatform();\n\t\t$queries = $this->schema->toSql( $platform ); // get queries to create this schema.\n\n\t\t//#! Create the table\n\t\tif ( $queries ) {\n\t\t\tglobal $db, $logger;\n\t\t\tforeach ( $queries as $query ) {\n\t\t\t\ttry {\n\t\t\t\t\t$db->query( $query );\n\t\t\t\t}\n\t\t\t\tcatch ( Exception $e ) {\n $logger->write( $e->getMessage(), Logger::PLACEHOLDER, LOG_LEVEL_CRITICAL );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "1ca222afbffb50f5160e391592cdfc72", "score": "0.61152035", "text": "public function createTable() {\n\t\tif ( get_option(self::$tblName) && (version_compare(get_option(self::$tblName), $this->version, '>=')) ){\n\t\t\treturn false;\n\t\t}\n\n\t\tglobal $wpdb;\n\t\t$tblName = $wpdb->prefix . self::$tblName;\n\t\tif ($result = $wpdb->query(\"SHOW TABLES LIKE '\".$tblName.\"'\") ){\n\t\t\tupdate_option(self::$tblName, $this->version);\n\t\t\treturn false;\n\t\t}\n\n\t\t$charsetCollate = $wpdb->get_charset_collate();\n\t\t$sql = \"CREATE TABLE $tblName(\n\t\t\tpackage_ID bigint(20) NOT NULL,\n\t\t\tuser_ID bigint(20) NOT NULL,\n\t\t\tpayment_ID bigint(20) NOT NULL,\n\t\t\tpackage_information TEXT NOT NULL,\n\t\t\tstatus VARCHAR (20) NOT NULL\n\t\t) $charsetCollate\";\n\n\t\trequire_once ABSPATH . 'wp-admin/includes/upgrade.php';\n\t\tdbDelta($sql);\n\n\t\tupdate_option(self::$tblName, $this->version);\n\t}", "title": "" }, { "docid": "e4aa99b7c69f5d4688568f315a7649ac", "score": "0.61029166", "text": "public function createStatusAction()\n {\n }", "title": "" }, { "docid": "1faa5b824b11ec433b7027659fffdcba", "score": "0.6102846", "text": "private function writeStatus (): void\n {\n if (! empty ($this->getTableName ()))\n {\n try {\n $this->connection->transaction (function () {\n $this->connection\n ->table ($this->getTableName ())\n ->where ('type', 1)\n ->update (['status' => 0]);\n foreach ($this->modulesStatuses as $name => $status) {\n if ($status === 1)\n {\n $this->connection\n ->table ($this->getTableName ())\n ->where ('name', $name)\n ->where ('type', 1)\n ->update (['status' => $status]);\n }\n }\n }, 3);\n } catch (\\Throwable $e) {\n $this->logger->error ($e->getMessage ());\n }\n }\n }", "title": "" }, { "docid": "d59c45078e9c2d8b0d468bfbf421e84a", "score": "0.60979915", "text": "function createTables()\n {\n global $serendipity;\n\n // create table xxxx_visitors\n $q = \"CREATE TABLE {$serendipity['dbPrefix']}visitors (\n counter_id {AUTOINCREMENT} {PRIMARY},\n sessID varchar(35) not null default '',\n day varchar(10) not null default '',\n time varchar(5) not null default '',\n ref varchar(255) default null,\n browser varchar(255) default null,\n ip varchar(45) default null\n )\";\n\n serendipity_db_schema_import($q);\n\n // create table xxxx_visitors_counts\n $q = \"CREATE TABLE {$serendipity['dbPrefix']}visitors_count (\n year int(4) not null,\n month int(2) not null,\n day int(2) not null,\n visits int(11) not null,\n hits int(11) not null\n )\";\n\n serendipity_db_schema_import($q);\n\n // create table xxxx_refs\n $q = \"CREATE TABLE {$serendipity['dbPrefix']}refs (\n id {AUTOINCREMENT} {PRIMARY},\n refs varchar(255) not null default '',\n count int(11) not null default '0'\n )\";\n serendipity_db_schema_import($q);\n\n $this->updateTables();\n }", "title": "" }, { "docid": "5b5ab632b72453c3dba1ad57f6fd413f", "score": "0.6090713", "text": "public function run()\n {\n $statuses = [\n [\n 'name' => 'Active',\n ],\n [\n 'name' => 'Suspended'\n ]\n ];\n\n DB::table('employees_statuses')->insert($statuses);\n }", "title": "" }, { "docid": "5c74c55d749172ec37e68649c86356aa", "score": "0.60905856", "text": "public function run()\n {\n Status::create([\n 'name' => 'Aguardando cliente', \n 'description' => 'Sem nenhum cliente em mesa',\n ]);\n\n Status::create([\n 'name' => 'Em atendimento',\n 'description' => 'Atendendo um cliente',\n ]);\n\n Status::create([\n 'name' => 'Necessitando ajuda',\n 'description' => 'Solicitando ajuda de um atendente',\n ]);\n\n Status::create([\n 'name' => 'Recebendo ajuda ',\n 'description' => 'Recebendo ajuda de um atendente',\n ]);\n }", "title": "" }, { "docid": "c839d41f265ed8f7ef6ffad0e61cd366", "score": "0.6088591", "text": "protected abstract function createTable();", "title": "" }, { "docid": "183fa1ad71627ee700b89f9fe3e5da36", "score": "0.6081657", "text": "public function createTable() {\n info(\"Checking existiance of `events` table\"); \n $sql = \"CREATE TABLE IF NOT EXISTS events (\n id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY, \n pmk_id INT(6),\n uid VARCHAR(255),\n date_start DATE,\n time_start TIME,\n date_end DATE,\n time_end TIME,\n duration INT,\n title VARCHAR(255) NOT NULL,\n description VARCHAR(1000),\n type VARCHAR(255) NOT NULL,\n address VARCHAR(1000),\n geoLatitude DECIMAL(5,3),\n geoLongitude DECIMAL(5,3),\n country VARCHAR(2) NOT NULL,\n last_download DATE \n )\";\n\n $stmt = $this->db_conn->prepare($sql); \n if ($stmt->execute() !== TRUE) {\n error(\"Error while querying `events` table: \" + $stmt->errorInfo());\n } \n\n return $stmt;\n }", "title": "" }, { "docid": "a88e85d1194b5675b74b42d1614f52f2", "score": "0.60741", "text": "public function createTable()\n {\n // for MySQL\n $columns = array(\n 'id int primary key auto_increment',\n 'note_id char(13)',\n 'title varchar(512)',\n 'body text',\n 'user_id int',\n 'timestamp timestamp'\n );\n }", "title": "" }, { "docid": "49d4e2d586e523216ecf02386ff30410", "score": "0.6062791", "text": "protected function createMigrationHistoryTable()\n {\n $tableName = $this->db->schema->getRawTableName($this->migrationTable);\n $this->stdout(\"Creating migration history table \\\"$tableName\\\"...\", Console::FG_YELLOW);\n $this->db->createCommand()->createTable($this->migrationTable, [\n 'version' => 'varchar(' . static::MAX_NAME_LENGTH . ') NOT NULL PRIMARY KEY',\n 'apply_time' => 'integer',\n ])->execute();\n $this->db->createCommand()->insert($this->migrationTable, [\n 'version' => self::BASE_MIGRATION,\n 'apply_time' => time(),\n ])->execute();\n $this->stdout(\"Done.\\n\", Console::FG_GREEN);\n }", "title": "" }, { "docid": "46bd4757100f8de4c1f728b92367dded", "score": "0.6053896", "text": "public function run()\n {\n DB::table('mngStatusType')->insert([\n 'statusDescription' => 'Activo',\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s')\n\n ]);\n\n DB::table('mngStatusType')->insert([\n 'statusDescription' => 'Inactivo',\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s')\n ]);\n }", "title": "" }, { "docid": "5e36b4d3f8b4b0320531bd5caa52ee92", "score": "0.6051402", "text": "public function run()\n {\n $statuses = [\n [\n 'name' => 'pending',\n ],\n [\n 'name' => 'open',\n ],\n [\n 'name' => 'closed',\n ]\n ];\n\n foreach ($statuses as $status) {\n Status::create($status);\n }\n }", "title": "" }, { "docid": "300cd85724f03e3801eb85b5391ebc82", "score": "0.6035957", "text": "public\tfunction\tcreateTable(){\r\n\t\t\r\n\t\t\t$Request\t=\t$this\t->\tgetEntity();\r\n\t\t\t\r\n\t\t\t$_entityName\t=\t$Request\t->\tgetName();\r\n\t\t\t\r\n $_columns = $Request -> getColumns();\r\n \r\n foreach($_columns as $_column){\r\n \r\n $_column_name = $_column -> getName();\r\n $_column_datatype = $_column -> getDatatype();\r\n $_column_length = $_column -> getLength();\r\n $_column_default_value = $_column -> getDefaultValue();\r\n \r\n $string .= $_column_name.\" \".$_column_datatype.\"(\".$_column_length.\")\" .$_column_default_value.\",\";\r\n \r\n if($_column->isDiscriminator()) $p_key = $_column_name; \r\n }\r\n\r\n\t\t\t/*\r\n\t\t\t**\tBuilding the query string\r\n\t\t\t*/ \r\n \r\n $_query = \"CREATE TABLE \".\" \".$_entityName.\" (\".$string.\" PRIMARY KEY( \".$p_key.\" )) ENGINE = \".$Request->getEngine();\r\n\t\t\r\n\t\t\t$this\t->\tsetSQLQuery($_query);\r\n\t\t\t\r\n\t\t\t$this\t->\tsetQueryType(\"create table\");\r\n\t\t\t\r\n\t\t}", "title": "" }, { "docid": "d98de0f05931ad72681d04c05c33715e", "score": "0.60356086", "text": "public function run()\r\n {\r\n DB::table('research_statuses')->insert([\r\n [\r\n 'created_at' => \\Carbon\\Carbon::now(),\r\n 'updated_at' => \\Carbon\\Carbon::now(),\r\n 'created_by' => 1,\r\n 'title' => 'Available',\r\n 'display_class' => 'btn-success',\r\n 'status' => 1\r\n ],\r\n [\r\n 'created_at' => \\Carbon\\Carbon::now(),\r\n 'updated_at' => \\Carbon\\Carbon::now(),\r\n 'created_by' => 1,\r\n 'title' => 'Issued',\r\n 'display_class' => 'btn-primary',\r\n 'status' => 1\r\n ],\r\n [\r\n 'created_at' => \\Carbon\\Carbon::now(),\r\n 'updated_at' => \\Carbon\\Carbon::now(),\r\n 'created_by' => 1,\r\n 'title' => 'Damage',\r\n 'display_class' => 'btn-danger',\r\n 'status' => 1\r\n ],\r\n [\r\n 'created_at' => \\Carbon\\Carbon::now(),\r\n 'updated_at' => \\Carbon\\Carbon::now(),\r\n 'created_by' => 1,\r\n 'title' => 'Lost',\r\n 'display_class' => 'btn-default',\r\n 'status' => 1\r\n ]\r\n ]);\r\n }", "title": "" }, { "docid": "9fea8b632db716c11ccdc1c9feb94901", "score": "0.6035218", "text": "public function run()\n {\n Status::truncate();\n\n $status = [\n ['id' => '1', 'name' => 'В складе', 'available' => '1'],\n ['id' => '2', 'name' => 'Запрещен', 'available' => '1'],\n ['id' => '3', 'name' => 'Отправлен', 'available' => '1'],\n ];\n\n Status::insert($status);\n }", "title": "" }, { "docid": "b927db4ef55d0e91888f244e019ce43b", "score": "0.6032578", "text": "protected function checkAndCreateTables()\r\n {\r\n $sql = 'CREATE TABLE IF NOT EXISTS `' . $this->tableName. '` (\r\n `id` int(11) NOT NULL AUTO_INCREMENT,\r\n `name` varchar(32) COLLATE utf8_unicode_ci NOT NULL,\r\n `surname` varchar(32) COLLATE utf8_unicode_ci NOT NULL,\r\n `phone` varchar(32) COLLATE utf8_unicode_ci NOT NULL,\r\n `number` int(11) NOT NULL,\r\n `gb` int(11) NOT NULL,\r\n PRIMARY KEY (`id`)\r\n ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci';\r\n \r\n $this->db->query($sql);\r\n }", "title": "" }, { "docid": "7fe835464e53d5a78a092c6704b3e2bb", "score": "0.6032549", "text": "public function run()\n {\n OrderStatus::create([\n 'title' => 'В обработке',\n ]);\n\n OrderStatus::create([\n 'title' => 'Подтвержден',\n ]);\n\n OrderStatus::create([\n 'title' => 'Принят',\n ]);\n\n OrderStatus::create([\n 'title' => 'Курьер едет в пункт A',\n ]);\n\n OrderStatus::create([\n 'title' => 'Груз получен',\n ]);\n\n OrderStatus::create([\n 'title' => 'Курьер едет в пункт B',\n ]);\n\n OrderStatus::create([\n 'title' => 'Груз доставлен',\n ]);\n\n OrderStatus::create([\n 'title' => 'Отменен',\n ]);\n }", "title": "" }, { "docid": "971d7937117461fb77d2e23b758663c4", "score": "0.6027705", "text": "private function createTable() {\n\t\t$stringType = defined('Doctrine\\DBAL\\Types\\Types::STRING') ? Types::STRING : Type::STRING;\n\t\t$arrayType = defined('Doctrine\\DBAL\\Types\\Types::ARRAY') ? Types::ARRAY : Type::TARRAY;\n\n\t\t$table = new Table(self::TABLE, [\n\t\t\tnew Column($this->keyColumn, Type::getType($stringType)),\n\t\t\tnew Column($this->valueColumn, Type::getType($arrayType)),\n\t\t]);\n\n\t\t$table->setPrimaryKey([$this->keyColumn]);\n\t\t$this->schemaManager->createTable($table);\n\t}", "title": "" }, { "docid": "f02d8b3de09017df15bfff541b29dc47", "score": "0.60009074", "text": "public function create_tables()\n {\n Menu::build();\n }", "title": "" }, { "docid": "d2ff2ff82ea76645b278fd407578ddc0", "score": "0.6000499", "text": "protected function db_create_table() {\n $query = sprintf(\n 'CREATE TABLE IF NOT EXISTS `%s` (' . PHP_EOL .\n ' `filename` VARCHAR(250) NOT NULL,' . PHP_EOL .\n ' `script` LONGTEXT,' . PHP_EOL .\n ' `date_applied` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,' . PHP_EOL .\n ' PRIMARY KEY(`filename`)' . PHP_EOL .\n ') ENGINE=%s DEFAULT CHARSET=%s',\n $this->config['mysql']['table'],\n $this->config['mysql']['engine'],\n $this->config['mysql']['charset']\n );\n if (isset($this->options['dry-run'])) {\n $this->message($query);\n } else {\n $this->query($query);\n }\n }", "title": "" }, { "docid": "9661ee0e8f242878c614020983800abd", "score": "0.59855163", "text": "public function run()\n {\n //\n Status::create([\n 'statusName' => 'Waiting PM RA'\n ]);\n\n Status::create([\n 'statusName' => 'Waiting Dev RA'\n ]);\n\n Status::create([\n 'statusName' => 'Begin Development'\n ]);\n\n Status::create([\n 'statusName' => 'Complete'\n ]);\n\n }", "title": "" }, { "docid": "7fe9a04c12b9603f0c17707f69a98b6c", "score": "0.5974999", "text": "public function run()\n {\n DB::table('EventStatus')->insert(['status' => 'Pending']);\n DB::table('EventStatus')->insert(['status' => 'Valid']);\n DB::table('EventStatus')->insert(['status' => 'Invalid']);\n }", "title": "" }, { "docid": "3cf9527ccda888ffa09813dcd5b115d6", "score": "0.59693265", "text": "public function run()\n {\n DB::table('status')->insert([\n 'name' => 'recibido',\n 'color' => '#CA422F',\n 'is_final' => false,\n ]);\n DB::table('status')->insert([\n 'name' => 'en preparación',\n 'color' => '#E39800',\n 'is_final' => false,\n ]);\n DB::table('status')->insert([\n 'name' => 'preparado',\n 'color' => '#346AB9',\n 'is_final' => false,\n ]);\n DB::table('status')->insert([\n 'name' => 'en camino',\n 'color' => '#56BCF2',\n 'is_final' => false,\n ]);\n DB::table('status')->insert([\n 'name' => 'entregado',\n 'color' => '#3AA346',\n 'is_final' => true,\n ]);\n DB::table('status')->insert([\n 'name' => 'cancelado',\n 'color' => '#0D0D0D',\n 'is_final' => true,\n ]);\n }", "title": "" }, { "docid": "2dcd77050ddebdfb545b829c6e7a07ab", "score": "0.59657604", "text": "function create_userstatus($userstatus)\t{\n $this->insert_record('block_ilp_user_status',$userstatus);\n }", "title": "" }, { "docid": "d3fb16d17cfdd7d4419c39ace961db17", "score": "0.5965508", "text": "private static function create_table() {\n global $wpdb;\n\n $wpTrackUsers = $wpdb->prefix.'track_users';\n\n // Check for the WP create function, and if one is not present, load the script with it\n if (!function_exists('maybe_create_table')) {\n require_once ABSPATH . 'wp-admin/install-helper.php';\n }\n\n $wpTrackUsersSQL = '\n CREATE TABLE `'.$wpdb->prefix.'track_users` (\n `id` int unsigned NOT NULL AUTO_INCREMENT,\n `site_url` varchar(255) DEFAULT NULL,\n `user_ip` varbinary(16) DEFAULT NULL,\n `browser_info` json DEFAULT NULL,\n `date_visited` datetime DEFAULT CURRENT_TIMESTAMP,\n PRIMARY KEY (`id`)\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n ';\n\n maybe_create_table($wpTrackUsers, $wpTrackUsersSQL);\n }", "title": "" }, { "docid": "24c257e0beb8aef2ad740d2f8ddb0837", "score": "0.5965077", "text": "public function run()\n {\n DB::table('statuses')->insert([\n 'name' => 'Active',\n 'alias' => 'active',\n ]);\n DB::table('statuses')->insert([\n 'name' => 'Blocked',\n 'alias' => 'blocked'\n ]);\n DB::table('statuses')->insert([\n 'name' => 'Deactive',\n 'alias' => 'deactive'\n ]);\n DB::table('statuses')->insert([\n 'name' => 'Pending',\n 'alias' => 'pending',\n ]);\n }", "title": "" }, { "docid": "60a3524367c96389d5a34023f69a91d4", "score": "0.5963466", "text": "public function run()\n {\n PurchaseStatus::create([\n 'user' => '1',\n 'name' => 'Received',\n ]);\n PurchaseStatus::create([\n 'user' => '1',\n 'name' => 'Partial',\n ]);\n PurchaseStatus::create([\n 'user' => '1',\n 'name' => 'Pending',\n ]);\n PurchaseStatus::create([\n 'user' => '1',\n 'name' => 'Ordered',\n ]);\n }", "title": "" }, { "docid": "a596b09b299c2e4a268f8a2016118b2e", "score": "0.5946586", "text": "protected function createMigrationHistoryTable()\n {\n $tableName = $this->db->schema->getRawTableName($this->migrationTable);\n $this->stdout(\"Creating migration history table \\\"$tableName\\\"...\", Console::FG_YELLOW);\n $this->db->createCommand()->createTable($this->migrationTable, [\n 'version' => 'varchar(' . static::MAX_NAME_LENGTH . ') NOT NULL PRIMARY KEY',\n 'apply_time' => 'integer',\n 'suffix' => 'varchar(' . static::MAX_NAME_LENGTH . ') NOT NULL'\n ])->execute();\n $this->db->createCommand()->insert($this->migrationTable, [\n 'version' => self::BASE_MIGRATION,\n 'apply_time' => time(),\n 'suffix' => $this->suffix\n ])->execute();\n $this->stdout(\"Done.\\n\", Console::FG_GREEN);\n }", "title": "" }, { "docid": "b5f87bca468cab2f3e1c02bd8ae67fa1", "score": "0.59463555", "text": "public function run()\n {\n \tDB::table('statuses')->insert([\n \t\t['status' => 'PLANNED'],\n \t\t['status' => 'IN PROGRESS'],\n \t\t['status' => 'CANCELED'],\n \t\t['status' => 'ACHIEVED'],\n \t\t['status' => 'FINNISHED'],\n\t\t]);\n }", "title": "" }, { "docid": "0f36341f52244070da110566cd45b23b", "score": "0.5944132", "text": "public function createStatus()\n {\n return new Status(new Validator(), new Info());\n }", "title": "" }, { "docid": "96b1e5c3e9170f86f779cc0e5165f55a", "score": "0.59355557", "text": "public function createTable(){\n\t\t\t$t = new WebLab_Data_Table( static::table() );\n\t\t\treturn $t->addFields( static::$_fields );\n\t\t}", "title": "" }, { "docid": "f02cdfbf832e1b017c7e72360d4dba9f", "score": "0.59346014", "text": "public function run()\n {\n DB::table('ticket_statuses')->insert ([\n 'name' => 'Pending'\n ]); \n DB::table('ticket_statuses')->insert ([\n 'name' => 'Accepted'\n ]);\n DB::table('ticket_statuses')->insert ([\n 'name' => 'Rejected'\n ]);\n DB::table('ticket_statuses')->insert ([\n 'name' => 'Completed'\n ]);\n DB::table('ticket_statuses')->insert ([\n 'name' => 'Cancelled'\n ]);\n }", "title": "" }, { "docid": "790e05a780545a3dd9af04c06fc8b6c6", "score": "0.59263617", "text": "public function create_tables()\n\t{\n\t\t$this->user->create_tables();\n\t\t$this->site->create_tables();\n\t\t$this->upload->create_tables();\n\t}", "title": "" }, { "docid": "0baf8a09b39a41fa8157aba95499225b", "score": "0.59263057", "text": "public function initialize()\n\t{\n\t\t$this->clear();\n\t\t$this->dropAll();\n\t\t$result = $this->executeQuery(\"CREATE TABLE \" . Person::TABLENAME . \" (\" . Person::SQLcolumns . \");\");\n\n\t\tif ($result)\n\t\t{\n\t\t\t$result = $this->executeQuery(\"CREATE TABLE \" . User::TABLENAME . \" (\" . User::SQLcolumns . \");\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->showError();\n\t\t}\n\n\t\tif ($result)\n\t\t{\n\t\t\t$result = $this->executeQuery(\"CREATE TABLE \" . PersonStatus::TABLENAME . \" (\" . PersonStatus::SQLcolumns . \");\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->showError();\n\t\t}\n\n\t\tif ($result)\n\t\t{\n\t\t\t$result = $this->executeQuery(\"CREATE TABLE \" . Timetable::TABLENAME . \" (\" . Timetable::SQLcolumns . \");\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->showError();\n\t\t}\n\n\t\tif ($result)\n\t\t{\n\t\t\t$result = $this->executeQuery(\"CREATE TABLE \" . Group::TABLENAME . \" (\" . Group::SQLcolumns . \");\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->showError();\n\t\t}\n\n\t\tif ($result)\n\t\t{\n\t\t\t$result = $this->executeQuery(\"CREATE TABLE \" . Group::composedOfTABLENAME . \" (\" . Group::composedOfSQLcolumns . \");\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->showError();\n\t\t}\n\n\t\tif ($result)\n\t\t{\n\t\t\t$result = $this->executeQuery(\"CREATE TABLE \" . Group::linkedToTABLENAME . \" (\" . Group::linkedToSQLcolumns . \");\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->showError();\n\t\t}\n\n\t\tif ($result)\n\t\t{\n\t\t\t$result = $this->executeQuery(\"CREATE TABLE \" . Subject::TABLENAME . \" (\" . Subject::SQLcolumns . \");\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->showError();\n\t\t}\n\n\t\tif ($result)\n\t\t{\n\t\t\t$result = $this->executeQuery(\"CREATE TABLE \" . Course::TABLENAME . \" (\" . Course::SQLcolumns . \");\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->showError();\n\t\t}\n\n\t\tif ($result)\n\t\t{\n\t\t\t$result = $this->executeQuery(\"CREATE TABLE \" . Course::belongsToTABLENAME . \" (\" . Course::belongsToSQLcolumns . \");\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->showError();\n\t\t}\n\n\t\tif ($result)\n\t\t{\n\t\t\t$result = $this->executeQuery(\"CREATE TABLE \" . Modification::TABLENAME . \" (\" . Modification::SQLcolumns . \");\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->showError();\n\t\t}\n\t\t/*** TODO Autres tables ***/\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "2f22fe7aafe34aa7dec8f6931e312554", "score": "0.59253615", "text": "public function run()\n {\n\t\tApp\\JobStatus::create([\n\t\t\t'nameA' => 'حالة 1',\n\t\t\t'nameE' => 'Status 1',\n\t\t\t'courseFees' => 15,\n\t\t\t'statusOrder' => 1\n\t\t]);\n\n\t\tApp\\JobStatus::create([\n\t\t\t'nameA' => 'حالة 2',\n\t\t\t'nameE' => 'Status 2',\n\t\t\t'courseFees' => 20,\n\t\t\t'statusOrder' => 2\n\t\t]);\n\n\t\tApp\\JobStatus::create([\n\t\t\t'nameA' => 'حالة 3',\n\t\t\t'nameE' => 'Status 3',\n\t\t\t'courseFees' => 25,\n\t\t\t'statusOrder' => 3\n\t\t]);\n\n\t\tApp\\JobStatus::create([\n\t\t\t'nameA' => 'حالة 4',\n\t\t\t'nameE' => 'Status 4',\n\t\t\t'courseFees' => 30,\n\t\t\t'statusOrder' => 4\n\t\t]);\n\n\t\tApp\\JobStatus::create([\n\t\t\t'nameA' => 'حالة 5',\n\t\t\t'nameE' => 'Status 5',\n\t\t\t'courseFees' => 35,\n\t\t\t'statusOrder' => 5\n\t\t]);\n }", "title": "" }, { "docid": "6e7276e01d1e8de98a651a337da33414", "score": "0.59177583", "text": "public function run()\n {\n $active = new Status;\n $active->acc_status = \"Aktif\";\n $active->save();\n\n $suspend = new Status;\n $suspend->acc_status = \"Suspend\";\n $suspend->save();\n\n $nonactive = new Status;\n $nonactive->acc_status = \"Tidak Aktif\";\n $nonactive->save();\n }", "title": "" }, { "docid": "66c84dbd7b1ba1ea4cc9770c53760506", "score": "0.59136534", "text": "public function createTable() {\n\n\t\t$table=strtolower(get_class($this->base));\n\n\t\tif(!$this->provider->tableExists($table)) {\n\n\t\t\t$this->createEntity($table);\n\n\t\t} else {\n\n\t\t\t$this->alterEntity($this);\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "43d6c7e73d71d089653f125fefc50da1", "score": "0.59133255", "text": "function job_table() {\n global $wpdb;\n $table_name = $wpdb->prefix . 'apply_job';\n \n $sql = \"CREATE TABLE $table_name (\n id int NOT NULL AUTO_INCREMENT,\n name varchar(50) NOT NULL,\n email varchar(50) NOT NULL,\n edu varchar(50) NOT NULL,\n PRIMARY KEY (id)\n );\";\n require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n dbDelta( $sql );\n }", "title": "" }, { "docid": "d7f04f2cd928a3e2f2979cb04ffe46cd", "score": "0.5901603", "text": "public function run()\n {\n Status::create([\n \"name\" => \"Fine\"\n ]);\n Status::create([\n \"name\" => \"Hit\"\n ]);\n Status::create([\n \"name\" => \"Broken\"\n ]);\n Status::create([\n \"name\" => \"Scratched\"\n ]);\n }", "title": "" }, { "docid": "dfc73c3673157b70b404004e7977b096", "score": "0.5900238", "text": "public static function create_log_table() {\n\t\tglobal $wpdb;\n\t\t$table_name = $wpdb->prefix . \"assets_log\";\n\t\t$sql = \"CREATE TABLE $table_name (\n\t\t\tid int(11) NOT NULL AUTO_INCREMENT,\n\t\t\tlast_accessed TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,\t\t\t\n\t\t\tuID VARCHAR(7) NOT NULL DEFAULT 0,\n\t\t\taID int(11) NOT NULL DEFAULT 0,\n\t\t\tcount int(11) NOT NULL DEFAULT 0,\n\t\t\tUNIQUE KEY id (id)\n\t\t);\";\n\n\t\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\t\tdbDelta( $sql );\n\t}", "title": "" }, { "docid": "850355629c4e21b2346ac756720a4b69", "score": "0.5893492", "text": "function create(){\n\n // sanitize\n $this->statusName=htmlspecialchars(strip_tags($this->statusName));\n $this->statusColour=htmlspecialchars(strip_tags($this->statusColour));\n \n // insert query\n $query = \"INSERT INTO statusTypes (statusName, statusColour) VALUES ('$this->statusName', '$this->statusColour') \";\n\n // prepare the query\n $stmt = $this->conn->prepare($query);\n\n // execute the query, also check if query was successful\n if($stmt->execute()){\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "a0267a24ec381185e931b4b168f85473", "score": "0.5891934", "text": "public function run()\n {\n\n DB::table('payments_dict_status')->truncate();\n\n $value = array(\n array('id' => 1,'name' => 'Submitted','icon'=>'fa fa-plus-circle','color'=>'col-orange'),\n array('id' => 2,'name' => 'Approved','icon'=>'fa fa-check-circle-o','color'=>'col-green'),\n array('id' => 3,'name' => 'Declined','icon'=>'fa fa-truck','color'=>'col-blue')\n );\n\n $final = [];\n\n foreach ($value as $complete) {\n $complete['created_at'] = Carbon::now();\n\n $final[] = $complete;\n }\n\n DB::table('payments_dict_status')->insert($final);\n }", "title": "" }, { "docid": "48c4ab3c490f53019925558c6672a9b5", "score": "0.58903575", "text": "function createTable(){\n\t\t\t//Establishes a connection to the database\n\t\t\t$connection = new mysqli($this->servername, $this->username, $this->password, $this->dbname);\n\t\t\t\n\t\t\t//sql query\n\t\t\t$sql = \"CREATE TABLE \".$this->tablename.\"(\n\t\t\t\tid INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,\n\t\t\t\tfirstname VARCHAR(30) NOT NULL,\n\t\t\t\tlastname VARCHAR(30) NOT NULL,\n\t\t\t\temail VARCHAR(50) NOT NULL,\n\t\t\t\tpassword BINARY(32) NOT NULL)\";\n\t\t\t\n\t\t\tif($connection->query($sql)===TRUE){\n\t\t\t\techo \"Table Users successfully created!<br>\";\n\t\t\t}\n\t\t\telse{\n\t\t\t\techo \"Error creating table: \".$connection->error.\"<br>\";\n\t\t\t}\n\t\t\t//closes the connection to the database\n\t\t\t$connection->close();\n\t\t}", "title": "" }, { "docid": "3ff66b7268339b1d43880d0e9e36e3e7", "score": "0.5886348", "text": "public function run()\n {\n $status = config('variables.enterprise_status');\n \n $tmp_date = date('Y-m-d H:i:s');\n\n DB::table('enterprises_status')->insert([\n 'status' => 'NONE',\n 'created_at' => $tmp_date,\n 'updated_at' => $tmp_date \n ]);\n\n foreach ($status as $s) \n {\n $tmp_date = date('Y-m-d H:i:s');\n\n DB::table('enterprises_status')->insert([\n 'status' => $s,\n 'created_at' => $tmp_date,\n 'updated_at' => $tmp_date \n ]);\n }\n }", "title": "" }, { "docid": "aecd3671bcda967bada6ca4d808c5047", "score": "0.5873474", "text": "public function run()\n {\n DB::table('statuses')->delete();\n\n $items = [\n ['id' => '1', 'name' => 'Order Placed', 'percent' => '5'],\n ['id' => '2', 'name' => 'Order Confirmed', 'percent' => '25'],\n ['id' => '3', 'name' => 'Shipped', 'percent' => '50'],\n ['id' => '4', 'name' => 'Out for Delivery', 'percent' => '100'],\n ];\n\n foreach ($items as $item){\n Status::create($item);\n }\n }", "title": "" }, { "docid": "811cb103610405518085806e613d0368", "score": "0.58708036", "text": "public function createTable(){\n\t\t\t\n\t\t$sql = \"CREATE TABLE IF NOT EXISTS `core_units` (\n\t\t`id` int(11) NOT NULL AUTO_INCREMENT,\n\t\t`name` varchar(150) NOT NULL DEFAULT '',\n\t\t`address` varchar(350) NOT NULL DEFAULT '',\n\t\t`id_belonging` int(11) NOT NULL,\t\t\n\t\tPRIMARY KEY (`id`)\n\t\t);\";\n\t\t\n\t\t$pdo = $this->runRequest($sql);\n\t\t\n\t\t// add columns if no exists\n\t\t$sql = \"SHOW COLUMNS FROM `core_units` LIKE 'id_belonging'\";\n\t\t$pdo = $this->runRequest($sql);\n\t\t$isColumn = $pdo->fetch();\n\t\tif ( $isColumn == false){\n\t\t\t$sql = \"ALTER TABLE `core_units` ADD `id_belonging` int(11) NOT NULL DEFAULT 1\";\n\t\t\t$pdo = $this->runRequest($sql);\n\t\t}\n\t}", "title": "" }, { "docid": "5f95c803feb20061a572a44b10435b00", "score": "0.586551", "text": "public function run()\n {\n DB::table('statuses')->insert(array(\n array('name'=>'Active'),\n array('name'=>'Paid'),\n array('name'=>'Pending Files'),\n array('name'=>'Shipping'),\n array('name'=>'Shipped')\n ));\n }", "title": "" }, { "docid": "bbaf84dc2e42ca9f5ebeabb7e14df89c", "score": "0.5864431", "text": "private function createTable() {\n\t\t\tglobal $wpdb;\n\t\t\t\n\t\t\t// check if table exist, if not create table\n\t\t\t$table_name = $wpdb->prefix . \"psp_link_builder\";\n\t\t\tif ($wpdb->get_var( \"show tables like '$table_name'\" ) != $table_name) {\n\n\t\t\t\t$sql = \"\n\t\t\t\t\tCREATE TABLE IF NOT EXISTS \" . $table_name . \" (\n\t\t\t\t\t `id` int(10) NOT NULL AUTO_INCREMENT,\n\t\t\t\t\t `hits` int(10) DEFAULT '0',\n\t\t\t\t\t `url` varchar(200) DEFAULT NULL,\n\t\t\t\t\t `rel` enum('no','alternate','author','bookmark','help','license','next','nofollow','noreferrer','prefetch','prev','search','tag') DEFAULT 'no',\n\t\t\t\t\t `title` varchar(100) DEFAULT NULL,\n\t\t\t\t\t `target` enum('no','_blank','_parent','_self','_top') DEFAULT 'no',\n\t\t\t\t\t `phrase` varchar(100) DEFAULT NULL,\n\t\t\t\t\t `post_id` int(10) DEFAULT '0',\n\t\t\t\t\t `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\t\t\t\t\t `publish` char(1) DEFAULT 'Y',\n\t\t\t\t\t `max_replacements` smallint(2) DEFAULT '1',\n\t\t\t\t\t PRIMARY KEY (`id`),\n\t\t\t\t\t UNIQUE INDEX `unique` (`phrase`,`url`),\n\t\t\t\t\t KEY `publish` (`publish`),\n\t\t\t\t\t KEY `url` (`url`)\n\t\t\t\t\t);\n\t\t\t\t\t\";\n\t\t\t\t//KEY `deleted` (`deleted`,`publish`),\n\t\t\t\t//`deleted` smallint(1) DEFAULT '0',\n\n\t\t\t\trequire_once(ABSPATH . 'wp-admin/includes/upgrade.php');\n\n\t\t\t\tdbDelta($sql);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "beb831aa5bce2ca98f936ff0525773cf", "score": "0.5863184", "text": "protected function createMigrationHistoryTable()\n {\n $tableName = $this->db->schema->getRawTableName($this->migrationTable);\n $this->db->createCommand()->createTable($this->migrationTable, [\n 'version' => 'varchar(' . static::MAX_NAME_LENGTH . ') NOT NULL PRIMARY KEY',\n 'apply_time' => 'integer',\n ])->execute();\n $this->db->createCommand()->insert($this->migrationTable, [\n 'version' => self::BASE_MIGRATION,\n 'apply_time' => time(),\n ])->execute();\n }", "title": "" }, { "docid": "080f40934f805d61fd0e3548ee5c2ce9", "score": "0.5861699", "text": "public function run()\n {\n DB::table('sub_statuses')->delete();\n DB::table('statuses')->delete();\n\n $phasePending = 1;\n $phaseOngoing = 1;\n\n $status = array(\n\n array(\n 'uuid' => Str::uuid('uuid'),\n 'user_id' => 1,\n 'name' => 'Pending',\n 'ranking' => 1,\n ),\n array(\n 'uuid' => Str::uuid('uuid'),\n 'user_id' => 1,\n 'name' => 'Ongoing',\n 'ranking' => 2,\n ),\n array(\n 'uuid' => Str::uuid('uuid'),\n 'user_id' => 1,\n 'name' => 'Cancelled',\n 'ranking' => 3,\n ),\n array(\n 'uuid' => Str::uuid('uuid'),\n 'user_id' => 1,\n 'name' => 'Completed',\n 'ranking' => 4,\n ),\n\n );\n\n $subStatuses = array(\n array(\n 'user_id' => 1,\n 'uuid' => '8e4521a1-3329-4a76-b2fd-a674683002e3',\n 'status_id' => 1,\n 'name' => 'Pending',\n 'phase' => $phasePending++,\n 'recurrence' => 'No',\n 'status' => 'active',\n ),\n array(\n 'user_id' => 1,\n 'uuid' => '3f8d1494-a53b-4671-8447-10d3ca92b270',\n 'status_id' => 1,\n 'name' => 'FixMaster AI assigned a CSE',\n 'phase' => $phasePending++,\n 'recurrence' => 'No',\n 'status' => 'active',\n ),\n array(\n 'user_id' => 1,\n 'uuid' => '15f402e8-cb1c-48aa-ac0b-727a24d14c3d',\n 'status_id' => 1,\n 'name' => 'FixMaster AI assigned a Franchise as fallback',\n 'phase' => $phasePending++,\n 'recurrence' => 'No',\n 'status' => 'active',\n ),\n array(\n 'user_id' => 1,\n 'uuid' => '8ed4b1b6-b83c-4073-bb80-b10810566ad9',\n 'status_id' => 1,\n 'name' => 'FixMaster Admin assigned a CSE',\n 'phase' => $phasePending++,\n 'recurrence' => 'Yes',\n 'status' => 'active',\n ),\n array(\n 'user_id' => 1,\n 'uuid' => 'dd415ab5-437a-46d5-93b1-84fbd4d67edf',\n 'status_id' => 1,\n 'name' => 'Fanchisee assigned a CSE',\n 'phase' => $phasePending++,\n 'recurrence' => 'Yes',\n 'status' => 'active',\n ),\n array(\n 'user_id' => 1,\n 'uuid' => '7337bdd3-2ed9-4a2b-a5bb-b526d86f039b',\n 'status_id' => 2,\n 'name' => 'FixMaster Admin assigned a Technician',\n 'phase' => $phaseOngoing++,\n 'recurrence' => 'Yes',\n 'status' => 'active',\n ),\n array(\n 'user_id' => 1,\n 'uuid' => '87197a34-61a2-4858-bece-f1e3f0f985c5',\n 'status_id' => 2,\n 'name' => 'FixMaster Admin assigned a Quality Assurance',\n 'phase' => $phaseOngoing++,\n 'recurrence' => 'Yes',\n 'status' => 'active',\n ),\n array(\n 'user_id' => 1,\n 'uuid' => 'cee7aa41-2818-497b-98e2-b850a100741a',\n 'status_id' => 2,\n 'name' => 'CSE accepted the job',\n 'phase' => $phaseOngoing++,\n 'recurrence' => 'No',\n 'status' => 'active',\n ),\n [\n 'user_id' => 1,\n 'uuid' => 'ab43a32e-709e-4bf9-bba2-78828d2cfda9',\n 'status_id' => 2,\n 'name' => 'CSE added comment',\n 'phase' => $phaseOngoing++,\n 'recurrence' => 'No',\n 'status' => 'active',\n ],\n [\n 'user_id' => 1,\n 'uuid' => '22821883-fc00-4366-9c29-c7360b7c2efc',\n 'status_id' => 2,\n 'name' => 'Scheduled diagnosis date for Client',\n 'phase' => $phaseOngoing++,\n 'recurrence' => 'No',\n 'status' => 'active',\n ],\n array(\n 'user_id' => 1,\n 'uuid' => 'd258667a-1953-4c66-b746-d0c40de7189d',\n 'status_id' => 2,\n 'name' => 'Re-Categorize the Service request',\n 'phase' => $phaseOngoing++,\n 'recurrence' => 'Yes',\n 'status' => 'active',\n ),\n array(\n 'user_id' => 1,\n 'uuid' => 'e59c3305-45ce-4d8e-b5ab-a5f4e9d40aca',\n 'status_id' => 2,\n 'name' => 'CSE assigned a Quality Assurance',\n 'phase' => $phaseOngoing++,\n 'recurrence' => 'Yes',\n 'status' => 'active',\n ),\n\n array(\n 'user_id' => 1,\n 'uuid' => '1faffcc3-7404-4fad-87a7-97161d3b8546',\n 'status_id' => 2,\n 'name' => 'Assigned a Technician',\n 'phase' => $phaseOngoing++,\n 'recurrence' => 'No',\n 'status' => 'active',\n ),\n array(\n 'user_id' => 1,\n 'uuid' => 'eb51cdd5-3c3a-48c9-b011-cc3fd2bc3e25',\n 'status_id' => 2,\n 'name' => 'En-route to Client\\'s address',\n 'phase' => $phaseOngoing++,\n 'recurrence' => 'Yes',\n 'status' => 'active',\n ),\n array(\n 'user_id' => 1,\n 'uuid' => '4909568f-389c-42de-9d13-91453c495813',\n 'status_id' => 2,\n 'name' => 'Arrived at Client\\'s address',\n 'phase' => $phaseOngoing++,\n 'recurrence' => 'Yes',\n 'status' => 'active',\n ),\n array(\n 'user_id' => 1,\n 'uuid' => 'e52afda2-8605-4ec9-9682-c11008a434d1',\n 'status_id' => 2,\n 'name' => 'Work in progress',\n 'phase' => $phaseOngoing++,\n 'recurrence' => 'Yes',\n 'status' => 'active',\n ),\n array(\n 'user_id' => 1,\n 'uuid' => 'c6a7481a-182b-410b-adae-0451f3da260b',\n 'status_id' => 2,\n 'name' => 'Job completed for the day and it\\'s to continue on a scheduled date',\n 'phase' => $phaseOngoing++,\n 'recurrence' => 'Yes',\n 'status' => 'active',\n ),\n array(\n 'user_id' => 1,\n 'uuid' => '0b8b6887-7cff-4eca-9cb1-5a5db693332d',\n 'status_id' => 2,\n 'name' => 'Job is fully completed',\n 'phase' => $phaseOngoing++,\n 'recurrence' => 'No',\n 'status' => 'active',\n ),\n array(\n 'user_id' => 1,\n 'uuid' => 'b8abbe05-209f-4eeb-8cdb-cef0a354f160',\n 'status_id' => 2,\n 'name' => 'Perfoming diagnosis',\n 'phase' => $phaseOngoing++,\n 'recurrence' => 'No',\n 'status' => 'active',\n ),\n array(\n 'user_id' => 1,\n 'uuid' => 'f95c31c6-6667-4a64-bee3-8aa4b5b943d3',\n 'status_id' => 2,\n 'name' => 'Completed diagnosis',\n 'phase' => $phaseOngoing++,\n 'recurrence' => 'No',\n 'status' => 'active',\n ),\n array(\n 'user_id' => 1,\n 'uuid' => '17e3ce54-2089-4ff7-a2c1-7fea407df479',\n 'status_id' => 2,\n 'name' => 'Client accepted Diagnosis Invoice',\n 'phase' => $phaseOngoing++,\n 'recurrence' => 'No',\n 'status' => 'active',\n ),\n array(\n 'user_id' => 1,\n 'uuid' => 'c0cce9c8-1fce-47c4-9529-204f403cdb1f',\n 'status_id' => 2,\n 'name' => 'Client declined Diagnosis Invoice',\n 'phase' => $phaseOngoing++,\n 'recurrence' => 'No',\n 'status' => 'active',\n ),\n array(\n 'user_id' => 1,\n 'uuid' => '2c818bc3-3f19-4574-99e7-e4f0db0bca2d',\n 'status_id' => 2,\n 'name' => 'Issued Final Invoice to Client',\n 'phase' => $phaseOngoing++,\n 'recurrence' => 'No',\n 'status' => 'active',\n ),\n array(\n 'user_id' => 1,\n 'uuid' => 'b82ea1c6-fc12-46ec-8138-a3ed7626e0a4',\n 'status_id' => 2,\n 'name' => 'Client accepted Final Invoice',\n 'phase' => $phaseOngoing++,\n 'recurrence' => 'No',\n 'status' => 'active',\n ),\n array(\n 'user_id' => 1,\n 'uuid' => '8936191d-03ad-4bfa-9c71-e412ee984497',\n 'status_id' => 2,\n 'name' => 'Client declined Final Invoice',\n 'phase' => $phaseOngoing++,\n 'recurrence' => 'No',\n 'status' => 'active',\n ),\n array(\n 'user_id' => 1,\n 'uuid' => 'c615f5ce-fe3b-43f7-9125-d6568eddf1c5',\n 'status_id' => 2,\n 'name' => 'A supplier sent an invoice',\n 'phase' => $phaseOngoing++,\n 'recurrence' => 'Yes',\n 'status' => 'active',\n ),\n array(\n 'user_id' => 1,\n 'uuid' => '124d3a2d-6efc-4279-a156-438080c33374',\n 'status_id' => 2,\n 'name' => 'FixMaster Admin accepted a Supplier\\'s invoice',\n 'phase' => $phaseOngoing++,\n 'recurrence' => 'Yes',\n 'status' => 'active',\n ),\n array(\n 'user_id' => 1,\n 'uuid' => 'e393aff9-016f-48f1-a6bc-44d5e133c290',\n 'status_id' => 2,\n 'name' => 'Supplier attached RFQ dispatch code',\n 'phase' => $phaseOngoing++,\n 'recurrence' => 'Yes',\n 'status' => 'active',\n ),\n [\n 'user_id' => 1,\n 'uuid' => '73c2b038-4127-4085-a407-f75152a02315',\n 'status_id' => 2,\n 'name' => 'CSE accepted RFQ delivered by supplier',\n 'phase' => $phaseOngoing++,\n 'recurrence' => 'Yes',\n 'status' => 'active',\n ],\n [\n 'user_id' => 1,\n 'uuid' => '1d3baa2b-25ec-4790-937e-90cc6a625178',\n 'status_id' => 2,\n 'name' => 'CSE declined RFQ delivered by supplier',\n 'phase' => $phaseOngoing++,\n 'recurrence' => 'Yes',\n 'status' => 'active',\n ],\n array(\n 'user_id' => 1,\n 'uuid' => 'b5f67788-4e15-48b8-a97f-6781e8175332',\n 'status_id' => 2,\n 'name' => 'Client accepted RFQ delivered by supplier',\n 'phase' => $phaseOngoing++,\n 'recurrence' => 'Yes',\n 'status' => 'active',\n ),\n array(\n 'user_id' => 1,\n 'uuid' => 'ad5b2b91-db86-4dcb-9ba5-a4e89b6238d5',\n 'status_id' => 2,\n 'name' => 'Client declined RFQ delivered by supplier',\n 'phase' => $phaseOngoing++,\n 'recurrence' => 'Yes',\n 'status' => 'active',\n ),\n array(\n 'user_id' => 1,\n 'uuid' => '2df4da1e-6c07-402c-a316-0378d37e50a1',\n 'status_id' => 2,\n 'name' => 'Issued a new RFQ',\n 'phase' => $phaseOngoing++,\n 'recurrence' => 'Yes',\n 'status' => 'active',\n ),\n array(\n 'user_id' => 1,\n 'uuid' => '1abe702c-e6b1-422f-9145-810394f92e1d',\n 'status_id' => 2,\n 'name' => 'Issued a new Tool Request',\n 'phase' => $phaseOngoing++,\n 'recurrence' => 'Yes',\n 'status' => 'active',\n ),\n array(\n 'user_id' => 1,\n 'uuid' => '70583091-9f95-4f3a-9d57-655e55d471e8',\n 'status_id' => 2,\n 'name' => 'Awaiting Supplier\\'s feedback on RFQ intiated as part of Final Invoice issued',\n 'phase' => $phaseOngoing++,\n 'recurrence' => 'Yes',\n 'status' => 'active',\n ),\n array(\n 'user_id' => 1,\n 'uuid' => 'ef8c69e8-5634-4bd0-a7e6-b73a89ae034f',\n 'status_id' => 2,\n 'name' => 'Supplier Dispatch: Pending',\n 'phase' => $phaseOngoing++,\n 'recurrence' => 'Yes',\n 'status' => 'active',\n ),\n array(\n 'user_id' => 1,\n 'uuid' => 'ee55201e-75a3-461a-b174-3a0537ee8e0c',\n 'status_id' => 2,\n 'name' => 'Supplier Dispatch: Materials are being Processed',\n 'phase' => $phaseOngoing++,\n 'recurrence' => 'Yes',\n 'status' => 'active',\n ),\n array(\n 'user_id' => 1,\n 'uuid' => '6e266cf8-7eeb-49be-86ad-375c7c7416fa',\n 'status_id' => 2,\n 'name' => 'Supplier Dispatch: Materials are In-transit',\n 'phase' => $phaseOngoing++,\n 'recurrence' => 'Yes',\n 'status' => 'active',\n ),\n array(\n 'user_id' => 1,\n 'uuid' => '3ec28d52-2bd3-446a-985c-3bf622f9f445',\n 'status_id' => 2,\n 'name' => 'Supplier Dispatch: Materials have been Delivered',\n 'phase' => $phaseOngoing++,\n 'recurrence' => 'Yes',\n 'status' => 'active',\n ),\n array(\n 'user_id' => 1,\n 'uuid' => 'bd2ab8b8-9f0b-4b8e-afa9-130c837ecbd1',\n 'status_id' => 2,\n 'name' => 'CSE aknowledged Supplier\\'s dispatch delivery',\n 'phase' => $phaseOngoing++,\n 'recurrence' => 'Yes',\n 'status' => 'active',\n ),\n\n array(\n 'user_id' => 1,\n 'uuid' => '06dda2af-3831-41af-854d-595e4f6f6b77',\n 'status_id' => 3,\n 'name' => 'Client cancelled job request',\n 'phase' => 1,\n 'recurrence' => 'No',\n 'status' => 'active',\n ),\n array(\n 'user_id' => 1,\n 'uuid' => '8aebf411-23ba-4ad0-8890-0918ac239376',\n 'status_id' => 3,\n 'name' => 'Admin cancelled job request',\n 'phase' => 2,\n 'recurrence' => 'No',\n 'status' => 'active',\n ),\n array(\n 'user_id' => 1,\n 'uuid' => 'fca5a961-39d4-42e5-be9d-20e4b579d4b1',\n 'status_id' => 4,\n 'name' => 'Client marked job as completed',\n 'phase' => 1,\n 'recurrence' => 'No',\n 'status' => 'active',\n ),\n array(\n 'user_id' => 1,\n 'uuid' => 'ce316687-62d8-45a9-a1b9-f75da104fc18',\n 'status_id' => 4,\n 'name' => 'Admin marked job as completed',\n 'phase' => 2,\n 'recurrence' => 'No',\n 'status' => 'active',\n ),\n\n );\n\n DB::table('statuses')->insert($status);\n DB::table('sub_statuses')->insert($subStatuses);\n }", "title": "" }, { "docid": "84987c8335e2767c622739913b506cb0", "score": "0.5847582", "text": "protected static function createDbTable()\n\t{\n\t\t$sql = file_get_contents(dirname(__FILE__).'/user_oauth.sql');\n\t\t$sql = strtr($sql, array('{{user_oauth}}' => Yii::app()->db->tablePrefix . 'user_oauth'));\n\t\tYii::app()->db->createCommand($sql)->execute();\n\t}", "title": "" }, { "docid": "8e5bd07bdb3684822cb084904c2d0afd", "score": "0.58462197", "text": "public function create_schema_version_table()\n {\n if (!$this->has_table($this->get_schema_version_table_name())) {\n $t = $this->create_table($this->get_schema_version_table_name(), array('id' => false));\n $t->column('version', 'string');\n $t->finish();\n $this->add_index($this->get_schema_version_table_name(), 'version', array('unique' => true));\n }\n }", "title": "" }, { "docid": "f9af9fa655eb95255605bccb0410a50c", "score": "0.58460474", "text": "static function allocTableExists($status=null)\r\n\t{\r\n\t\t$sql = \"select 1 from redcap_randomization_allocation a, redcap_randomization r \r\n\t\t\t\twhere r.project_id = \" . PROJECT_ID . \" and r.rid = a.rid\";\r\n\t\tif ($status == '0' || $status == '1') {\r\n\t\t\t$sql .= \" and a.project_status = $status\";\r\n\t\t}\t\t\r\n\t\t$sql .= \" limit 1\";\r\n\t\t$q = db_query($sql);\r\n\t\treturn ($q && db_num_rows($q) > 0);\r\n\t}", "title": "" }, { "docid": "4b0276112175c1e47a4298d9f2a48547", "score": "0.5845563", "text": "private function create_tables() {\n\t\tglobal $wpdb;\n\t\t$charset_collate = $wpdb->get_charset_collate();\n\t\t$schema = \"CREATE TABLE IF NOT EXISTS `{$wpdb->prefix}applicant_submissions` (\n\t\t\t\t\t\t\t `id` int unsigned NOT NULL AUTO_INCREMENT,\n\t\t\t\t\t\t\t `first_name` varchar(100) DEFAULT NULL,\n\t\t\t\t\t\t\t `last_name` varchar(100) DEFAULT NULL,\n\t\t\t\t\t\t\t `present_address` text ,\n\t\t\t\t\t\t\t `email` varchar(150) DEFAULT NULL,\n\t\t\t\t\t\t\t `phone` varchar(20) DEFAULT NULL,\n\t\t\t\t\t\t\t `post_name` varchar(150) DEFAULT NULL,\n\t\t\t\t\t\t\t `cv` int DEFAULT NULL,\n\t\t\t\t\t\t\t `created_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\t\t\t\t\t\t\t PRIMARY KEY (`id`)\n\t\t\t\t\t\t\t) {$charset_collate}\";\n\n\t\tif ( ! function_exists( 'dbDelta' ) ) {\n\t\t\trequire_once ABSPATH . '/wp-admin/includes/upgrade.php';\n\t\t}\n\t\tdbDelta( $schema );\n\t}", "title": "" }, { "docid": "0b9ad3d766ec5831d9d300bf92a967f8", "score": "0.5843023", "text": "public function run()\n {\n DB::table('competition_statuses')->insert([\n ['status'=>'entry', 'current'=>true],\n ['status'=>'closed', 'current'=>false],\n ['status'=>'mono_scoring', 'current'=>false],\n ['status'=>'colour_scoring', 'current'=>false],\n ['status'=>'comments', 'current'=>false],\n ['status'=>'finished', 'current'=>false],\n ]);\n }", "title": "" }, { "docid": "4773cbe61300a017266daffc003320a3", "score": "0.5839682", "text": "protected function createMigrationsTable()\n {\n $schema = new Schema;\n $table = $schema->createTable(\"schema_migrations\");\n $table->addColumn(\"version\", \"string\");\n $table->addColumn(\"date\", \"date\");\n\n $queries = $schema->toSql($this->connection->getDatabasePlatform());\n\n foreach ($queries as $query) {\n $this->connection->query($query);\n }\n }", "title": "" }, { "docid": "69e036ca4580e68d4c86f15abfb9cc3e", "score": "0.5839158", "text": "function createTable(){\n $aColumns = array();\n $aOptions = $this->getTableOptions();\n foreach( $this->aFields as $key => $field ){\n if( $field->hascolumn ){ \n $aColumns[] = array( \"name\" => $key, \"datatype\" => $field->getDataType(), \"default\" => $field->getColumnOptions() );\n }\n }\n $db = new $this->dbclass;\n $return = $db->createTable( $this->tablename, $aColumns, $aOptions );\n if( $return === true && method_exists( $this, \"afterCreateTable\" ) ) $this->afterCreateTable();\n // unset( $db );\n return $return;\n }", "title": "" }, { "docid": "520a17f5ecb79a208bb23659d2e30f54", "score": "0.5837917", "text": "public function run()\n {\n $data = [\n [\n 'id' => 1,\n 'name' => 'Ativo',\n 'status' => 1,\n 'slug' => 'AT'\n ],\n [\n 'id' => 2,\n 'name' => 'Bloqueado',\n 'status' => 1,\n 'slug' => 'BL'\n ],\n [\n 'id' => 3,\n 'name' => 'Cancelado',\n 'status' => 1,\n 'slug' => 'CA'\n ],\n [\n 'id' => 4,\n 'name' => 'Excluido',\n 'status' => 1,\n 'slug' => 'EX'\n ]\n ];\n\n $table = $this->table('peoples_statuses');\n $table->insert($data)->save();\n }", "title": "" }, { "docid": "07d15a9540987c1d224040fa44908452", "score": "0.58351713", "text": "function createTables() {\n $resultQueue = $this->database->query('SELECT * FROM `queue`');\n $resultQueueItem = $this->database->query('SELECT * FROM `queueItem`');\n\n if (DB::isError($resultQueue)) { // If table 'queue' doesn't exist\n $this->database->query(\"\n CREATE TABLE `queue` (\n `creator` varchar( 128 ) NOT NULL ,\n `name` varchar( 128 ) NOT NULL ,\n `comment` text ,\n `password` varchar( 128 ) NOT NULL ,\n `creationDate` datetime NOT NULL ,\n `endDate` datetime NOT NULL ,\n PRIMARY KEY ( `name` )\n );\n \");\n }\n\n if (DB::isError($resultQueueItem)) { // If table 'queueItem' doesn't exist\n $this->database->query(\"\n CREATE TABLE `queueItem` (\n `id` int(11) NOT NULL auto_increment,\n `queueName` varchar(128) NOT NULL default '',\n `comment` text ,\n `submitDate` datetime NOT NULL default '0000-00-00 00:00:00',\n `studentName` varchar(128) NOT NULL default '',\n `studentSessionId` varchar(32) NOT NULL default '',\n PRIMARY KEY (`id`)\n );\n \");\n }\n }", "title": "" }, { "docid": "6795d12690d042ca4263f228ab545525", "score": "0.5827282", "text": "public function createTables(){\n $conservations_sql = str_replace('{TABLE_NAME}',$this->_CONSERVATION_TABLENAME,file_get_contents(__DIR__.DS.'sql'.DS.'conservations.sql'));\n $messages_sql = str_replace('{TABLE_NAME}',$this->_MESSAGES_TABLENAME,file_get_contents(__DIR__.DS.'sql'.DS.'messages.sql'));\n $this->db->query($conservations_sql,[]);\n $this->db->query($messages_sql,[]);\n}", "title": "" }, { "docid": "de0870c3360bac9adee635f6ef9615a9", "score": "0.58204806", "text": "public function run()\n {\n //Create a table with the following parameters\n app()->db->raw(\"CREATE TABLE `prerequisites` (\"\n .\"`class_id` INT UNSIGNED NULL,\"\n .\"`prereq_id` INT UNSIGNED NULL,\"\n .\"`or` TINYINT UNSIGNED DEFAULT FALSE,\"\n .\"INDEX `class_id_prereq_id` (`class_id`, `prereq_id`));\");\n }", "title": "" }, { "docid": "8b016229be1880c39346d3764ad7a5bd", "score": "0.58170116", "text": "public function run()\n {\n DB::table('statuses')->insert([\n ['name' => 'free'],\n ['name' => 'booking'],\n ]);\n }", "title": "" }, { "docid": "e7a897c3940f886e6a1399715a5caad9", "score": "0.58157796", "text": "public function run()\n {\n \n DB::table('property_statuses')->insert([\n 'name' => 'Publiced',\n ]);\n\n DB::table('property_statuses')->insert([\n 'name' => 'Pandding',\n ]);\n }", "title": "" }, { "docid": "cfd062f2c31871c1dbdec1ff4a82d333", "score": "0.58139175", "text": "public function run()\n {\n $statuses = ['Just created', 'Accepted by admin', 'Accepted by restaurant', 'Assigned to driver', 'Prepared', 'Picked up', 'Delivered', 'Rejected by admin', 'Rejected by restaurant', 'Updated', 'Closed', 'Rejected by driver', 'Accepted by driver'];\n foreach ($statuses as $key => $status) {\n DB::table('status')->insert([\n 'name' => $status,\n 'alias' => str_replace(' ', '_', strtolower($status)),\n ]);\n }\n }", "title": "" }, { "docid": "b239d5b30f15830abd75595d30aca416", "score": "0.580446", "text": "private function createMockTable()\n {\n Schema::create('reviewable_mocks', function (Blueprint $table) {\n\n $table->increments('id');\n $table->enum('status', [\n 'Submitted',\n 'RejectedInfo',\n 'RejectedDuplicate',\n 'RejectedSource',\n 'Accepted',\n 'Superseded'\n ])->default('Submitted')->nullable()->default(null);\n $table->integer('user_id')->nullable()->default(null);\n $table->integer('previous_id')->nullable()->default(null);\n $table->timestamps();\n\n });\n }", "title": "" }, { "docid": "49352d1b1874be5f33ed92461dd0d650", "score": "0.5799296", "text": "function checkTableExists($connection) {\n\t\t\n\t\tglobal $dbname;\n\n\t\tif (!mysqli_select_db($connection, $dbname)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$sqlCommand = \"SHOW TABLES LIKE 'status'\";\n\n\t\t$createTableSQL = \"CREATE TABLE status (\" .\n\t\t\t\t\t\t\t\"statusCode VARCHAR(5) NOT NULL PRIMARY KEY,\" .\n\t\t\t\t\t\t\t\"status VARCHAR(1024) NOT NULL,\" .\n\t\t\t\t\t\t\t\"statusDate DATE NOT NULL,\" .\n\t\t\t\t\t\t\t\"share VARCHAR(7),\" .\n\t\t\t\t\t\t\t\"allowLike BOOLEAN,\" .\n\t\t\t\t\t\t\t\"allowComment BOOLEAN,\" .\n\t\t\t\t\t\t\t\"allowShare BOOLEAN\" .\n\t\t\t\t\t\t\")\";\n\n\t\t$results = mysqli_query($connection, $sqlCommand);\n\t\tif ((mysqli_num_rows($results)) > 0){\n\t\t\t// Table exists\n\t\t\treturn true;\n\t\t} else {\n\t\t\tif (mysqli_query($connection, $createTableSQL) == true) {\n\t\t\t// Table created\n\t \t\treturn true;\n\t\t\t} else {\n\t\t \treturn false; \t\n\t\t\t}\n\t\t}\n\n\t}", "title": "" }, { "docid": "82396925177ff64c5c6853c59934a8cf", "score": "0.5793059", "text": "public function run()\n {\n DB::table('call_status')->insert([\n [\n 'name' => 'Connected',\n 'slug' => 'connected',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ],\n [\n 'name' => 'Invalid',\n 'slug' => 'invalid',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ],\n [\n 'name' => 'Out of Coverage Area',\n 'slug' => 'out-of-coverage-area',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ],\n [\n 'name' => 'Rejected / Busy',\n 'slug' => 'rejected-busy',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ],\n [\n 'name' => 'Ringing',\n 'slug' => 'ringing',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ],\n [\n 'name' => 'Mobile Switched Off',\n 'slug' => 'mobile-switched-off',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ],\n [\n 'name' => 'No Requirement',\n 'slug' => 'no-requirement',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ],\n [\n 'name' => 'Customer Complaint',\n 'slug' => 'customer-complaint',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]\n ]);\n }", "title": "" }, { "docid": "a9443bfcb2a90c66b5ddbe6e8e6dc0c3", "score": "0.5777625", "text": "function build_table() {\n\tglobal $wpdb, $create_table_device_str, $create_table_reseller_groups, $create_table_user_status, $db_ver;\n\n\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\n\t// call mysql comands\n\tdbDelta( $create_table_device_str );\n\tdbDelta( $create_table_reseller_groups );\n\tdbDelta( $create_table_user_status );\n\n\t// version\n\tadd_option( \"db_ver\", $db_ver );\n}", "title": "" }, { "docid": "809b715b742a8e241b82e090b002c729", "score": "0.5770523", "text": "protected function addColumnStatus()\n {\n CRUD::addColumn([\n 'name' => 'status',\n 'label' => 'Status',\n 'type' => 'boolean',\n 'visibleInTable' => true,\n 'visibleInModal' => true,\n 'visibleInShow' => true,\n 'visibleInExport' => true\n ]);\n }", "title": "" }, { "docid": "c80bcb025a8ee810899df74ac6c4ce3c", "score": "0.57661176", "text": "public function createTable() {\n\t\t$sql = \"CREATE TABLE IF NOT EXISTS `sy_authorization` (\n\t\t`id` int(11) NOT NULL AUTO_INCREMENT,\n\t\t`date` DATE NOT NULL,\t\t\n\t\t`user_id` int(11) NOT NULL,\n\t\t`lab_id` int(11) NOT NULL,\n\t\t`visa_id` int(11) NOT NULL,\n\t\t`resource_id` int(11) NOT NULL,\t\n\t\t`is_active` int(1) NOT NULL,\t\t\t\n\t\tPRIMARY KEY (`id`)\n\t\t);\";\n\t\t\n\t\t$pdo = $this->runRequest ( $sql );\n\t\treturn $pdo;\n\t}", "title": "" }, { "docid": "77dbf8f9e66ef95d921118c0500eb063", "score": "0.5765935", "text": "private function _tablegenerate(){\n\t}", "title": "" }, { "docid": "bb9adefef55e414e3f49b77f97936b94", "score": "0.57641053", "text": "public function create()\n {\n \\XF::db()->getSchemaManager()->createTable($this->name, function (\\XF\\Db\\Schema\\Create $table) {\n $table->addPrimaryKey($this->primary_key);\n\n foreach ($this->columns as $column) {\n $col = $table->addColumn($column['name'], $column['type']);\n if (isset($column['default'])) {\n $col->setDefault($column['default']);\n }\n if (isset($column['nullable']) && $column['nullable']) {\n $col->nullable();\n }\n if (isset($column['autoIncrement']) && $column['autoIncrement']) {\n $col->autoIncrement();\n }\n }\n });\n }", "title": "" } ]
24c7d0ea00454612dda39e3ab55746f9
Get and split the url
[ { "docid": "a2964b339e172fc695ba6d32dc6deafb", "score": "0.74913085", "text": "private function splitUrl(){\n if(isset($_GET['url'])){\n \n //Split the URL\n $url = rtrim($_GET['url'], '/');\n $url = filter_var($url, FILTER_SANITIZE_URL);\n $url = explode('/', $url);\n \n //Load any areas from the config\n $areas = Config::get(\"routeAreas\");\n \n if(isset($url[0])){\n if(array_search($url[0], $areas) !== false){\n $this->area = $url[0];\n array_splice($url, 0, 1);\n } \n }\n \n //load the remaining parts\n $this->controller = (isset($url[0]) ? $url[0] : null);\n $this->action = (isset($url[1]) ? $url[1] : 'index'); //Default action to index method\n \n for($r=2; $r<count($url); $r++){\n $this->params[] = $url[$r];\n } \n \n //For debugging only\n /*echo 'Area: ' . $this->area . '<br />';\n echo 'Controller: ' . $this->controller . '<br />';\n echo 'Action: ' . $this->action . '<br />';\n echo 'Params: ' . print_r($this->params) . '<br />';*/\n \n \n }\n }", "title": "" } ]
[ { "docid": "5cf9ca7f36985b24710c49c0e07f9f68", "score": "0.83414733", "text": "private function ProcessUrl() {\n $url = (isset($_GET['url']) && !empty($_GET['url'])) ? $_GET['url'] : '';\n $url = explode('/', $url);\n return $url;\n }", "title": "" }, { "docid": "7ef99cd3d8965be133c48ca142556204", "score": "0.81844294", "text": "public function parseUrl()\n {\n if (isset($_GET['url']))\n return (explode(\"/\", filter_var(rtrim($_GET['url'], '/'), FILTER_SANITIZE_URL)));\n }", "title": "" }, { "docid": "2ddc8fe93844f9c6a927fe6e25fc5e2d", "score": "0.81720173", "text": "public function parseUrl()\n {\n\n if(isset($_GET['url'])) //htacces will rewrite the url\n {\n return $url = explode('/',filter_var(rtrim($_GET['url'],'/'),FILTER_SANITIZE_URL));\n }\n }", "title": "" }, { "docid": "6b81fa5822723c6f2b45e6f83a72cc51", "score": "0.79162407", "text": "public function parseUrl()\n {\n if (isset($_GET['url'])) {\n $url = $_GET['url'];\n $url = rtrim($url, '/');\n $url = filter_var(strip_tags($url), \\FILTER_SANITIZE_URL);\n $url = explode('/', $url);\n return $url;\n }\n }", "title": "" }, { "docid": "57610d94c5d838b47a0318a556fbc5d2", "score": "0.78825384", "text": "public function parseUrl() {\n\t\tif (isset($_GET['url'])) {\n\n\t\t\t// remove the trailing slash\n\t\t\t// sanitize the url with filter_var\n\t\t\t// explode to an array by slash\n\t\t\treturn explode('/', filter_var(rtrim($_GET['url'], '/'), FILTER_SANITIZE_URL));\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "8fd9c1b6e1c7a76d47332e17acf2f566", "score": "0.78566027", "text": "public function urlProcessing() {\n if(isset($_GET['url'])) {\n return explode(\"/\",trim($_GET['url'],\"/\"));\n }\n }", "title": "" }, { "docid": "d34d7361bfbf5f5d657c19945918e809", "score": "0.7732255", "text": "public function parse_url()\n {\n if(isset($_GET['url']))\n {\n return $url = explode(\n '/',\n filter_var(\n rtrim($_GET['url'], '/'),\n FILTER_SANITIZE_URL\n )\n );\n }\n }", "title": "" }, { "docid": "64a107cc6f43babbd0b93ff97b10812c", "score": "0.7728657", "text": "public function parseUrl() {\n // checks if the client passed the url parameter, the .htaccess file passes it when needed\n if(isset($_GET['url'])) {\n /* first it removes whitespaces from the parameter\n * after that it filters with the sanitize url to remove invalid url characters\n * then it transforms everything into an array based in the '/'\n */\n \n return $url = explode('/', filter_var(trim($_GET['url'], '/'), FILTER_SANITIZE_URL));\n }\n }", "title": "" }, { "docid": "478db1a7d78e4be0f9ddc2c7b04fe880", "score": "0.75612956", "text": "public function parseUrl() {\n if(isset($_GET['url'])) {\n if(strpos($_GET['url'], \"?\")) {\n $url = substr($_GET['url'], 0, strpos($_GET['url'], \"?\"));\n $url = trim($url, '/');\n } else {\n $url = trim($_GET['url'], '/');\n }\n\n $url = filter_var($url, FILTER_SANITIZE_URL);\n $url = explode('/', $url);\n return $url;\n }\n return [];\n }", "title": "" }, { "docid": "b02095d77e7b2024d17d6fdbfe631fa1", "score": "0.75348985", "text": "public function parseURL(){\n if (isset($_GET['url'])){ // jika url ada maka,\n $url = rtrim ($_GET['url'],'/'); // menghilangkan karakter / di akhir url\n $url = filter_var($url,FILTER_SANITIZE_URL); // membersihkan url dari sql injection\n $url = explode('/',$url); // untuk memisahkan url dari slash(/) dan di massukkan ke variabel parameter\n return $url; // mengembalikan nilai url\n }\n }", "title": "" }, { "docid": "e1b14fd364f0476c2658f79ccadb4fb5", "score": "0.7408687", "text": "public function getUrlParams(){\n // Check if the url exists\n if(isset($_GET['url'])){\n $url = rtrim($_GET['url'], \"/\");\n $url = filter_var($url, FILTER_SANITIZE_URL);\n return explode(\"/\", $url); \n }\n }", "title": "" }, { "docid": "d154ba85b039e7b02c038d8e31a5a915", "score": "0.73807955", "text": "private function splitUrl()\n {\n if (isset($_GET['url'])) {\n\n // split URL\n $url = rtrim($_GET['url'], '/');\n $url = filter_var($url, FILTER_SANITIZE_URL);\n $url = explode('/', $url);\n \n // if only one param is sent, assume index\n if(count($url) == 1 ){\n $url = array(\n $url[0],\n 'index'\n );\n }\n\n // Put URL parts into according properties\n // By the way, the syntax here if just a short form of if/else, called \"Ternary Operators\"\n // http://davidwalsh.name/php-shorthand-if-else-ternary-operators\n $this->url_controller = (isset($url[0]) ? $url[0] : null);\n $this->url_action = (isset($url[1]) ? $url[1] : null);\n $this->url_parameter_1 = (isset($url[2]) ? $url[2] : null);\n $this->url_parameter_2 = (isset($url[3]) ? $url[3] : null);\n $this->url_parameter_3 = (isset($url[4]) ? $url[4] : null);\n $this->url_parameter_4 = (isset($url[5]) ? $url[5] : null);\n $this->url_parameter_5 = (isset($url[6]) ? $url[6] : null);\n $this->url_parameter_6 = (isset($url[7]) ? $url[7] : null);\n \n } else {\n \n $this->url_controller = DEFAULT_CONTROLLER;\n $this->url_action = 'index';\n }\n }", "title": "" }, { "docid": "6953f4313e4f0d4803238c8d82d37e39", "score": "0.7329292", "text": "public function getUrlParts () {\n\t\t$thisUrl = 'http' . ( isset($_SERVER[\"HTTPS\"]) && $_SERVER[\"HTTPS\"] == \"on\" ? \"s\" : '' ) . '://'\n\t\t\t\t. $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];\n\t\treturn parse_url($thisUrl);\n\t}", "title": "" }, { "docid": "d4852d2f26d37a43c77caea422a0f867", "score": "0.7296862", "text": "function getUrl() {\r\n $url = rtrim($_GET['url'], '/');\r\n // Saneo la url\r\n $url = filter_var($url, FILTER_SANITIZE_URL);\r\n // Troceo la url\r\n $url = explode('/', $url);\r\n \r\n return $url;\r\n }", "title": "" }, { "docid": "f8279f46ad52c0327a17426b43ac83c6", "score": "0.7239288", "text": "private function _getUrl() {\n $url = isset($_GET['url']) ? $_GET['url'] : null;\n $url = rtrim($url, '/');\n $url = filter_var($url, FILTER_SANITIZE_URL);\n $this->_url = explode('/', $url);\n }", "title": "" }, { "docid": "2c69491c8f952697419d6f35b0bb2076", "score": "0.7222529", "text": "protected function _splitUrl() {\n $url = self::Request()->getUrl();\n if (self::Request()->ReWriteBase() != '' && '/' . $url == self::Request()->ReWriteBase()) {\n if (self::$debug) logger::debug(sprintf('ReWriteBase = %s', Request::get()->ReWriteBase()));\n $url = '';\n }\n\n if ($url != \"\") {\n if (self::$debug) logger::debug('Url: ' . $url);\n\n // split URL\n $url = self::Request()->getSegments();\n\n // Put URL parts into according properties\n $this->url_controller = self::Request()->getSegment(0);\n $this->url_action = self::Request()->getSegment(1);\n $this->url_parameter_1 = self::Request()->getSegment(2);\n $this->url_parameter_2 = self::Request()->getSegment(3);\n $this->url_parameter_3 = self::Request()->getSegment(4);\n\n // turn debug on if you have problems with the URL\n if (self::$debug) logger::debug('Controller: ' . $this->url_controller);\n if (self::$debug) logger::debug('Action: ' . $this->url_action);\n if (self::$debug) logger::debug('Parameter 1: ' . $this->url_parameter_1);\n if (self::$debug) logger::debug('Parameter 2: ' . $this->url_parameter_2);\n if (self::$debug) logger::debug('Parameter 3: ' . $this->url_parameter_3);\n }\n\n return $this;\n }", "title": "" }, { "docid": "18cc4e68b0f8486f22a8961618f5bc4f", "score": "0.72144157", "text": "private function __parseURL()\n {\n if (isset($_GET['url'])) {\n $url = rtrim($_GET['url'], '/');\n $url = filter_var($url, FILTER_SANITIZE_URL);\n $url = explode('/', $url);\n return $url;\n }\n return null;\n }", "title": "" }, { "docid": "4abe56fda4844d32dbf4acce2c56c698", "score": "0.72101825", "text": "private function parseUrl()\n {\n $parsedUrl = [];\n $unparsed = url()->full();\n\n if (count(explode('?', $unparsed)) > 1) {\n $to_be_parsed = explode('?', $unparsed)[1];\n\n parse_str($to_be_parsed, $parsedUrl);\n unset($parsedUrl['page']);\n }\n\n return $parsedUrl;\n }", "title": "" }, { "docid": "0d011feabeeac8419f8548da87e3046f", "score": "0.71946836", "text": "public function getUrl(){\n if(isset($_GET['url'])){\n $url = rtrim($_GET['url'], '/');\n $url = filter_var($url, FILTER_SANITIZE_URL);\n $url = explode('/', $url);\n return $url;\n }\n }", "title": "" }, { "docid": "f62078ce37cfd545390126657987529c", "score": "0.7182317", "text": "public function getUrl(){\r\n if (isset($_GET['url'])){\r\n \r\n //Cut the right spaces after slash\r\n $url = rtrim($_GET['url'],'/');\r\n \r\n //This will be read like url\r\n $url = filter_var($url, FILTER_SANITIZE_URL);\r\n \r\n //This function require one delimiter and the url (string)\r\n $url = explode('/', $url);\r\n \r\n return $url;\r\n } \r\n }", "title": "" }, { "docid": "5ef18b07d477bf2464d300a2c27696c5", "score": "0.7177766", "text": "private function _getUrl()\n {\n $url = isset($_GET['url']) ? $_GET['url'] : null;\n $url = rtrim($url, '/');\n $url = filter_var($url, FILTER_SANITIZE_URL);\n $this->_url = explode('/', $url);\n }", "title": "" }, { "docid": "36b2782ba1b7dcfa0ba04fac7d08e35a", "score": "0.71557015", "text": "public function getURL(){\n if(isset($_GET['url'])){\n $url = rtrim($_GET['url'],'/');\n $url = filter_var($url,FILTER_SANITIZE_URL);\n $url = explode('/',$url);\n return $url;\n }\n \n\n }", "title": "" }, { "docid": "c58a797d9c70f0c61725b816c290bdd7", "score": "0.7146711", "text": "private function getURL()\n {\n //store the final url from $_GET[\"url\"] variable\n $url = array();\n\n if(!empty($_GET)){\n \n //filter the $_GET[\"url\"] variable\n $url = filter_var($_GET[\"url\"],FILTER_SANITIZE_URL);\n \n //remove extra `/` from the url. otherwise an empty index will be created\n $url = trim($url,\"/\");\n\n //splite the $url where from `/`\n $url = explode(\"/\", $url);\n }\n\n return $url;\n \n }", "title": "" }, { "docid": "361eeb3b811b34c9f93786440cc65a17", "score": "0.7088012", "text": "public static function parseUri(){\n $clean = explode(\"?\", $_SERVER['REQUEST_URI']);\n $uri = $clean[0];\n $parts = explode(\"%40\", $uri);\n $uri = implode(\"@\",$parts);\n return explode(\"/\", $uri);\n }", "title": "" }, { "docid": "71686a72764c4c1f6d1fe406d4e47c72", "score": "0.7061278", "text": "function parse_all_url($url){\n $url_parts = array();\n preg_match(\"@^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?@\", $url, $regs);\n\n if ($regs[2]) $url_parts['scheme'] = $regs[2];\n if ($regs[4]) $url_parts['host'] = $regs[4];\n if ($regs[5]) $url_parts['path'] = $regs[5];\n if ($regs[7]) $url_parts['query'] = $regs[7];\n if ($regs[9]) $url_parts['fragment'] = $regs[9];\n\n return $url_parts;\n }", "title": "" }, { "docid": "a0cb19a4c6a6c852f90a5d410ec333e6", "score": "0.70192075", "text": "public function getUrl()\n {\n if (isset($_GET['url'])) {\n $url = rtrim($_GET['url'], '/');\n $url = filter_var($url, FILTER_SANITIZE_URL);\n $url = explode('/', $url);\n return $url;\n }\n }", "title": "" }, { "docid": "ae1dc6a7de61422513cf7f21810c9000", "score": "0.6918654", "text": "private function parseURL(){\n\t\t\n\t\t\n\t\t\n\t\tif(isset($_GET['url'])):\n\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t$url_array = explode('/',filter_var(rtrim($_GET['url']),FILTER_SANITIZE_URL));\n\t\t\t$this->url_array = $url_array;\n\t\t\t\n\t\tendif;\n\t\t\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "30490b04d28e5e1a394c51e6ec07e8d6", "score": "0.6912928", "text": "public function getUrl()\n {\n $url = isset($_GET['url']) ? $_GET['url'] : null;\n $url = filter_var(rtrim($url,'/'), FILTER_SANITIZE_URL);\n $this->_url = explode('/',$url);\n }", "title": "" }, { "docid": "4662d95963a627af6f03a8b513d7451a", "score": "0.6869298", "text": "public function getUrl()\n {\n /**\n * if it is set we will want to get rid of trailing /\n */\n if (isset($_GET['url'])) {\n $url = rtrim($_GET['url'], '/');\n $url = filter_var($url, FILTER_SANITIZE_URL);\n $url = explode('/', $url);\n return $url;\n }\n }", "title": "" }, { "docid": "ce69a819f79f1866066496ad1383dce9", "score": "0.68614477", "text": "public function getUrl()\n {\n if (isset($_GET['url'])) {\n // trim the url\n $url = rtrim($_GET['url'], '/');\n // sanatize the url\n $url = filter_var($url, FILTER_SANITIZE_URL);\n // trun into array\n $url = explode('/', $url);\n\n return $url;\n }\n }", "title": "" }, { "docid": "330d5f3fd60cef59774a7009ba8ad8ed", "score": "0.6855297", "text": "private function getURL() {\r\n\t\t\r\n\t\t// leeres Array als Rüchgabevariable anlegen\r\n\t\t\r\n\t\t$url = [];\r\n\r\n\t\t// wenn es in der superglobalen $_GET einen Eintrag url gibt, wird etwas ausgeführt\r\n\t\tif(isset($_GET['url'])) {\r\n\t\t\t// Slash am hinteren Ende entfernen, alles zu Kleinbuchstaben\r\n\t\t\t$url = rtrim(strtolower($_GET['url']), '');\r\n\r\n\t\t\t// String filtern, nur erlaubte URL-Zeichen\r\n\t\t\t$url = filter_var($url, FILTER_SANITIZE_URL);\r\n\r\n\t\t\t// in ein Array zerlegen\r\n\t\t\t$url = explode('/', $url); // der / ist das Zeichen, an dem zerlegt werden soll\r\n\t\t}\r\n\r\n\t\t// gibt Wert zurück an den Funktionsaufruf oben\r\n\t\treturn $url;\r\n\t}", "title": "" }, { "docid": "e38f8035686040f0577c3f22c39536aa", "score": "0.684698", "text": "public function urlParse($url){\n \n return explode(\"/\",trim($url,\"/\"));\n }", "title": "" }, { "docid": "c4b3e26d6d611b8f9d5dcc8bd2efde9e", "score": "0.68321687", "text": "private function parseURL($url)\n {\n $adress = parse_url($url);\n $adress[\"path\"] = ltrim($adress[\"path\"], \"/\");\n $adress[\"path\"] = trim($adress[\"path\"]);\n $explodeAdress = explode(\"/\", $adress[\"path\"]);\n return $explodeAdress;\n }", "title": "" }, { "docid": "25eb1c2dc5719043d8234aab3e268197", "score": "0.6792212", "text": "public function getUrl(){\n\t\t// Verificamos que URL contenga valores\n\t\tif(isset($_GET['url'])){\n\t\t\t// Sanitiza URL\n\t\t\t$url = rtrim($_GET['url'], '/'); // Elimina diagonales al final\n\t\t\t$url = filter_var($url, FILTER_SANITIZE_URL); // Elimina caracteres especiales\n\n\t\t\t// Separa valores de controlador, metodo y parametro (delimitados por /)\n\t\t\t$url = explode('/', $url);\n\t\t\treturn $url;\n\t\t}\n\t}", "title": "" }, { "docid": "f92b22bbf6898225b3ea7274a284cfb2", "score": "0.676052", "text": "function getUri()\r\n{\r\n\treturn explode(\"/\", parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH));\r\n}", "title": "" }, { "docid": "252f286ba96799c895509183faa47d4b", "score": "0.6756591", "text": "public function getUrl()\n {\n if (isset($_GET['url'])) {\n //Eliminare / din Url\n $url = rtrim($_GET['url'], '/');\n //Curatare url de charactere nepermise\n $url = filter_var($url, FILTER_SANITIZE_URL);\n //Punerea intr-un array valoarea dupa fiecare /\n $url = explode('/', $url);\n return $url;\n }\n }", "title": "" }, { "docid": "0ffd684495e412ec9cb034a11ff6acd5", "score": "0.6606265", "text": "private function parseUrl($url): array\n {\n $parsedUrl = parse_url($url);\n $parsedUrl[\"path\"] = ltrim($parsedUrl[\"path\"], \"/\");\n $parsedUrl[\"path\"] = trim($parsedUrl[\"path\"]);\n $explodedUrl = explode(\"/\", $parsedUrl[\"path\"]);\n return $explodedUrl;\n \n }", "title": "" }, { "docid": "241d7850644614a75968d8fcd0da5ce5", "score": "0.6603914", "text": "private static function _parseUrl() \n {\n if (isset($_GET['router'])) \n {\n self::$_url = array_filter(explode('/', $_GET['router']));\n unset($_GET['router'], $_REQUEST['router']);\n \n } else {\n \n self::$_url = array();\n }// elses\n }", "title": "" }, { "docid": "0b098e8930a4dc412d1d0e92232ce1bb", "score": "0.65964407", "text": "function split_url($url, $decode = FALSE) {\n // Character sets from RFC3986.\n $xunressub = 'a-zA-Z\\d\\-._~\\!$&\\'()*+,;=';\n $xpchar = $xunressub . ':@% ';\n\n // Scheme from RFC3986.\n $xscheme = '([a-zA-Z][a-zA-Z\\d+-.]*)';\n\n // User info (user + password) from RFC3986.\n $xuserinfo = '(([' . $xunressub . '%]*)' .\n '(:([' . $xunressub . ':%]*))?)';\n\n // IPv4 from RFC3986 (without digit constraints).\n $xipv4 = '(\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})';\n\n // IPv6 from RFC2732 (without digit and grouping constraints).\n $xipv6 = '(\\[([a-fA-F\\d.:]+)\\])';\n\n // Host name from RFC1035. Technically, must start with a letter.\n // Relax that restriction to better parse URL structure, then\n // leave host name validation to application.\n $xhost_name = '([a-zA-Z\\d-.%]+)';\n\n // Authority from RFC3986. Skip IP future.\n $xhost = '(' . $xhost_name . '|' . $xipv4 . '|' . $xipv6 . ')';\n $xport = '(\\d*)';\n $xauthority = '((' . $xuserinfo . '@)?' . $xhost .\n '?(:' . $xport . ')?)';\n\n // Path from RFC3986. Blend absolute & relative for efficiency.\n $xslash_seg = '(/[' . $xpchar . ']*)';\n $xpath_authabs = '((//' . $xauthority . ')((/[' . $xpchar . ']*)*))';\n $xpath_rel = '([' . $xpchar . ']+' . $xslash_seg . '*)';\n $xpath_abs = '(/(' . $xpath_rel . ')?)';\n $xapath = '(' . $xpath_authabs . '|' . $xpath_abs .\n '|' . $xpath_rel . ')';\n\n // Query and fragment from RFC3986.\n $xqueryfrag = '([' . $xpchar . '/?' . ']*)';\n\n // URL.\n $xurl = '^(' . $xscheme . ':)?' . $xapath . '?' .\n '(\\?' . $xqueryfrag . ')?(#' . $xqueryfrag . ')?$';\n\n\n // Split the URL into components.\n if (!preg_match('!' . $xurl . '!', $url, $m)) {\n return FALSE;\n }\n\n if (!empty($m[2])) {\n $parts['scheme'] = strtolower($m[2]);\n }\n\n if (!empty($m[7])) {\n if (isset($m[9])) {\n $parts['user'] = $m[9];\n } else {\n $parts['user'] = '';\n }\n }\n if (!empty($m[10])) {\n $parts['pass'] = $m[11];\n }\n\n if (!empty($m[13])) {\n $h = $parts['host'] = $m[13];\n } else if (!empty($m[14])) {\n $parts['host'] = $m[14];\n } else if (!empty($m[16])) {\n $parts['host'] = $m[16];\n } else if (!empty($m[5])) {\n $parts['host'] = '';\n }\n if (!empty($m[17])) {\n $parts['port'] = $m[18];\n }\n\n if (!empty($m[19])) {\n $parts['path'] = $m[19];\n } else if (!empty($m[21])) {\n $parts['path'] = $m[21];\n } else if (!empty($m[25])) {\n $parts['path'] = $m[25];\n }\n\n if (!empty($m[27])) {\n $parts['query'] = $m[28];\n }\n if (!empty($m[29])) {\n $parts['fragment'] = $m[30];\n }\n\n if (!$decode) {\n return $parts;\n }\n if (!empty($parts['user'])) {\n $parts['user'] = rawurldecode($parts['user']);\n }\n if (!empty($parts['pass'])) {\n $parts['pass'] = rawurldecode($parts['pass']);\n }\n if (!empty($parts['path'])) {\n $parts['path'] = rawurldecode($parts['path']);\n }\n if (isset($h)) {\n $parts['host'] = rawurldecode($parts['host']);\n }\n if (!empty($parts['query'])) {\n $parts['query'] = rawurldecode($parts['query']);\n }\n if (!empty($parts['fragment'])) {\n $parts['fragment'] = rawurldecode($parts['fragment']);\n }\n return $parts;\n }", "title": "" }, { "docid": "315e8ebb331d5eefce748c840a7eff2e", "score": "0.65862", "text": "private function splitUrl(string $url): array {\n $trimmedUrl = trim($url, '/');\n $parts = explode('/', $trimmedUrl);\n\n return array_filter($parts);\n }", "title": "" }, { "docid": "e27c924b9d6237de829a9c363fc6d9f9", "score": "0.6552787", "text": "function _urlParse($__url, $__request) \n { \n //Part the url using parse_url \n $parts = parse_url($__url); \n \n //Return the requested component \n switch($__request) \n { \n case 'host': \n return $parts['host']; \n break; \n \n case 'path': \n return $parts['path']; \n break; \n } \n \n }", "title": "" }, { "docid": "29d07f48760cc596870a92f5a275817f", "score": "0.6491997", "text": "function getParams()\n{\n $params = array();\n \n if( isset($_GET['url']) )\n $params = explode('/', $_GET['url']);\n \n if(count($params) == 0)\n $params[] = 'home';\n\n return $params;\n}", "title": "" }, { "docid": "fe249bf42258d30ade937d85a1b678c3", "score": "0.64756763", "text": "public static function getUrlBreakdown() {\n\t\t// Set the URL\n\t\t// We do not want the start and the end slash, explode on separators, and filter\n\t\t$urlBreakdown = trim($_SERVER['REQUEST_URI'], '/');\n\t\t$urlBreakdown = explode('/', $urlBreakdown);\n\t\t$urlBreakdown = array_filter($urlBreakdown);\n\n\t\t// Start to piece back together and create a nice, usable, array\n\t\t$url = array(\n\t\t\t'controller' => isset($urlBreakdown[0]) ? $urlBreakdown[0] : 'Index',\n\t\t\t'action' => isset($urlBreakdown[1]) ? $urlBreakdown[1] : 'index'\n\t\t);\n\n\t\t// Chunk them into variable->value\n\t\t$urlBreakdown = array_chunk($urlBreakdown, 2);\n\n\t\t// The first index will be the controller/action\n\t\t// We have already set this so just ignore\n\t\tunset($urlBreakdown[0]);\n\n\t\t// Loop over the remaining array, these are GET variables\n\t\tforeach ($urlBreakdown as $urlSegment) {\n\t\t\t// If there is no value, set it to true\n\t\t\t$url[$urlSegment[0]] = isset($urlSegment[1])\n\t\t\t\t? $urlSegment[1]\n\t\t\t\t: true;\n\t\t}\n\n\t\t// Put this into the GET string so we no never have to call this method again\n\t\t$_GET = array_merge($_GET, $url);\n\t}", "title": "" }, { "docid": "02f776010e25a87b902b5f09e27b8aef", "score": "0.6395217", "text": "private function filter_url(){\n if(isset($_GET['uri'])){\n $this->uri = $_GET['uri'];\n $this->uri = rtrim($this->uri,'/');\n $this->uri = filter_var($this->uri, FILTER_SANITIZE_URL);\n $this->uri = explode('/',strtolower($this->uri)); \n return $this->uri;\n }\n }", "title": "" }, { "docid": "a06cfa3871fc27e03164d5771dbc1746", "score": "0.63872147", "text": "protected static function _parseURL() {\r\n\t\t/* stop if not available */\r\n\t\tif (!isset($_SERVER['REQUEST_URI'])) {\r\n\t\t\treturn array();\r\n\t\t}\r\n\t\t\r\n\t\t/* set defaults */\r\n\t\t$clean = array();\r\n\t\tself::$baseURI = self::getBaseUrl();\r\n\t\t\r\n\t\t/* break up the sections */\r\n\t\t$parts = (self::$baseURI == '' || self::$baseURI == '/') ? array() : explode('/', self::$baseURI);\r\n\t\t\r\n\t\t/* remove the empty first item */\r\n\t\tarray_shift($parts);\r\n\t\t\r\n\t\t/* process the set */\r\n\t\tforeach ($parts as $part) {\r\n\t\t\t/* see how we should treat it */\r\n\t\t\tswitch (true) {\r\n\t\t\t\tcase (strpos($part, ',')):\r\n\t\t\t\t\t/* split it up */\r\n\t\t\t\t\t$set = explode(',', $part);\r\n\t\t\t\t\t$key = array_shift($set);\r\n\t\t\t\t\t\r\n\t\t\t\t\t/* clean it */\r\n\t\t\t\t\t$clean[$key] = self::clean($set);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tdefault:\r\n\t\t\t\t\t$clean[] = self::clean($part);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t/* done */\r\n\t\treturn $clean;\r\n\t}", "title": "" }, { "docid": "d8a380e528dc7ee5a0714fa52a43d46e", "score": "0.6379283", "text": "private function getUrlSegments()\n {\n $segments = $this->url->getSegments();\n\n if (empty($segments)) {\n return $this->url->parse()\n ->getSegments();\n }\n\n return $segments;\n }", "title": "" }, { "docid": "589060ab43433658cf7002070536e892", "score": "0.6375948", "text": "function gets($url){\n $return = array();\n $ex = explode('?', $url);\n if(isset($ex[1]) and $ex[1]){\n $ex = explode(';;z;;', $ex[1]);\n foreach ($ex as $key => $value){\n $ex1 = explode('=', $value);\n $return[$ex1[0]] = $value;\n }\n }\n return $return;\n}", "title": "" }, { "docid": "5648d87b5a980bb1ea7922771af2bce0", "score": "0.6352702", "text": "public function parse($url)\n\t{\n\t\t$this->url = null;\n\n\t\tif ($this->checkIsStringUrl($url)) {\n\t\t\t$this->url = $url;\n\n\t\t\t$parsedUrl = explode('/', rtrim($this->url, '/'));\n\n\t\t\tif (isset($parsedUrl['2'])) {\n\t\t\t\treturn implode('/', $parsedUrl);\n\t\t\t}\n\n\t\t\treturn $parsedUrl;\n\t\t}\n\t}", "title": "" }, { "docid": "c5f8f820a65dfa69951a39c0f32c9484", "score": "0.6340769", "text": "public static function parseUrl(){\n// $pgn = filter_input(INPUT_GET, 'pgn', FILTER_SANITIZE_STRING);\n// $ldc = filter_input(INPUT_GET, 'ldc', FILTER_SANITIZE_STRING);\n// $com = filter_input(INPUT_GET, 'com', FILTER_SANITIZE_STRING);\n// $id = filter_input(INPUT_GET, 'id', FILTER_SANITIZE_STRING);\n \n $get = array();\n foreach ($_GET as $key => $val){\n $get[$key] = filter_input(INPUT_GET, $key);\n }\n \n $url = $get['url'];\n unset($get['url']);\n \n // Prüfen ob ob URL-Parameter übergeben wurde\n if ($url) {\n // Letztes Slash aus der URL entfernen\n $url = rtrim($url, '/');\n // URL in ein Array umwandeln\n $url = explode('/', $url);\n // Bindestriche in Parametern entfernen und in camelcase konvertieren\n// for ($i = 0 ; $i < count($url) ; $i++){\n// $param = explode('-', $url[$i]);\n// $url[$i] = $param[0];\n// unset($param[0]);\n// foreach ($param as $val){\n// $url[$i] .= htmlentities(ucfirst($val));\n// }\n// }\n\n self::setController($url[0]);\n unset($url[0]);\n self::setMethod($url[1]);\n unset($url[1]);\n \n $url = array_values($url);\n foreach ($url as $val){\n $params[] = $val;\n }\n self::setParams($params);\n \n self::setSubParams($get);\n \n// $subParams;\n//\n// if(!empty($pgn)){\n// $subParams['pgn'] = $pgn;\n// }\n// \n// if(!empty($ldc)){\n// $subParams['ldc'] = $ldc;\n// }\n// \n// if(!empty($com)){\n// $subParams['com'] = $com;\n// }\n// \n// if(!empty($id)){\n// $subParams['id'] = $id;\n// }\n// \n// self::setSubParams($subParams);\n }\n }", "title": "" }, { "docid": "e6b74c299cb374017ca5da9fe24dab48", "score": "0.63403535", "text": "protected function getUrl(){\n return parse_url($_SERVER['REQUEST_URI'],PHP_URL_PATH);\n }", "title": "" }, { "docid": "acf35244d5650a02fc200ab7b5ec6454", "score": "0.6340348", "text": "private function uri(): string{\r\n return strtok($this->server->get('REQUEST_URI'), '?');\r\n }", "title": "" }, { "docid": "f1871148c0f76ef6f3363d71cecbfa3c", "score": "0.6311286", "text": "public function getUrlS();", "title": "" }, { "docid": "bbee437f55ce0309c2f8cc31bf6851c5", "score": "0.62923205", "text": "function splitUrl($urlArray)\n{\n $controller = $urlArray[0] . 'Con';\n \n if(count($urlArray) > 1) // When the urlArray is longer than 1, there's an action attached to the url\n {\n array_shift($urlArray);\n $action = $urlArray[0];\n }\n else\n {\n $action = null;\n }\n\n init($controller, $action);\n}", "title": "" }, { "docid": "ef37e5d74d52aacae3a05aa20ff7df93", "score": "0.62917376", "text": "protected function parseUrl(): void\n {\n $url = $this->request->get('url');\n if (!is_null($url)) {\n $this->url = array_map('trim', explode('/', urldecode(filter_var(urlencode(rtrim($url, '/')), FILTER_SANITIZE_URL))));\n }\n }", "title": "" }, { "docid": "f1cfb4e0929dae7b0458af92df124c21", "score": "0.62734944", "text": "function segmentURLs($url){\n $segmentURLs = array();\n $base_url = dirname($url);\n $array = playlistToArray($url);\n \n foreach ($array as $line) {\n $line = trim($line);\n if ($line[0] != '#') {\n $segment = getAbsURL($line, $base_url);\n if(!in_array($segment, $segmentURLs)){\n $segmentURLs[] = $segment;\n }\n }\n }\n return $segmentURLs;\n}", "title": "" }, { "docid": "19b01d9516ee0d0667dca5165d6381d7", "score": "0.62616533", "text": "public function parse()\n\t{\n\t\t$this->_parts = parse_url($this->_uri);\n\t}", "title": "" }, { "docid": "1553042a0d0984631aa7005bf6666e1a", "score": "0.62348336", "text": "function sofa_condensed_url($url) {\n\t$parts = parse_url($url);\n\t$output = $parts['host'];\n\tif ( isset( $parts['path'] ) ) {\n\t\t$output .= $parts['path'];\n\t}\n\treturn $output;\n}", "title": "" }, { "docid": "aa2960af89b7ade87a9a2e1308c5e2fb", "score": "0.62257767", "text": "abstract public function getURL();", "title": "" }, { "docid": "cf59b1bc25f98fee4de79558cbe923a2", "score": "0.6213885", "text": "public static function parseUrl($url)\n {\n $urlPartsDefault = array(\n 'schemeWasProvided' => false,\n // 'hostWasProvided' => false,\n 'scheme' => null,\n // 'host' => isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : '127.0.0.1',\n 'host' => null,\n 'domain' => null, // if host is images.google.com, domain will be google.com\n 'port' => null,\n 'user' => null,\n 'pass' => null,\n 'path' => '/',\n 'query' => '', // after the questiono mark but not including fragment\n 'params' => array(),\n 'fragment' => null, // after the hashmark #\n );\n if (strpos($url, '//') === 0 && version_compare(PHP_VERSION, '5.4.7', '<')) {\n // PHP prior to 5.4.7 incorrectly parses '//www.example.com/path'\n $urlParts = parse_url('temp:'.$url);\n $urlParts['scheme'] = null;\n } else {\n $urlParts = parse_url($url);\n }\n if (!empty($urlParts['scheme'])) {\n $urlParts['schemeWasProvided'] = true;\n }\n /*\n if (!empty($urlParts['host'])) {\n $urlParts['hostWasProvided'] = true;\n }\n */\n $urlParts = array_merge($urlPartsDefault, $urlParts);\n if (empty($urlParts['port'])) {\n $urlParts['port'] = \\in_array($urlParts['scheme'], array('http', null))\n ? 80\n : 443;\n }\n if (!empty($urlParts['query'])) {\n $urlParts['params'] = Str::parse($urlParts['query']);\n }\n $hostParts = explode('.', $urlParts['host']);\n if (!is_numeric(end($hostParts))) {\n $domain = implode('.', array_slice($hostParts, -2));\n if (strpos($domain, 'co.') === 0) {\n $domain = implode('.', array_slice($hostParts, -3));\n }\n $urlParts['domain'] = $domain;\n }\n return $urlParts;\n }", "title": "" }, { "docid": "49edc1b853a0900095641c7c7ba99b17", "score": "0.6187708", "text": "public function getUrl(){\n return parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);\n }", "title": "" }, { "docid": "27a55882bac3a912481a757dc75a4cc5", "score": "0.6162508", "text": "protected function parseUrl($url)\n {\n $res = parse_url($url);\n\n\n // These have to be decode because they will later\n // be encoded.\n foreach ($res as $key => $val) {\n if ($key == 'host') {\n $res[$key] = urldecode($val);\n } elseif ($key == 'path') {\n if (strpos($val, '/') === 0) {\n $val = substr($val, 1);\n }\n $res[$key] = urldecode($val);\n\n }\n }\n\n return $res;\n }", "title": "" }, { "docid": "8d341ac60e02284dc2f20a8a203d36fb", "score": "0.61542225", "text": "function parseURL($url)\n{\n $urlExploded = explode('/', $url);\n $arrayReturn[ConfigApp::$ACTION] = $urlExploded[ACTION];\n $arrayReturn[ConfigApp::$PARAMS] = isset($urlExploded[VALOR1]) ? array_slice($urlExploded,1) : null;\n return $arrayReturn;\n}", "title": "" }, { "docid": "84e0c7393d29090a988b65f151fd0bfe", "score": "0.6144693", "text": "public function getSegments()\n {\n return preg_split('/\\./', $this->request->getHost());\n }", "title": "" }, { "docid": "79f00153308c4a43425b3511ceea3d03", "score": "0.6142338", "text": "abstract public function urlTokens();", "title": "" }, { "docid": "67cbb8ab87de5b35e17d4a62de861830", "score": "0.61366355", "text": "function extractPath($url)\n{\n $string = explode('://', $url);\n $string = $string[1] ?? $string[0];\n\n $path = explode('/', $string, 2);\n $path = $path[1] ?? '/';\n\n return $path;\n}", "title": "" }, { "docid": "c9a61848000dc6fde1ec8a606899604d", "score": "0.61302", "text": "public function splitPath()\t//\tAKA explodePath()\r\n\t{\r\n\t\treturn explode('/', $this->_path ?? '');\r\n\t}", "title": "" }, { "docid": "6e1eb761547d3ba1bd436df4b8d75a8e", "score": "0.61277235", "text": "function get_rocket_parse_url( $url )\n{\n\tif ( ! is_string( $url ) ) {\n\t\treturn;\n\t}\n\n\t$url = parse_url( $url );\n\t$host = isset( $url['host'] ) ? strtolower( $url['host'] ) : '';\n\t$path = isset( $url['path'] ) ? $url['path'] : '';\n\t$scheme = isset( $url['scheme'] ) ? $url['scheme'] : '';\n\t$query = isset( $url['query'] ) ? $url['query'] : '';\n\n\t/**\n\t * Filter components of an URL\n\t *\n\t * @since 2.2\n\t *\n\t * @param array Components of an URL\n\t*/\n\treturn apply_filters( 'rocket_parse_url', array( $host, $path, $scheme, $query ) );\n}", "title": "" }, { "docid": "ee1d324d0f753dc8f721322264c6fe9c", "score": "0.61244094", "text": "function luri_split($uri_string)\n\t{\n\t\tif (is_array($uri_string)) return $uri_string;\n\t\treturn split(\"/\", $uri_string);\n\t}", "title": "" }, { "docid": "ed3e84b275b2717f44e28319f77c3aeb", "score": "0.6121623", "text": "public function splitHost()\t//\tAKA explodeHost()\r\n\t{\r\n\t\treturn explode('.', $this->_host ?? '');\r\n\t}", "title": "" }, { "docid": "ff9f16a56877733de14011d17b5e37f0", "score": "0.6109576", "text": "public function getOurUrl() {\n if ($this->our_url) {\n return $this->our_url;\n }\n $url = explode('?', $_SERVER['REQUEST_URI'], 2);\n return $url[0];\n }", "title": "" }, { "docid": "f21980da2c451447116647cd0a7b88b1", "score": "0.6099945", "text": "public function getParameterNames()\n {\n\n $url = $this->currentPageURL();\n\n return $url;\n // print_r(parse_url($url));\n\n // echo \"<pre>\".parse_url($url, PHP_URL_PATH).\"</pre>\";\n // echo parse_url($url, PHP_URL_PATH);\n\n }", "title": "" }, { "docid": "61f066531bbccbb3c4f0b13223dd55bc", "score": "0.60971063", "text": "function getProductInfoFromURL($url) {\n $info = explode(\"?\", $url)[1];\n //separate relevant info from each other\n $info = explode(\"/\", $info);\n\n //[0] - productID\n //[1] - product description\n //[2] - price\n return $info;\n }", "title": "" }, { "docid": "3b32118fe35de7f07e3a9789b88252fd", "score": "0.6082658", "text": "function split_url(string $url): array\n {\n $allowed = ['scheme', 'host', 'port', 'user', 'pass'];\n\n $parts = (array) parse_url($url);\n $parts = array_intersect_key($parts, array_flip($allowed));\n\n if (!$parts || empty($parts)) {\n throw new BadConfigurationException(\n ['url' => $url],\n 'Invalid url'\n );\n }\n\n return $parts;\n }", "title": "" }, { "docid": "700b58e838dfed4e6659eb320c091ccb", "score": "0.6081204", "text": "private function parseUrl()\n {\n $this->parsedUrl = parse_url($this->url);\n }", "title": "" }, { "docid": "2e6c90ef9916900524b99f1cfb0c8ade", "score": "0.60746616", "text": "public static function params($url)\r\n {\r\n\t\t$url = preg_replace('/\\?.+$/i', '', REQUEST_URI);\r\n\t\tself::$params = explode(\"/\", $url);\r\n\t\t\r\n\t\treturn url::$params; \t\r\n }", "title": "" }, { "docid": "b30b5606cc200cf79eacfa7320d82300", "score": "0.6069196", "text": "private function get_domain_parts($url) {\n\t\t\t$out = array('tld' => '', 'sld' => '');\n\n\t\t\tif(stristr($url, '.')) {\n\t\t\t\t$parts = explode('.', $url);\n\n\t\t\t\t$out['tld'] = array_pop($parts);\n\t\t\t\t$out['sld'] = array_pop($parts);\t\t\t\n\t\t\t} else {\n\t\t\t\t$out['sld'] = $url;\n\t\t\t}\n\n\t\t\treturn $out;\n\t\t}", "title": "" }, { "docid": "0eb4f48d6e79c2bc075fac9eb27e0eac", "score": "0.6065788", "text": "public abstract function getURL();", "title": "" }, { "docid": "b63f3e155b5188713df89bce02b5c39c", "score": "0.6056553", "text": "function get_url(){\n return parse_url($_SERVER[\"REQUEST_URI\"])[\"path\"];\n }", "title": "" }, { "docid": "e2f0ce7e6e1707ab6a4c07b29e82fc6d", "score": "0.60493827", "text": "private function queryValues(string $url){\n\n\t\t$queryString = substr($this->requestUri,strlen($url));\n\t\treturn (strncmp(\"/\",$queryString,1) == 0) ? explode(\"/\",trim($queryString,\"/\")) : array();\n\t}", "title": "" }, { "docid": "6d6e374bbf888d90082ee471809c9988", "score": "0.6047502", "text": "function _explode_segments(){\n\t\t\tforeach(explode(\"/\", preg_replace(\"|/*(.+?)/*$|\", \"\\\\1\", $this->uri_string)) as $val){\n\t\t\t\t// Filter segments for security\n\t\t\t\t$val = trim($this->_filter_uri($val));\n\t\n\t\t\t\tif ($val != ''){\n\t\t\t\t\t$this->segments[] = $val;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "db40d8138ac45be4691a1f205ea4fe89", "score": "0.6036186", "text": "public static function splitUrlPath($path) {\n\t\t$components=explode(\"/\",$path);\n\t\t$res=array();\n\t\tforeach ($components as $component)\n\t\t\tif ($component)\n\t\t\t\t$res[]=$component;\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "eaa9493965ffec50e98fbc929581f54a", "score": "0.6020736", "text": "function helper_url(){\n //obtenemos la url\n $url=isset($_GET[\"url\"]) ? $_GET['url']:'main';\n //quitamos la carpeta public de la url\n $url=str_replace(\"public/\", \"\", $url);\n \n //tratamos la url \n $url=rtrim($url,'/');\n $url=explode('/',$url);\n return $url;\n }", "title": "" }, { "docid": "899ce931b608c6ec4222c1d8c110ad85", "score": "0.60111105", "text": "static function parseUrlIntoArray($url){\n $aOptions = array();\n if( $url != \"\" ){\n $a = preg_split( \"/\\//\", $url );\n for( $i=0; $i<sizeof( $a ); $i+=2 ){\n if( $a[$i] == \"\" ) continue;\n $aOptions[$a[$i]] = isset( $a[$i+1] ) ? $a[$i+1] : null;\n }\n }\n return $aOptions;\n }", "title": "" }, { "docid": "903f2ff5a1b644dd51b71d7f169ece79", "score": "0.6007836", "text": "protected function getUrl() {\n $partten = \"#([a-zA-Z0-9\\/]+)(\\?.*)?#\";\n $arg = preg_replace($partten, \"$1\", $_SERVER['REQUEST_URI']);\n return $arg;\n }", "title": "" }, { "docid": "d9d99d743146a63558483de46d388cd7", "score": "0.60049474", "text": "function getURL ();", "title": "" }, { "docid": "840a97cef2d2c0419a71b4adb33d044b", "score": "0.6000238", "text": "public static function GetCurrentUrl() {\r\n $url = url()->current();\r\n $UrlArray = array_reverse(explode('/', $url)); \r\n return $UrlArray;\r\n }", "title": "" }, { "docid": "b4a0a1ffeef91bcac9ab542672c0b8ec", "score": "0.59955674", "text": "private static function normalizeParsedURL($parts) {\n if (!isset($parts['port'])){\n $parts['port'] = $parts['scheme'] === 'https:' ? 443 : 80;\n }\n return $parts;\n }", "title": "" }, { "docid": "08e82ca0776a58c6874b9586460804bd", "score": "0.5994773", "text": "public function getRowUrl()\n {\n $parts = \\parse_url($this->url);\n unset($parts['query']);\n if (empty($parts['user'])) {\n unset($parts['user']);\n unset($parts['pass']);\n } else {\n $parts['user'] = rawurldecode($parts['user']);\n if (isset($parts['pass'])) {\n $parts['pass'] = rawurldecode($parts['pass']);\n } else {\n $parts['pass'] = '';\n }\n }\n\n return $parts;\n }", "title": "" }, { "docid": "dfc5fc70b74bf20149f1d4892100f726", "score": "0.59868264", "text": "private function url_details($url)\r\n {\r\n $partsService = explode(\"://\", $url);\r\n \r\n $service = $partsService[0];\r\n $url = $partsService[1];\r\n $host = preg_replace(\"/\\/.*/\", \"\", $url);\r\n $path = str_replace($host, \"\", $url);\r\n \r\n $parts = explode(\":\", $host);\r\n $port = count($parts) > 1 ? $parts[1] : NULL;\r\n\r\n return array($service, $host, $path, $port);\r\n }", "title": "" }, { "docid": "4ae2df84e114335368195705820b2469", "score": "0.5972738", "text": "protected function explodeRef() {\n return explode(\"/\", $this->request_content['ref']);\n }", "title": "" }, { "docid": "eac16cf3e140c90cbfa3a20d85d1e266", "score": "0.5958245", "text": "private function break_url()\n\t{\t\t\n\t\t$url = $this->url;\n\t\t\n\t\t// Remove all GET information\n\t\tif(FALSE !== ($no_get = strstr($url, '?', TRUE))){\n\t\t\t$url = $no_get;\n\t\t}\n\t\t\n\t\t// Remove all the unnecessary info from the URL\n\t\t$url\t\t= rtrim(str_replace($this->config->get_item('base_url'), '', $url), '/');\n\t\t$url\t\t= str_replace('index.php/', '', $url);\n\t\t\n\t\t\n\t\t// Get all the URL chunks\n\t\t$chunks\t\t= strlen($url) > 0 ? explode('/', $url) : FALSE;\n\t\t\n\t\t// Set the controller\n\t\t$default_controller = $this->config->get_item('default_controller');\n\t\t$this->controller = $chunks ? $chunks[0] : $default_controller;\n\t\t$this->controller = strtolower($this->controller);\n\t\t\n\t\t// Set the method\n\t\t$this->method = $chunks && count($chunks) > 1 ? $chunks[1] : 'index';\n\t\t\n\t\t// Set the parameters\n\t\tif($chunks AND count($chunks) > 2){\n\t\t\t$parameters = array_slice($chunks, 2);\n\t\t\t\n\t\t\tfor($i = 0; $i < count($parameters); $i = $i + 2){\n\t\t\t\t$this->parameters[$parameters[$i]] = $parameters[$i + 1];\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "1a6cd12e4cf9076781ad9592f3096dda", "score": "0.59436554", "text": "function modificar_url($url){\n\t\t $temp=explode(\"/\", $url);\n\t\t $url=$temp[0].\"/miniatura/\".$temp[1];\n\t\t return $url;\n\t }", "title": "" }, { "docid": "a60439178d7c6eadd3d443c2fac72d6e", "score": "0.5941393", "text": "private function _explodeSegments()\n\t{\n\t\tforeach(explode(\"/\", preg_replace(\"|/*(.+?)/*$|\", \"\\\\1\", $this->_uriString)) as $val){\n\t\t\t// Filter segments for security\n\t\t\t$val = trim($this->_filterUri($val));\n\t\t\n\t\t\tif ($val != ''){\n\t\t\t\t$this->_segments[] = $val;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "e17385df88246938cc6360591ab3ff3f", "score": "0.5935268", "text": "function get_id_from_url($url) \n{\n $out = explode('/', $url);\n return $out[4];\n}", "title": "" }, { "docid": "d9b9eb197ebd82685d83c83cde21af68", "score": "0.59229296", "text": "public function getUrlM();", "title": "" }, { "docid": "1dca7c86b0a5b24ad2fa038d297ceb7f", "score": "0.5911268", "text": "function splitURL($string, $chunkLen = 50) {\n\t$chunked_str = chunk_split($string, $chunkLen);\n\t$output = str_replace( \"\\r\\n\", \"&lt;br&gt;\", $chunked_str );\n\treturn $output;\n}", "title": "" }, { "docid": "7ea46c1ea50ddbceb4d1d6e3e8ac4444", "score": "0.5910522", "text": "public function parseUri($uri){\r\n $uri = explode(\"/\", $uri);\r\n }", "title": "" }, { "docid": "dbdbfb3cb40b0508937c8929e3e6eb1a", "score": "0.5894862", "text": "private function extractData($url='')\n {\n $url = rtrim(trim($url), '/');\n\n $request = explode('/', $url);\n\n $params = array();\n\n if (count($request) >= 2) {\n $params['controller'] = $request[0];\n $params['action'] = $request[1];\n }\n\n\n for ($i = 2; $i < count($request); $i = $i + 2) {\n if (!empty($request[$i + 1])) {\n $params[(string) $request[$i]] = $request[$i + 1];\n }\n }\n\n return $params;\n }", "title": "" }, { "docid": "f02e896e6659f4afcb7f6ae1c2f11b86", "score": "0.5885639", "text": "private static function get_url_vars() {\n $return = array();\n if (isset($_GET['q']) && $_GET['q'] != \"\") {\n $qs = $_GET['q'];\n $qs = str_replace(\"\\\\\", \"/\", $qs);\n $qs = str_replace(\" \", \"_\", $qs);\n $qs = url::remove_suffix($qs);\n $explode = explode(\"/\", $qs);\n foreach ($explode as $ex) {\n if ($ex != \"\") {\n $return[] = strtolower($ex);\n }\n }\n }\n return $return;\n }", "title": "" }, { "docid": "c44318971fe24a1f3107fc371cbafd2a", "score": "0.5859784", "text": "function get_url(){\n\t$filename = $_SERVER['PHP_SELF'];\n\t$parts = Explode('/', $filename);\n\treturn $parts[count($parts) - 1];\n}", "title": "" } ]
410dd301eb4ccfad0874a4f728319cb1
Get a room from room type to book.
[ { "docid": "965d032e3ae98f05815a1e70cc7226d9", "score": "0.6024123", "text": "public static function get_room_available_from_room_type( $room_type_id, $from, $to ) {\r\n\t\t$room = AWE_function::get_rooms_of_room_type( $room_type_id );\r\n\r\n\t\tif ( empty( $room ) ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$unavailable_room = AWE_function::get_room_unavailable( $from, $to, $room_type_id );\r\n\t\t$unavailable_room_id = array();\r\n\t\tforeach ( $unavailable_room as $v ) {\r\n\t\t\t$unavailable_room_id[] = $v->unit_id;\r\n\t\t}\r\n\r\n\t\t$cart = AWE_function::get_cart();\r\n\r\n\t\tforeach ( $room as $id => $object ) {\r\n\t\t\tif ( in_array( $id, $unavailable_room_id ) ) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tif ( isset( $cart[ $id ] ) ) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\treturn $id;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}", "title": "" } ]
[ { "docid": "0c02f2834a5efefab01ebeb42637ef9a", "score": "0.6868494", "text": "public function get_room()\n\t{\n\t\tif (empty($_GET['room']))\n\t\t{\t\n\t\t\t$db = mysqli_connect('localhost','root','root','hpzcontrol');\n\t\t\t$sql = 'SELECT `room` FROM structure WHERE ip=\"'.$this->ip.'\"';\n\t\t\t$result = mysqli_query($db,$sql);\n\t\t\t$obj = mysqli_fetch_object($result);\n\t\t\t$this->room = $obj->room;\n\t\t\tmysqli_close($db);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->room = $_GET['room'];\n\t\t}\n\t\t\n\t\treturn $this->room;\n\t}", "title": "" }, { "docid": "2c7f2e28411a4dcd3fb91687a9271e3d", "score": "0.67595893", "text": "function get_room($data) {\n\t// the room name is buried deep in the JSON payload\n\treturn $data['item']['room']['name'];\n}", "title": "" }, { "docid": "4751d52b7c59f54f24b6d6d62c487600", "score": "0.6718432", "text": "public function getRoom(int $id);", "title": "" }, { "docid": "dc621a4dd56a72560253eddb9360b0c6", "score": "0.6675476", "text": "public function getRoom($id);", "title": "" }, { "docid": "b9c7cb09855d22fd1b9176213237f932", "score": "0.6588164", "text": "public static function get_rooms_of_room_type( $room_type_id, $post_status = null ) {\r\n\t\t$query_args = array(\r\n\t\t\t'post_parent' => $room_type_id,\r\n\t\t\t'post_type' => 'apb_room',\r\n\t\t\t'numberposts' => -1,\r\n\t\t\t'orderby' => 'ID',\r\n\t\t\t'order' => 'asc',\r\n\t\t);\r\n\r\n\t\tif ( $post_status ) {\r\n\t\t\t$query_args['post_status'] = $post_status;\r\n\t\t}\r\n\r\n\t\t$room = get_children( $query_args );\r\n\r\n\t\treturn $room;\r\n\t}", "title": "" }, { "docid": "a83801f95205c8a78c6fb03c25569652", "score": "0.64940065", "text": "public function get_room() {\n\t\treturn $this->room;\n\t}", "title": "" }, { "docid": "fa85e4ac7491901c08709ca8640af944", "score": "0.6405399", "text": "public function getRoom()\n {\n return $this->hasOne(Room::className(), ['id' => 'room_id']);\n }", "title": "" }, { "docid": "fa85e4ac7491901c08709ca8640af944", "score": "0.6405399", "text": "public function getRoom()\n {\n return $this->hasOne(Room::className(), ['id' => 'room_id']);\n }", "title": "" }, { "docid": "e42c26730ae927d0f3c682042369d979", "score": "0.63852066", "text": "public function show(RoomType $roomType)\n {\n //\n }", "title": "" }, { "docid": "989ea59ced3c78b42467959d31fc82db", "score": "0.63776904", "text": "public function getRoom()\n {\n return $this->room;\n }", "title": "" }, { "docid": "ce13577fc133fbecc6b00e45cccdb560", "score": "0.6373641", "text": "public function getRoom($a_room_id) {\r\n\t\t$set = $this->ilDB->query('SELECT * FROM ' . dbc::ROOMS_TABLE . ' WHERE id = ' . $this->ilDB->quote($a_room_id, 'integer') . ' AND pool_id ='\r\n\t\t\t. $this->ilDB->quote($this->pool_id, 'integer'));\r\n\r\n\t\treturn $this->ilDB->fetchAssoc($set);\r\n\t}", "title": "" }, { "docid": "bb805ba7a6cddeb88779e850793cc78e", "score": "0.63117826", "text": "function get($room_id = NULL, $page = NULL){\n\t\t\n\t\tif ($room_id == NULL){\n\t\t\t// Getting all rooms\n\t\t\t/*$this->db->select('rooms.*, users.user_id, users.username, roomcategories');\n\t\t\t$this->db->from('rooms');\n\t\t\t\n\t\t\t$this->db->join('\n\t\t\t\n\t\t\t$this->db->orderby('category_id ASC, name ASC');*/\n\t\t\t\n\t\t\t$limit = 0;\n\t\t\tif(isset($page) && is_array($page)){\n\t\t\t\t#$this->db->limit($page[0], $page[1]);\n\t\t\t}\n\t\t\t\n\t\t\t$query = $this->db->get();\n\t\t\t\n\t\t\tif($query->num_rows() > 0){\n\t\t\t\treturn $query->result();\n\t\t\t} else {\n\t\t\t\t$this->lasterr = 'There are no rooms.';\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t} else {\n\t\t\tif(!is_numeric($room_id)){\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t\t\n\t\t\t// Getting one room\n\t\t\t$sql = 'SELECT\n\t\t\t\t\t\trooms.*,\n\t\t\t\t\t\tIFNULL(users.displayname, users.username) AS owner_name,\n\t\t\t\t\t\trcs.name AS cat_name\n\t\t\t\t\tFROM rooms \n\t\t\t\t\tLEFT JOIN users ON rooms.user_id = users.user_id\n\t\t\t\t\tLEFT JOIN roomcategories AS rcs ON rooms.category_id = rcs.category_id\n\t\t\t\t\tWHERE rooms.room_id = ? \n\t\t\t\t\tLIMIT 1';\n\t\t\t$query = $this->db->query($sql, array($room_id));\n\t\t\t\n\t\t\tif($query->num_rows() == 1){\n\t\t\t\t// Got the room - get all fields\n\t\t\t\t$room = $query->row();\n\t\t\t\t// Get the field values for this room\n\t\t\t\t$room->attrs = $this->get_attr_values($room_id);\n\t\t\t\t// Get the permissions for this room\n\t\t\t\t#$room->permissions = $this->get_room_permissions($room_id);\n\t\t\t\treturn $room;\n\t\t\t} else {\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "b0a6e4129f71bb5a18a1e00e1c416e47", "score": "0.6294131", "text": "public function getRoom() {\n return $this->room;\n }", "title": "" }, { "docid": "581693cc023fc80f8d446855292424ed", "score": "0.6283503", "text": "public function getRoom() {\n\t\treturn $this->room;\n\t}", "title": "" }, { "docid": "0c034b83636ce9a7381757409a5d07b7", "score": "0.6278847", "text": "public function getRoomType()\n {\n return $this->roomType;\n }", "title": "" }, { "docid": "54d3ff284424c775e69692a0b0d0d8fe", "score": "0.62357944", "text": "public function getRoom($room_id, $account_id): Room {\n $rooms_api = $this->getRoomsApi();\n try {\n $room = $rooms_api->getRoom($room_id, $account_id);\n } catch (ApiException $e) {\n $this->showErrorTemplate($e);\n exit;\n }\n return $room;\n }", "title": "" }, { "docid": "aea0dd80c232333e48d9bcbe60f94172", "score": "0.61366194", "text": "public function getRoom()\n {\n return $this->rom_kode;\n }", "title": "" }, { "docid": "5c66dcab1fc5d226bbc803b03f3f5992", "score": "0.6091209", "text": "public function show(Room $room)\n {\n return RoomResource::make($room);\n }", "title": "" }, { "docid": "2c48568e4210bee5be33d78d89712dc7", "score": "0.6082823", "text": "public function customRoom() {\n $query = \"SELECT r.*\n FROM sections s\n JOIN rooms r\n ON r.id = s.room_id\n WHERE s.id = :id;\";\n $query = DB::select(DB::raw($query), ['id' => $this->id]);\n return Room::hydrate($query)->first();\n }", "title": "" }, { "docid": "b5a1e7e0bb376141b50b970e37caaaa4", "score": "0.6049555", "text": "public function room()\n {\n return $this->belongsToOne(Room::class, 'room_id');\n }", "title": "" }, { "docid": "2e724368cedda6bd9320e6f3609236c5", "score": "0.6043912", "text": "public function show(Room $room)\n {\n //\n }", "title": "" }, { "docid": "2e724368cedda6bd9320e6f3609236c5", "score": "0.6043912", "text": "public function show(Room $room)\n {\n //\n }", "title": "" }, { "docid": "2e724368cedda6bd9320e6f3609236c5", "score": "0.6043912", "text": "public function show(Room $room)\n {\n //\n }", "title": "" }, { "docid": "937fe81e5e166f7b5a8710b5d7a00a9c", "score": "0.5988447", "text": "public function getBookRooms()\n {\n return $this->hasMany(BookRoom::className(), ['room_id' => 'id']);\n }", "title": "" }, { "docid": "8039c977e61fb465044ba75aa27783db", "score": "0.5973505", "text": "public function room()\n {\n return $this->belongsTo('App\\Room', 'ROOM_ID', 'ROOM_ID');\n }", "title": "" }, { "docid": "e68655ae45e177f9eb0c573149264810", "score": "0.59256643", "text": "public function show(bookedRoom $bookedRoom)\n {\n //\n }", "title": "" }, { "docid": "8159543fefd966b9ca7553958c1e3607", "score": "0.5897004", "text": "public function rooms()\n {\n return $this->hasMany('App\\Model\\Room', 'room_type_id');\n }", "title": "" }, { "docid": "fc4e12751ac1bb44800e39521b8eead1", "score": "0.58505946", "text": "public function getRooms($params = array());", "title": "" }, { "docid": "84881ad0c87f1b8fa6d9ea491604bfdf", "score": "0.5836488", "text": "public function getBookRooms()\n {\n return $this->hasMany(BookRoom::className(), ['week_id' => 'id']);\n }", "title": "" }, { "docid": "944df14698fa754666afb7b85a38b493", "score": "0.58028734", "text": "public function showRoom($id)\n {\n //find a Room based on a given Id\n $room = Room::findOrFail($id);\n $linkedtype = $room->room_type;\n // dd($linkedtype);\n $type = RoomType::where('type', $linkedtype)->get();\n // dd($type);\n $rtype=$type[0];\n $room_type= $rtype['type'];\n // dd($room_type);\n $price =PriceList::where('room_type',$room_type)->get();\n // dd($price);\n $price=$price[0];\n $price=$price['price'];\n $type = $type[0];\n // dd($price);\n $type =$type->type;\n // return view('rooms.show')->with(['room'=>$room, 'type'=>$type, 'price'=>$price]);\n $roomdetails = ['room'=>$room, 'type'=>$type, 'price'=>$price];\n return $roomdetails;\n }", "title": "" }, { "docid": "62265389485e130168198226c1f03c5f", "score": "0.57923746", "text": "public function getAvailableRoomsForSwapping($date_from, $date_to, $room_type, $hotel_id, $id_room)\n\t\t{\n\t\t\t$sql = \"SELECT `id` AS `id_room`, `id_product`, `id_hotel`, `room_num`, `comment` AS `room_comment` FROM `\"._DB_PREFIX_.\"htl_room_information` WHERE `id_hotel`=\".$hotel_id.\" AND `id_product`=\".$room_type.\" AND `id_status` = 1 AND `id` IN (\".\"SELECT `id_room` FROM `\"._DB_PREFIX_.\"htl_booking_detail` WHERE `date_from` = '$date_from' AND `date_to` = '$date_to' AND `id_room`!=\".$id_room.\" AND `is_refunded`=0 AND `is_back_order`=0)\";\n\t\t\t\t\t\n\t\t\t$avail_rooms = Db::getInstance()->executeS($sql);\n\t\t\tif ($avail_rooms)\n\t\t\t\treturn $avail_rooms;\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "6cba086f14054f72c6240903b996722e", "score": "0.57695967", "text": "public function getRoom(Request $request)\n {\n\n $rooms = Room::where('room_status', 1)->where('id', '!=', $request->room_id)->with('roomtype')->select(['id', 'room_no', 'room_type', 'tariff'])->get();\n return response()->json($rooms);\n }", "title": "" }, { "docid": "1b3add8b11aa0b800a13f20b969c443a", "score": "0.5745742", "text": "public function show(Room $room) \n {\n \n $bookings = Booking::where('room_id', $room->id)->orderByDesc('start_date')->get();\n \n if($bookings->count()) {\n foreach ($bookings as $key => $value) {\n $events[] = Calendar::event(\n $value->name,\n true,\n new \\DateTime($value->start_date),\n new \\DateTime($value->end_date.' +1 day'),\n null,\n // Add color and link on event\n\t [\n\t 'color' => '#f05050',\n 'url' => '#'.$value->id,\n \n\t ]\n );\n }\n \n $calendar = Calendar::addEvents($events);\n return view('rooms.show',compact('room','bookings','calendar'));\n }else{\n return view('rooms.show',compact('room'));\n }\n }", "title": "" }, { "docid": "1969ffe46860206e7cc36e98fd67894f", "score": "0.5739558", "text": "public function getSpeakerByRoom(string $room): SpeakerInterface;", "title": "" }, { "docid": "4cdbd225715aae17055b48d453c3d7e1", "score": "0.57323617", "text": "public function room(){\n return $this->belongsTo('App\\Room');\n }", "title": "" }, { "docid": "5983d2be4bc9862aa55e31e62d139b91", "score": "0.5730228", "text": "public function getAvailableRoomsForReallocation($date_from, $date_to, $room_type, $hotel_id)\n\t\t{\n\t\t\tif (isset($_COOKIE['wk_id_cart']))\n\t\t\t\t$current_admin_cart_id = $_COOKIE['wk_id_cart'];\n\n\t\t\tif (isset($current_admin_cart_id) && $current_admin_cart_id)\n\t\t\t\t$sql = \"SELECT `id` AS `id_room`, `id_product`, `id_hotel`, `room_num`, `comment` AS `room_comment` FROM `\"._DB_PREFIX_.\"htl_room_information` WHERE `id_hotel`=\".$hotel_id.\" AND `id_product`=\".$room_type.\" AND id_status = 1 AND `id` NOT IN (SELECT `id_room` FROM `\"._DB_PREFIX_.\"htl_booking_detail` WHERE `date_from` < '$date_to' AND `date_to` > '$date_from' AND `is_refunded`=0 AND `is_back_order`=0) AND `id` NOT IN (SELECT `id_room` FROM `\"._DB_PREFIX_.\"htl_cart_booking_data` WHERE `id_cart`=\".$current_admin_cart_id.\")\";\n\t\t\telse\n\t\t\t\t$sql = \"SELECT `id` AS `id_room`, `id_product`, `id_hotel`, `room_num`, `comment` AS `room_comment` FROM `\"._DB_PREFIX_.\"htl_room_information` WHERE `id_hotel`=\".$hotel_id.\" AND `id_product`=\".$room_type.\" AND id_status = 1 AND `id` NOT IN (SELECT `id_room` FROM `\"._DB_PREFIX_.\"htl_booking_detail` WHERE `date_from` < '$date_to' AND `date_to` > '$date_from' AND `is_refunded`=0 AND `is_back_order`=0)\";\t\t\t\n\t\t\t$avail_rooms = Db::getInstance()->executeS($sql);\n\t\t\tif ($avail_rooms)\n\t\t\t\treturn $avail_rooms;\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "1ca739cf1440637a08df7aba6fb2ecf8", "score": "0.57259715", "text": "public function setRoom($room)\n {\n $this->rom_kode = $room;\n return $this;\n }", "title": "" }, { "docid": "59aa3eb1b4747302434db8199b3b1b03", "score": "0.5706257", "text": "public function room()\n {\n return $this->belongsTo('App\\Room','room_id');\n }", "title": "" }, { "docid": "4a36fce1f18dfaaaf95e0aa9569f88fe", "score": "0.5703323", "text": "public function getBookedRooms()\n {\n return $this->hasMany(BookedRooms::className(), ['room_id' => 'id']);\n }", "title": "" }, { "docid": "ce786a8e83b928c983c251c4138ab27e", "score": "0.5695202", "text": "function processBookRoom()\n {\n $hotelId = $_GET['hotelId'];\n $hotel = $_SESSION['hotel'] ?? Hotel::find($hotelId);\n $rooms = $_SESSION['rooms'];\n\n if (!isset($_SESSION[\"user\"])) {\n $this->registry->template->hotel = $hotel;\n $this->registry->template->rooms = $rooms ?? Room::where(\"id_hotel\", $_GET['roomId']);\n $this->registry->template->error = \"You have to login before booking a room!\";\n $this->registry->template->show(\"hotel\");\n }\n if (!isset($_SESSION[\"fromDate\"]) || !isset($_SESSION[\"toDate\"])) {\n echo \"To and from dates have to be in a session\";\n exit(1);\n }\n\n $user = $_SESSION[\"user\"];\n $fromDate = $_SESSION[\"fromDate\"];\n $toDate = $_SESSION[\"toDate\"];\n $booking = new Booking();\n $booking->setId_user($user->getId());\n $booking->setFrom_date($fromDate);\n $booking->setTo_date($toDate);\n $booking->setId_hotel($hotelId);\n $booking->setRoom_id($_GET[\"roomId\"]);\n Booking::save($booking);\n\n $_SESSION[\"booked\"] = \"You have succesfully booked a \" . $_GET[\"roomType\"] . \" at \" . $hotel->getName();\n header('Location: ' . __SITE_URL);\n }", "title": "" }, { "docid": "555711aba8b345772a505aba0f9fe493", "score": "0.56866956", "text": "public function GetRoom($id){\n try\n {\n $query = \"SELECT * FROM \".$this->tableName.\" where id_room=$id;\";\n $this->connection = Connection::GetInstance();\n $resultSet = $this->connection->Execute($query);\n //var_dump($resultSet);\n $room = new Room();\n $cinema = new Cinema();\n \n\n foreach ($resultSet as $row){\n $room->setId($row[\"id_room\"]);\n $room->setName($row[\"room_name\"]);\n $room->setCapacity($row[\"room_capacity\"]);\n $cinema = $this->cinemaDAOBD->GetCinema($row[\"id_cinema\"]);\n $room->setCinema($cinema);\n }\n //var_dump($room);\n return $room;\n\n }\n catch(Exception $ex)\n {\n throw $ex;\n }\n\n }", "title": "" }, { "docid": "95af23c9593a095b6ffbfd22aa96f22e", "score": "0.56844324", "text": "public function rooms(): Room\n {\n return new Room(null, $this->url);\n }", "title": "" }, { "docid": "e43b983fc8e2ecf0c7c68580fc3e5f9b", "score": "0.5677177", "text": "public function show_rooms()\n {\n $this->show_objects('BookingRoom');\n }", "title": "" }, { "docid": "f3168af4b6214d031978775261264b19", "score": "0.5668066", "text": "public function edit(RoomType $roomType)\n {\n //\n }", "title": "" }, { "docid": "beffb7234dcc15177cc64b0860e24ae6", "score": "0.56676406", "text": "public function room() {\n return $this->belongsTo('App\\Room')->getResults();\n }", "title": "" }, { "docid": "3b3d94ef6c30cce820b99f0a39ec2cb0", "score": "0.56617737", "text": "private function getRoomTypeManager()\n {\n return $this->roomTypeManager;\n }", "title": "" }, { "docid": "f0dd7811a7a578cb9427245918eb5253", "score": "0.5654089", "text": "function getUserRoom($userId) {\n\t$sqlArgs = \"WHERE `id` = '\" . $userId . \"'\";\n\t$sqlReturn = sqlToArray ('users','room',$sqlArgs);\n\tif (empty($sqlReturn)) {\n\t\treturn false;\n\t}\n\telse {\n\t\treturn $sqlReturn[0]['room'];\n\t}\n}", "title": "" }, { "docid": "f986b44e23a69a6921c3883e92b67c91", "score": "0.5653666", "text": "public function get_room_id() {\n\t\treturn $this->room_id;\n\t}", "title": "" }, { "docid": "30984fe287de20b7a1342f7de38669f2", "score": "0.5650675", "text": "public function getRooms($param)\n {\n try\n {\n $result = $this->model->getRooms($param);\n $result = $this->encodedData($result);\n return $this->response->serverSuccess(200, $result);\n }\n catch (Exception $exception)\n {\n return $this->response->serverError(500, $exception->getMessage());\n }\n }", "title": "" }, { "docid": "84600dd9da70efc1ffab044b57c8a8f6", "score": "0.5631828", "text": "public function getControllerByRoom(string $room): ControllerInterface;", "title": "" }, { "docid": "cc03d742288520dcf0022d2ac1ee5bad", "score": "0.5605189", "text": "public function getRoomId()\n {\n return $this->room_id;\n }", "title": "" }, { "docid": "e820e94de4794da828a9d7b68c909cc4", "score": "0.5594922", "text": "public function getRandomRoom() {\n return $this->rooms[array_rand($this->rooms)];\n }", "title": "" }, { "docid": "c7c05e08ccf608ea4718fd7eb91c5df9", "score": "0.5567833", "text": "public function room(): BelongsTo\n {\n return $this->belongsTo(Room::class);\n }", "title": "" }, { "docid": "afc9586406b7fbba99f7d6e6432cedb1", "score": "0.556252", "text": "function GetRoomDetail($rID, $conn) {\n $room = json_decode(FindRecord('room', 'ROOM_ID', $rID, $conn));\n if ($room) {\n $room->CAPABILITIES = GetCapabilities($rID, $conn);\n return $room;\n }\n else {\n return null;\n }\n}", "title": "" }, { "docid": "686c11d5abc3ed0c4bda1ea71709a6cf", "score": "0.55617326", "text": "public function add_room()\n {\n $this->modify_object('BookingRoom');\n }", "title": "" }, { "docid": "bd8ae2c22f37a5917a6b096bf27ecabe", "score": "0.5549297", "text": "public function show(Room $room)\n {\n //\n $photo_name = Photo::where('room_id', $room->id)->value('name');\n $host_name = User::where('id', $room->user_id)->value('name');\n if ((Auth::check()) && (in_array(Auth::user()->id, UserRoom::where('room_id', $room->id)->pluck('user_id')->toArray()))) \n {\n return redirect(route('myroom', UserRoom::where('room_id', $room->id)->first()->id));\n } else {\n return view('rooms/show', ['room' => $room, 'photo_name' => $photo_name, 'host_name' => $host_name]);\n }\n }", "title": "" }, { "docid": "e1a87d0accd0b8d181048545d279ec46", "score": "0.55380094", "text": "public function getRoomName() {\n return $this->type . ' ' . explode('.', $this->location)[2];\n }", "title": "" }, { "docid": "a1c8fb0af38dd234f67709e0b1df33b6", "score": "0.55365235", "text": "public function room()\n {\n return $this->hasOne(RoomUser::class, 'user_id');\n }", "title": "" }, { "docid": "7541edbd014299e81de0b24044675f6e", "score": "0.5535511", "text": "public function findAllRooms();", "title": "" }, { "docid": "8f8a0d04f3460320723728b4da3a00c8", "score": "0.5520004", "text": "public function getRoomId()\n {\n return $this->roomId;\n }", "title": "" }, { "docid": "45e594bad94b751cadbc701bc3d2a9f9", "score": "0.55153674", "text": "public function getRoom($roomId)\n {\n if (!isset($this->rooms[$roomId])) {\n print \"No room with ID \" . $roomId;\n return null;\n }\n\n return $this->rooms[$roomId];\n }", "title": "" }, { "docid": "edebfb0a19e3c70523f1b87fc1e7e210", "score": "0.55020493", "text": "function apb_restore_room_when_restore_room_type( $post ) {\r\n\tif ( 'apb_room_type' != $post->post_type ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\t$rooms = AWE_function::get_rooms_of_room_type( $post->ID, true );\r\n\r\n\tforeach ( $rooms as $room ) {\r\n\t\twp_publish_post( $room->ID );\r\n\t}\r\n}", "title": "" }, { "docid": "97999fb0fdd4f2bea4f209f5a256a4ca", "score": "0.5489007", "text": "public function model()\n {\n return Room::class;\n }", "title": "" }, { "docid": "27aa0886014a00fcf36943fea0c165fd", "score": "0.5486443", "text": "public function rooms()\n {\n return $this->belongsTo('App\\Room', 'rooms_id');\n }", "title": "" }, { "docid": "a36051547dbe548330acf7c665023de0", "score": "0.5472415", "text": "public function show($room)\n {\n //\n return Message::where('room_id', $room)->latest()->simplePaginate(20);\n }", "title": "" }, { "docid": "2c924097a8e21af8fa7b3f06f1d3ab98", "score": "0.5472092", "text": "public function show(Room $room)\n {\n RoomResource::withoutWrapping();\n return new RoomResource($room);\n }", "title": "" }, { "docid": "b78339e0709d4b3cba0d86ed4e4a1132", "score": "0.5450722", "text": "public function getRoomNum(){\r\n\t\treturn $this->roomNumber;\r\n\t}", "title": "" }, { "docid": "f429c1edfc51a46611ce1a17f0c2f2c2", "score": "0.54152626", "text": "public function room(): BelongsTo\n {\n return $this->belongsTo(Room::class, 'room_id');\n }", "title": "" }, { "docid": "e058d1dd02a1af1777890ed582a60bff", "score": "0.54055107", "text": "public function show(Room $room)\n {\n //administrador\n if(Auth::user()->type==0){\n session()->flash('mensagem', 'Acesso Negado!');\n return redirect()->route('user.index');\n }\n //usuário comum\n else{\n $equipments = Equipment::orderBy('name')\n ->where('room_id', $room->id)\n ->get();\n\n $potencia_total = DB::table('equipments')\n ->select(DB::raw('sum(amount*watts) AS potencia_total'))\n ->where('room_id', $room->id)\n ->first();\n\n //dd($potencia_total);\n\n //$potencia_total = $equipments->select(DB::raw('sum(amount * watts) as potencia_total'));\n return view('usuario.room.show')->with('room', $room)\n ->with('equipments', $equipments)\n ->with('potencia_total', $potencia_total);\n }\n }", "title": "" }, { "docid": "a2de5ae1a843f549c561d5f4019c0a7e", "score": "0.5396491", "text": "public static function create_room( $room_type_id, $room_name ) {\r\n\t\t$room_id = wp_insert_post( array(\r\n\t\t\t'post_parent' => $room_type_id,\r\n\t\t\t'post_title' => $room_name,\r\n\t\t\t'post_type' => 'apb_room',\r\n\t\t\t'post_status' => 'publish',\r\n\t\t) );\r\n\r\n\t\treturn $room_id;\r\n\t}", "title": "" }, { "docid": "f61af0f9d69b9a52084a9ec23795e8a3", "score": "0.538619", "text": "public function edit(Room $room)\n { \n //administrador\n if(Auth::user()->type==0){\n session()->flash('mensagem', 'Acesso Negado!');\n return redirect()->route('user.index');\n }\n //usuário comum\n else{\n return view('usuario.room.edit')->with('room', $room);\n }\n }", "title": "" }, { "docid": "474a3998775dc5b16ce2fd4eb925c78c", "score": "0.53861433", "text": "function character_room($current_character_id) {\n\t$query = \"SELECT inRoom FROM characters WHERE (id='$current_character_id')\";\n\t$result = mysql_query($query) or die(mysql_error());\n\t$numrows=mysql_num_rows($result);\n\t/* List Characters */\n\tif ($numrows != 0) {\n\t\twhile($row = mysql_fetch_array($result)) {\n\t\t\t$room = $row['inRoom'];\n\t\t}\n\t}\n\treturn $room;\n}", "title": "" }, { "docid": "e2d09203f63aa80b1751858f2c5949b2", "score": "0.53833026", "text": "public function room()\n {\n return $this->belongsTo('App\\Room')\n ->select(['id','title']);\n }", "title": "" }, { "docid": "54f780eba4231dd7bdd64b11e2e3ca85", "score": "0.537118", "text": "public function show($hotel_id, Request $request, $room_id)\n {\n //\n }", "title": "" }, { "docid": "1c931965c2f350c1d809756723cd88ed", "score": "0.5352639", "text": "function getRoom() \n{\n\t$i=0;\n\t$sql = \"SELECT L.*,F.* FROM location_facilities_v2 AS F JOIN location_info as L ON L.id = F.vo_id WHERE F.facility_type = 1\";\n\t$res = getData($sql);\n\twhile( $row =mysqli_fetch_array($res))\n\t{\n\n\t\t$data['location_name'][$i] = $row['location_desc']; \t\n\t\t$i++; \t\n\t}\t \n\treturn $data;\n\t\n}", "title": "" }, { "docid": "ffbe5776b7021428d6588e69600e1e9b", "score": "0.5334652", "text": "public function getRoomWithName($a_room_name) {\r\n\t\t$roomSet = $this->ilDB->query('SELECT * FROM ' . dbc::ROOMS_TABLE . ' WHERE name = ' . $this->ilDB->quote($a_room_name, 'text')\r\n\t\t\t. ' AND pool_id =' . $this->ilDB->quote($this->pool_id, 'integer'));\r\n\t\t$rooms = array();\r\n\t\twhile ($namerow = $this->ilDB->fetchAssoc($roomSet)) {\r\n\t\t\t$rooms[] = $namerow;\r\n\t\t}\r\n\r\n\t\treturn $rooms;\r\n\t}", "title": "" }, { "docid": "03fbeee67557fad4b33a19c012bb3b2f", "score": "0.53300226", "text": "public function set_room($room) {\n\t\t$this->room = $room;\n\t}", "title": "" }, { "docid": "f2bf8b794899f237810d98ac76264211", "score": "0.53238493", "text": "public function getRoomsAttribute()\n {\n return HotelRoom::where('hotel_id',$this->id)->get();\n }", "title": "" }, { "docid": "411eac987a647590aca95539c0d76d6a", "score": "0.53191936", "text": "public function room_types()\n {\n return $this->belongsTo('App\\Models\\RoomType', 'room_type_id');\n }", "title": "" }, { "docid": "4f5c440bf0435e3c43e0d2db1742a4ab", "score": "0.53088796", "text": "function fetchArmory( $type = false, $character = false, $guild = false, $realm = false, $item_id = false,$fetch_type = 'array' )\n\t{\n\t\tglobal $roster;\n\n\t\t$url = $this->_makeUrl( $type, false, $item_id, $character, $realm, $guild );\n\t\tif ( $fetch_type == 'html')\n\t\t{\n\t\t\t$this->setUserAgent('Opera/9.22 (X11; Linux i686; U; en)');\n\t\t}\n\t\tif( $this->_requestXml($url) )\n\t\t{\n\t\t\tif( $fetch_type == 'array' )\n\t\t\t{\n\t\t\t\t// parse and return array\n\t\t\t\t$this->_initXmlParser();\n\t\t\t\t$this->xmlParser->Parse($this->xml);\n\t\t\t\t$data = $this->xmlParser->getParsedData();\n\t\t\t}\n\t\t\telseif( $fetch_type == 'simpleClass' )\n\t\t\t{\n\t\t\t\t// parse and return SimpleClass object\n\t\t\t\t$this->_initSimpleParser();\n\t\t\t\t$data = $this->simpleParser->parse($this->xml);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// unparsed fetches\n\t\t\t\treturn $this->xml;\n\t\t\t}\n\t\t\treturn $data;\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttrigger_error('RosterArmory:: Failed to fetch ' . $url);\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "91ab66d9ed3b08d834e013536c012e9b", "score": "0.5306873", "text": "public function getRoomNumber()\n {\n return $this->roomNumber;\n }", "title": "" }, { "docid": "91ab66d9ed3b08d834e013536c012e9b", "score": "0.5306873", "text": "public function getRoomNumber()\n {\n return $this->roomNumber;\n }", "title": "" }, { "docid": "5036dbf303b75fb325f59d861bfd1e85", "score": "0.5306587", "text": "public function getMeetingRoom()\n {\n return $this->meetingRoom;\n }", "title": "" }, { "docid": "73481dbabe2de88952805eb24837609c", "score": "0.52947855", "text": "public function fetch_lroom()\n\t\t{\n\t\t\t $exe=\"SELECT * FROM sub_departement WHERE departement='L-Room'\";\n\t\t\t $query=$this->db->query($exe);\n \t\t\t return $query;\n\n\t\t}", "title": "" }, { "docid": "7f1d0ed6657f635b5744eee9b2085edd", "score": "0.5283288", "text": "public function edit(Room $room)\n {\n //\n }", "title": "" }, { "docid": "7f1d0ed6657f635b5744eee9b2085edd", "score": "0.5283288", "text": "public function edit(Room $room)\n {\n //\n }", "title": "" }, { "docid": "6ce83ed7beb7be8316713102f5b1d43a", "score": "0.5272857", "text": "public function getRoomTypeAction(ParamFetcher $paramFetcher)\n {\n $page = $paramFetcher->get('page');\n $count = $paramFetcher->get('count');\n \n $pager = $this->getRoomTypeManager()->getPager($this->filterCriteria($paramFetcher), $page, $count);\n \n return $pager;\n }", "title": "" }, { "docid": "2f975fe1a868c661d84c1183ea2bb9ba", "score": "0.52706397", "text": "public function show($id)\n {\n //find a Room based on a given Id\n return new RoomResource(Room::findOrFail($id));\n }", "title": "" }, { "docid": "6d234f7eef1c73b2d33584511426ac63", "score": "0.5255962", "text": "public function rentRoom($user, $room, $from, $to)\n {\n $sql = \"SELECT student_id FROM user WHERE username = '$user'\";\n $result = $this->connection->query($sql);\n $id = $result->fetch_assoc();\n $sql = \"SELECT id FROM room WHERE name = '$room'\";\n $result = $this->connection->query($sql);\n $roomID = $result->fetch_assoc();\n $sql = \"INSERT INTO booking VALUES (NULL, STR_TO_DATE('\" . $from . \"', '%Y-%m-%d'), STR_TO_DATE('\" . $to . \"', '%Y-%m-%d'), \" . $roomID['id'] . \", \" . $id['student_id'] . \", NULL);\";\n $this->connection->query($sql);\n }", "title": "" }, { "docid": "7f56f4869bd46553802f7fff109debb7", "score": "0.5244942", "text": "public function setRoom($room) {\n\t\t$this->room = $room;\n\t}", "title": "" }, { "docid": "6bf04836f1c7d3af96c772023b9c1b6a", "score": "0.52287513", "text": "public function getSpaceRoom()\n {\n return $this->hasOne(SpaceRoom::className(), ['id' => 'space_room_id']);\n }", "title": "" }, { "docid": "5bb97536b4f044a846a4910529543d59", "score": "0.5227623", "text": "public function getRoomTypeDetailAction(ParamFetcher $paramFetcher)\n {\n $roomtypeId = $paramFetcher->get('roomtype_id');\n \n if(!$result = $this->getRoomTypeManager()->find($roomtypeId)){\n return 'ok';\n throw new HttpException(404, 'This room type does not exist');\n }\n \n return $result;\n \n }", "title": "" }, { "docid": "a398f7e4f0bcd40c9a9b004646da9fda", "score": "0.5217152", "text": "public function getRoomName()\n {\n if (array_key_exists(\"roomName\", $this->_propDict)) {\n return $this->_propDict[\"roomName\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "91167e934d02477ff632b69a1e6d0cae", "score": "0.521143", "text": "public function showRoomByHotel($hotel_id){\n $hotel = DB::table('room')\n ->leftJoin('hotel','hotel.id','=','room.hotel_id')\n ->leftJoin('room_facility','room.id','=','room_facility.room_id')\n ->leftJoin('facility_category','facility_category.id','=','room_facility.facility_category_id')\n ->join('booking', 'booking.room_id', 'room.id')\n ->where('hotel.id',$hotel_id)\n ->select('room.*','hotel.hotel_name',\n 'room_facility.facility_category_id',\n 'facility_category.facility_name',\n 'facility_category.facility_icon',\n 'booking.booking_status', \n 'booking.check_in',\n 'booking.check_out',\n 'booking.user_id')\n // ->select('room.id', 'room.hotel_id', 'booking.booking_status', 'booking.user_id')\n\n ->orderBy('room.id','asc')\n ->orderBy('room_facility.facility_category_id','asc')\n ->get();\n return $hotel;\n }", "title": "" }, { "docid": "c357c2ee2f4ce286a21f9b0e61439d3f", "score": "0.52011144", "text": "public function rooms()\n {\n return $this->hasMany('App\\Models\\Room');\n }", "title": "" }, { "docid": "b7bbe78b6b23bb55843e903817b6d88f", "score": "0.5183696", "text": "public function setRoomType($roomType)\n {\n $this->roomType = $roomType;\n\n return $this;\n }", "title": "" }, { "docid": "2298cc366707ec19b3bb347fdf2df136", "score": "0.51823765", "text": "public function rooms()\n {\n return $this->hasMany(Room::class);\n }", "title": "" }, { "docid": "1ca939e06507cbb89788207282a12bdf", "score": "0.51761883", "text": "public function show(RoomType $roomType)\n {\n return view('roomTypes.show',compact('roomType'));\n }", "title": "" }, { "docid": "fac97f8dce396f0158783f577189fe3d", "score": "0.5173981", "text": "function GetRoom($roomId){\r\n\t$headers = array(\r\n\t\t'Content-Type: application/json',\r\n\t\t'Authorization: Basic '. base64_encode(APP_ID . \":\". APP_KEY)\r\n\t);\r\n\r\n\t/* CURL POST Request */\r\n\r\n\t$ch = curl_init(API_URL.\"/rooms/\".$roomId);\r\n\tcurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\r\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n\tcurl_setopt($ch, CURLOPT_POST, false);\r\n\r\n\t$response = curl_exec($ch);\r\n\r\n\tcurl_close($ch);\r\n\treturn $response;\r\n\r\n}", "title": "" }, { "docid": "eeb25a67e1498c453b270b188fadcf85", "score": "0.51612777", "text": "function get_campus_name_from_room($room_number)\n{\n\tglobal $conn;\n\t$stmt = $conn->prepare('SELECT campus_name FROM tbl_campuses, tbl_rooms\n\t\tWHERE room_number = :room AND tbl_campuses.campus_id = tbl_rooms.campus_id');\n\t$stmt->bindValue(':room', $room_number);\n\treturn execute_fetch_param($stmt, 'campus_name');\n}", "title": "" } ]
a85e260dd2e6e462a217a94383d34f85
Register any application services.
[ { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.0", "text": "public function register()\n {\n //\n }", "title": "" } ]
[ { "docid": "d70c37ddb88a852efcfd8b23f16a6080", "score": "0.78882134", "text": "public function register()\n {\n // Register any bindings or services here\n }", "title": "" }, { "docid": "bf07a6ccbc1940e2be8abff91e94a2f6", "score": "0.7879658", "text": "public function register()\n {\n $this->registerServices();\n }", "title": "" }, { "docid": "bf07a6ccbc1940e2be8abff91e94a2f6", "score": "0.7879658", "text": "public function register()\n {\n $this->registerServices();\n }", "title": "" }, { "docid": "f70d8ed816e1156cec094ddb6d5d1e6f", "score": "0.7652205", "text": "public function register()\n\t{\n\t\t$this->registerServices();\n\t}", "title": "" }, { "docid": "c768ccc5d210c060f9397c11f3e08a43", "score": "0.7504075", "text": "public function register()\n { \t\n \t$this->registerArretService();\t\n \t$this->registerAnalyseService();\t\n \t$this->registerSeminaireService();\t\n \t$this->registerSubjectService();\t\n \t$this->registerAuteurService();\t\n \t$this->registerCategorieService();\n \t$this->registerBSCategorieService();\t \t\t\t\n }", "title": "" }, { "docid": "a1b47fbaafde6c789337321ea0ed35da", "score": "0.74701923", "text": "public function register()\n {\n $this->defineServices();\n }", "title": "" }, { "docid": "9ecb8f965303ffa0f4c237d34c3bcbb1", "score": "0.7450847", "text": "public function register()\n {\n $this->registerService();\n }", "title": "" }, { "docid": "9ecb8f965303ffa0f4c237d34c3bcbb1", "score": "0.7450847", "text": "public function register()\n {\n $this->registerService();\n }", "title": "" }, { "docid": "9ecb8f965303ffa0f4c237d34c3bcbb1", "score": "0.7450847", "text": "public function register()\n {\n $this->registerService();\n }", "title": "" }, { "docid": "ff2e87df5f8fe1995a7f566a66029a9a", "score": "0.7373759", "text": "public function register()\n {\n $this->registerConfig();\n $this->registerService();\n }", "title": "" }, { "docid": "fbf745c5826f86c4c823fe56841976ec", "score": "0.73706204", "text": "public function register()\n {\n $this->registerSeoMetaService();\n $this->registerSeoOpenGraphService();\n $this->registerSeoTwitterService();\n }", "title": "" }, { "docid": "b5585067d9f260015063e06f97fd199e", "score": "0.7294904", "text": "public function register()\n {\n $this->registerTailwindService();\n\n if ($this->app->runningInConsole()) {\n $this->registerResources();\n }\n }", "title": "" }, { "docid": "e10ce6dcc700e5192b2732ba48acbc04", "score": "0.727807", "text": "public function register()\n {\n $this->registerPasswordBroker();\n\n $this->registerTokenRepository();\n }", "title": "" }, { "docid": "f5f3f84b78f65540e54e1171a6d19495", "score": "0.72768116", "text": "public function register()\n {\n $this->app->make('Exdeliver\\Marketplace\\Controllers\\MarketplaceController');\n\n $this->app->bind('marketplaceservice', 'Exdeliver\\Marketplace\\Services\\MarketplaceService'); // bind service\n\n $this->loadViewsFrom(__DIR__.'/Views', 'marketplace');\n $this->loadMigrationsFrom(__DIR__.'/Migrations');\n\n }", "title": "" }, { "docid": "4eda3e1dba7047d11a9185d19899a33c", "score": "0.7270899", "text": "public function register()\n {\n if ($this->app->environment() !== 'production') {\n $this->app->register(IdeHelperServiceProvider::class);\n }\n\n // $this->app->bind(BaseService::class, UserService::class);\n // $this->app->bind(BaseService::class, CompanyService::class);\n }", "title": "" }, { "docid": "c9bc6cfd69a60feee0745325044d378e", "score": "0.7268026", "text": "public function register()\n {\n $this->registerRepositories();\n }", "title": "" }, { "docid": "294b64101d8d64a5ad7b8810628ae2de", "score": "0.724781", "text": "public function register()\n {\n // Account\n\n $this->app->bind(\n 'Mobilozophy\\MZCAPILaravel\\Services\\Api\\MZCAPI\\MessageCenter\\DeviceAPIService',\n function () {\n return new DeviceAPIService($this->app['GuzzleHttp\\Client']);\n }\n );\n\n $this->app->bind(\n 'Mobilozophy\\MZCAPILaravel\\Services\\Api\\MZCAPI\\MessageCenter\\SubscriptionAPIService',\n function () {\n return new SubscriptionAPIService(\n $this->app['GuzzleHttp\\Client']\n );\n }\n );\n\n $this->app->bind(\n 'Mobilozophy\\MZCAPILaravel\\Services\\Api\\MZCAPI\\MessageCenter\\TriggeredSendAPIService',\n function () {\n return new TriggeredSendAPIService(\n $this->app['GuzzleHttp\\Client']\n );\n }\n );\n\n $this->app->bind(\n 'Mobilozophy\\MZCAPILaravel\\Services\\Api\\MZCAPI\\MessageCenter\\TriggeredSendProfileAPIService',\n function () {\n return new TriggeredSendProfileAPIService(\n $this->app['GuzzleHttp\\Client']\n );\n }\n );\n }", "title": "" }, { "docid": "00f133a1ea16305d53d0bc40d354894e", "score": "0.7237675", "text": "public function register()\n {\n $this->app->register(ConsoleServiceProvider::class);\n $this->app->register(WebSocketServiceProvider::class);\n }", "title": "" }, { "docid": "498b52609b28a7945490ca3e8d705db5", "score": "0.7218538", "text": "public function register()\n {\n $this->mergeConfigFrom(__DIR__.'/../config/laralastica.php', 'laralastica');\n\n $this->registerClient();\n $this->registerCommands();\n }", "title": "" }, { "docid": "3b29493e307a4cb1b6e6a510302c2946", "score": "0.7206262", "text": "public function register()\n {\n $this->mergeConfigFrom(__DIR__.'/../config/filesystems.php', 'disks');\n $this->mergeConfigFrom(__DIR__.'/../config/volcator.php', 'volcator');\n $this->mergeConfigFrom(__DIR__.'/../config/prefix.php', 'prefix');\n $this->mergeConfigFrom(__DIR__.'/../config/languages.php', 'languages');\n $this->app->register(VolcatorRouteServiceProvider::class);\n $this->app->register(VolcatorMailServiceProvider::class);\n $this->app->register(VolcatorEventServiceProvider::class);\n $this->app->register(VolcatorTranslationServiceProvider::class);\n $this->app->register(VolcatorGuardServiceProvider::class);\n $this->app->register(VolcatorEventServiceProvider::class);\n $this->registerVolcator();\n $this->registerCommands();\n }", "title": "" }, { "docid": "9be2e59030125ec07ee7c56c1627e733", "score": "0.72031647", "text": "public function register() {\n\n $this->registerFaceBook();\n $this->registerGoogleClient();\n $this->registerGithubClient();\n }", "title": "" }, { "docid": "4e47ba6bee848a4d803b1825e06da0dc", "score": "0.7195809", "text": "public function register()\n {\n // ユーザー登録サービス\n $this->app->bind(\n \\App\\Services\\Api\\Interfaces\\UserRegisterServiceInterface::class,\n \\App\\Services\\Api\\UserRegisterService::class\n );\n // ユーザーログインサービス\n $this->app->bind(\n \\App\\Services\\Api\\Interfaces\\UserLoginServiceInterface::class,\n \\App\\Services\\Api\\UserLoginService::class\n );\n // ユーザーログアウトサービス\n $this->app->bind(\n \\App\\Services\\Api\\Interfaces\\UserLogoutServiceInterface::class,\n \\App\\Services\\Api\\UserLogoutService::class\n );\n // バインダー一覧情報取得サービス\n $this->app->bind(\n \\App\\Services\\Api\\Interfaces\\BinderListSelectServiceInterface::class,\n \\App\\Services\\Api\\BinderListSelectService::class\n );\n // バインダー検索サービス\n $this->app->bind(\n \\App\\Services\\Api\\Interfaces\\BinderSearchServiceInterface::class,\n \\App\\Services\\Api\\BinderSearchService::class\n );\n // バインダー作成サービス\n $this->app->bind(\n \\App\\Services\\Api\\Interfaces\\BinderSaveServiceInterface::class,\n \\App\\Services\\Api\\BinderSaveService::class\n );\n // バインダー削除サービス\n $this->app->bind(\n \\App\\Services\\Api\\Interfaces\\BinderDeleteServiceInterface::class,\n \\App\\Services\\Api\\BinderDeleteService::class\n );\n // バインダー情報取得サービス\n $this->app->bind(\n \\App\\Services\\Api\\Interfaces\\BinderDetailSelectServiceInterface::class,\n \\App\\Services\\Api\\BinderDetailSelectService::class\n );\n // バインダーお気に入りサービス\n $this->app->bind(\n \\App\\Services\\Api\\Interfaces\\BinderFavoriteServiceInterface::class,\n \\App\\Services\\Api\\BinderFavoriteService::class\n );\n // 画像追加サービス\n $this->app->bind(\n \\App\\Services\\Api\\Interfaces\\ImageAddServiceInterface::class,\n \\App\\Services\\Api\\ImageAddService::class\n );\n // 画像削除サービス\n $this->app->bind(\n \\App\\Services\\Api\\Interfaces\\ImageDeleteServiceInterface::class,\n \\App\\Services\\Api\\ImageDeleteService::class\n );\n // 画像リネームサービス\n $this->app->bind(\n \\App\\Services\\Api\\Interfaces\\ImageRenameServiceInterface::class,\n \\App\\Services\\Api\\ImageRenameService::class\n );\n // 画像並び順更新サービス\n $this->app->bind(\n \\App\\Services\\Api\\Interfaces\\ImageSortServiceInterface::class,\n \\App\\Services\\Api\\ImageSortService::class\n );\n // 画像検索サービス\n $this->app->bind(\n \\App\\Services\\Api\\Interfaces\\ImageSearchServiceInterface::class,\n \\App\\Services\\Api\\ImageSearchService::class\n );\n // 画像ダウンロードサービス\n $this->app->bind(\n \\App\\Services\\Api\\Interfaces\\ImageDownloadServiceInterface::class,\n \\App\\Services\\Api\\ImageDownloadService::class\n );\n // ラベル保存サービス\n $this->app->bind(\n \\App\\Services\\Api\\Interfaces\\LabelSaveServiceInterface::class,\n \\App\\Services\\Api\\LabelSaveService::class\n );\n // ラベル削除サービス\n $this->app->bind(\n \\App\\Services\\Api\\Interfaces\\LabelDeleteServiceInterface::class,\n \\App\\Services\\Api\\LabelDeleteService::class\n );\n // ラベル並び順更新サービス\n $this->app->bind(\n \\App\\Services\\Api\\Interfaces\\LabelSortServiceInterface::class,\n \\App\\Services\\Api\\LabelSortService::class\n );\n // ラベリングサービス\n $this->app->bind(\n \\App\\Services\\Api\\Interfaces\\LabelingServiceInterface::class,\n \\App\\Services\\Api\\LabelingService::class\n );\n // 一括ラベリングサービス\n $this->app->bind(\n \\App\\Services\\Api\\Interfaces\\MultipleLabelingServiceInterface::class,\n \\App\\Services\\Api\\MultipleLabelingService::class\n );\n // パスワードリセットサービス\n $this->app->bind(\n \\App\\Services\\Api\\Interfaces\\PasswordResetServiceInterface::class,\n \\App\\Services\\Api\\PasswordResetService::class\n );\n }", "title": "" }, { "docid": "f7078315af9b48af27dc0081f0bb2d25", "score": "0.7195688", "text": "public function register()\n {\n $this->registerRepository();\n\n $this->registerPasswordService();\n\n $this->registerLoginThrottleService();\n\n $this->registerUserValidator();\n\n $this->registerConfide();\n\n $this->registerCommands();\n }", "title": "" }, { "docid": "7e3cb6415935ad012bc096695895311a", "score": "0.7191818", "text": "public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n\n $this->registerCommands();\n $this->registerMiddleware();\n $this->registerSms();\n $this->registerOss();\n }", "title": "" }, { "docid": "8711c1e1f3b85bbfc5cb6694b3936e8c", "score": "0.71872747", "text": "public function register()\r\n {\r\n $this->app->booting(function()\r\n {\r\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\r\n $loader->alias('EggLog', 'EggDigital\\Service\\Facades\\EggLog');\r\n $loader->alias('PcsClient', 'EggDigital\\Service\\Facades\\PcsClient');\r\n });\r\n\r\n $this->app['service\\egglog'] = $this->app->share(function($app)\r\n {\r\n return new Provider\\EggLogProvider;\r\n });\r\n\r\n $this->app['service\\pcsclient'] = $this->app->share(function($app)\r\n {\r\n return new Provider\\PcsClientProvider;\r\n });\r\n }", "title": "" }, { "docid": "a1acff972959d28d63b989930ef331bc", "score": "0.7183288", "text": "public function register()\n {\n $this->registerCommands();\n $this->registerMiddleware();\n }", "title": "" }, { "docid": "61e65ee702f02ee14fd20b90c63007b9", "score": "0.7173724", "text": "public function register(): void\n {\n $this->app->register(AdmEventServiceProvider::class);\n// $this->app->register(AuthServiceProvider::class);\n }", "title": "" }, { "docid": "ba2c799823b7021e7135323e94af6eb2", "score": "0.716557", "text": "public function register()\n {\n $this->app->register(L5SwaggerServiceProvider::class);\n $this->app->register(ValidatorProvider::class);\n }", "title": "" }, { "docid": "cd21a20fc32e98ad0e6e47d9739c78df", "score": "0.7158182", "text": "public function register()\n {\n $this->mergeConfig();\n $this->registerService();\n }", "title": "" }, { "docid": "e9ad4fee4cd41d753962dcadf9300989", "score": "0.7156002", "text": "public function register()\n {\n // Bind any implementations.\n $this->app->register('Yajra\\Datatables\\DatatablesServiceProvider');\n }", "title": "" }, { "docid": "dbd3a1daf5f3f41e27551967413c7351", "score": "0.71554124", "text": "public function register()\n {\n //Blog\n $this->app->bind(\n 'BlogService', BlogService::class\n );\n\n //Match\n $this->app->bind(\n \\App\\Repositories\\Match\\MatchRepositoryInterface::class,\n \\App\\Repositories\\Match\\MatchRepository::class\n );\n }", "title": "" }, { "docid": "720e69666e277d737e44f1a2387f7361", "score": "0.71511674", "text": "public function register()\n {\n $this->registerVaahIndexer();\n\n $this->app->alias('indexer', \\WebReinvent\\VaahIndexer\\Indexer::class);\n\n $this->mergeConfigFrom(\n __DIR__.'/config/config.php', 'indexer'\n );\n }", "title": "" }, { "docid": "0fdc41058c3a9ff8e3d89d7b1b27c0c9", "score": "0.7149695", "text": "public function register()\r\n {\r\n $this->registerRateLimiting();\r\n\r\n $this->registerHttpValidation();\r\n\r\n $this->registerHttpParsers();\r\n\r\n $this->registerResponseFactory();\r\n\r\n $this->registerMiddleware();\r\n }", "title": "" }, { "docid": "57c3d51e68337e7c5d69e676ec4f0593", "score": "0.7147116", "text": "public function register()\n {\n $this->mergeConfigFrom(__DIR__.'/../config/laravel-vidible.php', 'laravel-vidible');\n\n $this->mergeConfig();\n\n $this->registerRepository();\n\n $this->registerService();\n }", "title": "" }, { "docid": "898c9b38b71877bcd735fb7cf13ef57d", "score": "0.71459216", "text": "public function register()\n {\n $this->app->bind(CoinbaseService::class, function ($app) {\n return new CoinbaseService();\n });\n $this->app->bind(UserPaymentService::class, function ($app) {\n return new UserPaymentService();\n });\n }", "title": "" }, { "docid": "d27f1acbc477e8459b0072c1207d9499", "score": "0.714219", "text": "public function register()\n {\n $this->app->register(CoreServiceProvider::class);\n $this->app->register(FleetOpsServiceProvider::class);\n }", "title": "" }, { "docid": "8eca91e8dab25620f4164dd34b17d380", "score": "0.7138682", "text": "public function register()\n {\n $this->mergeConfigFrom(__DIR__.'/../config/laravel-velo-api.php', 'laravel-velo-api');\n\n $this->app->bind(VeloStations::class);\n\n if (app()->environment('testing')) {\n $this->app->bind('velo-stations', function () {\n return new VeloStations(new VeloClientMock());\n });\n } else {\n $this->app->bind('velo-stations', function () {\n return new VeloStations(new VeloClient());\n });\n }\n }", "title": "" }, { "docid": "5c919a614732afcf707ebae5e2a47393", "score": "0.71363944", "text": "public function register()\n {\n $this->registerConfig();\n $this->registerPreConfiguredApiClients();\n }", "title": "" }, { "docid": "eb2f4a3a7acbeb81156db5c950b1a6bd", "score": "0.71333814", "text": "public function register()\n {\n $this->registerProviders();\n\n $this->registerFacades();\n\n $this->registerRoutes();\n }", "title": "" }, { "docid": "6afc53633335550e9e9b6020b782d721", "score": "0.7133341", "text": "public function register()\n\t{\n $this->registerCommandTranslator();\n $this->registerCommandBus();\n }", "title": "" }, { "docid": "1aabfb48903552bd6b83772b797fa2fd", "score": "0.71279067", "text": "public function register()\n {\n // Khai báo cái repository ở đây\n //$this->app->singleton(ServiceGroupRepositoryInterface::class, ServiceGroupRepository::class);\n }", "title": "" }, { "docid": "24faaaea05c7ee4728ce4afbbd5e6409", "score": "0.7124383", "text": "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__.'/config/services.php', 'services'\n );\n }", "title": "" }, { "docid": "6e011b8ee340f504fa73f8b092762bd5", "score": "0.7122692", "text": "public function register()\n\t{\n\n\t\t$this->registerRoleService();\n\t\t$this->registerResourceActionDataProvider();\n\t\t$this->registerPermService();\n\t\t$this->registerPermitService();\n\t}", "title": "" }, { "docid": "864a9f90fa2a4425128a9b6de2199edb", "score": "0.7122022", "text": "public function register()\n {\n $this->app->bind('App\\Services\\PessoaService', function ($app){\n return new PessoaService();\n });\n }", "title": "" }, { "docid": "7c2d0c8e8752a24a1af90580fc063bfb", "score": "0.7118542", "text": "public function register()\n {\n $this->registerService();\n\n $this->app->bind('Modules\\Search\\SearchServiceInterface', 'Modules\\Search\\SearchService');\n\n $this->registerCommands();\n }", "title": "" }, { "docid": "54c888e03d980f34a1cad6546d509652", "score": "0.71171767", "text": "public function register()\n {\n $this->app->bind('Matthewbdaly\\LaravelCart\\Contracts\\Services\\Cart', 'Matthewbdaly\\LaravelCart\\Services\\Cart');\n $this->app->bind('Matthewbdaly\\LaravelCart\\Contracts\\Services\\UniqueId', 'Matthewbdaly\\LaravelCart\\Services\\UniqueId');\n }", "title": "" }, { "docid": "98fe8affc950dc5b156e569d09e04ee4", "score": "0.7117026", "text": "public function register()\n\t{\n\t\t$this->registerAppBindings();\n\t}", "title": "" }, { "docid": "7350737a0324d9bcc0b8c54e50d9a0c0", "score": "0.7114688", "text": "public function register()\n {\n $this->app->register(BaumServiceProvider::class);\n }", "title": "" }, { "docid": "09d85a9bfadd8ea99fdc1ba74e4601d5", "score": "0.7112727", "text": "public function register()\n {\n $this->registerAppBindings();\n }", "title": "" }, { "docid": "3b2ac8229eff3e59213768b7ccadf9b6", "score": "0.7110834", "text": "public function register()\n {\n $this->app['laravel-dreamfactory'] = $this->app->share(function($app)\n {\n return new LaravelDreamfactory($app['router']);\n });\n\n $this->app['gdce'] = $this->app->share(function($app)\n {\n return new GDCE();\n });\n }", "title": "" }, { "docid": "dcfc45a0a5f45a230baa8492d6e15d8e", "score": "0.7109655", "text": "public function register()\n {\n //\n\n $this->app->bind(IUserService::class, UserService::class);\n $this->app->bind(IUserRepository::class, UserRepository::class);\n $this->app->bind(IPizzaService::class, PizzaService::class);\n $this->app->bind(IPizzaRepository::class, PizzaRepository::class);\n $this->app->bind(IOrderService::class, OrderService::class);\n $this->app->bind(IOrderRepository::class, OrderRepository::class);\n }", "title": "" }, { "docid": "87645e0fa0a7dccf36744ff035691afe", "score": "0.71094", "text": "public function register()\n {\n // Automatically apply the package configuration\n $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'laravel-notion-api');\n\n $this->app->singleton(Notion::class, function () {\n return new Notion(config('laravel-notion-api.notion-api-token'), config('laravel-notion-api.version'));\n });\n\n if ($this->app->runningInConsole()) {\n PestHttpRecorder::register();\n }\n }", "title": "" }, { "docid": "a2938fa22f84e99e0a456a083e6a32b2", "score": "0.71043277", "text": "public function register()\n {\n // $this->register(BaseAuthServiceProvider::class);\n }", "title": "" }, { "docid": "e97451de10235d467ba77c4a27cf6f32", "score": "0.70957905", "text": "public function register()\n {\n $this->registerProductRepository($this->app);\n $this->registerCategoryRepository($this->app);\n }", "title": "" }, { "docid": "79490f1d0dadc7c1a053fa47b0bc4cc7", "score": "0.70946366", "text": "public function register()\n {\n $this->app->register('ProAI\\Datamapper\\Providers\\MetadataServiceProvider');\n\n $this->registerEntityScanner();\n\n $this->registerSchemaBuilder();\n\n $this->registerModelGenerator();\n\n $this->registerCommands();\n }", "title": "" }, { "docid": "6c4803387dfe758755a4896ad1079f7a", "score": "0.7094242", "text": "public function register()\n {\n /*REGISTER SWAGGER INTEGRATION*/\n $this->app->register(\\L5Swagger\\L5SwaggerServiceProvider::class);\n }", "title": "" }, { "docid": "a847a96b05a26b9e302c2a2e9d5dc89c", "score": "0.7092194", "text": "public function register()\n {\n $this->registerPublishables();\n $this->registerCommands();\n }", "title": "" }, { "docid": "da1bc636f5076a61e905c37509fbd72f", "score": "0.70815176", "text": "public function register()\n {\n $this->app->register(RepositoryServiceProvider::class);\n }", "title": "" }, { "docid": "da1bc636f5076a61e905c37509fbd72f", "score": "0.70815176", "text": "public function register()\n {\n $this->app->register(RepositoryServiceProvider::class);\n }", "title": "" }, { "docid": "da1bc636f5076a61e905c37509fbd72f", "score": "0.70815176", "text": "public function register()\n {\n $this->app->register(RepositoryServiceProvider::class);\n }", "title": "" }, { "docid": "7f8694f681d935116737924b47467e75", "score": "0.70803225", "text": "public function register()\n {\n //$this->app->make('tchoblond59\\ssrollershutter');\n }", "title": "" }, { "docid": "08553f585017a086b923667963887805", "score": "0.70789444", "text": "public function register()\n {\n $this->registerCommands();\n $this->registerAlias();\n $this->registerMiddleware();\n }", "title": "" }, { "docid": "8c59617e567cf26d8701d09d0014e2ea", "score": "0.70764685", "text": "public function register()\n {\n $guzzleClient = new Client(['timeout' => 1200, 'read_timeout' => 1200]);\n\n $this->app->bind(ConsultaEmpresaService::class, function ($app) use ($guzzleClient) {\n return new ConsultaEmpresaService($guzzleClient);\n });\n\n $this->app->bind(ConsultaSociosService::class, function ($app) use ($guzzleClient) {\n return new ConsultaSociosService($guzzleClient);\n });\n\n\n }", "title": "" }, { "docid": "f1daec42e01ba370c87c45d8575346fd", "score": "0.7074053", "text": "public function register()\n {\n // REPOSITORIES\n $this->app->bind(\"App\\Http\\Repositories\\Interfaces\\UserRepositoryInterface\", \"App\\Http\\Repositories\\UserRepository\");\n $this->app->bind(\"App\\Http\\Repositories\\Interfaces\\RoleRepositoryInterface\", \"App\\Http\\Repositories\\RoleRepository\");\n $this->app->bind(\"App\\Http\\Repositories\\Interfaces\\ExpenseRepositoryInterface\", \"App\\Http\\Repositories\\ExpenseRepository\"); \n $this->app->bind(\"App\\Http\\Repositories\\Interfaces\\ExpenseCategoryRepositoryInterface\", \"App\\Http\\Repositories\\ExpenseCategoryRepository\"); \n \n }", "title": "" }, { "docid": "e858d7be63a3ba1b754acdd9771da5f6", "score": "0.7073267", "text": "public function register()\n {\n\t if ($this->app->environment() !== 'production') {\n\t\t $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n\t }\n\t\t$this->app->register('Collective\\Html\\HtmlServiceProvider');\n\t\t$this->app->register('Joselfonseca\\ImageManager\\ImageManagerServiceProvider');\n }", "title": "" }, { "docid": "17060aab9a1367de6767bfa7f37e3941", "score": "0.7071299", "text": "public function register()\n {\n $this->registerRepositoryInterface();\n $this->registerServiceInterface();\n //\n }", "title": "" }, { "docid": "806f458840a1879493d8d3ef24f42bd6", "score": "0.70694697", "text": "public function register()\n {\n $this->app->bind(\n 'DOLucasDelivery\\Repositories\\CategoryRepository',\n 'DOLucasDelivery\\Repositories\\CategoryRepositoryEloquent'\n );\n $this->app->bind(\n 'DOLucasDelivery\\Repositories\\ClientRepository',\n 'DOLucasDelivery\\Repositories\\ClientRepositoryEloquent'\n );\n $this->app->bind(\n 'DOLucasDelivery\\Repositories\\OrderItemRepository',\n 'DOLucasDelivery\\Repositories\\OrderItemRepositoryEloquent'\n );\n $this->app->bind(\n 'DOLucasDelivery\\Repositories\\OrderRepository',\n 'DOLucasDelivery\\Repositories\\OrderRepositoryEloquent'\n );\n $this->app->bind(\n 'DOLucasDelivery\\Repositories\\ProductRepository',\n 'DOLucasDelivery\\Repositories\\ProductRepositoryEloquent'\n );\n $this->app->bind(\n 'DOLucasDelivery\\Repositories\\UserRepository',\n 'DOLucasDelivery\\Repositories\\UserRepositoryEloquent'\n );\n $this->app->bind(\n 'DOLucasDelivery\\Repositories\\CouponRepository',\n 'DOLucasDelivery\\Repositories\\CouponRepositoryEloquent'\n );\n }", "title": "" }, { "docid": "b4586e87990525c38da1f23e5ac1d94a", "score": "0.7065518", "text": "public function register()\n {\n $this->registerUploadService();\n }", "title": "" }, { "docid": "c377bf3dad455df93faf8d9e6e872efc", "score": "0.70642203", "text": "public function register()\n {\n\n $this->app->singleton(ExceptionHandler::class, Handler::class);\n $this->app->singleton(KernelContract::class, Kernel::class);\n\n $this->app->middleware([HandleCors::class]);\n\n // Mathrix Lumen Zero Providers\n $this->app->register(ObserverServiceProvider::class);\n $this->app->register(PolicyServiceProvider::class);\n $this->app->register(RegistrarServiceProvider::class);\n\n $this->app->register(CorsServiceProvider::class);\n }", "title": "" }, { "docid": "f59c0e77a226acc33c5285d84a049f48", "score": "0.706125", "text": "public function register()\n {\n $this->app->bind(LeagueService::class, function () {\n return new LeagueService(\n new LeagueRepository(new League()),\n new LeaguePlayerRepository(new LeaguePlayer())\n );\n });\n }", "title": "" }, { "docid": "149a1f09d9db3d673d7f9e37da83a09f", "score": "0.7059463", "text": "public function register()\n {\n $this->registerAliases();\n\n $this->registerGuzzle();\n\n $this->registerApi();\n\n $this->registerAuth();\n\n $this->registerUserProvider();\n\n $this->registerGuard();\n\n $this->registerEncrypter();\n\n $this->registerCaptcha();\n\n $this->aliasMiddleware('scope', \\App\\Support\\Middleware\\Scope::class);\n $this->aliasMiddleware('group', \\App\\Support\\Middleware\\Group::class);\n $this->aliasMiddleware('api.debugbar', \\App\\Support\\Middleware\\ApiDebugbar::class);\n }", "title": "" }, { "docid": "ea35651997bcc337bc7c577f67c913cd", "score": "0.7057708", "text": "public function register()\n {\n\n /** Register Services */\n collect($this->getServices())->each(function($service){\n $this->app->singleton(class_basename($service), function($app) use ($service){\n return new $service();\n });\n });\n }", "title": "" }, { "docid": "655015c995aaeb1e2b4e8606872e2482", "score": "0.70575196", "text": "public function register()\n {\n $this->app->bind(VisitorServiceContract::class, VisitorService::class);\n $this->app->bind(SiteLinkServiceContract::class, SiteLinkService::class);\n $this->app->bind(SiteServiceContract::class, SiteService::class);\n\n }", "title": "" }, { "docid": "52b751787621d7cff3213984084eb435", "score": "0.70562744", "text": "public function register()\n {\n $this->registerEvents();\n $this->registerAuthMiddleware();\n }", "title": "" }, { "docid": "aaad779ab117f4ceb6bce4391d5bf03b", "score": "0.70553434", "text": "public function register()\r\n\t{\r\n\t\t$this->app->register(OdemeSistemiEventServiceProvider::class);\r\n\t}", "title": "" }, { "docid": "5f4e6333fab0d02385b022aa04d4d66a", "score": "0.70547795", "text": "public function register()\n {\n $this->registerMiddlewares();\n\n //\n }", "title": "" }, { "docid": "59b834fd2a18cfa624585553a983c343", "score": "0.7051233", "text": "public function register()\n {\n // Register the app\n $this->registerLarablog();\n\n // Register Commands\n $this->registerCommands();\n }", "title": "" }, { "docid": "8d67e2dfac65e450c1e707031a081914", "score": "0.7045259", "text": "public function register()\n {\n $this->registerConfigurationFiles();\n\n $this->registerMediaboxSingleton();\n\n $this->registerRoutes();\n }", "title": "" }, { "docid": "514ce1a5f5103bddaa5eae945984092c", "score": "0.70448357", "text": "public function register()\n {\n App::singleton('models\\\\oauth2\\\\IResourceServerContext', 'models\\\\oauth2\\\\ResourceServerContext');\n App::singleton('App\\Models\\ResourceServer\\IAccessTokenService', 'App\\Models\\ResourceServer\\AccessTokenService');\n App::singleton('App\\Models\\ResourceServer\\IApi', 'models\\\\resource_server\\\\Api');\n App::singleton('App\\Models\\ResourceServer\\IApiEndpoint', 'models\\\\resource_server\\\\ApiEndpoint');\n App::singleton('App\\Models\\ResourceServer\\IApiScope', 'models\\\\resource_server\\\\ApiScope');\n }", "title": "" }, { "docid": "565959d5b1ff161cf2a2c5c888740e21", "score": "0.70444924", "text": "public function register()\n {\n // Register main classes\n $this->app->make('CoreSolutions\\CoreAdmin\\Controllers\\CoreAdminController');\n $this->app->make('CoreSolutions\\CoreAdmin\\Controllers\\UserActionsController');\n $this->app->make('CoreSolutions\\CoreAdmin\\Controllers\\CoreAdminMenuController');\n $this->app->make('CoreSolutions\\CoreAdmin\\Cache\\QuickCache');\n $this->app->make('CoreSolutions\\CoreAdmin\\Builders\\MigrationBuilder');\n $this->app->make('CoreSolutions\\CoreAdmin\\Builders\\ModelBuilder');\n $this->app->make('CoreSolutions\\CoreAdmin\\Builders\\RequestBuilder');\n $this->app->make('CoreSolutions\\CoreAdmin\\Builders\\ControllerBuilder');\n $this->app->make('CoreSolutions\\CoreAdmin\\Builders\\ViewsBuilder');\n $this->app->make('CoreSolutions\\CoreAdmin\\Events\\UserLoginEvents');\n // Register dependency packages\n $this->app->register('Collective\\Html\\HtmlServiceProvider');\n $this->app->register('Intervention\\Image\\ImageServiceProvider');\n $this->app->register('Yajra\\Datatables\\DatatablesServiceProvider');\n // Register dependancy aliases\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n $loader->alias('HTML', 'Collective\\Html\\HtmlFacade');\n $loader->alias('Form', 'Collective\\Html\\FormFacade');\n $loader->alias('Image', 'Intervention\\Image\\Facades\\Image');\n $loader->alias('Datatables', 'Yajra\\Datatables\\Datatables');\n }", "title": "" }, { "docid": "0400d0b841121aeb0463542307b86b6e", "score": "0.70440096", "text": "public function register()\n {\n $this->app->bind(RandomGenerator::class, RandomGeneratorService::class);\n $this->app->bind(CarSharing::class, CarSharingService::class);\n $this->app->bind(Repository::class, CarRepository::class);\n }", "title": "" }, { "docid": "b310e936a32a1a8aab0472d76357cfdd", "score": "0.70401716", "text": "public function register()\n {\n $this->app->bind(IProjectService::class, ProjectService::class);\n $this->app->bind(ITodoService::class, TodoService::class);\n }", "title": "" }, { "docid": "16deb41babe80835a0b94e6dc5da3573", "score": "0.7039949", "text": "public function register()\n {\n\n $this->app->bind(\n ILogger::class,\n Logger::class\n );\n\n $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'uniexlogger');\n\n }", "title": "" }, { "docid": "81674a6a1bb9eb9a1acc14023042517b", "score": "0.7038738", "text": "public function register()\n {\n $this->app->bind(\\App\\Services\\EventReport\\IEventReportService::class, \\App\\Services\\EventReport\\EventReportService::class);\n }", "title": "" }, { "docid": "3b1f3492480c36b8e987334dc72d9c6e", "score": "0.7036467", "text": "public function register()\n {\n //check that app is local\n if ($this->app->isLocal()) {\n //if local register your services you require for development\n $this->app->register('Barryvdh\\Debugbar\\ServiceProvider');\n } else {\n //else register your services you require for production\n $this->app['request']->server->set('HTTPS', true);\n }\n }", "title": "" }, { "docid": "ff0d5543fe533fb95142672e97ebe7d2", "score": "0.7034839", "text": "public function register(): void\n {\n $this->mergeConfigFrom(__DIR__ . '/../config/larapress.php', 'larapress');\n $this->mergeConfigFrom(__DIR__ . '/../config/model-status.php', 'model-status');\n $this->mergeConfigFrom(__DIR__ . '/../config/medialibrary.php', 'medialibrary');\n\n $this->app->register(ModelStatusServiceProvider::class);\n $this->app->register(MediaLibraryServiceProvider::class);\n $this->app->register(QueryBuilderServiceProvider::class);\n }", "title": "" }, { "docid": "dfd54e63f903ce7617b114a3ac08f690", "score": "0.7033221", "text": "public function register()\n {\n //\n $this->app->bind(\n MoneyInterface::class,\n MoneyService::class\n );\n $this->app->bind(\n SnackInterface::class,\n SnackService::class\n );\n $this->app->bind(\n VendingMachineInterface::class,\n VendingMachineService::class\n );\n $this->app->bind(\n CurrencyInterface::class,\n CurrencyService::class\n );\n }", "title": "" }, { "docid": "9f19a061c256794c8ce45fded4532661", "score": "0.7029003", "text": "public function register()\n {\n $this->app->singleton(\\Laragrad\\Largent\\Services\\OperationService::class, function ($app) {\n return new \\Laragrad\\Largent\\Services\\OperationService();\n });\n\n $this->app->singleton(\\Laragrad\\Largent\\Services\\EntryService::class, function ($app) {\n return new \\Laragrad\\Largent\\Services\\EntryService();\n });\n }", "title": "" }, { "docid": "c404b06688de10839da765628fc19e7b", "score": "0.70282733", "text": "public function register()\n {\n // Register the app\n $this->registerApp();\n\n // Register Commands\n $this->registerCommands();\n }", "title": "" }, { "docid": "131cc17d3d1eb96b8fe13880be03bd79", "score": "0.7028227", "text": "public function register()\n {\n $this->mergeConfigFrom(__DIR__ . '/config/http_logger.php', 'http_logger');\n\n if (config('http_logger.is_enabled')) {\n $this->app['router']->pushMiddlewareToGroup('web', HttpLogger::class);\n $this->app['router']->pushMiddlewareToGroup('api', HttpLogger::class);\n }\n\n $this->app->register(HttpLoggerRouteServiceProvider::class);\n\n $this->app->register(HttpLoggerAuthServiceProvider::class);\n }", "title": "" }, { "docid": "80823d6ca7c9581e725444f7ed45076d", "score": "0.70265925", "text": "public function register()\n {\n\n if (config('app.env')=='local' && class_exists(\\Barryvdh\\Debugbar\\ServiceProvider::class))\n $this->app->register(\\Barryvdh\\Debugbar\\ServiceProvider::class);\n\n if (class_exists(\\Laravel\\Cashier\\CashierServiceProvider::class))\n $this->app->register(\\Laravel\\Cashier\\CashierServiceProvider::class);\n\n if (class_exists(\\ErpNET\\Bot\\Providers\\ErpnetBotServiceProvider::class))\n $this->app->register(\\ErpNET\\Bot\\Providers\\ErpnetBotServiceProvider::class);\n\n if (class_exists(\\ErpNET\\Migrates\\Providers\\ErpnetMigratesServiceProvider::class))\n $this->app->register(\\ErpNET\\Migrates\\Providers\\ErpnetMigratesServiceProvider::class);\n\n if (class_exists(\\ErpNET\\Models\\Providers\\ErpnetModelsServiceProvider::class))\n $this->app->register(\\ErpNET\\Models\\Providers\\ErpnetModelsServiceProvider::class);\n\n if (class_exists(\\ErpNET\\Delivery\\Providers\\ErpnetDeliveryServiceProvider::class))\n $this->app->register(\\ErpNET\\Delivery\\Providers\\ErpnetDeliveryServiceProvider::class);\n\n if (class_exists(\\ErpNET\\Auth\\Providers\\ErpnetAuthServiceProvider::class))\n $this->app->register(\\ErpNET\\Auth\\Providers\\ErpnetAuthServiceProvider::class);\n\n if (class_exists(\\ErpNET\\WidgetResource\\Providers\\ErpnetWidgetResourceServiceProvider::class))\n $this->app->register(\\ErpNET\\WidgetResource\\Providers\\ErpnetWidgetResourceServiceProvider::class);\n\n if (class_exists(\\ErpNET\\SocialAuth\\Providers\\ErpnetSocialAuthServiceProvider::class))\n $this->app->register(\\ErpNET\\SocialAuth\\Providers\\ErpnetSocialAuthServiceProvider::class);\n\n }", "title": "" }, { "docid": "299189b147d839d078bbddc5cd813f8a", "score": "0.7021252", "text": "public function register()\n {\n $this->app->bind(\n IProduto::class,\n ProdutoRepository::class\n );\n\n $this->app->bind(\n IEstoque::class,\n EstoqueRepository::class\n );\n\n $this->app->bind(\n IEstoqueServices::class,\n EstoqueServices::class\n );\n\n }", "title": "" }, { "docid": "4144c3d789410d254c2b4bbe78dd14f0", "score": "0.70184", "text": "public function register()\n {\n\n $this->setupOauthRedirects();\n\n }", "title": "" }, { "docid": "e8551da6c48babca3c4dc5328885e5a0", "score": "0.70151865", "text": "public function register()\n {\n //\n $this->app->singleton(ArticlesRepository::class, function($app) {\n // ...\n });\n\n $this->bindSearchClient();\n }", "title": "" }, { "docid": "398484ed8053020aad5abe39ca4b882b", "score": "0.7015066", "text": "public function register()\n {\n include __DIR__.'/../routes/api.php';\n include __DIR__.'/../routes/web.php';\n\n $this->app->register(EventServiceProvider::class);\n\n }", "title": "" }, { "docid": "c9f1682d37edb234face96c8cf37a7b0", "score": "0.70137614", "text": "public function register()\n {\n $this->app->bind(App\\Services\\ConvertService::class, function ($app) {\n return new ConvertService();\n });\n }", "title": "" }, { "docid": "91e276d4d27717b0e0a40e1ad82a7f8b", "score": "0.7013136", "text": "public function register()\n {\n $this->app->singleton(CodifierService::class, function () {\n return new CodifierService();\n });\n }", "title": "" }, { "docid": "b4e1d9a1b47a254f633028263c047bca", "score": "0.70125127", "text": "public function register()\n {\n $this->app->bind(FriendshipInterface::class, FriendshipService::class);\n $this->app->bind(PostRepositoryInterface::class, PostRepository::class);\n }", "title": "" }, { "docid": "1783b12bc9f137bd88dac3acea04a4e4", "score": "0.70123285", "text": "public function register()\n {\n $this->registerConfig();\n $this->registerBeamFacade();\n $this->registerActivationTokenRepository();\n }", "title": "" }, { "docid": "6d7abe34cba1e62811b72a8de0bb2983", "score": "0.70104986", "text": "public function register()\n {\n $this->app->bind(\n 'App\\Services\\IUserService',\n 'App\\Services\\Implementation\\UserService'\n );\n $this->app->bind(\n 'App\\Services\\IArticleService',\n 'App\\Services\\Implementation\\ArticleService'\n );\n }", "title": "" }, { "docid": "c702ae56a6d615c2a838f8ca156a46e8", "score": "0.7010262", "text": "public function register()\r\n {\r\n //rutas\r\n $this->registerRoutes();\r\n //controlador\r\n $this->app->make('Reddatasrd\\Conver\\Controllers\\MainController');\r\n\r\n //Resources \r\n $this->registerResources();\r\n //Migrations \r\n $this->registerMigrations();\r\n //clase broma\r\n $this->app->bind('Conver', function($app){\r\n return new Conver();\r\n });\r\n }", "title": "" } ]
387688a4d43ccfa5f7ad0b28558f6d5f
Ajouter un message flash
[ { "docid": "2177d69a8d87fb576e6afdb6c5317394", "score": "0.62700915", "text": "public function setFlash($_type, $_message) {\n return $this->_container->get('session')->getFlashBag()->add($_type, $_message);\n }", "title": "" } ]
[ { "docid": "1a46ad815c10756431d00c50f8fa1718", "score": "0.68009806", "text": "private function flashMessage($type, $message)\n\t{\n\t\t$this->getSession()->getFlashBag()->add($type, $message);\n\t}", "title": "" }, { "docid": "42bae66b5ff32e0a9b840e67fe94a121", "score": "0.67354643", "text": "abstract protected function addFlash(string $type, $message);", "title": "" }, { "docid": "349b00093cf1541cf76395b73b7c0349", "score": "0.6708117", "text": "public function flashMessage($type, $message)\n {\n $this->session->getFlashBag()->add($type, $message);\n }", "title": "" }, { "docid": "0898c516021d6540f8b720eb4296c29e", "score": "0.66999376", "text": "public static function addMessage($message, $type = self::SUCCESS){\n /* if there is no flash message key */\n if(!isset($_SESSION['flashMessage'])){\n $_SESSION['flashMessage'] = [];\n }\n $_SESSION['flashMessage'][] = [\n 'body' => $message,\n 'type' => $type\n ];\n }", "title": "" }, { "docid": "85d2f5e3e0f0cd006f3f84efe6430d8e", "score": "0.66898406", "text": "public function flash_error() {\n $this->add_class('notice-error');\n $this->flash();\n }", "title": "" }, { "docid": "ef5a5adcedd4607473e5cb5c0afae936", "score": "0.6683258", "text": "function flash($index, $message) {\n\tFlash::add($index, $message);\n}", "title": "" }, { "docid": "d414a8090f9d90f6162152f17c588403", "score": "0.66611415", "text": "private function addFlashMessage($type, $message)\n {\n $this->get('session')->getFlashBag()->add(\n $type,\n $this->get('translator')->trans($message)\n );\n }", "title": "" }, { "docid": "72981db2d1eb417682c7bb4cef44f606", "score": "0.6626042", "text": "function setFlashMessage($msg, $type)\n{\n //message pesan nya\n $ci = get_instance();\n $ci->session->set_flashdata('message', '<div class=\"alert alert-' . $type . ' alert-dismissible fade show\" role=\"alert\">' . $msg . ' \n <button type=\"button\" class=\"close mb-3\" data-dismiss=\"alert\" aria-label=\"Close\">\n <span aria-hidden=\"true\" >&times;</span>\n </button></div>');\n}", "title": "" }, { "docid": "32e12e45aa216ba383f2ddaa3896bd26", "score": "0.65872043", "text": "public function addFlash($type, $message)\n {\n $this->container->get('session')->getFlashBag()->add($type, $message);\n }", "title": "" }, { "docid": "4839ba72da0644c7005bb8abf70b011f", "score": "0.6568695", "text": "protected function setFlash($message, $type = \"permission\")\n {\n $this->getFlashBag()->add($type, $message);\n }", "title": "" }, { "docid": "1bc783e25423c4154861bc53177353e4", "score": "0.6532406", "text": "function flash($name = '', $message = '', $class = 'alert alert-success'){\n if(!empty($name)){\n if(!empty($message) && empty($_SESSION[$name])){\n if(!empty($_SESSION[$name])){\n unset($_SESSION[$name]);\n }\n \n if(!empty($_SESSION[$name. '_class'])){\n unset($_SESSION[$name. '_class']);\n }\n \n $_SESSION[$name] = $message;\n $_SESSION[$name. '_class'] = $class;\n } elseif(empty($message) && !empty($_SESSION[$name])){\n $class = !empty($_SESSION[$name. '_class']) ? $_SESSION[$name. '_class'] : '';\n echo '<div class=\"'.$class.'\" id=\"msg-flash\">'.$_SESSION[$name].'</div>';\n unset($_SESSION[$name]);\n unset($_SESSION[$name. '_class']);\n }\n }\n }", "title": "" }, { "docid": "b1f581f5dcb4995167cad9d21bc4f425", "score": "0.65075105", "text": "public function flash() {\n if (isset($_SESSION[\"flash\"])) {\n foreach ($_SESSION[\"flash\"] as $flash) {\n ?>\n <div id=\"msg-profil\" class=\"alert alert-<?=$flash[\"typeAlert\"] ?> alert-dismissible mb-3 fade show\" role=\"alert\"> \n <?= $flash[\"message\"] ?>\n <button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\">\n <span aria-hidden=\"true\">&times;</span>\n </button> \n </div>\n <?php\n }\n unset($_SESSION[\"flash\"]);\n }\n }", "title": "" }, { "docid": "772a207f2c11baf51b83fc19b96a7c24", "score": "0.64934057", "text": "public function insertNewMessage () {\n\t\t$this->autoRender = false;\n\n\t\tif ($this->Message->save($this->request->data))\n\t\t\techo 'save';\n\t}", "title": "" }, { "docid": "1f85c840572eb51815588b586e589f69", "score": "0.6481035", "text": "function _show_message($message) {\n\t\t$this -> session -> set_flashdata('message', $message);\n\t\tredirect('adm/ew');\n\t}", "title": "" }, { "docid": "06d1fb978a746caa2b2a22dbc7164238", "score": "0.64788187", "text": "public function flashMessage($message, $type = 'info') {\r\n\t\t$this->invalidateControl(\"flashes\");\r\n\t\tparent::flashMessage($message, $type);\r\n\t}", "title": "" }, { "docid": "f77e3d8f813d53fde31a1250721950a0", "score": "0.6464073", "text": "public function flash( $message )\n\t\t{\n\t\t\t$this->data[ 'highlight' ] = trans('alert.basic.highlight');\n\t\t\t$this->data[ 'message' ] = $message;\n\t\t\t$this->data[ 'type' ] = 'primary';\n\t\t\t$this->data[ 'icon' ] = 'bell';\n\n\t\t\t$this->fire();\n\t\t}", "title": "" }, { "docid": "43f8b91ce834d68d3233f6747fbbfa58", "score": "0.6456836", "text": "protected function pushFlashMessage($status, $message)\n {\n $this->getRequest()->getSession()->getFlashBag()->add($status, $message);\n }", "title": "" }, { "docid": "2e4394b3889898699da74064c890ba51", "score": "0.64566356", "text": "public static function add($type,$title, $message)\n {\n $_SESSION['flash_message'] = array(\n 'type' => $type,\n 'title' => $title,\n 'message' => $message\n );\n }", "title": "" }, { "docid": "44fe8eb7b0959d114c6fcd8b8c425898", "score": "0.64356035", "text": "function flash($name = '', $message = '', $class = 'alert alert-success alert-dismissible fade show') {\n if (!empty($name)) {\n //No message, create it\n if (!empty($message) and empty($_SESSION[$name])) {\n if (!empty($_SESSION[$name])) {\n unset($_SESSION[$name]);\n }\n if (!empty($_SESSION[$name . '_class'])) {\n unset($_SESSION[$name . '_class']);\n }\n\n $_SESSION[$name] = $message;\n $_SESSION[$name . '_class'] = $class;\n }\n //Message exists, display it\n elseif (!empty($_SESSION[$name]) && empty($message)) {\n $class = !empty($_SESSION[$name . '_class']) ? $_SESSION[$name . '_class'] : 'success';\n echo '\n <div class=\"' . $class . '\">\n <button type=\"button\" aria-hidden=\"true\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\">\n <i class=\"nc-icon nc-simple-remove\"></i>\n </button>\n <span>\n ' . $_SESSION[$name] . '</span>\n </div>\n ';\n unset($_SESSION[$name]);\n unset($_SESSION[$name . '_class']);\n }\n }\n}", "title": "" }, { "docid": "de3d6744619d75de4d7a15aa5d57969a", "score": "0.6430126", "text": "function flash($message, $type = 'alert-success'){\n\tsession()->flash('flash_message', $message);\n\tsession()->flash('flash_message_type', $type);\n}", "title": "" }, { "docid": "8f203bdb10c377101d1be29e01e47562", "score": "0.6414472", "text": "public function flash_success() {\n $this->add_class('notice-success');\n $this->flash();\n }", "title": "" }, { "docid": "7111a96e2019d598e90389750435cbb5", "score": "0.6410447", "text": "function success_flash($name, $msg) {\n if(empty($name) && !empty($msg)) return ;\n set_flash('success', $name, $msg);\n}", "title": "" }, { "docid": "0d88c219242802dcc8845ef3245211a6", "score": "0.64060247", "text": "public function flash()\n {\n Session::flash(\"system-notification.{$this->config['to']}.{$this->id}\", $this->config);\n }", "title": "" }, { "docid": "70fb557e6280c89c22ee867f906b4511", "score": "0.6398694", "text": "public function addFlashMessage($type, $message, $field = \"no error\")\n {\n $this->session->getFlashBag()->add\n (\n $type,\n [\n \"field\" => $field,\n \"message\" => $message\n ]\n );\n }", "title": "" }, { "docid": "0920829196b83d167e461efad89de933", "score": "0.638376", "text": "public function flash($message)\n {\n if ($message === false) {\n return;\n }\n\n $this->Flash->set($message, $this->_config['flash']);\n }", "title": "" }, { "docid": "dc9baf0b6cdd0df7320839eb6fa149ad", "score": "0.6382088", "text": "public function messageAction(Request $request){\n\t\t\n\t\t$session = $request -> getSession();\n\t\t\n\t\t$session -> getFlashBag() -> add('success', 'Félicitations vous êtes inscrit');\n\t\t$session -> getFlashBag() -> add('success', 'Bonjour');\n\t\t\n\t\t$session -> getFlashBag() -> add('error', 'Votre adresse email n\\'est pas validée');\n\t\t\n\t\treturn $this -> redirectToRoute('accueil');\t\t\n\t}", "title": "" }, { "docid": "522ffebd66b30053dc7e8e1da307fe76", "score": "0.63733137", "text": "public function flashMessage($message, $type = 'info') {\n\t\tparent::flashMessage($message, $type);\n\t\t$this['flashMessage']->redrawControl();\n\t}", "title": "" }, { "docid": "7e7c55dd47486ad2d92add6ba5addc15", "score": "0.6366663", "text": "function flash($type, $message) {\n\tSession::flash('flash_message', $message);\n Session::flash('flash_status', $type);\n}", "title": "" }, { "docid": "6b778ee9cb85671071296fda33a8272a", "score": "0.6354959", "text": "static function message($message, $type = 1)\n {\n session()->flash($type == 1 ? 'success' : 'error', $message);\n\n }", "title": "" }, { "docid": "1be8b5e4250a17c1d530482a062c71ff", "score": "0.6352405", "text": "public function setMessage($message = \"Opération bien effectuée\", $criticality = \"success\"){\n $this->get('session')->getFlashBag()->add(\n $criticality,\n $message\n );\n\n }", "title": "" }, { "docid": "cd550bc194b2d1be599310eb0139295f", "score": "0.6347574", "text": "function FlashMessage($message, $type, $url = '')\n\t{\n\t\tif(!isset($_SESSION['FLASH_MESSAGES'])) {\n\t\t\t$_SESSION['FLASH_MESSAGES'] = array();\n\t\t}\n\n\t\t$_SESSION['FLASH_MESSAGES'][] = array(\n\t\t\t\"message\" => $message,\n\t\t\t\"type\" => $type\n\t\t);\n\n\t\tif (!empty($url)) {\n\t\t\theader('Location: '.$url);\n\t\t\texit;\n\t\t}\n\t}", "title": "" }, { "docid": "a9bcf923e9a44f88166ea2bf96fdf8c1", "score": "0.634093", "text": "protected function addSuccessFLashMessage($message)\n {\n $this->addFlashMessage('success', $message);\n }", "title": "" }, { "docid": "5513348e00d0970b3aedcab413452649", "score": "0.6334819", "text": "public function flash(): void\n {\n Request()->session()->flash('flash', $this);\n }", "title": "" }, { "docid": "c21ed608de34205a77b56834eb9c3d1e", "score": "0.63327134", "text": "function flash( $name = '', $message = '', $class = '' )\n{\n //We can only do something if the name isn't empty\n if( !empty( $name ) )\n { \n //No message, create it\n if( !empty( $message ) && empty( $_SESSION[$name] ) )\n {\n if( !empty( $_SESSION[$name] ) )\n {\n unset( $_SESSION[$name] );\n }\n if( !empty( $_SESSION[$name.'_class'] ) )\n {\n unset( $_SESSION[$name.'_class'] );\n }\n\n $_SESSION[$name] = $message;\n $_SESSION[$name.'_class'] = $name;\n }\n //Message exists, display it\n elseif( !empty( $_SESSION[$name] ) && empty( $message ) )\n {\n // $class = !empty( $_SESSION[$name.'_class'] ) ? 'danger' : 'success';\n $class = ( $_SESSION[$name.'_class']=='gagal' ) ? 'danger' : 'success';\n echo '<div class=\"alert alert-'.$class.' alert-dismissable\" id=\"msg-flash\">';\n echo '<button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">×</button>';\n echo $_SESSION[$name].'</div>'; \n unset($_SESSION[$name]);\n unset($_SESSION[$name.'_class']);\n }\n }\n}", "title": "" }, { "docid": "23a1f054e6f1da4b93249aab281e68a0", "score": "0.63285017", "text": "public function addFlash($msg, $class = 'info')\n {\n $key = $this->getNextMultiFlashKey();\n if ($key === false)\n Yii::trace('Stack overflow in addFlash', 'account.components.AccountWebUserFlashBehavior.addFlash()');\n else\n $this->owner->setFlash($key, array($msg, $class));\n }", "title": "" }, { "docid": "42a69cf8ced6a0ba3004a1726f351d7a", "score": "0.63198483", "text": "public function flash() {\n // set up a handler for the admin_notices action, to ensure that any\n // flash notices are added AFTER displaying notices for this request\n add_action('admin_notices', function() {\n $_SESSION[static::FLASH_SESSION_KEY]\n = $_SESSION[static::FLASH_SESSION_KEY] ?? [];\n\n $_SESSION[static::FLASH_SESSION_KEY][] = [\n 'class' => $this->get_class(),\n 'message' => $this->message,\n ];\n });\n }", "title": "" }, { "docid": "d99876a757186616a11935327f152643", "score": "0.6297651", "text": "function flash ($message, $url, $time=1)\n\t{\n\t\t$this->autoRender = false;\n\t\t$this->autoLayout = false;\n\n\t\t$this->set('url', $this->base.$url);\n\t\t$this->set('message', $message);\n\t\t$this->set('time', $time);\n\n\t\t$this->render(null,false,VIEWS.'layouts'.DS.'flash.thtml');\n\t}", "title": "" }, { "docid": "b68a158c139272428686a30a33c5e76b", "score": "0.6291455", "text": "function flash($message, $url, $time=1)\n\t{\n\t\t$this->autoRender = false;\n\t\t$this->autoLayout = false;\n\n\t\t$this->set('url', $this->base.$url);\n\t\t$this->set('message', $message);\n\t\t$this->set('time', $time);\n\n\t\t$this->render(null,false,VIEWS.'layouts'.DS.'flash.thtml');\n\t}", "title": "" }, { "docid": "84839a545b0c9c0d4daf2e15ccc449c6", "score": "0.62910616", "text": "public function actionCreate() {\n\n\t\t$model = new Message;\n\t\tif ($model->add($_POST['Message'])) {\n\t\t\t$this->redirect(array('view', 'id' => $model->msg_id));\n\t\t}\n\t\t$this->render('create', array('model' => $model,));\n\t}", "title": "" }, { "docid": "adc0bf5773866d0966e2f89f67b579a7", "score": "0.6290099", "text": "function setFlashMessage($message, $type = 'success'){\n\t$_SESSION['flashMessage'] = [\n\t\t'message' => $message,\n\t\t'type' => $type\n\t];\n}", "title": "" }, { "docid": "1dd161f1063484f15c246e7f19eb6539", "score": "0.62824434", "text": "function flash(){\n\tif (isset($_SESSION['flash'])) {\n\t\textract($_SESSION['flash']);\n\t\tunset($_SESSION['flash']);\n\t\treturn \"<div id='noti'><div class='alert alert-$type alert-dismissable'>\n\t\t<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\n\t\t$message\n\t\t</div></div>\";\t\n\n\t}\n}", "title": "" }, { "docid": "145514082d724aacf6423d6667e3e001", "score": "0.6277811", "text": "function addFlashBag($texte,$level = 'success')\n{\n if(!isset($_SESSION['flashbag']) || !is_array($_SESSION['flashbag']))\n $_SESSION['flashbag'] = array();\n\n $_SESSION['flashbag'][] = ['message'=>$texte, 'level'=>$level];\n}", "title": "" }, { "docid": "46e9a3f6a008740187d22fa22d1a14f7", "score": "0.62609595", "text": "public function addFlashMessage($message, $error = true)\n {\n if ($error) {\n $type = self::DANGER;\n $icon = self::ICON_DANGER;\n } else {\n $type = self::SUCCESS;\n $icon = self::ICON_SUCCESS;\n }\n\n $_SESSION[self::FLASH_MESSAGE][$type] = [\n 'message' => $message,\n 'icon' => $icon\n ];\n }", "title": "" }, { "docid": "714ff43c8799de6c6f44224f7c2ee6e5", "score": "0.62506604", "text": "function flash(string $message, string $type = 'success'): void\n {\n session()->flash('message', $message);\n session()->flash('type', $type);\n }", "title": "" }, { "docid": "d488901c51ec614a00f191960c9acd02", "score": "0.62399906", "text": "public static function flash(){\n if( isset($_SESSION['flash']) ){ // pertama kita cek, ada nggak si session flash nya \n echo '<div class=\"alert alert-'. $_SESSION['flash']['tipe'] .' alert-dismissible fade show\" role=\"alert\"> Data Mahasiswa \n <strong>'. $_SESSION['flash']['pesan'] .'</strong> ' . $_SESSION['flash']['aksi'] .'\n <button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n </div>'; // ini tag alert dari bootstrap\n unset($_SESSION['flash']); //kita hapus session nya, jadi hanya berlaku sekali , maksudnya adalah jika nanti halaman nya di refresh session ya udh gaad lagi\n \n }\n }", "title": "" }, { "docid": "7432fc612296e489f263ad8d5d723053", "score": "0.62258047", "text": "function emptying_message() {\n $this->session->set_flashdata('message', NULL);\n $this->session->set_flashdata('message_gagal', NULL);\n }", "title": "" }, { "docid": "442508eae8e0437c80421d29978debfe", "score": "0.6224228", "text": "function ajouterMessage($bdd, $nom, $email, $telephone, $Sujet, $message)\n\t{\n\t\ttry{\n\t\t\t$reponse = $bdd ->prepare('INSERT INTO `messages`( `nom`, `email`, `telephone`, `sujet`, `message`) \n\t\t\t\t\t\t\t\t\t VALUES (?,?,?,?,?)');\n\t\t\t$reponse->bindParam(1,$nom, PDO::PARAM_STR,20);\n\t\t\t$reponse->bindParam(2,$email, PDO::PARAM_STR,40);\n\t\t\t$reponse->bindParam(3,$telephone, PDO::PARAM_STR,20);\n\t\t\t$reponse->bindParam(4,$Sujet, PDO::PARAM_STR,40);\n\t\t\t$reponse->bindParam(5,$message, PDO::PARAM_STR,579);\n\t\t\t$reponse->execute();\n\t\t\t\n\t\t\techo '<script> document.getElementById(\"validate\").style.display = \"block\" </script>';\n\t\t\techo '<script> document.getElementById(\"transform\").innerHTML = \"<strong>Merci !</strong>\"</script>';\n\t\t\techo '<script> document.getElementById(\"delete\").innerHTML = \"\"</script>';\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\tdie('Erreur : ' . $e->getMessage().'<br/>');\n\t\t}\t\n\t}", "title": "" }, { "docid": "e52c6c90adbe79b38d461a0560de7d46", "score": "0.6213393", "text": "private function create($title, $message, $level, $key = 'flash_message')\n {\n return session()->flash($key, [\n 'title' => $title,\n 'message' => $message,\n 'level' => $level\n ]);\n }", "title": "" }, { "docid": "dfc487f499c2286ac7233385772b6153", "score": "0.6192948", "text": "function flash_message($message){\n\t$CI =& get_instance();\n\t$CI->session->set_flashdata('message', array('class'=>'message', 'message'=>message($message)));\n}", "title": "" }, { "docid": "4a268345142b3989371768d6313480e7", "score": "0.6191534", "text": "public function message($title, $message, $type='info') \n {\n $this->session->flash($this->key, compact('title', 'message', 'type'));\n }", "title": "" }, { "docid": "f0d0be68a1c2d842efbf33703507e914", "score": "0.61914605", "text": "public function addSuccessMessage($message)\n {\n $this->session->getFlashBag()->add\n (\n 'success',\n [\n 'message' => $message\n ]\n );\n }", "title": "" }, { "docid": "30b798ecf7958448eee38ee9e9882411", "score": "0.6167802", "text": "public function setFlashMessage($message, $type = 'is-success') {\n\t\t$this->Session->setFlash($message, 'flash', array('class' => $type));\n\t}", "title": "" }, { "docid": "76cac869c979b44a5da87fc3c7210197", "score": "0.6162238", "text": "private function message($type,$message,$id=null)\n\t\t{\n\t\t\tto(\"projeto\",\"<div class='alert alert-\" . $type . \"' role='alert'>\" . $message . \"</div>\");\n\t\t}", "title": "" }, { "docid": "334b6e2909696a5a966332be8d19a53c", "score": "0.61611843", "text": "public function flash($message = NULL, $type = 'info')\n {\n static $session;\n $session = $session ?: $this['session'];\n\n $message\n ? $session->getFlashBag()->add($type, $message)\n : $session->getFlashBag()->clear();\n }", "title": "" }, { "docid": "42daafdb7a60fb24ed0bfa8f421250e1", "score": "0.61604756", "text": "function setflash($name, $message)\n {\n return Session::setFlash($name, $message);\n }", "title": "" }, { "docid": "98a1683fd0eb6a7aa13cb4aeba2eb110", "score": "0.6142327", "text": "public function flash_warning() {\n $this->add_class('notice-warning');\n $this->flash();\n }", "title": "" }, { "docid": "14ea30bdfbab550026c774e39c061e6c", "score": "0.6140736", "text": "public function get_message()\n {\n if (isset($_SESSION['flash'])):\n foreach ($_SESSION['flash'] as $type => $message): ?>\n <div class=\"alert-<?= $type; ?>\">\n <span class=\"closebtn\" onclick=\"this.parentElement.style.display='none';\">&times;</span>\n <p><?= $message; ?></p>\n </div>\n <?php endforeach;\n unset($_SESSION['flash']);\n endif;\n }", "title": "" }, { "docid": "ad12272d79c4a58a95ac65dd6d983567", "score": "0.614038", "text": "function setFlash($message)\n{\n Yii::app()->user->setFlash('mysite', $message);\n}", "title": "" }, { "docid": "c49733ed8bfdc51062eade93320634ee", "score": "0.61380893", "text": "protected function create($title, $message, $type, $icon) {\n\t\tsession()->flash('flash_message', [\n\t\t\t\"title\" => $title,\n\t\t\t\"message\" => $message,\n\t\t\t\"type\" => $type,\n\t\t\t\"icon\" => $icon\n\t\t]);\n\t}", "title": "" }, { "docid": "33118b2550586b816ab9778f7ab405be", "score": "0.6135603", "text": "public function create($message,$errors){\n\t\techo $this->render('Catalogos/Acciones/create.twig',[\n\t\t\t'sesiones' => $_SESSION,\n\t\t\t'modulo' => $this->modulo,\n\t\t\t'mensaje' => $message,\n\t\t\t'errors' => $errors\n\t\t]);\n\t}", "title": "" }, { "docid": "a209b7b9ef63492bb6fbdadf56b82761", "score": "0.6130309", "text": "public static function withFlash($data,$msg = null)\n\t{\n\t\tflash::set($data,$msg);\n\t}", "title": "" }, { "docid": "b32a985569f9407ae562ca0cb2e05a4b", "score": "0.61125517", "text": "public function setFlash($message, $type = 'danger'){\n $_SESSION['flash'] = array(\n 'message' => $message,\n 'type' => $type\n );\n }", "title": "" }, { "docid": "98f8dce9ac4c38721a8eec9e47307d22", "score": "0.61025167", "text": "function flashToastr($style, $title, $content)\n{\n\t$stringyContent = $content;\n\tif (is_array($content))\n\t{\n\t\t// If the content is an array, convert it to a string\n\t\t$stringyContent = \"\";\n\t\tforeach ($content as $contentMessage)\n\t\t{\n\t\t\t// Add some paragraphs for nice reading\n\t\t\t$stringyContent .= \"<p>\" . $contentMessage . \"</p>\";\n\t\t}\n\t}\n\t// Set the settings\n\t$message = [\n\t\t\"style\" => $style,\n\t\t\"title\" => $title,\n\t\t\"content\" => $stringyContent\n\t];\n\t// Put it in the session for blade to pick it up\n\tsession()->flash('messageToastr', $message);\n}", "title": "" }, { "docid": "41403e877f1d0f3fae640cf6863a61db", "score": "0.60990906", "text": "function error_flash($name, $msg) {\n if(empty($name) && empty($msg)) return ;\n set_flash('error', $name, $msg);\n}", "title": "" }, { "docid": "5f8578548ef5f28a860788e36b09b635", "score": "0.60939574", "text": "function flash($message)\n\t{\n\t\treturn session()->flash('message', $message);\n\t}", "title": "" }, { "docid": "88c59fc28abe51eba5d7e6f674c40340", "score": "0.60910803", "text": "private static function pushSession()\n {\n session()->flash('flasher.background', self::$background);\n session()->flash('flasher.message', self::$message);\n session()->flash('flasher.icon', self::$icon);\n session()->flash('flasher.color', self::$color);\n session()->flash('flasher.title', self::$title);\n session()->flash('flasher.close', self::$closable);\n }", "title": "" }, { "docid": "c36ce0333022697023202f2f246709bc", "score": "0.6088056", "text": "public function messageAction($message=null)\n { \n $adminmessage = 'Du måste vara administratör för att komma in på den här sidan!';\n $wrongusermessage = 'Du har inte tillstånd att gå in på den här sidan!';\n $usermessage = \"Du måste <a href='../login'>logga in</a> för att gå in på den här sidan!\";\n $content = '';\n if($message == 'admin') {\n $content = $adminmessage;\n }\n else if($message == 'wronguser') {\n $content = $wrongusermessage;\n } else {\n $content = $usermessage;\n }\n \n $this->theme->setTitle(\"Meddelande\");\n $this->views->add('default/error', [\n 'title' => \"Meddelande\",\n 'content' => $content,\n ]); \n }", "title": "" }, { "docid": "a9dd77f45139f6a5c70e3f530e724218", "score": "0.6076296", "text": "public function sendmessage()\n {\n $input = [\n 'from_users'\t=> $this->session->userdata('id'),\n 'to_admin'\t\t=> htmlspecialchars($this->input->post('to_usersadmin')),\n 'content'\t\t=> $this->input->post('contents'),\n 'date'\t\t\t=> date('Y:m:d H:i:s')\n ];\n\n if ($this->Dashboard_model->insert_messages($input)) {\n $this->session->set_flashdata('message', '<div class=\"alert alert-success\" role=\"alert\">Pesan berhasil di kirim</div>');\n redirect('dashboard/messagelist');\n } else {\n $this->session->set_flashdata('message', '<div class=\"alert alert-danger\" role=\"alert\">Something Error !!!</div>');\n }\n }", "title": "" }, { "docid": "9925543f6f598aa75ef99883daf7bac0", "score": "0.6070331", "text": "function flash($name = '', $message = '', $class = 'alert alert-success')\n{\n if (!empty($name)) {\n if (!empty($message) && empty($_SESSION[$name])) {\n if (!empty($_SESSION[$name])) {\n unset($_SESSION[$name]);\n }\n if (!empty($_SESSION[$name . '_class'])) {\n unset($_SESSION[$name . '_class']);\n }\n $_SESSION[$name] = $message;\n $_SESSION[$name . '_class'] = $class;\n } elseif (empty($message) && !empty($_SESSION[$name])) {\n $class = !empty($_SESSION[$name . '_class']) ? $_SESSION[$name . '_class'] : '';\n echo '<div class=\"' . $class . '\" id=\"msg-flash\">' . $_SESSION[$name] . '</div>';\n unset($_SESSION[$name]);\n unset($_SESSION[$name . '_class']);\n }\n }\n}", "title": "" }, { "docid": "2efc934e714985536fcd51a8e3b0c8d2", "score": "0.6066917", "text": "function set_flash_message($message,$type){\n\n\t\tswitch($type){\n\t\t\tcase 'success':\n\t\t\tcase 'error':\n\t\t\tcase 'info':\n\t\t\t\t$_SESSION['flash'][$type] = $message;\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t\tbreak;\t\n\t\t}\n\t\tunset($_SESSION['flash_count']);\n\n\t}", "title": "" }, { "docid": "9eb49e0acd1515e70143da125177d280", "score": "0.6056891", "text": "public function addFlashMessage( $flashMessage )\n\t{\n\t\t$this->addFlash( 'messages', $flashMessage );\n\t}", "title": "" }, { "docid": "1a243cae6e3886f1765e12cd3964e0e8", "score": "0.60545623", "text": "static function messageNouveau() {\n\t\treturn \"Ajouter\";\n\t}", "title": "" }, { "docid": "0048a87642e443476f3d4892cbbdd4b7", "score": "0.60522145", "text": "function flash($message = null, $level = 'info')\n{\n $session = app('session');\n if (!is_null($message)) {\n $session->flash('flash_notification.message', $message);\n $session->flash('flash_notification.level', $level);\n }\n}", "title": "" }, { "docid": "a9636e048ded14fec2020ce9059fa22e", "score": "0.6041842", "text": "protected function flash($key = null, $message = null)\n {\n $flash = $this->container->get('flash');\n return empty($message) ? $flash : $flash->addMessage($key, $message);\n }", "title": "" }, { "docid": "c34854c89d1bba39d15599edb0ffca99", "score": "0.60403347", "text": "protected function errorFlash($message)\n {\n $this->flash($message, 'error');\n }", "title": "" }, { "docid": "90e0c8f438d360a406f08eccccc3b340", "score": "0.60263604", "text": "public function flashNotice($message)\n\t{\n\t\t$this->setFlashMessage('flashNotice', $message);\n\t}", "title": "" }, { "docid": "b2435139adfdefffed3f93c4c57344f0", "score": "0.6021035", "text": "public function setFlash($flash);", "title": "" }, { "docid": "bb69c4d92268732c236886f31d063560", "score": "0.60179305", "text": "function input_absen(){\n $this->M_income->insert_absen(); //mengakses fungsi addTransaski di model mtransaski\n //redirect('admin/transaksi'); //setelah selesai redirect ke halaman awal\n $this->session->set_flashdata('message', '<div class=\"alert alert-info alert-dismissible fade show\">\n <button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>\n <strong>Success!</strong> Data berhasil ditambahkan</div>');\n// redirect('admin/mutasi_pegawai');\n }", "title": "" }, { "docid": "4fe5d2ae55f6de09a675e44c61b05ad1", "score": "0.6013124", "text": "public function create()\n {\n return view(\"messageadd\")->with(\"pagetitle\", \"Bericht toevoegen\");\n }", "title": "" }, { "docid": "9c0bf9ef7152df5a89348e69548477bb", "score": "0.60103387", "text": "public function addSuccessFlash($message)\n {\n $this->addFlash(Utils::FLASH_TYPE_SUCCESS, $message);\n }", "title": "" }, { "docid": "be1d254f891fe2633ca483b1ccff9259", "score": "0.60005665", "text": "public function message(){\n $slug='contact'.uniqid(25);\n $insert=contact_message::insert([\n 'name'=>$_POST['name'],\n 'email'=>$_POST['email'],\n 'message'=>$_POST['message'],\n 'slug'=>$slug,\n 'created_at'=>Carbon::now()->toDateTimeString()\n ]);\n\n if($insert){\n return redirect()->route('website_index');\n }\n }", "title": "" }, { "docid": "e12c5b5ab168a9b9682bcce5a891f7c7", "score": "0.59946024", "text": "public static function flashSet($name = \"\", $message = \"\", $class = \"\")\n\t{\n\t\tif (!empty($name) && !empty($message) && !empty($class)) {\n\t\t\t$tmpSession = [\n\t\t\t\t'name' => $name,\n\t\t\t\t'message' => $message,\n\t\t\t\t\"class\" => $class\n\t\t\t];\n\n\t\t\tif (!isset($_SESSION[\"flash\"])) {\n\t\t\t\t$_SESSION[\"flash\"] = [];\n\t\t\t}\n\n\t\t\tarray_push($_SESSION[\"flash\"], $tmpSession);\n }\n\t}", "title": "" }, { "docid": "c903026bee02cec4c995c1f29704d93c", "score": "0.59916794", "text": "abstract public function addSuccessMessage($message);", "title": "" }, { "docid": "d2698330d4f8ae4be2e2b07f2d320382", "score": "0.598267", "text": "public function store(MessageRequest $request)\n {\n $data = $request->all();\n\n\n Message::create($data);\n Alert::success('Pesan Berhasil Terkirim');\n return redirect()->route('home');\n }", "title": "" }, { "docid": "54f2fa61832bc706a4b857be530ed428", "score": "0.59823483", "text": "public function repondreMessageAction($id) {\n $em = $this->getDoctrine()->getManager();\n $messageAdmin = $em->getRepository(MessageAdmin::class)->findOneById($id);\n $pro = $em->getRepository(Professionnel::class)->findOneByLogin($messageAdmin->getUser());\n $mail=$pro->getEmail();\n $contenu=$this->get('session')->get('contenu_mail');\n if ($contenu==null) {\n return $this->redirectToRoute('lds_platform_admin_repondre_message', array('id' => $id));\n } else {\n $message = (new \\Swift_Message(\"Let's Do Something: Reponse à votre question\"))\n ->setFrom('[email protected]') //adresse de l'evoyeur\n ->setTo($mail) //adresse du receveur\n ->setBody(\n //la vue qui est chargée (le contenu du mail)\n $this->renderView(\n 'LDSPlatformBundle:Email:EmailReponseAdmin.html.twig',\n array('data' => $contenu,)\n ),\n 'text/html'\n );\n $this->get('mailer')->send($message);\n $em->remove($messageAdmin);\n $em->flush();\n }\n\n return $this->redirectToRoute('lds_platform_admin_liste_message', array('page' => 1));\n}", "title": "" }, { "docid": "be4f6f4bc1741e1454ec9fabc71657c6", "score": "0.5978921", "text": "public function message($message) {\n if (!is_array($message)) {\n $message = ['text' => $message];\n }\n if ($class) {\n $message['class'] = $class;\n }\n $this->messages[] = $message;\n }", "title": "" }, { "docid": "be4f6f4bc1741e1454ec9fabc71657c6", "score": "0.5978921", "text": "public function message($message) {\n if (!is_array($message)) {\n $message = ['text' => $message];\n }\n if ($class) {\n $message['class'] = $class;\n }\n $this->messages[] = $message;\n }", "title": "" }, { "docid": "11bfb2eff967302023a2b01e945c3c0f", "score": "0.59782034", "text": "function set_flash($type = 'success', $name = '', $msg ='') {\n if(empty($type) || empty($name) || empty($msg)) return;\n $_SESSION['flash'][$type][$name] = $msg;\n}", "title": "" }, { "docid": "25bc79c6ff206fe9cc53280122af640f", "score": "0.596583", "text": "protected function push()\n {\n $this->session->flash('flash.alerts', $this->notifies);\n }", "title": "" }, { "docid": "aaaabd5f9cb012396cbbf4a200da8f35", "score": "0.59581405", "text": "function addMessage()\n{\n $message = new Messages(1);\n $message->profileId = 1; //для тестов\n $values = [];\n // $company->id = 1; //для тестов\n // $values['id'] = 1;\n $values['author'] = '3';\n $values['receiver'] = '1';\n $values['message_text'] = 'Что-то сюда пишем. Важное или не очень важное.';\n $values['date'] = date('Y-m-d H:i:s');\n $message->addMessage($values);\n // $profile->getUserEmail();\n return $message;\n}", "title": "" }, { "docid": "5159e4b00d9ea0a518aa5cf1ba0d1790", "score": "0.59562737", "text": "public function setFlash($type, $message)\n {\n $this->container->get('session')->getFlashBag()->set($type, $message);\n }", "title": "" }, { "docid": "b62c4c5a9b5b527624742cc0b0c1b550", "score": "0.5953375", "text": "public function addFlashMessage($type, $message) {\n if (!empty($type) && !empty($message)) {\n $flashBag = $this->getFlashBag();\n $messages = $message;\n\n if (!is_array($message)) {\n $messages = array($message);\n }\n\n foreach ($messages as $message) {\n $flashBag->add($type, $message);\n }\n }\n\n return $this;\n }", "title": "" }, { "docid": "8e53c9f8403c5d5c206d064c8431af21", "score": "0.5953231", "text": "function set_flash_message($name, $type, $message) {\r\n\t\t$_SESSION[$name][$type] = $message;\r\n\t}", "title": "" }, { "docid": "537e1336f0c7de546d11be48d943c48b", "score": "0.59492826", "text": "public function create()\n {\n //return \"Mostrar el formulario de mensajes\";\n return view('messages.create');\n }", "title": "" }, { "docid": "594e33c56cef8681f13ab77729b306bd", "score": "0.59492135", "text": "protected function addErrorFlashMessage($message)\n {\n $this->addFlashMessage('error', $message);\n }", "title": "" }, { "docid": "62b804f22f9c9e2c797a5e94e37a268e", "score": "0.59490883", "text": "public function store(Request $request)\n {\n $user = auth('user')->user()->id;\n\n $message = $request->validate([\n 'message' => 'required'\n ]);\n\n $message['user_id'] = $user;\n\n Message::create($message);\n\n flashStatus('Message have been sent to all your students', 'Success');\n\n return back();\n }", "title": "" }, { "docid": "0ca2ca15e5dc1f86bae6b396a410919e", "score": "0.59418046", "text": "public function add_message()\n\t{\n\t\t$this->load->library('form_validation');\n\n\t\t$this->form_validation->set_rules('message_title', 'Title', 'required|trim');\n\t\t$this->form_validation->set_rules('message_content', 'Content', 'required|trim');\n\t\tif ($this->form_validation->run() === FALSE) \n\t\t{\n\t\t\t$this->add_message_form();\n\t\t\techo \"Try again!\";\n\t\t} \n\t\telse \n\t\t{\n\t\t\t\n\t\t\t$this->messages_model->add_message();\n\t\t\techo \"Succcess!\";\n\t\t\t\n\t\t}\n\n\t\t\n\t}", "title": "" }, { "docid": "efa7a133db9ebd57efcc8d7c43345bba", "score": "0.59384096", "text": "public function uflash($name, $data);", "title": "" } ]
dcc215bb3ce59ec414953ed8269e2404
Prepare arguments array for quering service NB! array arguments will be imploded with "," glue
[ { "docid": "d4463ffbb4dd1eb4b232b19f12195705", "score": "0.65549284", "text": "protected function _prepareArguments($arguments)\n {\n foreach ($arguments as $k => &$v) {\n if (is_array($v)) {\n $v = implode(',', $v);\n }\n }\n\n $arguments['apikey'] = $this->_apiKey;\n $arguments['apisig'] = Security::requestSignature($arguments, $this->_secret);\n return $arguments;\n }", "title": "" } ]
[ { "docid": "b52cd22d7dfebf64bace308e7db5b5a2", "score": "0.6204553", "text": "function prepareArgs($args,$argCount)\n{\n\tif ($argCount==0 or !$args) return \"\";\n\t$argz=[];\n\tfor ($i=0;$i<$argCount;++$i)\n\t\t$argz[]=typecastParam($i,$args[$i]);\n\treturn \" \".implode(\", \",$argz).\" \";\n}", "title": "" }, { "docid": "7e024c2257161a99faf4a57f4a38fdab", "score": "0.6203339", "text": "protected function argumentString(array $arguments) {\n $r= '';\n foreach ($arguments as $arg) {\n $r.= $this->javaType($arg->getType()).' '.$arg->getName().', ';\n }\n return substr($r, 0, -2);\n }", "title": "" }, { "docid": "c9111dcf7a01e574275f0b4a3af9e4e7", "score": "0.61351925", "text": "protected function paramString(array $arguments) {\n $r= '';\n foreach ($arguments as $arg) {\n $r.= $arg->getName().', ';\n }\n return substr($r, 0, -2);\n }", "title": "" }, { "docid": "3036b1777dd88f646e824903bb8798a5", "score": "0.60948694", "text": "private function getArgs() {\n\t\treturn [ $this->argument('jobId'), $this->argument('fromCourse'), $this->argument('toCourse'), $this->argument('backOfficeUser')];\n\t}", "title": "" }, { "docid": "8473e227c5e59c78467206c7e1beea7f", "score": "0.6017339", "text": "private function constructArguments()\n {\n $arguments = '';\n\n foreach ($this->ionSwitches as $name => $value) {\n if ($value) {\n $arguments .= \"--$name \";\n }\n }\n\n foreach ($this->ionOptions as $name => $value) {\n /**\n * action-if-no-loader value is a php source snippet so it is\n * better to handle it this way to prevent quote problems!\n */\n if ($name == 'action-if-no-loader') {\n $arguments .= \"--$name \\\"$value\\\" \";\n } else {\n $arguments .= \"--$name '$value' \";\n }\n }\n\n foreach ($this->ionOptionsXS as $name => $value) {\n foreach (explode(' ', $value) as $arg) {\n $arguments .= \"--$name '$arg' \";\n }\n }\n\n foreach ($this->comments as $comment) {\n $arguments .= \"--add-comment '\" . $comment->getValue() . \"' \";\n }\n\n if (!empty($this->targetOption)) {\n switch ($this->targetOption) {\n case \"replace\":\n case \"merge\":\n case \"update\":\n case \"rename\":\n {\n $arguments .= \"--\" . $this->targetOption . \"-target \";\n }\n break;\n\n default:\n {\n throw new BuildException(\"Unknown target option '\" . $this->targetOption . \"'\");\n }\n break;\n }\n }\n\n if ($this->fromDir != '') {\n $arguments .= $this->fromDir . ' ';\n }\n\n if ($this->toDir != '') {\n $arguments .= \"-o \" . $this->toDir . ' ';\n }\n\n return $arguments;\n }", "title": "" }, { "docid": "fee727eba42782a5b475b96981ae905e", "score": "0.6012979", "text": "public function setRawArguments(array $arguments);", "title": "" }, { "docid": "fee727eba42782a5b475b96981ae905e", "score": "0.6012979", "text": "public function setRawArguments(array $arguments);", "title": "" }, { "docid": "c4c719490cb759238df7a50899fcd2fa", "score": "0.59024084", "text": "protected function constructArguments()\n {\n $args = array();\n foreach ($this->options as $option => $value) {\n if (is_bool($value)) {\n $args[] = '--' . $option . '=' . ($value ? 'yes' : 'no');\n } elseif (is_array($value)) {\n foreach ($value as $v) {\n $args[] = '--' . $option . '=' . escapeshellarg($v);\n }\n } else {\n $args[] = '--' . $option . '=' . escapeshellarg($value);\n }\n }\n\n return implode(' ', $args);\n }", "title": "" }, { "docid": "6baf23c7d99e663e4e7ebbe7082270b1", "score": "0.5836347", "text": "protected function argsToString($args, $condition = ' = ', $glue = ' AND ') {\r\n $query = array();\r\n foreach ($args as $key => $value) {\r\n $query[] = $key . ' ' . trim($condition) . ' \"' . $this->escape($value) . '\" ';\r\n }\r\n return implode($glue, $query);\r\n }", "title": "" }, { "docid": "8891d58b6e84183602e82c17cb05ee76", "score": "0.5809621", "text": "public function handleArguments(array $arguments): array\n {\n $args = array_reduce(self::ARGS_TO_REMOVE, fn (array $args, string $arg): array => $this->popArgument($arg, $args), $arguments);\n\n return $this->pushArgument('--runner='.WrapperRunner::class, $args);\n }", "title": "" }, { "docid": "e99753d33bbb8583a5b92941e4c58d3f", "score": "0.5781331", "text": "protected function buildRequestArguments($arguments)\n\t{\n\t\t$defaultArguments = [\n\t\t\t'QueueUrl' => $this->queueUrl\n\t\t];\n\t\treturn array_merge_recursive($defaultArguments, $arguments);\n\t}", "title": "" }, { "docid": "bd9d412e698bcc07ada3b2eb7d705131", "score": "0.57729024", "text": "public function initializeArguments()\n {\n $this->registerArgument('keys', 'string', 'Additional keys separated using \"key1.key2.key3\" dot-notation.', true);\n $this->registerArgument('extKey', 'string', 'Extension Key provided as its package original name with the underscore.');\n }", "title": "" }, { "docid": "19f33335b312b0c2eb1cc96484692cbd", "score": "0.5765137", "text": "public function setArguments(array $arguments);", "title": "" }, { "docid": "19f33335b312b0c2eb1cc96484692cbd", "score": "0.5765137", "text": "public function setArguments(array $arguments);", "title": "" }, { "docid": "19f33335b312b0c2eb1cc96484692cbd", "score": "0.5765137", "text": "public function setArguments(array $arguments);", "title": "" }, { "docid": "d7b3d43a290a583dfea461299d5a2492", "score": "0.5729703", "text": "public function __construct() {\n\t\t$args = func_get_args();\n\t\tif (1 == func_num_args() && is_string($args[0])) {\n\t\t\t$this->cmdArgs[] = $args[0];\n\t\t} else if (1 == func_num_args() && is_array($args[0])) {\n\t\t\t$this->cmdArgs = $args[0];\n\t\t} else if (2 == func_num_args() && is_string($args[0])) {\n\t\t\t$this->cmdArgs[] = $args[0];\n\t\t\tif (is_array($args[1]))\n\t\t\t\t$this->cmdArgs = array_merge($this->cmdArgs, $args[1]);\n\t\t\telse\n\t\t\t\t$this->cmdArgs[] = $args[1];\n\t\t} else {\n\t\t\t$this->cmdArgs = $args;\n\t\t}\n\t}", "title": "" }, { "docid": "281e493033b614089c7c1a6c12650d77", "score": "0.57198024", "text": "public function prepareArgs(array $Args)\n {\n return new \\ArrayObject($Args);\n }", "title": "" }, { "docid": "02b14c25b5f0c9ac4607155a4ca7b2a2", "score": "0.5710618", "text": "protected function convertArgs($args) {\n\t\t$res = array();\n\t\tforeach($args as $argument) {\n\t\t\tswitch (gettype($argument)) {\n\t\t\t\tcase 'array':\n\t\t\t\t\t$str = array();\n\t\t\t\t\tforeach($argument as $key=>$value) {\n\t\t\t\t\t\tif (is_array($value)) {\n\t\t\t\t\t\t\t$str[] = $key.'=\"'. json_encode($value).'\"';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$str[] = $key.'='.strval($value);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$res[] = implode(',', $str);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'object':\n\t\t\t\t\t$res[] = json_encode($argument);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$res[] = strval($argument);\n\t\t\t}\n\t\t}\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "7cc0e47bd70f986c3e9a2c0fb3ae8c5d", "score": "0.5705111", "text": "public static function parseQueryArgs(array $args = []): array;", "title": "" }, { "docid": "f2639a4df8fbdf41cd580bf4f029ff11", "score": "0.5697799", "text": "private function parseArguments(Array $arguments)\n {\n $arguments = (new CommandReader())->parseArguments($arguments);\n $this->options = $arguments['options'];\n $this->owner = $arguments['owner'];\n $this->repository = $arguments['repository'];\n $this->branch = $arguments['branch'];\n }", "title": "" }, { "docid": "0f88560958e5db7f521b5cfa82e70da5", "score": "0.56947273", "text": "private function extractArguments(array $arguments)\n {\n $this->fieldName = Arr::get($arguments, 0);\n $this->labelName = Arr::get($arguments, 1);\n $this->content = Arr::get($arguments, 2);\n $this->lang = Arr::get($arguments, 3);\n }", "title": "" }, { "docid": "567f1badd06efccb3200a63e09061ab4", "score": "0.5659555", "text": "public function withArguments(...$arguments) {}", "title": "" }, { "docid": "5dfbc01f04b5923d06cac37bcda6e588", "score": "0.56595135", "text": "function makeString(){\n $n = func_num_args();\n $args = func_get_args();\n $val = \"\";\n $sep = \",\";\n $container = \"'\";\n if($n==2){\n $sep=$args[1];\n }\n elseif($n==3){\n $sep=$args[1];\n $container=$args[2];\n }\n foreach($args[0] as $v){\n $val.=\"$container$v$container$sep\";\n }\n $val = rtrim($val,$sep);\n return $val;\n}", "title": "" }, { "docid": "5a67bea96615b10989f7f552a1e0b7d5", "score": "0.562988", "text": "function csv(array $args) {\n\t\treturn implode(',',array_map('stripcslashes',\n\t\t\tarray_map(array($this,'stringify'),$args)));\n\t}", "title": "" }, { "docid": "5a67bea96615b10989f7f552a1e0b7d5", "score": "0.562988", "text": "function csv(array $args) {\n\t\treturn implode(',',array_map('stripcslashes',\n\t\t\tarray_map(array($this,'stringify'),$args)));\n\t}", "title": "" }, { "docid": "fd6576edeed4fb6ae1c498bc3504f32a", "score": "0.5618131", "text": "private function getArgsWithExplodedValues(array $args): array\n {\n $exploded = [];\n foreach ($args as $key => $value) {\n $elems = explode(' ', $value);\n $exploded[] = array_shift($elems);\n if (count($elems) <= 0) {\n continue;\n }\n $exploded[] = implode(' ', $elems);\n }\n\n return $exploded;\n }", "title": "" }, { "docid": "341abf6daa21ce95cfc6041fafc54bd9", "score": "0.5599507", "text": "function array2args($farray) {\n return array2filters($farray, ' ', '=', true);\n}", "title": "" }, { "docid": "311d4ee50d5593ee0e645bf3f08c6866", "score": "0.5597929", "text": "public static function normalizeVariadic(array $arguments)\n {\n if (count($arguments) === 2 && is_array($arguments[1])) {\n return array_merge(array($arguments[0]), $arguments[1]);\n }\n\n return $arguments;\n }", "title": "" }, { "docid": "6bfd028a67feeb3287d4628677d37229", "score": "0.5596413", "text": "public function resolveArguments(array $arguments);", "title": "" }, { "docid": "bf7c259b17487210dabb8f2db0f28a17", "score": "0.5559581", "text": "function __construct($args) {\n $this->args = array();\n $this->extra = array();\n\n $source = &$this->args;\n for ($i=0; $i<sizeof($args); $i++) {\n // Any args that come after -- are considered extra args\n if ($args[$i] == '--') {\n $source = &$this->extra;\n continue;\n }\n $source[] = $args[$i];\n }\n }", "title": "" }, { "docid": "e4588ef32505f83237dda6a2bd9a7f96", "score": "0.5537195", "text": "public function prepareArguments(): array\n {\n return $this->arguments = $this->definition->apply($this->request);\n }", "title": "" }, { "docid": "3f67b618f2a6ad1d7ee70dbdad7b5db0", "score": "0.55302507", "text": "public function setArguments(array $array)\n {\n $this->arguments = $array;\n }", "title": "" }, { "docid": "5c2fe3d04b9c72a009db9406727ff622", "score": "0.5520149", "text": "protected function filterArguments(array $arguments)\n {\n return $arguments;\n }", "title": "" }, { "docid": "b85e7c0c8c93f0d632688eadd505162c", "score": "0.55106103", "text": "abstract protected function initializeArguments(array $args);", "title": "" }, { "docid": "7275bdb5236916e977d0c341c5dcb51c", "score": "0.55068046", "text": "function parseDSN_args($args) {\r\n \t$retn = array();\r\n \tforeach(explode(\"&\",$args) as $arg) {\r\n \t \tlist($key,$val) = explode(\"=\",trim($arg));\r\n \t \t$retn[$key] = $val;\r\n \t \tunset($key,$val);\r\n \t}\r\n \treturn $retn;\r\n }", "title": "" }, { "docid": "a600fd213d6f222ce3bdc9cf149ee814", "score": "0.55038875", "text": "private function escapeArgs(&$args) {\n $escaped = array();\n foreach ($args as $arg) {\n $escaped[] = escapeshellarg($arg);\n }\n return $escaped;\n }", "title": "" }, { "docid": "a600fd213d6f222ce3bdc9cf149ee814", "score": "0.55038875", "text": "private function escapeArgs(&$args) {\n $escaped = array();\n foreach ($args as $arg) {\n $escaped[] = escapeshellarg($arg);\n }\n return $escaped;\n }", "title": "" }, { "docid": "595fdf02b8df7ad405d2b5e50992fbb6", "score": "0.549515", "text": "public function getArgs();", "title": "" }, { "docid": "595fdf02b8df7ad405d2b5e50992fbb6", "score": "0.549515", "text": "public function getArgs();", "title": "" }, { "docid": "568fe92238206eb7b1afe7f33b8b775c", "score": "0.5488407", "text": "private function _processArguments($arguments)\n {\n foreach ($arguments as $field => $value) {\n $this->_fields[] = $field;\n $this->_values[] = $value;\n }\n }", "title": "" }, { "docid": "580e83355c8927e77b430e1895f3eb33", "score": "0.5488306", "text": "function trimArgs($args) {\r\n\t\tfor ($i = 0; $i < sizeof($args); $i++) {\r\n\t\t\t$args[$i] = trim($args[$i]);\r\n\t\t}\r\n\t\treturn $args;\r\n\t}", "title": "" }, { "docid": "e3395c707073c047e971564cb8bb7a1d", "score": "0.547835", "text": "public function buildQuery(array $args = []): string\n\t{\n\t\t$out = array_merge(\n\t\t\t$this->payment->getArgs(), // Arguments of the payment\n\t\t\t$args, // Optional helper arguments\n\t\t\t['signature' => $this->payment->getSignature()] // Signature\n\t\t);\n\n\t\t$str = [];\n\t\t/** @var string|int $val */\n\t\tforeach ($out as $key => $val) {\n\t\t\t$str[] = rawurlencode((string) $key) . '=' . rawurlencode((string) $val);\n\t\t}\n\n\t\treturn implode('&', $str);\n\t}", "title": "" }, { "docid": "688ef7225d8b384a5d162ab4c294f2ff", "score": "0.5473437", "text": "public function getArgs(): array;", "title": "" }, { "docid": "ae0051aad60d3593ccb493db6debc4cf", "score": "0.5461651", "text": "function db_args ($args) {\n\tif (count ($args) === 0) {\n\t\treturn null;\n\t} elseif (count ($args) === 1 && is_object ($args[0])) {\n\t\t$res = array ();\n\t\tforeach ((array) $args[0] as $arg) {\n\t\t\t$res[] = $arg;\n\t\t}\n\t\treturn $res;\n\t} elseif (count ($args) === 1 && is_array ($args[0])) {\n\t\t$res = array ();\n\t\tforeach ($args[0] as $arg) {\n\t\t\t$res[] = $arg;\n\t\t}\n\t\treturn $res;\n\t}\n\treturn $args;\n}", "title": "" }, { "docid": "4b17cc6536a858a6d24287729bde3061", "score": "0.5457796", "text": "public function setConstructArgs(array $arguments);", "title": "" }, { "docid": "0d38f690a8957934bc8499c3dcf3a813", "score": "0.54540557", "text": "private function compileArguments($arguments)\n {\n $compiledArguments = array();\n foreach ($arguments as $argument) {\n switch (true)\n {\n case (!is_object($argument)):\n $compiledArguments[] = $argument;\n break;\n case ($argument instanceof Zikula_ServiceManager_Argument):\n $compiledArguments[] = $this->getArgument($argument->getId());\n break;\n case ($argument instanceof Zikula_ServiceManager_Reference):\n $compiledArguments[] = $this->getService($argument->getId());\n break;\n case ($argument instanceof Zikula_ServiceManager_Definition):\n $compiledArguments[] = $this->createService($argument);\n break;\n default:\n throw new InvalidArgumentException(sprintf('Invalid argument object %s', get_class($argument)));\n break;\n }\n }\n\n return $compiledArguments;\n }", "title": "" }, { "docid": "710a40439d1238f06f9e5f212b74205c", "score": "0.5449086", "text": "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "title": "" }, { "docid": "b3fd797463e66468b83a99560a5f00de", "score": "0.5435672", "text": "function parse_shell_arrays( $assoc_args, $array_arguments ) {\n\tif ( empty( $assoc_args ) || empty( $array_arguments ) ) {\n\t\treturn $assoc_args;\n\t}\n\n\tforeach ( $array_arguments as $key ) {\n\t\tif ( array_key_exists( $key, $assoc_args ) && is_json( $assoc_args[ $key ] ) ) {\n\t\t\t$assoc_args[ $key ] = json_decode( $assoc_args[ $key ], $assoc = true );\n\t\t}\n\t}\n\n\treturn $assoc_args;\n}", "title": "" }, { "docid": "45d16ecd74e5300714a0d3774b373a19", "score": "0.54288876", "text": "function bank_shell_args($params){\n\t$res = \"\";\n\tif ($params AND is_array($params)){\n\t\tforeach($params as $k=>$v){\n\t\t\t$res .= \" \".escapeshellcmd($k).\"=\".escapeshellcmd($v);\n\t\t}\n\t}\n\treturn $res;\n}", "title": "" }, { "docid": "b9eb7f646a345e93aaf6da396c248f0b", "score": "0.5428577", "text": "protected function prepareParams()\n\t{\n\t\t$size = count($this->params);\n\t\t$params = '';\n\n\t\tif($size > 1)\n\t\t{\n\t\t\t$params = http_build_query($this->params, null, $this->argSeparator);\n\t\t}\n\t\telseif($size == 1)\n\t\t{\n\t\t\t$keys = array_keys($this->params);\n\n\t\t\tif($keys[0] === 0)\n\t\t\t\t$params = $this->params[0];\n\t\t\telse\n\t\t\t\t$params = http_build_query($this->params, null, $this->argSeparator);\n\t\t}\n\n\t\treturn $params;\n\t}", "title": "" }, { "docid": "74f36cf20ac0dabb83ec25588354a117", "score": "0.54265344", "text": "protected function handle_arguments() {\n\t}", "title": "" }, { "docid": "67a025344ccde1e6ae7564c880b4ced7", "score": "0.54254395", "text": "protected function assembleArgs()\n {\n return $this->args->put('labels', $this->labels())->toArray();\n }", "title": "" }, { "docid": "49a4d1c9e09397048428e7a45bda9701", "score": "0.54205066", "text": "public function setArguments($arguments) { }", "title": "" }, { "docid": "d074b9ad89ec32191b98e97cc712c62b", "score": "0.541479", "text": "private function getArgument(string $arguments): array\r\n {\r\n $argExploded = [];\r\n if(!empty($arguments)){\r\n $arguments = explode(' ', $arguments);\r\n foreach($arguments as $argument){\r\n if(strstr($argument, '=')){\r\n list($name, $value) = explode('=', $argument);\r\n $argExploded[$name] = $value;\r\n }\r\n }\r\n }\r\n return $argExploded;\r\n }", "title": "" }, { "docid": "a4b4826d2bb23fcd92e88ca96c7a8634", "score": "0.54026496", "text": "function to_qs($array)\n {\n return Quantum\\QString::convertAllStringsInArray($array);\n }", "title": "" }, { "docid": "6f8ae2ffdfa79e17f449a9b3db66a422", "score": "0.5394754", "text": "protected function prepare_args(): array {\n\n\t\t$default_args = array(\n\t\t\t'public' => $this->arguments['public'] ?? true,\n\t\t\t'hierarchical' => $this->arguments['hierarchical'] ?? true,\n\t\t\t'show_ui' => $this->arguments['show_ui'] ?? true,\n\t\t\t'show_admin_column' => $this->arguments['show_admin_column'] ?? true,\n\t\t\t'query_var' => $this->arguments['query_var'] ?? true,\n\t\t\t'show_in_rest' => $this->arguments['show_in_rest'] ?? true, // To show in gutenberg.\n\t\t\t'show_in_menu' => true,\n\t\t);\n\n\t\tif ( ! is_null( $this->rewrite_slug ) ) {\n\t\t\t$args['rewrite'] = array(\n\t\t\t\t'slug' => $this->rewrite_slug,\n\t\t\t\t'with_front' => true,\n\t\t\t);\n\t\t}\n\n\t\t// If provided array contains anything other than the default args\n\t\t// Then, append it to the result.\n\n\t\t$map_args = array_map( 'json_encode', $this->arguments );\n\t\t$map_new_args = array_map( 'json_encode', $default_args );\n\t\t$array_diff = array_diff_assoc( $map_args, $map_new_args );\n\t\t$array_diff = array_map( 'json_decode', $array_diff );\n\n\t\tif ( ! empty( $array_diff ) ) {\n\t\t\t$default_args = array_merge( $default_args, $array_diff );\n\t\t}\n\n\t\treturn $default_args;\n\n\t}", "title": "" }, { "docid": "d924ffcad1023b131dec5c088b6fae6f", "score": "0.53877544", "text": "protected function getArguments()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "d924ffcad1023b131dec5c088b6fae6f", "score": "0.53877544", "text": "protected function getArguments()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "d924ffcad1023b131dec5c088b6fae6f", "score": "0.53877544", "text": "protected function getArguments()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "d924ffcad1023b131dec5c088b6fae6f", "score": "0.53877544", "text": "protected function getArguments()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "7f68e9b1b23037d620f662115e95a42c", "score": "0.5374004", "text": "public function filter_request_arguments($args = array()) {\n\t\treturn array_merge($args, array('api_key' => $this->api_key));\n\t}", "title": "" }, { "docid": "4059c791f0b0ac493a4ac98a919abc75", "score": "0.53723294", "text": "protected function httpBuildQuery(array $arguments = [])\n {\n return http_build_query($arguments, null, '&', PHP_QUERY_RFC3986);\n }", "title": "" }, { "docid": "269fb972af46cc416a186e90e9d8e8a5", "score": "0.5369922", "text": "private function parseArguments(array $args)\n { \n $ret = array(\n 'exec' => '',\n 'options' => array(),\n 'flags' => array(),\n 'arguments' => array(),\n );\n $ret['exec'] = array_shift($args);\n while (($arg = array_shift($args)) != NULL)\n {\n if (mb_substr($arg, 0, 2, self::ENCODING) === '--')\n {\n $option = mb_substr($arg, 2, mb_strlen($arg) - 2, self::ENCODING);\n $opt = array();\n if (mb_strpos($option, '=', 0, self::ENCODING) !== FALSE)\n list($opt['key'], $opt['value']) = explode('=', $option, 2);\n else\n $opt = array('key' => $option, 'value' => null);\n $ret['options'][$opt['key']] = $opt['value'];\n continue;\n }\n \n if (mb_substr($arg, 0, 1, self::ENCODING) === '-')\n {\n for ($i = 1; isset($arg[$i]) ; $i++)\n $ret['flags'][$arg[$i]] = true;\n continue;\n }\n $ret['arguments'][] = $arg;\n }\n return $ret;\n }", "title": "" }, { "docid": "5fe959506f6a1ef88b408edac499a4f7", "score": "0.53695107", "text": "abstract public function getDriverArgumentsArray();", "title": "" }, { "docid": "7606dc25bfd57eedd83542aeb8ee413d", "score": "0.5366135", "text": "function parse_str_to_argv( $arguments ) {\n\tpreg_match_all( '/(?:--[^\\s=]+=([\"\\'])((\\\\{2})*|(?:[^\\1]+?[^\\\\\\\\](\\\\{2})*))\\1|--[^\\s=]+=[^\\s]+|--[^\\s=]+|([\"\\'])((\\\\{2})*|(?:[^\\5]+?[^\\\\\\\\](\\\\{2})*))\\5|[^\\s]+)/', $arguments, $matches );\n\t$argv = isset( $matches[0] ) ? $matches[0] : [];\n\treturn array_map(\n\t\tstatic function ( $arg ) {\n\t\t\tforeach ( [ '\"', \"'\" ] as $char ) {\n\t\t\t\tif ( substr( $arg, 0, 1 ) === $char && substr( $arg, -1 ) === $char ) {\n\t\t\t\t\t$arg = substr( $arg, 1, -1 );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\treturn $arg;\n\t\t},\n\t\t$argv\n\t);\n}", "title": "" }, { "docid": "6e8b071843040abe11bf5257532a33ba", "score": "0.53645796", "text": "private function set_arguments($request = null) {\n if ($dir = rtrim(dirname($_SERVER['SCRIPT_NAME']), '\\/')) {\n $base_path = \"$dir/\";\n }\n else {\n $base_path = '/';\n }\n \n if ($request) {\n $parse_url = parse_url($request);\n $request_uri = $parse_url['path'];\n }\n else {\n $request_uri = $_SERVER['REQUEST_URI'];\n }\n\n $uri = filter_var($request_uri, FILTER_SANITIZE_STRING);\n \n // remove $base_path from uri\n if (0 === strpos($uri, $base_path)) {\n $uri = substr($uri, strlen($base_path));\n }\n \n $arguments = explode('/', $uri);\n \n // https://stackoverflow.com/questions/3654295/remove-empty-array-elements\n // https://stackoverflow.com/questions/3401850/after-array-filter-how-can-i-reset-the-keys-to-go-in-numerical-order-starting \n $arguments = array_values(array_filter($arguments, function($value) { return $value !== ''; }));\n\n // We required 6 arguments. Don't waste time is we don't have them.\n if (count($arguments) != 6) {\n throw new Exception(\"Bad Request.\");\n }\n \n // Set idividual arguments\n // {scheme}://{server}{/prefix}/{identifier}/{region}/{size}/{rotation}/{quality}.{format}\n\n // Service\n // Should be the 1st value in argument array\n $this->set('service', $arguments[0]);\n \n // Identifier\n // Should be the 2nd value in argument array\n $this->set('identifier', $arguments[1]);\n \n // Region\n // Should be the 3rd value in argument array\n $this->set('region', $arguments[2]);\n \n // Size\n // Should be the 4rd value in argument array\n $this->set('size', $arguments[3]);\n\n // Rotation\n // Should be the 5th value in argument array\n $this->set('rotation', $arguments[4]);\n\n // Quality\n // Should be the 6th value in argument array\n $this->set('quality', $arguments[5]);\n\n $this->arguments = array(\n 'service' => $this->get('service'),\n 'identifier' => $this->get('identifier'),\n 'region' => $this->get('region'),\n 'size' => $this->get('size'),\n 'rotation' => $this->get('rotation'),\n 'quality' => $this->get('quality'), \n );\n }", "title": "" }, { "docid": "82a76a1065d9e7655113c7c72cc9e383", "score": "0.5350181", "text": "public function __construct()\n {\n $this->args = func_get_args();\n }", "title": "" }, { "docid": "d8c5eadd48841a994264cf992ba4bd2f", "score": "0.53493744", "text": "function qstr_arr($_a){\r\n\t\tif(is_array($_a)){\r\n\t\t}else{\r\n\t\t\t//Let expect string...\r\n\t\t\t$_a=explode(\",\",$_a);\r\n\t\t}\r\n\t\tforeach($_a as $k=>$v){\r\n\t\t\t$_a[$k]=qstr($v);\r\n\t\t}\r\n\t\treturn join(',',$_a);\r\n\t}", "title": "" }, { "docid": "dc681f2f49e8f474f1a04ba9eb78e32d", "score": "0.5347707", "text": "private function updateArgs()\n {\n $this->updatePostTypes();\n $this->updateTaxonomies();\n \n foreach ($this->types as $type) {\n $this->args['location'][] = [\n [\n 'param' => 'post_type',\n 'operator' => '==',\n 'value' => $type,\n ],\n ];\n }\n \n foreach ($this->taxonomies as $taxonomy) {\n $this->args['location'][] = [\n [\n 'param' => 'taxonomy',\n 'operator' => '==',\n 'value' => $taxonomy,\n ],\n ];\n }\n \n $this->args = apply_filters('cgit_seo_field_args', $this->args);\n }", "title": "" }, { "docid": "bd276e150427dee56e9a1c766f119190", "score": "0.53428894", "text": "protected function getArguments()\r\n\t{\r\n\t\treturn array();\r\n\t}", "title": "" }, { "docid": "0a5eac2548409ed8340cbc70bd76bfd3", "score": "0.53393507", "text": "function buildArguments($p) {\n // [email protected]: undefined warning otherwise\n $args = '';\n foreach ($p as $key => $value) {\n \n // Skip these\n if ($key == 'method' || $key == 'submit' || $key == 'MAX_FILE_SIZE') continue;\n \n $args .= $key.'='.urlencode($value).'&';\n \n } // end foreach\n \n // Chop off last ampersand\n return substr($args, 0, -1);\n }", "title": "" }, { "docid": "1e121f1157cbba9e258d19a1a62c90e8", "score": "0.53365403", "text": "private function prepareValues(array $args) : array\n {\n \n foreach ($args as $key=>$arg) {\n $newArg = $this->prepareNumber($arg);\n $args[$key] = $newArg;\n }\n return $args;\n }", "title": "" }, { "docid": "6742ff4534eb9b885f4a00543070d0b3", "score": "0.5335408", "text": "private function getArguments($arguments, $count = 0)\n {\n $argumentArray = explode(', ', str_replace(['(', ')'], '', $arguments));\n $result = [];\n foreach($argumentArray as $value) {\n array_push($result, trim($value, '\\''));\n }\n\n // Forces the array to have at least $count values.\n while(count($result) < $count) {\n array_push($result, '');\n }\n return $result;\n }", "title": "" }, { "docid": "271a794a20df52c24d3c6633dcdd5aa4", "score": "0.53334427", "text": "public function testArguments()\n {\n\n $s1 = $this->factory(['atk4/core/tests/SeedTestMock', null, 'world']);\n $this->assertEquals([null, 'world'], $s1->args);\n\n $s1 = $this->factory(['atk4/core/tests/SeedDITestMock', 'hello', 'foo'=>'bar', 'world']);\n $this->assertEquals(['hello', 'world'], $s1->args);\n $this->assertEquals('bar', $s1->foo);\n }", "title": "" }, { "docid": "32bc3f00fe040df35683c1b32f9c941b", "score": "0.53315616", "text": "protected function dumpFunctionArguments(array $arguments) {\n\t\t$dumpedArguments = array();\n\t\tforeach ($arguments as $argument) {\n\t\t\tif (is_numeric($argument)) {\n\t\t\t\t$dumpedArguments[] = $argument;\n\t\t\t} elseif (is_string($argument)) {\n\t\t\t\tif (strlen($argument) > 80) {\n\t\t\t\t\t$argument = substr($argument, 0, 30) . '...';\n\t\t\t\t}\n\t\t\t\t$argument = addslashes($argument);\n\t\t\t\t$argument = preg_replace('/\\r/', '\\r', $argument);\n\t\t\t\t$argument = preg_replace('/\\n/', '\\n', $argument);\n\t\t\t\t$dumpedArguments[] = '\\'' . $argument . '\\'';\n\t\t\t}\n\t\t\telseif (is_null($argument)) {\n\t\t\t\t$dumpedArguments[] = 'null';\n\t\t\t}\n\t\t\telseif (is_object($argument)) {\n\t\t\t\t$dumpedArguments[] = get_class($argument);\n\t\t\t}\n\t\t\telseif (is_array($argument)) {\n\t\t\t\t$dumpedArguments[] = 'array(' . (count($arguments) ? '...' : '') . ')';\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$dumpedArguments[] = gettype($argument);\n\t\t\t}\n\t\t}\n\n\t\treturn '(' . implode(', ', $dumpedArguments) . ')';\n\t}", "title": "" }, { "docid": "12ec12acb0aaf603f4cc269c63b359fd", "score": "0.5331231", "text": "protected function get_arguments(): array {\n\t\treturn [\n\t\t\t// Example - add a scalar value to an argument for SampleService:\n\t\t\t// SampleService::class => [ 'argument_name' => 'value' ],\n\n\t\t\t// Add your argument mappings here.\n\t\t];\n\t}", "title": "" }, { "docid": "d5c76dc9ff62f261e18a0f071c21bac7", "score": "0.5320787", "text": "public function args()\n {\n return [];\n }", "title": "" }, { "docid": "89e3c2156322e332472015494f593c5a", "score": "0.5318938", "text": "public function setArgs($args) {\n\t\t\t$this->args = (is_array($args))?$args:array($args);\n\t\t}", "title": "" }, { "docid": "71efca60ba84eaa1f711ef14ff5635d8", "score": "0.5303683", "text": "function _getArguments()\r\n {\r\n if (isset($_SERVER['PATH_INFO'])) {\r\n if ($_SERVER['PATH_INFO'] == '') {\r\n if (isset($_ENV['ORIG_PATH_INFO'])) {\r\n $this->_arguments = explode('/', $_ENV['ORIG_PATH_INFO']);\r\n } else {\r\n $this->_arguments = array();\r\n }\r\n } else {\r\n $this->_arguments = explode('/', $_SERVER['PATH_INFO']);\r\n }\r\n array_shift($this->_arguments);\r\n } elseif (isset($_ENV['ORIG_PATH_INFO'])) {\r\n $this->_arguments = explode('/', substr($_ENV['ORIG_PATH_INFO'], 1));\r\n } elseif (isset($_SERVER['ORIG_PATH_INFO'])) {\r\n $this->_arguments = explode('/', substr($_SERVER['ORIG_PATH_INFO'], 1));\r\n } else {\r\n $this->_arguments = array();\r\n }\r\n }", "title": "" }, { "docid": "e9005d10ed52722c9123ac0722e55442", "score": "0.53013957", "text": "public function parseArguments() {\r\n if( !isSet( $_GET['args'] ) ) return Array();\r\n else return explode( '|', $_GET['args'] );\r\n }", "title": "" }, { "docid": "3ca5971da4d7c6f4c8121ad8710e051b", "score": "0.5299128", "text": "public function prepareArguments()\n {\n foreach ($this->arrayPropertyArguments as $argument => $propertyName) {\n if (($value = $this->arguments[$argument] ?? null) && $value instanceof AbstractDomainObject && method_exists($value, 'getUid')) {\n $this->arguments[$argument] = (string)$value->getUid();\n }\n }\n\n return parent::prepareArguments();\n }", "title": "" }, { "docid": "d0fa0b4bc6e2f152165b33c7671c9a46", "score": "0.52961665", "text": "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "title": "" }, { "docid": "cedd12e0bb574e3fe7fbc9ae99ba3b3c", "score": "0.5293483", "text": "protected function getArguments()\n {\n return [\n ];\n }", "title": "" }, { "docid": "cedd12e0bb574e3fe7fbc9ae99ba3b3c", "score": "0.5293483", "text": "protected function getArguments()\n {\n return [\n ];\n }", "title": "" }, { "docid": "9bb9a7238aca571ec74376378a3f72be", "score": "0.528915", "text": "private function _process_args(&$args)\n {\n // optional arguments.\n if (!isset($args['startnum']) || !is_numeric($args['startnum'])) {\n $args['startnum'] = -1;\n }\n if (!isset($args['numitems']) || !is_numeric($args['numitems'])) {\n $args['numitems'] = -1;\n }\n if (!isset($args['author'])) {\n $args['author'] = null;\n }\n if (!isset($args['keyword'])) {\n $args['keyword'] = null;\n }\n if (!isset($args['category'])) {\n $args['category'] = null;\n }\n if (!isset($args['catFilter']) || !is_numeric($args['catFilter'])) {\n $args['catFilter'] = array();\n }\n if (!isset($args['rootCat'])) {\n $args['rootCat'] = 0;\n }\n\n // build the where clause\n $wheres = array();\n if (isset($args['qid'])) {\n $wheres[] = \"qid = \".DataUtil::formatForStore($args['qid']);\n }\n if ($args['author']) {\n $wheres[] = \"author = '\".DataUtil::formatForStore($args['author']).\"'\";\n }\n if (isset($args['status'])) {\n $wheres[] = \"status = '\".DataUtil::formatForStore($args['status']).\"'\";\n }\n\n if ($args['category']){\n if (is_array($args['category'])) {\n $args['catFilter'] = $args['category'];\n } else {\n $args['catFilter'][] = $args['category'];\n }\n $args['catFilter']['__META__'] = array('module' => 'Quotes');\n }\n\n if ($args['keyword']) {\n $wheres[] = \"quote LIKE '%\".DataUtil::formatForStore($args['keyword']).\"%'\";\n }\n\n $args['where'] = implode(' AND ', $wheres);\n\n return $args['where'];\n }", "title": "" }, { "docid": "f23032e6086da610ada52ea4bc5ac819", "score": "0.5284824", "text": "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "f23032e6086da610ada52ea4bc5ac819", "score": "0.5284824", "text": "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "f23032e6086da610ada52ea4bc5ac819", "score": "0.5284824", "text": "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "f23032e6086da610ada52ea4bc5ac819", "score": "0.5284824", "text": "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "f23032e6086da610ada52ea4bc5ac819", "score": "0.5284824", "text": "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "f23032e6086da610ada52ea4bc5ac819", "score": "0.5284824", "text": "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "f23032e6086da610ada52ea4bc5ac819", "score": "0.5284824", "text": "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "6d26ece2aae11bd1e4250d67bfb35753", "score": "0.5283068", "text": "private static function getArguments($arguments = array())\n {\n $typoscriptKeys = array();\n $options = array();\n\n while ($argument = array_shift($arguments)) {\n if (is_array($argument)) {\n foreach ($argument as $key => $value) {\n $options[$key] = $value;\n }\n\n } elseif (is_string($argument)) {\n $typoscriptKeys[] = $argument;\n }\n }\n\n return array($options, $typoscriptKeys);\n }", "title": "" }, { "docid": "ea7f9d6fbe0cb458838e90b8ce0e35da", "score": "0.52814436", "text": "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t//array('example', InputArgument::REQUIRED, 'An example argument.'),\n\t\t//array('server_id', InputArgument::REQUIRED, 'Server ID'),\n\t\tarray('db_qiqiwu', InputArgument::REQUIRED, 'Qiqiwu Database'),\n\t\tarray('db_name', InputArgument::REQUIRED, 'Name Database'),\n\t\t);\n\t}", "title": "" }, { "docid": "038ba8d5668257f6632a9c7b0fe30be7", "score": "0.5279814", "text": "public function getArguments(): array;", "title": "" }, { "docid": "2e743a7b6a0d608a8700d81748c33e6c", "score": "0.5266464", "text": "protected function getArguments()\n\t{\n\t\treturn array(\n\n\t\t);\n\t}", "title": "" }, { "docid": "2e743a7b6a0d608a8700d81748c33e6c", "score": "0.5266464", "text": "protected function getArguments()\n\t{\n\t\treturn array(\n\n\t\t);\n\t}", "title": "" }, { "docid": "4c5016364d4803716f77baa762422460", "score": "0.5253548", "text": "protected function getArguments() {\n return [];\n }", "title": "" }, { "docid": "e3a8dc020200bdeb1fbb7b2d1fa601ad", "score": "0.5249911", "text": "public function testArgumentMixedInputWithComma()\n {\n $this->artisan(\"stringify\", [\"inString\" => \"Hello, World543%$#\"])\n ->expectsOutput(\"Welcome to the Stringify Console Command!\")\n ->expectsOutput(\"Error: Input is not allowed to include the delimeter (,)\")\n ->expectsOutput(\"Stringify will exit now\")\n ->assertExitCode(0); \n }", "title": "" }, { "docid": "31d22f612a4311451635d87768edc7ac", "score": "0.52481735", "text": "private function getTemplateArgs(): array\n {\n $signer_name = preg_replace('/([^\\w \\-\\@\\.\\,])+/', '', $_POST['signer_name']);\n $signer_email = preg_replace('/([^\\w \\-\\@\\.\\,])+/', '', $_POST['signer_email']);\n $brand_id = preg_replace('/([^\\w \\-\\@\\.\\,])+/', '', $_POST['brand_id']);\n $envelope_args = [\n 'signer_email' => $signer_email,\n 'signer_name' => $signer_name,\n 'brand_id' => $brand_id\n ];\n $args = [\n 'account_id' => $_SESSION['ds_account_id'],\n 'base_path' => $_SESSION['ds_base_path'],\n 'ds_access_token' => $_SESSION['ds_access_token'],\n 'envelope_args' => $envelope_args\n ];\n\n return $args;\n }", "title": "" } ]
ee93a6c646c19f663bdbca20746849af
Logs cronjob exec success or failure.
[ { "docid": "5cd0bd5d68dec0f859bf9babfa49b537", "score": "0.5911261", "text": "public static function logSuccess($logID = 0, $success = false, $exception = NULL) {\n\t\tif ($success === false && $exception) {\n\t\t\t$message = $exception->getMessage();\n\t\t\t$code = $exception->getCode();\n\t\t\t$file = $exception->getFile();\n\t\t\t$line = $exception->getLine();\n\t\t\t$stacktrace = $exception->getTraceAsString();\n\t\t\t$errString = $message.\"\\n\".$code.\"\\n\".$file.\"\\n\".$line.\"\\n\".$stacktrace;\n\t\t\t\n\t\t\t$sql = \"UPDATE\twcf\".WCF_N.\"_cronjobs_log \n\t\t\t\tSET\tsuccess = 0, error = '\".escapeString($errString).\"' \n\t\t\t\tWHERE\tcronjobsLogID = \".$logID;\n\t\t} \n\t\telse if ($success === true) {\n\t\t\t$sql = \"UPDATE\twcf\".WCF_N.\"_cronjobs_log \n\t\t\t\tSET\tsuccess = 1 \n\t\t\t\tWHERE\tcronjobsLogID = \".$logID;\n\t\t}\n\t\tWCF::getDB()->sendQuery($sql);\n\t}", "title": "" } ]
[ { "docid": "debb7ceb30c2489cb12f54170f275fd6", "score": "0.6446049", "text": "protected function getCronExecStatus()\n\t{\n\t\t$result = 'danger';\n\n\t\t$time_diff = (microtime(true) - strtotime($this->getLastCronExecTime()));\n\n\t\tif ($time_diff<3600) {// 1 hour\n\t\t\t$result = 'success';\n\t\t} elseif ($time_diff<12*3600) {// 12 hours\n\t\t\t$result = 'warning';\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "1c279898648d1147efcee0331fb10978", "score": "0.6261171", "text": "abstract public function execSuccessful();", "title": "" }, { "docid": "0855a3bde8dc24d0f8f285512188c6b2", "score": "0.5943659", "text": "public function execute()\n {\n $this->logger->debug(\"este es un mensaje desde el controlador\");\n $this->logger->alert(\"este es un mensaje alert\");\n $this->logger->critical(\"este es un mensaje critical\");\n $this->logger->error(\" este es un mensaje de error\");\n $this->logger->info(\"este es un mensaje de info\");\n echo \"log escrito\";\n }", "title": "" }, { "docid": "ce4dfc09a13f96d4f28070968b570a94", "score": "0.58889693", "text": "public function execute() \r\n\t{\r\n\t\t// Set global variable to catch return messages\r\n\t\tglobal $redcapCronJobReturnMsg;\r\n\t\t// First, check and fix any crons that have stalled (i.e. exceeded max run time)\r\n\t\t$this->checkCronInstances();\r\n\t\t// Validate and set all jobs to be run\r\n\t\t$this->setJobList();\r\n\t\t// Instatiate the Jobs class\r\n\t\t$Jobs = new Jobs();\r\n\t\t// Get jobs list\r\n\t\t$jobsList = $this->getJobs();\r\n\t\t// Output text for beginning the execution of the jobs\r\n\t\tprint \"Executing \" . count($jobsList) . \" jobs: \"; \r\n\t\t// Counter\r\n\t\t$numCron = 0;\r\n\t\t// Loop through each job and execute it\r\n\t\tforeach ($jobsList as $thisJob)\r\n\t\t{\r\n\t\t\t// Set inital value of job's return message as null\r\n\t\t\t$redcapCronJobReturnMsg = null;\r\n\t\t\t// Give message of success when done\r\n\t\t\tprint \"\\r\\n\" . ++$numCron . \") $thisJob -> \";\r\n\t\t\t// Set cron_run_time_start\r\n\t\t\t$ch_id = $this->logCronStart($thisJob);\r\n\t\t\t// Set default return message\r\n\t\t\t$returnMsg = \"done!\";\r\n\t\t\t// Run the job\r\n\t\t\tif (isset($this->jobsDefinedCustom[$thisJob])) {\r\n\t\t\t\t// Custom non-REDCap job, so simply call URL with http_get\r\n\t\t\t\t$redcapCronJobReturnMsg = http_get($this->jobsDefinedCustom[$thisJob]);\r\n\t\t\t} else {\r\n\t\t\t\t// Call the method\r\n\t\t\t\tcall_user_func(array($Jobs, $thisJob));\r\n\t\t\t}\r\n\t\t\t// If job sets a return message, then add it to crons_history table\r\n\t\t\tif ($redcapCronJobReturnMsg != null && $redcapCronJobReturnMsg != \"\") {\r\n\t\t\t\t$this->setJobReturnMsg($ch_id, $redcapCronJobReturnMsg);\r\n\t\t\t}\r\n\t\t\t// Set cron_run_time_start\r\n\t\t\t$this->logCronEnd($thisJob, $ch_id);\r\n\t\t\t// Give message of success when done\r\n\t\t\tprint $returnMsg;\r\n\t\t}\r\n\t\tprint \"\\r\\nCompleted all jobs!\";\r\n\t}", "title": "" }, { "docid": "dac3b984fe326722f7bfc0d053166d0e", "score": "0.57135147", "text": "function logndie($msg) {\n\ttry {\n\t\t$d = date(DATE_ATOM);\n\t\t$f = fopen('cronresults.txt', 'a');\n\t\tfwrite($f, \"$d\\t$msg\\n\");\n\t\tfclose($f);\n\t} catch (Exception $e) {\n\t\tcontinue;\n\t}\n\tdie(0);\n}", "title": "" }, { "docid": "d5b9914dc23788f425de7ed6416466b8", "score": "0.56852394", "text": "public function run() {\n Central::pr(\"Cron Job Starting\");\n $corrupt_args = false;\n $central = Central::instance();\n $class = $central->getargs('class', Args::argv, $corrupt_args);\n Central::pr(\"Found the class = $class\");\n $function = $central->getargs('function', Args::argv, $corrupt_args);\n Central::pr(\"Found the function = $function\");\n if (!$corrupt_args) {\n $namespace = $central->getargs('namespace', Args::argv, $corrupt_args);\n Central::pr(\"Found the namespace = $namespace\");\n if ($corrupt_args) {\n $namespace = \"\";\n } else {\n $namespace = str_replace(\"/\", \"\\\\\", $namespace);\n $namespace .= \"\\\\\";\n }\n Central::pr(\"namespace after the changes = $namespace\");\n $class = $namespace . $class;\n Central::pr(\"The final class is = $class\");\n $r = new ReflectionClass($class);\n $mystrey_obj = $r->newInstanceArgs();\n $mystrey_obj->$function(date('Y-m-d H:i:s', time()));\n echo(\"CRON job successful for $class -> $function()\");\n Central::pr(\"CRON job successful for $class -> $function()\");\n } else {\n throw new Exception(\"Confusing Parameters. CRON job not successful\");\n }\n }", "title": "" }, { "docid": "7380e7622bd8358ca9f2e8b93bbd7255", "score": "0.56668574", "text": "function system_run_cron() {\n // Run cron manually\n if (drupal_cron_run()) {\n drupal_set_message(t('Cron ran successfully.'));\n }\n else {\n drupal_set_message(t('Cron run failed.'), 'error');\n }\n\n drupal_goto('admin/reports/status');\n}", "title": "" }, { "docid": "e5c9051f52e91268a11a5e951678517a", "score": "0.5666675", "text": "function backup_cron_log()\n\t{\n\t\t# 1. Get file size and check if it is bigger than 500KB\n\t\t$fileSize = filesize(CRON_FILE_LOG)/1024;\n\t\t# 2. If bigger back it up and create a new log file\n\t\tif($fileSize > 500){\n\t\t\t$zipName = CRON_HOME_URL.'archive/'.@strtotime('now').'.zip';\n\t\t\t$zip = new ZipArchive;\n\t\t\t$zip->open($zipName, ZipArchive::CREATE);\n\t\t\t$zip->addFile(CRON_FILE_LOG, basename(CRON_FILE_LOG));\n\t\t\t$zip->close();\n\t\t\t\n\t\t\t# Then clear the log file\n\t\t\t$log = fopen(CRON_FILE_LOG, \"w+\");\n\t\t\tfwrite($log, '');\n\t\t\tfclose($log);\n\t\t}\n\t\t\n\t\t$bool = (!empty($zipName) && file_exists($zipName) && filesize($zipName) > 0) || $fileSize < 500;\n\t\t\n\t\treturn array('archive'=>($bool && $fileSize > 500? 'Archive: '.basename($zipName): ''), 'bool'=>$bool);\n\t}", "title": "" }, { "docid": "0ea110c78f182313a1cc0d3297a4700e", "score": "0.56453735", "text": "public function executeTasks() {\n\t\t$start_cron = microtime(true);\n\t\tif (!file_exists(\"data/cron\")) mkdir(\"data/cron\");\n\t\tset_error_handler(function($severity, $message, $filename, $lineno) {\n\t\t\tif (error_reporting() == 0) return true;\n\t\t\tPNApplication::error(\"PHP Error: \".$message.\" in \".$filename.\":\".$lineno);\n\t\t\treturn true;\n\t\t});\n\t\tforeach ($this->getTasks() as $task) {\n\t\t\t$this->executeCronTask($task);\n\t\t}\n\t\t$end = microtime(true);\n\t\t$f = fopen(\"data/cron/tasks_time\",\"w\");\n\t\tfwrite($f, number_format($end-$start_cron,2));\n\t\tfclose($f);\n\t}", "title": "" }, { "docid": "af9db82fd4b171ccf7e171501a643096", "score": "0.5640248", "text": "public function executeMaintenanceTasks() {\n\t\t$start_cron = microtime(true);\n\t\tif (!file_exists(\"data/cron\")) mkdir(\"data/cron\");\n\t\tset_error_handler(function($severity, $message, $filename, $lineno) {\n\t\t\tif (error_reporting() == 0) return true;\n\t\t\tPNApplication::error(\"PHP Error: \".$message.\" in \".$filename.\":\".$lineno);\n\t\t\treturn true;\n\t\t});\n\t\tforeach ($this->getMaintenanceTasks() as $task) {\n\t\t\t@unlink(\"data/cron/\".$task->task_id.\".errors\");\n\t\t\t$task_start = microtime(true);\n\t\t\ttry {\n\t\t\t\tinclude($task->file);\n\t\t\t} catch (Exception $e) {\n\t\t\t\tPNApplication::error($e);\n\t\t\t}\n\t\t\t$task_end = microtime(true);\n\t\t\t$f = fopen(\"data/cron/\".$task->task_id,\"w\");\n\t\t\tfwrite($f, number_format($task_end-$task_start,2));\n\t\t\tfclose($f);\n\t\t\tif (PNApplication::hasErrors()) {\n\t\t\t\t$f = fopen(\"data/cron/\".$task->task_id.\".errors\",\"w\");\n\t\t\t\tfwrite($f, \"<ul>\");\n\t\t\t\tforeach (PNApplication::$errors as $err)\n\t\t\t\t\tfwrite($f, \"<li>\".$err.\"</li>\");\n\t\t\t\tfwrite($f, \"</ul>\");\n\t\t\t\tfclose($f);\n\t\t\t\tPNApplication::clearErrors();\n\t\t\t}\n\t\t}\n\t\t$end = microtime(true);\n\t\t$f = fopen(\"data/cron/maintenance_tasks_time\",\"w\");\n\t\tfwrite($f, number_format($end-$start_cron,2));\n\t\tfclose($f);\n\t}", "title": "" }, { "docid": "c0ade5fd4f020d1c2e4c0ed273a9e810", "score": "0.5569476", "text": "function process() {\n\t\t$db = GetGlobal('db');\n\t\t\n\t\t$this->writeLog(\"Cron definition:\" . $this->cronDefinition);\n\t\t$cronParser = new cronparser($this->cronDefinition);\n\t\t$this->writeLog('check jobtab '.date('d-m-Y H:i', $cronParser->getLastRanUnix()).' > '.date('d-m-Y H:i', $this->getLastActualTimestamp()).' ('.$cronParser->getLastRanUnix().' > '.$this->getLastActualTimestamp().')');\n\t\t\n\t\tif ($this->getId() && ($cronParser->getLastRanUnix() > $this->getLastActualTimestamp())) {\n\t\t\t$this->writeLog('creating job because '.date('d-m-Y H:i', $cronParser->getLastRanUnix()).' > '.date('d-m-Y H:i', $this->getLastActualTimestamp()).' ('.$cronParser->getLastRanUnix().' > '.$this->getLastActualTimestamp().')');\n\t\t\t$this->lastActualTimestamp = time();\n\t\t\t$sql = 'UPDATE crontab SET lastActualTimestamp= '.$db->qstr($this->lastActualTimestamp).' WHERE `id`= '.$db->qstr($this->getId());\n\t\t\t$db->Execute($sql);\n\t\t\t$job = new cronjob();\n\t\t\t$job->createFromCrontab($this);\n\t\t\t$job->update();\n\t\t}\n\t\treturn;\n\t}", "title": "" }, { "docid": "2ab0b8d587143d02631e537d5ed81304", "score": "0.55224484", "text": "public function executeCronTask($task) {\n\t\tif (!file_exists(\"data/cron\")) @mkdir(\"data/cron\");\n\t\tif (file_exists(\"data/cron/\".$task->task_id)) {\n\t\t\t$last = filemtime(\"data/cron/\".$task->task_id);\n\t\t\tif ((time()-$last+10)/60 < $task->every_minutes) return;\n\t\t}\n\t\t@unlink(\"data/cron/\".$task->task_id.\".errors\");\n\t\t$task_start = microtime(true);\n\t\ttry {\n\t\t\tinclude($task->file);\n\t\t} catch (Exception $e) {\n\t\t\tPNApplication::error($e);\n\t\t}\n\t\t$task_end = microtime(true);\n\t\t$f = fopen(\"data/cron/\".$task->task_id,\"w\");\n\t\tfwrite($f, number_format($task_end-$task_start,2));\n\t\tfclose($f);\n\t\tif (PNApplication::hasErrors()) {\n\t\t\t$f = fopen(\"data/cron/\".$task->task_id.\".errors\",\"w\");\n\t\t\tfwrite($f, \"<ul>\");\n\t\t\tforeach (PNApplication::$errors as $err)\n\t\t\t\tfwrite($f, \"<li>\".$err.\"</li>\");\n\t\t\tfwrite($f, \"</ul>\");\n\t\t\tfclose($f);\n\t\t\tPNApplication::clearErrors();\n\t\t}\n\t}", "title": "" }, { "docid": "56fbd2d93782afb98a698d2efccb5d6e", "score": "0.55044246", "text": "public function show_cron_status() {\n\n\t\t$status = $this->test_cron_spawn();\n\n\t\tif ( is_wp_error( $status ) ) {\n\t\t\tif ( 'crontrol_info' === $status->get_error_code() ) {\n\t\t\t\t?>\n\t\t\t\t<div id=\"cron-status-notice\" class=\"notice notice-info\">\n\t\t\t\t\t<p><?php echo esc_html( $status->get_error_message() ); ?></p>\n\t\t\t\t</div>\n\t\t\t\t<?php\n\t\t\t} else {\n\t\t\t\t?>\n\t\t\t\t<div id=\"cron-status-error\" class=\"error\">\n\t\t\t\t\t<p>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\tprintf(\n\t\t\t\t\t\t\t/* translators: 1: Error message text. */\n\t\t\t\t\t\t\tesc_html__( 'There was a problem spawning a call to the WP-Cron system on your site. This means WP-Cron events on your site may not work. The problem was: %s', 'wp-crontrol' ),\n\t\t\t\t\t\t\t'<br><strong>' . esc_html( $status->get_error_message() ) . '</strong>'\n\t\t\t\t\t\t);\n\t\t\t\t\t\t?>\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t\t<?php\n\t\t\t}\n\t\t}\n\n\t}", "title": "" }, { "docid": "4f92de89c0f0b12f1ccc5bd10c21f069", "score": "0.55006105", "text": "public function cron() {\n global $CFG;\n\n // The enrolment depends on user synchronization via auth_ldap.\n if (!is_enabled_auth('ldap')) {\n debugging('[AUTH LDAP] ' . get_string('pluginnotenabled', 'auth_ldap'));\n die;\n }\n\n if (!enrol_is_enabled('cohort')) {\n debugging('[ENROL COHORT]'.get_string('pluginnotenabled', 'enrol_cohort'));\n die;\n }\n\n if (!enrol_is_enabled('openlml')) {\n debugging('[ENROL OPENLML] '.get_string('pluginnotenabled', 'enrol_openlml'));\n die;\n }\n\n mtrace(\"Starting enrolments for openlml enrolments plugin...\");\n $this->enrol_openlml_sync();\n mtrace(\"finished.\");\n }", "title": "" }, { "docid": "8f12f26b5e9ab89169092eb97aa8be42", "score": "0.54941475", "text": "public function checkCron() {\n\t\tMage::log('Check Cron 1',null,'laybuy_cron.log');\n\t\tif(!Mage::getStoreConfig('payment/laybuy/cronenabled')) {\n\t\t\tMage::log('Check Cron 2',null,'laybuy_cron.log');\n\t\t\ttry {\n\t\t\t\t$config = new Mage_Core_Model_Config();\n\t\t\t\t$config->saveConfig(\"payment/laybuy/cronenabled\", 1);\n\t\t\t\tMage::log('Check Cron 3: '.Mage::getStoreConfig('payment/laybuy/cronenabled'),null,'laybuy_cron.log');\n\t\t\t} catch (Exception $e) {\n\t\t\t\tMage::log('Check Cron exp: '.$e->getMessage(),null,'laybuy_cron.log');\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "75cbead3723909672151868f719e353d", "score": "0.5479627", "text": "protected function executeEpilog()\n\t{\n\n\t}", "title": "" }, { "docid": "474c01d832e4bf75d94bca0e67bcbf20", "score": "0.539722", "text": "private function runJobsLog( $msg ) {\n\t\t$this->output( wfTimestamp( TS_DB ) . \" $msg\\n\" );\n\t\twfDebugLog( 'runJobs', $msg );\n\t}", "title": "" }, { "docid": "6fb1b2eb9bfebf6b59b91f26989629d7", "score": "0.53907865", "text": "function _log( $msg ) {\n $FILE_LOG_TMP = \"/tmp/fastnetmon_api_mikrotik.log\";\n if ( !file_exists( $FILE_LOG_TMP ) ) exec( \"echo `date` \\\"- [FASTNETMON] - \" . $msg . \" \\\" > \" . $FILE_LOG_TMP );\n else exec( \"echo `date` \\\"- [FASTNETMON] - \" . $msg . \" \\\" >> \" . $FILE_LOG_TMP );\n \n}", "title": "" }, { "docid": "b473147d3d9fd2227e1dbb8dd21d016f", "score": "0.5371317", "text": "abstract public function successLogMessage();", "title": "" }, { "docid": "181e4efa6a55e8aceb29a24e932b217c", "score": "0.53707623", "text": "public function cron() {\n //log::add('jMQTT', 'info', 'démarre le plugin');\n self::checkAllDaemons();\n }", "title": "" }, { "docid": "ecc66fc4552c2f5651d2bcc6e4759b1e", "score": "0.536507", "text": "function my_exit() {\n global $exit_code, $output, $options;\n if($exit_code || !$options['cron']) {\n \tprint $output;\n }\n exit($exit_code);\n}", "title": "" }, { "docid": "3774a2123ab75903d9606c9370ca4b82", "score": "0.5360123", "text": "public function preExecute()\n {\n try {\n $this->execute();\n } catch (\\Exception $e) {\n $this->log->error(sprintf(\"Task encountered an error: %s\", $e->getMessage()));\n return \"failed\";\n }\n\n return \"success\";\n }", "title": "" }, { "docid": "1d44034f275c3b4f0c4420334162444f", "score": "0.53432506", "text": "public function executeCron()\n {\n $this->mode = 'cron';\n $this->execute();\n }", "title": "" }, { "docid": "fb1298e2bc776ad57da48dcedfdeeb22", "score": "0.5341974", "text": "function createCronFile()\n {\n $this->errMsg = '';\n $sComando = '/usr/bin/elastix-helper vacationconfig create_cron';\n $output = $ret = NULL;\n exec($sComando, $output, $ret);\n if ($ret != 0) {\n $this->errMsg = implode('', $output);\n return FALSE;\n }\n return TRUE;\n }", "title": "" }, { "docid": "913c17b64c2b37fde2a30359552d68b0", "score": "0.5312296", "text": "public static function testLog( )\n {\n return self::executeLog( 'CALL tst_test_log()' );\n }", "title": "" }, { "docid": "031f28ce5f0ea04a4e16ab64277d1614", "score": "0.5301611", "text": "function ombudashboard_run_cron(&$context) {\n drupal_cron_run();\n $context['message'] = 'Cron run successfully';\n}", "title": "" }, { "docid": "1a58ee177e75f191469acb2b069a5917", "score": "0.52980685", "text": "public function check()\r\n\t{\r\n\t\tif (Cron::isTaskTime(time(), $this->cron)) {\r\n\t\t\t$this->run();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "d09dc9ae7531752ac70370d8fdd7119b", "score": "0.5287703", "text": "function lastCronHasErrors() {\n\t\treturn file_exists(\"data/cron/cron_errors\");\n\t}", "title": "" }, { "docid": "025f0bd2678d9a273b53dc339f84229a", "score": "0.5283539", "text": "public function run_cron() {\n\n\t}", "title": "" }, { "docid": "c3732c7add3588e62f947f85a3ed8be0", "score": "0.5276969", "text": "public function run():void{\n try{\n $this->tasks();\n $this->log(true);\n }catch(\\Throwable $e){\n $this->logMsg = \"Job Failed: \" . $e->getMessage();\n $this->log(false);\n }\n }", "title": "" }, { "docid": "b5b5b616742c7d60b1b499f38f1a07e1", "score": "0.527467", "text": "public function testpmentitycreatelogssuccessmessage() {\n global $DB;\n\n $record = new stdClass;\n $record->context = 'curriculum';\n $record->idnumber = 'testprogramidnumber';\n $record->name = 'testprogramname';\n\n $importplugin = rlip_dataplugin_factory::factory('rlipimport_version1elis');\n $importplugin->dblogger = new rlip_dblogger_import(false);\n $importplugin->fslogger = new silent_fslogger(null);\n $importplugin->curriculum_create($record, 'bogus');\n $importplugin->dblogger->flush('bogus');\n\n $expectedmessage = 'All lines from import file bogus were successfully processed.';\n $where = 'statusmessage = ?';\n $exists = $DB->record_exists_select(RLIP_LOG_TABLE, $where, array($expectedmessage));\n $this->assertTrue($exists);\n }", "title": "" }, { "docid": "94b1226cb8b5c1a38da09789bdb11eb8", "score": "0.5266959", "text": "function cron($cronInfo){\n\t\tini_set('memory_limit', '4g');\n\n\t\t$originalPid = $_GET['pid'] ?? null;\n\n\t\t$cronName = $cronInfo['cron_name'];\n\n\t\tforeach($this->framework->getProjectsWithModuleEnabled() as $localProjectId){\n\t\t\t// This automatically associates all log statements with this project.\n\t\t\t$_GET['pid'] = $localProjectId;\n\n\t\t\t$this->settingPrefix = substr($cronName, 0, -1); // remove the 's'\n\n\t\t\tif($cronName === 'exports'){\n\t\t\t\t$this->handleExports();\n\t\t\t}\n\t\t\telse if($cronName === 'imports'){\n\t\t\t\t$this->handleImports();\n\t\t\t}\n\t\t\telse{\n\t\t\t\tthrow new Exception(\"Unsupported cron name: $cronName\");\n\t\t\t}\n\t\t}\n\n\t\t// Put the pid back the way it was before this cron job (likely doesn't matter, but wanted to be safe)\n\t\t$_GET['pid'] = $originalPid;\n\n\t\treturn \"The \\\"{$cronInfo['cron_description']}\\\" cron job completed successfully.\";\n\t}", "title": "" }, { "docid": "49cea8c40117310c2a10e276409b4837", "score": "0.52647126", "text": "protected function getLastCronExecTime()\n\t{\n\t\t$result = $this->language->get('alert_cron_not_run_yet');\n\n\t\t$query = $this->db->query('SELECT `start_time` FROM `' . DB_PREFIX . $this->module_name . '_cronlog` ORDER BY `log_entry_id` DESC LIMIT 1');\n\n\t\tif ($query->num_rows == 1) {\n\t\t\t$data = array_pop($query->rows);\n\t\t\t$result = $data['start_time'];\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "9e0c7fdaec9753c4b17fd43e0f32b7ce", "score": "0.5246136", "text": "function process_cron() {\n $this->process_clean();\n $this->process_prepare();\n $this->process_control('cron');\n $this->process_run();\n }", "title": "" }, { "docid": "9c860827c25b1f4de14eaf36bb7ad0ab", "score": "0.5245846", "text": "public function cron() {\n $this->check_quizzes_and_notify_subscribers();\n }", "title": "" }, { "docid": "6641c48dd3d2b934181a2c29106761fa", "score": "0.5230949", "text": "protected function executeEpilog()\n {\n\n }", "title": "" }, { "docid": "35ac71b24a7b29f3e01d861e005a4dce", "score": "0.51994014", "text": "public function testpmentityupdatelogssuccessmessage() {\n global $CFG, $DB;\n require_once($CFG->dirroot.'/elis/program/lib/data/user.class.php');\n\n $program = new curriculum(array(\n 'idnumber' => 'testprogramidnumber',\n 'name' => 'testprogramname'\n ));\n $program->save();\n\n $record = new stdClass;\n $record->context = 'curriculum';\n $record->idnumber = 'testprogramidnumber';\n $record->name = 'updatedtestprogramname';\n\n $importplugin = rlip_dataplugin_factory::factory('rlipimport_version1elis');\n $importplugin->dblogger = new rlip_dblogger_import(false);\n $importplugin->fslogger = new silent_fslogger(null);\n $importplugin->curriculum_update($record, 'bogus');\n $importplugin->dblogger->flush('bogus');\n\n $expectedmessage = 'All lines from import file bogus were successfully processed.';\n $where = 'statusmessage = ?';\n $exists = $DB->record_exists_select(RLIP_LOG_TABLE, $where, array($expectedmessage));\n $this->assertTrue($exists);\n }", "title": "" }, { "docid": "10eb77506de4fb1b180899d235bbfb8c", "score": "0.51958495", "text": "function sendExecutionCheck($theSsh, $theSftp, $strRemoteServerHomeDir, \n\t$localDirName, $theJobId, $theMaxRunTime, $theExecCheck) {\n\n\t// Write file for checking whether simulation exceeds allowable runtime.\n\t// If file exists, overwrite existing contents.\n\t// If not, create new file and store the contents.\n\t$fp = @fopen($localDirName . $theJobId . \"_check\", \"w+\");\n\tif ($fp === false) {\n\t\t// Cannot open file for saving.\n\t\treturn \"***ERROR***\" . \" Cannot save file: \" . $localDirName . $theJobId . \"_check\";\n\t}\n\tfwrite($fp, \"if [ ! -e \" . $theJobId . \"_done ]; then \" . \"\\n\");\n\tfwrite($fp, \"if (( `date +%s` - `cat \" . $theJobId . \"_start` > $theMaxRunTime )); then\" . \"\\n\");\n\tif ($theMaxRunTime > 0) {\n\t\tfwrite($fp, \"if [ ! -e post_process.txt ]; then \" .\n\t\t\t\"echo -e \\\"Max runtime exceeded. Job cancelled at `date +'%m/%d/%Y %H:%M:%S'`\\\\n\\\" >> \" .\n\t\t\t\"post_process.txt; fi\" . \"\\n\");\n\t}\n\telse {\n\t\tfwrite($fp, \"if [ ! -e post_process.txt ]; then \" .\n\t\t\t\"echo -e \\\"Job cancelled at `date +'%m/%d/%Y %H:%M:%S'`\\\\n\\\" >> \" .\n\t\t\t\"post_process.txt; fi\" . \"\\n\");\n\t}\n\tfwrite($fp, \"pkill -9 -f '\" . $theExecCheck . \"'\\n\");\n\tfwrite($fp, \"fi\" . \"\\n\");\n\tfwrite($fp, \"fi\" . \"\\n\");\n\tfclose($fp);\n\n\t// Send simulation check file to remote server.\n\tsftpPut($theSftp, \n\t\t$strRemoteServerHomeDir . \"/\" . $theJobId . \"_check\", \n\t\t$localDirName . $theJobId . \"_check\");\n\n\t// Clean up simulation check file from local server.\n\tunlink($localDirName . $theJobId . \"_check\");\n\n\t$strResChmod = sshExec($theSsh, 'chmod a+x ' . $theJobId . '_check');\n\t$strResMv = sshExec($theSsh, 'mv ' . $theJobId . '_check' . ' ./' . $theJobId);\n\n\treturn null;\n}", "title": "" }, { "docid": "1968cd8377b0516058f81c2dc73956e9", "score": "0.51871395", "text": "function getLastCronExecution() {\n\t\tif (!file_exists(\"data/cron/tasks_time\")) return 0;\n\t\t$info = stat(\"data/cron/tasks_time\");\n\t\treturn $info[\"mtime\"];\n\t}", "title": "" }, { "docid": "1135a0964b89715a17b510a2a82f8b49", "score": "0.51796895", "text": "public function cron_action() {\n\n\t\t$optimizer = $this->get_optimizer();\n\t\t$options = $this->get_options();\n\n\t\t$this->log('WPO: Starting cron_action()');\n\n\t\tif ('true' == $options->get_option('schedule')) {\n\t\t\t$this_options = $options->get_option('auto');\n\n\t\t\t$optimizations = $optimizer->get_optimizations();\n\n\t\t\t// Currently the output of the optimizations is not saved/used/logged.\n\t\t\t$results = $optimizer->do_optimizations($this_options, 'auto');\n\t\t}\n\n\t}", "title": "" }, { "docid": "655aabbcc3c24d7e4413f682e795e17b", "score": "0.5176035", "text": "function cron() {\n $now = time();\n\n // Add a small negative buffer (1% of the entire period) to the time to account for slight difference in cron run length.\n $wait_time = $this->period - ($this->period * \\Drupal::config('backup_migrate.settings')->get('schedule.buffer'));\n\n if ($this->is_enabled() && ($now - $this->get('last_run')) >= $wait_time) {\n if ($settings = $this->get_profile()) {\n $settings->destination_id = $this->destination_id;\n $settings->source_id = $this->source_id;\n backup_migrate_perform_backup($settings);\n $this->update_last_run($now);\n $this->remove_expired_backups();\n }\n else {\n backup_migrate_backup_fail(\"Schedule '%schedule' could not be run because requires a profile which is missing.\", array('%schedule' => $schedule->get_name()), $settings);\n }\n }\n }", "title": "" }, { "docid": "f11d0664912632766385854ae0e72223", "score": "0.51752514", "text": "public function test_schedule_job()\r\n\t{\r\n\t\t$vars[\"task_init_datetime\"] = $this->set_process_init();\r\n\r\n\t\t\r\n\t\t//update the last access date in the job\r\n\t\t$this->update_schedule_job_record();\r\n\t}", "title": "" }, { "docid": "22da18d9e612be7e0ff9beb4c4b53d12", "score": "0.5170692", "text": "function logit($meta, $level, $msg){\n\t$ptime_frmt = 'Y-m-d H:i:s';\n\t$ptime = date($ptime_frmt);\n\tshell_exec('echo \"['.$ptime.']; '.$level.'; '.$msg.'\" >> /tmp/snow-handler.log');\n\t//return TRUE;\n\t\n}", "title": "" }, { "docid": "7da6b42232a89f23de3a859cdfd4f549", "score": "0.5170614", "text": "public function checkEventCron() {\n $cron_jobs = get_option('cron');\n \n $check_event_dates = false;\n foreach ((array) $cron_jobs as $cron_job) {\n if (array_key_exists(\"check_event_dates\", (array) $cron_job)){\n $check_event_dates = true;\n $this->addSuccess('\"check_event_dates\" cron job exist');\n\n break;\n }\n }\n\n if ($check_event_dates == false && getenv('CCS_FRONTEND_APP_ENV') == 'prod'){\n $OpGenieLogger = new OpGenieLogger();\n\n $OpGenieLogger->sendToOPGenie([ \n 'priority' => 'P2',\n 'message' => 'Website - Event Cron job disappear',\n 'description' => 'The check_event_dates cron job has disappear, please start the \"S24 Event Unpublisher\" plugin on Wordpress.',\n 'impactedServices' => [getenv('websiteProjectIDOnOPGenie')],\n 'tags' => [strtoupper(getenv('CCS_FRONTEND_APP_ENV'))]\n ]);\n }\n }", "title": "" }, { "docid": "6c7a5f18e789cb31c0e5c5d91d736e28", "score": "0.51513267", "text": "public function testBatchExec()\n {\n self::assertTrue(true);\n }", "title": "" }, { "docid": "8f367fd5889f0d0cc923cdcd50eeaf88", "score": "0.5132479", "text": "protected function _run()\n\t{\n\t\tif ($this->getState() == 'postrun')\n\t\t{\n\t\t\tAEUtilLogger::WriteLog(_AE_LOG_DEBUG, __CLASS__ . \" :: Already finished\");\n\t\t\t$this->setStep('');\n\t\t\t$this->setSubstep('');\n\n\t\t\treturn;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->setState('running');\n\t\t}\n\n\t\t// Load the version defines\n\t\tAEPlatform::getInstance()->load_version_defines();\n\n\t\t$registry = AEFactory::getConfiguration();\n\n\t\t// Write log file's header\n\t\tAEUtilLogger::WriteLog(_AE_LOG_INFO, \"--------------------------------------------------------------------------------\");\n\t\tAEUtilLogger::WriteLog(_AE_LOG_INFO, \"Akeeba Backup \" . AKEEBA_VERSION . ' (' . AKEEBA_DATE . ')');\n\t\tAEUtilLogger::WriteLog(_AE_LOG_INFO, \"Got backup?\");\n\t\tAEUtilLogger::WriteLog(_AE_LOG_INFO, \"--------------------------------------------------------------------------------\");\n\t\t// PHP configuration variables are tried to be logged only for debug and info log levels\n\t\tif ($registry->get('akeeba.basic.log_level') >= _AE_LOG_INFO)\n\t\t{\n\t\t\tAEUtilLogger::WriteLog(_AE_LOG_INFO, \"--- System Information ---\");\n\t\t\tAEUtilLogger::WriteLog(_AE_LOG_INFO, \"PHP Version :\" . PHP_VERSION);\n\t\t\tAEUtilLogger::WriteLog(_AE_LOG_INFO, \"PHP OS :\" . PHP_OS);\n\t\t\tAEUtilLogger::WriteLog(_AE_LOG_INFO, \"PHP SAPI :\" . PHP_SAPI);\n\t\t\tif (function_exists('php_uname'))\n\t\t\t{\n\t\t\t\tAEUtilLogger::WriteLog(_AE_LOG_INFO, \"OS Version :\" . php_uname('s'));\n\t\t\t}\n\t\t\t$db = AEFactory::getDatabase();\n\t\t\tAEUtilLogger::WriteLog(_AE_LOG_INFO, \"DB Version :\" . $db->getVersion());\n\t\t\tif (isset($_SERVER['SERVER_SOFTWARE']))\n\t\t\t{\n\t\t\t\t$server = $_SERVER['SERVER_SOFTWARE'];\n\t\t\t}\n\t\t\telse if (($sf = getenv('SERVER_SOFTWARE')))\n\t\t\t{\n\t\t\t\t$server = $sf;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$server = 'n/a';\n\t\t\t}\n\t\t\tAEUtilLogger::WriteLog(_AE_LOG_INFO, \"Web Server :\" . $server);\n\t\t\t$platform = 'Unknown platform';\n\t\t\t$version = '(unknown version)';\n\t\t\t$platformData = AEPlatform::getInstance()->getPlatformVersion();\n\t\t\tAEUtilLogger::WriteLog(_AE_LOG_INFO, $platformData['name'] . \" version :\" . $platformData['version']);\n\t\t\tif (isset($_SERVER['HTTP_USER_AGENT']))\n\t\t\t{\n\t\t\t\tAEUtilLogger::WriteLog(_AE_LOG_INFO, \"User agent :\" . phpversion() <= \"4.2.1\" ? getenv(\"HTTP_USER_AGENT\") : $_SERVER['HTTP_USER_AGENT']);\n\t\t\t}\n\t\t\tAEUtilLogger::WriteLog(_AE_LOG_INFO, \"Safe mode :\" . ini_get(\"safe_mode\"));\n\t\t\tAEUtilLogger::WriteLog(_AE_LOG_INFO, \"Display errors :\" . ini_get(\"display_errors\"));\n\t\t\tAEUtilLogger::WriteLog(_AE_LOG_INFO, \"Error reporting :\" . self::error2string());\n\t\t\tAEUtilLogger::WriteLog(_AE_LOG_INFO, \"Error display :\" . self::errordisplay());\n\t\t\tAEUtilLogger::WriteLog(_AE_LOG_INFO, \"Disabled functions :\" . ini_get(\"disable_functions\"));\n\t\t\tAEUtilLogger::WriteLog(_AE_LOG_INFO, \"open_basedir restr.:\" . ini_get('open_basedir'));\n\t\t\tAEUtilLogger::WriteLog(_AE_LOG_INFO, \"Max. exec. time :\" . ini_get(\"max_execution_time\"));\n\t\t\tAEUtilLogger::WriteLog(_AE_LOG_INFO, \"Memory limit :\" . ini_get(\"memory_limit\"));\n\t\t\tif (function_exists(\"memory_get_usage\"))\n\t\t\t{\n\t\t\t\tAEUtilLogger::WriteLog(_AE_LOG_INFO, \"Current mem. usage :\" . memory_get_usage());\n\t\t\t}\n\t\t\tif (function_exists(\"gzcompress\"))\n\t\t\t{\n\t\t\t\tAEUtilLogger::WriteLog(_AE_LOG_INFO, \"GZIP Compression : available (good)\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tAEUtilLogger::WriteLog(_AE_LOG_INFO, \"GZIP Compression : n/a (no compression)\");\n\t\t\t}\n\t\t\tAEPlatform::getInstance()->log_platform_special_directories();\n\t\t\tAEUtilLogger::WriteLog(_AE_LOG_INFO, \"Output directory :\" . $registry->get('akeeba.basic.output_directory'));\n\t\t\tAEUtilLogger::WriteLog(_AE_LOG_INFO, \"--------------------------------------------------------------------------------\");\n\t\t}\n\n\t\t// Quirks reporting\n\t\t$quirks = AEUtilQuirks::get_quirks(true);\n\t\tif (!empty($quirks))\n\t\t{\n\t\t\tAEUtilLogger::WriteLog(_AE_LOG_INFO, \"Akeeba Backup has detected the following potential problems:\");\n\t\t\tforeach ($quirks as $q)\n\t\t\t{\n\t\t\t\tAEUtilLogger::WriteLog(_AE_LOG_INFO, '- ' . $q['code'] . ' ' . $q['description'] . ' (' . $q['severity'] . ')');\n\t\t\t}\n\t\t\tAEUtilLogger::WriteLog(_AE_LOG_INFO, \"You probably do not have to worry about them, but you should be aware of them.\");\n\t\t\tAEUtilLogger::WriteLog(_AE_LOG_INFO, \"--------------------------------------------------------------------------------\");\n\t\t}\n\n\t\tif (!version_compare(PHP_VERSION, '5.3.0', 'ge'))\n\t\t{\n\t\t\tAEUtilLogger::WriteLog(_AE_LOG_WARNING, \"You are using an outdated version of PHP. Akeeba Engine may not work properly. Please upgrade to PHP 5.3 or later.\");\n\t\t}\n\n\n\t\t// Report profile ID\n\t\t$profile_id = AEPlatform::getInstance()->get_active_profile();\n\t\tAEUtilLogger::WriteLog(_AE_LOG_INFO, \"Loaded profile #$profile_id\");\n\n\t\t// Get archive name\n\t\tAEUtilFilesystem::get_archive_name($relativeArchiveName, $absoluteArchiveName);\n\n\t\t// ==== Stats initialisation ===\n\t\t$origin = AEPlatform::getInstance()->get_backup_origin(); // Get backup origin\n\t\t$profile_id = AEPlatform::getInstance()->get_active_profile(); // Get active profile\n\n\t\t$registry = AEFactory::getConfiguration();\n\t\t$backupType = $registry->get('akeeba.basic.backup_type');\n\t\tAEUtilLogger::WriteLog(_AE_LOG_DEBUG, \"Backup type is now set to '\" . $backupType . \"'\");\n\n\t\t// Substitute \"variables\" in the archive name\n\t\t$description = AEUtilFilesystem::replace_archive_name_variables($this->description);\n\t\t$comment = AEUtilFilesystem::replace_archive_name_variables($this->comment);\n\n\t\tif ($registry->get('volatile.writer.store_on_server', true))\n\t\t{\n\t\t\t// Archive files are stored on our server\n\t\t\t$stat_relativeArchiveName = $relativeArchiveName;\n\t\t\t$stat_absoluteArchiveName = $absoluteArchiveName;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Archive files are not stored on our server (FTP backup, cloud backup, sent by email, etc)\n\t\t\t$stat_relativeArchiveName = '';\n\t\t\t$stat_absoluteArchiveName = '';\n\t\t}\n\n\t\t$kettenrad = AEFactory::getKettenrad();\n\t\t$temp = array(\n\t\t\t'description' => $description,\n\t\t\t'comment' => $comment,\n\t\t\t'backupstart' => AEPlatform::getInstance()->get_timestamp_database(),\n\t\t\t'status' => 'run',\n\t\t\t'origin' => $origin,\n\t\t\t'type' => $backupType,\n\t\t\t'profile_id' => $profile_id,\n\t\t\t'archivename' => $stat_relativeArchiveName,\n\t\t\t'absolute_path' => $stat_absoluteArchiveName,\n\t\t\t'multipart' => 0,\n\t\t\t'filesexist' => 1,\n\t\t\t'tag' => $kettenrad->getTag()\n\t\t);\n\t\t// Save the entry\n\t\t$statistics = AEFactory::getStatistics();\n\t\t$statistics->setStatistics($temp);\n\t\tif ($statistics->getError())\n\t\t{\n\t\t\t$this->setError($statistics->getError());\n\n\t\t\treturn;\n\t\t}\n\n\t\t$statistics->release_multipart_lock();\n\n\t\t// Initialize the archive.\n\t\tif (AEUtilScripting::getScriptingParameter('core.createarchive', true))\n\t\t{\n\t\t\tAEUtilLogger::WriteLog(_AE_LOG_DEBUG, \"Expanded archive file name: \" . $absoluteArchiveName);\n\n\t\t\tAEUtilLogger::WriteLog(_AE_LOG_DEBUG, \"Initializing archiver engine\");\n\t\t\t$archiver = AEFactory::getArchiverEngine();\n\t\t\t$archiver->initialize($absoluteArchiveName);\n\t\t\t$archiver->setComment($comment); // Add the comment to the archive itself.\n\t\t\t$archiver->propagateToObject($this);\n\t\t\tif ($this->getError())\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t$this->setState('postrun');\n\t}", "title": "" }, { "docid": "0d3b3701b9a9916a8409dbe3e9474aab", "score": "0.5118646", "text": "public static function _auditfiles_not_on_server_batch_finish_batch($success, $results, $operations) {\n if ($success) {\n // Do tasks\n }\n else {\n $error_operation = reset($operations);\n drupal_set_message(\n t('An error occurred while processing @operation with arguments : @args',\n [\n '@operation' => $error_operation[0],\n '@args' => print_r($error_operation[0], TRUE),\n ]\n ),\n 'error'\n );\n }\n }", "title": "" }, { "docid": "22256d87e91512c56108a7bb07b78abf", "score": "0.51122576", "text": "public function testExecute()\n {\n $exitCode = $this->tester->run(\n array(\n 'command' => SyncDbCommand::COMMAND_NAME\n ),\n array(\n 'verbosity' => OutputInterface::VERBOSITY_DEBUG\n )\n );\n\n $display = trim($this->tester->getDisplay());\n\n $this->assertEquals(0, $exitCode, $display);\n\n $this->assertRegExp(\n '/Finished in [0-9\\.]+ seconds!/',\n $display,\n 'Wrong output of sync:db command detected.'\n );\n }", "title": "" }, { "docid": "da796083c9d759e0e24ad0e0a8ee5ffa", "score": "0.5091383", "text": "public function fire()\n {\n\n CronHelper::before_cronrun($this->name, $this );\n\n\n $arguments = $this->argument();\n $getmypid = getmypid(); // get proccess id\n $CronJobID = $arguments[\"CronJobID\"];\n $CompanyID = $arguments[\"CompanyID\"];\n $CronJob = CronJob::find($CronJobID);\n $cronsetting = json_decode($CronJob->Settings,true);\n $dataactive['Active'] = 1;\n $dataactive['PID'] = $getmypid;\n $dataactive['LastRunTime'] = date('Y-m-d H:i:00');\n $CronJob->update($dataactive);\n\n $yesterday_date = date('Y-m-d 23:59:59', strtotime('-1 day'));\n $CompanyGatewayID = $cronsetting['CompanyGatewayID'];\n $companysetting = json_decode(CompanyGateway::getCompanyGatewayConfig($CompanyGatewayID));\n $ServiceID = (int)Service::getGatewayServiceID($CompanyGatewayID);\n $temptableName = CompanyGateway::CreateIfNotExistCDRTempUsageDetailTable($CompanyID,$CompanyGatewayID );\n $tempVendortable = CompanyGateway::CreateVendorTempTable($CompanyID,$CompanyGatewayID);\n $tempRetailtableName = CompanyGateway::getUsagedetailRetailTablename($temptableName );\n\n Log::useFiles(storage_path() . '/logs/pbxaccountusage-' . $CompanyGatewayID . '-' . date('Y-m-d') . '.log');\n\n /* To avoid runing same day cron job twice */\n //if(true){//if($yesterday_date > $param['start_date_ymd']) {\n $joblogdata = array();\n $joblogdata['CronJobID'] = $CronJobID;\n $joblogdata['created_at'] = date('Y-m-d H:i:s');\n $joblogdata['created_by'] = 'RMScheduler';\n $processID = CompanyGateway::getProcessID();\n\n $accounts = array();\n try {\n\n CronJob::createLog($CronJobID);\n if(isset($cronsetting['CDRImportStartDate']) && !empty($cronsetting['CDRImportStartDate'])){\n\n $result = UsageDetail::reImportCDRByStartDate($cronsetting,$CronJobID,$processID);\n $joblogdata['CronJobStatus'] = $result['CronJobStatus'];\n $joblogdata['Message'] = $result['Message'];\n goto end_of_cronjob;\n // break cron job after CDR Delete\n }\n\n $pbx = new PBX($CompanyGatewayID);\n $TimeZone = CompanyGateway::getGatewayTimeZone($CompanyGatewayID);\n if ($TimeZone != '') {\n date_default_timezone_set($TimeZone);\n } else {\n date_default_timezone_set('GMT'); // just to use e in date() function\n }\n $RateFormat = Company::PREFIX;\n $RateCDR = 0;\n\n if (isset($companysetting->RateCDR) && $companysetting->RateCDR) {\n $RateCDR = $companysetting->RateCDR;\n }\n if (isset($companysetting->RateFormat) && $companysetting->RateFormat) {\n $RateFormat = $companysetting->RateFormat;\n }\n $CLITranslationRule = $CLDTranslationRule = $PrefixTranslationRule = '';\n if (!empty($companysetting->CLITranslationRule)) {\n $CLITranslationRule = $companysetting->CLITranslationRule;\n }\n if (!empty($companysetting->CLDTranslationRule)) {\n $CLDTranslationRule = $companysetting->CLDTranslationRule;\n }\n if (!empty($companysetting->PrefixTranslationRule)) {\n $PrefixTranslationRule = $companysetting->PrefixTranslationRule;\n }\n TempUsageDetail::applyDiscountPlan(); // when NextBillingDate comes , remove old discount entry and add fresh discout value with usedSeconds = 0\n $param['start_date_ymd'] = $this->getStartDate($CompanyID, $CompanyGatewayID, $CronJobID);\n $param['end_date_ymd'] = $this->getLastDate($param['start_date_ymd'], $CompanyID, $CronJobID);\n $param['RateCDR'] = $RateCDR;\n\n Log::error(print_r($param, true));\n\n $RerateAccounts = !empty($companysetting->Accounts) ? count($companysetting->Accounts) : 0;\n\n /**\n * Not in use\n * $CdrBehindData = array();\n * //check CdrBehindDuration from cron job setting\n * if(!empty($cronsetting['ErrorEmail'])){\n * $CdrBehindData['startdatetime'] =$param['start_date_ymd'];\n * CronJob::CheckCdrBehindDuration($CronJob,$CdrBehindData);\n * }\n * //CdrBehindDuration\n * */\n\n\n $today_current = date('Y-m-d H:i:s');\n\n $response = $pbx->getAccountCDRs($param);\n $response = json_decode(json_encode($response), true);\n Log::info('count ==' . count($response));\n $InserData = array();\n $data_count = 0;\n $data_countv = 0;\n $insertLimit = 1000;\n if (!isset($response['faultCode'])) {\n\n foreach ((array)$response as $row_account) {\n\n $data = $data_outbound = $vendordata = array(); // for call type = both $data = inbound , $data_outbound = outbound entry only when rerating is on.\n if (!empty($row_account['accountcode'])) {\n\n\n /** User Field\n * if it contains inbound. Src will be the Calling Party Number and First Destination will be the DID number\n * if it contains outbound. Src will be the DID number from where outbound call is made and use last destination as the number dialed, if blank then use First Destination\n * */\n /**\n * <InboundOutbound>\n *\n * split into two rows Inbound = Src,FirstDst\n *\n * Outbound = FirstDst,LstDst\n */\n $call_type = TempUsageDetail::check_call_type(strtolower($row_account[\"userfield\"]), strtolower($row_account['cc_type']), strtolower($row_account['pincode']));\n\n //Log::info( 'userfield ' . $row_account[\"userfield\"] .' - call_type ' . $call_type . '- src ' . $row_account['src'] . ' - firstdst ' . $row_account['firstdst']. '- lastdst ' . $row_account['lastdst'] );\n\n //if (strtolower(trim($row_account['cc_type'])) == strtolower(PBX::$CcType[PBX::OUTNOCHARGE])) {\n\n if (strtolower(trim($row_account['cc_type'])) == strtolower(PBX::$CcType[PBX::OUTNOCHARGE])) {\n $data['cc_type'] = PBX::OUTNOCHARGE;\n } else {\n $data['cc_type'] = 0;\n }\n\n\n $data['CompanyGatewayID'] = $CompanyGatewayID;\n $data['CompanyID'] = $CompanyID;\n $data['GatewayAccountID'] = $row_account['accountcode'];\n $data['connect_time'] = date(\"Y-m-d H:i:s\", strtotime($row_account['start']));\n $data['disconnect_time'] = date(\"Y-m-d H:i:s\", strtotime($row_account['end']));\n $data['billed_second'] = $row_account['billsec'];\n $data['billed_duration'] = $row_account['billsec'];\n $data['duration'] = $row_account['duration'];\n\n $data['AccountIP'] = '';\n $data['AccountName'] = '';\n $data['AccountNumber'] = $row_account['accountcode'];\n //$data['AccountCLI'] = '';\n\n $data['trunk'] = 'Other';\n $data['area_prefix'] = 'Other';\n $data['pincode'] = $row_account['pincode'];\n $data['disposition'] = $row_account['disposition'];\n $data['userfield'] = $row_account['userfield'];\n $data['extension'] = $row_account['extension'];\n $data['ProcessID'] = $processID;\n $data['ServiceID'] = $ServiceID;\n $data['ID'] = $row_account['ID'];\n $data['is_inbound'] = 0;\n $data['cost'] = (float)$row_account['cc_cost'];\n $data['cli'] = $row_account['src'];\n $data['cld'] = !empty($row_account['lastdst']) ? $row_account['lastdst'] : $row_account['firstdst'];\n\n\n if ($call_type == 'inbound') {\n\n $data['cld'] = $row_account['firstdst'];\n $data['is_inbound'] = 1;\n\n\n } else if ($call_type == 'outbound') {\n\n $data['cld'] = !empty($row_account['lastdst']) ? $row_account['lastdst'] : $row_account['firstdst'];\n\n } else if ($call_type == 'none') {\n\n $data['cld'] = !empty($row_account['lastdst']) ? $row_account['lastdst'] : $row_account['firstdst'];\n //$data['is_inbound'] = 0;\n /** if user field is blank */\n } else if ($call_type == 'both') {\n\n $data['cld'] = !empty($row_account['lastdst']) ? $row_account['lastdst'] : $row_account['firstdst'];\n /** if user field is both */\n } else if ($call_type == 'failed') {\n //Log::info($row_account[\"userfield\"]);\n //Log::info($row_account[\"ID\"]);\n /** if user field is failed or blocked call any reason make duration zero */\n $data['billed_duration'] = 0;\n $data['billed_second'] = 0;\n }\n\n\n if ($call_type == 'both' && $RateCDR == 1) {\n\n /**\n * IF rerating is on\n *\n */\n\n /**\n * Inbound Entry\n */\n\n $data['cld'] = $row_account['firstdst'];\n $data['cost'] = 0;\n $data['is_inbound'] = 1;\n $data['userfield'] = str_replace('outbound', '', $row_account['userfield']);\n\n /**\n * Outbound Entry\n */\n $data_outbound = $data;\n\n $data_outbound['cli'] = $row_account['firstdst'];\n $data_outbound['cld'] = !empty($row_account['lastdst']) ? $row_account['lastdst'] : $row_account['firstdst'];\n $data_outbound['cost'] = (float)$row_account['cc_cost'];\n $data_outbound['is_inbound'] = 0;\n $data_outbound['userfield'] = str_replace('inbound', '', $row_account['userfield']);\n\n }\n\n /**\n * remove prefix from cli cld , given in gateway option\n */\n\n $data['cli'] = apply_translation_rule($CLITranslationRule, $data['cli']);\n $data['cld'] = apply_translation_rule($CLDTranslationRule, $data['cld']);\n\n //for CLI Authentication\n $data['AccountCLI'] = $data['cli'];\n\n $InserData[] = $data;\n $data_count++;\n\n if ($call_type == 'both' && $RateCDR == 1 && !empty($data_outbound)) {\n\n $data_outbound['cli'] = apply_translation_rule($CLITranslationRule, $data_outbound['cli']);\n $data_outbound['cld'] = apply_translation_rule($CLDTranslationRule, $data_outbound['cld']);\n //for CLI Authentication\n $data_outbound['AccountCLI'] = $data_outbound['cli'];\n\n $InserData[] = $data_outbound;\n $data_count++;\n\n }\n\n if ($data_count > $insertLimit && !empty($InserData)) {\n DB::connection('sqlsrvcdr')->table($temptableName)->insert($InserData);\n $InserData = array();\n $data_count = 0;\n }\n /** Vendor CDR Start */\n if(!empty($row_account['cc_peername'])){\n $vendordata['CompanyID'] = $CompanyID;\n $vendordata['CompanyGatewayID'] = $CompanyGatewayID;\n $vendordata['GatewayAccountID'] = $row_account['cc_peername'];\n $vendordata['connect_time'] = date(\"Y-m-d H:i:s\", strtotime($row_account['start']));\n $vendordata['disconnect_time'] = date(\"Y-m-d H:i:s\", strtotime($row_account['end']));\n $vendordata['buying_cost'] = (float)$row_account['cc_buy'];\n $vendordata['selling_cost']= (float)$row_account['cc_cost'];\n $vendordata['cli'] = $row_account['src'];\n $vendordata['cld'] = !empty($row_account['lastdst']) ? $row_account['lastdst'] : $row_account['firstdst'];\n $vendordata['billed_second'] = $row_account['billsec'];\n $vendordata['billed_duration'] = $row_account['billsec'];\n $vendordata['duration'] = $row_account['duration'];\n $vendordata['trunk'] = 'Other';\n $vendordata['area_prefix'] = 'Other';\n $vendordata['ProcessID'] = $processID;\n $vendordata['ServiceID'] = $ServiceID;\n $vendordata['ID'] = $row_account['ID'];\n $vendordata['AccountIP'] = '';\n $vendordata['AccountName'] = '';\n $vendordata['AccountNumber'] = $row_account['cc_peername'];\n $vendordata['cli'] = apply_translation_rule($CLITranslationRule, $vendordata['cli']);\n $vendordata['cld'] = apply_translation_rule($CLDTranslationRule, $vendordata['cld']);\n $vendordata['AccountCLI'] = $vendordata['cli'];\n $InserVData[] = $vendordata;\n $data_countv++;\n if ($data_countv > $insertLimit && !empty($InserVData)) {\n DB::connection('sqlsrvcdr')->table($tempVendortable)->insert($InserVData);\n $InserVData = array();\n $data_countv = 0;\n }\n }\n /** Vendor CDR End */\n }\n\n }//loop\n\n if (!empty($InserData)) {\n DB::connection('sqlsrvcdr')->table($temptableName)->insert($InserData);\n\n }\n if (!empty($InserVData)) {\n DB::connection('sqlsrvcdr')->table($tempVendortable)->insert($InserVData);\n\n }\n date_default_timezone_set(Config::get('app.timezone'));\n }\n\n\n $joblogdata['Message'] = \"CDR StartTime \" . $param['start_date_ymd'] . \" - End Time \" . $param['end_date_ymd'];\n $joblogdata['CronJobStatus'] = CronJob::CRON_SUCCESS;\n Log::error(\"pbx CDR StartTime \" . $param['start_date_ymd'] . \" - End Time \" . $param['end_date_ymd']);\n Log::error(' ========================== pbx transaction end =============================');\n\n /** delete duplicate id*/\n /** Check in tblUsageDetails and tblUsageDetailFailedCall table and remove existing from temp table */\n Log::info(\"CALL prc_DeleteDuplicateUniqueID ('\" . $CompanyID . \"','\" . $CompanyGatewayID . \"' , '\" . $processID . \"', '\" . $temptableName . \"' ) start\");\n DB::connection('sqlsrvcdr')->statement(\"CALL prc_DeleteDuplicateUniqueID ('\" . $CompanyID . \"','\" . $CompanyGatewayID . \"' , '\" . $processID . \"', '\" . $temptableName . \"' )\");\n Log::info(\"CALL prc_DeleteDuplicateUniqueID ('\" . $CompanyID . \"','\" . $CompanyGatewayID . \"' , '\" . $processID . \"', '\" . $temptableName . \"' ) end\");\n\n\n /** delete duplicate id*/\n Log::info(\"CALL prc_DeleteDuplicateUniqueID2 ('\" . $CompanyID . \"','\" . $CompanyGatewayID . \"' , '\" . $processID . \"', '\" . $tempVendortable . \"' ) start\");\n DB::connection('sqlsrvcdr')->statement(\"CALL prc_DeleteDuplicateUniqueID2 ('\" . $CompanyID . \"','\" . $CompanyGatewayID . \"' , '\" . $processID . \"', '\" . $tempVendortable . \"' )\");\n Log::info(\"CALL prc_DeleteDuplicateUniqueID2 ('\" . $CompanyID . \"','\" . $CompanyGatewayID . \"' , '\" . $processID . \"', '\" . $tempVendortable . \"' ) end\");\n\n /**\n * insert into $tempRetailtableName\n */\n\n $sql = \"INSERT INTO \" . $tempRetailtableName . \" (TempUsageDetailID,ID,cc_type,ProcessID) SELECT TempUsageDetailID,ID,cc_type,ProcessID FROM \" . $temptableName . \" WHERE ProcessID = '\" . $processID . \"'\";\n Log::info($sql);\n DB::connection('sqlsrvcdr')->statement($sql);\n\n //ProcessCDR\n /** pbx ProcessCDR New Tasks\n * 1. update cost = 0 where cc_type = 4 (OUTNOCHARGE)\n */\n Log::info(\"ProcessCDR($CompanyID,$processID,$CompanyGatewayID,$RateCDR,$RateFormat)\");\n TempVendorCDR::ProcessCDR($CompanyID, $processID, $CompanyGatewayID, $RateCDR, $RateFormat, $tempVendortable, '', 'CurrentRate', 0, $RerateAccounts);\n $skiped_account_data = TempUsageDetail::ProcessCDR($CompanyID, $processID, $CompanyGatewayID, $RateCDR, $RateFormat, $temptableName, '', 'CurrentRate', 0, 0, 0, $RerateAccounts);\n if (count($skiped_account_data)) {\n $joblogdata['Message'] .= implode('<br>', $skiped_account_data);\n }\n\n DB::connection('sqlsrvcdr')->beginTransaction();\n DB::connection('sqlsrv2')->beginTransaction();\n\n //\n Log::error(\"PBX CALL prc_ProcessDiscountPlan ('\" . $processID . \"', '\" . $temptableName . \"' ) start\");\n DB::statement(\"CALL prc_ProcessDiscountPlan ('\" . $processID . \"', '\" . $temptableName . \"' )\");\n Log::error(\"PBX CALL prc_ProcessDiscountPlan ('\" . $processID . \"', '\" . $temptableName . \"' ) end\");\n\n /** pbx prc_insertCDR New Tasks\n * 1. Move disposition <> \"ANSWERED\" to failed call\n */\n Log::error('pbx prc_insertCDR start');\n DB::connection('sqlsrvcdr')->statement(\"CALL prc_insertCDR ('\" . $processID . \"', '\" . $temptableName . \"' )\");\n DB::connection('sqlsrvcdr')->statement(\"CALL prc_insertVendorCDR ('\" . $processID . \"', '\" . $tempVendortable . \"')\");\n\n Log::error('pbx prc_insertCDR end');\n $logdata['CompanyGatewayID'] = $CompanyGatewayID;\n $logdata['CompanyID'] = $CompanyID;\n $logdata['start_time'] = $param['start_date_ymd'];\n $logdata['end_time'] = $param['end_date_ymd'];\n $logdata['created_at'] = date('Y-m-d H:i:s');\n $logdata['ProcessID'] = $processID;\n TempUsageDownloadLog::insert($logdata);\n DB::connection('sqlsrvcdr')->commit();\n DB::connection('sqlsrv2')->commit();\n\n TempUsageDetail::GenerateLogAndSend($CompanyID, $CompanyGatewayID, $cronsetting, $skiped_account_data, $CronJob->JobTitle);\n\n end_of_cronjob:\n\n CronJobLog::insert($joblogdata);\n\n } catch (\\Exception $e) {\n try {\n DB::rollback();\n DB::connection('sqlsrv2')->rollback();\n DB::connection('sqlsrvcdr')->rollback();\n } catch (\\Exception $err) {\n Log::error($err);\n }\n\n date_default_timezone_set(Config::get('app.timezone'));\n $this->info('Failed:' . $e->getMessage());\n $joblogdata['Message'] = 'Error:' . $e->getMessage();\n $joblogdata['CronJobStatus'] = CronJob::CRON_FAIL;\n CronJobLog::insert($joblogdata);\n Log::error($e);\n if(!empty($cronsetting['ErrorEmail'])) {\n $result = CronJob::CronJobErrorEmailSend($CronJobID,$e);\n Log::error(\"**Email Sent Status \" . $result['status']);\n Log::error(\"**Email Sent message \" . $result['message']);\n }\n }\n //}\n\n CronJob::deactivateCronJob($CronJob);\n if(!empty($cronsetting['SuccessEmail'])) {\n $result = CronJob::CronJobSuccessEmailSend($CronJobID);\n Log::error(\"**Email Sent Status \".$result['status']);\n Log::error(\"**Email Sent message \".$result['message']);\n }\n\n CronHelper::after_cronrun($this->name, $this);\n\n }", "title": "" }, { "docid": "d58c8fec1d21dfeaf1f2521ed512ab94", "score": "0.5087695", "text": "public function run()\n {\n foreach ($this->_actions as $key => $action)\n {\n $class = $this->getLoader()->load($action);\n if ((bool)$this->_actionsArgs[$key])\n {\n $action = new $class;\n if (!($action instanceof Cible_Plugins_Cron_CronInterface))\n {\n throw new Cible_Service_Exception('One of the specified actions is not the right kind of class.',0,null);\n }\n try\n {\n $action->run();\n }\n catch (Cible_Plugin_Cron_Exception $e)\n {\n $this->addError($e->getMessage());\n }\n catch (Exception $e)\n {\n if (APPLICATION_ENV == 'development')\n {\n $this->addError('[DEV]: ' . $e->getMessage());\n }\n else\n {\n $this->addError('An undefined error occurred.');\n }\n }\n }\n }\n $errors = $this->getErrors();\n if (count($errors) > 0)\n {\n $output = '&lt;html&gt;&lt;head&gt;&lt;title&gt;Cron errors&lt;/title&gt;&lt;/head&gt;&lt;body&gt;';\n $output .= '&lt;h1&gt;Cron errors&lt;/h1&gt;';\n $output .= '&lt;ul&gt;';\n foreach ($errors as $error)\n {\n $output .= '&lt;li&gt;' . $error . '&lt;/li&gt;';\n }\n $output .= '&lt;/ul&gt;';\n $output .= '&lt;/body&gt;&lt;/html&gt;';\n }\n else\n {\n $output = null;\n }\n return $output;\n }", "title": "" }, { "docid": "e57bd8c8e6a03f34672447753b0f747c", "score": "0.5076181", "text": "public function cron() {\r\n $trace = new text_progress_trace();\r\n $this->process_expirations($trace);\r\n }", "title": "" }, { "docid": "82761efbcab0e41f6edc229637276d7a", "score": "0.5069708", "text": "function existCronFile()\n {\n $this->errMsg = '';\n $sComando = '/usr/bin/elastix-helper vacationconfig exist_cron';\n $output = $ret = NULL;\n exec($sComando, $output, $ret);\n if ($ret != 0) {\n $this->errMsg = implode('', $output);\n return FALSE;\n }\n return TRUE;\n }", "title": "" }, { "docid": "0d4ffc3ec46bdd469c9cd04a4bc5ee49", "score": "0.5067973", "text": "public function testlogginglogsfailuremessage() {\n global $DB;\n set_config('createorupdate', 0, 'rlipimport_version1elis');\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' => '[email protected]',\n 'city' => 'rlipcity',\n 'country' => 'CA'\n );\n $result = $this->run_user_import($data);\n\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(true, $exists);\n }", "title": "" }, { "docid": "b023afa60d3895cc421d440bc6052f92", "score": "0.50559264", "text": "function do_maintenance_delete_snapshot($delete_snapshot_time, $repository)\n{\n $ci =& get_instance();\n $backend_dir = $ci->config->item('backend_dir');\n\n $cmd = $ci->config->item('scripts_dir') . \"/curator.sh delete snapshots --older-than \" . $delete_snapshot_time . ' --time-unit days --timestring %Y%m%d --repository \"' . $repository . '\"';\n exec($cmd , $output, $return_var);\n file_put_contents($backend_dir.\"/var/jobs.log\", $output, FILE_APPEND);\n \n $msg = _('Deleting snapshots more than ') . $delete_snapshot_time . _(' day(s) old from ' . $repository);\n $log = array('type' => 'MAINTENANCE',\n 'message' => $msg\n );\n $logged = $ci->logger->log($log);\n \n return $msg;\n}", "title": "" }, { "docid": "e6ebf004aa61df7ed51071bed65364b0", "score": "0.5049601", "text": "abstract public function failureLogMessage();", "title": "" }, { "docid": "f834c240bda30ee9b583b625ccd34307", "score": "0.50364", "text": "public function testSimpleExecWithLogging()\n {\n $expectedEchoes = implode(PHP_EOL, $this->expected) . PHP_EOL;\n\n // Capture the echo output to a variable\n ob_start();\n Processor::exec(1, 15, true);\n $output = ob_get_contents();\n ob_end_clean();\n\n $this->assertEquals($expectedEchoes, $output);\n }", "title": "" }, { "docid": "bca680df8adc50d64ec6c3072d64b40b", "score": "0.5034307", "text": "function exec_single_log($cmd, $cwd = NULL, $env = NULL)\r\n{\r\n\t$descriptor_spec = array(\r\n\t\t1 => array(\"pipe\", \"w\"), // stdout\r\n\t);\r\n\r\n\t$cmd .= ' 2>&1';\r\n\r\n\t$process = proc_open($cmd, $descriptor_spec, $pipes, $cwd, $env);\r\n\r\n\tif (is_resource($process)) {\r\n\t\t// $pipes now looks like this:\r\n\t\t// 0 => writeable handle connected to child stdin\r\n\t\t// 1 => readable handle connected to child stdout\r\n\t\t// Any error output will be appended to /tmp/error-output.txt\r\n\t\t$log = stream_get_contents($pipes[1]);\r\n\t\tfclose($pipes[1]);\r\n\t\t$return_value = proc_close($process);\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n\r\n\t$ret = array(\r\n\t\t'return_value' => $return_value,\r\n\t\t'log' => $log\r\n\t);\r\n\treturn $ret;\r\n}", "title": "" }, { "docid": "2b1b498f51656e1fd7f788e3babd3814", "score": "0.50321215", "text": "public function failed()\n {\n // Called when the job is failing...\n Log::error('# SaveRedisResponseGetQrcodeData Job fail #' \n . ', base_id = ' . $this->base_id\n . print_r($this->redis_response_get_qrcode, true) \n . ', FILE = ' .__FILE__ . 'LINE:' . __LINE__\n );\n }", "title": "" }, { "docid": "9c45fd26c5a1d9ef37c8a217ba3e6184", "score": "0.5028266", "text": "protected function schedule(Schedule $schedule)\n {\n\t\t\n\t\t$schedule->command('check:notification')\n ->everyMinute()\n\t\t\t\t ->sendOutputTo(public_path().'/tasks/log22.txt');\t\n\t\t\t \n\t\t\n // $schedule->command('inspire')\n // ->hourly();\n\t\t\n\t\t\n\t\t/*\n\t\t$schedule->call('App\\Http\\Controllers\\frontend\\Cronjob_forCustomerController@testkomuna')\n\t\t\t\t->everyMinute()\n\t\t\t\t->sendOutputTo(public_path().'/tasks/log.txt');\t\n\t\t\n\t\t*/\n\t\t\n\t\t\n\t $schedule->call('App\\Http\\Controllers\\frontend\\Cronjob_forCustomerController@testkomuna')\n\t\t\t\t->everyMinute()\n\t\t\t\t->sendOutputTo(public_path().'/tasks/testkomuna.txt');\t\n\t\t\n\t\n\t\t$route1 = $this->checkifproductreview_is_available();\n\t\t$schedule->exec('curl '.$route1)->everyMinute()\n ->sendOutputTo(public_path().'/tasks/checkifproductreview_is_available.txt'); \n\t\t\n\t\t$route2 = $this->checkifcampign_isready_tocontinue();\n\t\t$schedule->exec('curl '.$route2)->everyMinute()\n ->sendOutputTo(public_path().'/tasks/checkifcampign_isready_tocontinue.txt'); \n\t\t\n\t\t \n\t\t$route3 = $this->checkifoffer_isreadyfortommorow();\n\t\t$schedule->exec('curl '.$route3)->everyMinute()\n ->sendOutputTo(public_path().'/tasks/checkifoffer_isreadyfortommorow.txt'); \n\t\t\n\t\t$route4 = $this->checkifoffer_ismissedtoactive();\n\t\t$schedule->exec('curl '.$route4)->everyMinute()\n ->sendOutputTo(public_path().'/tasks/checkifoffer_ismissedtoactive.txt');\n\t\t\n\t\t$route5 = $this->checkif_productisdelivered();\n\t\t$schedule->exec('curl '.$route5)->everyMinute()\n ->sendOutputTo(public_path().'/tasks/checkif_productisdelivered.txt');\n\t\t\n\t\t$route6 = $this->checkif_productreturn_isdelivered();\n\t\t$schedule->exec('curl '.$route6)->everyMinute()\n ->sendOutputTo(public_path().'/tasks/checkif_productreturn_isdelivered.txt'); \n\t\t\n\t\t\n\t\t$backend1 = $this->active_campaign();\n\t\t$schedule->exec('curl '.$backend1)->everyMinute()\n ->sendOutputTo(public_path().'/tasks/backend/active_campaign.txt');\n\t\t\t\n }", "title": "" }, { "docid": "5180d7315e6f88536b705cd7436844d0", "score": "0.5017265", "text": "public function getNotifyCronStatus()\n {\n $status = $this->getGeneralConfig('Sendin_Notify_Cron_Executed', Mage::app()->getStore()->getStoreId());\n if (!$status) {\n return false;\n }\n return $status;\n }", "title": "" }, { "docid": "b6306bb0f34e39e97a90a96292493d76", "score": "0.5003826", "text": "function openLogFile()\n{\n global $configurationArray;\n global $httpRunState;\n $logName = substr($configurationArray[2], 0 , -2); //remove the NL CR chars at the end of the line\n //create the file if it's not there.\n if(!file_exists($logName))\n {\n file_put_contents($logName, \"\");\n }\n //Start a string in case the log has been cleared\n if(!file_get_contents($logName))\n {\n $logContents = \"\";\n }\n else\n {\n //grab the log data that's there\n $logContents = file_get_contents($logName);\n }\n $logContents.= PHP_EOL.\"----------------------------------------------------------------------------------------------\".PHP_EOL;\n $logContents.= \"Log Entry Started for App Version 0.3.b\".PHP_EOL;\n if($httpRunState)\n {\n $logContents.=\"Process was started from HTTP Request\".PHP_EOL;\n }\n else\n {\n $logContents.=\"Process was started from CLI\".PHP_EOL;\n }\n $dateTime = \"Current time and date is: \".date(\"Y-m-d H:i:s\");\n appendEmailString(\"Process run on \".date(\"m-d-Y\").\"<br>\");\n $logContents.= $dateTime.PHP_EOL;\n echo $dateTime.EOL();\n file_put_contents($logName, $logContents);\n}", "title": "" }, { "docid": "dd049259a4fc9e366f80690be382a65f", "score": "0.499255", "text": "public function execute()\n {\n $this->_logHelper->cleanLog();\n }", "title": "" }, { "docid": "80430e84775f918f010c68e279b5e80a", "score": "0.49818042", "text": "function system_run_cron_submit($form, &$form_state) {\n // Run cron manually from Cron form.\n if (drupal_cron_run()) {\n drupal_set_message(t('Cron run successfully.'));\n }\n else {\n drupal_set_message(t('Cron run failed.'), 'error');\n }\n\n drupal_goto('admin/config/system/cron');\n}", "title": "" }, { "docid": "cdea8f32dc3b6c86d1d27c5e68782a3f", "score": "0.49807444", "text": "public function rafco_test_cron() {\n\n\t\t// bail if the API key or URL have not been entered\n\t\tif(\tfalse === $api = RAFCOCreator_Helper::get_rafco_api_data() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// make the API call\n\t\t$build = RAFCOCreator_Helper::run_rafco_api_call( 'db-stats', array(), false );\n\n\t\t// handle the check and set it\n\t\t$check = ! empty( $build ) && false !== $build['success'] ? 'connect' : 'noconnect';\n\n\t\t// set the option return\n\t\tif ( false !== get_option( 'rafco_api_test' ) ) {\n\t\t\tupdate_option( 'rafco_api_test', $check );\n\t\t} else {\n\t\t\tadd_option( 'rafco_api_test', $check, null, 'no' );\n\t\t}\n\t}", "title": "" }, { "docid": "93101f4685a3a968ab6114c942cb5cdb", "score": "0.49802312", "text": "function error($log){ $this->put_log($log,4); }", "title": "" }, { "docid": "2face4275e598dde862543c026feada0", "score": "0.49763867", "text": "function getLastCronMaintenanceExecution() {\n\t\tif (!file_exists(\"data/cron/maintenance_tasks_time\")) return 0;\n\t\t$info = stat(\"data/cron/maintenance_tasks_time\");\n\t\treturn $info[\"mtime\"];\n\t}", "title": "" }, { "docid": "646130248baf24d30c2fd9e4191c5140", "score": "0.49653256", "text": "public function do_plugin_cron_tasks() {\n\t\t// add tasks here.\n\t}", "title": "" }, { "docid": "3bae3acea7a3c63772b704f621df416d", "score": "0.49595883", "text": "function endLogging()\r\n{\r\n\tglobal $gszScriptName;\r\n\tglobal $gszRootLogDir;\r\n\tglobal $gTimeStart, $gTimeEnd;\r\n\r\n\tglobal $argc, $argv;\r\n\r\n\t$szLogDir = $gszRootLogDir;\r\n\r\n\t$szScriptName = $gszScriptName;\r\n\n\tif($szScriptName == \"\")\n\t{\n\t\treturn;\n\t}\n\r\n\t$szScriptName = str_replace(\".php\", \".log.csv\", $szScriptName);\r\n\r\n\t$szFPLogFN = sprintf(\"%s/%s\", $szLogDir, $szScriptName);\r\n\r\n\t$gTimeEnd = microtime_float();\r\n\r\n\t$szSessionID = session_id();\r\n\r\n\t$arOutput = array();\r\n\t$szOutput = sprintf(\"***, [%s], Exec time (secs), [%0.2f]\", $szSessionID, $gTimeEnd - $gTimeStart);\r\n\t$arOutput[] = $szOutput;\r\n\tprintf(\"%s\\n\", $szOutput);\r\n\r\n\t$arOutput[] = sprintf(\"@@@, [%s], Ending time, [%s]\", $szSessionID, getDateTime());\r\n\r\n\tif(file_exists($szFPLogFN))\r\n\t{\r\n\t\tsaveDataFromMem2File($arOutput, $szFPLogFN, \"a+t\", 0); // no logging\r\n\t}\r\n}", "title": "" }, { "docid": "3be019554cf2fda0e7fed5028f2a5664", "score": "0.49546477", "text": "function contester_cron () {\n return true;\n}", "title": "" }, { "docid": "c44e0fbf579880a6747a9daf7e53b174", "score": "0.4952724", "text": "public function CronJobsPlugin_AfterCronJobExecute_Handler($Sender){\n\t\t$CronExecData = $Sender->EventArguments['CronExecData'];\n\n\t\t$InsertResult = $this->GetCronJobsHistoryModel()->Insert($CronExecData);\n\t}", "title": "" }, { "docid": "eb08764ab709b07182e145f1a1893ce0", "score": "0.49526405", "text": "public function testuserupdatelogssuccessmessage() {\n global $CFG, $DB;\n require_once($CFG->dirroot.'/elis/program/lib/data/user.class.php');\n\n $user = new user(array(\n 'idnumber' => 'testuseridnumber',\n 'username' => 'testuserusername',\n 'firstname' => 'testuserfirstname',\n 'lastname' => 'testuserlastname',\n 'email' => '[email protected]',\n 'country' => 'CA'\n ));\n $user->save();\n\n $record = new stdClass;\n $record->idnumber = 'testuseridnumber';\n $record->firstname = 'updatedtestuserfirstname';\n\n $importplugin = rlip_dataplugin_factory::factory('rlipimport_version1elis');\n $importplugin->dblogger = new rlip_dblogger_import(false);\n $importplugin->fslogger = new silent_fslogger(null);\n $importplugin->user_update($record, 'bogus');\n $importplugin->dblogger->flush('bogus');\n\n $expectedmessage = 'All lines from import file bogus were successfully processed.';\n $where = 'statusmessage = ?';\n $exists = $DB->record_exists_select(RLIP_LOG_TABLE, $where, array($expectedmessage));\n $this->assertTrue($exists);\n }", "title": "" }, { "docid": "90059eecfd7a319b6313516d5444e00d", "score": "0.49484402", "text": "public function testExec()\n {\n self::assertTrue(true);\n }", "title": "" }, { "docid": "e46bb681f64d1e2c271820ba065513aa", "score": "0.49417406", "text": "function hmbkp_ajax_cron_test() {\n\n\t$response = wp_remote_head( site_url( 'wp-cron.php' ) );\n\n\tif ( is_wp_error( $response ) )\n\t\techo '<div id=\"hmbkp-warning\" class=\"updated fade\"><p><strong>' . __( 'BackUpWordPress has detected a problem.', 'hmbkp' ) . '</strong> ' . sprintf( __( '%1$s is returning a %2$s response which could mean cron jobs aren\\'t getting fired properly. BackUpWordPress relies on wp-cron to run scheduled back ups. See the %3$s for more details.', 'hmbkp' ), '<code>wp-cron.php</code>', '<code>' . $response->get_error_message() . '</code>', '<a href=\"http://wordpress.org/extend/plugins/backupwordpress/faq/\">FAQ</a>' ) . '</p></div>';\n\n\telseif ( wp_remote_retrieve_response_code( $response ) != 200 )\n \techo '<div id=\"hmbkp-warning\" class=\"updated fade\"><p><strong>' . __( 'BackUpWordPress has detected a problem.', 'hmbkp' ) . '</strong> ' . sprintf( __( '%1$s is returning a %2$s response which could mean cron jobs aren\\'t getting fired properly. BackUpWordPress relies on wp-cron to run scheduled back ups. See the %3$s for more details.', 'hmbkp' ), '<code>wp-cron.php</code>', '<code>' . wp_remote_retrieve_response_code( $response ) . ' ' . get_status_header_desc( wp_remote_retrieve_response_code( $response ) ) . '</code>', '<a href=\"http://wordpress.org/extend/plugins/backupwordpress/faq/\">FAQ</a>' ) . '</p></div>';\n\n\telse\n\t\techo 1;\n\n\texit;\n\n}", "title": "" }, { "docid": "dd0f37ff95706017ec8b4484ee3afb0b", "score": "0.4918505", "text": "function log_addCronRecord($link, $type, $message, $update = false, &$log_id, $finished = false, $time = \"\") {\n if ((defined(\"ENABLE_CRON_LOG\") && ENABLE_CRON_LOG)) {\n if ($update) {\n $sql = \"UPDATE Cron_Log SET history = CONCAT(history, '\\n$message') \".($finished ? \", finished = 'y', time = '$time'\" : \"\").\" WHERE id = \".($log_id ? $log_id : 0).\"\";\n mysql_query($sql, $link);\n } else {\n $sql = \"INSERT INTO Cron_Log (domain_id, cron, date, history) VALUES (\".SELECTED_DOMAIN_ID.\", '$type', NOW(), '$message')\";\n mysql_query($sql, $link);\n $log_id = mysql_insert_id($link);\n }\n }\n }", "title": "" }, { "docid": "5f2eb25ac2ebc38876b71d51f90a9133", "score": "0.4913389", "text": "public static function run_cron_file($index_type_cron){\n\t\t$db_name=env('DB_NAME','');\n\t\t$index_name_cron=$db_name.'_cron';\n\t\t$index_type_cron=$index_type_cron;\n\t\t$cron_id=md5($index_type_cron);\n\t\t$cron_responce=es::search_by_id($index_name_cron,$index_type_cron,$cron_id);\n\t\t$run_time=date(\"Y-m-d H:i:s\");\n\t\tif($cron_responce['total']==0){\n\t\t\t$single_document_cron = [\n\t\t\t 'cron_id' => $cron_id,\n\t\t\t 'cron_name' => $index_type_cron,\n\t\t\t 'last_run' => $run_time,\n\t\t\t 'cron_status' => 'success',\n\t\t\t 'status' => 'active'\n\t\t\t];\n\t\t\t$response_data_cron=es::cron_insert_data_id($index_name_cron,$index_type_cron,$single_document_cron,$cron_id);\n\t\t} else {\n\t\t\t$single_document_cron = [\n\t\t\t 'last_run' => $run_time\n\t\t\t];\n\t\t\t$response_data_cron=es::cron_update_data($index_name_cron,$index_type_cron,$cron_id,$single_document_cron);\n\t\t}\n\t\tif($response_data_cron['error']==0){\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "title": "" }, { "docid": "11f311c2c26e5fed2cd28979210171a4", "score": "0.49007586", "text": "public function testusercreatelogssuccessmessage() {\n global $DB;\n\n $record = new stdClass;\n $record->idnumber = 'testuseridnumber';\n $record->username = 'testuserusername';\n $record->firstname = 'testuserfirstname';\n $record->lastname = 'testuserlastname';\n $record->email = '[email protected]';\n $record->country = 'CA';\n\n $importplugin = rlip_dataplugin_factory::factory('rlipimport_version1elis');\n $importplugin->dblogger = new rlip_dblogger_import(false);\n $importplugin->fslogger = new silent_fslogger(null);\n $importplugin->user_create($record, 'bogus');\n $importplugin->dblogger->flush('bogus');\n\n $expectedmessage = 'All lines from import file bogus were successfully processed.';\n $where = 'statusmessage = ?';\n $exists = $DB->record_exists_select(RLIP_LOG_TABLE, $where, array($expectedmessage));\n $this->assertTrue($exists);\n }", "title": "" }, { "docid": "954bc63b57ddf87ff507473577949382", "score": "0.48879808", "text": "private function logCronEnd($thisJob, $ch_id)\r\n\t{\r\n\t\t$right_now = date('Y-m-d H:i:s');\r\n\t\t// Change cron status to Processing\r\n\t\t$sql = \"update redcap_crons set cron_last_run_end = '$right_now',\r\n\t\t\t\tcron_instances_current = if(cron_instances_current > 0, cron_instances_current - 1, 0) \r\n\t\t\t\twhere cron_name = '\".prep($thisJob).\"'\";\r\n\t\t$q = db_query($sql);\r\n\t\t// Insert row into crons_history table to log this single event\r\n\t\t$sql = \"update redcap_crons_history set cron_run_status = 'COMPLETED', cron_run_end = '$right_now' \r\n\t\t\t\twhere ch_id = $ch_id\";\r\n\t\t$q = db_query($sql);\r\n\t}", "title": "" }, { "docid": "b1116638a44740cda68cfb7e30ea75b8", "score": "0.4886634", "text": "public function cron_stats()\n\t{\n\t\tredirect('app/cron');\n\t}", "title": "" }, { "docid": "b35873ed8be0c53c30c2a7ca5f6da052", "score": "0.48820525", "text": "public static function run() {\n\t\t\n\t\t$now = microtime(true);\n\t\t$class_config = Config::inst()->forClass(__CLASS__);\n\t\t\n\t\t// Check that cron should run at all.\n\t\tif (CronConfig::g('NextCron') > $now) return;\n\t\tif (CronConfig::g('CronRunning') && CronConfig::g('CronRunning') > $now) return;\n\t\t\n\t\t// Record that cron is running and set a timeout for 10 mins from now.\n\t\t$run_time = $now + 600;\n\t\tCronConfig::s('CronRunning', $run_time);\n\t\t\n\t\t// Connection details\n\t\tif ($class_config->ssl === true) {\n\t\t\t$tran = 'ssl';\n\t\t\t$port = 443;\n\t\t} elseif ($class_config->ssl === false) {\n\t\t\t$tran = 'tcp';\n\t\t\t$port = 80;\n\t\t} else {\n\t\t\t$tran = (Director::protocol() === 'https://') ? 'ssl' : 'tcp';\n\t\t\t$port = $_SERVER['SERVER_PORT'];\n\t\t}\n\t\t\n\t\t// IP Address is faster because it avoids a DNS lookup, but it doesn't work over SSL.\n\t\t$host = ($tran === 'ssl') ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_ADDR']; \n\t\t\n\t\t// Open the socket\n\t\ttry {\n\t\t\t$errno = null;\n\t\t\t$errstr = null;\n\t\t\t$fp = @fsockopen(\"$tran://$host\", $port, $errno, $errstr, 1);\n\t\t\tif ( $fp === false || $errno != 0) {\n\t\t\t\tthrow new CronException(\"A socket could not be established for $tran://$host on port $port\" . ((strlen($errstr)) ? \" ($errstr)\" : ''));\n\t\t\t}\n\t\t} catch (Exception $e) {\n\t\t\t// Never let CronTab stop execution, but log it (twice for good measure).\n\t\t\tCronLog::log(\"Cron system failed to run because a socket could not be established.\", CronLog::ERR);\n\t\t\tSS_Log::log($e, SS_Log::ERR);\n\t\t\tCronConfig::s('CronRunning', null);\n\t\t\treturn;\n\t\t}\n\n\t\t// Construct the request\n\t\t$req = \"GET \" . Director::baseURL() . __CLASS__ . \"/call/$run_time HTTP/1.1\\r\\n\";\n\t\t$req.= \"Host: \" . $_SERVER['HTTP_HOST'] . \"\\r\\n\";\n\t\t$req.= \"Connection: close\\r\\n\\r\\n\";\n\t\t\n\t\t// Fire the request and move on. \n\t\t// There is a potential error here which can't be caught because we don't wait for the server response.\n\t\t$written = fwrite($fp, $req);\n\t\tif ( !$written ) {\n\t\t\t// Never let CronTab stop execution, but log it (twice for good measure).\n\t\t\tCronLog::log(\"Cron system failed to run because the socket could not be written to.\", CronLog::ERR);\n\t\t\tSS_Log::log(\"Cron system failed to run because the socket could not be written to.\", SS_Log::ERR);\n\t\t\tCronConfig::s('CronRunning', null);\n\t\t\treturn;\n\t\t}\n\t\tCronLog::log('Initiating the pseudo cron system took ' . number_format( (microtime(true)-$now), 2 ) . ' seconds.', CronLog::NOTICE);\n\t}", "title": "" }, { "docid": "5fd3a8383d90a60e9d5046a47c080dd0", "score": "0.48808426", "text": "static function cronsNotRunningErrorMsg()\r\n\t{\r\n\t\tglobal $lang;\r\n\t\treturn\tRCView::div(array('class'=>'red','style'=>'margin-top:10px;font-family:arial;'), \r\n\t\t\t\t\tRCView::img(array('src'=>'exclamation.png','class'=>'imgfix')) . \r\n\t\t\t\t\tRCView::b($lang['control_center_288']) . RCView::br() . $lang['control_center_289'] . RCView::br() . RCView::br() . \r\n\t\t\t\t\tRCView::a(array('href'=>'javascript:;','style'=>'font-family:arial;','onclick'=>\"window.location.href=app_path_webroot+'ControlCenter/cron_jobs.php';\"), $lang['control_center_290'])\r\n\t\t\t\t);\r\n\t}", "title": "" }, { "docid": "7b9a760ecd49689764e11e7ebffa8f8e", "score": "0.4879353", "text": "function execute(){\n\t\t$options = \n\t\t\t'-i \"'.$this->source->getCompletePath().'\"';\n\t\tif($this->duration){\n\t\t\t$time = new Time($this->duration);\n\t\t\t$options.=' -t '.escapeshellarg($time->getSQLTime());\n\t\t}\n\t\tif($this->abitrate){\n\t\t\t$options.=' -ab '.escapeshellarg($this->abitrate);\n\t\t}\n\t\tif($this->start){\n\t\t\t$time = new Time($this->start);\n\t\t\t$options.=' -ss '.escapeshellarg($time->getSQLTime());\n\t\t}\n\t\t$options.=' -y '\n\t\t\t.escapeshellarg($this->target->getCompletePath());\n\t\t$command = $this->executable.' '.$options;\n\t\t\n\t\t$command = &new Sushee_CommandLine($command);\n\t\t$this->message = $command->execute();\n\t\t\n\t\t// process has failed, file is invalid\n\t\tif(!$this->target->exists() || $this->target->getSize()==0){\n\t\t\t$this->status = false;\n\t\t\t$this->message = $command->getOutput();\n\t\t}else{\n\t\t\t$this->status = true;\n\t\t}\n\t\treturn $this->status;\n\t}", "title": "" }, { "docid": "90932624cc23615ec2d18ec935b9f907", "score": "0.48758683", "text": "public function on_cron_job_runs() {\n\t\t$manager = new BTM_Notification_Manager( $this->get_recurrence() );\n\t\t$to_report = $manager->create_task();\n\t\tBTM_Task_Manager::get_instance()->register_simple_task( $to_report );\n\t}", "title": "" }, { "docid": "14707abe12d4786576d51485564dd583", "score": "0.4860363", "text": "public function sendErrorMessage($cron_unique_id)\n\t{\n\t\ttry {\n\t\t\t$to = '[email protected], [email protected]';\n\t\t\t$subject = 'AFCAOM-Omnipress Cron Error';\n\t\t\t$message = 'There is a error in Cron ID: ' . $cron_unique_id . ' Please look into the log file';\n\t\t\t$headers = array(\n\t\t\t\t'From' => '[email protected]',\n\t\t\t\t'Reply-To' => '[email protected]',\n\t\t\t\t'X-Mailer' => 'PHP/' . phpversion()\n\t\t\t);\n\t\t\tmail($to, $subject, $message, $headers);\n\t\t\treturn array('success' => true);\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\treturn array('success' => false, 'error_message' => $e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "ccb945a1786a86cffbaa4b279a282434", "score": "0.48596424", "text": "function do_maintenance_create_snapshot($repository)\n{\n $ci =& get_instance();\n $backend_dir = $ci->config->item('backend_dir');\n \n $cmd = $ci->config->item('scripts_dir') . '/curator.sh snapshot --repository \"' . $repository . '\" indices --older-than 1 --time-unit days --timestring %Y.%m.%d';\n exec($cmd , $output, $return_var);\n file_put_contents($backend_dir.\"/var/jobs.log\", $output, FILE_APPEND);\n \n $msg = _('Creating snapshots for indexes more than 1 day old in the repository ' . $repository);\n \n $log = array('type' => 'BACKUP',\n 'message' => $msg\n );\n $logged = $ci->logger->log($log);\n \n return $msg;\n}", "title": "" }, { "docid": "3e8f7d8f703a1098e4c055efcd35e1a6", "score": "0.48482397", "text": "public function run()\n\t{\n\t\tif(!$this->installed)\n\t\t\t$this->installCrons();\n\t\tfor($pId = $this->lowestPriorityIndex; $pId < $this->highestPriorityIndex + 1; $pId ++)\n\t\t{\n\t\t\tif(!isset($this->crons[$pId]))\n\t\t\t\tcontinue;\n\t\t\tforeach ($this->crons[$pId] as $cron)\n\t\t\t{\n\t\t\t\t// -- Current cron should be executed ?\n\t\t\t\tif (\n\t\t\t\t\t$this->match($cron['minute'], intval(date('i')))\n\t\t\t\t\t&& $this->match($cron['hour'], date('G'))\n\t\t\t\t\t&& $this->match($cron['dayOfMonth'], date('j'))\n\t\t\t\t\t&& $this->match($cron['month'], date('n'))\n\t\t\t\t\t&& $this->match($cron['dayOfWeek'], date('N'))\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t// -- Execute the action:\n\t\t\t\t\tif(isset($cron['callable']))\n\t\t\t\t\t\tcall_user_func($cron['callable']);\n\t\t\t\t\telse\n\t\t\t\t\t\tCurlHelper::callAction($cron['app'], $cron['module'], $cron['action']);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "ea2fe11b0e7c0bcca150ecde0e66ba6b", "score": "0.4842619", "text": "public function fileLog(){\n if(count(func_get_args()) < 2) return false;\n\n $msg = \"\";\n foreach(func_get_args() as $i => $arg){\n if($i==0) $filename = $arg;\n else{\n if(is_array($arg)) $msg .= var_export($arg, true);\n else $msg .= $arg;\n $msg .= \" \";\n }\n }\n error_log($this->username.\" \".$this->id.\" \".$msg.\"\\n\", 3, $this->log_dir.\"/\".$filename);\n return true;\n }", "title": "" }, { "docid": "6b65d93422ff322509d63f361524a953", "score": "0.4837809", "text": "public static function log()\n {\n $args = func_get_args();\n\n if (sizeof($args) > 1) {\n $msg = vsprintf(array_shift($args), $args);\n } else {\n $msg = $args[0];\n }\n\n self::init();\n $msg = sprintf(\"%s[%s]: %s\\n\", date('Y-m-d H:i:s'), getmypid(), $msg);\n if (self::$verbose) {\n echo $msg;\n }\n\n @error_log($msg, 3, self::$logFilePath);\n }", "title": "" }, { "docid": "11ffceebb757e28b57aca612b39cd995", "score": "0.48351008", "text": "function execute()\n {\n @set_time_limit(0);\n\n $tables = array();\n if ($this->settings->get('plugin_archivelogs_Archive events_log Table')) {\n $tables[] = 'events_log';\n }\n $messages = array();\n $configuration = Zend_Registry::get('configuration');\n\n foreach ($tables as $table) {\n $fileName = $table . '_' . $configuration['application']['dbSchema'] . \"_\" . date('Y_m_d_H_i') . \".sql\";\n\n // use references to save memory\n $sql = '';\n $this->_getSQL($sql, $table);\n if ($this->settings->get('plugin_archivelogs_Compress files with gzip')) {\n $fileName .= '.gz';\n if ($message = $this->_gzip($sql)) {\n $messages[] = $message;\n }\n }\n\n if ($this->settings->get('plugin_archivelogs_Deliver to remote FTP or SFTP account')) {\n $messages[] = $this->_sendFTP($sql, $fileName, $this->settings->get('plugin_archivelogs_Deliver to remote FTP or SFTP account'));\n }\n\n if ($this->settings->get('plugin_archivelogs_Deliver to local directory')) {\n $messages[] = $this->_sendLocal($sql, $fileName, $this->settings->get('plugin_archivelogs_Deliver to local directory'));\n }\n\n if ($this->settings->get('plugin_archivelogs_Deliver to E-mail address')) {\n $destinataries = explode(\"\\r\\n\", $this->settings->get('plugin_archivelogs_Deliver to E-mail address'));\n foreach ($destinataries as $destinatary) {\n $messages[] = $this->_sendEmail($sql, $fileName, $destinatary);\n }\n }\n for ($i=0;$i<count($messages);$i++) {\n if (!is_a($messages[$i], 'CE_Error')) {\n $this->db->query(\"DELETE FROM `$table`\");\n break;\n }\n }\n }\n\n return @array_unique($messages);\n }", "title": "" }, { "docid": "470e42578da5ae7328b88ca5babbec0a", "score": "0.4829246", "text": "function isOtherPhpcrond() {\n\n/*Triple check done initially in phpcron.php to see if there is another instance running */\n\nglobal $phpcron_psinfo_file;\n$other_instance=false;\n$temp_path=\"$TEMP_DIR/\".basename($phpcron_psinfo_file);\n\nif(file_exists($phpcron_psinfo_file)) {\n //Check to see if another instance is running\n\n deleteFile($phpcron_psinfo_file);\n sleep(1); //wait for phpcron to create again if there is another instance\n clearstatcache(); //clear cache since will be checking same file again\n if (file_exists($phpcron_psinfo_file)) {\n $other_instance=true;\n\n\n }\n\n}\nif(is_writeable(\"$TEMP_DIR/\") and file_exists(\"$TEMP_DIR/\".basename($phpcron_psinfo_file))) {\n\n\n //Check temp directory to see if a file ps info file is there\n\n deleteFile($temp_path);\n\n \n sleep(1); //wait for phpcron to create again if there is another instance\n clearstatcache(); //clear cache since will be checking same file again\n if (file_exists(\"$TEMP_DIR/\".basename($phpcron_psinfo_file))) {\n $other_instance=true;\n\n }\n\n}\n\n\n//check in the tmp directory\n\nexec(\"ps ef | grep '^*phpcron.php*daemon.*$'\",$output,$result_code);\n$number_of_instances=count($output);\nif($number_of_instances>1) {\n\n$other_instance=true;\n\n}\n\nreturn $other_instance;\n\n}", "title": "" }, { "docid": "21eb0a46742796a770681a705f643edd", "score": "0.48282233", "text": "public abstract function run(CronJob $cronJob);", "title": "" }, { "docid": "29c7781b5e639ae1ebb24e8dbd0f06f7", "score": "0.48182043", "text": "public static function auditfiles_not_in_database_batch_finish_batch($success, $results, $operations) {\n if ($success) {\n //success action.\n }\n else {\n $error_operation = reset($operations);\n drupal_set_message(\n t('An error occurred while processing @operation with arguments : @args',\n [\n '@operation' => $error_operation[0],\n '@args' => print_r($error_operation[0], TRUE),\n ]\n ),\n 'error'\n );\n }\n }", "title": "" }, { "docid": "480554a8c5847edaf885e25affa14438", "score": "0.48145992", "text": "function cronTaskHasErrors($task_id) {\n\t\treturn file_exists(\"data/cron/$task_id.errors\");\n\t}", "title": "" }, { "docid": "c1065da62b5833e91cf19e343300b18b", "score": "0.48125762", "text": "private function checkCronInstances()\r\n\t{\r\n\t\t// Loop through each job to get count of current instances\r\n\t\tforeach ($this->jobInfo as $jobName=>$jobAttr) \r\n\t\t{\r\n\t\t\t// Only check those jobs that are enabled\r\n\t\t\tif ($jobAttr['cron_enabled'] == 'DISABLED') continue;\r\n\t\t\t// Get count of instances that have NOT exceeded max_run_time yet\r\n\t\t\t$sql = \"select count(1) from redcap_crons_history\r\n\t\t\t\t\twhere cron_id = {$jobAttr['cron_id']} and cron_run_status = 'PROCESSING' \r\n\t\t\t\t\tand DATE_ADD(cron_run_start, INTERVAL {$jobAttr['cron_max_run_time']} SECOND) >= '\".NOW.\"'\r\n\t\t\t\t\tand cron_run_end is null limit {$jobAttr['cron_instances_max']}\";\r\n\t\t\t$q = db_query($sql);\r\n\t\t\t$num_current_instances = ($q && db_num_rows($q) > 0) ? db_result($q, 0) : 0;\r\n\t\t\t// If count of current instances running does not match the count in the crons table, then fix value in crons table.\r\n\t\t\t// Also reset start/end time of last job to NULL, otherwise it could cause issues when determining when to run next.\r\n\t\t\tif ($num_current_instances != $jobAttr['cron_instances_current']) \r\n\t\t\t{\r\n\t\t\t\t$sql = \"update redcap_crons set cron_instances_current = $num_current_instances\r\n\t\t\t\t\t\twhere cron_id = {$jobAttr['cron_id']}\";\r\n\t\t\t\tdb_query($sql);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "b1c54e97a206a862694d7e552adc5537", "score": "0.4808182", "text": "protected function success( $msg ) {\n\t\t$this->write_log( $msg, 1 );\n\t}", "title": "" }, { "docid": "881ff41a77fe22aa3023b95404600638", "score": "0.48025918", "text": "public function execute()\n {\n echo \"\\n\".'Executing task: {'.get_class($this).\"}\\n\";\n }", "title": "" }, { "docid": "3a32fc9f70154ca40109a56ef19dfc59", "score": "0.47981003", "text": "public function handle()\n\t{\n\n\n\t\tCronHelper::before_cronrun($this->name, $this );\n\n\n\t\t$arguments = $this->argument();\n\t\t$getmypid = getmypid(); // get proccess id\n\t\t$CompanyID = $arguments[\"CompanyID\"];\n\t\t$CronJobID = $arguments[\"CronJobID\"];\n\n\t\t$CronJob = CronJob::find($CronJobID);\n\t\tCronJob::activateCronJob($CronJob);\n\t\t$processID = CompanyGateway::getProcessID();\n\t\t/*CompanyGateway::updateProcessID($CronJob,$processID);*/\n\t\t$cronsetting = json_decode($CronJob->Settings,true);\n\t\t$error = '';\n\n\t\ttry{\n\n\t\t\t$joblogdata = array();\n\t\t\t$joblogdata['CronJobID'] = $CronJobID;\n\t\t\t$joblogdata['created_at'] = date('Y-m-d H:i:s');\n\t\t\t$joblogdata['created_by'] = 'RMScheduler';\n\t\t\tCronJob::createLog($CronJobID);\n\t\t\tLog::useFiles(storage_path() . '/logs/accountbalancegenerator-' . $CompanyID . '-' . date('Y-m-d') . '.log');\n\n\t\t\tLog::info('Account Balance Start.');\n\n\t\t\t$errors = AccountBalanceLog::CreateAllLog($CompanyID,$processID);\n\n\t\t\t$ErrorMessage = (count($errors)>0?'Skipped account: '.implode(',\\n\\r',$errors):'');\n\n\t\t\tAccountBalanceLog::updateAccountBalanceAmount($CompanyID);\n\n\t\t\tLog::info('Account Balance End.');\n\n\t\t\tif(isset($ErrorMessage) && $ErrorMessage != ''){\n\t\t\t\t$joblogdata['Message'] = $ErrorMessage;\n\t\t\t\t$joblogdata['CronJobStatus'] = CronJob::CRON_SUCCESS;\n\t\t\t}else{\n\t\t\t\t$joblogdata['Message'] = 'Success';\n\t\t\t\t$joblogdata['CronJobStatus'] = CronJob::CRON_SUCCESS;\n\t\t\t}\n\n\t\t\tCronJobLog::insert($joblogdata);\n\n\n\t\t}catch (\\Exception $e){\n\n\t\t\tLog::error($e);\n\t\t\t$this->info('Failed:' . $e->getMessage());\n\t\t\t$joblogdata['Message'] ='Error:'.$e->getMessage();\n\t\t\t$joblogdata['CronJobStatus'] = CronJob::CRON_FAIL;\n\t\t\tCronJobLog::insert($joblogdata);\n\t\t\tif(!empty($cronsetting['ErrorEmail'])) {\n\n\t\t\t\t$result = CronJob::CronJobErrorEmailSend($CronJobID,$e);\n\t\t\t\tLog::error(\"**Email Sent Status \" . $result['status']);\n\t\t\t\tLog::error(\"**Email Sent message \" . $result['message']);\n\t\t\t}\n\n\n\t\t}\n\n\t\t/*$dataactive['Active'] = 0;\n\t\t$dataactive['PID'] = '';\n\t\t$CronJob->update($dataactive);*/\n\t\tCronJob::deactivateCronJob($CronJob);\n\t\tif(!empty($cronsetting['SuccessEmail']) && $error == '') {\n\t\t\t$result = CronJob::CronJobSuccessEmailSend($CronJobID);\n\t\t\tLog::error(\"**Email Sent Status \".$result['status']);\n\t\t\tLog::error(\"**Email Sent message \".$result['message']);\n\t\t}\n\t\tLog::error(\" CronJobId end \" . $CronJobID);\n\n\n\t\tCronHelper::after_cronrun($this->name, $this);\n\n }", "title": "" }, { "docid": "62bb39a2c13ce6096a8fd18604de5c65", "score": "0.4789302", "text": "function uploadavatar_cron () {\n return true;\n}", "title": "" }, { "docid": "ab0ca2392879b0d9c29c1338475f57d3", "score": "0.47858605", "text": "public function executeCronController(){\n $class= $this->data['class'];//$this->cronRequest->getParamAll(1);\n //Analizo si llamo a los controladores del usuario o si llamo al manejador de tareas o shell script del framework\n if($class == 'CronManagement'){\n //Ejecuto el CronManagement\n $this->executeCronManagement();\n }\n if($class != 'CronManagement'){\n $method= \"index\";\n //Si la diferencia es mayor a 2 entre ambos arreglos de parametros quiere decir que se indico el nombre del metodo\n //if(count($this->cronRequest->getAllParams()) - count($this->cronRequest->getParams()) > 2){\n if($this->data['method'] != null){\n $method= $this->data['method'];\n }\n //Ejecuto Cron de Usuario o Shell Script del Framework\n if(strpos($class, 'Eno-') === 0){\n //Ejecuto el cron\n $this->executeShellScript(substr($class, 4), $method);\n }else{\n //Ejecuto el cron\n $this->executeCron($class, $method);\n }\n }\n }", "title": "" }, { "docid": "92310694f9c2e885a238f8bbcdc8f0b8", "score": "0.47827488", "text": "public function cronRun() {\n $this->drupalGet('cron/' . \\Drupal::state()->get('system.cron_key'));\n }", "title": "" }, { "docid": "07f0478ecf91215c5d31fc5ba61efe58", "score": "0.47823173", "text": "function statistics_hook_cron(&$croninfo)\n{\n assert('is_array($croninfo)');\n assert('array_key_exists(\"summary\", $croninfo)');\n assert('array_key_exists(\"tag\", $croninfo)');\n\n $statconfig = SimpleSAML_Configuration::getConfig('module_statistics.php');\n\t\n if (is_null($statconfig->getValue('cron_tag', null))) {\n return;\n }\n if ($statconfig->getValue('cron_tag', null) !== $croninfo['tag']) {\n return;\n }\n\t\n $maxtime = $statconfig->getInteger('time_limit', null);\n if ($maxtime) {\n set_time_limit($maxtime);\n }\n\t\n try {\n $aggregator = new sspmod_statistics_Aggregator();\n $results = $aggregator->aggregate();\n if (empty($results)) {\n SimpleSAML\\Logger::notice('Output from statistics aggregator was empty.');\n } else {\n $aggregator->store($results);\n }\n } catch (Exception $e) {\n $message = 'Loganalyzer threw exception: ' . $e->getMessage();\n SimpleSAML\\Logger::warning($message);\n $croninfo['summary'][] = $message;\n }\n}", "title": "" } ]
53c2bf0714c1d98a486d1e15c07de818
funcion para insertar un nuevo registro en la tabla
[ { "docid": "979dc981001e0166b9a356a9ebe8f9e9", "score": "0.0", "text": "public function store(Request $request)\n {\n if(!$request->ajax() || Auth::user()->rol_id == 11)return redirect('/');\n try{\n DB::beginTransaction();\n $proyecto = $request->nombre;\n $usuario_id = Auth::user()->id;\n //Se crea el registro en la tabla Fraccionamiento.\n $fraccionamiento = new Fraccionamiento();\n $fraccionamiento->nombre = $proyecto;\n $fraccionamiento->numero = $request->numero;\n $fraccionamiento->tipo_proyecto = $request->tipo_proyecto;\n $fraccionamiento->calle = $request->calle;\n $fraccionamiento->colonia = $request->colonia;\n $fraccionamiento->estado = $request->estado;\n $fraccionamiento->ciudad = $request->ciudad;\n $fraccionamiento->delegacion = $request->delegacion;\n $fraccionamiento->cp = $request->cp;\n $fraccionamiento->save();\n\n //Se genera una etapa default y se liga con el nuevo registro de Fraccionamientos\n $etapa = new Etapa();\n $etapa->fraccionamiento_id = $fraccionamiento->id;\n $etapa->num_etapa = \"Sin Asignar\";\n $etapa->personal_id = 1;\n $etapa->save();\n\n //Se genera una modelo default y se liga con el nuevo registro de Fraccionamientos\n $modelo = new Modelo();\n $modelo->nombre = \"Por Asignar\";\n $modelo->fraccionamiento_id = $fraccionamiento->id;\n $modelo->tipo = $fraccionamiento->tipo_proyecto;\n $modelo->terreno = 0;\n $modelo->construccion = 0;\n $modelo->save();\n //Se genera una modelo default para terrenos y se liga con el nuevo registro de Fraccionamientos\n $modelo = new Modelo();\n $modelo->nombre = \"Terreno\";\n $modelo->fraccionamiento_id = $fraccionamiento->id;\n $modelo->tipo = $fraccionamiento->tipo_proyecto;\n $modelo->terreno = 0;\n $modelo->construccion = 0;\n $modelo->save();\n\n $imagenUsuario = DB::table('users')->select('foto_user','usuario')->where('id','=',$usuario_id)->get();\n $fecha = Carbon::now();\n $arregloSimPendientes = [\n 'notificacion' => [\n 'usuario' => $imagenUsuario[0]->usuario,\n 'foto' => $imagenUsuario[0]->foto_user,\n 'fecha' => $fecha,\n 'msj' => 'Se ha agregado el proyecto '. $proyecto,\n 'titulo' => 'Nuevo Proyecto'\n ]\n ];\n\n $users = User::select('id')->where('rol_id','=','3')->get();\n\n foreach($users as $notificar){\n User::findOrFail($notificar->id)->notify(new NotifyAdmin($arregloSimPendientes));\n }\n DB::commit();\n\n } catch (Exception $e){\n DB::rollBack();\n }\n\n }", "title": "" } ]
[ { "docid": "e6608b3a727aca6fc3e5c341f47c35f9", "score": "0.736668", "text": "public function insert($registro);", "title": "" }, { "docid": "cd514c0b200dda3d98ec55ab3910d6aa", "score": "0.7129759", "text": "public function agregar(){\n\t\t$sql = \"insert into \".self::$tabla.\" (nombre,apellidos,usuario,contrasenha,esta_activo,es_admin,fecha_creacion) \";\n\t\t$sql .= \"value (\\\"$this->nombre\\\",\\\"$this->apellidos\\\",\\\"$this->usuario\\\",\\\"$this->contrasenha\\\",$this->esta_activo,$this->es_admin,$this->fecha_creacion)\";\n\t\tExecutor::doit($sql);\n\t}", "title": "" }, { "docid": "134fcda2a1abe295d14079b8275c30c0", "score": "0.6998888", "text": "public function insert($empresasContrato);", "title": "" }, { "docid": "3ec864676b0ae47c1700aa88368a553a", "score": "0.69672334", "text": "public function insert()\n {\n $this->db->set('ID', $this->getId());\n $this->db->set('LIBELLE', $this->getLibelle());\n $this->db->set('VAL', $this->getVal());\n $this->db->set('DESCE', $this->getDesce());\n $this->db->insert($this->getTable());\n }", "title": "" }, { "docid": "04710a91554dc558ee5418d539e8d59a", "score": "0.69395864", "text": "public function insert() {\n $this->save();\n }", "title": "" }, { "docid": "f549b1caf6c7daed36afe131cc5d1087", "score": "0.6909257", "text": "function insert(Tipo_accion $tipo_accion){\r\n return $this->bd->insert($this->tabla, $tipo_accion->getGenerico());\r\n }", "title": "" }, { "docid": "b4562ba27d21c9c72106e08048d5d003", "score": "0.69032955", "text": "protected function insertar()\n {\n }", "title": "" }, { "docid": "b4562ba27d21c9c72106e08048d5d003", "score": "0.69032955", "text": "protected function insertar()\n {\n }", "title": "" }, { "docid": "4f2a2f804f83afc4edd9900a5d7519a4", "score": "0.68840635", "text": "function agregar(){\n\t\t$this->modelo->cursoInsert();\n\t\n\t}", "title": "" }, { "docid": "1849e22976fcfbc1846d7f9fcc6317b8", "score": "0.68822354", "text": "public function insert($hojaDeVida);", "title": "" }, { "docid": "cb31a14d1689f35faf2c325b2ffe71e1", "score": "0.68767846", "text": "public function insert($fournisseur);", "title": "" }, { "docid": "4d3559533fb88f338beada25ed76fd04", "score": "0.6823921", "text": "public function insert($empresa);", "title": "" }, { "docid": "f3b19697732fe57de77025e603dec20f", "score": "0.6817407", "text": "public function insertar($dato){\n\t}", "title": "" }, { "docid": "4d46ec62697a7919d6fa9ef1b836b067", "score": "0.6760993", "text": "public function insert($estudiante){\n $codigo=$estudiante->getCodigo();\n $semestre=$estudiante->getSemestre();\n $programa_academico=$estudiante->getPrograma_academico();\n $persona_id=$estudiante->getPersona_id()->getId();\n $num_documento=$estudiante->getNum_documento();\n $tipo_docuemnto_id=$estudiante->getTipo_docuemnto_id()->getId();\n\n try {\n $sql= \"INSERT INTO `estudiante`( `codigo`, `semestre`, `programa_academico`, `persona_id`, `num_documento`, `tipo_docuemnto_id`)\"\n .\"VALUES ('$codigo','$semestre','$programa_academico','$persona_id','$num_documento','$tipo_docuemnto_id')\";\n return $this->insertarConsulta($sql);\n } catch (SQLException $e) {\n throw new Exception('Primary key is null');\n }\n}", "title": "" }, { "docid": "909929d3decdd440f09ecbc6d35e2389", "score": "0.67601174", "text": "public function insert($candidato);", "title": "" }, { "docid": "b8d07b8005c9f2cc5f9fb3dbe13b8c57", "score": "0.6731724", "text": "function insertar(){\n $conexion = mysqli_connect(\"localhost\",\"root\",\"\",'dynasoft');\n //inserar a la base de datos un Mantenimiento\n $query = \"INSERT INTO Mantenimiento(Proveedor,Fecha_Prox_M,Estado,Observaciones,Tipo_Servicio,Codigo_Equipo) \n VALUES('$this->proveedor','$this->fecha_prox_m','$this->estado','$this->observaciones','$this->tipo_servicio','$this->codigo_equipo')\";\n $resultado = mysqli_query ($conexion,$query );\n }", "title": "" }, { "docid": "b1c1c4dc7c765ac11688ee38275f2183", "score": "0.6680814", "text": "public function insert($usuario);", "title": "" }, { "docid": "417610d84a848916615ca7768a9e0b0e", "score": "0.6668142", "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": "5f217437187e420952cd575107480713", "score": "0.66536045", "text": "public function tambahSuratMasuk($table,$data){\n $this->db->insert($table, $data);\n }", "title": "" }, { "docid": "3d52143ca56b57ba5f1f7ae084089219", "score": "0.66240627", "text": "public function AltaUsuario($newusuario){\n $this->db->insert('usuario', $newusuario); \n }", "title": "" }, { "docid": "298b8000d9d3c406046260a7efbf2ff8", "score": "0.6623048", "text": "public function moveToInsertRow();", "title": "" }, { "docid": "be0b207c587a9d4584dbc5c264db2c7f", "score": "0.66176564", "text": "private function create ()\n\t{\n\t\t$this->db->insert($this->table, $this->data);\n\t}", "title": "" }, { "docid": "2689778b3a2a55d8882f27be855b2f02", "score": "0.66162074", "text": "function insert() {\n\t\t\n\t\t$result = false ;\n\t\t\n\t\t#global $_POST ;\t\t#print_r($_POST); die($_POST);\n\t\t\n\t\t# varibles recibidas obligatorias\n\t\t$id \t\t\t= intval($_POST['id']);\n\t\t$nombre \t\t= trim($_POST['nombre']); \n\t\t$alpha2 \t\t= strtoupper($_POST['alpha2']);\n\t\t$alpha3 \t\t= strtoupper($_POST['alpha3']);\n\t\t$tipo\t\t\t= $_POST['tipo'];\t\n\t\t$activa \t\t= trim($_POST['activa']);\n\t\t$mainLang \t\t= $_POST['mainLang'];\t\n\t\t\n\t\tif(!isset($nombre) || !isset($alpha2) || !isset($tipo) || !isset($activa) ) die(\"<div class=\\\"error\\\"> Error: insert few arguments !</div>\");\n\t\t\t\t\t\t\t\n\t\t# Insertamos el registro\n\t\t$RecordObj_jer = new RecordObj_jer($id);\n\t\t$RecordObj_jer->set_alpha3($alpha3);\n\t\t$RecordObj_jer->set_alpha2($alpha2);\n\t\t$RecordObj_jer->set_nombre($nombre);\n\t\t$RecordObj_jer->set_tipo($tipo);\n\t\t$RecordObj_jer->set_activa($activa);\n\t\t$RecordObj_jer->set_mainLang($mainLang);\n\t\t$save = $RecordObj_jer->Save();\t\t\t\t#var_dump($save); die();\t\n\t\t\n\t\t\n\t\t# Creamos las tablas\t\t\t\t\t\n\t\tif($save && $mainLang) $createTabla = $this->insertTableJerarquia($alpha2,$nombre,$mainLang);\n\t\t\n\t\t\n\t\treturn true ;\n\t}", "title": "" }, { "docid": "802b7bd5874418bcbc029310ad4e3745", "score": "0.66135114", "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": "c2507701d7c31bfbc36d8bcfbdc6638a", "score": "0.66081595", "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": "3985559b3f997dccbbf1930da82bb63c", "score": "0.6607469", "text": "public function Insert(){\n $pdo = Conecta::getPdo();\n //Cria o sql passa os parametros e etc\n $sql = \"INSERT INTO $this->table (iduf, uf) VALUES \"\n . \" (NULL, ?)\";\n $consulta = $pdo->prepare($sql);\n $consulta ->bindValue(1, $this->uf );\n $consulta ->execute();\n $last = $pdo->lastInsertId();\n \n }", "title": "" }, { "docid": "fae22510da811f0eb0016f572b115f9a", "score": "0.6607346", "text": "public function insert($data);", "title": "" }, { "docid": "096d384fd9cbfffdce82d21b50277da6", "score": "0.6604697", "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": "d1c82285573989ada2e01ad1cebf23c7", "score": "0.6603765", "text": "function insert_generico($tabela,$data){\n //echo('Inserindo generico...');\n $conn = conecta_bd();\n $sql = \"INSERT INTO $tabela ($tabela) values (?)\";\n $stmt = $conn->prepare($sql);\n $stmt->bind_param('s',$data);\n $ok = $stmt->execute();\n\n if($ok){\n echo 'Dados inseridos com sucesso...';\n }\n else{\n echo \"Nao foi possivel inserir os dados...\"\n ;\n }\n mysqli_close($conn);\n }", "title": "" }, { "docid": "f5eb83fcd89828b43c60fc18407f7b21", "score": "0.6597942", "text": "function CRUD_model_guardar($tabla, $data) {\n\t\t$CI = & get_instance();\n\t\t$CI->db->insert($tabla ,$data);\n\n\t\tif ($CI->db->affected_rows() > 0) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "726fdbf2cf95eafa4277d3d1b56e6ff8", "score": "0.65887725", "text": "public function Insert() {\n // insert data to table\n }", "title": "" }, { "docid": "8832da850776f637feb5f5ae84c2d279", "score": "0.6585784", "text": "function insert(){\n\t\t\t$result = $this->consult();\n\t\t\tif(count($result) > 0){\n\t\t\t\t$this->form_data[\"id_usuario\"] = $result[0]->id_usuario;\n\t\t\t\t$this->id_usuario = $result[0]->id_usuario;\n\t\t\t\treturn $this->update();\n\t\t\t}\n\n\t\t\ttry{\n\t\t\t\t$this->db->trans_start();\n\t\t\t\t$this->db->set('creacion_usuario', 'NOW()', FALSE);\n\t\t\t\t$this->db->insert('usuarios', $this->form_data);\n\t\t\t\t$this->db->trans_complete();\n\t\t\t\treturn array(\"message\"=>\"ok\");\n\t\t\t} catch (Exception $e){\n\t\t\t\treturn array(\"message\"=>\"error\");\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "f98134938490711e2e6e3139a4c80a27", "score": "0.6536344", "text": "public function insertar()\n {\n if ($this->hasSession() and $this->session->rol == 'administrador') { //Insertar los datos recibidos por post a la BD\n \n if($this->request->getPost('idPersonal') == 0){\n $this->mesa->save([\n 'zona' => $this->request->getPost('zona'),\n 'idPersonal' => NULL\n ]);\n }\n else{\n $this->mesa->save([\n 'zona' => $this->request->getPost('zona'),\n 'idPersonal' => $this->request->getPost('idPersonal')\n ]);\n }\n \n \n //Redireccionar hacia...\n return redirect()->to(base_url('admin/mesas'));\n } else {\n echo view('login');\n }\n }", "title": "" }, { "docid": "89ad1ca0e172bb4ea2d37bc0daf91de3", "score": "0.6513231", "text": "function insertar_registro($tabla,$campos, $datos){\n $db = conectar_al_servidor();\n $sql = \"INSERT INTO \".$tabla.\" ( \".$campos.\" ) VALUES (\".$datos.\")\";\n $us = $db->Execute($sql); \n desconectar($db);\n return $us;\n}", "title": "" }, { "docid": "8a4590a1ea27ab26970d2a24e82f74fd", "score": "0.65038836", "text": "public function inserir()\r\n\t\t{\r\n\t\t\t/* Implementar lógica de inserir\r\n\t\t\t * Exemplo de implementação simples:\r\n\t\t\t * $exemplo = new Exemplo();\r\n\t\t\t * $exemplo->setValor($_POST[\"valor\"]);\r\n\t\t\t * $exemplo->setId($exemploDAO->inserirExemplo($exemplo));\r\n\t\t\t * $this->view->set(\"sucesso\", ($exemplo->getId() != null) ? true : false);\r\n\t\t\t */\r\n\t\t\t$this->view->render();\r\n\t\t}", "title": "" }, { "docid": "021b7ea4f6120bd6d33e6be9f9470585", "score": "0.65029657", "text": "function create($table, $data) {\r\n\t\t$this->db->insert($table,$data);\r\n\t}", "title": "" }, { "docid": "86b7c6d43271428b8b9b091bd0b30dd0", "score": "0.6500374", "text": "public function add(){\n\t\t\t\t\tif (!$this->db) {\n\t\t\t\t\t\t$this->connect();\n\t\t\t\t\t}\n\t\t\t\t//add data to the database\n\t\t\t\t\t$sql = \"insert into \".$this->table;\n\t\t\t\t\t$sql .= \" (\";\n\t\t\t\t\t$i = 1;\n\t\t\t\t\tforeach($this->fields as $name => $value) {\n\t\t\t\t\t\tif (count($this->fields) == $i) {\n\t\t\t\t\t\t\t$sql .= $name.\" \";\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$sql .= $name.\", \";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$i++;\n\t\t\t\t\t}\n\t\t\t\t\t$sql .= \") \";\n\t\t\t\t\t$sql .= \"values \";\n\t\t\t\t\t$sql .= \"(\";\n\t\t\t\t\t$i = 1;\n\t\t\t\t\tforeach($this->fields as $name => $value) {\n\t\t\t\t\t\tif (count($this->fields) == $i) {\n\t\t\t\t\t\t\tif (strlen($value) > 0) {\n\t\t\t\t\t\t\t\t$sql .= \"'\".$value.\"' \";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t$sql .= \"'\".$value.\"' \";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tif (strlen($value) > 0) {\n\t\t\t\t\t\t\t\t$sql .= \"'\".$value.\"', \";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t$sql .= \"null, \";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$i++;\n\t\t\t\t\t}\n\t\t\t\t\t$sql .= \")\";\n\t\t\t\t\t$this->sql = $sql;\n\t\t\t\t\t$this->db->exec($sql);\n\t\t\t\t\tunset($this->fields);\n\t\t\t\t\tunset($sql);\n\t\t\t}", "title": "" }, { "docid": "92fba83d68883c86734815d716390ff3", "score": "0.649441", "text": "public function insert() {\n $schema = $this->schema();\n $this->{$schema->primary_key} = cy\\DB::insert($schema->table_name)\n ->values($this->_row)\n ->returning($schema->primary_key)\n ->exec($schema->database)->rows[0][$schema->primary_key];\n }", "title": "" }, { "docid": "69c27ec94cf40fbef34a2380d6ca8185", "score": "0.64853334", "text": "abstract public function insert($table_name, $data);", "title": "" }, { "docid": "9259445f2735143f8f3694c42cffe770", "score": "0.64850926", "text": "public function guardar(){\n\t\t\t$conexion = new Conexion();\n\n\t\t\t/*Modifica persona*/\n\t\t\tif($this->id){\n\t\t\t\ttry{\n\t\t\t\t\t//echo \"ENTRA\";\n\t\t\t\t\t$consulta = $conexion->prepare('UPDATE ' . self::TABLA . ' SET nombre =:nombre, edad =:edad WHERE id =:id');\n\t\t\t\t\t$consulta->bindParam(':nombre', $this->nombre);\n\t\t\t\t\t$consulta->bindParam(':edad', $this->edad);\n\t\t\t\t\t$consulta->bindParam(':id', $this->id);\n\t\t\t\t\t//echo $consulta->debugDumpParams();\n\t\t\t\t\t$consulta->execute();\n\t\t\t\t}catch(PDOException $e){\n\t\t\t\t\techo \"E:\" . $e->getMessage();\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t/*Añade persona*/\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\ttry{\n\t\t\t\t\t$consulta = $conexion->prepare('INSERT INTO ' . self::TABLA . '(nombre, edad) VALUES (:nombre, :edad)');\n\n\t\t\t\t\t$consulta->bindParam(':nombre', $this->nombre);\n\t\t\t\t\t$consulta->bindParam(':edad', $this->edad);\n\t\t\t\t\t//echo $consulta->debugDumpParams();\n\t\t\t\t\t$consulta->execute();\n\t\t\t\t\t//$arr = $consulta->errorInfo();\n\t\t\t\t\t//print_r($arr);\n\t\t\t\t\t$this->id = $conexion->lastInsertId();\n\t\t\t\t\t//echo $this->id;\n\t\t\t\t\t//echo \"FIN\";\n\t\t\t\t}catch(PDOException $e){\n\t\t\t\t\techo \"E:\" . $e->getMessage();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\n\t\t\t$conexion = null;\n\t\t}", "title": "" }, { "docid": "86a89dac1e89da16099c0afb89889697", "score": "0.64847636", "text": "public function insertUsuario(Usuario $usuario){\n\n\t\t$sql = \"insert into ....\";\n\t}", "title": "" }, { "docid": "facfb62ad0a4f60e99aaf8a688b9ed6e", "score": "0.64757156", "text": "public static function postInsert()\r\n {\r\n }", "title": "" }, { "docid": "3fdeb2e6e0568827b0559e706e8f72ac", "score": "0.64517874", "text": "public function insert ()\n\t{\n\t\t$sql = new Sql();\n\t\t$results = $sql->select(\"CALL sp_usuarios_insert(:LOGIN, :PASSWORD)\", array(\n\t\t\t':LOGIN'=>$this->getDeslogin(),\n\t\t\t':PASSWORD'=>$this->getDesdenha()\n\t\t));\n\n\t\tif (count($results) > 0) {\n\t\t\t$this->setData($results[0]);\n\t\t}\n\t}", "title": "" }, { "docid": "790d99542c5fcadef2da5f29fa954af1", "score": "0.64493245", "text": "public function insertCartaoConvite() {\n }", "title": "" }, { "docid": "da7b523eea83a5b08e659942e5a91a45", "score": "0.6446046", "text": "function form_insert($data){\n\t\t$this->db->insert($tableName, $data);\n\t}", "title": "" }, { "docid": "ac279e614e4137a7191055df7e717e84", "score": "0.6442336", "text": "public function insertar(){\n\t\t$base=new BaseDatos();\n\t\t$resp= false;\n\t\t$nombre = $this->get_nombre();\n\t\t$precio = $this->get_precio();\n\t\t$hora = $this->get_hora_inicio();\n\t\t$duracion = $this->get_duracion();\n\t\t$id_teatro = $this->get_id_teatro();\n\n\t\t$consulta_insertar=\"INSERT INTO funcion(nombre, precio, hora_inicio, duracion, id_teatro)\n\t\tVALUES ('$nombre','$precio', '$hora', '$duracion', $id_teatro)\";\n\n\t\t//debbugin\n\t\t//echo \"\\n\".$consulta_insertar.\"\\n\";\n\t\tif($base->Iniciar()){\n\t\t\tif($id = $base->devuelveIDInsercion($consulta_insertar)){\n\t\t\t\t$this->set_id($id);\n\t\t\t $resp=true;\n\t\t\t}\telse {\n\t\t\t\t\t$this->set_mensaje_operacion($base->getError());\n\t\t\t}\n\t\t} else {\n\t\t\t\t$this->set_mensaje_operacion($base->getError());\n\t\t}\n\t\treturn $resp;\n\t}", "title": "" }, { "docid": "0896b7b554a267fc34c07d1f7710657f", "score": "0.6440897", "text": "protected function dbInsert()\n {\n }", "title": "" }, { "docid": "a5e9269714e19e5c656b01a11c5ec6aa", "score": "0.6426909", "text": "function crear_usuario($usuario) {\n $this->db->insert('usuario', $usuario);\n }", "title": "" }, { "docid": "16226b618bf5192528965e5230a90ec2", "score": "0.6425142", "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": "e0dbd99df79d1a8f5a7f03264c63a5e3", "score": "0.642493", "text": "public function save() {\n if(!$this->id) {\n $this->create();\n } else {\n $this->updateRow();\n }\n }", "title": "" }, { "docid": "7345486a45866b706b46ff917ebc58c0", "score": "0.64175844", "text": "public function Add ()\n\t{\n\t\t$this->setAll();\n\t\t\n\t\t$sql = $this->createInsertQuery($this->table_name, $this->base);\n\t\t\n\t\tif ($this->db->query($sql))\n\t\t\t$this->messageFail(\"Ocorreu um erro ao criar o convite!\");;\n\t}", "title": "" }, { "docid": "d0bb578f6c6e0a0656572baed3b5b282", "score": "0.64169586", "text": "function nuevamatricula(){\n\n\n $oconexion=new conectar();\n $conexion=$oconexion->conexion();\n\n\n\n $existe=$this->consultarmatricula();\n if(sizeof($existe)!=0){\n $sql=\"UPDATE matricula SET eliminar=false\";\n }else{\n $sql=\"INSERT INTO matricula (idCurso,curso,idEstudiante)\n VALUES ('$this->idCurso','$this->curso','$this->idEstudiante')\";\n }\n $result=mysqli_query($conexion,$sql);\n return $result;\n\n\n\n \n}", "title": "" }, { "docid": "e2f84f8ee8cd2299dd135aecea656636", "score": "0.641449", "text": "public function tambah_soalEssay($data,$table) {\n $this->db->insert($table,$data); \n }", "title": "" }, { "docid": "c964da24b166ca331b16c0a6296cbb0b", "score": "0.6408481", "text": "public function crud_insert($tabela, $dados = NULL, $redirecionar = FALSE) {\r\n echo '<br/>entrou no crud insert - ';\r\n print_r($dados);\r\n if ($dados != null) {\r\n $this->db->insert($tabela, $dados);\r\n if ($redirecionar) {\r\n redirect($redirecionar);\r\n } else {\r\n redirect(current_url());\r\n }\r\n }\r\n }", "title": "" }, { "docid": "b63304172faecfff5b0cc83422881739", "score": "0.64051783", "text": "public function add(){\n $this->load->database();\n $data_insertar = $this->input->post();\n unset($data_insertar['btn_enviar']);\n $this->db->insert('pacientes',data_insertar);\n }", "title": "" }, { "docid": "c618ae69db046c0dcec8319ce51d1198", "score": "0.6404072", "text": "public function insert(){\n if($this->db->insert($_POST)){\n showmessage(\"添加成功\",\"?m=test&c=test&a=init\");\n }\n }", "title": "" }, { "docid": "a27deff6f542b387fa0a7fcce3ec9cd5", "score": "0.6401918", "text": "public function insert()\n {\n \n }", "title": "" }, { "docid": "7b1eee6a09cce571df95630a415b2e15", "score": "0.6396799", "text": "function insert($table, Model $model);", "title": "" }, { "docid": "a448eb605ded57d41d9e5f85b3b6184b", "score": "0.639636", "text": "function get_insertnilai($data){\n \t$this->db->insert($this->tablenilai, $data);\n \treturn TRUE;\n }", "title": "" }, { "docid": "1b3e455039ff56fd643a99c67e386ec5", "score": "0.6396222", "text": "public function insertdata()\n {\n foreach($this->table as $fields)\n {\n $inputdata[$fields->COLUMN_NAME] = $this->input->post($fields->COLUMN_NAME);\n };\n $this->datainsertion($inputdata, \"insert\", null);\n }", "title": "" }, { "docid": "4d46034ec8b855c053fc361b015a5317", "score": "0.6395531", "text": "public static function AddNew($oTolva){\n\t\t$query = \"SELECT MAX(tolvaID) FROM crm_tolva\";\n\t\t$result = parent::GetResult($query);\n\t\t$oTolva->tolvaID = parent::fetchScalar($result)+1;\n\n\t\t//Insert data to table\n\t\t$query = \"INSERT INTO crm_tolva(tolvaID,chiID,numActaInspeccion,embarcacionID,nombreEmbarcacion,tmDescargado,capacidadBodega,excesoBodega,porcentajeExceso,ro,fechaInicial,horaInicio,fechaFinal,horaTermino,nroReportePesaje,nroTolva,inspectorID,nombreInspector,pruebaPesaje,conforme,numReportePesaje,horaReportePesaje,obsInusual,fechaRegistro,pregunta6,pregunta7,pregunta8,pregunta9,pregunta10)\n\t\tVALUES('$oTolva->tolvaID','$oTolva->chiID','$oTolva->numActaInspeccion','$oTolva->embarcacionID','$oTolva->nombreEmbarcacion','$oTolva->tmDescargado','$oTolva->capacidadBodega','$oTolva->excesoBodega','$oTolva->porcentajeExceso','$oTolva->ro','$oTolva->fechaInicial','$oTolva->horaInicio','$oTolva->fechaFinal','$oTolva->horaTermino','$oTolva->nroReportePesaje','$oTolva->nroTolva','$oTolva->inspectorID','$oTolva->nombreInspector','$oTolva->pruebaPesaje','$oTolva->conforme','$oTolva->numReportePesaje','$oTolva->horaReportePesaje','$oTolva->obsInusual', NOW(),'$oTolva->pregunta6','$oTolva->pregunta7','$oTolva->pregunta8','$oTolva->pregunta9','$oTolva->pregunta10')\";\n\t\treturn parent::Execute($query);\n\t\t//echo $query;\n\t}", "title": "" }, { "docid": "c59b214a05d4ec76a7f12b62b8f38ad9", "score": "0.6392602", "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": "ed7a35309f329941a4b447d1c124b155", "score": "0.6386901", "text": "public function insert()\n {\n\n if ($this->isPkAutoIncrement) {\n $this->id = \"\";\n }\n\n\n $giorno = $this->parseValue($this->giorno, 'notNumber');\n $sql1 =\n<<< SQL\n SELECT *\n FROM odl\n WHERE IDOperaio=$this->idoperaio AND Giorno=$giorno\nSQL;\n $this->resetLastSqlError();\n $result1 = $this->query($sql1);\n $this->lastSql = $sql1;\n\n if ($result1->num_rows == '0') {\n $sql =\n<<< SQL\n INSERT INTO odl\n (Giorno, IDOperaio)\n VALUES\n ({$this->parseValue($this->giorno, 'notNumber')},\n\t\t\t {$this->parseValue($this->idoperaio)})\nSQL;\n $this->resetLastSqlError();\n $result = $this->query($sql);\n $this->lastSql = $sql;\n\n if (!$result) {\n // $this->lastSqlError = $this->sqlstate . \" - \". $this->error;\n } else {\n $this->allowUpdate = true;\n\n if ($this->isPkAutoIncrement) {\n $this->id = $this->insert_id;\n }\n\n }\n return $result;\n } else {\n $this->lastSqlError = $this->sqlstate . \" - \". $this->error;\n // return $result1;\n }\n }", "title": "" }, { "docid": "9441b7fc79696c92d51954e6822b4088", "score": "0.6386231", "text": "public function save(): void\n {\n // Si l'objet n'existe pas encore en base de données\n if (is_null($this->getId())) {\n // Crée un nouvel enregistrement en base de données correspondant à cet objet\n $this->insert();\n // Sinon\n } else {\n // Met à jour les propriétés de l'enregistrement existant correspondant à cet objet\n $this->update();\n }\n }", "title": "" }, { "docid": "8f6817a0428fe25616633068382e34ae", "score": "0.63851005", "text": "public function insert($ventas);", "title": "" }, { "docid": "da49e081a4eb02a18bb832f373d94641", "score": "0.6384403", "text": "public function save()\n {\n if ($this->exists()) {\n $this->update(); // update the table\n } else {\n $this->create(); // create the table\n }\n }", "title": "" }, { "docid": "367d76bb9e8d5b956d97964cae0ef0db", "score": "0.63826513", "text": "public function insert($tblForm2551m);", "title": "" }, { "docid": "496dfd32d531a6a6888f279e87aab20e", "score": "0.63787067", "text": "public abstract function insert($table, array $fields = [], $returnRow = false);", "title": "" }, { "docid": "df4381fb8446a4b110b009366259baa1", "score": "0.6370741", "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": "07e1299ca373dedf20dea596b8f20b57", "score": "0.6369662", "text": "public function insertar(){\n $this -> Conexion -> abrir();\n $this -> Conexion -> ejecutar( $this -> InventaristaDAO -> insertar());\n $res = $this -> Conexion -> filasAfectadas();\n $this -> Conexion -> cerrar();\n return $res;\n }", "title": "" }, { "docid": "6bbf8a2df3a1e9880dc410ba2ec03105", "score": "0.63651127", "text": "function inserare($conn, $tabel, $campuri, $valori){\r\n\t$sql = \"INSERT INTO \".$tabel.\" (\".$campuri.\") VALUES (\".$valori.\")\";\r\n\t$stmt = $conn->prepare($sql);\r\n\tif($stmt->execute()){\r\n\t\treturn 1;\r\n\t}\r\n}", "title": "" }, { "docid": "21b0e0fe62f7d6ca17eea2e27c7e4361", "score": "0.636493", "text": "public function Insert(){\n $pdo = Conecta::getPdo();\n $sql = \"INSERT INTO $this->table (idestado, estado ) VALUES \" \n . \"(NULL, ?)\";\n $consulta = $pdo->prepare($sql);\n $consulta ->bindValue(1, $this->getEstado() );\n $consulta ->execute();\n $last = $pdo->lastInsertId();\n }", "title": "" }, { "docid": "e4b373f09efb6f728bdc637af5ba8ac1", "score": "0.63590705", "text": "public function insertarRegistroTabla($datos){\n global $DB;\n\n $query = \"INSERT INTO rel_partida_jugador_tablas (\n id_partida, id_jugador, idcarta, poseedor_id\n ) VALUES ( ?, ?, ?, ? )\";\n $res = $DB->query( $query, array(\n $datos[\"id_partida\"],\n $datos[\"id_jugador\"],\n $datos[\"idcarta\"],\n $datos[\"poseedor_id\"],\n ));\n }", "title": "" }, { "docid": "eeedbb95233ff8aff25dfb94db81e748", "score": "0.63565063", "text": "function insert($table_name, $data)\n {\n }", "title": "" }, { "docid": "b055791dfbfca2526ccfe9dfae38f1dc", "score": "0.63539124", "text": "protected function _insert()\n {\n $this->_preInsert();\n\n $columns = static::getTableColumns(false);\n $columnSql = implode(', ', $columns);\n // Die benannten Parameter in SQL benötigen einen : vor dem Namen,\n // also müssen wir das im implode() einbauen\n $parameterSql = ':' . implode(', :', $columns);\n\n $sql = sprintf(\n 'INSERT INTO %s (%s) VALUES (%s)',\n static::getTableName(),\n $columnSql,\n $parameterSql\n );\n \n $db = Database::getInstance();\n $statement = $db->prepare($sql);\n // nicht die ID ins Array aufnehmen!\n $statement->execute($this->toArray(false));\n \n // da das Objekt nun gespeichert ist, muss auch das Attribut ID gesetzt sein.\n $this->setId(intval($db->lastInsertId()));\n\n $this->_postInsert();\n }", "title": "" }, { "docid": "9af62ac7c241063cb85425af4dd1fb32", "score": "0.6348699", "text": "public function nuevoLibro()\n {\n $this->db->set($this);\n $this->db->insert($this->db->dbprefix . 'libro');\n }", "title": "" }, { "docid": "75eb29710e6a79ebff22e8f53c842264", "score": "0.6344611", "text": "public function insert( $bject)\n {\n }", "title": "" }, { "docid": "d1dbf806be8c9803039d4becbcaff909", "score": "0.6340262", "text": "function insert($tableName, $dataToInsert)\r\n{\r\n try {\r\n Capsule::table($tableName)->insert($dataToInsert);\r\n\r\n } catch (\\Exception $e) {\r\n showException('DataBase Exception', array($e->getMessage()));\r\n }\r\n}", "title": "" }, { "docid": "8a33cbe6ab04a7da2353b69d50a5acfc", "score": "0.6336477", "text": "function insertar($data)\n {\n // $data['updated'] = date(\"Y-m-d H:i:s\");\n if($this->db->insert($this->tabla, $data))\n {\n $inserted = $this->db->insert_id();\n\t\t /*\n $evento['aviso'] = \"Nuevo \".$this->objeto.\" creado\";\n $evento['fecha'] = $data['created'];\n $evento['url'] = $this->controlador.\"/editar/\".$inserted;\n $evento['created'] = $data['created'];\n $evento['updated'] = $data['created'];\n \n $this->Evento->insertar($evento);\n\t\t */\n }\n return true;\n }", "title": "" }, { "docid": "ecea0093dfbb3bf2fc6d42816d609e4f", "score": "0.63307315", "text": "public function insert()\n {\n\n }", "title": "" }, { "docid": "c78860bc8a9102b94f2dec4fb5a0dfc9", "score": "0.6330524", "text": "public function insert()\n\t{\n\t\t\n\t\t//capturo p ve se houve erro ou n\n\t\ttry{\n\t\t\t//metodo insert q si trova nella model\n\t\t\tArticolo::insert($_POST);\n\t\t\techo '<script>alert(\"Articolo inserito con successo!\");</script>';\n\t\t\t//envio o admin pra page q mostra todas as publicacoes\n\t\t\techo '<script>location.href=\"/SimpleMVC/?pagina=admin&metodo=index\"</script>';\n\n\t\t}catch(Exception $e) {\n\t\t\techo '<script>alert(\"'.$e->getMessage().'\");</script>';\n\t\t\t//COMO DEU ERRO MANDA DE VOLT PRO CREATE p inserir den\n\t\t\techo '<script>location.href=\"/SimpleMVC/?pagina=admin&metodo=create\"</script>';\n\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "3672265e17e9cf8872ef46042301cea0", "score": "0.63304037", "text": "function add(){\n\t\t\t$this->insertData($this->getTblWard(),$this->getArrayDatas());\n\t}", "title": "" }, { "docid": "d4b9e390b0ffab896f7109b8f8e0edeb", "score": "0.6317757", "text": "public function insert($tblDescuento){\r\n\t\t$sql = 'INSERT INTO tbl_descuento (fecha, id_tipo_descuento, id_empleado) VALUES (?, ?, ?)';\r\n\t\t$qpos = 0;\r\n\t\t\n\t\t$qpos = strpos($sql, '?', $qpos + 1);\n\t\tif ((!isset($tblDescuento->fecha)) || is_null($tblDescuento->fecha))\n\t\t\t$sql = substr_replace($sql, 'NULL', $qpos, 1);\n\t\t$qpos = strpos($sql, '?', $qpos + 1);\n\t\tif ((!isset($tblDescuento->idTipoDescuento)) || is_null($tblDescuento->idTipoDescuento))\n\t\t\t$sql = substr_replace($sql, 'NULL', $qpos, 1);\n\t\t$qpos = strpos($sql, '?', $qpos + 1);\n\t\tif ((!isset($tblDescuento->idEmpleado)) || is_null($tblDescuento->idEmpleado))\n\t\t\t$sql = substr_replace($sql, 'NULL', $qpos, 1);\n\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\t\n\t\tif ((isset($tblDescuento->fecha)) && (!is_null($tblDescuento->fecha)))\n\t\t\t$sqlQuery->set($tblDescuento->fecha);\n\t\tif ((isset($tblDescuento->idTipoDescuento)) && (!is_null($tblDescuento->idTipoDescuento)))\n\t\t\t$sqlQuery->setNumber($tblDescuento->idTipoDescuento);\n\t\tif ((isset($tblDescuento->idEmpleado)) && (!is_null($tblDescuento->idEmpleado)))\n\t\t\t$sqlQuery->setNumber($tblDescuento->idEmpleado);\n\r\n\t\t$id = $this->executeInsert($sqlQuery);\t\r\n\t\t$tblDescuento->idDescuento = $id;\r\n\t\treturn $id;\r\n\t}", "title": "" }, { "docid": "a1da080f8a52cf818568324830436773", "score": "0.6316959", "text": "static public function mdlRegistrarReserva($tabla, $datos){\r\n\r\n\t\t$stmt = Conexion::conectar()->prepare(\"INSERT INTO $tabla(fechaDeLaReserva,reservaIdentificador,idHotel,idRestaurante,nombreRestaurante,apellido,hora,estado,usuario,habitacion,pax,ticket,fechaLimite,observaciones,origen) VALUES (:fechaReserva,:reservaIdentificador,:idHotel,:idRestaurante,:nombreRestaurante,:apellido,:hora,:estado,:usuario,:habitacion,:pax,:ticket, :fechaLimiteRSV,:observaciones,:origen)\");\r\n\r\n\t\t$stmt -> bindParam(\":fechaReserva\", $datos[\"fechaReserva\"], PDO::PARAM_STR);\r\n\t\t$stmt -> bindParam(\":reservaIdentificador\", $datos[\"reservaIdentificador\"], PDO::PARAM_STR);\r\n\t\t$stmt -> bindParam(\":idHotel\", $datos[\"idHotel\"], PDO::PARAM_INT);\r\n\t\t$stmt -> bindParam(\":idRestaurante\", $datos[\"idRestaurante\"], PDO::PARAM_INT);\r\n\t\t$stmt -> bindParam(\":nombreRestaurante\", $datos[\"nombreRestaurante\"], PDO::PARAM_STR);\r\n\t\t$stmt -> bindParam(\":apellido\", $datos[\"apellido\"], PDO::PARAM_STR);\r\n\t\t$stmt -> bindParam(\":hora\", $datos[\"horario\"], PDO::PARAM_STR);\r\n\t\t$stmt -> bindParam(\":estado\", $datos[\"estado\"], PDO::PARAM_STR);\r\n\t\t$stmt -> bindParam(\":usuario\", $datos[\"usuario\"], PDO::PARAM_STR);\r\n\t\t$stmt -> bindParam(\":habitacion\", $datos[\"habitacion\"], PDO::PARAM_STR);\r\n\t\t$stmt -> bindParam(\":pax\", $datos[\"pax\"], PDO::PARAM_INT);\r\n\t\t$stmt -> bindParam(\":ticket\", $datos[\"ticket\"], PDO::PARAM_STR);\r\n\t\t$stmt -> bindParam(\":fechaLimiteRSV\", $datos[\"fechaLimiteRSV\"], PDO::PARAM_STR);\r\n\t\t$stmt -> bindParam(\":observaciones\", $datos[\"observaciones\"], PDO::PARAM_STR);\r\n\t\t$stmt -> bindParam(\":origen\", $datos[\"origen\"], PDO::PARAM_STR);\r\n\r\n\t\tif ($stmt->execute()) {\r\n\t\t\t\r\n\t\t\treturn \"OK\";\r\n\t\t}else {\r\n\t\t\treturn \"ERROR\";\r\n\t\t}\r\n\r\n\t\t$stmt-> close();\r\n\r\n\t\t$stmt = null;\r\n\t}", "title": "" }, { "docid": "a4f7380c757e32e249a4798d93aebedc", "score": "0.6310592", "text": "public function insert()\n {\n }", "title": "" }, { "docid": "6a0b7acf959278210c04d0d64ff54a68", "score": "0.6309546", "text": "public function nuevoIndicador(){\n\t\t$codigo = $this->request->getPost('codigo');\n\t\t$nombre = $this->request->getPost('nombre');\n\t\t$medida = $this->request->getPost('medida');\n\t\t$fecha = $this->request->getPost('fecha');\n\t\t$valor = $this->request->getPost('valor');\n\t\t$fecha = date('Y-m-d', strtotime($fecha));\n\n\t\t$data = [\"codigo\"=>$codigo,\"nombre\"=>$nombre,\"id_unidad_medida\"=>$medida,\"fecha\"=>$fecha,\"valor\"=>$valor];\n\t\t$resultado = $this->indicador->set_inserta_datos($data);\n\t\techo $resultado;\n\t\t\n\n\t}", "title": "" }, { "docid": "f014cedcf549e9bf301678660f88baf5", "score": "0.63070273", "text": "function save($table = null, $data = null) {\n $database = open_database();\n\n $sql = \"INSERT INTO empresas (nome, contato, imagem, cod_usuario)\n VALUES ('{$_POST[\"nome\"]}', '{$_POST[\"contato\"]}', '{$_POST[\"imagem\"]}', '{$_POST[\"cod_usuario\"]}')\";\n $database->query($sql);\n\n close_database($database);\n}", "title": "" }, { "docid": "da5cb119ab65c60317294e2d89cf0093", "score": "0.6306112", "text": "function insertNewRecord($f){\n\t\tglobal $db;\n\t\t\n\t\t$sql= \"INSERT INTO m_poly SET \"\n\t\t\t\t.\"kode='\".$f['v_kode'].\"', \"\n\t\t\t\t.\"nama='\".$f['v_nama'].\"' \";\n\t\t\t\t\n\t\tPerson::events($sql);\n\t\t$res =& $db->query($sql);\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "a45dffcf309f940be2cac083d50f39d4", "score": "0.63023186", "text": "public function insertar(){\n $mysqli = new mysqli(Config::BBDD_HOST, Config::BBDD_USUARIO, Config::BBDD_CLAVE, Config::BBDD_NOMBRE);\n //Arma la query\n $sql = \"INSERT INTO ventas (\n fk_idcliente,\n fk_idproducto, \n fecha, \n cantidad,\n preciounitario,\n total\n ) VALUES (\n \" . $this->fkCliente .\",\n \" . $this->fkProducto .\", \n '\" . $this->fecha .\" \" . $this->hora . \":\" . date(\"s\") . \"', \n \" . $this->cantidad . \", \n \" . $this->precioUnitario .\", \n \" . $this->total .\"\n );\";\n //Ejecuta la query\n if (!$mysqli->query($sql)) {\n /*printf(\"Error en query: %s\\n\", $mysqli->error . \" \" . $sql);*/\n $this->msg = \"Error insertando una nueva venta.\";\n $this->accion = false;\n }\n //Obtiene el id generado por la inserción\n $this->idVenta = $mysqli->insert_id;\n //Cierra la conexión\n $mysqli->close();\n }", "title": "" }, { "docid": "1acca38fe3de880326e6b1c90a904279", "score": "0.630162", "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": "2c747b1ba805d64c782bf9d9f6495ad8", "score": "0.62998974", "text": "public function insert($table, $data)\n {\n $this->setTable($table);\n $query = $this;\n $this->setColumnArr($query,$data);\n $req = $query->save();\n return $req;\n }", "title": "" }, { "docid": "f960bf51e3ee2145ef9b5cb79020a6a5", "score": "0.6298884", "text": "public function Do_insert_Example1(){\n\n\t}", "title": "" }, { "docid": "105c33f72fd3dd041e153f4e8a377e7c", "score": "0.62950635", "text": "public function insert($historialmascota);", "title": "" }, { "docid": "c11bb902b1a0b30f0332a0e91a013713", "score": "0.62918264", "text": "public function insert($maestro);", "title": "" }, { "docid": "52c71577a888fb4737608c7f75e64857", "score": "0.6287489", "text": "public function insertar()\n {\n // Realiza la validacion de los campos\n $this->validate(request(),\n [\n 'cedula'=> ['required', 'max:12'],\n 'nombre'=> ['required', 'max:150'],\n 'telefono'=> ['required', 'max:8'],\n 'correo'=> ['required', 'max:150'],\n 'direccion'=> ['required', 'max:300'],\n 'usuario'=> ['required', 'max:50'],\n 'contrasena'=> ['required', 'max:50'],\n ]);\n\n $data = request()->all();\n\n Empresa::create($data);\n\n return redirect()->to('empresa/listar');\n }", "title": "" }, { "docid": "20c45920527aadcb56c356a08bd70f40", "score": "0.6284581", "text": "public function insert(Trabalho $trabalho){\n $sql = \"insert into tbl_trabalho (arquivo, idEntrega, data, matricula) values(\n '\".$trabalho->getArquivo().\"', \".$trabalho->getIdEntrega().\", '\".$trabalho->getData().\"', \".$trabalho->getMatriculaAluno().\")\";\n\n $conex = new conexaoMySql();\n $PDO_conex = $conex->conectDatabase();\n\n if ($PDO_conex->query($sql))\n echo \"Inserido com sucesso\";\n else\n echo(\"Erro no script do insert\");\n\n $conex->closeDatabase();\n }", "title": "" }, { "docid": "af0a140a7ebcd3c07f8912929e58f3fb", "score": "0.62799335", "text": "function form_insert($data){\n$this->db->insert('suivi', $data);\n }", "title": "" }, { "docid": "98732448693e8987ce75524f0617e10e", "score": "0.62733763", "text": "protected function insert()\n {\n $this->setDefaultDataValues();\n\n $fields = $this->getEditableFields();\n\n $placeholders = array_map(function($field) { return \":$field\"; }, $fields);\n\n $sql = 'INSERT INTO ' . static::$table_name . ' ';\n $sql .= '(' . join(', ', $fields) . ')';\n $sql .= ' VALUES ';\n $sql .= '(' . join(', ', $placeholders) . ')';\n\n $parameters = array();\n\n for ($i = 0; $i < count($fields); $i++)\n {\n $parameters[$placeholders[$i]] = $this->data[$fields[$i]];\n }\n\n $db = SQLite::getInstance();\n\n $sth = $db->prepare($sql);\n $success = $sth->execute($parameters);\n\n if (!$success)\n {\n return null;\n }\n\n $last_insert_id = intval($db->lastInsertId());\n\n $this->data[static::$primary_key] = $last_insert_id;\n\n return $last_insert_id;\n }", "title": "" }, { "docid": "d070fa4638735c2f4fa158467adf9fd6", "score": "0.6269187", "text": "public function insert()\n {\n $tableName = static::getTableName();\n\n $params = [];\n $columns = [];\n\n foreach ($this as $key => $value) {\n\n if ($key == \"db\" || $key == \"id\") continue;\n $params[\":{$key}\"] = $value;\n $columns[] = \"`$key`\";\n\n }\n\n $columns = implode(\", \", $columns);\n $value = implode(\", \", array_keys($params));\n\n $sql = \"INSERT INTO {$tableName} ({$columns}) VALUES ({$value})\";\n\n //var_dump($sql, $params);\n\n Db::getInstance()->execute($sql, $params);\n\n $this->id = Db::getInstance()->lastInsertId();\n }", "title": "" }, { "docid": "efc41144d5774962bc832594a3373db5", "score": "0.62684524", "text": "public function save() {\n try {\n if (!$this->inDb) {\n $this->id = App::$cur->db->insert(static::$tableName, $this->__params);\n $this->inDb = true;\n }\n } catch (PDOException $e) {\n if ($e->getCode() == '42S02') {\n static::createTable();\n $this->save();\n } else {\n throw $e;\n }\n }\n }", "title": "" }, { "docid": "aec2416c85904a7df3ccbdde0e9a9264", "score": "0.6267187", "text": "public function save(){\n \n $table = self::table;\n $conn = new Conn();\n\n if($this->id == null){\n $conn->insert($table,$this->toArray());\n }else{\n $conn->updateById($table,$this->id,$this->toArray());\n } \n }", "title": "" } ]
73f500f44be57a8c902fc2c37180f8e9
Register the modules aliases.
[ { "docid": "432e6881bb9f9c1700bbc2308186015c", "score": "0.5741443", "text": "private function bootModules()\n {\n foreach ($this->app['modules']->enabled() as $module) {\n $this->registerViewNamespace($module);\n $this->registerLanguageNamespace($module);\n $this->registerConfigNamespace($module);\n }\n }", "title": "" } ]
[ { "docid": "c660eba62cf51ac8bd9e60908bdc0417", "score": "0.73389024", "text": "private function registerAliases()\n\t{\n\t\t$loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n\n\t\t$loader->alias('TenantManager', \\EMedia\\MultiTenant\\Facades\\TenantManager::class);\n\t}", "title": "" }, { "docid": "c20130638c66a3665b3ff852b2ea32f3", "score": "0.7098821", "text": "public function aliasLoader()\n {\n $aliases = Config::get('app::aliases');\n\n $this -> aliases = array_merge($aliases, $this -> aliases);\n\n AliasLoaderHandler::getInstance($this -> aliases) -> register();\n\n }", "title": "" }, { "docid": "d026cfc3d5c836a0be43ddde2c8fe667", "score": "0.6771074", "text": "public function setAliases()\n {\n $this->app->booting( function()\n {\n $loader = AliasLoader::getInstance();\n \n // Facades\n $loader->alias('Field', 'App\\Anm\\src\\field\\FieldFacade');\n });\n }", "title": "" }, { "docid": "81e30ba061c4f59a6db76d9b508f8468", "score": "0.64067096", "text": "protected function registerCoreContainerAliases()\n {\n foreach ([\n 'web:handler' => [\n \\Genv\\Web\\Handlers\\PackageHandler::class,\n ],\n 'web:dev-handler' => [\n \\Genv\\Web\\Handlers\\DevPackageHandler::class,\n ],\n ] as $abstract => $aliases) {\n foreach ($aliases as $alias) {\n $this->app->alias($abstract, $alias);\n }\n }\n }", "title": "" }, { "docid": "a25fdd29bceeed70b5443bac0e49c8bc", "score": "0.6314814", "text": "protected function loadAlias(): void\n {\n\n $loader = AliasLoader::getInstance();\n $loader->alias('Facilitador', FacilitadorFacade::class);\n\n\n }", "title": "" }, { "docid": "026a773c3d419e25dd3c57a1b6df86ca", "score": "0.6310203", "text": "public function registerCoreContainerAliases()\n {\n $aliases = [\n 'app' => ['Illuminate\\Foundation\\Application', 'Illuminate\\Contracts\\Container\\Container', 'Illuminate\\Contracts\\Foundation\\Application'],\n 'auth' => ['Illuminate\\Auth\\AuthManager', 'Illuminate\\Contracts\\Auth\\Factory'],\n 'auth.driver' => ['Illuminate\\Contracts\\Auth\\Guard'],\n 'blade.compiler' => ['Illuminate\\View\\Compilers\\BladeCompiler'],\n 'cache' => ['Illuminate\\Cache\\CacheManager', 'Illuminate\\Contracts\\Cache\\Factory'],\n 'cache.store' => ['Illuminate\\Cache\\Repository', 'Illuminate\\Contracts\\Cache\\Repository'],\n 'config' => ['Illuminate\\Config\\Repository', 'Illuminate\\Contracts\\Config\\Repository'],\n 'cookie' => ['Illuminate\\Cookie\\CookieJar', 'Illuminate\\Contracts\\Cookie\\Factory', 'Illuminate\\Contracts\\Cookie\\QueueingFactory'],\n 'encrypter' => ['Illuminate\\Encryption\\Encrypter', 'Illuminate\\Contracts\\Encryption\\Encrypter'],\n 'db' => ['Illuminate\\Database\\DatabaseManager'],\n 'db.connection' => ['Illuminate\\Database\\Connection', 'Illuminate\\Database\\ConnectionInterface'],\n 'events' => ['Illuminate\\Events\\Dispatcher', 'Illuminate\\Contracts\\Events\\Dispatcher'],\n 'files' => ['Illuminate\\Filesystem\\Filesystem'],\n 'filesystem' => ['Illuminate\\Filesystem\\FilesystemManager', 'Illuminate\\Contracts\\Filesystem\\Factory'],\n 'filesystem.disk' => ['Illuminate\\Contracts\\Filesystem\\Filesystem'],\n 'filesystem.cloud' => ['Illuminate\\Contracts\\Filesystem\\Cloud'],\n 'hash' => ['Illuminate\\Contracts\\Hashing\\Hasher'],\n 'translator' => ['Illuminate\\Translation\\Translator', 'Symfony\\Component\\Translation\\TranslatorInterface'],\n 'log' => ['Illuminate\\Log\\Writer', 'Illuminate\\Contracts\\Logging\\Log', 'Psr\\Log\\LoggerInterface'],\n 'mailer' => ['Illuminate\\Mail\\Mailer', 'Illuminate\\Contracts\\Mail\\Mailer', 'Illuminate\\Contracts\\Mail\\MailQueue'],\n 'auth.password' => ['Illuminate\\Auth\\Passwords\\PasswordBrokerManager', 'Illuminate\\Contracts\\Auth\\PasswordBrokerFactory'],\n 'auth.password.broker' => ['Illuminate\\Auth\\Passwords\\PasswordBroker', 'Illuminate\\Contracts\\Auth\\PasswordBroker'],\n 'queue' => ['Illuminate\\Queue\\QueueManager', 'Illuminate\\Contracts\\Queue\\Factory', 'Illuminate\\Contracts\\Queue\\Monitor'],\n 'queue.connection' => ['Illuminate\\Contracts\\Queue\\Queue'],\n 'queue.failer' => ['Illuminate\\Queue\\Failed\\FailedJobProviderInterface'],\n 'redirect' => ['Illuminate\\Routing\\Redirector'],\n 'redis' => ['Illuminate\\Redis\\Database', 'Illuminate\\Contracts\\Redis\\Database'],\n 'request' => ['Illuminate\\Http\\Request', 'Symfony\\Component\\HttpFoundation\\Request'],\n 'router' => ['Illuminate\\Routing\\Router', 'Illuminate\\Contracts\\Routing\\Registrar'],\n 'session' => ['Illuminate\\Session\\SessionManager'],\n 'session.store' => ['Illuminate\\Session\\Store', 'Symfony\\Component\\HttpFoundation\\Session\\SessionInterface'],\n 'url' => ['Illuminate\\Routing\\UrlGenerator', 'Illuminate\\Contracts\\Routing\\UrlGenerator'],\n 'validator' => ['Illuminate\\Validation\\Factory', 'Illuminate\\Contracts\\Validation\\Factory'],\n 'view' => ['Illuminate\\View\\Factory', 'Illuminate\\Contracts\\View\\Factory'],\n ];\n\n foreach ($aliases as $key => $aliases) {\n foreach ($aliases as $alias) {\n $this->alias($key, $alias);\n }\n }\n }", "title": "" }, { "docid": "43b19d43ba1333a601ab2020023bbc6d", "score": "0.62840956", "text": "protected function loadAlias()\n\t{\n\t $this->royalcms->booting(function()\n\t {\n\t $loader = \\Royalcms\\Component\\Foundation\\AliasLoader::getInstance();\n\t $loader->alias('RC_Rewrite', 'Royalcms\\Component\\Rewrite\\Facades\\Rewrite');\n\t });\n\t}", "title": "" }, { "docid": "7e499f2d6b3d3b4707fdcb5170f548b5", "score": "0.619554", "text": "protected abstract function registerModules();", "title": "" }, { "docid": "cc56986448e238dc3fd679d022616568", "score": "0.61473066", "text": "protected function loadAlias()\n\t{\n\t $this->royalcms->booting(function()\n\t {\n\t $loader = \\Royalcms\\Component\\Foundation\\AliasLoader::getInstance();\n\t $loader->alias('RC_Timer', 'Royalcms\\Component\\Timer\\Facades\\Timer');\n\t });\n\t}", "title": "" }, { "docid": "abce66cdb044bb0cbb79341b76896eea", "score": "0.6131708", "text": "public function registerClassAliases()\n {\n return [\n \\Winter\\Twitter\\Plugin::class => \\RainLab\\Twitter\\Plugin::class,\n \\Winter\\Twitter\\Classes\\TwitterClient::class => \\RainLab\\Twitter\\Classes\\TwitterClient::class,\n \\Winter\\Twitter\\Components\\FollowButton::class => \\RainLab\\Twitter\\Components\\FollowButton::class,\n \\Winter\\Twitter\\Components\\Favorites::class => \\RainLab\\Twitter\\Components\\Favorites::class,\n \\Winter\\Twitter\\Components\\TweetButton::class => \\RainLab\\Twitter\\Components\\TweetButton::class,\n \\Winter\\Twitter\\Components\\LatestTweet::class => \\RainLab\\Twitter\\Components\\LatestTweet::class,\n \\Winter\\Twitter\\Components\\EmbedTweet::class => \\RainLab\\Twitter\\Components\\EmbedTweet::class,\n \\Winter\\Twitter\\Components\\EmbedTimeline::class => \\RainLab\\Twitter\\Components\\EmbedTimeline::class,\n \\Winter\\Twitter\\Models\\Settings::class => \\RainLab\\Twitter\\Models\\Settings::class,\n ];\n }", "title": "" }, { "docid": "81a682b1a53c9a0022b85d7c1b25c087", "score": "0.6066669", "text": "public function register()\n {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n \n $loader->alias('Event', 'Facades\\Asabanovic\\Events\\Model\\Event');\n $loader->alias('Comment', 'Facades\\Asabanovic\\Events\\Model\\Comment');\n\n }", "title": "" }, { "docid": "b0ca2a4039256e0938e8e2f6fc3a9014", "score": "0.6054061", "text": "protected function registerAlias() {\n $this->app->alias(PerfectlyCache::class, \"perfectly-cache\");\n }", "title": "" }, { "docid": "24d09269ac618482ef8ce2fbafce286d", "score": "0.6038233", "text": "private function loadAliasMap() {\n\t\t$this->classAliasMap = require $this->classPath . '../Migrations/Code/ClassAliasMap.php';\n\t\t$this->classAliasMap = array_merge($this->classAliasMap, require $this->classPath . '../Migrations/Code/CompatibilityClassAliasMap.php');\n\t}", "title": "" }, { "docid": "2972264650422d6ba1b6ccc847e8fe6d", "score": "0.603486", "text": "private function registerModules()\n {\n foreach ($this->app['modules']->enabled() as $module) {\n $this->registerVendorConfig($module);\n }\n }", "title": "" }, { "docid": "0fc315064a0b61e16741e6304a0d0033", "score": "0.5980224", "text": "public function register()\n {\n foreach ($this->bindings as $interface => $service) {\n $this->app->bind($interface, $service);\n }\n\n foreach ($this->converseFacades as $alias => $class) {\n $this->app->booting(function() use ($alias, $class) {\n $loader = AliasLoader::getInstance();\n $loader->alias($alias, $class);\n });\n }\n }", "title": "" }, { "docid": "069ab8f210d5e9d08d3d4846d0b80490", "score": "0.59611386", "text": "public function register()\n {\n // modules Helpers folders.\n foreach (Module::enabled() as $module) {\n $this->registerHelpers( $module );\n }\n }", "title": "" }, { "docid": "4b1cf96f095478cdb0659428e846d387", "score": "0.59161264", "text": "public function alias()\n\t{\n\t\treturn array(\n\t\t\t'action_admin_theme_get_addons' => 'action_admin_theme_post_addons',\n\t\t\t'action_admin_theme_get_version_iframe' => 'action_admin_theme_post_version_iframe',\n\t\t);\n\t}", "title": "" }, { "docid": "61a382da1fe932e5f3e73c483d59c2bb", "score": "0.5872797", "text": "public function registerInternals()\n {\n // register the namespaces to exposes to ClassLoader\n $this->loader->registerNamespaces(array(\n 'Direct' => $this->appPath.'/lib/vendor',\n 'Symfony' => $this->appPath.'/lib/vendor',\n 'actions' => $this->appPath,\n 'models' => $this->appPath\n ));\n\n // register PEAR like naming convention\n $this->loader->registerPrefixes(array(\n 'sfYaml' => $this->appPath.'/lib/vendor/sfYaml',\n 'Twig' => $this->appPath.'/lib/vendor',\n ));\n }", "title": "" }, { "docid": "2ffb76932d6ee12acd7a60a45179b0e2", "score": "0.58618873", "text": "public function registerDefinitions()\n {\n \\Yii::$container->set('im\\events\\EventEmitterInterface', 'im\\events\\EventEmitter');\n }", "title": "" }, { "docid": "95fc2d80f0ff8a854d575b11f354c0c7", "score": "0.5858404", "text": "public function registerAutoLoadAliasesClasses($sModuleName)\n {\n $aAutoLoadClasses = config(\"$sModuleName::autoload.aliases\");\n\n if (!empty($aAutoLoadClasses)) {\n foreach ($aAutoLoadClasses as $sKey => $sAutoLoadClass) {\n if (class_exists($sAutoLoadClass))\n $this->app->alias($sKey, $sAutoLoadClass);\n }\n }\n }", "title": "" }, { "docid": "684bef8f9fc603e767f1dab9738bf012", "score": "0.58108586", "text": "function ___modules () {\n $this->_register_event ( XS_MODULE, 'on_indexer_create' ) ;\n $this->_register_event ( XS_MODULE, 'on_indexer_read' ) ;\n $this->_register_event ( XS_MODULE, 'on_indexer_update' ) ;\n $this->_register_event ( XS_MODULE, 'on_indexer_delete' ) ;\n }", "title": "" }, { "docid": "f1646cd393545f752b05d135125ee3e2", "score": "0.5790726", "text": "public function registerAutoloaders(){\r\n\t\t$loader = new \\Phalcon\\Loader();\r\n\t\t\r\n\t\t$loader->registerNamespaces(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t\t'Modules\\Port\\Controller' => './app/Port/Controller/',\r\n\t\t\t\t\t\t'Modules\\Port\\Model' => './app/Port/Model/',\r\n\t\t\t\t)\r\n\t\t)->register();\r\n\t}", "title": "" }, { "docid": "45430e5d5581abbea19e1637970a855f", "score": "0.5766157", "text": "public function register()\n\t{\n ClientRepository::register(new LinkClient());\n PackageRepository::register(new LinkPackage());\n }", "title": "" }, { "docid": "9e6a39f225da846a900530ee6488e72e", "score": "0.575582", "text": "public function register()\n {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n $loader->alias('Adsbygoogle', \\Leonardcodep\\Adsbygoogle\\AdsbygoogleFacade::class);\n }", "title": "" }, { "docid": "222ad8a845c95f7bce572de7ab43874b", "score": "0.5735305", "text": "protected function makeAlias()\n {\n \t// For company\n AliasLoader::getInstance()->alias('Company', 'Sharenjoy\\Organization\\Facades\\Company');\n\n // For department\n AliasLoader::getInstance()->alias('Department', 'Sharenjoy\\Organization\\Facades\\Department');\n\n // For position\n AliasLoader::getInstance()->alias('Position', 'Sharenjoy\\Organization\\Facades\\Position');\n\n // For division\n AliasLoader::getInstance()->alias('Division', 'Sharenjoy\\Organization\\Facades\\Division');\n\n // For role\n AliasLoader::getInstance()->alias('Role', 'Sharenjoy\\Organization\\Facades\\Role');\n\n // For employee\n AliasLoader::getInstance()->alias('Employee', 'Sharenjoy\\Organization\\Facades\\Employee');\n\n // For organization\n AliasLoader::getInstance()->alias('Organization', 'Sharenjoy\\Organization\\Facades\\Organization');\n }", "title": "" }, { "docid": "13406cd206fa1c5342305005ac10e67f", "score": "0.571341", "text": "abstract public function registerLibraries();", "title": "" }, { "docid": "382fc571b440ecf47d106b5b85177876", "score": "0.5646024", "text": "public function register()\n {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n $loader->alias('Laravel\\Passport\\AuthCode', AuthCode::class);\n $loader->alias('Laravel\\Passport\\Client', Client::class);\n $loader->alias('Laravel\\Passport\\PersonalAccessClient', PersonalAccessClient::class);\n $loader->alias('Laravel\\Passport\\Token', Token::class);\n }", "title": "" }, { "docid": "f325eb61967107b50b9dea2a3e3c9acd", "score": "0.56312907", "text": "public function register()\n\t{\n\t\t$this->royalcms->bindShared('rewrite', function($royalcms)\n\t\t{\n\t\t\treturn new RewriteQuery();\n\t\t});\n\t\t\n\t\t// Load the alias\n\t\t$this->loadAlias();\n\t}", "title": "" }, { "docid": "890371fc45791738abd240006a2a4fc7", "score": "0.56166583", "text": "public function registerAutoloadingForEverythingElse()\n {\n $this->container->loader->get()->register();\n }", "title": "" }, { "docid": "371501c34f9b0e1f20aa0c4263a785cc", "score": "0.5594447", "text": "protected function registerServices()\n {\n $this->app->bindShared('modules.finder', function ($app)\n {\n return new Finder($app['files'], $app['config']);\n });\n\n $this->app->bindShared('modules', function ($app)\n {\n return new Module(\n $app['modules.finder'],\n $app['config'],\n $app['view'],\n $app['translator'],\n $app['files'],\n $app['html'],\n $app['url']\n );\n });\n\n $this->app->booting(function ($app)\n {\n $app['modules']->register();\n });\n }", "title": "" }, { "docid": "eb3f53290bae84c86b6cd36e41f563a2", "score": "0.55818635", "text": "public function register()\n {\n $models = ['User', 'Post', 'Team', 'Event', 'Poll', 'OpenSourceIdea', 'Chat', 'TaskBoard'];\n foreach($models as $model) {\n $this->app->bind(\"Itway\\\\Transformers\\\\{$model}Transformer\");\n }\n }", "title": "" }, { "docid": "a288364ee071bd51e15b4b132ba74a10", "score": "0.5575892", "text": "private function registerRepositories()\n {\n foreach ($this->repositories as $repository) {\n $this->app->bindIf(\n 'App\\\\Repositories\\\\Interfaces\\\\' . $repository . 'Interface',\n 'App\\\\Repositories\\\\Eloquents\\\\'. $repository\n );\n }\n }", "title": "" }, { "docid": "73ac80b67d9a914b946c00053c76773a", "score": "0.55597615", "text": "public function register()\n {\n //\n\t$this->registerGoutte();\n\n\t$this->registerAliases();\n }", "title": "" }, { "docid": "9a47bde920ec741bb936f32ee60e36b7", "score": "0.5549429", "text": "public function register()\n {\n //TODO: not working, so the user needs to register this alias.\n $this->app->alias('Random', 'Muathye\\UniqueRandomNumber\\Random');\n }", "title": "" }, { "docid": "6a5c7294cceab406ce2197b2fa17b299", "score": "0.5533571", "text": "public function register()\n {\n $this->registerHelper();\n $this->app->alias('medoo', 'absolutelydigital\\medoo');\n }", "title": "" }, { "docid": "f92be608fadf5168a30e225a2a0272ad", "score": "0.5530568", "text": "public function register()\n {\n $this->instances = [];\n\n foreach ($this->providers as $provider) {\n $this->instances[] = $this->phanda->register($provider);\n }\n }", "title": "" }, { "docid": "cb645cb45032f3dffa0ebdf129c8b92a", "score": "0.553008", "text": "private function register_modules() {\n laterpay_event_dispatcher()->add_subscriber( new LaterPay_Module_Appearance() );\n laterpay_event_dispatcher()->add_subscriber( new LaterPay_Module_Purchase() );\n laterpay_event_dispatcher()->add_subscriber( new LaterPay_Module_TimePasses() );\n laterpay_event_dispatcher()->add_subscriber( new LaterPay_Module_Subscriptions() );\n laterpay_event_dispatcher()->add_subscriber( new LaterPay_Module_Rates() );\n }", "title": "" }, { "docid": "1030340d198fe1fcaf847892b2733a4d", "score": "0.55136925", "text": "private static function _map_aliases()\r\n {\r\n if(empty(static::$_aliases_attributes_map))\r\n if(!empty(static::$_aliases_fields_map))\r\n static::$_aliases_attributes_map = array_flip (static::$_aliases_fields_map);\r\n \r\n if(empty(static::$_aliases_fields_map))\r\n if(!empty(static::$_aliases_attributes_map))\r\n static::$_aliases_fields_map = array_flip (static::$_aliases_attributes_map);\r\n }", "title": "" }, { "docid": "9ba2ac249eb51c1e64404e239ed4aaaf", "score": "0.55106235", "text": "public function addAliases(array $aliases)\n {\n foreach ($aliases as $alias => $id) {\n $this->setAlias($alias, $id);\n }\n }", "title": "" }, { "docid": "9ba2ac249eb51c1e64404e239ed4aaaf", "score": "0.55106235", "text": "public function addAliases(array $aliases)\n {\n foreach ($aliases as $alias => $id) {\n $this->setAlias($alias, $id);\n }\n }", "title": "" }, { "docid": "14f2b72bf9e39757c6959bb1be855c21", "score": "0.550201", "text": "public function register()\n {\n /*$this->loadSnippetsFrom(\n dirname(__DIR__). '/snippets/',\n $this->namespace\n );*/\n /*$this->loadChunksFrom(\n dirname(__DIR__) . '/chunks/',\n $this->namespace\n );*/\n $this->loadPluginsFrom(\n dirname(__DIR__) . '/plugins/'\n );\n //use this code for each module what you want add\n /*$this->app->registerModule(\n 'module from file',\n dirname(__DIR__).'/modules/module.php'\n );*/\n }", "title": "" }, { "docid": "ad2c1fb51f5e56f9276031fd00093336", "score": "0.54935855", "text": "public function setClassesAlias()\n {\n // Alias each class from $this->classesToRun\n foreach ($this->classesToRun as $class) {\n class_alias($class, (new \\ReflectionClass($class))->getShortName());\n }\n }", "title": "" }, { "docid": "9808766acad3c2402cf16c03c2e0271a", "score": "0.5470114", "text": "public function register()\n\t{\n\t\t// Track exceptions via Bugsnag\n\t\t$this->app->alias('bugsnag.multi', Log::class);\n\t\t$this->app->alias('bugsnag.multi', LoggerInterface::class);\n\t}", "title": "" }, { "docid": "d71430d9510c004ef677a1173d2ef06b", "score": "0.54389375", "text": "public static function getAliases();", "title": "" }, { "docid": "9e66737f073d91dfe81e92aea823dd41", "score": "0.5438345", "text": "protected function registerFacades(): void\n {\n /**\n * Product image.\n */\n $loader = AliasLoader::getInstance();\n\n $loader->alias('product_image', ProductImageFacade::class);\n\n $this->app->singleton('product_image', function () {\n return app()->make(ProductImage::class);\n });\n\n /**\n * Product video.\n */\n $loader->alias('product_video', ProductVideoFacade::class);\n\n $this->app->singleton('product_video', function () {\n return app()->make(ProductVideo::class);\n });\n }", "title": "" }, { "docid": "4d46ee171cab5b7b115eee45fd4c6b2b", "score": "0.54310596", "text": "function menu_alias_features_rebuild($module) {\n $items = module_invoke($module, 'menu_alias_default_settings');\n\n //import all variables referencing assets\n foreach ($items as $key => $menu_import) {\n //create menu based on alias path\n _import_menu_alias($key, $menu_import);\n }\n}", "title": "" }, { "docid": "b0999f7c29523a036ef5218df35162dd", "score": "0.5430847", "text": "public function registerFacades()\n\t{\n\t\tApp::bind('analytics', function() {\n\t\t\treturn new \\Booj\\EnterpriseCore\\Models\\Analytics\\AnalyticCodes;\n\t\t});\n\n\t\tApp::bind('seo', function() {\n\t\t\treturn new \\Booj\\EnterpriseCore\\Models\\Seo\\Seo;\n\t\t});\n\n\t\tApp::bind('site', function() {\n\t\t\treturn new \\Booj\\EnterpriseCore\\Models\\Site;\n\t\t});\n\n\t}", "title": "" }, { "docid": "5707a9bf8f4f868b63aece1d9788e80c", "score": "0.5415482", "text": "public function registerFacade() {\n\t\t$this->app->booting(function()\n\t\t{\n\t\t\t$loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n\t\t\t$loader->alias('Access', 'App\\Services\\Access\\Facades\\Access');\n\t\t});\n\t}", "title": "" }, { "docid": "50cf6bf57f6185f912121066643e786b", "score": "0.54126936", "text": "public function registerAlias($alias, $target);", "title": "" }, { "docid": "60a92d50cd4046653f69b77942415aa6", "score": "0.54114467", "text": "public function register()\n {\n $this->app->bind(\\Spatie\\MediaLibrary\\Media::class, \\Modules\\Core\\Entities\\Media::class);\n\n $this->registerModules();\n }", "title": "" }, { "docid": "2cbc129b26515872eb7911dbb9719065", "score": "0.5402556", "text": "public function register()\n {\n $this->publishConfig();\n $this->registerPlugin();\n AliasLoader::getInstance()->alias('Plugin', PluginFacade::class);\n }", "title": "" }, { "docid": "809bc767d0da13e9b22d26759a170c39", "score": "0.5393157", "text": "public function register()\n {\n // Регистрируем все файлы с хелперами для работы с DataStore или DataSource DevExtreme при загрузке проекта\n foreach (glob( Module::getModulePath('skill') .'/utils/DevExtreme'. '/*.php') as $file) {\n require_once $file;\n }\n spl_autoload_register(array(\"DevExtreme\\LoadHelper\", \"LoadModule\"));\n }", "title": "" }, { "docid": "2c9ca341a4a9f9898d820ce14a1b0af8", "score": "0.5388591", "text": "public function register()\r\n\t{\r\n\t\t$this->app['hotels-providers'] = $this->app->share(function($app)\r\n\t\t{\r\n $config = $app->config->get('expedia::config', array());\r\n\r\n\t\t\treturn new Asana($config);\r\n\t\t});\r\n\t}", "title": "" }, { "docid": "0e39eaa49830e6f279d0565abc0a3b8f", "score": "0.53853375", "text": "public function register()\n { \n $this->commands([\n Console\\UploadLinkCommand::class,\n Console\\PublishCommand::class,\n ]); \n\n $this->app->register(\\Core\\Armin\\ArminServiceProvider::class);\n\n $this->app->resolving('login', function($manager) {\n $manager\n ->extend(new Admin)\n ->extend(new User);\n });\n\n $this->app->extend(SluggableObserver::class, function($observer) { \n return class_exists(\\Armincms\\Fields\\Targomaan::class) \n ? new SluggableObserver(new SlugService, $this->app['events'])\n : $observer;\n }); \n }", "title": "" }, { "docid": "e3aea8be02650f66cd150c315ce8ba37", "score": "0.537945", "text": "public function register()\n {\n $this->app->singleton('modules', function ($app) {\n $modules = new ModuleManager($app);\n\n $modules->load();\n\n return $modules;\n });\n\n $this->publishes(\n $this->app->modules->getAssetRegistration()\n );\n\n $this->registerProviders();\n }", "title": "" }, { "docid": "e8b5b524dc9813e01821acf3af83f0a7", "score": "0.5376487", "text": "public function aliases() \n {\n return $this->_spi->aliases();\n }", "title": "" }, { "docid": "48bf0c10d3e9695324ae3ac560bf6228", "score": "0.53747153", "text": "public function register()\n {\n foreach (glob(app_path() . '/Shortcodes/*.php') as $filename) {\n $filename = pathinfo($filename, PATHINFO_FILENAME);\n $class = 'App\\\\Shortcodes\\\\' . $filename;\n if (property_exists($class, 'name')) {\n $name = $class::$name;\n } else {\n $name = kebab_case(class_basename(str_replace('Shortcode', '', $filename)));\n }\n \\Shortcode::register($name, $class);\n }\n }", "title": "" }, { "docid": "3604687cdff4730825363ee4a8c9f5bc", "score": "0.5358888", "text": "public function register()\n {\n collect($this->providers)->each(function ($provider) {\n $this->app->register($provider);\n });\n }", "title": "" }, { "docid": "2e86b39a7d605cdec6356d53e8bef72e", "score": "0.535187", "text": "public function register()\r\n {\r\n $this->mediaSortNull = sha1(time());\r\n\r\n if (! defined('MEDIASORT_NULL')) {\r\n define('MEDIASORT_NULL', $this->mediaSortNull);\r\n }\r\n\r\n // Package\r\n $this->registerMediaSort();\r\n\r\n // Commands\r\n $this->registerFastenCommand();\r\n $this->registerRefreshCommand();\r\n }", "title": "" }, { "docid": "14e3beb2f614ae638e2af44d0d3ad4ef", "score": "0.5338947", "text": "public function register() {\n $this->settings = new Settings();\n $this->callbacks = new AdminCallbacks();\n $this->callbacks_manager = new ManagerCallbacks();\n\n $this->setPages();\n //$this->setSubPages();\n\n $this->setSettings();\n $this->setSections();\n $this->setFields();\n\n $this->settings->addPages($this->pages)->withSubPages('Dashboard')->register();\n }", "title": "" }, { "docid": "320542f098f198cc33fd5dedab2293f4", "score": "0.5336909", "text": "public function setAlias()\n {\n // Yii::setPathOfAlias();\n foreach ($this->configWeb['aliases'] as $alias => $path) {\n \\Yii::setPathOfAlias($alias, $path);\n }\n }", "title": "" }, { "docid": "b543bf44e1cc001381216f112fbf081b", "score": "0.53323877", "text": "public function register()\n {\n Plugins::register('Groot', Manager::class, ControlPanel::class);\n\n Plugins::registerTwig('Groot', 'element', Templates\\Elements\\Groot::class);\n Plugins::registerTwig('Groot', 'filter', Templates\\Filters\\IAmGroot::class);\n Plugins::registerTwig('Groot', 'variable', Templates\\Variables\\Groot::class);\n }", "title": "" }, { "docid": "c6474a7ef5908f9ec29f58ad59ec5536", "score": "0.5332165", "text": "public function register()\n {\n $this->app->alias(Service::class, 'services');\n $this->app->alias(UnreadTalkService::class, 'unread.talk');\n $this->app->alias(SmsCodeService::class, 'sms.code');\n $this->app->alias(ClientManageService::class, 'client.manage');\n $this->app->alias(RoomManageService::class, 'room.manage');\n $this->app->alias(JwtAuthService::class, 'jwt.auth');\n }", "title": "" }, { "docid": "90cb028c482c86451e988ac55d003ce3", "score": "0.533004", "text": "public function register()\n {\n $this->registerAliases();\n\n $this->registerSMS();\n }", "title": "" }, { "docid": "0932e6d81736c856a12aae7efc459674", "score": "0.53228045", "text": "public static function register()\n {\n tgmpa(static::$plugins, static::$config);\n }", "title": "" }, { "docid": "53b0403461ae981f55e8282e6ca298f0", "score": "0.5314172", "text": "public function register()\n {\n //registering commands for artisan\n $this->commands($this->commands);\n\n $this->loadSnippetsFrom(\n dirname(__DIR__). 'assets/snippets/',\n $this->namespace\n );\n\n $this->loadChunksFrom(\n dirname(__DIR__) . 'assets/chunks/',\n $this->namespace\n );\n\n $this->loadPluginsFrom(\n dirname(__DIR__) . 'assets/plugins/'\n );\n\n //use this code for each module what you want add\n $this->app->registerModule(\n 'module from file',\n dirname(__DIR__).'assets/modules/module/module.php'\n );\n }", "title": "" }, { "docid": "c0990eca849c8c25da6f4b1e3d254b68", "score": "0.5313953", "text": "public static function on() {\n\n foreach(self::$classes as $k => $class) {\n if (!class_exists($class)) {\n if(class_exists('Prototypemvc\\Core\\\\' . $class)) {\n class_alias('Prototypemvc\\Core\\\\' . $class, $class);\n } else if(class_exists('Prototypemvc\\Helpers\\\\' . $class)) {\n class_alias('Prototypemvc\\Helpers\\\\' . $class, $class);\n }\n }\n }\n }", "title": "" }, { "docid": "3697a404db2b3eed4a0179e609dbc491", "score": "0.5292701", "text": "public function register()\n {\n $alias_loader = AliasLoader::getInstance();\n\n // Bind Page Manager\n App::bind('pageManager', function()\n {\n return new PageManager();\n });\n $alias_loader->alias('CMSPage', PageFacades::class);\n\n //Bind Language Manager\n App::bind('languageManager', function()\n {\n return new LanguageManager();\n });\n $alias_loader->alias('Language', LanguageFacades::class);\n\n // Bind Config Class\n App::bind('configManager', function()\n {\n return new ConfigManager();\n });\n $alias_loader->alias('CMSConfig', Config::class);\n\n // Bind Config Class\n App::bind('storeManager', function()\n {\n return new StoreManager();\n });\n $alias_loader->alias('CMSStore', StoreFacades::class);\n }", "title": "" }, { "docid": "b770217e5f5ed05f1027c2a27fb2c50c", "score": "0.5288173", "text": "public static function getAliases(): array\n {\n return ['addClient' => 'newClient'];\n }", "title": "" }, { "docid": "a5c79f0de5415b1415db0e9ea178cd01", "score": "0.52860904", "text": "public function register()\n {\n resolve(EngineManager::class)->extend('elasticsearch', function () {\n return new ElasticsearchEngine(\n ClientBuilder::create()\n ->setHosts(config('scout.elasticsearch.hosts'))\n ->build()\n );\n });\n }", "title": "" }, { "docid": "0ba224bf96a37cc1d26b57934a39802c", "score": "0.5280887", "text": "public function register()\n {\n $this->registerAdminModuleCommand();\n }", "title": "" }, { "docid": "e7f1fdbe4ec3cb2783fa748014716701", "score": "0.5277701", "text": "protected function registerMiddlewares()\n {\n app('router')->aliasMiddleware('admin', AdminMiddleware::class);\n }", "title": "" }, { "docid": "1d1b20180689f72cfc6f2bccad398597", "score": "0.52727103", "text": "public function registerModules(array $modules, $merge = null)\r\n {\r\n return parent::registerModules($modules, $merge);\r\n \r\n }", "title": "" }, { "docid": "cfd115df2d2555af5c79fa5f2a9154af", "score": "0.52723384", "text": "public function register()\n {\n $this->app->register(LaravelModulesServiceProvider::class);\n\n $loader = AliasLoader::getInstance();\n $loader->alias('Module', Module::class);\n }", "title": "" }, { "docid": "6f914899834768261b5daeaa52e13733", "score": "0.52634895", "text": "public function getAliases() {\n return [];\n }", "title": "" }, { "docid": "36e5831c079983b60989f13f834a7c89", "score": "0.5256812", "text": "public function register()\n {\n $models = array(\n 'Post',\n 'Subject',\n 'PostCategory',\n 'Category',\n 'Tag',\n 'Banner',\n 'Enrollment',\n 'Instructor'\n// 'ProductImage',\n// 'Order'\n );\n foreach ($models as $model) {\n $this->app->bind(\n \"App\\\\Repository\\\\{$model}\\\\{$model}Interface\",\n \"App\\\\Repository\\\\{$model}\\\\{$model}Repository\"\n );\n }\n }", "title": "" }, { "docid": "27298129e6cc6d1b77540e7cc891d35e", "score": "0.5254207", "text": "public function register()\n {\n foreach (glob(app_path().'/Hubtel/*.php') as $filename){\n require_once($filename);\n }\n }", "title": "" }, { "docid": "eb43c91184385c6ec74f3dbe8c44b57b", "score": "0.5251404", "text": "public function register() {\n spl_autoload_register(function(){\n foreach ($this->files as $file) {\n require_once($file);\n }\n });\n }", "title": "" }, { "docid": "02d93d30bea32a4789612f2c6349c584", "score": "0.52484196", "text": "public function register()\n {\n // Bind our classes here\n }", "title": "" }, { "docid": "0c680fe1c6dd274d63bd74cff5ab5688", "score": "0.5245612", "text": "public function register()\n {\n $this->registerCommands(array_merge(\n $this->commands, $this->devCommands\n ));\n }", "title": "" }, { "docid": "0c680fe1c6dd274d63bd74cff5ab5688", "score": "0.5245612", "text": "public function register()\n {\n $this->registerCommands(array_merge(\n $this->commands, $this->devCommands\n ));\n }", "title": "" }, { "docid": "6297786b7e605340f2292a85bb403d4b", "score": "0.5237431", "text": "public function addTestAliases(): void\n {\n ConnectionManager::alias('test', 'default');\n foreach (ConnectionManager::configured() as $connection) {\n if ($connection === 'test' || $connection === 'default') {\n continue;\n }\n\n if (str_starts_with($connection, 'test_')) {\n $original = substr($connection, 5);\n ConnectionManager::alias($connection, $original);\n } else {\n $test = 'test_' . $connection;\n ConnectionManager::alias($test, $connection);\n }\n }\n }", "title": "" }, { "docid": "e7b3397cbf11a85b1cbf2d2c2b5644f0", "score": "0.5237162", "text": "public function getAliases()\r\n {\r\n \treturn [\r\n \t\tMage2tv\\BrandExample\\Setup\\Patch\\Data\\CreateDefaultBrands::class\r\n \t];\r\n }", "title": "" }, { "docid": "454ae227abd2b1dbd4c7a9efc5d52785", "score": "0.52345985", "text": "public function registerDependencies() {}", "title": "" }, { "docid": "65b5903a45fe7614c0cefb388bd6ac7f", "score": "0.5230278", "text": "public function registerAutoloaders(\\Phalcon\\DiInterface $dependencyInjector = null)\n {\n\n $loader = new Loader();\n\n $loader->registerNamespaces(\n array('Area\\Frontend\\Controllers' => '../apps/area/frontend/controllers/'\n , 'Area\\Frontend\\Models' => '../apps/area/frontend/models/'\n ,'Core\\Entities' => '../apps/core/entities/'\n ,'Core\\Repositories' => '../apps/core/repositories/'\n ,'Core\\ViewModels' => '../apps/core/viewmodels/'\n //,'Libraries' => '../apps/libraries/Doctrine'\n ,'Doctrine\\ORM\\Mapping' => '../apps/libraries/Doctrine/ORM/Mapping'\n ,'Doctrine\\Common\\ClassLoader' => '../apps/libraries/Doctrine/Common/'\n ,'Doctrine\\ORM\\Tools\\Setup' => '../apps/libraries/Doctrine/ORM/Tools/'\n ,'Doctrine\\ORM\\EntityManager' => '../apps/libraries/Doctrine/ORM/'\n ,'Libraries' => '../apps/libraries/'\n ,'Frontend\\Forms' => '../apps/area/frontend/forms'\n //'Modules\\Models\\Services' => __DIR__ . '/../../models/services/',\n //'Modules\\Models\\Repositories' => __DIR__ . '/../../models/repositories/'\n ));\n\n\n $loader->register();\n }", "title": "" }, { "docid": "2a92e9422d21bb0d16842a7e951108a6", "score": "0.5225174", "text": "protected function aliases(): array\n {\n return [];\n }", "title": "" }, { "docid": "6f22ed3406f20fe6495a2ecef49ccb6e", "score": "0.5224251", "text": "public function register()\n\t{\n\t\t$this->royalcms->singleton('timer', function()\n\t\t{\n\t\t\t// Let's use the Royalcms start time if it is defined.\n\t\t\t$startTime = defined('ROYALCMS_START') ? ROYALCMS_START : null;\n\t\t\t\n\t\t\treturn new Timer($startTime);\n\t\t});\n\t\t\n\t\t// Load the alias\n\t\t$this->loadAlias();\n\t}", "title": "" }, { "docid": "f623feb2e7a377578ff91010da3f2f41", "score": "0.5223265", "text": "public function register()\n\t{\n\t\t$this->instances = array();\n\n\t\tforeach ($this->providers as $provider)\n\t\t{\n\t\t\t$this->instances[] = $this->royalcms->register($provider);\n\t\t}\n\t}", "title": "" }, { "docid": "a82b7b4ac766c01dc840d61f8250f433", "score": "0.5221502", "text": "public function getAliases()\n {\n return [];\n }", "title": "" }, { "docid": "a82b7b4ac766c01dc840d61f8250f433", "score": "0.5221502", "text": "public function getAliases()\n {\n return [];\n }", "title": "" }, { "docid": "a82b7b4ac766c01dc840d61f8250f433", "score": "0.5221502", "text": "public function getAliases()\n {\n return [];\n }", "title": "" }, { "docid": "a6c3a54b10f153a38fac527705a0aaa5", "score": "0.5219334", "text": "public function register()\n {\n\n $this->royalcms['DbMigrations'] = $this->royalcms->share(function()\n {\n $connType = $this->royalcms['config']->get('database.default');\n $database = $this->royalcms['config']->get('database.connections.' .$connType );\n return new DbMigrations($database);\n });\n\n $this->royalcms->booting(function()\n {\n $loader = \\Royalcms\\Component\\Foundation\\AliasLoader::getInstance();\n $loader->alias('DbMigrations', 'Royalcms\\Component\\DbExporter\\Facades\\DbMigrations');\n });\n }", "title": "" }, { "docid": "050baf6f266b7d7696e3cccda4dc4de1", "score": "0.5216571", "text": "function registerImport();", "title": "" }, { "docid": "16fa7d478c15ebda73895cb0d3eb1a89", "score": "0.52151847", "text": "protected function registerRepositories()\n {\n $this->app->bind(ShopRepository::class, EloquentShopRepository::class);\n $this->app->bind(SettingRepository::class, EloquentSettingRepository::class);\n }", "title": "" }, { "docid": "90e56a0b546cf8068cd3209875ed69ce", "score": "0.52147764", "text": "public function register()\n\t{\n $this->app->bind(Optimus::class, function () {\n $manager = new Manager();\n $manager->setSerializer(new ApiDataSerializer());\n $api = new Optimus($manager);\n return $api;\n });\n\n $this->app->alias(Optimus::class, 'api');\n\t}", "title": "" }, { "docid": "797a40e5e446e561ee67f352d4e00c08", "score": "0.52134526", "text": "function alias($name);", "title": "" }, { "docid": "c063a0ba1bcb24a8b3d4c1130362b3a6", "score": "0.5209101", "text": "public function register()\n {\n // Since it is not registered by default\n \\Illuminate\\Support\\ClassLoader::register();\n\n $this->app['suitetea.modules'] = $this->app->share(function($app)\n {\n return new Manager(\n new Collection,\n $app['view'],\n new ClassLoader,\n $app['events'],\n $app['config']\n );\n });\n\n $this->app->booting(function()\n {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n $loader->alias('ModularLaravel', 'SuiteTea\\ModularLaravel\\Facade');\n });\n }", "title": "" }, { "docid": "0c955bf4e17d1be9372344626cd96200", "score": "0.5207133", "text": "public function register()\n\t{\n\t\t$this->registerAccess();\n\t\t$this->registerFacade();\n\t\t$this->registerBindings();\n\t}", "title": "" }, { "docid": "8699ebf2c2c7a3796126004358b9f0f2", "score": "0.5205289", "text": "public static function register() {\n\t\tself::$_options['loader']->register();\n\t}", "title": "" }, { "docid": "3bdb1603b6d589f16512731871f01db7", "score": "0.5204107", "text": "protected function _registerServices()\n\t{\n\n\t\t$di = new \\Phalcon\\DI\\FactoryDefault();\n\t\t//Setup the view component\n\t\t$di->set('view', function(){\n\t\t\t$view = new \\Phalcon\\Mvc\\View();\n\t\t\t$view->setViewsDir('../app/views/');\n\t\t\t$view->registerEngines(array(\n\t\t\t\t\t\".volt\" => 'Phalcon\\Mvc\\View\\Engine\\Volt'\n\t\t\t));\n\t\t\treturn $view;\n\t\t});\n\n\t\t$loader = new \\Phalcon\\Loader();\n\n\t\t/**\n\t\t * We're a registering a set of directories taken from the configuration file\n\t\t */\n\t\t$loader->registerDirs(\n\t\t\tarray(\n\t\t\t\t__DIR__ . '/../apps/library/',\n\t\t\t\t__DIR__ . '/../apps/plugins/',\n\t\t\t\t\n\t\t\t)\n\t\t)->register();\n\n\t\t//Registering a router\n\t\t$di->set('router', function(){\n\n\t\t\t$router = new \\Phalcon\\Mvc\\Router();\n\t\t\t$router->removeExtraSlashes(true);\n\t\t\t//$router->mount(new Routes());\n\n\n\t\t\t$router->setDefaultModule(\"frontend\");\n\n\t\t\t$router->add('/:controller/:action', array(\n\t\t\t\t'module' => 'frontend',\n\t\t\t\t'controller' => 1,\n\t\t\t\t'action' => 2,\n\t\t\t));\n\n\t\t\t$router->add(\"/admin\", array(\n\t\t\t\t'module' => 'backend',\n\t\t\t\t'controller' => 'login',\n\t\t\t\t'action' => 'yonet',\n\t\t\t));\n\t\n\t\t\t/*$router->add(\"/admin/products/:action\", array(\n\t\t\t\t'module' => 'backend',\n\t\t\t\t'controller' => 'products',\n\t\t\t\t'action' => 1,\n\t\t\t));*/\n\n\t\t\t$router->add(\"/admin/:controller/:action\", array(\n\t\t\t\t'module' => 'backend',\n\t\t\t\t'controller' => 1,\n\t\t\t\t'action' => 2,\n\t\t\t));\n\n\n\t\t\treturn $router;\n\n\t\t});\n\n\t\t$this->setDI($di);\n\t}", "title": "" } ]
78de57b802cff4270cac421fc74afdb2
Write a string to a file
[ { "docid": "e126611848cb5ad656d87a2b87d47b23", "score": "0.0", "text": "function fn_put_contents($location, $content, $base_dir = '', $file_perm = DEFAULT_FILE_PERMISSIONS, $append = false)\n{\n $result = '';\n $path = $base_dir . $location;\n\n if (!empty($base_dir) && !fn_check_path($path)) {\n return false;\n }\n\n fn_mkdir(dirname($path));\n\n $flags = 0;\n if ($append == true) {\n $flags = FILE_APPEND;\n }\n\n // Location is regular file\n $result = @file_put_contents($path, $content, $flags);\n if ($result !== false) {\n @chmod($path, $file_perm);\n }\n\n return $result;\n}", "title": "" } ]
[ { "docid": "dafc5003c91baf92701dc846240f1af0", "score": "0.7981499", "text": "public function write($string);", "title": "" }, { "docid": "dafc5003c91baf92701dc846240f1af0", "score": "0.7981499", "text": "public function write($string);", "title": "" }, { "docid": "41fb0a925bb1925940016bd2d6184ad5", "score": "0.74522585", "text": "public function write($string)\n {\n }", "title": "" }, { "docid": "9c8a84256869e3a1a3196997e6a00b86", "score": "0.72431034", "text": "public function write(string $string): void;", "title": "" }, { "docid": "7fbd29659b29cf57974a30889f80fc76", "score": "0.72144765", "text": "function wts($string)\n\t{\n\t\tfwrite($this->fs, $string .\"\\r\\n\");\n\t}", "title": "" }, { "docid": "e1d86fa8f80be97167010dfdbea53402", "score": "0.7042586", "text": "private static function appendStringToFile($string, $path)\r\n\t{\r\n\t\tif($handle = fopen($path,'a'))\r\n\t\t{\t\r\n\t\t\tfwrite($handle,$string.PHP_EOL);\r\n\t\t\tfclose($handle);\r\n\t\t}\t\r\n\t}", "title": "" }, { "docid": "b12c66205fc10cc4392321eb41bd8506", "score": "0.6970707", "text": "function fileWrite( $fileName, $myMode, $myStr )\n{\n $isOpen = fopen( $fileName, $myMode ) ;\n if ( $isOpen )\n {\n fwrite( $isOpen, $myStr ) ;\n fclose( $isOpen ) ;\n return TRUE ;\n }\n else\n {\n return FALSE ;\n }\n}", "title": "" }, { "docid": "f115d8e092a67fd9ec6ec0b82a745329", "score": "0.6955972", "text": "function file_put_string($string) {\n $name = tempnam(IA_ROOT_DIR.'attach/', \"ia\");\n $fp = fopen($name, \"w\");\n if (!$fp) {\n return \"\";\n }\n $string .= \"\\n\";\n fputs($fp, $string);\n fclose($fp);\n return $name;\n}", "title": "" }, { "docid": "c3a4121f6fa6b27b20be9a5bb213c027", "score": "0.6926942", "text": "function writeFile($myFile, $stringData) {\n\n\n \t$fh = fopen($myFile, 'w') or die(\"var message='Can't open file';\");\n \tfwrite($fh, $stringData);\n \t/**\n close file\n */\n fclose($fh);\n\n}", "title": "" }, { "docid": "4427095fb78b26a6ce01f048d1ecd130", "score": "0.6906599", "text": "public function write($filename);", "title": "" }, { "docid": "4be1d5a54999194d3d3f16e6f2d71c46", "score": "0.6897888", "text": "public function write($text);", "title": "" }, { "docid": "83133dfd57e82772e9b869a770f66fd2", "score": "0.68679243", "text": "function write_string_into_file( $dest_file, $string ) {\n\n\t# Get Directory component\n\t$dir_name = dirname($dest_file);\n\n\t# Create directory if it doesn't exist\n\tif ( !is_dir($dir_name) ) {\n\t\t`mkdir -p $dir_name`;\n\t}\n\n\tfile_put_contents($dest_file, $string );\n\n\treturn TRUE;\n}", "title": "" }, { "docid": "810af8d646f25fb6d0d16d117c5c550d", "score": "0.68089074", "text": "private function write($string) {\n try {\n if (!file_exists($this->_logWritePath)) {\n $touchy = @touch($this->_logWritePath);\n if (!$touchy) {\n print \"ERROR! Could not create file: {$this->_logWritePath}\";\n return false;\n }\n }\n\n if (!is_writable($this->_logWritePath)) {\n print \"ERROR! Could not write to file: {$this->_logWritePath}\";\n return false;\n }\n\n $overwriteFlag = $this->_overwrite ? 0 : FILE_APPEND;\n return file_put_contents($this->_logWritePath, $string, $overwriteFlag);\n\n } catch (Exception $e) {\n print $e->getMessage();\n }\n return false;\n }", "title": "" }, { "docid": "457b67ea6d2b6a38b5f449eae1400400", "score": "0.67824924", "text": "private function write_ue4_string(&$file, $string)\n {\n $length = strlen($string) + 1;\n $packed_data = pack('i', $length);\n fwrite($file, $packed_data);\n fwrite($file, $string);\n fwrite($file, pack('c', '0'));\n }", "title": "" }, { "docid": "7b1d9e472e8f739395677f7dcdf479cf", "score": "0.677", "text": "function write($path, $text) {\n $file = fopen($path, 'wb');\n fwrite($file, $text);\n fclose($file);\n}", "title": "" }, { "docid": "0ca80490b01ec0f9121eef8fb1790f2b", "score": "0.6715514", "text": "public function write (string $filename = NULL ){}", "title": "" }, { "docid": "52ba565d1865320bd14b79b84dc90868", "score": "0.6709447", "text": "public function writeFile($data);", "title": "" }, { "docid": "a19df1d14fa4b5ebeb967896447e5783", "score": "0.66431886", "text": "function fwrite ($handle, $string, $length = null) {}", "title": "" }, { "docid": "cebd1b2e941dc892d310b6f1433385c7", "score": "0.66212094", "text": "final protected function saveOutput($string)\n {\n \n if($this->writeOutputFile !== false) {\n \n file_put_contents($this->writeOutputFile, $string, FILE_APPEND);\n \n }\n \n }", "title": "" }, { "docid": "b9cf4a1b1efb933061f6749cde7491d9", "score": "0.6555226", "text": "function file_put_contents( $file, $text ) {\n\t\t$fp = fopen( $file, \"w\" );\n\t\tfwrite( $fp, $text );\n\t\tfclose( $fp );\n\t}", "title": "" }, { "docid": "888fc3dedaaecfbadae871de0869dde7", "score": "0.65504783", "text": "function write_to_file($location, $file, $data) {\n\t$filename = $location.$file;\n\t$fp = fopen ($filename, \"w\"); \n\tfwrite ($fp,$data); \n\tfclose ($fp); \n}", "title": "" }, { "docid": "8ecaf3a8edcc0bf352d35607bf5ccafc", "score": "0.6530853", "text": "function saveLocalTextfile($string, $textfile_name){\n\n\t//create a file for writing and get the filehandle\n\t$fp = fopen(\"$textfile_name\", 'w');\n\tif(!$fp){\n\t\techo \"couldn't open file! - $textfile_name\";\n\t}\n\n\t//now write the value to it\n\t$result = fwrite($fp, $string);\n\n\t//assuming all went well, close the file\n\tfclose($fp);\n\n\t//return false if couldn't write to the file\n\tif(!$result){\n\t\treturn false;\n\t}\n\n\t//if we got here we can return true\n\treturn true;\n}", "title": "" }, { "docid": "134d610a7dfe2b04d36e42926cf148a9", "score": "0.652535", "text": "public function write(string $string, int $length=0) {\n $args = array($this->handle,$string);\n if($length>0) { $args[] = $length; }\n $result = fwrite(...$args);\n return $result;\n }", "title": "" }, { "docid": "d0f570b47dbb264c629a2d2c9fc4f7d7", "score": "0.65096694", "text": "public function writeToFile($data){\t\n\t\tfwrite($this->fptr,$data);\n\t}", "title": "" }, { "docid": "1c28e9cd76b688ea1b5c05077c03dc52", "score": "0.64793175", "text": "public function write($string){\n \treturn ser_write($string);\n }", "title": "" }, { "docid": "f3ed1722497a17ec9edfcab40928b3ff", "score": "0.6418453", "text": "function injectStringInFile($file, $string, $position)\n {\n $fpFile = fopen($file, \"rw+\");\n $fpTemp = fopen('php://temp', \"rw+\");\n\n stream_copy_to_stream($fpFile, $fpTemp);\n\n fseek($fpFile, $position);\n fseek($fpTemp, $position);\n\n fwrite($fpFile, $string . PHP_EOL);\n\n stream_copy_to_stream($fpTemp, $fpFile);\n\n fclose($fpFile);\n fclose($fpTemp);\n }", "title": "" }, { "docid": "e42e0d560ef82a1091358961fbf21e06", "score": "0.6417267", "text": "public function write($string)\n {\n if (!$this->writable) {\n throw new RuntimeException(\"Stream is not writable\");\n }\n return fwrite($this->file, $string);\n }", "title": "" }, { "docid": "7a2fe1edfb8ae5d98c267f41c176bd70", "score": "0.641094", "text": "function debugtxt($str, $filename)\n{\n if (is_writable($filename)) {\n\n // In our example we're opening $filename in append mode.\n // The file pointer is at the bottom of the file hence\n // that's where $somecontent will go when we fwrite() it.\n if (!$handle = fopen($filename, 'a')) {\n }\n if (false === fwrite($handle, $str . chr(13) . chr(10))) {\n }\n fclose($handle);\n }\n}", "title": "" }, { "docid": "b0a08b9e8e06ac97ea49f309e0aafbe1", "score": "0.64038247", "text": "public function write();", "title": "" }, { "docid": "b0a08b9e8e06ac97ea49f309e0aafbe1", "score": "0.64038247", "text": "public function write();", "title": "" }, { "docid": "b0a08b9e8e06ac97ea49f309e0aafbe1", "score": "0.64038247", "text": "public function write();", "title": "" }, { "docid": "dc2155f1ba601540bd3c177c26bbb4f0", "score": "0.63848984", "text": "abstract public function writeFile( $fileName );", "title": "" }, { "docid": "f015dc88fc9be834a28593767e915ac2", "score": "0.63526547", "text": "public function puts(string $string, int $length=0) {\n $args = array($this->handle,$string);\n if($length>0) { $args[] = $length; }\n $result = fwrite(...$args);\n return $result;\n }", "title": "" }, { "docid": "03c40f9e8b3fb4020e8e5e6ea505f1e9", "score": "0.6347815", "text": "function filedebug($string,$filename=\"debug\"){\n\t\t$fp = fopen($_SERVER['DOCUMENT_ROOT'].\"/tmp/$filename\", 'w');\n\t\tfwrite($fp, $string.\"\\n\");\n\t}", "title": "" }, { "docid": "33cf6c0bef32e6a839e45c9c562ccc06", "score": "0.63233614", "text": "public function writeString($str)\n {\n settype($str, 'string');\n\n $chars = $strlen = strlen($str);\n $containNullChars = false;\n\n for ($count = 0; $count < $strlen; $count++ ) {\n\n if ((ord($str[$count]) & 0xC0) == 0xC0) {\n $addBytes = 1;\n if (ord($str[$count]) & 0x20 ) {\n $addBytes++;\n\n // Never used. Java2 doesn't encode strings in four bytes\n // and we dont't support non-BMP characters\n if (ord($str[$count]) & 0x10 ) {\n $addBytes++;\n }\n }\n $chars -= $addBytes;\n\n if (ord($str[$count]) == 0 ) {\n $containNullChars = true;\n }\n $count += $addBytes;\n }\n }\n\n if ($chars < 0) {\n require_once 'Zend/Search/Lucene/Exception.php';\n throw new Zend_Search_Lucene_Exception('Invalid UTF-8 string');\n }\n\n $this->writeVInt($chars);\n if ($containNullChars) {\n $this->_fwrite(str_replace($str, \"\\x00\", \"\\xC0\\x80\"));\n } else {\n $this->_fwrite($str);\n }\n }", "title": "" }, { "docid": "4855a29d29b95cd7065d809f820149f3", "score": "0.631069", "text": "public function write(string $content): void\n {\n // ..\n }", "title": "" }, { "docid": "a7422710d0120f35968ea8d0c6a1e85d", "score": "0.62998", "text": "function file_write($filename, $content)\n\t{\n\t\t$handle = @fopen($filename, 'w');\n\t\t$result = @fwrite($handle, $content, strlen($content));\n\t\t@fclose($handle);\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "a5bb68c0826bde73bd54a0318099faa1", "score": "0.62809867", "text": "public function write($string) {\n\t\tif (! $this->writable) {\n\t\t\tthrow new RuntimeException(\"Stream is not writable\");\n\t\t}\n\t\treturn fwrite($this->handle, $string);\n\t}", "title": "" }, { "docid": "aceaceba2ecdb3ebdd93e440075ec52a", "score": "0.6245618", "text": "public function write($data) {\n file_put_contents($this->_filename, $data);\n }", "title": "" }, { "docid": "958519ac2cfbc7373b78f620df682c5e", "score": "0.62417096", "text": "function writeFile(string $data): void {\n $file = fopen('data.csv', 'w');\n fwrite($file, $data);\n fclose($file);\n}", "title": "" }, { "docid": "9e90263139c088eeb43619527fa3644b", "score": "0.6217621", "text": "function writeFile($file, $message) {\n\t\t\t$message = json_encode($message);\n\t\t\t$handle = fopen($file, 'w');\n\t\t\tfwrite($handle, $message);\n\t\t}", "title": "" }, { "docid": "5df9027910b6bc2bd3822ff26cc6d4cf", "score": "0.6208258", "text": "public function write($name, $content);", "title": "" }, { "docid": "7e4687881afe9d1d33924fe6396a5d8d", "score": "0.61940277", "text": "public function write($string)\n {\n // for email storage we simply append to the body with a line break\n $this->_body .= $string.PHP_EOL;\n }", "title": "" }, { "docid": "491122810a5759a7fc34da60658260a6", "score": "0.61765903", "text": "private function saveToFile($text, $file)\n {\n $content = $text . \"\\n\";\n file_put_contents($file, $content, FILE_APPEND);\n }", "title": "" }, { "docid": "06a3978c497137815521f2e656c05ee5", "score": "0.61581415", "text": "function file_put_contents($fn, $data);", "title": "" }, { "docid": "b8d33083b243e083ad5e25abb5e7a008", "score": "0.6153549", "text": "private function write()\n {\n \tfile_put_contents($this->file, $this->content);\n }", "title": "" }, { "docid": "639413868b12103fdc1a5edbacc91a57", "score": "0.615302", "text": "public function write($s)\n {\n $this->flushbits();\n $this->_out .= $s;\n }", "title": "" }, { "docid": "e528d01dd9ad31e9b4cfffe46cb9ac8d", "score": "0.6121207", "text": "public function write($file, $output);", "title": "" }, { "docid": "ad3f7c7ca4440b99ba17a02954d5c5f7", "score": "0.61023474", "text": "function fputs ($fp, $str, $length = null) {}", "title": "" }, { "docid": "0bb401740b72dced94b689650ecb12f6", "score": "0.6081545", "text": "public static function writeFile($path,$msg){\n $f = fopen($path, \"w+\");\n fwrite($f, $msg);\n fclose($f);\n }", "title": "" }, { "docid": "ae92583ea566ad191791f6bde94923df", "score": "0.60674506", "text": "public function write($path, $data);", "title": "" }, { "docid": "34316ed5a4a207d4c5f3bfc57e8c4746", "score": "0.60658854", "text": "protected function output($text) {\n fwrite($this->file, $text);\n }", "title": "" }, { "docid": "b33256540ee6b236d9271329c7ae310c", "score": "0.6060949", "text": "public function write($message)\n {\n\n file_put_contents($this->path . $this->file, trim($message).PHP_EOL, FILE_APPEND);\n }", "title": "" }, { "docid": "0b3a8f8f887a4587b992092d15429920", "score": "0.6060697", "text": "function write_file($p_filename, $p_options_string='')\n {\n //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, \"PclXmlTag::write_file\", \"filename='\".$p_filename.\"', options='\".$p_options_string.\"'\");\n $v_result = PCLXML_ERR_NO_ERROR;\n \n $this->error_reset();\n\n // ----- Parse options\n $v_options = $this->_parse_options($p_options_string, 'bool:xmlheader=false,bool:newline=false,int:indent=0,int:indent_start=0');\n \n if (!($fd = @fopen($p_filename, \"w\"))) {\n $this->_error_set(PCLXML_ERR_WRITE_OPEN_FAIL,\n 'Unable to open XML file \"'.$p_filename.'\" in write mode.');\n $v_result = PCLXML_ERR_WRITE_OPEN_FAIL;\n //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);\n return $v_result;\n }\n \n $v_result = $this->_write_file($fd, $v_options);\n \n @fclose($fd);\n \n // ----- Return\n //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);\n return $v_result;\n }", "title": "" }, { "docid": "d72dd0f68e2d8bb2fb25a20888043fa4", "score": "0.60532403", "text": "function write_file($output_dir, $filename, $nitfString) {\n foreach ($output_dir as $output_dir) {\n file_put_contents($output_dir . '/' . $filename , $nitfString);\n }\n var_dump('Written : ' . $filename);\n}", "title": "" }, { "docid": "99b3b364b4999d7d57764a0fedbb60e0", "score": "0.6048166", "text": "public function write($contents);", "title": "" }, { "docid": "99b3b364b4999d7d57764a0fedbb60e0", "score": "0.6048166", "text": "public function write($contents);", "title": "" }, { "docid": "d19218762562f288a74e3700602b46ee", "score": "0.6047153", "text": "public static function write($content, $file)\n {\n file_put_contents($file, $content);\n }", "title": "" }, { "docid": "9ede999a39069a2d584b86f6767be5eb", "score": "0.60396403", "text": "private function writeTextToFile() {\n\t\t$text = $this -> pm -> getText($this -> padid);\n\t\t$path = sprintf('%s/%s.tex', $this -> directory, $this -> name);\n\t\tfile_put_contents($path, $text);\n\t}", "title": "" }, { "docid": "2b29275fca1e7b9c35a6ea75a796db32", "score": "0.60011077", "text": "function write_file($opt, $contents)\n{\n if (is_writable($opt)) \n {\n if (!$open = fopen($opt, \"w\")) \n {\n exit_program(\"Cannot write to file\\n\", code_error::error_write_file);\n }\n }\n else \n {\n $open = fopen($opt, \"x\");\n }\n fwrite($open, $contents);\n fclose($open);\n return;\n\n}", "title": "" }, { "docid": "1ace31dee6dc0e5bbd32099a14dbc9bb", "score": "0.5991578", "text": "function writeToFile($file,$content) \n{\n\tglobal $txt;\n\n\t$file_open = fopen($file, 'w') or fatal_lang_error('fm_file_couldnotopen_write',0);\n\tfwrite($file_open, $content);\n\tfclose($file_open);\n}", "title": "" }, { "docid": "2e9b2d9954d78b2b0f0dc45753330ff9", "score": "0.5985051", "text": "function write_file($file, $content)\n{\n if (! @file_put_contents($file, $content)) {\n exit(\"cannot write $file\");\n }\n}", "title": "" }, { "docid": "5c51405868f4c4efc92436620222b3e2", "score": "0.5955497", "text": "function file_put_contents ($filename, $data, $flags = 0, $context = null) {}", "title": "" }, { "docid": "aa8814bff7aab44f238d8ddfc55f6d25", "score": "0.5945326", "text": "public function writeString($str, $length=null, $exact=null){ }", "title": "" }, { "docid": "2c7d6d793be8e40c86cc33380d9e9ded", "score": "0.59381026", "text": "public function file_put_contents($file, $content);", "title": "" }, { "docid": "fad60dc2ed85b6d2da74aec672bd346d", "score": "0.59216094", "text": "function write($string) {\n $string = (string)$string;\n $this->body[] = $string;\n $this->length += strlen($string);\n }", "title": "" }, { "docid": "c129c37f2848c534ea14ebeee312f922", "score": "0.58932453", "text": "function write( $log_file_data, $string)\r\n {\r\n $log_dir = $log_file_data[0];\r\n $log_name = $log_file_data[1];\r\n $file_name = $log_dir . $log_name;\r\n \r\n if (!is_dir($log_dir))\r\n \tdir :: mkdir($log_dir, 0775, true);\r\n \r\n $oldumask = @umask( 0 );\r\n $file_existed = @file_exists( $file_name );\r\n $log_file = @fopen( $file_name, 'a' );\r\n \r\n if ( $log_file )\r\n {\r\n $time = strftime( \"%b %d %Y %H:%M:%S\", strtotime( 'now' ) );\r\n \t\t\r\n \t\t$notice = '[ ' . $time . \" ]\\n\";\r\n \t\t\r\n\t\t\tif($user_id = user :: get_id())\r\n\t\t\t\t$notice .= '[ ' . $user_id . ' ] [ ' . user :: get_login() . ' ] [ ' . user :: get_email() . ' ] ';\r\n\r\n $notice .= '[' . sys::client_ip() . '] [' . (isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '') . \"]\\n\" . $string . \"\\n\\n\";\r\n \r\n @fwrite( $log_file, $notice );\r\n @fclose( $log_file );\r\n if ( !$file_existed )\r\n \t@chmod( $file_name, 0664 );\r\n\r\n @umask( $oldumask );\r\n $result = true;\r\n }\r\n else\r\n {\r\n @umask( $oldumask );\r\n \t$result = false;\r\n debug :: write_error( \"Cannot open log file '$file_name' for writing\\n\" .\r\n \"The web server must be allowed to modify the file.\\n\" .\r\n \"File logging for '$file_name' is disabled.\" , __FILE__ . ' : ' . __LINE__ . ' : ' . __FUNCTION__, false);\r\n \r\n }\r\n\r\n return $result;\r\n }", "title": "" }, { "docid": "83ce47949bd75cf5d1003d0e62cb7d55", "score": "0.5889063", "text": "public function & putToFile ($stringToWrite) {\n \tif (file_put_contents ($this->varContainer, $stringToWrite)) {\n \t\treturn $this->returnToChain ();\n \t} else {\n \t if (self::checkCanOutputErrorScreen ()->toBoolean ()) {\n self::renderScreenOfDeath (new S (__CLASS__),\n new S (CANNOT_WRITE_FILE),\n new S (CANNOT_WRITE_FILE_FIX));\n } else {\n throw new Exception (__CLASS__ . _DCSP . 'File does not exist!');\n }\n \t}\n }", "title": "" }, { "docid": "3c042176eb1e14eee91f78faf67b5d5f", "score": "0.58885944", "text": "public function write(string $filename, string $contents): bool;", "title": "" }, { "docid": "a75e721a58758bc7ff4f70df287bbef8", "score": "0.5867147", "text": "function write($fileName)\n {\n $fd = fopen ($fileName, \"w\");\n fwrite($fd, $this->content);\n fclose ($fd);\n }", "title": "" }, { "docid": "9f779e41c3972700c8f6fad83a902eea", "score": "0.5862496", "text": "function data_to_file($data_string, $output_file, $platform) {\n\t//Delete it first\n\tunlink($output_file);\n\t$filStream = fopen($output_file, \"w\") or FailToCreateFile();\n\t$data = base64_decode($data_string); #Decode Base64\n\t$androidData = str_replace(\"%%platform%%\",$platform,$data);\n\tfwrite($filStream, $androidData);\n\tfclose($filStream);\n return $output_file; \n}", "title": "" }, { "docid": "18799f1ea6dcad239799feac394f7857", "score": "0.58430934", "text": "public function write_file($text, $filename, $mode = 1, $act = 1)\n {\n if ( ! $text)\n return;\n if ( ! is_file($filename))\n {\n $error = \"On file->write_file(content, filename, mode, act): Filename {$filename} doesnt exist on the server.\";\n return trigger_error($error, E_USER_ERROR);\n }\n if ($mode == 1)\n $text = $text . PHP_EOL;\n $act = ($act == 2) ? 'a+' : 'w+';\n $opened_file = fopen($filename, $act);\n fwrite($opened_file, $text);\n fclose($opened_file);\n }", "title": "" }, { "docid": "3485520e60b7cd8dfb4225dcf7e8837c", "score": "0.58132017", "text": "function writeMsgInFile($fileFullPath, $lineToWrite)\n{\n // Open the file\n $myFile = fopen($fileFullPath, 'a');\n\n // Write one the file\n fwrite($myFile, $lineToWrite . \"\\n\");\n\n // Close the file\n fclose($myFile);\n}", "title": "" }, { "docid": "eaa124c3bc0b0f22703472d4fdf1fff4", "score": "0.58085054", "text": "function write_data($file, $string) {\r\n if ( ($file == \"\") || ($string == \"\") ) {\r\n // Kein Dateiname oder Inhalt zum Schreiben\r\n write_log(\"Write file: Filename/content missing\");\r\n return false;\r\n } else {\r\n // Hostname bei falschem Login korrigieren (\"$HOST.DDNS_ZONE\" -> \"$HOST\")\r\n $file = str_replace(\".\".DDNS_ZONE, \"\", $file);\r\n\r\n if ( is_writable(DATA_FOLDER) ) {\r\n // Ordner beschreibbar\r\n $write_result = file_put_contents( DATA_FOLDER.\"/\".$file.\".ip\", $string.\"\\n\" );\r\n if ( $write_result === false ) {\r\n // Schreiben fehlgeschlagen\r\n write_log(\"Write file '\".$file.\".ip' failed\");\r\n return false;\r\n } else {\r\n // Schreiben OK, N Bytes geschrieben\r\n write_debug(\"Write file '\".$file.\".ip' OK\");\r\n return true;\r\n }\r\n } else {\r\n // Ordner nicht beschreibbar\r\n write_log(\"Write: Folder '\".DATA_FOLDER.\"' not writable\");\r\n return false;\r\n }\r\n }\r\n}", "title": "" }, { "docid": "aaad91017247748a52776fb5d272615e", "score": "0.58054674", "text": "public function write(string $data): void\n {\n // Open\n if (false === $this->handle = fopen($this->path, 'c+')) {\n throw new RuntimeException(\"Failed to open file {$this->path}.\");\n }\n // Lock\n if (!flock($this->handle, LOCK_EX)) {\n throw new RuntimeException(\"Failed to lock file {$this->path}.\");\n }\n // Truncate\n if (!ftruncate($this->handle, 0)) {\n throw new RuntimeException(\"Failed to truncate file {$this->path}.\");\n }\n // Reset\n if (0 > fseek($this->handle, 0)) {\n throw new RuntimeException(\"Failed to move pointer at the beginning of the file {$this->path}.\");\n }\n // Write\n if (!fwrite($this->handle, $data)) {\n throw new RuntimeException(\"Failed to write file {$this->path}.\");\n }\n // Flush\n if (!fflush($this->handle)) {\n throw new RuntimeException(\"Failed to flush file {$this->path}.\");\n }\n // Unlock\n if (!flock($this->handle, LOCK_UN)) {\n throw new RuntimeException(\"Failed to unlock file {$this->path}.\");\n }\n // Close\n fclose($this->handle);\n }", "title": "" }, { "docid": "fc1a50e3db9c104923818a3d9f451f09", "score": "0.5785152", "text": "function write($chrText, $chrFilename){\n\n\t\t$chrText = str_replace('\\$', str_repeat('\\\\', 8) . '$', $chrText); # sheesh!\n\t\t$chrText = str_replace('\\`', str_repeat('\\\\', 8) . '`', $chrText); # sheesh!\n\t\t$chrText = str_replace('\\t' ,'\\\\\\\\\\\\\\t', $chrText);\n\t\t$chrText = str_replace('\"', '\\\\\\\\\"', $chrText);\n\t\t$chrText = str_replace('\\\\\\\\\\\"' ,'\\\\\\\\\\\\\\\"', $chrText);\n\t\t$chrText = str_replace('$', str_repeat('\\\\', 7) . '$', $chrText); # sheesh!\n\t\t$chrText = str_replace('`', str_repeat('\\\\', 7) . '`', $chrText); # sheesh!\n\n\t\t$chrCommand = \"sh -c \\\"cat <<RANDOMRANDOMBLAHRANDOM > $chrFilename\n$chrText\\\"\n\";\n\n\t\t$this->setCommand($chrCommand);\n\t\t$this->run();\n\n\t\treturn true;\n\n\t}", "title": "" }, { "docid": "afe81821795c91caf13f9d830f5be775", "score": "0.57688314", "text": "protected function filewrite($data = NULL) {\n ob_start();\n print_r($data);\n $c = ob_get_clean();\n $fc = fopen('txtfile' . DS . 'data.txt', 'w');\n fwrite($fc, $c);\n fclose($fc);\n }", "title": "" }, { "docid": "f8456072bb9a362968e571c95a5f3dbb", "score": "0.57433134", "text": "abstract protected function _write();", "title": "" }, { "docid": "796e829e8587383025a6b74b022b2685", "score": "0.5731833", "text": "protected function writeFile(string $path, string $content)\n {\n $config = new Autoload();\n $appPath = $config->psr4[APP_NAMESPACE];\n\n $directory = dirname($appPath . $path);\n\n if (! is_dir($directory))\n {\n mkdir($directory);\n }\n\n try\n {\n write_file($appPath . $path, $content);\n }\n catch (\\Exception $e)\n {\n $this->showError($e);\n exit();\n }\n\n $path = str_replace($appPath, '', $path);\n\n CLI::write(CLI::color(' created: ', 'green') . $path);\n }", "title": "" }, { "docid": "be56a77c0270d9c1936a5fb82c12881c", "score": "0.57313555", "text": "public function writeAndClose();", "title": "" }, { "docid": "e106979f2eb7d0d04230908af6666535", "score": "0.57083887", "text": "private function writeToFile($outputFilePath, $message)\n {\n if (file_exists($outputFilePath)) {\n $fh = fopen($outputFilePath, 'a');\n fwrite($fh, $message . \"\\n\");\n } else {\n $fh = fopen($outputFilePath, 'w');\n fwrite($fh, $message . \"\\n\");\n }\n fclose($fh);\n }", "title": "" }, { "docid": "269e0e1b07db2b6327b48ec7fc88c022", "score": "0.57014", "text": "public static function writeFile($filename, $content ) {\n $dir = dirname($filename);\n if(!is_dir($dir)) {\n mkdir($dir, 0775, true);\n chmod($dir, 0775);\n }\n file_put_contents($filename, $content);\n }", "title": "" }, { "docid": "cd79fa682e459b0394b80a54ce5d059e", "score": "0.56908315", "text": "private function writeFile($s_filePath,$values){\r\n // @fixme Cosa fare in caso di errore di apertura del file?\r\n $handle = fopen($s_filePath,'w+');\r\n if (fwrite($handle, $values) === FALSE) {\r\n // @fixme Cosa fare in caso di errore di scrittura del file?\r\n die('Impossibile scrivere sul file ('.$s_filePath.')');\r\n }\r\n fclose($handle);\r\n }", "title": "" }, { "docid": "6d74790708b93bd1ae390630a2442517", "score": "0.5689278", "text": "function log_file($str, $path = false, $mode = 'a') {\n\n\t\t//if array then turn to printable string (not serialized)\n\t\tif (is_array($str))\n\t\t\t$str = ar_to_string($str);\n\n\t\t($path) ? $file = \"{$path}/log.txt\\n\" : $file = \"log.txt\\n\";\n\n\t\t$fp = fopen($file, $mode);\n\t\tfwrite($fp, \"$str\\n\");\n\t\tfclose($fp);\n\t}", "title": "" }, { "docid": "7abe4250aa1c5d446d0bfff0c8e171bc", "score": "0.56879526", "text": "private function writeFile() {\n\tif (!$this->getFileEnabled()) { return false; }\n\treturn fwrite($this->logFh,$this->propertiesToText() . \"\\n\");\n\t}", "title": "" }, { "docid": "9fd9aff0763683c5ba3341a442273529", "score": "0.56800145", "text": "function file_put_contents($filename, $data, $flags = false, $context = NULL)\n{\n}", "title": "" }, { "docid": "8e8d912ad0cb90f16e3208e8996d869a", "score": "0.56792897", "text": "public function write_to_file($file, $question, $input)\n\t{\n\t\t$file = fopen($file, \"a\") or die(\"Unable to open file!\");\n\t\t//open a file in assessments folder \n\n\t\tif($file!=NULL)\n\t\t//file opened successfully\n\t\t{\t\n\t\t\t$str=$question.\"^\".$input.\"\\n\";\n\t\t\t//create string to be written\n\t\t\tfwrite($file, $str);\n\t\t\t//write to assemsent file\n\t\t\tfclose($file);\n\t\t\t//close assessment file\n\t\t\treturn true;\n\t\t\t//write successful\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t\t//write not successful\n\t\t}\n\t}", "title": "" }, { "docid": "88f7d021a1a2c4ca18cd28e8ba4abe80", "score": "0.56785643", "text": "function writeToFile($handle, $cleanData){\n $username = htmlentities($cleanData['username']);\n $password = htmlentities($cleanData['password']);\n $title = htmlentities($cleanData['title']);\n $firstname = htmlentities($cleanData['firstname']);\n $surname = htmlentities($cleanData['surname']);\n $email = htmlentities($cleanData['email']);\n /* The verification process ensured that none of the inputs can contain commas, so they are an effective delimiter */\n $text = $username.','.$password.','. $title .','. $firstname.','. $surname.','. $email.PHP_EOL;\n fwrite( $handle , $text ) ;\n}", "title": "" }, { "docid": "6867e9f772f57ce4846acf7f12a76091", "score": "0.5642547", "text": "function salvaArquivo($texto, $nomeArquivo){\n\t$handle = fopen(\"resultado.txt\", \"a+\");\n\n\tfwrite($handle, $texto);\n\t\n\tfclose($handle);\n}", "title": "" }, { "docid": "8f27103ede8ebda846a27e30be619eb6", "score": "0.5638998", "text": "function write($data)\r\n {\r\n $this->string.=$data;\r\n return TRUE;\r\n }", "title": "" }, { "docid": "c62e84763e3272e721245a62e1502dcd", "score": "0.5637054", "text": "public function write($data);", "title": "" }, { "docid": "c62e84763e3272e721245a62e1502dcd", "score": "0.5637054", "text": "public function write($data);", "title": "" }, { "docid": "c62e84763e3272e721245a62e1502dcd", "score": "0.5637054", "text": "public function write($data);", "title": "" }, { "docid": "1c05acd184f3ffda9c9166613e9a8e67", "score": "0.56299925", "text": "public static function write($file_path, $data){\n\t\tself::_write($file_path, $data, false);\n\t}", "title": "" }, { "docid": "8d8f423bffdcb834f0ac19ac6dad10ca", "score": "0.5627762", "text": "public function writeFile(string $fileContent, string $filepath)\n {\n $this->get('filesystem')->dumpFile($filepath, $fileContent);\n }", "title": "" }, { "docid": "ac47e1a81c1faf8bf60a53887942494a", "score": "0.561607", "text": "function writeFileText($dir, $filename, $content, $modeWrite) {\n\t\ttry {\n\t\t\tif ($dir != $DIR_SERVERROOT) {\n\t\t\t\tif(!is_dir($dir)) {\n\t\t\t\t\tmkdir($dir);\n\t\t\t\t}\t\n\t\t\t}\n\t\t\t\n\t\t\t$fp = fopen($dir.$filename, $modeWrite);\n\t\t\t\n\t\t\tfwrite($fp, $content);\n\t\t\tfclose($fp);\n\t\t} catch (Exception $e) {\n\t\t\techo 'Caught exception: ', $e->getMessage(), \"\\n\";\n\t\t}\n\t}", "title": "" }, { "docid": "1a4a71f66c9d2f05e75967f8068cd095", "score": "0.5611896", "text": "protected function _write() {}", "title": "" }, { "docid": "bc8071e4695f4ea99383bf7641243ab0", "score": "0.55967635", "text": "function write($data) {\n\n // Confirm the write:\n if (@!fwrite($this->_fp, $data . \"\\n\")) throw new FileException($this->_message . \" Data: $data\", 5);\n\n }", "title": "" }, { "docid": "3ec2b79ccfd221670c9169d947ec3660", "score": "0.55935264", "text": "public function write($filename)\n {\n // TODO: Implement write() method.\n }", "title": "" }, { "docid": "09e0200cf47d0b5939b9369c1adb2d66", "score": "0.5589116", "text": "public static function write(string $message)\n {\n print $message . \"\\n\";\n }", "title": "" }, { "docid": "b186755f5795a35f48ed8ca65165c43a", "score": "0.55839646", "text": "public function write(string $text, int $level);", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "25ba4747623d10abd81213849d3de42e", "score": "0.0", "text": "public function index()\n {\n return view('admin.adminuser.index');\n }", "title": "" } ]
[ { "docid": "1d35b0b22ac44c3da96756e129561d1e", "score": "0.7596873", "text": "protected function listAction()\n {\n $fields = $this->entity['list']['fields'];\n $paginator = $this->findAll($this->entity['class'], $this->request->query->get('page', 1), $this->config['list']['max_results'], $this->request->query->get('sortField'), $this->request->query->get('sortDirection'));\n\n return $this->render('@EasyAdmin/list.html.twig', array(\n 'paginator' => $paginator,\n 'fields' => $fields,\n 'view' => 'list',\n ));\n }", "title": "" }, { "docid": "0da19d65b0ae22a9a9aea8c7d8f9691e", "score": "0.74184996", "text": "public function listAction()\n { $resources = $this->fetchResourcesAndIiifUrls();\n if (!count($resources)) {\n return $this->jsonError(new NotFoundException, \\Laminas\\Http\\Response::STATUS_CODE_404);\n }\n\n $query = $this->params()->fromQuery();\n $version = $this->requestedVersion();\n $currentUrl = $this->url()->fromRoute(null, [], ['query' => $query, 'force_canonical' => true], true);\n\n $iiifCollectionList = $this->viewHelpers()->get('iiifCollectionList');\n try {\n $manifest = $iiifCollectionList($resources, $version, $currentUrl);\n } catch (\\IiifServer\\Iiif\\Exception\\RuntimeException $e) {\n return $this->jsonError($e, \\Laminas\\Http\\Response::STATUS_CODE_400);\n }\n\n return $this->iiifJsonLd($manifest, $version);\n }", "title": "" }, { "docid": "7f885ee63d7fde5e395eeff7eff36f82", "score": "0.7408405", "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\r\n $this->View()->assign(['success' => true, 'data' => $result]);\r\n }", "title": "" }, { "docid": "5312faff5fa7125f9c939e21e4cc3413", "score": "0.72905934", "text": "public function listAction() {\n // Handle saving of a create/edit first, so it will reflect in the list\n $this->handleSave();\n\n // Process list now\n $this->headings = $this->getListHeadings();\n\n $rows = array();\n if ($this->module) {\n $res = $this->_getApi()->getList($this->module);\n $rows = $this->getListRows($res);\n }\n\n $this->rows = $rows;\n }", "title": "" }, { "docid": "db3decb51890b80d45fe4f716c97523a", "score": "0.71218187", "text": "public function list() {\n\t\t$this->protectIt( 'read' ); \n\t\tsetTitle( 'Listagem' );\n\t\t\n\t\t// Carrega o grid\n\t\tview( 'grid/grid' );\n\t}", "title": "" }, { "docid": "da70bb19a6c8e0562a0e54373a840197", "score": "0.7119305", "text": "public function index()\n {\n $list = $this->resouce->listResource();\n $tree = Helper::menuTree($list, true);\n $list = Helper::multiArrayToOne($tree);\n $this->setResponse($list);\n return $this->response();\n }", "title": "" }, { "docid": "3ebc7b4fb8651186fc87d5fb5cb8b455", "score": "0.7118158", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('VMBResourceBundle:Resource')->findAllByDate();\n\n return $this->render('VMBResourceBundle:Resource:index.html.twig', array(\n 'mainTitle' => $this->get('translator')->trans('resource.browse'),\n\t\t\t'addButtonUrl' => $this->generateUrl('resource_new'),\n 'entities' => $entities\n ));\n }", "title": "" }, { "docid": "405b6604e6bba890cbf7539c671390f5", "score": "0.70995116", "text": "public function list() {\n return $this->render(\"/sandwich/list.html.twig\");\n }", "title": "" }, { "docid": "8abbd6fc2b8eb9c6981a14c1d833bc3f", "score": "0.7087527", "text": "function list() {\n $data = $this->handler->handleList();\n\n $page = new Page(\"Applicants\", \"Applicants\");\n $page->top();\n\n listView($data);\n\n $page->bottom();\n }", "title": "" }, { "docid": "05a3a1abee5cdb637e4ecb2bed78f793", "score": "0.7044714", "text": "public function index() {\n ${$this->resources} = $this->model->orderBy('created_at', 'DESC')\n ->paginate(Variables::get('items_per_page'));\n\n return view($this->view_path . '.index', compact($this->resources));\n }", "title": "" }, { "docid": "abe6de6ae60572e5912b850a19d1d680", "score": "0.7037733", "text": "public function actionIndex()\r\n {\r\n $searchModel = new ResourceSearch();\r\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\r\n\r\n return $this->render('index', [\r\n 'searchModel' => $searchModel,\r\n 'dataProvider' => $dataProvider,\r\n ]);\r\n }", "title": "" }, { "docid": "6bcdfec0867dafc8b42448cdcf9d2175", "score": "0.70293266", "text": "public function index(){\n $this->show_list();\n }", "title": "" }, { "docid": "6151a50f557e88b87eb8f70be8393002", "score": "0.7028584", "text": "public function index()\n\t{\n\t\t$resources = Resource::latest()->get();\n\t\treturn view('admin.resources.index', compact('resources'));\n\t}", "title": "" }, { "docid": "6ebebdc63fae4da7ebeb3b9b7f417cd2", "score": "0.7014356", "text": "public function list()\n\t\t{\n\t\t\tglobal $app;\n\t\t\t$sth = $this->PDO->prepare(\"SELECT * FROM cars\");\n\t\t\t$sth->execute();\n\t\t\t$result = $sth->fetchAll(\\PDO::FETCH_ASSOC);\n\t\t\t$app->render('default.php',[\"data\"=>$result],200); \n\t\t}", "title": "" }, { "docid": "f92d52acde121c57bdf5619d33199871", "score": "0.69987994", "text": "public function index()\n {\n $resources = Resource::all();\n return view('resource.index', compact('resources'));\n }", "title": "" }, { "docid": "03aab1a3d0f29df3c9c01f676da4d986", "score": "0.69908047", "text": "public function index()\n\t{\n\t\t$this->listing('recent');\n\t}", "title": "" }, { "docid": "613162e5b8bb35685ca245a33b184f09", "score": "0.6918154", "text": "public function index()\n {\n $is_paginated = $this->request->query(\\Config::get('resource.type','resource-type'),'paginated') != 'collection';\n $result = $is_paginated ? $this->_indexPaginate() : $this->_indexCollection() ;\n\n $meta = $this->getMeta($this->resource,$result);\n\n return response()->resource($result,$this->getTransformer(),[ 'message' => $this->getMessage('index'), 'meta' => $meta ]);\n }", "title": "" }, { "docid": "79739617940af1c1c53e8d6ecec053f2", "score": "0.69099164", "text": "public function listAction()\n {\n $this->view->pageTitle = \"Document List\";\n \n $service = new App_Service_DocumentService();\n $this->view->docs = $service->getDocuments();\n \n $this->setPartial();\n }", "title": "" }, { "docid": "adb2cfce1206f7acf8cb4580fd08df71", "score": "0.6909121", "text": "public function index()\n {\n return DishResource::collection(Dish::paginate());\n }", "title": "" }, { "docid": "ce9698986cea138f641a36279605e7e0", "score": "0.6898258", "text": "public function index()\n {\n return InfoResource::collection(Resource::paginate(30));\n }", "title": "" }, { "docid": "35b022b0a4b421fcb5624635dcd9fe8f", "score": "0.6869782", "text": "public function _list()\n\t{\n\t\t_root::getRequest()->setAction('list');\n\n\t\t$oDocModel = new model_doc();\n\t\t$tDocs = $oDocModel->findAll();\n\n\t\t$oView = new _view('docs::list');\n\t\t$oView->tDocs = $tDocs;\n\n\t\t$this->oLayout->add('work', $oView);\n\t}", "title": "" }, { "docid": "30eced964887c2aef75a368b0de6cca4", "score": "0.683872", "text": "public function index()\n\t{\n // Set the sistema locale configuration.\n $this->set_locale();\n \n\t\t$this->_template(\"{$this->_controller}/list\", $this->_get_assets('list', $this->data));\n }", "title": "" }, { "docid": "f29709817ec3db2d44ad77fdc0a55269", "score": "0.6829548", "text": "public function _index()\n\t{\n\t\t$this->_list();\n\t}", "title": "" }, { "docid": "a050363540859438f2bfba3e253e49b6", "score": "0.6825998", "text": "public function index()\n {\n //\n $resources = Resource::all();\n return view('resources.index', compact('resources'));\n }", "title": "" }, { "docid": "2e1081176934c84955413f91a6d6b5aa", "score": "0.6822386", "text": "public function index()\n\t{\n\t\t$listings = $this->listing->all();\n\n\t\treturn View::make('listings.index', compact('listings'));\n\t}", "title": "" }, { "docid": "e39e490f9dd6d2633e939500f416862a", "score": "0.68211234", "text": "protected function listAction()\n {\n return $this->renderForm('list');\n }", "title": "" }, { "docid": "06d2b70f0a929084bcd3d1ce8021741e", "score": "0.6812034", "text": "public function index()\n {\n $resource = Resource::leftjoin('categories', 'resources.resource_category_id', '=', 'categories.category_id')\n ->leftjoin('sub_categories', 'resources.resource_sub_category_id', '=', 'sub_categories.sub_category_id')\n ->leftjoin('sources', 'resources.resource_source_id', '=', 'sources.source_id')\n ->leftjoin('authors', 'resources.resource_author_id', '=', 'authors.author_id')\n ->orderBy('resources.created_at', 'desc')->get();\n\n $view_data = [\n 'resource' => $resource,\n ];\n\n return view('resource.index', $view_data);\n }", "title": "" }, { "docid": "a07e724e196f9b0fd9d1230bd447f5bf", "score": "0.68106884", "text": "public function index()\n {\n return view('backend.resource.index');\n }", "title": "" }, { "docid": "620b35ada66373ffe1f703e36235dc33", "score": "0.68044376", "text": "public function listAction() {\n\t\t$all = $this->users->findAll();\n\t\t$this->views->add('users/list-all', [\n\t\t\t\t'users' => $all, \n\t\t\t\t'title' => \"Visa alla användare\"\n\t\t\t]);\n\t}", "title": "" }, { "docid": "aa8d3c35a6d3df3c02417b793ad19e32", "score": "0.6799941", "text": "public function actionList() {\r\n\t\t$model = $this->model;\r\n\t\t$items = $model->doList($this->paramsArray);\r\n\t\t$fields = true;\r\n\t\tif (isset($this->paramsArray['fields'])) {\r\n\t\t\t$fields = $this->paramsArray['fields'];\r\n\t\t}\r\n\t\t$itemsAr = ActiveRecord::makeArray($items, $fields);\r\n\t\t$this->respond(200, array(\"result\"=>$itemsAr, \"timestamp\"=>time()));\r\n\t}", "title": "" }, { "docid": "796201f21ca0c2d35a132ef98fbfa143", "score": "0.6793618", "text": "public function listAction()\n {\n $this->init(); // TODO: create a controller listener to call it automatically\n\n $polls = $this->pollEntityRepository->findBy(\n array('published' => true, 'closed' => false),\n array('createdAt' => 'DESC')\n );\n\n return $this->render('PrismPollBundle:Frontend\\Poll:list.html.twig', array(\n 'polls' => $polls\n ));\n }", "title": "" }, { "docid": "09027ea66bbe9d5f56484038f519de35", "score": "0.6787082", "text": "public function index()\n {\n return view('visitor.resources.index', [\n 'resources' => $this->resourceService->all()\n ]);\n }", "title": "" }, { "docid": "1b9b93c758b801d7f44b3b35dcb70a84", "score": "0.67787373", "text": "public function index()\n {\n return RedResponse::success(Todo::getListWithPage($this->requestObj));\n }", "title": "" }, { "docid": "06886aeb949a8582132f62e7cd3ac34f", "score": "0.677748", "text": "public function actionList()\n {\n $data=array();\n $looks = new Looks('search');\n $looks->unsetAttributes();\n if ( isset($_GET['Looks']) ) {\n $looks->attributes = $_GET['Looks'];\n }\n \n \t\t$users_all = Users::model()->findAll(\"status=:status\", array(':status'=>Users::STATUS_PUBLISH));\n \t\t$data['users'] = CHtml::listData($users_all, 'id', 'fullNameWithId');\n\n \n $this->render('list', array(\n 'model' => $looks,\n 'data'=>$data,\n )); \n }", "title": "" }, { "docid": "f8555ba3dc23008cd0a0c16a4559a6f8", "score": "0.67767936", "text": "public function showAll() {\n echo json_encode([\"MSG\" => $this->rest->showAll(), \"CODE\" => 200]);\n }", "title": "" }, { "docid": "989e888f453ad4e6aca439789fa4e466", "score": "0.6764753", "text": "public function actionList()\n {\n\t\t//$client->connect();\n\t\t\n\t $request = Yii::$app->request;\n\n\t $page = (!empty($request->get('page'))) ? $request->get('page') : 1;\n\n\t $blogService = new BlogService();\n\t $result = $blogService->getList($page);\n\n\t $pages = new Pagination(['totalCount' => $result['total']]);\n\n return $this->render('list', [\n 'models' => $result['blogs'],\n 'pages' => $pages,\n ]);\n }", "title": "" }, { "docid": "39872964f7d5564e8285c3a9fe12f919", "score": "0.67504454", "text": "function index() {\n $this->addBreadcrumb(lang('List'));\n \n $per_page = 10;\n $page = $this->getPaginationPage();\n \n if (!$this->active_category->isNew()) {\n list($files, $pagination) = Files::paginateByCategory($this->active_category, $page, $per_page, STATE_VISIBLE, $this->logged_user->getVisibility());\n } else {\n list($files, $pagination) = Files::paginateByProject($this->active_project, $page, $per_page, STATE_VISIBLE, $this->logged_user->getVisibility());\n } // if\n \n $this->smarty->assign(array(\n 'files' => $files,\n 'pagination' => $pagination,\n 'categories' => Categories::findByModuleSection($this->active_project, 'files', 'files'),\n 'pagination_url' => assemble_url('mobile_access_view_files', array('project_id' => $this->active_project->getId())),\n 'page_back_url' => assemble_url('mobile_access_view_project', array('project_id' => $this->active_project->getId())),\n ));\n }", "title": "" }, { "docid": "92aaa491ca5099382123536e546b9aa3", "score": "0.67480475", "text": "public function listAction()\n {\n $article_manager = $this->getDI()->get(\n 'core_article_manager'\n );\n \n // Sisipkan hasil query/find ke dalam variabel articles\n // Secara default, view yang dipanggil adalah Views/Default/article/list.volt\n $this->view->articles = $article_manager->find();\n }", "title": "" }, { "docid": "782e995121f434d308103646571fa51f", "score": "0.6743787", "text": "public function index()\n {\n return Resource::with('location')\n ->orderBy('name')\n ->get();\n }", "title": "" }, { "docid": "b9bc7c6f98f5ba96d276b3ad631acd74", "score": "0.67292553", "text": "public function index()\n {\n $statuses = Status::paginate(10);\n return StatusResource::collection($statuses);\n }", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.67255723", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "244a81dd1c2b337ec541d21216bf2674", "score": "0.67227656", "text": "public function index(Request $request)\n {\n $this->authorize('list', $this->resourceType);\n\n $search = $request->get('q');\n $order = $request->get('order');\n\n $resources = $this->getRepository()->index($search, $order);\n\n return $this->view('index')\n ->with('type', $this->resourceType)\n ->with('instance', $this->instance)\n ->with('resources', $resources);\n }", "title": "" }, { "docid": "df0d6207611fb7003570319e39a4393e", "score": "0.67204595", "text": "public function index()\n {\n $data = Product::paginate(10);\n\t\treturn ProductResource::Collection($data);\n }", "title": "" }, { "docid": "0d8a9aedf606052ab1459ef7661d1186", "score": "0.6716726", "text": "public function index()\n {\n return ItemResource::collection($this->item->list());\n }", "title": "" }, { "docid": "0d159b9b5426dcb31868b3e360075031", "score": "0.6715198", "text": "public function indexAction() {\n\t\t$perpage = $this->perpage;\n\t\t$page = intval($this->getInput('page'));\n\t\t$title = $this->getInput('title');\n\t\t$status = intval($this->getInput('status'));\n\t\tif ($page < 1) $page = 1;\n\t\t\n\t\t$params = array();\n\t\t$search = array();\n\t\tif($title) {\n\t\t\t$search['title'] = $title;\n\t\t\t$params['title'] = array('LIKE', $title);\n\t\t}\n\t\tif($status) {\n\t\t\t$search['status'] = $status;\n\t\t\t$params['status'] = $status - 1;\n\t\t}\n\t\t$params['ad_type'] = $this->ad_type;\n\t list($total, $ads) = Client_Service_Ad::getCanUseAds($page, $perpage, $params);\n\t\t$this->assign('search', $search);\n\t\t$this->assign('ads', $ads);\n\t\t$this->assign('postion', $this->postion);\n\t\t$this->assign('ad_ptype', $this->ad_ptype);\n\t\t$url = $this->actions['listUrl'].'/?' . http_build_query($search) . '&';\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $url));\n\t\t$this->assign(\"total\", $total);\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": "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": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "1c447ea38f47ee196c9862f06d62be13", "score": "0.66989833", "text": "public function index() {\n // Get all records\n $inventories = Inventory::all();\n // Return a list of inventories as a resource\n return InventoryResource::collection($inventories);\n }", "title": "" }, { "docid": "8232f091751d390d26007fa44c243d15", "score": "0.66985327", "text": "public function ListView()\r\n\t{\r\n\t\t$this->Render();\r\n\t}", "title": "" }, { "docid": "b4a4bae274dd96e096b8b4dd55f07244", "score": "0.6691387", "text": "public function index()\n {\n $listInventory = DB::table('inventory')\n ->join('loker', function ($join) {\n $join->on('inventory.id', '=', 'loker.inventory_id')\n ->where('inventory.status_id', 1);\n })->select('*')->get();\n\n // $listInventory = Inventory::all();\n\n return $this->sendResponse(InventoryResource::collection($listInventory), 'List inventory retrieved successfully.');\n\n // return response(['listInventory' => InventoryResource::collection($listInventory), 'message' => 'Retrieved successfully'], 200);\n\n // return response()->json([\n // 'success' => true,\n // 'message' => 'Inventory List',\n // 'data' => $listInventory\n // ]);\n }", "title": "" }, { "docid": "d22f89e9d6b27f65524503cb66269ec3", "score": "0.6684074", "text": "public function index()\n {\n return StudentResource::collection(Student::paginate());\n }", "title": "" }, { "docid": "d6319a190b91d60006c656ee0a40d758", "score": "0.66839117", "text": "public function index()\n {\n $recipes = Recipe::all();\n return RecipeResource::collection($recipes);\n }", "title": "" }, { "docid": "8c7eaa14947e3fc2a24fd3541c974e98", "score": "0.6681884", "text": "function Index()\r\n\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];\r\n\t\t}", "title": "" }, { "docid": "dc37386e4ee63037decda6f08247fdd5", "score": "0.6672321", "text": "public function listAction() {\n $id = $this->_getParam('id', null);\n \n $this->view->listname = $id;\n $this->view->tasks = $this->service->getTasksFromList($id);\n }", "title": "" }, { "docid": "145c8599914d7576e7404163ccf8b519", "score": "0.66572666", "text": "public function index()\n {\n $this->data['action_name'] = 'List';\n $this->data['rows'] = $this->crud_model::all();\n return view($this->crud_view . '.index', $this->data);\n }", "title": "" }, { "docid": "0fb116b141476b8f916bb11b2f5f58d7", "score": "0.6649448", "text": "public function index()\n {\n $items = Item::paginate();\n\n return $this->sendResponse(new ItemsCollection($items), 'Items retrieved successfully.');\n }", "title": "" }, { "docid": "e3a22916f65a2ec228b5e3965c154843", "score": "0.6648183", "text": "public function index()\n {\n return ClientResource::collection(Client::paginate(20));\n }", "title": "" }, { "docid": "8d187ee99e2e1fd8633cee90820af4b0", "score": "0.6647199", "text": "protected function run_list() {\n\t\treturn $this->render_template($this->get_template(), ['objects' => $this->get_model()->get()]);\n\t}", "title": "" }, { "docid": "22d91bbe1074dab71958a7841af08295", "score": "0.6643972", "text": "public function index()\n {\n $this->global['pageTitle'] = 'List Sparepart - '.APP_NAME;\n $this->global['pageMenu'] = 'List Sparepart';\n $this->global['contentHeader'] = 'List Sparepart';\n $this->global['contentTitle'] = 'List Sparepart';\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": "076caa2f864fc2268b0d4d47a19486ab", "score": "0.66425085", "text": "public function index()\n {\n return ProductResource::collection(\n Product::paginate(10)\n );\n }", "title": "" }, { "docid": "de506437ae33a70184040846dd276c78", "score": "0.66416246", "text": "public function index(Request $request)\n {\n $this->authorize('viewList', $this->getResourceModel());\n\n $paginatorData = [];\n $perPage = (int) $request->input('per_page', '');\n $perPage = (is_numeric($perPage) && $perPage > 0 && $perPage <= 100) ? $perPage : 15;\n if ($perPage != 15) {\n $paginatorData['per_page'] = $perPage;\n }\n $search = trim($request->input('search', ''));\n if (! empty($search)) {\n $paginatorData['search'] = $search;\n }\n $records = $this->getSearchRecords($request, $perPage, $search);\n $records->appends($paginatorData);\n\n return view($this->filterIndexView('_resources.index'), $this->filterSearchViewData($request, [\n 'records' => $records,\n 'search' => $search,\n 'resourceAlias' => $this->getResourceAlias(),\n 'resourceRoutesAlias' => $this->getResourceRoutesAlias(),\n 'resourceTitle' => $this->getResourceTitle(),\n 'perPage' => $perPage,\n ]));\n }", "title": "" }, { "docid": "30e45406c5ee243e6ad94d1aa4cbe67f", "score": "0.66305417", "text": "public function listAction()\n {\n $this->_helper->viewRenderer->setViewSuffix('txt');\n\n $model = new Default_Model_Action();\n $this->view->actions = $model->getAll();\n }", "title": "" }, { "docid": "d0295a3d33fcd89a347becc0a34dbe5c", "score": "0.6626129", "text": "public function index()\n {\n $specializations = Specialization::latest()->paginate(25);\n\n return SpecializationResource::collection($specializations);\n }", "title": "" }, { "docid": "25325ea5baf58fda0bdae7e51324bdd3", "score": "0.6625245", "text": "public function index()\n {\n //get tasks\n $tasks = Task::orderBy('id', 'asc')->paginate(100);\n\n //return the collection of tasks as a resource\n return TaskResource::collection($tasks);\n\n }", "title": "" }, { "docid": "0b40c32743cbb461753992a4b05fa545", "score": "0.662055", "text": "public function showlist()\n \t{\n \t\t$items = Item::all();\n \t\treturn view('item.list',array('items'=>$items,'page'=>'list'));\n \t}", "title": "" }, { "docid": "8e7a175a1d69fc1e276dbd290552b522", "score": "0.66002595", "text": "public function list(){\n\t\t$this->current->list();\n\t}", "title": "" }, { "docid": "5071a61b8379d3dbc27c9379480e9a8c", "score": "0.6599687", "text": "public function listAction()\n {\n $this->service->setPaginatorOptions($this->getAppSetting('paginator'));\n $page = (int)$this->param($this->view->translate('page'), 1);\n $propertyId = (int)$this->param($this->view->translate('propertyId'));\n $properties =$this->service\n ->retrieveAllPicturesByPropertyId($propertyId, $page);\n $this->view->pictures = $properties;\n $this->view->paginator = $this->service->getPaginator($page);\n $this->view->propertyId = $propertyId;\n }", "title": "" }, { "docid": "8aabf1b98b72ec9ef7738f5deae5172d", "score": "0.65963185", "text": "public function index()\n {\n return EntryResource::collection(Entry::all());\n //return AnswersResource::collection(Answer::all());\n }", "title": "" }, { "docid": "726d3e7e355e4d0b3bbadd1f2237a742", "score": "0.65945095", "text": "public function overviewAction()\n\t{\n\t\t$subSiteKey = '*';\n\t\tif (Site::isSiteRequest()) {\n\t\t\t$subSiteKey = Site::getCurrentSite()->getRootDocument()->getKey();\n\t\t}\n\t\t$language = $this->language;\n\n\t\t// Retrieve items from object list\n\t\t$newsList = new Object_Vacancy_List();\n\t\t$newsList->setOrderKey(\"date\");\n\t\t$newsList->setOrder(\"desc\");\n\t\t$newsList->setLocale($language);\n\t\tif (Site::isSiteRequest()) {\n\t\t\t$newsList->setCondition('subsites LIKE ? AND title != \"\"', '%' . $subSiteKey . '%');\n\t\t}\n\n\t\t$paginator = Zend_Paginator::factory($newsList);\n\t\t$paginator->setCurrentPageNumber($this->_getParam('page', 1));\n\t\t$paginator->setItemCountPerPage(10);\n\t\t$this->view->paginator = $paginator;\n\t}", "title": "" }, { "docid": "110b54105de1a0ec45cec206dbc35c67", "score": "0.65845126", "text": "public function index()\n {\n // needs to return multiple articles\n // so we use the collection method\n return TaskListResource::collection(Task::all());\n }", "title": "" }, { "docid": "8668ccc17814e06acdd730ecc3fa0dd2", "score": "0.65773076", "text": "public function indexAction() {\r\n\t\t$page = intval($this->getInput('page'));\r\n\t\t$perpage = $this->perpage;\r\n\t\t\r\n\t\tlist($total, $result) = Activity_Service_Fanli::getList($page, $perpage);\r\n\t\t\r\n\t\t$this->assign('result', $result);\r\n\t\t$this->cookieParams();\r\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl']));\r\n\t}", "title": "" }, { "docid": "b81dd94e271b0c84cd548a81ec7d984f", "score": "0.6575219", "text": "public function listAction()\n {\n if ($this->settings['listtype'] === 'x') {\n $projects = $this->projectRepostitory->findAll();\n } else {\n $projects = $this->projectRepostitory->findByStatus($this->settings['listtype']);\n }\n\n $this->view->assign('projects', $projects);\n }", "title": "" }, { "docid": "c192cad1748d0fe11000b8d2063a908e", "score": "0.65643096", "text": "public function index()\n {\n return $this->view('lists');\n }", "title": "" }, { "docid": "c192cad1748d0fe11000b8d2063a908e", "score": "0.65643096", "text": "public function index()\n {\n return $this->view('lists');\n }", "title": "" }, { "docid": "bf0537679d083764e7d496b7e9f333b7", "score": "0.6550873", "text": "public function index(): View\n {\n $items = QueryBuilder::for(Resource::class)\n ->allowedFilters([\n 'name',\n 'is_facility',\n 'categories.id',\n 'groups.id',\n AllowedFilter::scope('flags', 'currentStatus'),\n ])\n ->defaultSort('name')\n ->allowedSorts(['name', 'description', 'is_facility'])\n ->paginate(15);\n\n $filterCategories = Category::orderBy('name')->pluck('name', 'id');\n $filterGroups = Group::orderBy('name')->pluck('name', 'id');\n $filterFlags = Flag::pluck('name', 'abbr');\n\n return view('resources.index')->with(compact([\n 'items',\n 'filterCategories',\n 'filterGroups',\n 'filterFlags',\n ]));\n }", "title": "" }, { "docid": "3cf2644fce763701f59cab74b93915e2", "score": "0.6540747", "text": "public function indexAction() {\n\t\t$request = $this->getRequest();\n\t\t$params = $request->getParams();\n\n\t\t$list = new List8D_Model_List;\n\t\t$list = $list->getById(1);\n\t\t\n\t\t$acl = new List8D_ACL;\n\t\t$this->view->list = $list;\n\t\t$this->view->aclresult = $acl->checkListACL($list);\n\n\t}", "title": "" }, { "docid": "ed961c9f0fcb9ad07a48b882d9df24ad", "score": "0.65403396", "text": "public function index()\n\t{\n\t\t$subResourceDetailLikes = $this->subResourceDetailLikeRepository->paginate(10);\n\n\t\treturn view('subResourceDetailLikes.index')\n\t\t\t->with('subResourceDetailLikes', $subResourceDetailLikes);\n\t}", "title": "" }, { "docid": "f1ecf3ea6ca691d8230bfd5de1a0c2bc", "score": "0.6537993", "text": "public function index()\n\t{\n\t\t$view = $this->start_view($this->section_url.'/be/list');\n\t\t\n\t\t// Type\n\t\tif($this->input->get('type') !== false && array_key_exists($this->input->get('type'),Kohana::config('example_3.types'))){\n\t\t\t$type = $this->input->get('type');\n\t\t} else {\n\t\t\t$type = 1;\n\t\t}\n\t\t\n\t\tlist($pagination, $data) = $this->list_data($type);\n\t\t\n\t\t$view->set_global('data', $data);\n\t\t$view->set_global('pagination', $pagination);\n\t\t\n\t\t// Set general info\n\t\t$view->set_global($this->section_details());\n\t\t\n\t\t// Type tab override\n\t\t$view->set_global('active_tab',$type);\n\t\t\n\t\t// Set Breadcrumb items\n\t\t$view->breadcrumbs = array(\n\t\t\t$this->section_url => $this->section_name,\n\t\t\t'' => 'Listing'\n\t\t);\n\t\t\n\t\t$this->render_view($view);\n\t}", "title": "" }, { "docid": "14cbe87d366063edc7062faf79058bc0", "score": "0.6533205", "text": "public function index()\n {\n return $this->response->paginator(Viewer::orderBy('id', 'desc')->paginate(10), new ViewerTransformer);\n }", "title": "" }, { "docid": "a29a971d51fcb42465841db6bd2a38ad", "score": "0.6532911", "text": "public function viewList() {\n\n\t\t$context = (isset($this->options['list_type'])) ? $this->options['list_type'] : 'list';\n\n\t\telgg_push_context($context);\n\n\t\t$items = $this->getItems();\n\t\t$options = $this->getOptions();\n\t\t$count = $this->getCount();\n\n\t\t$offset = elgg_extract('offset', $options);\n\t\t$limit = elgg_extract('limit', $options);\n\t\t$base_url = elgg_extract('base_url', $options, '');\n\t\t$pagination = elgg_extract('pagination', $options, true);\n\t\t$offset_key = elgg_extract('offset_key', $options, 'offset');\n\t\t$position = elgg_extract('position', $options, 'after');\n\n\t\tif ($pagination && $count) {\n\t\t\t$nav = elgg_view('navigation/pagination', array(\n\t\t\t\t'base_url' => $base_url,\n\t\t\t\t'offset' => $offset,\n\t\t\t\t'count' => $count,\n\t\t\t\t'limit' => $limit,\n\t\t\t\t'offset_key' => $offset_key,\n\t\t\t));\n\t\t}\n\n\t\t$html .= '<div class=\"elgg-list-container\">';\n\n\t\tif ($position == 'before' || $position == 'both') {\n\t\t\t$html .= $nav;\n\t\t}\n\n\t\t$list_attrs = elgg_format_attributes($this->getListAttributes());\n\n\t\t$html .= \"<ul $list_attrs>\";\n\n\t\tforeach ($items as $item) {\n\n\t\t\t$view = elgg_view_list_item($item, $options);\n\n\t\t\tif (!$view) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$has_items = true;\n\n\t\t\t$item_attrs = elgg_format_attributes($this->getItemAttributes($item));\n\n\t\t\t$html .= \"<li $item_attrs>$view</li>\";\n\t\t}\n\n\t\tif (!$has_items) {\n\t\t\t$html .= '<li class=\"elgg-list-placeholder\">' . elgg_echo('list:empty') . '</li>';\n\t\t}\n\n\t\t$html .= '</ul>';\n\n\t\tif ($position == 'after' || $position == 'both') {\n\t\t\t$html .= $nav;\n\t\t}\n\n\t\t$html .= '</div>';\n\n\t\telgg_pop_context();\n\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "f1673a17c984cf24b6d574aa7a325e35", "score": "0.65327483", "text": "public function index()\n {\n return FlightResource::collection(Flight::paginate(15));\n }", "title": "" }, { "docid": "eb4bc3428c5096a035b8d71351d4f9c3", "score": "0.6529615", "text": "public function index()\n {\n //\n $units = Unit::paginate(10);\n return UnitResource::collection($units);\n }", "title": "" }, { "docid": "1e991a3059ff8a7aa8b4543e6d5ec071", "score": "0.652604", "text": "public function index()\n {\n $data['resources'] = CarModel::paginate($this->paginate_by);\n return view($this->base_view_path.'index', $data);\n }", "title": "" }, { "docid": "0aefb1879ed86536b4b0301bdcb431fb", "score": "0.65217865", "text": "public function indexAction() {\r\n\t\t$page = intval($this->getInput('page'));\r\n\t\t$ad_type = $this->getInput('ad_type');\r\n\t\t\r\n\t\t$perpage = $this->perpage;\r\n\t\t\r\n\t\t$search = array();\r\n\t\tif ($ad_type) $search['ad_type'] = $ad_type;\r\n\t\tlist($total, $ads) = Gou_Service_Ad::getList($page, $perpage, $search);\r\n\t\t$this->assign('ad_types', $this->ad_types);\r\n\t\t\r\n\t\t$this->assign('search', $search);\r\n\t\t$this->assign('ads', $ads);\r\n\t\t$this->cookieParams();\r\n\t\t$url = $this->actions['listUrl'].'/?' . http_build_query($search) . '&';\r\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $url));\r\n\t}", "title": "" }, { "docid": "f504aa8b0d4e26dbe40f10d29efd07da", "score": "0.6520624", "text": "public function index()\n {\n return $this->collection(\n $this->repository->all()\n );\n }", "title": "" }, { "docid": "84219766af32e7ff206e88dffca57430", "score": "0.65162116", "text": "public function index()\n {\n try {\n return $this->resp->ok(eRespCode::CAT_LISTED_200_00, new CategoryResourceCollection($this->categoryService->getAll()));\n } catch (Throwable $th) {\n Log::info($th);\n return $this->resp->guessResponse(eRespCode::_500_INTERNAL_ERROR);\n }\n }", "title": "" }, { "docid": "5439447ac88f8cc98dc7832990b07305", "score": "0.65154237", "text": "public function indexAction()\n {\n $this->display();\n\n }", "title": "" }, { "docid": "e1183ebde99a8d3c589ddd34164e88f0", "score": "0.65118366", "text": "public function index() {\n\t\t$this->all();\n\t}", "title": "" }, { "docid": "93a7ba35330c263ce449589f25157263", "score": "0.65116036", "text": "public function index()\n {\n $todos = Todo::latest()->get();\n return (new TodoResourceCollection($todos));\n }", "title": "" }, { "docid": "2277c0665c4148cb55e2e8ca37774962", "score": "0.6510777", "text": "public function index()\n {\n return ProductResource::collection(Product::paginate(20));\n }", "title": "" }, { "docid": "b04a0cb3fd073d7067244a0fe69ce396", "score": "0.65095365", "text": "public function index()\n {\n //get movies\n $movies = MoviesModel::paginate(10);\n\n //return collection of article as a resource\n return MoviesResource::collection($movies);\n }", "title": "" }, { "docid": "021eb06ebdab9fb37e6b65a67751a381", "score": "0.64975077", "text": "public function listData()\n {\n $catalog = DB::table($this->screen)->where('IsActive', '1')->paginate(15);\n\n $data['catalog'] = $catalog;\n return view('catalog.index', $data);\n }", "title": "" }, { "docid": "cbfc279e9e82aba8cb2814815737b9eb", "score": "0.64964104", "text": "public function listAction() {\n $users = $this->userRepository->findAll();\n $this->view->assign('users', $users);\n $this->view->render();\n }", "title": "" }, { "docid": "c0ac6b16fca466eabec5fae9f571583e", "score": "0.64929396", "text": "public function actionList() {\n\t\t$id = isset($_GET['id'])? $_GET['id'] : 'all';\n\n\t\tif(is_numeric($id))\n\t\t\t$list = CActiveRecord::model('X2List')->findByPk($id);\n\t\t\t\n\t\tif(isset($list)) {\n\t\t\t$model = new Contacts('search');\n\t\t\t$model->setRememberScenario('contacts-list-'.$id);\n\t\t\t//set this as the list we are viewing, for use by vcr controls\n\t\t\tYii::app()->user->setState('contacts-list', $id);\n\t\t\t$dataProvider = $model->searchList($id);\n\t\t\t$list->count = $dataProvider->totalItemCount;\n\t\t\t$list->save();\n\t\t\t\n\t\t\t$this->render('list',array(\n\t\t\t\t'listModel'=>$list,\n\t\t\t\t// 'listName'=>$list->name,\n\t\t\t\t// 'listId'=>$id,\n\t\t\t\t'dataProvider'=>$dataProvider,\n\t\t\t\t'model'=>$model,\n\t\t\t));\n\t\t\t\n\t\t} else {\n\t\t\tif($id == 'my')\n\t\t\t\t$this->redirect(array('/contacts/myContacts'));\n\t\t\t\t// $dataProvider = CActiveRecord::model('Contacts')->searchAll();\n\t\t\telseif($id == 'new')\n\t\t\t\t$this->redirect(array('/contacts/newContacts'));\n\t\t\t\t// $dataProvider = CActiveRecord::model('Contacts')->searchAll();\n\t\t\telse\n\t\t\t\t$this->redirect(array('/contacts/allContacts'));\n\t\t}\n\t}", "title": "" }, { "docid": "005629388e14797f6fdbc0ea8785e7ac", "score": "0.64864695", "text": "public function index()\n {\n $Products = products::orderby('created_at','desc')->paginate(40);\n return ProductsResource::collection($Products);\n }", "title": "" }, { "docid": "3e2e5ecfe76abe9cd2482096fab1fab6", "score": "0.64849615", "text": "public function index()\n {\n //\n $response = $this->rest->all();\n return $this->response(\n \"Menus Successfully Fetched.\",\n $response,\n Response::HTTP_OK\n );\n }", "title": "" }, { "docid": "837955b2fe169580b5216e269f283ee3", "score": "0.64833194", "text": "public function listAction()\n {\n $data = $this->getDm()->getRepository('AcmeDemoBundle:Widget')->findAll();\n $widgets = array();\n foreach($data as $v) {\n $widgets[] = $v;\n }\n\n $view = View::create(array('vendors' => $widgets));\n $view->setTemplate('AcmeDemoBundle:Widgets:list.html.twig');\n $view->setData(array('widgets' => $widgets));\n\n return $this->get('fos_rest.view_handler')->handle($view); \n }", "title": "" } ]
44c95a4d8f3517b8c786d3e5172e1141
Gets the icon URL
[ { "docid": "de5d6f2139e59a271b28e13b3253f3a2", "score": "0.7421776", "text": "public function getIcon()\n {\n return $this->icon;\n }", "title": "" } ]
[ { "docid": "4c8a40c35dc78f1b69593792b84d0250", "score": "0.8271647", "text": "public function getIconUrl()\n\t{\n\t\treturn $this->getOauthProvider()->getIconUrl();\n\t}", "title": "" }, { "docid": "4c58fd69042a5ba06e414e2562cac5d9", "score": "0.765036", "text": "public function getIcon() {\n\t\treturn self::URI . 'images/cdrfavicon.png';\n\t}", "title": "" }, { "docid": "751b5ced20ebd93476236823dc78aa7b", "score": "0.76496494", "text": "public function getIcon(): string\n {\n return $this->icon;\n }", "title": "" }, { "docid": "b34c03e71a7c0e8c97d773c334ea5a1b", "score": "0.7639846", "text": "private function get_icon()\n\t{\n\t\treturn $this->m_icon;\n\t}", "title": "" }, { "docid": "5578970fcd41a36c98c317b620399901", "score": "0.76188815", "text": "public function icon()\n {\n return $this->icon;\n }", "title": "" }, { "docid": "9e6374845433e160b30d78604c32c0a5", "score": "0.7597964", "text": "public function getIcon() {\t\n\t\t$data = $this->data[$this->name];\n\t\t$field = 'icon';\n\t\t$path = $this->getImagePath($data, $this->name, FILES, Configure::read('Folders.files.games').DS.$data['id'].DS.$field, $field);\n\t\tif(!$data[$field]) $path.= DS.'general'.DS.$field.'.png';\n\t\t\n\t\treturn $path;\t\t\n\t}", "title": "" }, { "docid": "785645e35d6ed1ecf61376c16559bb39", "score": "0.756526", "text": "function getIconLocation() {\n\t\t$baseUrl = Request::getBaseUrl() . '/lib/pkp/templates/images/icons/';\n\t\tswitch ($this->getAssocType()) {\n\t\t\tcase NOTIFICATION_TYPE_ARTICLE_SUBMITTED:\n\t\t\t\treturn $baseUrl . 'page_new.gif';\n\t\t\t\tbreak;\n\t\t\tcase NOTIFICATION_TYPE_SUPP_FILE_MODIFIED:\n\t\t\t\treturn $baseUrl . 'page_attachment.gif';\n\t\t\t\tbreak;\n\n\t\t\tcase NOTIFICATION_TYPE_METADATA_MODIFIED:\n\t\t\tcase NOTIFICATION_TYPE_GALLEY_MODIFIED:\n\t\t\t\treturn $baseUrl . 'edit.gif';\n\t\t\t\tbreak;\n\t\t\tcase NOTIFICATION_TYPE_SUBMISSION_COMMENT:\n\t\t\tcase NOTIFICATION_TYPE_LAYOUT_COMMENT:\n\t\t\tcase NOTIFICATION_TYPE_COPYEDIT_COMMENT:\n\t\t\tcase NOTIFICATION_TYPE_PROOFREAD_COMMENT:\n\t\t\tcase NOTIFICATION_TYPE_REVIEWER_COMMENT:\n\t\t\tcase NOTIFICATION_TYPE_REVIEWER_FORM_COMMENT:\n\t\t\tcase NOTIFICATION_TYPE_EDITOR_DECISION_COMMENT:\n\t\t\tcase NOTIFICATION_TYPE_USER_COMMENT:\n\t\t\t\treturn $baseUrl . 'comment_new.gif';\n\t\t\t\tbreak;\n\t\t\tcase NOTIFICATION_TYPE_PUBLISHED_ISSUE:\n\t\t\t\treturn $baseUrl . 'list_world.gif';\n\t\t\t\tbreak;\n\t\t\tcase NOTIFICATION_TYPE_NEW_ANNOUNCEMENT:\n\t\t\t\treturn $baseUrl . 'note_new.gif';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn $baseUrl . 'page_alert.gif';\n\t\t}\n\t}", "title": "" }, { "docid": "32dadd08665f3662c4027a3577789568", "score": "0.75626814", "text": "protected function getIcon()\n {\n return $this->icon;\n }", "title": "" }, { "docid": "2507eb3c81dde290991dacd3ff320bad", "score": "0.7508961", "text": "abstract public function getNodeIconURL();", "title": "" }, { "docid": "71b36c359c16e9754f74b88a68aaeca0", "score": "0.75026375", "text": "public function getIcon(): string\n\t{\n\t\treturn $this->icon;\n\t}", "title": "" }, { "docid": "6701d03a27efa0a38f022b211bdb3ddf", "score": "0.74768806", "text": "public function getIcon()\n {\n\n return $this->_dependencies->utils->getGravatar($this->getEmail());\n\n }", "title": "" }, { "docid": "6cf92c105dbf290d96bfd6c1792dbbe3", "score": "0.7457286", "text": "public function getIcon()\n {\n if (!$this->icon) {\n return '_fallback.gif';\n }\n\n return $this->icon;\n }", "title": "" }, { "docid": "11872264d3fb3e4e84e38aae84de006d", "score": "0.74255455", "text": "function getIcon() {\n\t\treturn '../' . t3lib_extMgm::siteRelPath('tt_news') . 'ext_icon.gif';\n\t}", "title": "" }, { "docid": "62ef08e8a7a4ca25f571f504b97a4ed9", "score": "0.7418412", "text": "public function getIcon() { return $this->icon; }", "title": "" }, { "docid": "7c8dafcd15bd24bd20a0a3f301d8f322", "score": "0.7415996", "text": "function getIcon() {\n return \"/images/weather/\" . $this->weather['icon'] . \".png\";\n }", "title": "" }, { "docid": "cd15d255557d5e508943076bd98d7b17", "score": "0.73682976", "text": "public function getIcon()\n {\n return $this->icon;\n }", "title": "" }, { "docid": "0556a869913fa50049b5f640926cb609", "score": "0.7359751", "text": "public function getIcon()\r\n {\r\n return $this->icon;\r\n }", "title": "" }, { "docid": "0556a869913fa50049b5f640926cb609", "score": "0.7359751", "text": "public function getIcon()\r\n {\r\n return $this->icon;\r\n }", "title": "" }, { "docid": "134db8e9621cc0e7e2b51e866b7b550a", "score": "0.7359286", "text": "public function getIcon() {\n\t\treturn $this->icon;\n\t}", "title": "" }, { "docid": "134db8e9621cc0e7e2b51e866b7b550a", "score": "0.7359286", "text": "public function getIcon() {\n\t\treturn $this->icon;\n\t}", "title": "" }, { "docid": "134db8e9621cc0e7e2b51e866b7b550a", "score": "0.7359286", "text": "public function getIcon() {\n\t\treturn $this->icon;\n\t}", "title": "" }, { "docid": "0e5191ff4ea060d17b8f95ee888145a9", "score": "0.7317549", "text": "public function getIcon();", "title": "" }, { "docid": "0e5191ff4ea060d17b8f95ee888145a9", "score": "0.7317549", "text": "public function getIcon();", "title": "" }, { "docid": "0e5191ff4ea060d17b8f95ee888145a9", "score": "0.7317549", "text": "public function getIcon();", "title": "" }, { "docid": "90925b51fb16af0e17ecc6ed00bbd6be", "score": "0.73154587", "text": "public function get_icon_url ($node)\n {\n }", "title": "" }, { "docid": "a2012030f564fde02d0781d0b31e1cdf", "score": "0.72911704", "text": "public function icon()\n {\n switch ($this->type) {\n case self::TYPE_ERROR:\n return '../img/icon_message_error.png';\n case self::TYPE_INFO:\n return '../img/icon_message.png';\n case self::TYPE_WARNING:\n return '../img/icon_message_warning.png';\n case self::TYPE_SUCCESS:\n return '../img/icon_message_success.png';\n default:\n return '../img/icon_message.png';\n }\n }", "title": "" }, { "docid": "4b88b4285d3603621fba314b41287021", "score": "0.72414744", "text": "public function getMenuIcon()\n {\n // Look for these files by default\n // If your plugin directory contains an [post-type].png file, that will by default be the icon\n // Ex: hot-sauce.png\n $reflector = new \\ReflectionClass(get_called_class());\n $dir = basename(dirname($reflector->getFileName()));\n $post_type = $this->getPostType();\n $fnames = array(\n $post_type.'.png',\n $post_type.'.gif',\n $post_type.'.jpg'\n );\n foreach ($fnames as $fname) {\n $fpath = sprintf('%s/%s/%s', WP_PLUGIN_DIR, $dir, $fname);\n if (!file_exists($fpath)) {\n continue;\n }\n\n return sprintf('%s/%s/%s', WP_PLUGIN_URL, $dir, $fname);\n }\n return '';\n }", "title": "" }, { "docid": "f19926071ab7b68ae1c857303f9af3c0", "score": "0.72081465", "text": "public static function websiteFavIconUrl()\n {\n return url(Setting::get('website_fav_icon_path') . '/' . Setting::get('website_fav_icon_name'));\n }", "title": "" }, { "docid": "21d7a3e4ce9f73817845a4c7877b65ef", "score": "0.71973604", "text": "public function renderIcon()\n {\n return $this->icon;\n }", "title": "" }, { "docid": "fbfa2e83239b5d146dcefa3707cb064a", "score": "0.71952605", "text": "public function icon()\r\n {\r\n self::$ICON = self::$ICON ? self::$ICON : new IconImageResource();\r\n return self::$ICON;\r\n }", "title": "" }, { "docid": "1df752160a6cd31e4b41dc355276a7c4", "score": "0.7165165", "text": "public static function iconPath()\n {\n return Craft::getAlias(\"@imarc/sheetsync/assetbundles/sheetsyncutilityutility/dist/img/SheetSyncUtility-icon.svg\");\n }", "title": "" }, { "docid": "7cfb8b0be65729cb877754c9266d6b69", "score": "0.7138195", "text": "public function icon();", "title": "" }, { "docid": "7cfb8b0be65729cb877754c9266d6b69", "score": "0.7138195", "text": "public function icon();", "title": "" }, { "docid": "5b878511267e1138c226fa22f7357338", "score": "0.71370745", "text": "function get_icon() {\n\t\tif ( $this->available_cc ) {\n\t\t\t$icon = '';\n\t\t\tforeach ( $this->available_cc as $card ) {\n\t\t\t\tif ( file_exists( Paysafe::plugin_path() . '/assets/images/' . strtolower( $card ) . '.png' ) ) {\n\t\t\t\t\t$icon .= '<img src=\"' . esc_url( \\WC_HTTPS::force_https_url( Paysafe::plugin_url() . '/assets/images/' . strtolower( $card ) . '.png' ) ) . '\" alt=\"' . esc_attr( strtolower( $card ) ) . '\" />';\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$icon = '<img src=\"' . esc_url( \\WC_HTTPS::force_https_url( $this->icon ) ) . '\" alt=\"' . esc_attr( $this->title ) . '\" />';\n\t\t}\n\t\t\n\t\treturn $icon;\n\t}", "title": "" }, { "docid": "7a35f92f9017a14a11612f41142083f7", "score": "0.7126608", "text": "public function url() {\n return $this->getImageFile();\n }", "title": "" }, { "docid": "121293b290f4e57d04cc51b009ee3018", "score": "0.7120703", "text": "public function get_icon() {\n return 'fa fa-picture-o';\n }", "title": "" }, { "docid": "d1fe5de6281ddbe2e8370bc24a368682", "score": "0.71091014", "text": "public function getIcon($icon = null)\n {\n if (!$icon) return '';\n $iconUrl = Mage::getStoreConfig('japi/jmango_smart_app_banner/' . $icon);\n return strpos($iconUrl, 'http') === 0 ? $iconUrl : Mage::getBaseUrl('media') . 'japi/icon/' . $iconUrl;\n }", "title": "" }, { "docid": "1291ab32fdfdea2d1b61e79f2e14e00b", "score": "0.7107746", "text": "public function get_icon() {\n $icon = '<img src=\"' . WC_HTTPS::force_https_url( WC()->plugin_url() . \"/assets/images/icons/credit-cards/visa.png\" ) . '\" alt=\"Visa\" />';\n $icon .= '<img src=\"' . WC_HTTPS::force_https_url( WC()->plugin_url() . \"/assets/images/icons/credit-cards/mastercard.png\" ) . '\" alt=\"Mastercard\" />';\n\n return apply_filters( \"woocommerce_gateway_icon\", $icon, $this->id );\n }", "title": "" }, { "docid": "b8906d9ebd13bc9e4c5abea3851d3778", "score": "0.7104452", "text": "public function getFaviconUrl()\n {\n $links = $this->getHeadLinksByRel('shortcut icon');\n\n if (!empty($links) && isset($links[0]['href'])) {\n $url = $links[0]['href'];\n }\n\n if ($this->isAbsoluteUrl($url)) {\n return $url;\n } else {\n return UrlHelper::combineUrl($this->getUrl(), $url);\n }\n }", "title": "" }, { "docid": "6b6efcd71f5b23e5b781aaa156168c80", "score": "0.7103855", "text": "public static function iconPath()\n {\n return Craft::getAlias(\"@kffein/prerenderioclearcache/assetbundles/prerenderioclearcacheutilityutility/dist/img/PrerenderIoClearCacheUtility-icon.svg\");\n }", "title": "" }, { "docid": "c6aa10c4e6a3e88d39aeee77697127a2", "score": "0.71000177", "text": "public function site_icon_url( $val, Rich_Snippet $rich_snippet, array $meta_info ): string {\n\n\t\tif ( ! has_site_icon() ) {\n\t\t\treturn '';\n\t\t}\n\n\t\treturn (string) Helper_Model::instance()->get_media_meta(\n\t\t\t'url',\n\t\t\tget_option( 'site_icon' )\n\t\t);\n\t}", "title": "" }, { "docid": "64cc8403aad6a5c03ca3f4e1fe549272", "score": "0.70877105", "text": "public function icon()\n\t{\n\t\treturn \\nitm\\helpers\\Relations::getRelatedRecord('icon', $this, Image::className());\n\t}", "title": "" }, { "docid": "6b835538e299a0445c6e71b855a7e2fa", "score": "0.7067241", "text": "private function iconPath(): string {\n return self::ICONS_PATH . $this->randomDirectory . '/';\n }", "title": "" }, { "docid": "d3e1df5bab0e6eae49a697bc366bb0cc", "score": "0.7061634", "text": "public function icon(){\n\t\t\n\t\t$icon = $this->_findIconByTheme(\\GO::user()->theme);\n\t\tif(!$icon)\n\t\t\t$icon = $this->_findIconByTheme(\"Default\");\n\t\t\n\t\tif(!$icon)\n\t\t\t$icon = \\GO::config()->host.'views/Extjs3/themes/Paper/img/default-avatar.svg';\n\t\t\n\t\treturn $icon;\n\t}", "title": "" }, { "docid": "6d278d0f64100eaf85b58bb142478866", "score": "0.7031723", "text": "protected function getShortcutIcon()\n {\n return $this->shortcut_icon;\n }", "title": "" }, { "docid": "49140a05819851beb3137b339baf95a0", "score": "0.7009413", "text": "public function get_icon() {\n return 'fa fa-ils';\n }", "title": "" }, { "docid": "c8788d27e3c4093ddb67834bfc74a6d4", "score": "0.6983101", "text": "public function getCmsIcon()\n {\n return $this->cmsIcon;\n }", "title": "" }, { "docid": "6bc1122a7b6d961eecd2d878f4d93fb7", "score": "0.6978854", "text": "public function getIconFullpath() {\n\t\tt3lib_div::loadTCA(strtolower(__CLASS__));\n\t\tglobal $TCA;\n\n\t\t$imageDirectoryName = $TCA[strtolower(__CLASS__)]['columns']['icon']['config']['uploadfolder'];\n\t\t$imageFilename = rtrim($imageDirectoryName, '/') . '/' . $this->icon;\n\n\t\tif (!file_exists(PATH_site . '/' . $imageFilename)) {\n\t\t\t$imageDirectoryName = t3lib_extMgm::siteRelPath('mm_forum') . 'Resources/Public/Images/Icons/Moderation';\n\t\t\t$imageFilename = \"$imageDirectoryName/{$this->icon}\";\n\t\t}\n\n\t\treturn file_exists(PATH_site . '/' . $imageFilename) ? $imageFilename : NULL;\n\t}", "title": "" }, { "docid": "e453d6b3f1192bec7b02d4499e69fd41", "score": "0.697538", "text": "private static function getIconPath(): string\n {\n return MUNICIPIO_PATH . \"assets/dist/data/ico.json\";\n }", "title": "" }, { "docid": "fffc910a58e3d5ef325af159a1a164e7", "score": "0.6973974", "text": "public function mod_icon_url($iconname, $module);", "title": "" }, { "docid": "96e8db88217896685fc0cd7e45b9eea1", "score": "0.6965161", "text": "public function old_icon_url($iconname);", "title": "" }, { "docid": "e8ca758bfb0f25927839ecd44c9bb8d1", "score": "0.695901", "text": "public function icon(): string\n\t{\n\t\treturn 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADMSURBVEhLY6A3YExLSwsA4nIycQDIDIhRWEBqamo/UNF/SjDQjF6ocZgAKPkRiFeEhoYyQ4WIBiA9QAuWAPEHqBAmgLqgHcolGQD1V4DMgHIxwbCxYD+QBqcKINseKo6eWrBioPrtQBq/BcgY5ht0cUIYbBg2AJKkRxCNWkDQgtFUNJwtABr+F6igE8olGQD114HMgHIxAVDyAhA/AlpSA8RYUwoeXAPVex5qHCbIyMgwBCkAuQJIY00huDBUz/mUlBQDqHGjgBjAwAAACexpph6oHSQAAAAASUVORK5CYII=';\n\t}", "title": "" }, { "docid": "4cc3e7371e8942b3492362759ce16c4d", "score": "0.6947732", "text": "function ngg_fs_custom_icon() {\n\treturn M_Static_Assets::get_static_abspath('photocrati-nextgen_admin#imagely_icon.png');\n}", "title": "" }, { "docid": "7b8e63f404c271774b3fbc1bfd8e7178", "score": "0.69183177", "text": "public function get_icon() {\n\t\treturn 'fa fa-desktop';\n\t}", "title": "" }, { "docid": "50366a9ffefc1587e7039ea6831c4672", "score": "0.6914065", "text": "public function getServerIcon()\n {\n return $this->serverIcon;\n }", "title": "" }, { "docid": "efd4505b23f39c3dbbe91cd0783f6bd3", "score": "0.68964225", "text": "public function get_icon() {\n return 'eicon-button';\n }", "title": "" }, { "docid": "79986055d4b869238225cc85501cc8e0", "score": "0.6874033", "text": "public function get_icon() {\n\t\treturn 'eicon-google-maps';\n\t}", "title": "" }, { "docid": "1715fd8f61a5a091cd89b60ed8d5c988", "score": "0.6862898", "text": "public function icon(): ?string\n {\n return $this->icon;\n }", "title": "" }, { "docid": "be505753cd0cdcfe2f0667247c9f501a", "score": "0.6827739", "text": "function plugin_geticon_{plugin}()\n{\n global $_CONF;\n\n return $_CONF['site_url'] . '/{plugin}/images/{plugin}.gif';\n}", "title": "" }, { "docid": "6e0096100bb947adc35a9af0ec0d6d72", "score": "0.6827008", "text": "public function getImageUrlAttribute(): string\n {\n if($this->icon)\n {\n return url($this->icon);\n }\n\n return 'https://picsum.photos/32/32';\n }", "title": "" }, { "docid": "9e096adf54067fd0750ccc3fcd7a1859", "score": "0.6818357", "text": "public function get_icon()\n {\n return 'eicon-nav-menu';\n }", "title": "" }, { "docid": "da8434929101b0f7ac056c08f52f4653", "score": "0.68053955", "text": "public function get_icon()\n {\n return 'fa fa-list-alt';\n }", "title": "" }, { "docid": "aa342f2b3b1797b5c4572eb78fcbc17b", "score": "0.6795607", "text": "public function get_icon() {\r\n\t\treturn 'eicon-favorite';\r\n\t}", "title": "" }, { "docid": "4d2792eb1e5a0f15ecc265834ca7b95e", "score": "0.6755913", "text": "public function getIconId() {\r\n return $this->iconId;\r\n }", "title": "" }, { "docid": "d5f7d756178e4d859deababe0e048869", "score": "0.6737748", "text": "public function get_icon() {\n // FIXME: This is from the tutorial\n return 'fa fa-pencil';\n }", "title": "" }, { "docid": "510cf6774bf5c9d574d6c5d2ee0bf21e", "score": "0.6736526", "text": "public static function getIconsPath()\n {\n if (!self::$iconsPath)\n {\n self::$iconsPath = sfConfig::get('sf_web_dir').self::getIconsDir();\n }\n return self::$iconsPath;\n }", "title": "" }, { "docid": "bfdf7c0b21c59b83c112bc3f2b4aa084", "score": "0.6725875", "text": "public function get_icon() {\n if($this->icon) {\n $content = html_writer::start_tag('i', array('class'=>'fa fa-'.$this->icon));\n $content .= html_writer::end_tag('i');\n } else {\n $content = '';\n }\n return $content;\n }", "title": "" }, { "docid": "29c7a0aca4d97b094f007d0fee6ca880", "score": "0.6717926", "text": "public function get_icon() {\n\t\treturn 'eicon-tabs';\n\t}", "title": "" }, { "docid": "d9151afc0c4d92ac7c9cce2bf8f8e041", "score": "0.6713149", "text": "public function get_icon() {\r\n\t\treturn 'eicon-person';\r\n\t}", "title": "" }, { "docid": "8c252b050b794a280ac157942e031ee7", "score": "0.6711848", "text": "public function get_icon() {\n return 'fa fa-handshake';\n }", "title": "" }, { "docid": "b2575aa1402d37c5620d8ceb977c2364", "score": "0.66953284", "text": "public function get_icon() {\n return 'fa fa-newspaper';\n }", "title": "" }, { "docid": "3bc043f8f78dbe1425906ad7787136d3", "score": "0.6691158", "text": "public function Icon()\n {\n switch ($this->Title) {\n case 'Twitter':\n return 'fab fa-twitter-square';\n break;\n case 'Google+':\n return 'fab fa-google-plus-square';\n break;\n case 'Instagram':\n return 'fab fa-instagram';\n break;\n case 'YouTube':\n return 'fab fa-youtube-square';\n break;\n case 'LinkedIn':\n return 'fab fa-linkedin-square';\n break;\n case 'Pinterest':\n return 'fab fa-pinterest-square';\n break;\n case 'SoundCloud':\n return 'fab fa-soundcloud';\n break;\n case 'Tumblr':\n return 'fab fa-tumblr-square';\n break;\n default:\n case 'Facebook':\n return 'fab fa-facebook-square';\n break;\n }\n }", "title": "" }, { "docid": "5cde06195238edef4ee30263a0e26bff", "score": "0.66845214", "text": "protected function get__icon()\n\t{\n\t\treturn 'random';\n\t}", "title": "" }, { "docid": "c88a1fc14bf4f4ec940f0aa1b37e708c", "score": "0.66822857", "text": "public function get_icon() {\n\t\treturn parent::get_widget_icon( 'FAQ' );\n\t}", "title": "" }, { "docid": "78f0868979d7d0cda26bf3e401edc6f4", "score": "0.66775805", "text": "public function get_icon() {\n\t\treturn 'tracker/navbar';\n\t}", "title": "" }, { "docid": "3ece5742e93299c90c90df51df9b5e45", "score": "0.667397", "text": "public function getImageUrl($icon)\n {\n $mediaUrl = $this->_storeManager\n ->getStore()\n ->getBaseUrl(\\Magento\\Framework\\UrlInterface::URL_TYPE_MEDIA);\n $imageUrl = $mediaUrl . 'productbadge/icon/' . $icon;\n return $imageUrl;\n }", "title": "" }, { "docid": "26a1b09d0097277b91473bc16c92b715", "score": "0.66709197", "text": "function getIconUrl($size = 'medium') {\n switch ($size) {\n \tcase 'big':\n return get_image_url('icon_big.gif', $this->name);\n \t\tbreak;\n \t\t\n \tcase 'small':\n return get_image_url('icon_small.gif', $this->name);\n \t\tbreak; \n \n \tdefault:\n return get_image_url('icon_medium.gif', $this->name);\n \t\tbreak;\n } // switch\n }", "title": "" }, { "docid": "e79fbe6fa53dd0179e01c2cc4bcd76f1", "score": "0.6670419", "text": "public function get_font_icon() {\n\t\treturn 'link';\n\t}", "title": "" }, { "docid": "04012b4f325705ed6b0752c2556a9c49", "score": "0.6664116", "text": "public function getImageHref()\n\t{\n\t\treturn $this->image\n\t\t\t? $this->getImageFileHref()\n\t\t\t: '/modules/skin/bootstrap/img/default_user.png';\n\t}", "title": "" }, { "docid": "b99c199e51f3c06a90eeca0da4402bce", "score": "0.665951", "text": "public function getIcon(): string {\n return 'far fa-file-alt';\n }", "title": "" }, { "docid": "3cc995cd7e666d8c7b054503e23beb1a", "score": "0.6653573", "text": "public function get_icon() {\n return 'fa fa-map';\n }", "title": "" }, { "docid": "221659e86009cc3d7a43ce73ba4bcb94", "score": "0.6648658", "text": "public function get_icon() {\n\t\treturn 'fa fa-calculator';\n\t}", "title": "" }, { "docid": "25d89f31cb6f54af04d16881febfd1a4", "score": "0.66464496", "text": "function Icon($url)\n {\n\t\techo \"<link rel=\\\"icon\\\" type=\\\"image/png\\\" href=\\\"$url\\\" />\";\n }", "title": "" }, { "docid": "5b02b65f786b3c50ebb698d7ff4e3756", "score": "0.6631062", "text": "public function iconDownload()\r\n {\r\n if($this->iconIsLocal(\"channel_icon_id\") || $this[\"channel_icon_id\"] == 0) return;\r\n\r\n $download = $this->getParent()->transferInitDownload(rand(0x0000, 0xFFFF), 0, $this->iconGetName(\"channel_icon_id\"));\r\n $transfer = TeamSpeak3::factory(\"filetransfer://\" . (strstr($download[\"host\"], \":\") !== FALSE ? \"[\" . $download[\"host\"] . \"]\" : $download[\"host\"]) . \":\" . $download[\"port\"]);\r\n\r\n return $transfer->download($download[\"ftkey\"], $download[\"size\"]);\r\n }", "title": "" }, { "docid": "d2bd64b383ab7ba5ef99376838726b20", "score": "0.6621684", "text": "public function get_icon() {\r\n\t\treturn 'eicon-alert';\r\n\t}", "title": "" }, { "docid": "f8932bd06011c4577b41479ffcd3e668", "score": "0.6618443", "text": "public function getIconPrefix() { return $this->iconPrefix; }", "title": "" }, { "docid": "d82d9ba9eb31ec98f5a18d40ddd4c973", "score": "0.6617797", "text": "public function typeIconUrl(int $type_id): string\n {\n try {\n $icon = new Eve('types', 'icon', $type_id, 64, [], false);\n } catch (EveImageException $e) {\n logger()->error($e->getMessage());\n report($e);\n\n return '';\n }\n\n return sprintf('https:%s', $icon->url(64));\n }", "title": "" }, { "docid": "adaccb77e95d6ff0b5d626b4e913da8f", "score": "0.6617527", "text": "static function component_icon($name) {\n\t\treturn CMS::stdfile_url('images/components/default.gif');\n\t}", "title": "" }, { "docid": "546d695e11a5962d3c3c68bab0377f0a", "score": "0.65835124", "text": "private function getMarkerIcon($config)\n {\n $folderName = MarkerIcon::UPLOAD_DIR;\n $storeLogoPath = isset($config['markerIcon']) ? $config['markerIcon'] : null;\n $path = $folderName . '/' . $storeLogoPath;\n\n $logoUrl = $this->_urlBuilder->getBaseUrl(['_type' => \\Magento\\Framework\\UrlInterface::URL_TYPE_MEDIA]) . $path;\n\n try {\n $defaultFile = \"Smile_Map::leaflet/images/marker-icon.png\";\n $params = ['_secure' => $this->_getRequest()->isSecure()];\n $url = $this->assetRepository->getUrlWithParams($defaultFile, $params);\n } catch (\\Magento\\Framework\\Exception\\LocalizedException $e) {\n $this->_logger->critical($e);\n $url = $this->_urlBuilder->getUrl('', ['_direct' => 'core/index/notFound']);\n }\n\n if ($storeLogoPath !== null && $this->isFile($path)) {\n $url = $logoUrl;\n }\n\n return $url;\n }", "title": "" }, { "docid": "f0b0a852b9966639c012fcf13b61c2ea", "score": "0.65809804", "text": "public function getAuthorIcon()\n {\n return $this->author_icon;\n }", "title": "" }, { "docid": "a2326e93688f12f8547a6d810aeee890", "score": "0.65801835", "text": "public function getImageScr() {\n $img = $this->_label->getValue('img');\n return $this->_helper->getImageUrl($img);\n }", "title": "" }, { "docid": "1aacfad922947638f9090160f729e049", "score": "0.6573568", "text": "public function get_icon() {\n\t\treturn 'eicon-gallery-grid';\n\t}", "title": "" }, { "docid": "9028e3151f03dec641154f989cc9a828", "score": "0.65707254", "text": "public function getIconUrl(): ?string {\n $val = $this->getBackingStore()->get('iconUrl');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'iconUrl'\");\n }", "title": "" }, { "docid": "ef6b26b81c55ae9057c6e36a63b78f9e", "score": "0.6562452", "text": "public function get_icon() {\n\t\t$icon = '';\n\t\t\n\t\tif ( $this->icon ) :\n\t\t\tif ( get_option('wpdonations_force_ssl_checkout')=='no' ) :\n\t\t\t\t// use icon provided by filter\n\t\t\t\t$icon = '<img src=\"' . esc_url( $this->icon ) . '\" alt=\"' . esc_attr( $this->title ) . '\" />';\t\t\t\n\t\t\telse :\n\t\t\t\t// use icon provided by filter\n\t\t\t\t$icon = '<img src=\"' . esc_url( $wpdonations->force_ssl( $this->icon ) ) . '\" alt=\"' . esc_attr( $this->title ) . '\" />';\t\t\n\t\t\tendif;\n\n\t\telseif ( ! empty( $this->cardtypes ) ) :\n\t\t\tif ( get_option('wpdonations_force_ssl_checkout')=='no' ) :\n\t\t\t\t// display icons for the selected card types\n\t\t\t\tforeach ( $this->cardtypes as $card_type ) {\n\t\t\t\t\t$icon .= '<img src=\"' . \n\t\t\t\t\t\t\t\tesc_url( $this->get_plugin_url() . '/images/card-' . \n\t\t\t\t\t\t\t\tstrtolower( str_replace(' ','-',$card_type) ) . '.png' ) . '\" alt=\"' . \n\t\t\t\t\t\t\t\tesc_attr( strtolower( $card_type ) ) . '\" />';\n\t\t\t\t}\t\t\t\n\t\t\telse :\n\t\t\t\t// display icons for the selected card types\n\t\t\t\tforeach ( $this->cardtypes as $card_type ) {\n\n\t\t\t\t\t$icon .= '<img src=\"' . \n\t\t\t\t\t\t\t\tesc_url( $wpdonations->force_ssl( $this->get_plugin_url() ) . '/images/card-' . \n\t\t\t\t\t\t\t\tstrtolower( str_replace(' ','-',$card_type) ) . '.png' ) . '\" alt=\"' . \n\t\t\t\t\t\t\t\tesc_attr( strtolower( $card_type ) ) . '\" />';\n\t\t\t\t}\t\n\t\t\tendif;\n\t\telse :\n\t\t\tif ( get_option('wpdonations_force_ssl_checkout')=='no' ) :\n\t\t\t\t// use icon provided by filter\n\t\t\t\t$icon = '<img src=\"' . esc_url( $this->get_plugin_url() . '/images/cards.png' ) . '\" alt=\"' . esc_attr( $this->title ) . '\" />';\t\t\t\n\t\t\telse :\n\t\t\t\t// use icon provided by filter\n\t\t\t\t$icon = '<img src=\"' . esc_url( $wpdonations->force_ssl( $this->get_plugin_url() . '/images/cards.png' ) ) . '\" alt=\"' . esc_attr( $this->title ) . '\" />';\t\t\n\t\t\tendif;\n\t\tendif;\n\n\t\t/**\n\t\t * Add Payments Powered By WorldPay logo\n\t\t */\n\t\tif ( $this->wplogo == 'yes' ) : \n\t\t\tif ( get_option('wpdonations_force_ssl_checkout')=='no' ) :\n\t\t\t\t// use icon provided by filter\n\t\t\t\t$icon = '<img src=\"' . esc_url( $this->get_plugin_url() . '/images/poweredByWorldPay.png' ) . '\" alt=\"Payments Powered By WorldPay\" />' . $icon;\t\t\t\n\t\t\telse :\n\t\t\t\t// use icon provided by filter\n\t\t\t\t$icon = '<img src=\"' . esc_url( $wpdonations->force_ssl( $this->get_plugin_url() . '/images/poweredByWorldPay.png' ) ) . '\" alt=\"Payments Powered By WorldPay\" />' . $icon;\t\t\n\t\t\tendif;\n\t\tendif;\n\n\t\treturn apply_filters( 'wpdonations_gateway_icon', $icon, $this->id );\n\t}", "title": "" }, { "docid": "8da1b3e74576e816f9a897ee081bb6ad", "score": "0.6562433", "text": "public function get_icon()\n {\n return 'eicon-posts-ticker';\n }", "title": "" } ]
9ebf35c9682a97be22c4477c5b299b02
function setCellValue() It attributes a value to the cell.
[ { "docid": "e5e8f47c43ef9f3360b4157407a0bb5e", "score": "0.820836", "text": "function setCellValue($newValue)\r\n\t{\r\n\t\t$this->cellValue = $newValue;\r\n\t}", "title": "" } ]
[ { "docid": "567fe78484a2c50323e0dd91e8a40f50", "score": "0.839435", "text": "function setValue($cell, $value)\n\t{\n\t \t$this->beginUpdate();\n\t \ttry\n\t \t{\n\t\t \t$cell->setValue($value);\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t$this->endUpdate();\n\t\t\tthrow($e);\n\t\t}\n\t\t$this->endUpdate();\n\t \t\n\t \treturn $value;\n\t}", "title": "" }, { "docid": "b5b77cedca400e4d269a19f02cfecbc8", "score": "0.7092563", "text": "public function setValue($pValue) {\n\t\t// sanitize UTF-8 strings\n\t\tif (is_string($pValue)) {\n\t\t\ttry {\n\t\t\t\t$pValue = SharedString::SanitizeUTF8($pValue);\n\t\t\t}\n\t\t\tcatch(\\ErrorException $e){\n\t\t\t\tthrow new PHPExcelException($e->getMessage());\n\t\t\t}\n//\t\t} elseif (is_object($pValue)) {\n//\t\t\t// Handle any objects that might be injected\n//\t\t\tif ($pValue instanceof \\DateTime) {\n//\t\t\t\t$pValue = cast(\"DateTime\", $pValue)->format('Y-m-d H:i:s');\n//\t\t\t} elseif (!($pValue instanceof RichText)) {\n//\t\t\t\t$pValue = (string) $pValue;\n//\t\t\t}\n\t\t}\n\t\t\n\t\t$type = Cell::dataTypeForValue($pValue, $valueCast);\n\t\t$this->setValueExplicit($valueCast, $type);\n\t}", "title": "" }, { "docid": "9acfed11f2ae3b6a342e76c47b31c9ef", "score": "0.7064055", "text": "function SetCellAttribute($row, $col, $attribute, $value) {\n $this->table[$row][$col][$attribute] = $value;\n }", "title": "" }, { "docid": "f870bf397a1985b3ba6531aeb7c4db56", "score": "0.7028752", "text": "public function setFormValue($cellValue): void\n {\n $this->netteGrid->getComponent('form')\n ->getComponent('edit')\n ->getComponent($this->name)\n ->setDefaultValue($cellValue);\n }", "title": "" }, { "docid": "0694b73225ecf661dd4b54f47cf7d317", "score": "0.6910823", "text": "public function bindValue(MF_PHPExcel_Cell $cell, $value = null)\n\t{\n\t\t// sanitize UTF-8 strings\n\t\tif (is_string($value)) {\n\t\t\t$value = MF_PHPExcel_Shared_String::SanitizeUTF8($value);\n\t\t}\n\n\t\t// Set value explicit\n\t\t$cell->setValueExplicit( $value, MF_PHPExcel_Cell_DataType::dataTypeForValue($value) );\n\n\t\t// Done!\n\t\treturn true;\n\t}", "title": "" }, { "docid": "4bf2c838bdd1464fcf5381052904cfd0", "score": "0.6898458", "text": "public function setValue(Ots_ColumnValue $value)\n {\n return $this->set(self::VALUE, $value);\n }", "title": "" }, { "docid": "4bf2c838bdd1464fcf5381052904cfd0", "score": "0.6898458", "text": "public function setValue(Ots_ColumnValue $value)\n {\n return $this->set(self::VALUE, $value);\n }", "title": "" }, { "docid": "12d1c01fd29cf3576fca63e18902e809", "score": "0.6861902", "text": "public function setRowValue( $col, $value )\n\t{\n\t\treturn $this->set( $col, (string) $value );\n\t}", "title": "" }, { "docid": "eed8ff3ae8fb00be16de5d14852c3443", "score": "0.68539613", "text": "public function bindValue(\\PHPExcel_Cell $cell, $value = null)\n {\n // sanitize UTF-8 strings\n if (is_string($value)) {\n $value = \\PHPExcel_Shared_String::SanitizeUTF8($value);\n }\n\n // Set value explicit\n $cell->setValueExplicit($value, self::dataTypeForValue($value));\n\n // Done!\n return true;\n }", "title": "" }, { "docid": "5271fc1363664d8351f6307359a8e468", "score": "0.66638196", "text": "function getCellValue()\r\n\t{\r\n\t\treturn $this->cellValue;\r\n\t}", "title": "" }, { "docid": "ec2c627d2e3965fc7d5965b58f342038", "score": "0.6652866", "text": "protected function setValue($value)\n {\n $this->matrix[$this->pointer['x']][$this->pointer['y']] = $value;\n }", "title": "" }, { "docid": "24bf6ae9f79332f766c95b1c1912f7f0", "score": "0.6562958", "text": "public function setValue( $value );", "title": "" }, { "docid": "4790986101af36baf1cfcb6a58a79a1f", "score": "0.65532035", "text": "private function setValue($value){\n\t\t$this->value = $value;\n\t}", "title": "" }, { "docid": "76ee682fa34af19f640eb2a28d183385", "score": "0.65440905", "text": "public function setValue($value)\n {\n $this->value = $value;\n $this->setAttributes(\"Value\");\n }", "title": "" }, { "docid": "f17cd9a4928b63370401d1f6e8cc0c94", "score": "0.65086657", "text": "public function setvalue($value){\n\t\t$this->value = $value;\n\t}", "title": "" }, { "docid": "697ce052f0fbbb74652f4b7cbf3d0dd3", "score": "0.64966834", "text": "public function setValue($value){\n\t\t$this->value=$value;\n\t}", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.6487721", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.6487721", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.6487721", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.6487721", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.6487721", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.6487721", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.6487721", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.6487721", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.6487721", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.6487721", "text": "public function setValue($value);", "title": "" }, { "docid": "dfd146129f275de50d410acea747eb59", "score": "0.64832854", "text": "public function setValue($value) {\n\t\t\t$this->value = $value;\n\t\t}", "title": "" }, { "docid": "79caff773ea14b9bf52adaa02b8ed5c0", "score": "0.6483217", "text": "protected function set_value($value){\n\t\t$this->value = $value;\n\t}", "title": "" }, { "docid": "3a86793db37edfdcb9c41d1997ce3e2a", "score": "0.64824224", "text": "function setValue($value){\n\t\t$this->value = $value;\n\t}", "title": "" }, { "docid": "5f3a64954b9f416b3530548fecb7fd26", "score": "0.64807147", "text": "public function setValue($value) {\r\n\t\t$this->value = $value;\r\n\t}", "title": "" }, { "docid": "7ba12b5efe75d0d82984d502d41a1d35", "score": "0.6480204", "text": "public function setValue($value) {\n\t\t$this->value = $value;\n\t}", "title": "" }, { "docid": "b2c2754dc31068574a28857b050dd01a", "score": "0.6469549", "text": "function setValue($value) {\r\r\n\t\t$this->value = $value;\r\r\n\t}", "title": "" }, { "docid": "6e27160be281cfb757d7daf2ee66e624", "score": "0.6463538", "text": "function setValueAt($val, $rowIndex, $columnIndex) { }", "title": "" }, { "docid": "871027b2793764a9a2813a2565236157", "score": "0.64479625", "text": "protected function set_value($p_column_name,$p_value) {\n\t\t// ------------------------------------------------------\n\t\t// Set the column value and tag it as being changed/set\n\t\t// ------------------------------------------------------\n\t\t// Has a valid column been selected\n\t\t$return = $this->has_column($p_column_name);\n\t\tif ( $return['status'] > 200 ) {\n\t\t\treturn $return;\n\t\t}\n\t\t// create an easy link to the column\n\t\t$column = &$this->table->columns->{$p_column_name};\n\t\t//\n\t\t// set the column value to the cast value passed in\n\t\t$return = mysql_schema::cast_value($p_value,$column->type);\n\t\tif ( $return['status'] > 200 ) {\n\t\t\treturn $return;\n\t\t}\n\t\t$column->value = $return['response'];\n\t\t//\n\t\t// tag the column as set\n\t\t$column->value_set = TRUE;\n\t\t\n\t\treturn $this->return_handler->results(200,\"\",null);\n\t}", "title": "" }, { "docid": "d3be3f4d6c48279172046cc3444a6ca1", "score": "0.6425926", "text": "function setValue($value)\n {\n $this->attributes['value'] = $value;\n }", "title": "" }, { "docid": "ae195a1835d1a42ad9fb032e99e8141a", "score": "0.6409881", "text": "public function setValue( $value )\n\t{\n\t\t$this->_value = $value;\n\t}", "title": "" }, { "docid": "3e803b4469ec9a89b21554a8e8821cc2", "score": "0.6406414", "text": "public function setValue($value) {\n $this->value = $value;\n }", "title": "" }, { "docid": "3e803b4469ec9a89b21554a8e8821cc2", "score": "0.6406414", "text": "public function setValue($value) {\n $this->value = $value;\n }", "title": "" }, { "docid": "3e803b4469ec9a89b21554a8e8821cc2", "score": "0.6406414", "text": "public function setValue($value) {\n $this->value = $value;\n }", "title": "" }, { "docid": "3e803b4469ec9a89b21554a8e8821cc2", "score": "0.6406414", "text": "public function setValue($value) {\n $this->value = $value;\n }", "title": "" }, { "docid": "3e803b4469ec9a89b21554a8e8821cc2", "score": "0.6406414", "text": "public function setValue($value) {\n $this->value = $value;\n }", "title": "" }, { "docid": "3e803b4469ec9a89b21554a8e8821cc2", "score": "0.6406414", "text": "public function setValue($value) {\n $this->value = $value;\n }", "title": "" }, { "docid": "3e803b4469ec9a89b21554a8e8821cc2", "score": "0.6406414", "text": "public function setValue($value) {\n $this->value = $value;\n }", "title": "" }, { "docid": "6a7c5b20428bcee59928895331b4b6f7", "score": "0.63996786", "text": "public function setValue($value)\r\n {\r\n $this->value = $value;\r\n }", "title": "" }, { "docid": "f42893715eeb79aa8139afe05bfd7884", "score": "0.6386011", "text": "public function setValue($value)\n {\n $this->_value = $value;\n }", "title": "" }, { "docid": "fcac5135cc0f52def86584b5adc389c1", "score": "0.6383265", "text": "public function setValue($value)\n\t{\n\n\t}", "title": "" }, { "docid": "cc06cc1074feace8539777bb7095900f", "score": "0.637201", "text": "function setValue($value) {\r\n $this->value = $value;\r\n }", "title": "" }, { "docid": "b515962d5fda4e5ebfa4f32eaed936c8", "score": "0.6347853", "text": "protected function _set_value($value)\n\t{\n\t\t$this->_value = $value;\n\t}", "title": "" }, { "docid": "4867623a0a47cd0030723dbb390672fc", "score": "0.6346387", "text": "function setValue($value)\n {\n $this->_value = $value;\n }", "title": "" }, { "docid": "3ab59e60e44716117566837413025789", "score": "0.6343299", "text": "public function set_value ($value) {\n $this->value = $value;\n }", "title": "" }, { "docid": "562c102a6fcadf3ebb49a059d7481485", "score": "0.6342747", "text": "public function setValue($value)\n {\n $this->value = $value;\n }", "title": "" }, { "docid": "562c102a6fcadf3ebb49a059d7481485", "score": "0.6342747", "text": "public function setValue($value)\n {\n $this->value = $value;\n }", "title": "" }, { "docid": "562c102a6fcadf3ebb49a059d7481485", "score": "0.6342747", "text": "public function setValue($value)\n {\n $this->value = $value;\n }", "title": "" }, { "docid": "562c102a6fcadf3ebb49a059d7481485", "score": "0.6342747", "text": "public function setValue($value)\n {\n $this->value = $value;\n }", "title": "" }, { "docid": "562c102a6fcadf3ebb49a059d7481485", "score": "0.6342747", "text": "public function setValue($value)\n {\n $this->value = $value;\n }", "title": "" }, { "docid": "562c102a6fcadf3ebb49a059d7481485", "score": "0.6342747", "text": "public function setValue($value)\n {\n $this->value = $value;\n }", "title": "" }, { "docid": "562c102a6fcadf3ebb49a059d7481485", "score": "0.6342747", "text": "public function setValue($value)\n {\n $this->value = $value;\n }", "title": "" }, { "docid": "562c102a6fcadf3ebb49a059d7481485", "score": "0.6342747", "text": "public function setValue($value)\n {\n $this->value = $value;\n }", "title": "" }, { "docid": "562c102a6fcadf3ebb49a059d7481485", "score": "0.6342747", "text": "public function setValue($value)\n {\n $this->value = $value;\n }", "title": "" }, { "docid": "562c102a6fcadf3ebb49a059d7481485", "score": "0.6342747", "text": "public function setValue($value)\n {\n $this->value = $value;\n }", "title": "" }, { "docid": "562c102a6fcadf3ebb49a059d7481485", "score": "0.6342747", "text": "public function setValue($value)\n {\n $this->value = $value;\n }", "title": "" }, { "docid": "cd8d8ef476d2540ca8678125fa974e9f", "score": "0.6341946", "text": "public function setValue($value) {\n $this->value = $value;\n }", "title": "" }, { "docid": "1ca3ef9e275e2bacc4e931aee5e4df03", "score": "0.6334564", "text": "public function setValue($value)\n {\n $this->value = $this->_preprocessValue($value);\n $this->callTrigger();\n }", "title": "" }, { "docid": "64d165d52244e22df78f2a4f04edac6c", "score": "0.63234025", "text": "public function bindValue(Cell $cell, $value)\r\n {\r\n // sanitize UTF-8 strings\r\n if (is_string($value)) {\r\n $value = StringHelper::sanitizeUTF8($value);\r\n }\r\n\r\n $cell->setValueExplicit((string) $value, DataType::TYPE_STRING);\r\n\r\n // Done!\r\n return true;\r\n }", "title": "" }, { "docid": "fcd091bbb1a8555eeef423fb8204c821", "score": "0.6307114", "text": "protected function setValue($value)\n {\n $this->value = $value;\n }", "title": "" }, { "docid": "cf87236e7d01f043f38b08922bbd81df", "score": "0.6284659", "text": "public function set_value($value)\n {\n $this->value = $value;\n }", "title": "" }, { "docid": "83d3c82e13505224f8c002b95a6e2861", "score": "0.6273974", "text": "protected function setValue($value)\n {\n $this->value = Carbon::parse($value)->format('Y-m-d\\TH:i');\n }", "title": "" }, { "docid": "b8f4728004a98ac9431732cd4767f373", "score": "0.62581533", "text": "public function set_value($value)\r\n\t{\r\n\t\treturn $this->set_attr('value', $value);\r\n\t}", "title": "" }, { "docid": "756cf05795bf771ff6f1ab965ef03ba8", "score": "0.6254201", "text": "protected function _setValue($value)\n {\n $this->value = \\Core\\View::escape($value);\n }", "title": "" }, { "docid": "5373d17b747c8022a0438dfcbad03fa7", "score": "0.6244329", "text": "public function inputValue($value, $row, $column){\n $clues = $this->getPlayerBoard();\n $cell = $clues[$row][$column];\n $cell->setValue($value);\n }", "title": "" }, { "docid": "3ad856a8687d381175aae0ea3b6bdd1b", "score": "0.6224789", "text": "function setValue( $value )\r\n {\r\n $this -> _value = $value;\r\n }", "title": "" }, { "docid": "a196b869e13fd652c313db2dd883c143", "score": "0.6210388", "text": "function setValue($row, $col, $value) {\n if(isset($this->mat[$row][$col]))\n $this->mat[$row][$col] = $value;\n else\n trigger_error(\"row \".$row.\" and \".$col.\" doesn't exist !\");\n }", "title": "" }, { "docid": "983d9f4180e19e4a4d02d78f9965d2d4", "score": "0.6195039", "text": "public function setValue($value)\n\t{\n\t\t$this->setViewState('Value',$value,'');\n\t}", "title": "" }, { "docid": "17de8b997d9cfb4f1c6dfc861c15d5fc", "score": "0.6193911", "text": "function set_value($value) {\r\n\t\t$this->value = $value;\r\n\t}", "title": "" }, { "docid": "c3c542e373cb0fc0621907e663bd840d", "score": "0.6162276", "text": "public function __set( $key, $value )\n\t{\n\t\tif( $value instanceof SQLResult )\n\t\t{\n\t\t\t#echo \"--- \";\n\t\t\t$this->_cells[$key] = $value;\n\t\t}\n\t\telse if( $value instanceof SQLRow || $value instanceof SQLTable )\n\t\t{\n\t\t\t#echo \"+++ \";\n\t\t\t#print_r( $value );\n\t\t\t$this->_cells[$key] = $value;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t#echo \"=== \";\n\t\t\t$this->_cells[$key] = $value;\n\t\t}\n\t}", "title": "" }, { "docid": "3e7086119a2fc4335c6267be316aae13", "score": "0.6152575", "text": "public function __set(string $field, string $value) {\n\n if (array_key_exists($field, $this->cells)) {\n $this->cells[$field]->setValue($value);\n } else {\n $this->cells[$field] = new Cell($value);\n }\n }", "title": "" }, { "docid": "a37987bfa762403bbed20d2836ce93bc", "score": "0.6152217", "text": "protected function set_val($value)\r\n\t{\r\n\t\t$this->field->set('new_value', $value);\r\n\t}", "title": "" }, { "docid": "25330a5b4e3c9b120ac657f74aa6989a", "score": "0.61457556", "text": "public function setValue($value)\n {\n $this->value = $this->prepareDate($value);\n }", "title": "" }, { "docid": "8a5e97b0717abdc0c7741cd5e4084876", "score": "0.6139078", "text": "public function value($col, $value);", "title": "" }, { "docid": "57137b2406ecbafb5c124a2e5ee5ff6b", "score": "0.6114944", "text": "public function setValueAttribute($value)\n {\n $this->attributes['value'] = unFormatMoney($value);\n }", "title": "" }, { "docid": "6ee595af2c071514805502e5c1ff1093", "score": "0.6106354", "text": "function SetValue($value, $dbupdate = true)\n\t{\n\t\treturn $this->UpdateValue('value', $value, $dbupdate);\n\t}", "title": "" }, { "docid": "e038cd77baf0d39cf9881216b3630124", "score": "0.60618335", "text": "abstract public function setValue($value);", "title": "" }, { "docid": "684eb4575f76b6cf4b1d914c3aabb063", "score": "0.60177886", "text": "function setValue($value)\n {\n $this->setSelected($value);\n }", "title": "" }, { "docid": "4fc55891a2ced47ccbc2e52b34d9875b", "score": "0.59636575", "text": "abstract protected function setValue($value);", "title": "" }, { "docid": "42a8ff0b0f6fc087ec4ddf5857ecd527", "score": "0.59623384", "text": "public function set_value($value) {\n $this->force_specific_value($value);\n }", "title": "" }, { "docid": "180d79cd8e7ca5e649aa1bbf5182020b", "score": "0.5947506", "text": "public function setValue($value) {\n $this->node->textContent= $value;\n }", "title": "" }, { "docid": "a2bb469dac9ab86633349fe72d87ad26", "score": "0.5944561", "text": "public function setValue(Value $value): void\n {\n $this->value = $value;\n }", "title": "" }, { "docid": "6b49d925c23ffee91d63bf5d7acdff88", "score": "0.592639", "text": "abstract function setValue($value);", "title": "" }, { "docid": "12b73737814c1745c27f824bfabfe545", "score": "0.5924809", "text": "public function setValue($value = null)\n\t{\n\t\t$this->value = $value;\n\t}", "title": "" }, { "docid": "b0f7c5296b7ef7d2f6c7b3ee141d9926", "score": "0.5917294", "text": "public function __set($column, $value) {\n // save\n $this->data[$column] = $value;\n \t}", "title": "" }, { "docid": "c87fcde663dffe48f9cccb7ef7ef3168", "score": "0.5893093", "text": "public function setValue($value) {\n return $this->setData(static::toInt($value));\n }", "title": "" }, { "docid": "2580f2c1d248b145962159d82c992284", "score": "0.58376944", "text": "public function bindValue(PHPExcel_Cell $cell, $value = null)\n {\n // sanitize UTF-8 strings\n if (is_string($value)) {\n $value = PHPExcel_Shared_String::SanitizeUTF8($value);\n }\n\n // Find out data type\n $dataType = parent::dataTypeForValue($value);\n\n // Style logic - strings\n if ($dataType === PHPExcel_Cell_DataType::TYPE_STRING && !$value instanceof PHPExcel_RichText) {\n // Test for booleans using locale-setting\n if ($value == PHPExcel_Calculation::getTRUE()) {\n $cell->setValueExplicit( TRUE, PHPExcel_Cell_DataType::TYPE_BOOL);\n return true;\n } elseif($value == PHPExcel_Calculation::getFALSE()) {\n $cell->setValueExplicit( FALSE, PHPExcel_Cell_DataType::TYPE_BOOL);\n return true;\n }\n\n // Check for number in scientific format\n if (preg_match('/^'.PHPExcel_Calculation::CALCULATION_REGEXP_NUMBER.'$/', $value)) {\n $cell->setValueExplicit( (float) $value, PHPExcel_Cell_DataType::TYPE_NUMERIC);\n return true;\n }\n\n // Check for fraction\n if (preg_match('/^([+-]?)\\s*([0-9]+)\\s?\\/\\s*([0-9]+)$/', $value, $matches)) {\n // Convert value to number\n $value = $matches[2] / $matches[3];\n if ($matches[1] == '-') $value = 0 - $value;\n $cell->setValueExplicit( (float) $value, PHPExcel_Cell_DataType::TYPE_NUMERIC);\n // Set style\n $cell->getWorksheet()->getStyle( $cell->getCoordinate() )\n ->getNumberFormat()->setFormatCode( '??/??' );\n return true;\n } elseif (preg_match('/^([+-]?)([0-9]*) +([0-9]*)\\s?\\/\\s*([0-9]*)$/', $value, $matches)) {\n // Convert value to number\n $value = $matches[2] + ($matches[3] / $matches[4]);\n if ($matches[1] == '-') $value = 0 - $value;\n $cell->setValueExplicit( (float) $value, PHPExcel_Cell_DataType::TYPE_NUMERIC);\n // Set style\n $cell->getWorksheet()->getStyle( $cell->getCoordinate() )\n ->getNumberFormat()->setFormatCode( '# ??/??' );\n return true;\n }\n\n // Check for percentage\n if (preg_match('/^\\-?[0-9]*\\.?[0-9]*\\s?\\%$/', $value)) {\n // Convert value to number\n $value = (float) str_replace('%', '', $value) / 100;\n $cell->setValueExplicit( $value, PHPExcel_Cell_DataType::TYPE_NUMERIC);\n // Set style\n $cell->getWorksheet()->getStyle( $cell->getCoordinate() )\n ->getNumberFormat()->setFormatCode( PHPExcel_Style_NumberFormat::FORMAT_PERCENTAGE_00 );\n return true;\n }\n\n // Check for currency\n $currencyCode = PHPExcel_Shared_String::getCurrencyCode();\n $decimalSeparator = PHPExcel_Shared_String::getDecimalSeparator();\n $thousandsSeparator = PHPExcel_Shared_String::getThousandsSeparator();\n if (preg_match('/^'.preg_quote($currencyCode).' *(\\d{1,3}('.preg_quote($thousandsSeparator).'\\d{3})*|(\\d+))('.preg_quote($decimalSeparator).'\\d{2})?$/', $value)) {\n // Convert value to number\n $value = (float) trim(str_replace(array($currencyCode, $thousandsSeparator, $decimalSeparator), array('', '', '.'), $value));\n $cell->setValueExplicit( $value, PHPExcel_Cell_DataType::TYPE_NUMERIC);\n // Set style\n $cell->getWorksheet()->getStyle( $cell->getCoordinate() )\n ->getNumberFormat()->setFormatCode(\n str_replace('$', $currencyCode, PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_USD_SIMPLE )\n );\n return true;\n } elseif (preg_match('/^\\$ *(\\d{1,3}(\\,\\d{3})*|(\\d+))(\\.\\d{2})?$/', $value)) {\n // Convert value to number\n $value = (float) trim(str_replace(array('$',','), '', $value));\n $cell->setValueExplicit( $value, PHPExcel_Cell_DataType::TYPE_NUMERIC);\n // Set style\n $cell->getWorksheet()->getStyle( $cell->getCoordinate() )\n ->getNumberFormat()->setFormatCode( PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_USD_SIMPLE );\n return true;\n }\n\n // Check for time without seconds e.g. '9:45', '09:45'\n if (preg_match('/^(\\d|[0-1]\\d|2[0-3]):[0-5]\\d$/', $value)) {\n // Convert value to number\n list($h, $m) = explode(':', $value);\n $days = $h / 24 + $m / 1440;\n $cell->setValueExplicit($days, PHPExcel_Cell_DataType::TYPE_NUMERIC);\n // Set style\n $cell->getWorksheet()->getStyle( $cell->getCoordinate() )\n ->getNumberFormat()->setFormatCode( PHPExcel_Style_NumberFormat::FORMAT_DATE_TIME3 );\n return true;\n }\n\n // Check for time with seconds '9:45:59', '09:45:59'\n if (preg_match('/^(\\d|[0-1]\\d|2[0-3]):[0-5]\\d:[0-5]\\d$/', $value)) {\n // Convert value to number\n list($h, $m, $s) = explode(':', $value);\n $days = $h / 24 + $m / 1440 + $s / 86400;\n // Convert value to number\n $cell->setValueExplicit($days, PHPExcel_Cell_DataType::TYPE_NUMERIC);\n // Set style\n $cell->getWorksheet()->getStyle( $cell->getCoordinate() )\n ->getNumberFormat()->setFormatCode( PHPExcel_Style_NumberFormat::FORMAT_DATE_TIME4 );\n return true;\n }\n\n // Check for datetime, e.g. '2008-12-31', '2008-12-31 15:59', '2008-12-31 15:59:10'\n if (($d = PHPExcel_Shared_Date::stringToExcel($value)) !== false) {\n // Convert value to number\n $cell->setValueExplicit($d, PHPExcel_Cell_DataType::TYPE_NUMERIC);\n // Determine style. Either there is a time part or not. Look for ':'\n if (strpos($value, ':') !== false) {\n $formatCode = 'yyyy-mm-dd h:mm';\n } else {\n $formatCode = 'yyyy-mm-dd';\n }\n $cell->getWorksheet()->getStyle( $cell->getCoordinate() )\n ->getNumberFormat()->setFormatCode($formatCode);\n return true;\n }\n\n // Check for newline character \"\\n\"\n if (strpos($value, \"\\n\") !== FALSE) {\n $value = PHPExcel_Shared_String::SanitizeUTF8($value);\n $cell->setValueExplicit($value, PHPExcel_Cell_DataType::TYPE_STRING);\n // Set style\n $cell->getWorksheet()->getStyle( $cell->getCoordinate() )\n ->getAlignment()->setWrapText(TRUE);\n return true;\n }\n }\n\n // Not bound yet? Use parent...\n return parent::bindValue($cell, $value);\n }", "title": "" }, { "docid": "f16ee8c1e4ca1a91c92a68e512a61ee5", "score": "0.5835491", "text": "public function set($attr, $value)\n {\n\n if ($this->phclass->is_boolean($attr) && !is_bool($value))\n {\n $value = boolval($value);\n }\n else if ($this->phclass->is_number($attr) && is_string($value))\n {\n // TODO: check for PHP_INT_MAX since the value can be truncated\n $value = $value + 0; // converts the value to a number\n }\n $this->{$attr} = $value;\n }", "title": "" }, { "docid": "2f2e0b03eb5fb193aff434789868a22e", "score": "0.58191806", "text": "public function setValue(string $value);", "title": "" }, { "docid": "6d4ef525eab20ab33c3420a65d956c5e", "score": "0.5814183", "text": "public function setValue($value)\n\t{\n\t\t$this->_value = $value;\n\t\t$this->_errors = array();\n\t\t$this->message = '';\n\t}", "title": "" }, { "docid": "d776283858fbc1d75ec682660caa14d0", "score": "0.581333", "text": "public function setValue($s) {$this->_value = $s;}", "title": "" }, { "docid": "7906fcea46d91a55041396d66ea31479", "score": "0.5802604", "text": "function setValue($sValue)\r\n\t{\r\n\t\t$this->setAttribute('value', $sValue);\r\n\t}", "title": "" }, { "docid": "dfabb891960fb17ecab7c0174d39bfc9", "score": "0.5778759", "text": "public function value($value) {\r\n return $this->setProperty('value', $value);\r\n }", "title": "" }, { "docid": "ab738dbb97297ff0810ec374f1d0dece", "score": "0.5772795", "text": "public function setValue($value)\n {\n $this->out = sprintf($this->format, $value['s'], $value['r'], $value['i']);\n }", "title": "" }, { "docid": "18282ea18b334057b3b9988064b1277a", "score": "0.5766328", "text": "public function setValue($field_value) { \n $this->value = $field_value;\n \n $this->setAttribute('value', $field_value);\n }", "title": "" } ]
c7a7fd9f2075e4157e7f9af118bb2abf
Get all items as array suitable for display in select option dropdown.
[ { "docid": "67400eb734d47d1d3a073f722f0797f1", "score": "0.0", "text": "protected function getCommDetails($id)\n {\n $comm = new Comm();\n $comm->setDb($this->di->get(\"db\"));\n $comm->find(\"id\", $id);\n return $comm;\n }", "title": "" } ]
[ { "docid": "161a7474d93a1373f1cf6b4d2b92b119", "score": "0.75409603", "text": "public function getOptions()\n {\n $builder = $this->select($this->option_key, $this->option_label)\n ->orderBy($this->option_label, 'asc')\n ->get();\n\n //convert data to standard object {value:'', label:''}\n $arr = [];\n foreach ($builder as $x) {\n if ($x[$this->option_label]) {\n $arr[] = [\n 'value' => $x[$this->option_key],\n 'label' => $x[$this->option_label]\n ];\n }\n }\n\n return $arr;\n }", "title": "" }, { "docid": "78bf46fa09aa8431580e372d3a8ef275", "score": "0.7444195", "text": "private function getOptionItems()\n {\n return [\n 'employeeItems' => []\n ];\n }", "title": "" }, { "docid": "724afc74cbcdc348b14892a61d8c0518", "score": "0.73529303", "text": "public function getOptionArray() {\n\n $childen = Mage::getSingleton('sitemenu/category')->getCollection();\n\n $arr = array();\n foreach ( $childen as $child )\n $arr[ $child->getId() ] = $child->getName();\n \n return $arr;\n \n }", "title": "" }, { "docid": "b48830b6f6cf9006f75215cd46bce14a", "score": "0.7344536", "text": "public function getArrayForSelect()\n {\n $array = [];\n $object = $this->findAll();\n foreach ($object as $value) {\n $array[$value->getId()] = $value->getName();\n }\n \n return $array;\n }", "title": "" }, { "docid": "abfe1c3838b614aad311ee89d42cc920", "score": "0.7319722", "text": "public function getAllOptions()\n {\n $result = [];\n\n foreach (self::getOptionArray() as $index => $value) {\n $result[] = [\n 'value' => $index,\n 'label' => $value,\n ];\n }\n\n return $result;\n\n }", "title": "" }, { "docid": "dad47f50528d55fe5425dfe8ced49375", "score": "0.7312073", "text": "public function toOptionArray()\n {\n return $this->getAllOptions();\n }", "title": "" }, { "docid": "dad47f50528d55fe5425dfe8ced49375", "score": "0.7312073", "text": "public function toOptionArray()\n {\n return $this->getAllOptions();\n }", "title": "" }, { "docid": "b00a7f92b6b6c2b079a1e6b28806301e", "score": "0.7300526", "text": "public function getOptionList(): array;", "title": "" }, { "docid": "7a077b02eeda2aced1faaecd0c15eccc", "score": "0.72829735", "text": "public function getAllOptions()\n {\n $result = [];\n\n foreach (self::getOptionArray() as $index => $value) {\n $result[] = ['value' => $index, 'label' => $value];\n }\n\n return $result;\n }", "title": "" }, { "docid": "a5ebf99aae9fdcddb22814bf27c9aac9", "score": "0.7258859", "text": "public function getOptionsAsArray()\n {\n $array = [];\n\n foreach ($this->options as $option) {\n $array[$option->getId()] = $option->getName();\n }\n\n return $array;\n }", "title": "" }, { "docid": "6202477888f21ad1248a713c3ce9cd5b", "score": "0.72050804", "text": "public function getOptionValues();", "title": "" }, { "docid": "fead78312d5c8e5c04cf828c370aefe1", "score": "0.71489626", "text": "public function getArrayParaSelect()\n {\n return $this->model()::pluck('nome', 'id')->all();\n }", "title": "" }, { "docid": "4c7d1baa18d0321a08e6a33e3d913152", "score": "0.7140859", "text": "public function toOptionArray() {\n $option = [];\n /** @var \\Magento\\Directory\\Model\\ResourceModel\\Country\\Collection $collection */\n $collection = $this->countryCollectionFactory->create()->loadByStore();\n\n foreach ($collection as $item) {\n $option[] = ['label' => $item->getName(), 'value' => $item->getId()];\n }\n\n return $option;\n }", "title": "" }, { "docid": "6d8cd6b6e2dd7a299168d9886fd4bdd4", "score": "0.71379465", "text": "protected function getOptions()\n {\n $fieldname = preg_replace('/[^a-zA-Z0-9_\\-]/', '_', $this->fieldname);\n\n\t\t$options = array();\n\t\t\n\t\tif (empty($this->value)) {\n\t\t\treturn $options;\n\t\t}\n\n\t\t$this->value = json_decode($this->value);\n\n foreach ($this->value as $user) {\n\n $tmp = array(\n 'value' => $user->value,\n 'text' => JText::alt($user->text, $fieldname),\n 'selected' => true,\n );\n\n // Add the option object to the result set.\n $options[] = (object) $tmp;\n }\n\n reset($options);\n\n return $options;\n }", "title": "" }, { "docid": "dbec727eff7a6769b3d65fc9c55b85d2", "score": "0.7116889", "text": "private function get_select_values() {\n\t\treturn array(\n\t\t\t'id' => $this->select_id,\n\t\t\t'name' => $this->select_name,\n\t\t\t'attributes' => $this->get_attributes(),\n\t\t\t'options' => $this->select_options,\n\t\t\t'selected' => $this->selected_option,\n\t\t);\n\t}", "title": "" }, { "docid": "0526c22e0585f118e6cbe19396008546", "score": "0.7116116", "text": "protected function _getItemsData()\n {\n $attribute = $this->getAttributeModel();\n $this->_requestVar = $attribute->getAttributeCode();\n\n\n $options = $attribute->getFrontend()->getSelectOptions();\n $optionsCount = $this->_getCount($attribute);\n $data = array();\n\n foreach ($options as $option) {\n if (is_array($option['value'])) {\n continue;\n }\n if (!Mage::helper('core/string')->strlen($option['value'])) {\n continue;\n }\n $currentVals = Mage::helper('amshopby')->getRequestValues($this->_requestVar);\n $ind = array_search($option['value'], $currentVals);\n if (false === $ind){\n $currentVals[] = $option['value'];\n }\n else {\n $currentVals[$ind] = null;\n unset($currentVals[$ind]); \n }\n \n $currentVals = implode(',', $currentVals);\n $cnt = isset($optionsCount[$option['value']]) ? $optionsCount[$option['value']] : 0; \n if ($cnt || $this->_getIsFilterableAttribute($attribute) != self::OPTIONS_ONLY_WITH_RESULTS) {\n $data[] = array(\n 'label' => $option['label'],\n 'value' => $currentVals,\n 'count' => $cnt,\n 'option_id' => $option['value'],\n );\n }\n }\n return $data;\n }", "title": "" }, { "docid": "5f9e3479e5ff2e90227836fe9ab950a7", "score": "0.7113449", "text": "public function getAllOptions()\r\n {\r\n if (is_null($this->_options)) {\r\n $this->_options = array(\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Selecteaza'),\r\n 'value' => '',\r\n 'selected' => 'selected'\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Local'),\r\n 'value' => 1\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Doar in judet'),\r\n 'value' => 2\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Judetele limitrofe'),\r\n 'value' => 3\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Toata tara'),\r\n 'value' => 4\r\n ),\r\n \r\n array(\r\n 'label' => Mage::helper('eav')->__('Personalizat'),\r\n 'value' => 5\r\n ),\r\n \r\n );\r\n }\r\n return $this->_options;\r\n }", "title": "" }, { "docid": "e2814e693fc1d43b2f021408d4680c74", "score": "0.71037525", "text": "private function getOptionItems(){ \n // $shiftment = new ShiftmentRepository();\n \n return [\n // 'shiftmentItems' => ['' => __('crud.option.shiftment_placeholder')] + $shiftment->pluck(),\n 'shiftmentItems' => [],\n 'employeeItems' => [] \n ];\n }", "title": "" }, { "docid": "203b72a386d4d61fb81547c8976052b9", "score": "0.70788634", "text": "public function toOptionArray()\n {\n $options = Mage::getModel('catalog/product_visibility')->getAllOptions(\n );\n array_shift($options);\n\n return $options;\n }", "title": "" }, { "docid": "6237224aa8d1fd30c8bf271c7162800c", "score": "0.70616275", "text": "public function toOptionArray()\n {\n $output = [];\n\n foreach ($this->toArray() as $key => $value) {\n $output[] = [\n 'value' => $key,\n 'label' => $value\n ];\n }\n\n return $output;\n }", "title": "" }, { "docid": "c379a3a7fd4d849d7773125c2c70c726", "score": "0.7050203", "text": "function bl_getOptions()\n {\n $options = dal_selectOptions();\n $json = json_encode($options);\n return $json;\n }", "title": "" }, { "docid": "e4008a7b0ea18b093e2cc32df02dc37c", "score": "0.7012882", "text": "public function toArray()\n {\n $values = [];\n foreach ($this->toOptionArray() as $item) {\n $values[$item['value']] = $item['label'];\n }\n return $values;\n }", "title": "" }, { "docid": "106dd3c76688d761227c492107db1222", "score": "0.6994899", "text": "public function getOptions() {\n $options = array();\n $rs = $this->db->select(self::QUERY_SELECT_OPTIONS, array());\n while($row = $rs->fetch(\\PDO::FETCH_ASSOC)) {\n $options[$row[\"option_name\"]] = json_decode($row[\"option_value\"], true);\n }\n return $options;\n }", "title": "" }, { "docid": "6a7e589ede0aae7a9d8a8dcfdf4ca423", "score": "0.69872504", "text": "public function toOptionArray()\n {\n return array(\n array('value'=>1, 'label'=>'One'),\n array('value'=>2, 'label'=>'Two'),\n array('value'=>3, 'label'=>'Three'), \n array('value'=>4, 'label'=>'Four') \n );\n }", "title": "" }, { "docid": "6641b7de7520cdd343534e4ce57d36ea", "score": "0.698538", "text": "public function getOptions() {\n\t\treturn $this->items->getItems();\n\t}", "title": "" }, { "docid": "48f2b3c08b33d90501e4cedf3cf9c69e", "score": "0.6975635", "text": "public function to_array()\n\t{\n\t\t$return = array(\n\t\t\t'id'\t\t=> $this->get_id(),\n\t\t\t'label'\t\t=> $this->get_label(),\n\t\t\t'options'\t=> array(),\n\t\t\t'type'\t\t=> $this->get_type()\n\t\t);\n\n foreach ($this->_options AS $option)\n {\n $return['options'][] = $option->to_array();\n }\n\n return $return;\n\t}", "title": "" }, { "docid": "4f28282dbc41633079150874e0755745", "score": "0.6973061", "text": "public function toOptionArray() {\n\t\t$resultArary = array();\n \t$availableSites = self::_getAvailableWebsites();\n foreach($availableSites as $availableSite){\n \tif(isset($availableSite['websiteid']) && isset($availableSite['title'])){\n \t\t$resultArary[] = array('value' => $availableSite['websiteid'], 'label' => $availableSite['title']);\n \t}\n }\n return $resultArary;\n }", "title": "" }, { "docid": "b4727dbeeb210572f0dcc4c0038ece0c", "score": "0.6966619", "text": "static public function getOptions()\n\t{\n\t\t$r = Mage::getSingleton('core/resource')->getConnection('core_read');\n $result = $r->query('select * from `catalog_eav_attribute` as catalog left join `eav_attribute` as eav on catalog.attribute_id = eav.attribute_id');\n \n $data = array();\n \n while ($row = $result->fetch(PDO::FETCH_ASSOC)) {\n \tif ($row['is_filterable']) {\n \t\t\n \t\t$options = $r->query('select o.option_id, v.value from `eav_attribute_option` as o \n \t\t\t\t\t\t\t left join `eav_attribute_option_value` as v on o.option_id = v.option_id\n \t\t\t\t\t\t\t where o.attribute_id = '.$row['attribute_id'].'\n \t\t\t\t\t\t\t order by v.value');\n \t\t\n \t\t$optionsArray = array();\n \t\t\n \t\twhile ($option = $options->fetch(PDO::FETCH_ASSOC)) {\n \t\t\t$optionsArray[] = array(\n \t\t\t\t\t\t\t\t'value' => $option['option_id'],\n \t\t\t\t\t\t\t\t'label'\t=> $option['value']);\n \t\t}\n\n if ($row['frontend_label'] != 'Price') {\n $data[] = array(\n \t\t\t\t'value' => $optionsArray,\n \t\t\t\t'label'\t=> $row['frontend_label']\n \t\t\t\t);\n }\n \t}\n }\n \n return $data;\n\t}", "title": "" }, { "docid": "15b0f4af39c5705aa6fb64a725da3589", "score": "0.69581306", "text": "public function getOptions()\n {\n $res = [];\n foreach ($this->getOptionArray() as $index => $value) {\n $res[] = ['value' => $index, 'label' => $value];\n }\n return $res;\n }", "title": "" }, { "docid": "bc6ceef34bbc81894a6af534fac72566", "score": "0.69565463", "text": "function getAll ()\n\t{\n\t\t$arr = $this->_selection ;\n\n\t\treturn $arr ;\n\t}", "title": "" }, { "docid": "9b68b59a4a40e3a11c71822f7f621a86", "score": "0.6954154", "text": "public function getOptionArray()\r\n {\r\n\r\n $levels = $this->_getAllOptions();\r\n\r\n foreach($levels as $key=>$value)\r\n {\r\n $array[$key] = Mage::helper('aitpermissions')->__(ucfirst($value));\r\n }\r\n\r\n return $array;\r\n }", "title": "" }, { "docid": "489027240855b95ad84d6e03dc3834e3", "score": "0.695348", "text": "public function toOptionArray()\n {\n return self::getOptionArray();\n }", "title": "" }, { "docid": "cbc5d1ed0532719686cfaec83c11263e", "score": "0.6952744", "text": "public function toArray()\r\n {\r\n\t\t$toOptionArray = $this->toOptionArray();\r\n\t\t$toArray = array();\r\n\t\tforeach($toOptionArray as $toOptionVal){\r\n\t\t\t$toArray[$toOptionVal['value']] = $toOptionVal['label'];\r\n\t\t}\r\n return $toArray;\r\n }", "title": "" }, { "docid": "1f8891b22d447ad5df3f8259244c8552", "score": "0.69507724", "text": "public function getOptions()\n\t{\n\t\t$db = \\JFactory::getDbo();\n\t\t$db->setQuery(\n\t\t\t'SELECT `id` AS `value`, `name` AS `text` '.\n\t\t\t'FROM #__fields '.\n\t\t\t'WHERE `context`=\"com_users.user\" AND `state`=1');\n\t\t$items = $db->loadObjectList();\n\t\treturn array_merge(parent::getOptions(), $items );\n\t}", "title": "" }, { "docid": "5b11d69bec7bb5af9bd031db34a18961", "score": "0.69339204", "text": "public function toArray()\n {\n $options = $this->toOptionArray();\n $return = [];\n\n foreach ($options as $option) {\n $return[$option['value']] = $option['label'];\n }\n\n return $return;\n }", "title": "" }, { "docid": "5b11d69bec7bb5af9bd031db34a18961", "score": "0.69339204", "text": "public function toArray()\n {\n $options = $this->toOptionArray();\n $return = [];\n\n foreach ($options as $option) {\n $return[$option['value']] = $option['label'];\n }\n\n return $return;\n }", "title": "" }, { "docid": "f57a7ffb23b1af44edb9d3e75bceab80", "score": "0.6929635", "text": "public function getOptionsList(){\n return $this->_get(9);\n }", "title": "" }, { "docid": "93e2449dd86190cfe6a8c157d43328d6", "score": "0.6922717", "text": "public function getOptionsList(){\n return $this->_get(3);\n }", "title": "" }, { "docid": "93e2449dd86190cfe6a8c157d43328d6", "score": "0.6922717", "text": "public function getOptionsList(){\n return $this->_get(3);\n }", "title": "" }, { "docid": "09c8035cb272dff391c2a7d79303237c", "score": "0.6915572", "text": "public function dropdown_all()\n\t{\n\t\t$result = $this->get_all();\n\t\t$opciones = array();\n\t\t\n\t\tforeach ($result as $tipo_pago)\n\t\t\t$opciones[$tipo_pago->id_tipo_pago] = $tipo_pago->descripcion;\n\t\t\n\t\treturn $opciones;\n\t}", "title": "" }, { "docid": "d7f75cf8b2da6787839402d75b40d25e", "score": "0.6908666", "text": "public function getOptionsList(){\n return $this->_get(4);\n }", "title": "" }, { "docid": "bfaa4e1e8fab3e7aae553bc53e1e3d96", "score": "0.6859035", "text": "public function toArray()\n {\n $opts = $this->toOptionArray();\n return array_combine(array_column($opts, 'value'), array_column($opts, 'label'));\n }", "title": "" }, { "docid": "c9cdba96a7b4775c19e979a72559e173", "score": "0.68417925", "text": "public function toOptionArray() {\n $collection = Mage::getModel('slideshow/slides')->getCollection();\n $options = array();\n foreach ($collection as $slide) {\n $options[] = array('value' => $slide->getData('slide_id'), 'label' => $slide->getData('name'));\n }\n return $options;\n }", "title": "" }, { "docid": "6366745327a7c51b3fde54d96dc2c33d", "score": "0.6841076", "text": "public function toOptionArray(){\n $options = array();\n $entityTypeId = Mage::getModel('eav/entity_type')->loadByCode('catalog_product')->getEntityTypeId();\n $attributes = Mage::getModel('eav/entity_attribute')->getCollection()\n ->addFilter('entity_type_id', $entityTypeId)\n ->addFilter('frontend_input','select')\n ->setOrder('attribute_code', 'ASC');\n foreach ($attributes as $attribute){\n $item['value'] = $attribute->getAttributeCode();\n if ($attribute->getFrontendLabel()){\n $item['label'] = $attribute->getFrontendLabel();\n }\n else{\n $item['label'] = $attribute->getAttributeCode();\n }\n $options[] = $item;\n }\n\n return $options;\n }", "title": "" }, { "docid": "602f33dc7bee0eb7f60ad7fc858bba42", "score": "0.68349224", "text": "public function toOptionArray()\n {\n\t\t$result = array();\n\t\t\n\t\t$data = Mage::getModel('emailmarketing/ininbox_group')->getList();\t\t\n \n if(!is_null($data))\n {\n\t\t\tforeach($data['Results'] as $row)\t\t\t\n\t\t\t\t$result[] = array('value' => $row['ListID'], 'label'=>Mage::helper('adminhtml')->__($row['Title']));\t\t\t\n\t\t}\n \n return $result;\n }", "title": "" }, { "docid": "963941f63b61107ba969f5364f41bf1d", "score": "0.68279713", "text": "public function getOptionArray()\n {\n if (!$this->hasData('option_array')) {\n $options = array();\n \n if ($this->getType() == self::TYPE_CUSTOM_LIST) {\n $options = $this->_getCustomListOptionArray();\n } elseif ($this->getType() == self::TYPE_MAGE_MODEL) {\n $options = $this->_getMageModelOptionArray();\n }\n \n $this->setData('option_array', $options);\n }\n return $this->_getData('option_array');\n }", "title": "" }, { "docid": "a0f510c5c5cf89aa1880c1e1f4d0bd40", "score": "0.68178713", "text": "public static function dropdownarray ()\n {\n if (Cache::has('job.type'))\n {\n $type_array = Cache::get('job.type');\n// return $type_array;\n }\n\n $all = Type::get();\n $type_array = array();\n\n foreach($all as $type)\n {\n $type_array[$type->id] = $type->type;\n }\n\n Cache::add('job.type', $type_array, 60);\n\n return $type_array;\n }", "title": "" }, { "docid": "75cc6b25476cb6e32199c03b20f4165e", "score": "0.68005836", "text": "public function GetAllOptions()\n {\n $this->Options_Array = $this->SQL->GetArrayAssoc(array(\n 'table' => 'store_product_options',\n 'reference_key'=> 'store_product_options_id',\n 'keys' => '*',\n 'where' => 'active=1',\n 'order' => 'store_product_options_id'\n ));\n }", "title": "" }, { "docid": "8118a88b33c14316dc0b489b82782c79", "score": "0.6781836", "text": "public function getOptionList()\n {\n return $this->getProductOptions();\n }", "title": "" }, { "docid": "1f057a8240dbc6e9eaba201e17770704", "score": "0.67757607", "text": "public function toArray()\n\t{\n\t\treturn [\n\t\t\t'option_1' => __('Option #1'),\n\t\t\t'option_2' => __('Option #2'),\n\t\t\t'option_3' => __('Option #3')\n\t\t];\n\t}", "title": "" }, { "docid": "667f87a7a2e6b8eb502fbee2bbd13019", "score": "0.67715734", "text": "public function getOptionArray()\n {\n $options = array();\n foreach (self::getOptionHash() as $value => $label) {\n $options[] = array(\n 'value' => $value,\n 'label' => $label\n );\n }\n return $options;\n }", "title": "" }, { "docid": "b84fe50f1b5422f7a33cc427b36c9fda", "score": "0.67512953", "text": "public function getFieldsOptionsArr(): array\n {\n return $this->toArray();\n }", "title": "" }, { "docid": "69df8303ae266471f3914f85490b2059", "score": "0.67432296", "text": "public function getValueSelectOptions()\n {\n if (!$this->hasData('value_select_options')) {\n $this->setData('value_select_options', $this->getSubscriberTypeOptionArray());\n }\n\n return $this->getData('value_select_options');\n }", "title": "" }, { "docid": "e856b2478ec20ce682e35e2fa490af1d", "score": "0.67296207", "text": "private function get_dropdowns() {\n\n $this->load->helper('dropdowns');\n\n $dropdowns = array(\n 'projects' => $this->codes_project_model->get_dropdown(),\n 'status_codes' => unserialize(CODES_STATUS_CODES)\n );\n\n return $dropdowns;\n }", "title": "" }, { "docid": "808e3a8f93d57a2aa8c21bfaf135d10c", "score": "0.6728104", "text": "public function getAllOption()\n {\n $options = $this->getOptionArray();\n array_unshift($options, ['value' => '', 'label' => '']);\n return $options;\n }", "title": "" }, { "docid": "36532619824022cc12ef01e546d44ccf", "score": "0.6712128", "text": "private function getGroupSelectOptions() {\n $result = [];\n $groups = $this->civicrmGroup->getAllGroups();\n foreach ($groups as $id => $group) {\n $result[$id] = $group['title'];\n }\n return $result;\n }", "title": "" }, { "docid": "60ad81e076d7a550dada51b2882e87c4", "score": "0.6705177", "text": "public function getOptions()\n {\n return $this->find(\n 'list',\n array(\n 'fields' => array('Option.name', 'Option.value'),\n 'cache' => __FUNCTION__\n )\n );\n }", "title": "" }, { "docid": "9a401abe4beef67d4f370d1e43b3f5ac", "score": "0.6702891", "text": "public function toOptionArray()\n {\n $optionArray = array();\n\n $attributes = Mage::getResourceModel('catalog/product_attribute_collection')\n ->getItems();\n\n foreach ($attributes as $attribute) {\n $option = array();\n $code = $attribute->getAttributecode();\n $label = $attribute->getFrontendLabel();\n\n $option['value'] = $code;\n if ($label) {\n $option['label'] = $label;\n } else {\n $option['label'] = $code;\n }\n\n array_push($optionArray, $option);\n }\n return $optionArray;\n }", "title": "" }, { "docid": "72eef4f5893f0aa38dcbf2c20c693e3a", "score": "0.6694281", "text": "public function toArray() {\n\n $data = parent::toArray();\n\n $data[\"choices\"] = [];\n\n foreach ($this->choices as $choice)\n $data[\"choices\"][] = $choice->toArray();\n\n $data[\"allow_multiple_selections\"] = $this->allow_multiple_selections;\n $data[\"randomize\"] = $this->randomize;\n $data[\"vertical_alignment\"] = $this->vertical_alignment;\n $data[\"add_other_choice\"] = $this->add_other_choice;\n\n return $data;\n }", "title": "" }, { "docid": "ad2dec5577c93de00bb3b89d9abb46e1", "score": "0.669183", "text": "public function getOptions() {\n\n $query = $this -> db -> get('options');\n $row = $query -> row_array();\n return $row;\n\n }", "title": "" }, { "docid": "1becc9a5e9ddec4c5b18733e0cbdd5b7", "score": "0.66910195", "text": "public function toOptionArray()\n {\n $attributes = $this->getConfiguredAttributes();\n\n $values = [];\n\n foreach (explode(',', $attributes) as $attribute) {\n $attribute = str_replace(' ','',$attribute);\n $values[] = [\n 'value' => $attribute,\n 'label' => $attribute,\n ];\n }\n\n return $values;\n }", "title": "" }, { "docid": "ddd1bc3d2b4cfc249d3a30252e543f82", "score": "0.66897595", "text": "public function getOptions(): array\n {\n //$this->entity->checkNameValueStatusMap();\n return collect($this->entity::NAME_VALUE_STATUS_MAP)\n ->mapWithKeys(function ($value, $key) {\n $value = is_bool($value) ? intval($value) : $value;\n return [\n $value => Str::ucfirst(__($key))\n ];\n })\n ->toArray();\n }", "title": "" }, { "docid": "180978f79594fb89a25461d4cf8b7a0a", "score": "0.66851413", "text": "public function toOptionArray()\n {\n return array(\n array(\n 'value' => 'entity_id',\n 'label' => Mage::helper('factfinder')->__('Product ID (default)')\n ),\n array(\n 'value' => 'sku',\n 'label' => Mage::helper('factfinder')->__('Product SKU')\n )\n );\n }", "title": "" }, { "docid": "ffe1f7fd9d1e5f0822f3ca381a062578", "score": "0.66830134", "text": "public function allForSelect()\n {\n $pages = $this\n ->all([], true)\n ->nest()\n ->listsFlattened();\n\n return ['' => ''] + $pages;\n }", "title": "" }, { "docid": "ec5cc4aa1f55fd68ded18cc08382579a", "score": "0.66782844", "text": "public function selectedAsArray(): array\n {\n return iterator_to_array($this->selected());\n }", "title": "" }, { "docid": "38efafc12ea10180171a5e3ab60af5a4", "score": "0.66762716", "text": "public function toOptionArray() {\n $category_list = [];\n $categories = Mage::getModel('catalog/category')\n ->getCollection()\n ->addAttributeToSelect('*')\n ->addAttributeToFilter('level', array('gteq' => 2))\n ->addIsActiveFilter()\n ->addAttributeToSelect(array('name', 'entity_id', 'level'))\n ->setOrder('path');\n foreach ($categories as $category) {\n $label = $category['name'];\n for($i=1; $i<$category['level']; $i++) {\n $label = '--'.$label;\n }\n $category_list[] = array('value' => $category->getId(), 'label' => $label);\n }\n return $category_list;\n\n }", "title": "" }, { "docid": "9fc63657ba04d136c7c193d4bbc325f4", "score": "0.6668583", "text": "public function toOptionArray()\n {\n return array(\n array('value' => 'product', 'label' =>'Product Shipping'),\n array('value' => 'category', 'label' => 'Category Shipping'),\n );\n }", "title": "" }, { "docid": "b5b5bc01ba58ddd9201597807112c726", "score": "0.6666746", "text": "public function getOptions()\n {\n $_tmpOptions = $this->toOptionArray();\n $_options = [];\n foreach ($_tmpOptions as $option) {\n $_options[$option['value']] = $option['label'];\n }\n\n return $_options;\n }", "title": "" }, { "docid": "bccd6b2592d1fb40da7ef152fd033276", "score": "0.66635513", "text": "public function getOptions()\n {\n $db = JFactory::getDBO();\n $db->setQuery(\"SELECT * FROM #__languages WHERE 1=1\");\n $rows = $db->loadObjectList();\n\n $this->options = array(); \n if (!empty($rows)) {\n foreach ($rows as $row) {\n $value = null;\n $title = null;\n if (isset($row->sef) && empty($value)) $value = $row->sef;\n if (isset($row->shortcode) && empty($value)) $value = $row->shortcode;\n if (isset($row->title) && empty($title)) $title = $row->title;\n if (isset($row->name) && empty($title)) $title = $row->name;\n if (empty($title)) $title = $value;\n $this->options[] = array('title' => $title, 'value' => $value);\n }\n }\n return $this->options;\n }", "title": "" }, { "docid": "32c83d7c5478303057ebbb9b33eb4789", "score": "0.66589534", "text": "public function toArray()\n {\n $options = [];\n\n if ($this->emptyOption) {\n $options[0] = ' ';\n }\n\n $collection = $this->collectionFactory->create();\n $collection->addAttributeToSelect('name');\n $collection->addAttributeToFilter('is_active', 1);\n $collection->setOrder(['entity_id', 'path'], 'asc');\n\n /** @var \\Magento\\Catalog\\Model\\Category $category */\n foreach ($collection as $category) {\n $options[$category->getId()] =\n str_repeat(\". \", max(0, ($category->getLevel() - 1) * 3)) . $category->getName();\n }\n\n return $options;\n }", "title": "" }, { "docid": "dcf35fe9d2039a16d6afcb467af3d45d", "score": "0.6635219", "text": "public function getArrayValue(){\n $data = array();\n foreach($this as $option){\n $data[$option->getName()] = $option->getValue();\n }\n return $data;\n }", "title": "" }, { "docid": "9add2d6385af587abcd3f1af768aad0c", "score": "0.6633038", "text": "function &getAll()\r\n {\r\n $db =& eZDB::globalDatabase();\r\n\r\n $return_array = array();\r\n $option_array = array();\r\n\r\n $db->array_query( $option_array, \"SELECT ID FROM eZTrade_Option ORDER BY Name\" );\r\n\r\n for ( $i=0; $i < count($option_array); $i++ )\r\n {\r\n $return_array[$i] = new eZOption( $option_array[$i][$db->fieldName( \"ID\" )], 0 );\r\n }\r\n\r\n return $return_array;\r\n }", "title": "" }, { "docid": "f50eb7f542fe99d2d7bf076f812d514a", "score": "0.66177183", "text": "public function getArrayToSelect()\n\t{\n\t\t$toSelect = array();\n\t\t$branches = $this->all();\n\t\tforeach ($branches as $branch) {\n\t\t\t$toSelect[$branch->id] = $branch->name;\n\t\t}\n\t\treturn $toSelect;\n\t}", "title": "" }, { "docid": "90a25bfff14d9ef9033863182c33a707", "score": "0.6617229", "text": "public function getOptionArray()\n {\n return [\n '' => __('--- Select Options ---'),\n self::DROP_DOWN => __('Drop Down Template (Default)'),\n self::PRODUCT_DETAIL_SELECT => __('Product Detail Select Template'),\n self::PRODUCT_DETAIL_CHECKBOX => __('Product Detail Checkbox Template')\n ];\n }", "title": "" }, { "docid": "4b1100b03a2dbf5db94b588d6d7d7804", "score": "0.660307", "text": "public function toArray()\n {\n return $this->buildItems();\n }", "title": "" }, { "docid": "115e4854d57dae194c5c47ae5a0210b2", "score": "0.65974003", "text": "public function toOptionArray()\n {\n $helper = Mage::Helper('advancedexport/website');\n $_websites = $helper->getWebsites(true);\n \n $optArray = array(array('value'=>'', 'label'=>''));\n \n foreach ($_websites as $website) {\n $optArray[] = array(\n 'value'=>$website['WebsiteId'], \n 'label'=>$website['WebsiteName']\n );\n }\n return $optArray;\n }", "title": "" }, { "docid": "a15e7602eb517ab9feb30e3ce21739c5", "score": "0.65936804", "text": "public function toOptionArray()\n {\n return [\n [\n 'value' => 'default',\n 'label' => __('Default'),\n ],\n [\n 'value' => 'compact',\n 'label' => __('Compact'),\n ],\n [\n 'value' => 'large',\n 'label' => __('Large'),\n ]\n ];\n }", "title": "" }, { "docid": "1bbac5a60b61cc3c328bb21efa930a4b", "score": "0.65884054", "text": "protected function getOptions()\n {\n $options = array();\n\n $admins = $this->getAdmins();\n foreach ($admins as $option)\n {\n $value = (string) $option->id;\n $text = $option->name;\n\n $tmp = array(\n 'value' => $value,\n 'text' => $text,\n 'disable' => false,\n 'class' => '',\n 'selected' => false,\n 'checked' => false\n );\n\n // Add the option object to the result set.\n $options[] = (object) $tmp;\n }\n\n reset($options);\n\n return $options;\n }", "title": "" }, { "docid": "896d55c0403705cc2f7126e3daa28ea0", "score": "0.6583827", "text": "public function _getAll()\n {\n $attr = array();\n foreach ($this->_options as $option) {\n $attr['Custom Options'][] = $option->getOptionName();\n }\n\n return $attr;\n }", "title": "" }, { "docid": "4ab21a28d92df14e48cd221da340f024", "score": "0.65778387", "text": "public function retrieve_all()\n\t{\n\t\t$vars = $this->options_list('name', 'value', array('active' => 'yes'));\n\t\treturn $vars;\n\t}", "title": "" }, { "docid": "794e8d64cd326c088756bf30d5b3c05d", "score": "0.657726", "text": "public function toArray()\n {\n $contactlist = Mage::helper('livedata_trans/contactlist')->getAllLists();\n $arrayList = array();\n\n foreach ($contactlist as $list) {\n $arrayList[$list['id']] = $list['name'];\n }\n $arrayList[0] = 'Select List';\n\n return $arrayList;\n }", "title": "" }, { "docid": "1b8a0a80670fb52090eb7462aa19332d", "score": "0.657079", "text": "public function getInsurenceToSelectBox() {\n\t\t$data = $this->database->table(self::TABLE_NAME)->fetchAll();\n\t\t$result = [];\n\n\t\tforeach ($data as $key => $value)\n\t\t\t$result[$value->ID_pojistovny] = $value->nazev_pojistovny;\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "b5ce649a6f39c6503defb231d7b64994", "score": "0.6564002", "text": "public function getValueSelectOptions()\n {\n if (!$this->getData('value_select_options')) {\n if ($this->getAttribute() === 'attribute_set_id') {\n $entityTypeId = Mage::getSingleton('eav/config')->getEntityType('catalog_product')->getId();\n\n $options = Mage::getResourceModel('eav/entity_attribute_set_collection')\n ->setEntityTypeFilter($entityTypeId)\n ->load()->toOptionArray();\n\n $this->setData('value_select_options', $options);\n } elseif ($this->getAttribute() == 'type_id') {\n $options = Mage::getSingleton('catalog/product_type')->getOptions();\n $this->setData('value_select_options', $options);\n } elseif (is_object($this->getAttributeObject()) && $this->getAttributeObject()->usesSource()) {\n if ($this->getAttributeObject()->getFrontendInput() == 'multiselect') {\n $addEmptyOption = false;\n } else {\n $addEmptyOption = true;\n }\n\n $optionsArr = $this->getAttributeObject()->getSource()->getAllOptions($addEmptyOption);\n $this->setData('value_select_options', $optionsArr);\n }\n }\n\n return $this->getData('value_select_options');\n }", "title": "" }, { "docid": "3ba78cb212d6ac915ea383e812ad6480", "score": "0.6558862", "text": "public function toOptionArray()\n {\n $attributes = Mage::getResourceModel('catalog/product_attribute_collection')->getItems();\n\n $attributes = array_map(function ($attribute) {\n $value = trim($attribute->getAttributecode());\n $label = Mage::helper('adminhtml')->__($attribute->getFrontendLabel());\n\n $label = empty($label)?$value:\"{$label} ($value)\";\n\n return array('value' => $value, 'label' => $label);\n }, $attributes);\n\n array_push($attributes, array('value' => '-', 'label' => '-'));\n\n usort($attributes, function ($a, $b) {\n return strcmp($a['label'], $b['label']);\n });\n\n return array_filter($attributes, function ($attribute) {\n return !empty($attribute['value']) && !empty($attribute['label']);\n });\n }", "title": "" }, { "docid": "eef9935c20b1a8057ec7e816e39d8a24", "score": "0.6557573", "text": "public function toArray() {\n return $this->items;\n }", "title": "" }, { "docid": "eef9935c20b1a8057ec7e816e39d8a24", "score": "0.6557573", "text": "public function toArray() {\n return $this->items;\n }", "title": "" }, { "docid": "81540c1f4a21f99e4f0640097f9106d2", "score": "0.6556976", "text": "function getOptions()\r\n {\r\n $select = \"SELECT * FROM options\";\r\n \r\n $results = $this->_pdo->query($select);\r\n \r\n $resultsArray = array();\r\n \r\n // create an array of blogger objects\r\n while ($row = $results->fetch(PDO::FETCH_ASSOC)) {\r\n $resultsArray[] = $row['description'];\r\n } \r\n return $resultsArray;\r\n }", "title": "" }, { "docid": "cdb08b284bc5b6359813da519c172279", "score": "0.6553182", "text": "public function toOptionArray()\n {\n if (empty($this->_options)) {\n $this->_options = Mage::getResourceModel('cms/block_collection')\n ->load()->toOptionArray();\n array_unshift($this->_options, array(\n 'value'=> '',\n 'label'=> Mage::helper('adminhtml')->__('-- Please Select --'),\n ));\n }\n\n return $this->_options;\n }", "title": "" }, { "docid": "bcf1914d92a5af505d8deeb45f323b78", "score": "0.6546872", "text": "public function getAllItems()\n {\n return $this->selectAll()->getAll();\n }", "title": "" }, { "docid": "e4cd713a0cadc392f2cf813f8bb1330b", "score": "0.65467125", "text": "public function asArray()\n\t{\n\t\treturn $this->items;\n\t}", "title": "" }, { "docid": "0fd346ef2c187d58d689500a1983f901", "score": "0.65426624", "text": "public function toOptionArray()\n {\n $result = [];\n\n foreach ($this->mapProvider->getProviders() as $provider) {\n $result[] = ['value' => $provider->getIdentifier(), 'label' => $provider->getName()];\n }\n\n return $result;\n }", "title": "" }, { "docid": "510855388c03125d807b6e9025597f41", "score": "0.6540331", "text": "public function get_options_dropdown()\n {\n if( is_array($this->_options) && count($this->_options) ) {\n $out = array();\n $smarty = CmsApp::get_instance()->GetSmarty();\n $smarty->assign('currency_symbol',cg_ecomm::get_currency_symbol());\n $smarty->assign('currency_code',cg_ecomm::get_currency_code());\n $smarty->assign('weight_units',cg_ecomm::get_weight_units());\n\n $mod = cms_utils::get_module(MOD_CGECOMMERCEBASE);\n foreach( $this->_options as $one ) {\n $smarty->assign('opt',$one);\n $smarty->assign('attrib_sku',$one->sku);\n $smarty->assign('attrib_text',$one->text);\n $smarty->assign('attrib_adjust',$one->adjustment);\n $out[$one->sku] = $mod->ProcessTemplateFromData($mod->GetPreference('attrib_item_description'));\n }\n return $out;\n }\n }", "title": "" }, { "docid": "62f813972b957f299cbad9df6cccf3de", "score": "0.6540072", "text": "public static function dropdown()\n {\n return static::lists('name', 'id');\n }", "title": "" }, { "docid": "b4754a02dcc03f33aa65bd3318d5c115", "score": "0.6528272", "text": "protected function getOptions()\r\n\t{\r\n\t\t$options = array();\r\n\r\n\t\t// Initialize some field attributes.\r\n\t\t$key = $this->keyField;\r\n\t\t$value = $this->valueField;\r\n\t\t$header = $this->header;\r\n\r\n\t\t// Get the database object.\r\n\t\t$db = JFactory::getDbo();\r\n\r\n\t\t// Set the query and get the result list.\r\n\t\t$db->setQuery($this->query);\r\n\t\t$items = $db->loadObjectlist();\r\n\r\n\t\t// Add header.\r\n\t\tif (!empty($header))\r\n\t\t{\r\n\t\t\t$header_title = JText::_($header);\r\n\t\t\t$options[] = JHtml::_('select.option', '', $header_title);\r\n\t\t}\r\n\r\n\t\t// Build the field options.\r\n\t\tif (!empty($items))\r\n\t\t{\r\n\t\t\tforeach ($items as $item)\r\n\t\t\t{\r\n\t\t\t\tif ($this->translate == true)\r\n\t\t\t\t{\r\n\t\t\t\t\t$options[] = JHtml::_('select.option', $item->$key, JText::_($item->$value));\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$options[] = JHtml::_('select.option', $item->$key, $item->$value);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Merge any additional options in the XML definition.\r\n\t\t$options = array_merge(parent::getOptions(), $options);\r\n\r\n\t\treturn $options;\r\n\t}", "title": "" }, { "docid": "0b7a5e1c97d77bc84655a1bfdcb7bcf8", "score": "0.6527569", "text": "function to_array()\n {\n $a = array();\n if ($this->items)\n {\n foreach ($this->items as $item)\n {\n $a[] = $item->to_array();\n }\n }\n return $a;\n }", "title": "" }, { "docid": "6fd93fb018fe8966766e54ac56183e8a", "score": "0.6526645", "text": "public function toArray()\n {\n return $this->items;\n }", "title": "" }, { "docid": "6fd93fb018fe8966766e54ac56183e8a", "score": "0.6526645", "text": "public function toArray()\n {\n return $this->items;\n }", "title": "" }, { "docid": "6fce1d5294725788df969cdce2e445e1", "score": "0.6525346", "text": "private function getOptionItems()\n {\n $contract = new ContractRepository();\n $city = new CityRepository();\n $company = new CompanyRepository();\n $department = new DepartmentRepository();\n $businessUnit = new BusinessUnitRepository();\n $region = new RegionRepository();\n $jobLevel = new JobLevelRepository();\n $jobTitle = new JobTitleRepository();\n $employee = new EmployeeRepository();\n $shiftmentGroup = new ShiftmentGroupRepository();\n $salaryGroup = new SalaryGroupRepository();\n $payrollPeriodGroup = new PayrollPeriodGroupRepository();\n $genderList = ['M' => 'Pria', 'F' => 'Wanita'];\n $identityList = ['KTP' => 'KTP', 'SIM' => 'SIM'];\n $employeeStatusList = ['PKWT' => 'PKWT', 'PKWTT' => 'PKWTT', 'HL' => 'HL', 'PEMB' => 'PEMBARUAN', 'TRAINEE' => 'TRAINEE']; \n $marriedList = ['TK' => 'Tidak/Belum Kawin', 'K0' => 'Kawin anak 0', 'K1' => 'Kawin anak 1', 'K2' => 'Kawin anak 2', 'K3' => 'Kawin anak 3'];\n return [\n 'contractItems' => ['' => __('crud.option.contract_placeholder')] + $contract->allQuery(['used' => 0])->active()->pluck('letter_number', 'id')->toArray(),\n 'cityItems' => ['' => __('crud.option.city_placeholder')] + $city->pluck(),\n 'companyItems' => ['' => __('crud.option.company_placeholder')] + $company->pluck(),\n 'departmentItems' => ['' => __('crud.option.department_placeholder')] + $department->pluck(),\n 'businessUnitItems' => ['' => __('crud.option.business_unit_placeholder')] + $businessUnit->pluck(),\n 'regionItems' => ['' => __('crud.option.region_placeholder')] + $region->pluck(),\n 'regionOfBirthItems' => ['' => __('crud.option.region_placeholder')] + $region->pluck(),\n 'cityOfBirthItems' => ['' => __('crud.option.city_placeholder')] + $city->pluck(),\n 'joblevelItems' => ['' => __('crud.option.jobLevel_placeholder')] + $jobLevel->pluck(),\n 'jobtitleItems' => ['' => __('crud.option.jobTitle_placeholder')] + $jobTitle->pluck(),\n 'supervisorItems' => ['' => __('crud.option.employee_placeholder')] + $employee->allQuery()->supervisor()->get()->pluck('code_name','id')->toArray(),\n 'salaryGroupItems' => ['' => __('crud.option.salary_group_placeholder')] + $salaryGroup->pluck(),\n 'shiftmentGroupItems' => ['' => __('crud.option.shiftment_group_placeholder')] + $shiftmentGroup->pluck(),\n 'payrollPeriodGroupItems' => ['' => __('crud.option.payroll_period_group_palceholder')] + $payrollPeriodGroup->pluck(),\n 'gradeItems' => ['' => __('crud.option.payroll_period_group_palceholder')] + array_combine(Employee::GRADE, Employee::GRADE),\n 'genderItems' => ['' => __('crud.option.payroll_period_group_palceholder')] + $genderList,\n 'marriedItems' => ['' => __('crud.option.payroll_period_group_palceholder')] + $marriedList,\n 'identityItems' => ['' => __('crud.option.payroll_period_group_palceholder')] + $identityList,\n 'employeeStatusItems' => ['' => __('crud.option.payroll_period_group_palceholder')] + $employeeStatusList,\n \n ];\n }", "title": "" }, { "docid": "c1ec008b234363a528728e7e611b6c57", "score": "0.652395", "text": "public static function getAll() {\n global $wpdb;\n\n $table_name = $wpdb->prefix . self::$table_name;\n\n $sql = \"SELECT name, value, label, description FROM $table_name ORDER BY label\";\n\n $options = $wpdb->get_results( $sql );\n\n // convert array of stdObjects to array of arrays\n // for easier presentation in WP-CLI\n // TODO: perform in view\n $options = array_map(\n function ( $obj ) {\n // hide sensitive values\n if ( $obj->name === 'basicAuthPassword' ) {\n $obj->value = '***************';\n }\n\n return (array) $obj;\n },\n $options\n );\n\n return $options;\n }", "title": "" }, { "docid": "d97cb52ed62600531d2da9ef803fdcdc", "score": "0.6517149", "text": "public function toArray()\n\t{\n\t\treturn $this->items;\n\t}", "title": "" }, { "docid": "02e5de3e05510931d4c8cd13e20ee913", "score": "0.65065706", "text": "public function toOptionArray()\n {\n $options = array(\n array('value' => self::GLOBAL_VALUE,\n 'label' => Mage::helper('postident/data')->__('global')),\n array('value' => self::PRODUCT_SPECIFIC,\n 'label' => Mage::helper('postident/data')->__('product specific')),\n array('value' => self::BOTH_VALUES,\n 'label' => Mage::helper('postident/data')->__('both')),\n \n );\n return $options;\n }", "title": "" } ]
4937ab15acf348a32a0886eea4a22820
Code to be run after persisting the object
[ { "docid": "a3f54f03ccd8f629516068a13cef25ed", "score": "0.0", "text": "public function postSave(ConnectionInterface $con = null)\n {\n }", "title": "" } ]
[ { "docid": "c9b41680636a9446a1c1c609fc81ccec", "score": "0.7728293", "text": "public function postPersistCallback()\n {\n $this->performPostPersistCallback();\n }", "title": "" }, { "docid": "3935c2feb66f7cae1c7fd8672ca3c446", "score": "0.7685816", "text": "public function onAfterSave()\n\t{\n\t\t// Nothing to do\n\t}", "title": "" }, { "docid": "2b793a9eef00683b8812552aadf605f5", "score": "0.76322913", "text": "public function save_after() {\n // Nothing yet...\n }", "title": "" }, { "docid": "8d1606ab37cb5373d885109be739e167", "score": "0.7623576", "text": "public function afterSave() {\n }", "title": "" }, { "docid": "87e6630c97c96134a9fedd1135ae63ee", "score": "0.7598213", "text": "protected function afterSave()\n\t{\n\t}", "title": "" }, { "docid": "692182a273c216fdd803892dc9d86f83", "score": "0.7597103", "text": "public function afterSave()\n {\n }", "title": "" }, { "docid": "af909161a21e93b90521c17bfbcc41b7", "score": "0.7563346", "text": "protected function afterSave()\n {\n }", "title": "" }, { "docid": "bb157d7413ac7f562e1bf6881c70e23c", "score": "0.7254231", "text": "protected function preSave() {}", "title": "" }, { "docid": "9ba17753f72e11275c71039e17a2ac1d", "score": "0.7236807", "text": "protected function _postSave()\n {\n }", "title": "" }, { "docid": "1df7b65c856ff3fd5b263b552fbd4eb6", "score": "0.71804357", "text": "public function prePersist()\n {\n }", "title": "" }, { "docid": "6759c43ad73df458049f6699dc3c1007", "score": "0.7127397", "text": "public function postPersist($data) {\n \n }", "title": "" }, { "docid": "85337e3e7b79e71668bb301695fe8525", "score": "0.7107344", "text": "public function prePersistCallback()\n {\n $this->performPrePersistCallback();\n }", "title": "" }, { "docid": "631027464fa121c4e19909fe66644790", "score": "0.70772433", "text": "protected function postSave() {}", "title": "" }, { "docid": "af3a2b84a584e235614a7ab3196251db", "score": "0.7075508", "text": "public function afterSaveAll();", "title": "" }, { "docid": "27c521f53b657d65c53e75bd954b48f4", "score": "0.7073453", "text": "public function postSave() {\n\t\tif ($this->getId() > 0) {\n\t\t\t$this->emptyCacheWidget();\n\t\t\t$this->_log->add($this->logFN(), 'debug', '['.$this->_whatLog.'|'.$this->getId().'] SAVE END // eqLogic.postSave()');\n\t\t}\n\t}", "title": "" }, { "docid": "3fefbede66aedb85b0155e84eddc6bc7", "score": "0.6981879", "text": "function after_save()\n\t{\n\t}", "title": "" }, { "docid": "ef91d05ea4cb2ec7d9f49685cbbe27ec", "score": "0.69515914", "text": "public function postSaveCallback()\n {\n $this->performPostSaveCallback();\n }", "title": "" }, { "docid": "461fbfdf649aa07d73e104b598ce9c42", "score": "0.69004565", "text": "public function fireAfterSaveEvent() {\n if (!empty($this->afterSaveEvent)) {\n $this->modx->invokeEvent($this->afterSaveEvent,array(\n 'mode' => modSystemEvent::MODE_UPD,\n $this->primaryKeyField => $this->object->get($this->primaryKeyField),\n $this->objectType => &$this->object,\n 'object' => &$this->object,\n ));\n }\n }", "title": "" }, { "docid": "972b164848a901093af2874beb4f2a0a", "score": "0.6894502", "text": "protected function save(): void\n {\n\n //no need to create savepoint here for the\n\n new Event($this, '_before_save');\n $this->execute_save();\n $this->set_status(self::STATUS['SAVED']);\n $this->set_current_transaction($this->get_parent());\n new Event($this, '_after_save');\n }", "title": "" }, { "docid": "f7ea31eb1fdda5e3bdd74c09f6de67b7", "score": "0.6865207", "text": "public function save() \n\t{\n\t\t$this->getMapper()->save($this);\n\t}", "title": "" }, { "docid": "c7352c98d6ba08fa45e98730765540b6", "score": "0.6835412", "text": "public function postLoad()\n {\n $persistedData = $this->seoMetadata;\n $this->seoMetadata = new SeoMetadata();\n foreach ($persistedData as $property => $value) {\n if (method_exists($this->seoMetadata, 'set' . ucfirst($property))) {\n $this->seoMetadata->{'set' . ucfirst($property)}($value);\n }\n }\n }", "title": "" }, { "docid": "82e6db1a34df1e86d69ff6468c225f3f", "score": "0.6828974", "text": "public function onPrePersist()\n {\n $this->created = new \\DateTime(\"now\");\n $this->updated = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "f22285006470b3e5eb201dd7d22a6e31", "score": "0.6821116", "text": "public function afterSave() { return true; }", "title": "" }, { "docid": "89c860f309035c392c2e9c39bf4a5f17", "score": "0.6820597", "text": "public function afterSave() {\r\n\t\t\t\t\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "b4a227d8c86248bfc0c6f4a28f77484f", "score": "0.6811721", "text": "public function save()\n {\n $this->getMapper()->save($this);\n }", "title": "" }, { "docid": "b4a227d8c86248bfc0c6f4a28f77484f", "score": "0.6811721", "text": "public function save()\n {\n $this->getMapper()->save($this);\n }", "title": "" }, { "docid": "0e0abd209a4030c27a09aa1bdd4fb0fc", "score": "0.6781359", "text": "protected function _postSaveAfterTransaction()\r\n {\r\n if (!$this->_resource && $this->get('resource_id')) {\r\n $this->_resource = $this->_getResourceModel()->getResourceById($this->get('resource_id'));\r\n }\r\n\r\n if ($this->_resource) {\r\n // TODO send alerts?\r\n }\r\n }", "title": "" }, { "docid": "f296d7a01e162057ffd2061850a0a800", "score": "0.6774326", "text": "public function save()\r\n {\r\n $this->_getMapper()->save($this);\r\n }", "title": "" }, { "docid": "ef54b84344244278f647ac655ee13913", "score": "0.6760336", "text": "public function onPrePersist()\n\t{\n\t\t$this->createdAt = new \\DateTime(\"now\");\n\t\t$this->updatedAt = new \\DateTime(\"now\");\n\t}", "title": "" }, { "docid": "b5a84e7edfc68b8b22ccfa390258e700", "score": "0.67531615", "text": "public function save()\n\t{\n\t\t// TODO: Implement save() method.\n\t}", "title": "" }, { "docid": "f0d8cccc90e51f0fafe847965a173690", "score": "0.6736912", "text": "public function preSaveCallback()\n {\n $this->performPreSaveCallback();\n }", "title": "" }, { "docid": "3f743f9b50d9703b13c479ea4b42772d", "score": "0.6732086", "text": "protected function onSave() {\n\t}", "title": "" }, { "docid": "9f727ad4e89fc8b1ffaadb6c26f122ab", "score": "0.6731081", "text": "public function onPrePersist()\r\n {\r\n $this->insertedAt = new \\DateTime(\"now\");\r\n }", "title": "" }, { "docid": "aac5c12e7fb942c43e1b3627ee79d0da", "score": "0.6711156", "text": "public function save()\n {\n $this->save();\n }", "title": "" }, { "docid": "39d93f273618fd8474b47725100136d3", "score": "0.66982585", "text": "public function afterSave()\n\t\t{\n\t\t\tforeach ($this->data as $key => $val) {\n\t\t\t\tif ($this->isSerializable($key)) {\n\t\t\t\t\t$this->data[$key] = json_decode($val, true);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "91dce21095f1bcf9cd4e7940331ee1b9", "score": "0.6690992", "text": "public function onPrePersist()\n {\n $this->created_at = new \\DateTime(\"now\");\n $this->modified_at = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "5aa26df56abd40b99fc69744a8a2125b", "score": "0.6673418", "text": "public function preSave() {\n\t\tif ($this->getId() > 0) {\n\t\t\t$this->_whatLog = 'SAVE';\n\t\t\t$this->_log->add($this->logFN(), 'debug', '['.$this->_whatLog.'|'.$this->getId().'] SAVE START // eqLogic.preSave(): \"'.$this->getName().'\"');\n\t\t\t// création du repertoire cache s'il n'existe pas //\n\t\t\tiCalendarTools::setCacheDir(true);\n\t\t}\n\t }", "title": "" }, { "docid": "2a9aa94f0eaaccbdeb5e3114f6c36b18", "score": "0.66670066", "text": "public function onSaving() { }", "title": "" }, { "docid": "b6dfd66bb3beefad96718bb2a7b434fc", "score": "0.665507", "text": "public function onPrePersist()\n {\n $this->createdAt = new \\DateTime(\"now\");\n $this->updatedAt = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "b6dfd66bb3beefad96718bb2a7b434fc", "score": "0.665507", "text": "public function onPrePersist()\n {\n $this->createdAt = new \\DateTime(\"now\");\n $this->updatedAt = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "8e8e8d24e3e46228a0a861cf22c76a0b", "score": "0.66545874", "text": "public function save()\n {\n $this->getRepository()->save();\n }", "title": "" }, { "docid": "530483aa2feed389d8cd2377e10277a3", "score": "0.66439724", "text": "public function onPrePersist()\n {\n $this->created = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "530483aa2feed389d8cd2377e10277a3", "score": "0.66439724", "text": "public function onPrePersist()\n {\n $this->created = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "530483aa2feed389d8cd2377e10277a3", "score": "0.66439724", "text": "public function onPrePersist()\n {\n $this->created = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "2e19575be5b7a507ea8e3bd30784c339", "score": "0.66306764", "text": "public function onPrePersist()\n {\n $this->createdAt = new \\DateTime();\n $this->updatedAt = new \\DateTime();\n }", "title": "" }, { "docid": "8df3a5c271f5fa3c8968b9e93dff37cc", "score": "0.66280514", "text": "protected function _save()\n {\n }", "title": "" }, { "docid": "ce6444ca346e3b76b9cc8ba8f91bf532", "score": "0.6604844", "text": "protected function onSave()\n {\n }", "title": "" }, { "docid": "28464d5b1d69d8ae2e4cfc80f9a81ba8", "score": "0.6588326", "text": "public function save()\n {\n $this->order = self::SAVE;\n }", "title": "" }, { "docid": "381ceb2abab677c3bba4a8ab4d95f9f6", "score": "0.65877676", "text": "public function onPrePersist()\n {\n $this->createdAt = new DateTime();\n $this->updatedAt = new DateTime();\n }", "title": "" }, { "docid": "381ceb2abab677c3bba4a8ab4d95f9f6", "score": "0.65877676", "text": "public function onPrePersist()\n {\n $this->createdAt = new DateTime();\n $this->updatedAt = new DateTime();\n }", "title": "" }, { "docid": "65f22fd163693b044485ef932b86d1c3", "score": "0.65832645", "text": "public function save()\n {\n $this->entityManager->persist($this->model);\n $this->entityManager->flush();\n }", "title": "" }, { "docid": "9ca5e6b4b4f26d9aef1ec6575fde5387", "score": "0.6576199", "text": "public function save(): void\n {\n $this->ageFlashData();\n\n $this->handler->write($this->getId(), $this->prepareForStorage(serialize($this->attributes)));\n\n $this->started = false;\n }", "title": "" }, { "docid": "d46ee36f29fdf84687b3ae4bbbb22e80", "score": "0.65746456", "text": "protected function _postSave()\n\t{\n\t\t$this->_updateSearchIndex();\n\t\t$this->_updateDeletionLog();\n\t\t$this->_updateModerationQueue();\n\t\t\n\t\tif ($this->get('quote_state') == 'visible')\n\t\t{\n\t\t\t/* TODO */\n\t\t}\n\t}", "title": "" }, { "docid": "db99d11235ea3b12253995ae634b06fa", "score": "0.6574198", "text": "public function ttPrePersist():void\n {\n //$arrayHelper = $this->getConfigArrayHelper();\n //if ($arrayHelper !== NULL) {\n /** @noinspection PhpParamsInspection */\n //$arrayHelper->ttPrePersist($this);\n //}\n }", "title": "" }, { "docid": "339855416f9db19253cdb15390485037", "score": "0.65718937", "text": "protected function postSave(&$entity) {\n }", "title": "" }, { "docid": "98aba99f0b76a354f0827e87bad39591", "score": "0.6556544", "text": "public function onPrePersist(): void\n {\n $this->created = new \\DateTime('now');\n }", "title": "" }, { "docid": "f2ff9ef1a8304c4b97fbfa53d7b34404", "score": "0.655537", "text": "public function prePersist()\n {\n $this->created = new \\DateTime('now', new \\DateTimeZone('UTC'));\n $this->setUpdated();\n }", "title": "" }, { "docid": "691abb4b764e6f9c0e1452360c5ca120", "score": "0.6547914", "text": "public function persist(){\n $this->storage->setAttr($this->attrs);\n }", "title": "" }, { "docid": "7c316c74dfe85e4eddbb40c05771c29b", "score": "0.654183", "text": "public function onPrePersist()\n {\n $this->createdAt = new DateTime(\"now\");\n $this->updatedAt = new DateTime(\"now\");\n }", "title": "" }, { "docid": "4f77d9f97ac06637af9030574fed9639", "score": "0.65372884", "text": "public function saveEntity()\n {\n $this->_getDataAdapter()->saveEntity($this);\n }", "title": "" }, { "docid": "8b1eb90f1104b06b0cfd85c4ecae3696", "score": "0.65289205", "text": "public function onAfterWrite()\n {\n $this->createDefaultFields();\n parent::onAfterWrite();\n }", "title": "" }, { "docid": "9be838347621b2f2a3d399b1a15580ac", "score": "0.6528373", "text": "public function postFlush()\n {\n $this->doPostFlush();\n }", "title": "" }, { "docid": "7b784d787fb337dc1f184e9f563e13f4", "score": "0.65196496", "text": "public function onPrePersist()\n {\n $this->created = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "c8745035d202429759b387b80477d73b", "score": "0.65044624", "text": "protected function _afterSave()\n {\n Mage::getSingleton('index/indexer')->processEntityAction(\n $this, self::ENTITY, Mage_Index_Model_Event::TYPE_SAVE\n );\n\n return parent::_afterSave();\n }", "title": "" }, { "docid": "abaa2a90f2e0d12a62f34d751d6912dc", "score": "0.64795965", "text": "public function onPrePersist()\n {\n $this->creationdate = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "b8928a5ec1b75ae12883ff01a3501a2b", "score": "0.64765054", "text": "public static function commit() : void\n {\n $self = self::getSingleton();\n\n if ($self->collecting) {\n $self->update();\n $self->insert();\n\n $self->collecting = false;\n $self->models = collect();\n }\n }", "title": "" }, { "docid": "5aa61a97a34874335b4379d0fd2d542a", "score": "0.6475743", "text": "public function afterSave()\n {\n return true;\n }", "title": "" }, { "docid": "80a6a83d524ab910aaf79b132e143384", "score": "0.6450464", "text": "final protected function _postSave()\r\n\t{\r\n\t\t$data = $this->getData();\r\n\t\tforeach ($this->_fields as $field) {\r\n\t\t\t$field->postSaveAction($data);\r\n\t\t}\r\n\t\tif ($this->_isInsertData) {\r\n\t\t\t$this->afterInsert();\r\n\t\t}\r\n\t\tif ($this->_isUpdateData) {\r\n\t\t\t$this->afterUpdate();\r\n\t\t}\r\n\t\t$this->postSave();\r\n\t}", "title": "" }, { "docid": "e7e64f19916e7256844e6c0ba182a701", "score": "0.6443391", "text": "protected function afterSave()\n {\n HopamTag::model()->updateFrequency($this->_oldTags, $this->tags);\n Ban::model()->updateFrequency($this->_oldBans, $this->ban_artist);\n if($this->isNewRecord)\n $this->create_time = time();\n else\n $this->update_time = time();\n parent::afterSave();\n\n }", "title": "" }, { "docid": "e792a9488518884d7a3a360683d1c281", "score": "0.64350975", "text": "public function save() {\n\t\t\n\t}", "title": "" }, { "docid": "dcf191cbf78094e84ef5838be5e51a02", "score": "0.6425136", "text": "public function onPrePersist()\r\n {\r\n $this->beganTime = new \\DateTime();\r\n }", "title": "" }, { "docid": "9fa6cd8b3f76a5c841c9594533d24c0a", "score": "0.641812", "text": "public function save()\n {\n if (! $this->_isChanged) {\n return;\n\n }\n $this->saveRaw();\n $this->_isChanged = false;\n }", "title": "" }, { "docid": "d3a44feb0cd557e85132e931f8be5d5e", "score": "0.6415372", "text": "public function afterSave(EventInterface $event, EntityInterface $entity): void;", "title": "" }, { "docid": "d2d32986889622fc59e284b13b29a1a7", "score": "0.6414065", "text": "protected function afterUpdate() {}", "title": "" }, { "docid": "0a26283e1c9e35753c6821c90dfa1c1f", "score": "0.6406007", "text": "private function saveTracker(): void {\n try {\n $this->getEntityManager()->persist($this->exposure);\n $this->getEntityManager()->flush($this->exposure);\n } catch (OptimisticLockException $e) {\n } catch (ORMException $e) {\n } catch (ForeignKeyConstraintViolationException $e){\n }\n }", "title": "" }, { "docid": "3055880295b3bebd164a7120a161ee49", "score": "0.64043313", "text": "protected function afterInsert() {}", "title": "" }, { "docid": "2af767dc24098580a3d7616439041d40", "score": "0.6404045", "text": "public function save()\n {\n if ($this->dirty && $this->started) {\n $this->write($this->id, serialize($this->data));\n $this->dirty = false;\n }\n }", "title": "" }, { "docid": "7cccd347335d2099755cb27e9701ae90", "score": "0.63957554", "text": "public function prePersist()\n {\n $this->createdAt = new \\DateTime;\n }", "title": "" }, { "docid": "c5315cb420d44984de153692778a8e0a", "score": "0.6393063", "text": "public function onSaving()\n {\n $entry = $this->getFormEntry();\n $parent = $this->getParent();\n $disk = $this->getDisk();\n\n if ($disk) {\n $entry->disk = $disk->getId();\n }\n\n if ($parent) {\n $entry->parent_id = $parent->getId();\n }\n }", "title": "" }, { "docid": "6f98fd6c7777528ff8acebf0120585e7", "score": "0.6382966", "text": "public function onPrePersist()\n {\n $this->createdAt = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "6f98fd6c7777528ff8acebf0120585e7", "score": "0.6382966", "text": "public function onPrePersist()\n {\n $this->createdAt = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "6f98fd6c7777528ff8acebf0120585e7", "score": "0.6382966", "text": "public function onPrePersist()\n {\n $this->createdAt = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "40f9a38732558030f5d52a3420ffa407", "score": "0.63781273", "text": "public function onPrePersist()\n {\n $this->setCreatedAt(new DateTime(\"now\"));\n $this->setUpdatedAt(new DateTime(\"now\"));\n }", "title": "" }, { "docid": "a03ef88338bc39570524a211bc7b958c", "score": "0.6374152", "text": "protected function _afterSave($name) \n\t{}", "title": "" }, { "docid": "cf15ccd0b8db5e5ba44afbb289ca9f58", "score": "0.6362365", "text": "public function afterSave()\n {\n return parent::afterSave();\n }", "title": "" }, { "docid": "119c47cbc5bb85b6094b03d0f4d24aa0", "score": "0.6357487", "text": "public function onPrePersist() {\n $this->createdAt = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "c8560ce68b7b8704ae6349dae1337f9d", "score": "0.63566417", "text": "protected function _afterSave()\n {\n $result = parent::_afterSave();\n Mage::getSingleton('index/indexer')->processEntityAction(\n $this, self::ENTITY, Mage_Index_Model_Event::TYPE_SAVE\n );\n return $result;\n }", "title": "" }, { "docid": "0da881d20324904e096a7c9f7c550ed0", "score": "0.63186055", "text": "public function __destruct()\n {\n $this->save();\n }", "title": "" }, { "docid": "0696f54d9f5d46d9d1b179c865e00b8a", "score": "0.63161033", "text": "public function afterSave()\n {\n Event::fire('awebsome.serverpilot.afterSaveSettings');\n }", "title": "" }, { "docid": "b52fa5ec67bd54da877e6f37d48f6e49", "score": "0.6294007", "text": "public function __destruct() {\n #$this->save();\n }", "title": "" }, { "docid": "8dbf379b2ff4ca0c7d9ee1186f82a7e3", "score": "0.62924564", "text": "protected function _afterLoad()\n {\n $value = $this->getValue();\n $value = $this->makeArrayFieldValue($value);\n $this->setValue($value);\n }", "title": "" }, { "docid": "3a56a46bc81e27d75b1eb9288c8cd6c7", "score": "0.629189", "text": "protected function afterSave()\n {\n $this->saveKeywords();\n parent::afterSave();\n }", "title": "" }, { "docid": "e20e40cf1d0b6c72b112fdf5c7793b92", "score": "0.6290889", "text": "public function onPrePersist(): void\n {\n $this->created = new DateTime(\"now\", new DateTimeZone(\"UTC\"));\n }", "title": "" }, { "docid": "65084aa56c0001d0a4953a8fadf380aa", "score": "0.62797946", "text": "abstract public function persist_properties();", "title": "" }, { "docid": "9df4e95de371afa738007dc282328aea", "score": "0.62689763", "text": "public function save() {\n $this->set('updated', time());\n parent::save();\n }", "title": "" }, { "docid": "0c34572fbbb55460ba9a7f4b94179f38", "score": "0.62671995", "text": "protected function _save()\n {\n Horde_Exception_Pear::catchError($this->datatreeObject->save());\n }", "title": "" }, { "docid": "823cb644b6b50f6d03a6491954875db1", "score": "0.62576425", "text": "protected function after_save(&$result)\n\t{\n\t}", "title": "" }, { "docid": "276236c694cbbaf0cd22f3688f2365fc", "score": "0.6257351", "text": "protected function emitRepositoryObjectsPersisted() {\n\t}", "title": "" }, { "docid": "227a87da36e4f0051ff2c0c2d37830ed", "score": "0.62547714", "text": "public function onPrePersist()\n {\n $this->created_at = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "227a87da36e4f0051ff2c0c2d37830ed", "score": "0.62547714", "text": "public function onPrePersist()\n {\n $this->created_at = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "227a87da36e4f0051ff2c0c2d37830ed", "score": "0.62547714", "text": "public function onPrePersist()\n {\n $this->created_at = new \\DateTime(\"now\");\n }", "title": "" } ]
f93ae4ba682d43e8c310c47c67007082
/ GET COUNTRY LIST
[ { "docid": "ad208af4725615151061c970019be012", "score": "0.7156628", "text": "public function getcountrylist()\n\t{\t\n\t\t$result =$this->db->from(\"settings\")\n\t\t\t\t\t\t->join(\"country\",\"country.currency_code\",\"settings.currency_code\")\n\t\t\t\t\t\t->get();\n\t\t\t\t\t\t\n\t\treturn $result;\n\t}", "title": "" } ]
[ { "docid": "10d0d2d080f25d64ff5ecfe7e3f116c6", "score": "0.7864543", "text": "public function get_country_list() {\n\t\t$sql_commands = array( 'select_distinct_country' , 'where_valid_country' , 'order_by_country' );\n\n\t\t$country_list = $this->slplus->database->get_Record( $sql_commands , array() , 0 , ARRAY_A , 'get_col');\n\n\t\t$response = array(\n\t\t\t'count' => count( $country_list ),\n\t\t\t'states' => $country_list\n\t\t);\n\n\t\twp_send_json_success( $response );\n\t}", "title": "" }, { "docid": "35fd994e3f80a0383fe3c5594743abd1", "score": "0.7755761", "text": "public function getCountries();", "title": "" }, { "docid": "32d5f3389d4ccf2a52b32e8e36d8726d", "score": "0.7659368", "text": "function getCountries();", "title": "" }, { "docid": "1a79f639da65e02965d09968bd509342", "score": "0.7467373", "text": "public function country_list()\n {\n $result = common_select_values('id, name', 'ad_countries', '', 'result');\n return $result; \n }", "title": "" }, { "docid": "ceb1c5d661b2684b2f1dbcccd5ab914f", "score": "0.7461582", "text": "function getCountryList() {\n\t\t$file = new File(WWW_ROOT . 'address_codes/country_codes.txt');\n\n\t\t$countryList = $this->parseCountryStateFile($file);\n\n\t\treturn $countryList;\n\t}", "title": "" }, { "docid": "05fd86c60360361b4aad94db2b684a5a", "score": "0.7408737", "text": "public static function getCountryList()\n {\n \n $droptions = Countries::find()->asArray()->all();\n return ArrayHelper::map($droptions, 'id', 'name_en');\n \n }", "title": "" }, { "docid": "cfd9b83779406b075b44ffddfdfe23f4", "score": "0.7396308", "text": "function findAllCountries(){\n $ports = self::$con->executeSelectStatement($this->selectCountryStmt(),array());\n return $this->getCollectionCountry($ports); \n }", "title": "" }, { "docid": "433e82db2a4506413e3eab8f494efec9", "score": "0.7382544", "text": "public static function Countries() {\n $countries = DataObject::get('Country','','Name');\n\n if($countries)\n {\n return $countries->toDropdownMap('ID', 'Name', '', false);\n }\n else {\n return array();\n }\n\t}", "title": "" }, { "docid": "ef9fb73f1b2a36a2455bb11a65a83308", "score": "0.7321679", "text": "public function countries() {\n $data = SITEURL.\"index/countries\";\n return file_get_contents($data); \n }", "title": "" }, { "docid": "69e95abd1bd39103b5d226fab1f55154", "score": "0.7294455", "text": "public function getCountryList(){\n return $this->getCountryCollection()->toOptionArray(false);\n }", "title": "" }, { "docid": "c490f427239e72b44de53ed41b45a804", "score": "0.7277077", "text": "public function countryList()\n {\n $countryData = $this->country->getCollection([\"check_status\"=>1]);\n\n if(count($countryData) > 0){\n return response(['statusCode' =>1,'data' =>$countryData,'message' => ['Country List with all States Retrieved']]);\n }\n return response(['statusCode' =>0,'message' => ['No Country found']]);\n }", "title": "" }, { "docid": "37fff27da52492c3a12b8c4dbc46a982", "score": "0.7190034", "text": "public function getCountryList()\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from('tbl_country');\n\t\t$this->db->where('country_status', '1');\n\t\t$query = $this->db->get();\n\t\treturn $query->result() ;\n\t}", "title": "" }, { "docid": "10bfcdce64a58c59152ca925578eee49", "score": "0.7149381", "text": "function listingCountry() {\n $smt = $this->_tablecountry->select()\n ->query();\n $result = $smt->fetchAll();\n $smt->closeCursor();\n return $result;\n }", "title": "" }, { "docid": "42bf736b8e36c552dabac0765682d10b", "score": "0.71307147", "text": "public function listCountries()\n {\n $countries = array();\n $countries[] = array(\"code\" => \"AF\", \"name\" => \"Afghanistan\", \"d_code\" => \"+93\");\n $countries[] = array(\"code\" => \"AL\", \"name\" => \"Albania\", \"d_code\" => \"+355\");\n $countries[] = array(\"code\" => \"DZ\", \"name\" => \"Algeria\", \"d_code\" => \"+213\");\n $countries[] = array(\"code\" => \"AS\", \"name\" => \"American Samoa\", \"d_code\" => \"+1\");\n $countries[] = array(\"code\" => \"AD\", \"name\" => \"Andorra\", \"d_code\" => \"+376\");\n $countries[] = array(\"code\" => \"AO\", \"name\" => \"Angola\", \"d_code\" => \"+244\");\n $countries[] = array(\"code\" => \"AI\", \"name\" => \"Anguilla\", \"d_code\" => \"+1\");\n $countries[] = array(\"code\" => \"AG\", \"name\" => \"Antigua\", \"d_code\" => \"+1\");\n $countries[] = array(\"code\" => \"AR\", \"name\" => \"Argentina\", \"d_code\" => \"+54\");\n $countries[] = array(\"code\" => \"AM\", \"name\" => \"Armenia\", \"d_code\" => \"+374\");\n $countries[] = array(\"code\" => \"AW\", \"name\" => \"Aruba\", \"d_code\" => \"+297\");\n $countries[] = array(\"code\" => \"AU\", \"name\" => \"Australia\", \"d_code\" => \"+61\");\n $countries[] = array(\"code\" => \"AT\", \"name\" => \"Austria\", \"d_code\" => \"+43\");\n $countries[] = array(\"code\" => \"AZ\", \"name\" => \"Azerbaijan\", \"d_code\" => \"+994\");\n $countries[] = array(\"code\" => \"BH\", \"name\" => \"Bahrain\", \"d_code\" => \"+973\");\n $countries[] = array(\"code\" => \"BD\", \"name\" => \"Bangladesh\", \"d_code\" => \"+880\");\n $countries[] = array(\"code\" => \"BB\", \"name\" => \"Barbados\", \"d_code\" => \"+1\");\n $countries[] = array(\"code\" => \"BY\", \"name\" => \"Belarus\", \"d_code\" => \"+375\");\n $countries[] = array(\"code\" => \"BE\", \"name\" => \"Belgium\", \"d_code\" => \"+32\");\n $countries[] = array(\"code\" => \"BZ\", \"name\" => \"Belize\", \"d_code\" => \"+501\");\n $countries[] = array(\"code\" => \"BJ\", \"name\" => \"Benin\", \"d_code\" => \"+229\");\n $countries[] = array(\"code\" => \"BM\", \"name\" => \"Bermuda\", \"d_code\" => \"+1\");\n $countries[] = array(\"code\" => \"BT\", \"name\" => \"Bhutan\", \"d_code\" => \"+975\");\n $countries[] = array(\"code\" => \"BO\", \"name\" => \"Bolivia\", \"d_code\" => \"+591\");\n $countries[] = array(\"code\" => \"BA\", \"name\" => \"Bosnia and Herzegovina\", \"d_code\" => \"+387\");\n $countries[] = array(\"code\" => \"BW\", \"name\" => \"Botswana\", \"d_code\" => \"+267\");\n $countries[] = array(\"code\" => \"BR\", \"name\" => \"Brazil\", \"d_code\" => \"+55\");\n $countries[] = array(\"code\" => \"IO\", \"name\" => \"British Indian Ocean Territory\", \"d_code\" => \"+246\");\n $countries[] = array(\"code\" => \"VG\", \"name\" => \"British Virgin Islands\", \"d_code\" => \"+1\");\n $countries[] = array(\"code\" => \"BN\", \"name\" => \"Brunei\", \"d_code\" => \"+673\");\n $countries[] = array(\"code\" => \"BG\", \"name\" => \"Bulgaria\", \"d_code\" => \"+359\");\n $countries[] = array(\"code\" => \"BF\", \"name\" => \"Burkina Faso\", \"d_code\" => \"+226\");\n $countries[] = array(\"code\" => \"MM\", \"name\" => \"Burma Myanmar\", \"d_code\" => \"+95\");\n $countries[] = array(\"code\" => \"BI\", \"name\" => \"Burundi\", \"d_code\" => \"+257\");\n $countries[] = array(\"code\" => \"KH\", \"name\" => \"Cambodia\", \"d_code\" => \"+855\");\n $countries[] = array(\"code\" => \"CM\", \"name\" => \"Cameroon\", \"d_code\" => \"+237\");\n $countries[] = array(\"code\" => \"CA\", \"name\" => \"Canada\", \"d_code\" => \"+1\");\n $countries[] = array(\"code\" => \"CV\", \"name\" => \"Cape Verde\", \"d_code\" => \"+238\");\n $countries[] = array(\"code\" => \"KY\", \"name\" => \"Cayman Islands\", \"d_code\" => \"+1\");\n $countries[] = array(\"code\" => \"CF\", \"name\" => \"Central African Republic\", \"d_code\" => \"+236\");\n $countries[] = array(\"code\" => \"TD\", \"name\" => \"Chad\", \"d_code\" => \"+235\");\n $countries[] = array(\"code\" => \"CL\", \"name\" => \"Chile\", \"d_code\" => \"+56\");\n $countries[] = array(\"code\" => \"CN\", \"name\" => \"China\", \"d_code\" => \"+86\");\n $countries[] = array(\"code\" => \"CO\", \"name\" => \"Colombia\", \"d_code\" => \"+57\");\n $countries[] = array(\"code\" => \"KM\", \"name\" => \"Comoros\", \"d_code\" => \"+269\");\n $countries[] = array(\"code\" => \"CK\", \"name\" => \"Cook Islands\", \"d_code\" => \"+682\");\n $countries[] = array(\"code\" => \"CR\", \"name\" => \"Costa Rica\", \"d_code\" => \"+506\");\n $countries[] = array(\"code\" => \"CI\", \"name\" => \"Côte d'Ivoire\", \"d_code\" => \"+225\");\n $countries[] = array(\"code\" => \"HR\", \"name\" => \"Croatia\", \"d_code\" => \"+385\");\n $countries[] = array(\"code\" => \"CU\", \"name\" => \"Cuba\", \"d_code\" => \"+53\");\n $countries[] = array(\"code\" => \"CY\", \"name\" => \"Cyprus\", \"d_code\" => \"+357\");\n $countries[] = array(\"code\" => \"CZ\", \"name\" => \"Czech Republic\", \"d_code\" => \"+420\");\n $countries[] = array(\"code\" => \"CD\", \"name\" => \"Democratic Republic of Congo\", \"d_code\" => \"+243\");\n $countries[] = array(\"code\" => \"DK\", \"name\" => \"Denmark\", \"d_code\" => \"+45\");\n $countries[] = array(\"code\" => \"DJ\", \"name\" => \"Djibouti\", \"d_code\" => \"+253\");\n $countries[] = array(\"code\" => \"DM\", \"name\" => \"Dominica\", \"d_code\" => \"+1\");\n $countries[] = array(\"code\" => \"DO\", \"name\" => \"Dominican Republic\", \"d_code\" => \"+1\");\n $countries[] = array(\"code\" => \"EC\", \"name\" => \"Ecuador\", \"d_code\" => \"+593\");\n $countries[] = array(\"code\" => \"EG\", \"name\" => \"Egypt\", \"d_code\" => \"+20\");\n $countries[] = array(\"code\" => \"SV\", \"name\" => \"El Salvador\", \"d_code\" => \"+503\");\n $countries[] = array(\"code\" => \"GQ\", \"name\" => \"Equatorial Guinea\", \"d_code\" => \"+240\");\n $countries[] = array(\"code\" => \"ER\", \"name\" => \"Eritrea\", \"d_code\" => \"+291\");\n $countries[] = array(\"code\" => \"EE\", \"name\" => \"Estonia\", \"d_code\" => \"+372\");\n $countries[] = array(\"code\" => \"ET\", \"name\" => \"Ethiopia\", \"d_code\" => \"+251\");\n $countries[] = array(\"code\" => \"FK\", \"name\" => \"Falkland Islands\", \"d_code\" => \"+500\");\n $countries[] = array(\"code\" => \"FO\", \"name\" => \"Faroe Islands\", \"d_code\" => \"+298\");\n $countries[] = array(\"code\" => \"FM\", \"name\" => \"Federated States of Micronesia\", \"d_code\" => \"+691\");\n $countries[] = array(\"code\" => \"FJ\", \"name\" => \"Fiji\", \"d_code\" => \"+679\");\n $countries[] = array(\"code\" => \"FI\", \"name\" => \"Finland\", \"d_code\" => \"+358\");\n $countries[] = array(\"code\" => \"FR\", \"name\" => \"France\", \"d_code\" => \"+33\");\n $countries[] = array(\"code\" => \"GF\", \"name\" => \"French Guiana\", \"d_code\" => \"+594\");\n $countries[] = array(\"code\" => \"PF\", \"name\" => \"French Polynesia\", \"d_code\" => \"+689\");\n $countries[] = array(\"code\" => \"GA\", \"name\" => \"Gabon\", \"d_code\" => \"+241\");\n $countries[] = array(\"code\" => \"GE\", \"name\" => \"Georgia\", \"d_code\" => \"+995\");\n $countries[] = array(\"code\" => \"DE\", \"name\" => \"Germany\", \"d_code\" => \"+49\");\n $countries[] = array(\"code\" => \"GH\", \"name\" => \"Ghana\", \"d_code\" => \"+233\");\n $countries[] = array(\"code\" => \"GI\", \"name\" => \"Gibraltar\", \"d_code\" => \"+350\");\n $countries[] = array(\"code\" => \"GR\", \"name\" => \"Greece\", \"d_code\" => \"+30\");\n $countries[] = array(\"code\" => \"GL\", \"name\" => \"Greenland\", \"d_code\" => \"+299\");\n $countries[] = array(\"code\" => \"GD\", \"name\" => \"Grenada\", \"d_code\" => \"+1\");\n $countries[] = array(\"code\" => \"GP\", \"name\" => \"Guadeloupe\", \"d_code\" => \"+590\");\n $countries[] = array(\"code\" => \"GU\", \"name\" => \"Guam\", \"d_code\" => \"+1\");\n $countries[] = array(\"code\" => \"GT\", \"name\" => \"Guatemala\", \"d_code\" => \"+502\");\n $countries[] = array(\"code\" => \"GN\", \"name\" => \"Guinea\", \"d_code\" => \"+224\");\n $countries[] = array(\"code\" => \"GW\", \"name\" => \"Guinea-Bissau\", \"d_code\" => \"+245\");\n $countries[] = array(\"code\" => \"GY\", \"name\" => \"Guyana\", \"d_code\" => \"+592\");\n $countries[] = array(\"code\" => \"HT\", \"name\" => \"Haiti\", \"d_code\" => \"+509\");\n $countries[] = array(\"code\" => \"HN\", \"name\" => \"Honduras\", \"d_code\" => \"+504\");\n $countries[] = array(\"code\" => \"HK\", \"name\" => \"Hong Kong\", \"d_code\" => \"+852\");\n $countries[] = array(\"code\" => \"HU\", \"name\" => \"Hungary\", \"d_code\" => \"+36\");\n $countries[] = array(\"code\" => \"IS\", \"name\" => \"Iceland\", \"d_code\" => \"+354\");\n $countries[] = array(\"code\" => \"IN\", \"name\" => \"India\", \"d_code\" => \"+91\");\n $countries[] = array(\"code\" => \"ID\", \"name\" => \"Indonesia\", \"d_code\" => \"+62\");\n $countries[] = array(\"code\" => \"IR\", \"name\" => \"Iran\", \"d_code\" => \"+98\");\n $countries[] = array(\"code\" => \"IQ\", \"name\" => \"Iraq\", \"d_code\" => \"+964\");\n $countries[] = array(\"code\" => \"IE\", \"name\" => \"Ireland\", \"d_code\" => \"+353\");\n $countries[] = array(\"code\" => \"IL\", \"name\" => \"Israel\", \"d_code\" => \"+972\");\n $countries[] = array(\"code\" => \"IT\", \"name\" => \"Italy\", \"d_code\" => \"+39\");\n $countries[] = array(\"code\" => \"JM\", \"name\" => \"Jamaica\", \"d_code\" => \"+1\");\n $countries[] = array(\"code\" => \"JP\", \"name\" => \"Japan\", \"d_code\" => \"+81\");\n $countries[] = array(\"code\" => \"JO\", \"name\" => \"Jordan\", \"d_code\" => \"+962\");\n $countries[] = array(\"code\" => \"KZ\", \"name\" => \"Kazakhstan\", \"d_code\" => \"+7\");\n $countries[] = array(\"code\" => \"KE\", \"name\" => \"Kenya\", \"d_code\" => \"+254\");\n $countries[] = array(\"code\" => \"KI\", \"name\" => \"Kiribati\", \"d_code\" => \"+686\");\n $countries[] = array(\"code\" => \"XK\", \"name\" => \"Kosovo\", \"d_code\" => \"+381\");\n $countries[] = array(\"code\" => \"KW\", \"name\" => \"Kuwait\", \"d_code\" => \"+965\");\n $countries[] = array(\"code\" => \"KG\", \"name\" => \"Kyrgyzstan\", \"d_code\" => \"+996\");\n $countries[] = array(\"code\" => \"LA\", \"name\" => \"Laos\", \"d_code\" => \"+856\");\n $countries[] = array(\"code\" => \"LV\", \"name\" => \"Latvia\", \"d_code\" => \"+371\");\n $countries[] = array(\"code\" => \"LB\", \"name\" => \"Lebanon\", \"d_code\" => \"+961\");\n $countries[] = array(\"code\" => \"LS\", \"name\" => \"Lesotho\", \"d_code\" => \"+266\");\n $countries[] = array(\"code\" => \"LR\", \"name\" => \"Liberia\", \"d_code\" => \"+231\");\n $countries[] = array(\"code\" => \"LY\", \"name\" => \"Libya\", \"d_code\" => \"+218\");\n $countries[] = array(\"code\" => \"LI\", \"name\" => \"Liechtenstein\", \"d_code\" => \"+423\");\n $countries[] = array(\"code\" => \"LT\", \"name\" => \"Lithuania\", \"d_code\" => \"+370\");\n $countries[] = array(\"code\" => \"LU\", \"name\" => \"Luxembourg\", \"d_code\" => \"+352\");\n $countries[] = array(\"code\" => \"MO\", \"name\" => \"Macau\", \"d_code\" => \"+853\");\n $countries[] = array(\"code\" => \"MK\", \"name\" => \"Macedonia\", \"d_code\" => \"+389\");\n $countries[] = array(\"code\" => \"MG\", \"name\" => \"Madagascar\", \"d_code\" => \"+261\");\n $countries[] = array(\"code\" => \"MW\", \"name\" => \"Malawi\", \"d_code\" => \"+265\");\n $countries[] = array(\"code\" => \"MY\", \"name\" => \"Malaysia\", \"d_code\" => \"+60\");\n $countries[] = array(\"code\" => \"MV\", \"name\" => \"Maldives\", \"d_code\" => \"+960\");\n $countries[] = array(\"code\" => \"ML\", \"name\" => \"Mali\", \"d_code\" => \"+223\");\n $countries[] = array(\"code\" => \"MT\", \"name\" => \"Malta\", \"d_code\" => \"+356\");\n $countries[] = array(\"code\" => \"MH\", \"name\" => \"Marshall Islands\", \"d_code\" => \"+692\");\n $countries[] = array(\"code\" => \"MQ\", \"name\" => \"Martinique\", \"d_code\" => \"+596\");\n $countries[] = array(\"code\" => \"MR\", \"name\" => \"Mauritania\", \"d_code\" => \"+222\");\n $countries[] = array(\"code\" => \"MU\", \"name\" => \"Mauritius\", \"d_code\" => \"+230\");\n $countries[] = array(\"code\" => \"YT\", \"name\" => \"Mayotte\", \"d_code\" => \"+262\");\n $countries[] = array(\"code\" => \"MX\", \"name\" => \"Mexico\", \"d_code\" => \"+52\");\n $countries[] = array(\"code\" => \"MD\", \"name\" => \"Moldova\", \"d_code\" => \"+373\");\n $countries[] = array(\"code\" => \"MC\", \"name\" => \"Monaco\", \"d_code\" => \"+377\");\n $countries[] = array(\"code\" => \"MN\", \"name\" => \"Mongolia\", \"d_code\" => \"+976\");\n $countries[] = array(\"code\" => \"ME\", \"name\" => \"Montenegro\", \"d_code\" => \"+382\");\n $countries[] = array(\"code\" => \"MS\", \"name\" => \"Montserrat\", \"d_code\" => \"+1\");\n $countries[] = array(\"code\" => \"MA\", \"name\" => \"Morocco\", \"d_code\" => \"+212\");\n $countries[] = array(\"code\" => \"MZ\", \"name\" => \"Mozambique\", \"d_code\" => \"+258\");\n $countries[] = array(\"code\" => \"NA\", \"name\" => \"Namibia\", \"d_code\" => \"+264\");\n $countries[] = array(\"code\" => \"NR\", \"name\" => \"Nauru\", \"d_code\" => \"+674\");\n $countries[] = array(\"code\" => \"NP\", \"name\" => \"Nepal\", \"d_code\" => \"+977\");\n $countries[] = array(\"code\" => \"NL\", \"name\" => \"Netherlands\", \"d_code\" => \"+31\");\n $countries[] = array(\"code\" => \"AN\", \"name\" => \"Netherlands Antilles\", \"d_code\" => \"+599\");\n $countries[] = array(\"code\" => \"NC\", \"name\" => \"New Caledonia\", \"d_code\" => \"+687\");\n $countries[] = array(\"code\" => \"NZ\", \"name\" => \"New Zealand\", \"d_code\" => \"+64\");\n $countries[] = array(\"code\" => \"NI\", \"name\" => \"Nicaragua\", \"d_code\" => \"+505\");\n $countries[] = array(\"code\" => \"NE\", \"name\" => \"Niger\", \"d_code\" => \"+227\");\n $countries[] = array(\"code\" => \"NG\", \"name\" => \"Nigeria\", \"d_code\" => \"+234\");\n $countries[] = array(\"code\" => \"NU\", \"name\" => \"Niue\", \"d_code\" => \"+683\");\n $countries[] = array(\"code\" => \"NF\", \"name\" => \"Norfolk Island\", \"d_code\" => \"+672\");\n $countries[] = array(\"code\" => \"KP\", \"name\" => \"North Korea\", \"d_code\" => \"+850\");\n $countries[] = array(\"code\" => \"MP\", \"name\" => \"Northern Mariana Islands\", \"d_code\" => \"+1\");\n $countries[] = array(\"code\" => \"NO\", \"name\" => \"Norway\", \"d_code\" => \"+47\");\n $countries[] = array(\"code\" => \"OM\", \"name\" => \"Oman\", \"d_code\" => \"+968\");\n $countries[] = array(\"code\" => \"PK\", \"name\" => \"Pakistan\", \"d_code\" => \"+92\");\n $countries[] = array(\"code\" => \"PW\", \"name\" => \"Palau\", \"d_code\" => \"+680\");\n $countries[] = array(\"code\" => \"PS\", \"name\" => \"Palestine\", \"d_code\" => \"+970\");\n $countries[] = array(\"code\" => \"PA\", \"name\" => \"Panama\", \"d_code\" => \"+507\");\n $countries[] = array(\"code\" => \"PG\", \"name\" => \"Papua New Guinea\", \"d_code\" => \"+675\");\n $countries[] = array(\"code\" => \"PY\", \"name\" => \"Paraguay\", \"d_code\" => \"+595\");\n $countries[] = array(\"code\" => \"PE\", \"name\" => \"Peru\", \"d_code\" => \"+51\");\n $countries[] = array(\"code\" => \"PH\", \"name\" => \"Philippines\", \"d_code\" => \"+63\");\n $countries[] = array(\"code\" => \"PL\", \"name\" => \"Poland\", \"d_code\" => \"+48\");\n $countries[] = array(\"code\" => \"PT\", \"name\" => \"Portugal\", \"d_code\" => \"+351\");\n $countries[] = array(\"code\" => \"PR\", \"name\" => \"Puerto Rico\", \"d_code\" => \"+1\");\n $countries[] = array(\"code\" => \"QA\", \"name\" => \"Qatar\", \"d_code\" => \"+974\");\n $countries[] = array(\"code\" => \"CG\", \"name\" => \"Republic of the Congo\", \"d_code\" => \"+242\");\n $countries[] = array(\"code\" => \"RE\", \"name\" => \"Réunion\", \"d_code\" => \"+262\");\n $countries[] = array(\"code\" => \"RO\", \"name\" => \"Romania\", \"d_code\" => \"+40\");\n $countries[] = array(\"code\" => \"RU\", \"name\" => \"Russia\", \"d_code\" => \"+7\");\n $countries[] = array(\"code\" => \"RW\", \"name\" => \"Rwanda\", \"d_code\" => \"+250\");\n $countries[] = array(\"code\" => \"BL\", \"name\" => \"Saint Barthélemy\", \"d_code\" => \"+590\");\n $countries[] = array(\"code\" => \"SH\", \"name\" => \"Saint Helena\", \"d_code\" => \"+290\");\n $countries[] = array(\"code\" => \"KN\", \"name\" => \"Saint Kitts and Nevis\", \"d_code\" => \"+1\");\n $countries[] = array(\"code\" => \"MF\", \"name\" => \"Saint Martin\", \"d_code\" => \"+590\");\n $countries[] = array(\"code\" => \"PM\", \"name\" => \"Saint Pierre and Miquelon\", \"d_code\" => \"+508\");\n $countries[] = array(\"code\" => \"VC\", \"name\" => \"Saint Vincent and the Grenadines\", \"d_code\" => \"+1\");\n $countries[] = array(\"code\" => \"WS\", \"name\" => \"Samoa\", \"d_code\" => \"+685\");\n $countries[] = array(\"code\" => \"SM\", \"name\" => \"San Marino\", \"d_code\" => \"+378\");\n $countries[] = array(\"code\" => \"ST\", \"name\" => \"São Tomé and Príncipe\", \"d_code\" => \"+239\");\n $countries[] = array(\"code\" => \"SA\", \"name\" => \"Saudi Arabia\", \"d_code\" => \"+966\");\n $countries[] = array(\"code\" => \"SN\", \"name\" => \"Senegal\", \"d_code\" => \"+221\");\n $countries[] = array(\"code\" => \"RS\", \"name\" => \"Serbia\", \"d_code\" => \"+381\");\n $countries[] = array(\"code\" => \"SC\", \"name\" => \"Seychelles\", \"d_code\" => \"+248\");\n $countries[] = array(\"code\" => \"SL\", \"name\" => \"Sierra Leone\", \"d_code\" => \"+232\");\n $countries[] = array(\"code\" => \"SG\", \"name\" => \"Singapore\", \"d_code\" => \"+65\");\n $countries[] = array(\"code\" => \"SK\", \"name\" => \"Slovakia\", \"d_code\" => \"+421\");\n $countries[] = array(\"code\" => \"SI\", \"name\" => \"Slovenia\", \"d_code\" => \"+386\");\n $countries[] = array(\"code\" => \"SB\", \"name\" => \"Solomon Islands\", \"d_code\" => \"+677\");\n $countries[] = array(\"code\" => \"SO\", \"name\" => \"Somalia\", \"d_code\" => \"+252\");\n $countries[] = array(\"code\" => \"ZA\", \"name\" => \"South Africa\", \"d_code\" => \"+27\");\n $countries[] = array(\"code\" => \"KR\", \"name\" => \"South Korea\", \"d_code\" => \"+82\");\n $countries[] = array(\"code\" => \"ES\", \"name\" => \"Spain\", \"d_code\" => \"+34\");\n $countries[] = array(\"code\" => \"LK\", \"name\" => \"Sri Lanka\", \"d_code\" => \"+94\");\n $countries[] = array(\"code\" => \"LC\", \"name\" => \"St. Lucia\", \"d_code\" => \"+1\");\n $countries[] = array(\"code\" => \"SD\", \"name\" => \"Sudan\", \"d_code\" => \"+249\");\n $countries[] = array(\"code\" => \"SR\", \"name\" => \"Suriname\", \"d_code\" => \"+597\");\n $countries[] = array(\"code\" => \"SZ\", \"name\" => \"Swaziland\", \"d_code\" => \"+268\");\n $countries[] = array(\"code\" => \"SE\", \"name\" => \"Sweden\", \"d_code\" => \"+46\");\n $countries[] = array(\"code\" => \"CH\", \"name\" => \"Switzerland\", \"d_code\" => \"+41\");\n $countries[] = array(\"code\" => \"SY\", \"name\" => \"Syria\", \"d_code\" => \"+963\");\n $countries[] = array(\"code\" => \"TW\", \"name\" => \"Taiwan\", \"d_code\" => \"+886\");\n $countries[] = array(\"code\" => \"TJ\", \"name\" => \"Tajikistan\", \"d_code\" => \"+992\");\n $countries[] = array(\"code\" => \"TZ\", \"name\" => \"Tanzania\", \"d_code\" => \"+255\");\n $countries[] = array(\"code\" => \"TH\", \"name\" => \"Thailand\", \"d_code\" => \"+66\");\n $countries[] = array(\"code\" => \"BS\", \"name\" => \"The Bahamas\", \"d_code\" => \"+1\");\n $countries[] = array(\"code\" => \"GM\", \"name\" => \"The Gambia\", \"d_code\" => \"+220\");\n $countries[] = array(\"code\" => \"TL\", \"name\" => \"Timor-Leste\", \"d_code\" => \"+670\");\n $countries[] = array(\"code\" => \"TG\", \"name\" => \"Togo\", \"d_code\" => \"+228\");\n $countries[] = array(\"code\" => \"TK\", \"name\" => \"Tokelau\", \"d_code\" => \"+690\");\n $countries[] = array(\"code\" => \"TO\", \"name\" => \"Tonga\", \"d_code\" => \"+676\");\n $countries[] = array(\"code\" => \"TT\", \"name\" => \"Trinidad and Tobago\", \"d_code\" => \"+1\");\n $countries[] = array(\"code\" => \"TN\", \"name\" => \"Tunisia\", \"d_code\" => \"+216\");\n $countries[] = array(\"code\" => \"TR\", \"name\" => \"Turkey\", \"d_code\" => \"+90\");\n $countries[] = array(\"code\" => \"TM\", \"name\" => \"Turkmenistan\", \"d_code\" => \"+993\");\n $countries[] = array(\"code\" => \"TC\", \"name\" => \"Turks and Caicos Islands\", \"d_code\" => \"+1\");\n $countries[] = array(\"code\" => \"TV\", \"name\" => \"Tuvalu\", \"d_code\" => \"+688\");\n $countries[] = array(\"code\" => \"UG\", \"name\" => \"Uganda\", \"d_code\" => \"+256\");\n $countries[] = array(\"code\" => \"UA\", \"name\" => \"Ukraine\", \"d_code\" => \"+380\");\n $countries[] = array(\"code\" => \"AE\", \"name\" => \"United Arab Emirates\", \"d_code\" => \"+971\");\n $countries[] = array(\"code\" => \"GB\", \"name\" => \"United Kingdom\", \"d_code\" => \"+44\");\n $countries[] = array(\"code\" => \"US\", \"name\" => \"United States\", \"d_code\" => \"+1\");\n $countries[] = array(\"code\" => \"UY\", \"name\" => \"Uruguay\", \"d_code\" => \"+598\");\n $countries[] = array(\"code\" => \"VI\", \"name\" => \"US Virgin Islands\", \"d_code\" => \"+1\");\n $countries[] = array(\"code\" => \"UZ\", \"name\" => \"Uzbekistan\", \"d_code\" => \"+998\");\n $countries[] = array(\"code\" => \"VU\", \"name\" => \"Vanuatu\", \"d_code\" => \"+678\");\n $countries[] = array(\"code\" => \"VA\", \"name\" => \"Vatican City\", \"d_code\" => \"+39\");\n $countries[] = array(\"code\" => \"VE\", \"name\" => \"Venezuela\", \"d_code\" => \"+58\");\n $countries[] = array(\"code\" => \"VN\", \"name\" => \"Vietnam\", \"d_code\" => \"+84\");\n $countries[] = array(\"code\" => \"WF\", \"name\" => \"Wallis and Futuna\", \"d_code\" => \"+681\");\n $countries[] = array(\"code\" => \"YE\", \"name\" => \"Yemen\", \"d_code\" => \"+967\");\n $countries[] = array(\"code\" => \"ZM\", \"name\" => \"Zambia\", \"d_code\" => \"+260\");\n $countries[] = array(\"code\" => \"ZW\", \"name\" => \"Zimbabwe\", \"d_code\" => \"+263\");\n for ($i = 0; $i < count($countries); $i++) {\n echo \"<option value='\" . $countries[$i][\"d_code\"] . \"|\" . $countries[$i][\"name\"] . \"'>\" . $countries[$i][\"name\"] . \"</option>\";\n }\n }", "title": "" }, { "docid": "21c626686c72ad0a64ddbb6ed60c87e5", "score": "0.71295965", "text": "public function getCountries() {\n \n $timer = Debug::GetTimer();\n \n $mckey = \"railpage:locations.countries\";\n \n if ($return = $this->Memcached->fetch($mckey)) {\n // Do nothing\n } else {\n $return = array(); \n \n foreach ($this->db->fetchAll(\"SELECT DISTINCT country FROM location ORDER BY country\") as $row) {\n $return[] = $row['country']; \n } \n \n $this->Memcached->save($mckey, $return, strtotime(\"+1 day\"));\n }\n \n Debug::LogEvent(__METHOD__, $timer);\n \n return $return;\n }", "title": "" }, { "docid": "7b7728fb603b06d2834d802f290a17f0", "score": "0.7110252", "text": "public function list_all_countries_110(){\n $countries = DB::table('m_admin_currency_code_country')\n ->select('country_code as ccode','country as cname')\n ->whereNotNull('country_code') \n ->get();\n\n return $countries; \n }", "title": "" }, { "docid": "a13ba3ff8e89f44e2b1bb06cfdde9610", "score": "0.71077764", "text": "public function getCountrylist()\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from('tbl_country');\n\t\t$this->db->where('country_status', '1');\n\t\t$query = $this->db->get();\n\t\treturn $query->result() ;\n\t}", "title": "" }, { "docid": "e328e7570303f61fb8d7019851dc662a", "score": "0.70630187", "text": "function get_countries_list() {\n $countries = array(\n\t\t'Afghanistan'=>'Afghanistan',\n\t\t'Åland Islands'=>'Åland Islands',\n\t\t'Albania'=>'Albania',\n\t\t'Algeria'=>'Algeria',\n\t\t'American Samoa'=>'American Samoa',\n\t\t'Andorra'=>'Andorra',\n\t\t'Angola'=>'Angola',\n\t\t'Anguilla'=>'Anguilla',\n\t\t'Antarctica'=>'Antarctica',\n\t\t'Antigua and Barbuda'=>'Antigua and Barbuda',\n\t\t'Argentina'=>'Argentina',\n\t\t'Armenia'=>'Armenia',\n\t\t'Aruba'=>'Aruba',\n\t\t'Australia'=>'Australia',\n\t\t'Austria'=>'Austria',\n\t\t'Azerbaijan'=>'Azerbaijan',\n\t\t'Bahamas'=>'Bahamas',\n\t\t'Bahrain'=>'Bahrain',\n\t\t'Bangladesh'=>'Bangladesh',\n\t\t'Barbados'=>'Barbados',\n\t\t'Belarus'=>'Belarus',\n\t\t'Belgium'=>'Belgium',\n\t\t'Belize'=>'Belize',\n\t\t'Benin'=>'Benin',\n\t\t'Bermuda'=>'Bermuda',\n\t\t'Bhutan'=>'Bhutan',\n\t\t'Bolivia'=>'Bolivia',\n\t\t'Bosnia and Herzegovina'=>'Bosnia and Herzegovina',\n\t\t'Botswana'=>'Botswana',\n\t\t'Bouvet Island'=>'Bouvet Island',\n\t\t'Brazil'=>'Brazil',\n\t\t'British Indian Ocean Territory'=>'British Indian Ocean Territory',\n\t\t'Brunei Darussalam'=>'Brunei Darussalam',\n\t\t'Bulgaria'=>'Bulgaria',\n\t\t'Burkina Faso'=>'Burkina Faso',\n\t\t'Burundi'=>'Burundi',\n\t\t'Cambodia'=>'Cambodia',\n\t\t'Cameroon'=>'Cameroon',\n\t\t'Canada'=>'Canada',\n\t\t'Cape Verde'=>'Cape Verde',\n\t\t'Cayman Islands'=>'Cayman Islands',\n\t\t'Central African Republic'=>'Central African Republic',\n\t\t'Chad'=>'Chad',\n\t\t'Chile'=>'Chile',\n\t\t'China'=>'China',\n\t\t'Christmas Island'=>'Christmas Island',\n\t\t'Cocos (Keeling) Islands'=>'Cocos (Keeling) Islands',\n\t\t'Colombia'=>'Colombia',\n\t\t'Comoros'=>'Comoros',\n\t\t'Congo'=>'Congo',\n\t\t'Congo The Democratic Republic of The'=>'Congo The Democratic Republic of The',\n\t\t'Cook Islands'=>'Cook Islands',\n\t\t'Costa Rica'=>'Costa Rica',\n\t\t'Cote D\\'ivoire'=>'Cote D\\'ivoire',\n\t\t'Croatia'=>'Croatia',\n\t\t'Cuba'=>'Cuba',\n\t\t'Cyprus'=>'Cyprus',\n\t\t'Czech Republic'=>'Czech Republic',\n\t\t'Denmark'=>'Denmark',\n\t\t'Djibouti'=>'Djibouti',\n\t\t'Dominica'=>'Dominica',\n\t\t'Dominican Republic'=>'Dominican Republic',\n\t\t'Ecuador'=>'Ecuador',\n\t\t'Egypt'=>'Egypt',\n\t\t'El Salvador'=>'El Salvador',\n\t\t'Equatorial Guinea'=>'Equatorial Guinea',\n\t\t'Eritrea'=>'Eritrea',\n\t\t'Estonia'=>'Estonia',\n\t\t'Ethiopia'=>'Ethiopia',\n\t\t'Falkland Islands (Malvinas)'=>'Falkland Islands (Malvinas)',\n\t\t'Faroe Islands'=>'Faroe Islands',\n\t\t'Fiji'=>'Fiji',\n\t\t'Finland'=>'Finland',\n\t\t'France'=>'France',\n\t\t'French Guiana'=>'French Guiana',\n\t\t'French Polynesia'=>'French Polynesia',\n\t\t'French Southern Territories'=>'French Southern Territories',\n\t\t'Gabon'=>'Gabon',\n\t\t'Gambia'=>'Gambia',\n\t\t'Georgia'=>'Georgia',\n\t\t'Germany'=>'Germany',\n\t\t'Ghana'=>'Ghana',\n\t\t'Gibraltar'=>'Gibraltar',\n\t\t'Greece'=>'Greece',\n\t\t'Greenland'=>'Greenland',\n\t\t'Grenada'=>'Grenada',\n\t\t'Guadeloupe'=>'Guadeloupe',\n\t\t'Guam'=>'Guam',\n\t\t'Guatemala'=>'Guatemala',\n\t\t'Guernsey'=>'Guernsey',\n\t\t'Guinea'=>'Guinea',\n\t\t'Guinea-bissau'=>'Guinea-bissau',\n\t\t'Guyana'=>'Guyana',\n\t\t'Haiti'=>'Haiti',\n\t\t'Heard Island and Mcdonald Islands'=>'Heard Island and Mcdonald Islands',\n\t\t'Holy See (Vatican City State)'=>'Holy See (Vatican City State)',\n\t\t'Honduras'=>'Honduras',\n\t\t'Hong Kong'=>'Hong Kong',\n\t\t'Hungary'=>'Hungary',\n\t\t'Iceland'=>'Iceland',\n\t\t'India'=>'India',\n\t\t'Indonesia'=>'Indonesia',\n\t\t'Iran Islamic Republic of'=>'Iran Islamic Republic of',\n\t\t'Iraq'=>'Iraq',\n\t\t'Ireland'=>'Ireland',\n\t\t'Isle of Man'=>'Isle of Man',\n\t\t'Israel'=>'Israel',\n\t\t'Italy'=>'Italy',\n\t\t'Jamaica'=>'Jamaica',\n\t\t'Japan'=>'Japan',\n\t\t'Jersey'=>'Jersey',\n\t\t'Jordan'=>'Jordan',\n\t\t'Kazakhstan'=>'Kazakhstan',\n\t\t'Kenya'=>'Kenya',\n\t\t'Kiribati'=>'Kiribati',\n\t\t'Korea Democratic People\\'s Republic of'=>'Korea Democratic People\\'s Republic of',\n\t\t'Korea Republic of'=>'Korea Republic of',\n\t\t'Kuwait'=>'Kuwait',\n\t\t'Kyrgyzstan'=>'Kyrgyzstan',\n\t\t'Lao People\\'s Democratic Republic'=>'Lao People\\'s Democratic Republic',\n\t\t'Latvia'=>'Latvia',\n\t\t'Lebanon'=>'Lebanon',\n\t\t'Lesotho'=>'Lesotho',\n\t\t'Liberia'=>'Liberia',\n\t\t'Libyan Arab Jamahiriya'=>'Libyan Arab Jamahiriya',\n\t\t'Liechtenstein'=>'Liechtenstein',\n\t\t'Lithuania'=>'Lithuania',\n\t\t'Luxembourg'=>'Luxembourg',\n\t\t'Macao'=>'Macao',\n\t\t'Macedonia The Former Yugoslav Republic of'=>'Macedonia The Former Yugoslav Republic of',\n\t\t'Madagascar'=>'Madagascar',\n\t\t'Malawi'=>'Malawi',\n\t\t'Malaysia'=>'Malaysia',\n\t\t'Maldives'=>'Maldives',\n\t\t'Mali'=>'Mali',\n\t\t'Malta'=>'Malta',\n\t\t'Marshall Islands'=>'Marshall Islands',\n\t\t'Martinique'=>'Martinique',\n\t\t'Mauritania'=>'Mauritania',\n\t\t'Mauritius'=>'Mauritius',\n\t\t'Mayotte'=>'Mayotte',\n\t\t'Mexico'=>'Mexico',\n\t\t'Micronesia Federated States of'=>'Micronesia Federated States of',\n\t\t'Moldova Republic of'=>'Moldova Republic of',\n\t\t'Monaco'=>'Monaco',\n\t\t'Mongolia'=>'Mongolia',\n\t\t'Montenegro'=>'Montenegro',\n\t\t'Montserrat'=>'Montserrat',\n\t\t'Morocco'=>'Morocco',\n\t\t'Mozambique'=>'Mozambique',\n\t\t'Myanmar'=>'Myanmar',\n\t\t'Namibia'=>'Namibia',\n\t\t'Nauru'=>'Nauru',\n\t\t'Nepal'=>'Nepal',\n\t\t'Netherlands'=>'Netherlands',\n\t\t'Netherlands Antilles'=>'Netherlands Antilles',\n\t\t'New Caledonia'=>'New Caledonia',\n\t\t'New Zealand'=>'New Zealand',\n\t\t'Nicaragua'=>'Nicaragua',\n\t\t'Niger'=>'Niger',\n\t\t'Nigeria'=>'Nigeria',\n\t\t'Niue'=>'Niue',\n\t\t'Norfolk Island'=>'Norfolk Island',\n\t\t'Northern Mariana Islands'=>'Northern Mariana Islands',\n\t\t'Norway'=>'Norway',\n\t\t'Oman'=>'Oman',\n\t\t'Pakistan'=>'Pakistan',\n\t\t'Palau'=>'Palau',\n\t\t'Palestinian Territory Occupied'=>'Palestinian Territory Occupied',\n\t\t'Panama'=>'Panama',\n\t\t'Papua New Guinea'=>'Papua New Guinea',\n\t\t'Paraguay'=>'Paraguay',\n\t\t'Peru'=>'Peru',\n\t\t'Philippines'=>'Philippines',\n\t\t'Pitcairn'=>'Pitcairn',\n\t\t'Poland'=>'Poland',\n\t\t'Portugal'=>'Portugal',\n\t\t'Puerto Rico'=>'Puerto Rico',\n\t\t'Qatar'=>'Qatar',\n\t\t'Reunion'=>'Reunion',\n\t\t'Romania'=>'Romania',\n\t\t'Russian Federation'=>'Russian Federation',\n\t\t'Rwanda'=>'Rwanda',\n\t\t'Saint Helena'=>'Saint Helena',\n\t\t'Saint Kitts and Nevis'=>'Saint Kitts and Nevis',\n\t\t'Saint Lucia'=>'Saint Lucia',\n\t\t'Saint Pierre and Miquelon'=>'Saint Pierre and Miquelon',\n\t\t'Saint Vincent and The Grenadines'=>'Saint Vincent and The Grenadines',\n\t\t'Samoa'=>'Samoa',\n\t\t'San Marino'=>'San Marino',\n\t\t'Sao Tome and Princip'=>'Sao Tome and Principe',\n\t\t'Saudi Arabi'=>'Saudi Arabia',\n\t\t'Senegal'=>'Senegal',\n\t\t'Serbia'=>'Serbia',\n\t\t'Seychelles'=>'Seychelles',\n\t\t'Sierra Leone'=>'Sierra Leone',\n\t\t'Singapore'=>'Singapore',\n\t\t'Slovakia'=>'Slovakia',\n\t\t'Slovenia'=>'Slovenia',\n\t\t'Solomon Islands'=>'Solomon Islands',\n\t\t'Somalia'=>'Somalia',\n\t\t'South Africa'=>'South Africa',\n\t\t'South Georgia and The South Sandwich Islands'=>'South Georgia and The South Sandwich Islands',\n\t\t'Spain'=>'Spain',\n\t\t'Sri Lanka'=>'Sri Lanka',\n\t\t'Sudan'=>'Sudan',\n\t\t'Suriname'=>'Suriname',\n\t\t'Svalbard and Jan Mayen'=>'Svalbard and Jan Mayen',\n\t\t'Swaziland'=>'Swaziland',\n\t\t'Sweden'=>'Sweden',\n\t\t'Switzerland'=>'Switzerland',\n\t\t'Syrian Arab Republic'=>'Syrian Arab Republic',\n\t\t'Taiwan Province of China'=>'Taiwan Province of China',\n\t\t'Tajikistan'=>'Tajikistan',\n\t\t'Tanzania United Republic of'=>'Tanzania United Republic of',\n\t\t'Thailand'=>'Thailand',\n\t\t'Timor-leste'=>'Timor-leste',\n\t\t'Togo'=>'Togo',\n\t\t'Tokelau'=>'Tokelau',\n\t\t'Tonga'=>'Tonga',\n\t\t'Trinidad and Tobago'=>'Trinidad and Tobago',\n\t\t'Tunisia'=>'Tunisia',\n\t\t'Turkey'=>'Turkey',\n\t\t'Turkmenistan'=>'Turkmenistan',\n\t\t'Turks and Caicos Islands'=>'Turks and Caicos Islands',\n\t\t'Tuvalu'=>'Tuvalu',\n\t\t'Uganda'=>'Uganda',\n\t\t'Ukraine'=>'Ukraine',\n\t\t'United Arab Emirates'=>'United Arab Emirates',\n\t\t'United Kingdom'=>'United Kingdom',\n\t\t'United States'=>'United States',\n\t\t'United States Minor Outlying Islands'=>'United States Minor Outlying Islands',\n\t\t'Uruguay'=>'Uruguay',\n\t\t'Uzbekistan'=>'Uzbekistan',\n\t\t'Vanuatu'=>'Vanuatu',\n\t\t'Venezuela'=>'Venezuela',\n\t\t'Viet Nam'=>'Viet Nam',\n\t\t'Virgin Islands British'=>'Virgin Islands British',\n\t\t'Virgin Islands U.S.'=>'Virgin Islands U.S.',\n\t\t'Wallis and Futuna'=>'Wallis and Futuna',\n\t\t'Western Sahar'=>'Western Sahara',\n\t\t'Yemen'=>'Yemen',\n\t\t'Zambia'=>'Zambia',\n\t\t'Zimbabwe'=>'Zimbabwe',\t\t\n );\n \n return $countries;\n}", "title": "" }, { "docid": "c4abacd07d35e075f403d4d4da1ab56b", "score": "0.70618784", "text": "function countries() {\n\n\t\tif(!session()->value(\"countries\")) {\n\n\t\t\t$query = new Query();\n\t\t\t$query->sql(\"SELECT * FROM \".UT_COUNTRIES);\n\t\t\tsession()->value(\"countries\", $query->results());\n\t\t}\n\t\treturn session()->value(\"countries\");\n\t}", "title": "" }, { "docid": "8a88d38327ddb54d0a0a69afb21d786c", "score": "0.7056274", "text": "public static function getCountries() {\n \n $conn = Database::getDB();\n\n $qy = \"SELECT countryName FROM tbl_country;\";\n\n $cds = $conn->query($qy);\n $count = $conn->exec($qy);\n echo \"rows selected :\" . $count;\n \n $country = array();\n foreach ($cds as $cd) {\n\n $country[] = $cd;\n }\n \n return $country;\n \n }", "title": "" }, { "docid": "fd829325f203c52b07dbc7e88c92ee72", "score": "0.703418", "text": "public static function ListCountries($country)\n\t{\n\t\treturn DataObject::get('Country','','Name');\n\t}", "title": "" }, { "docid": "4655de021957feabd1c831a704f44c56", "score": "0.70272875", "text": "public function getAllCountries() {\n if (_isCurl()) {\n $params = array(\n \"a\" => \"getLocations\",\n \"apiKey\" => APPTIVO_BUSINESS_API_KEY,\n \"accessKey\" => APPTIVO_BUSINESS_ACCESS_KEY\n );\n $response = getRestAPICall(\"POST\", APPTIVO_SIGNUP_API, $params);\n } else {\n $params = array(\n \"arg0\" => APPTIVO_BUSINESS_API_KEY,\n \"arg1\" => APPTIVO_BUSINESS_ACCESS_KEY\n );\n $response = getsoapCall(APPTIVO_BUSINESS_SERVICES, 'getAllCountries', $params);\n $response = $response->return;\n }\n return $response;\n }", "title": "" }, { "docid": "c1af523805c59ec49218cebd4b2365f7", "score": "0.6994025", "text": "function getCountries(){\n\t\t\t global $db;\n\t\n\t\t\t $sqlQuery = $this->am_createSelectAllQuery($this->countryTblName,'1=1','name');\n\n\t\t\t $resultCountry = $db->execute($sqlQuery); \t\t\t\t\t \n\t\t\t return $resultCountry;\n\n\t\t}", "title": "" }, { "docid": "102c65a19f7eb73b00b676f78b5d90ac", "score": "0.69768465", "text": "function getCountyList()\n {\n\n $out = DB::select(\"select * from country_master where id in ('101')\");\n\n return json_decode(json_encode($out), true);\n }", "title": "" }, { "docid": "87f1407edef21c369d0be61490c73ee1", "score": "0.69746405", "text": "public function get_countries()\n {\n $sql = \"SELECT * FROM countries \";\n $res = $this->db->query($sql);\n\n return $res->result_array();\n }", "title": "" }, { "docid": "5ea71e5ac164f12f083969b23ca6c7ce", "score": "0.69699746", "text": "public static function getCountryList()\n\t{\n\t\t$em = \\Zend_Registry::get('em');\n\t\t$qb_1 = $em->createQueryBuilder();\n\t\t$q_1 = $qb_1->select('cf')\n\t\t->from('\\Entities\\country_ref', 'cf')\n\t\t->where( 'cf.status = ?1' )\n\t\t->setParameter( 1, self::STATUS_ACTIVE )\n\t\t->orderBy( 'cf.name', 'ASC' );\n\t\t$result= $q_1->getQuery ()->getResult ( \\Doctrine\\ORM\\Query::HYDRATE_ARRAY );\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "df4c97cf15633f82d9e423a778fa7304", "score": "0.69389856", "text": "public function getCountryList()\n {\n return [trans(\"common.select\"), \"Afghanistan\", \"Aland Islands\", \"Albania\", \"Algeria\", \"American Samoa\", \"Andorra\", \"Angola\", \"Anguilla\", \"Antarctica\", \"Antigua\", \"Argentina\", \"Armenia\", \"Aruba\", \"Australia\", \"Austria\", \"Azerbaijan\", \"Bahamas\", \"Bahrain\", \"Bangladesh\", \"Barbados\", \"Barbuda\", \"Belarus\", \"Belgium\", \"Belize\", \"Benin\", \"Bermuda\", \"Bhutan\", \"Bolivia\", \"Bosnia\", \"Botswana\", \"Bouvet Island\", \"Brazil\", \"British Indian Ocean Trty.\", \"Brunei Darussalam\", \"Bulgaria\", \"Burkina Faso\", \"Burundi\", \"Caicos Islands\", \"Cambodia\", \"Cameroon\", \"Canada\", \"Cape Verde\", \"Cayman Islands\", \"Central African Republic\", \"Chad\", \"Chile\", \"China\", \"Christmas Island\", \"Cocos (Keeling) Islands\", \"Colombia\", \"Comoros\", \"Congo\", \"Congo, Democratic Republic of the\", \"Cook Islands\", \"Costa Rica\", \"Cote d'Ivoire\", \"Croatia\", \"Cuba\", \"Cyprus\", \"Czech Republic\", \"Denmark\", \"Djibouti\", \"Dominica\", \"Dominican Republic\", \"Ecuador\", \"Egypt\", \"El Salvador\", \"Equatorial Guinea\", \"Eritrea\", \"Estonia\", \"Ethiopia\", \"Falkland Islands (Malvinas)\", \"Faroe Islands\", \"Fiji\", \"Finland\", \"France\", \"French Guiana\", \"French Polynesia\", \"French Southern Territories\", \"Futuna Islands\", \"Gabon\", \"Gambia\", \"Georgia\", \"Germany\", \"Ghana\", \"Gibraltar\", \"Greece\", \"Greenland\", \"Grenada\", \"Guadeloupe\", \"Guam\", \"Guatemala\", \"Guernsey\", \"Guinea\", \"Guinea-Bissau\", \"Guyana\", \"Haiti\", \"Heard\", \"Herzegovina\", \"Holy See\", \"Honduras\", \"Hong Kong\", \"Hungary\", \"Iceland\", \"India\", \"Indonesia\", \"Iran (Islamic Republic of)\", \"Iraq\", \"Ireland\", \"Isle of Man\", \"Israel\", \"Italy\", \"Jamaica\", \"Jan Mayen Islands\", \"Japan\", \"Jersey\", \"Jordan\", \"Kazakhstan\", \"Kenya\", \"Kiribati\", \"Korea\", \"Korea (Democratic)\", \"Kuwait\", \"Kyrgyzstan\", \"Lao\", \"Latvia\", \"Lebanon\", \"Lesotho\", \"Liberia\", \"Libyan Arab Jamahiriya\", \"Liechtenstein\", \"Lithuania\", \"Luxembourg\", \"Macao\", \"Macedonia\", \"Madagascar\", \"Malawi\", \"Malaysia\", \"Maldives\", \"Mali\", \"Malta\", \"Marshall Islands\", \"Martinique\", \"Mauritania\", \"Mauritius\", \"Mayotte\", \"McDonald Islands\", \"Mexico\", \"Micronesia\", \"Miquelon\", \"Moldova\", \"Monaco\", \"Mongolia\", \"Montenegro\", \"Montserrat\", \"Morocco\", \"Mozambique\", \"Myanmar\", \"Namibia\", \"Nauru\", \"Nepal\", \"Netherlands\", \"Netherlands Antilles\", \"Nevis\", \"New Caledonia\", \"New Zealand\", \"Nicaragua\", \"Niger\", \"Nigeria\", \"Niue\", \"Norfolk Island\", \"Northern Mariana Islands\", \"Norway\", \"Oman\", \"Pakistan\", \"Palau\", \"Palestinian Territory, Occupied\", \"Panama\", \"Papua New Guinea\", \"Paraguay\", \"Peru\", \"Philippines\", \"Pitcairn\", \"Poland\", \"Portugal\", \"Principe\", \"Puerto Rico\", \"Qatar\", \"Reunion\", \"Romania\", \"Russian Federation\", \"Rwanda\", \"Saint Barthelemy\", \"Saint Helena\", \"Saint Kitts\", \"Saint Lucia\", \"Saint Martin (French part)\", \"Saint Pierre\", \"Saint Vincent\", \"Samoa\", \"San Marino\", \"Sao Tome\", \"Saudi Arabia\", \"Senegal\", \"Serbia\", \"Seychelles\", \"Sierra Leone\", \"Singapore\", \"Slovakia\", \"Slovenia\", \"Solomon Islands\", \"Somalia\", \"South Africa\", \"South Georgia\", \"South Sandwich Islands\", \"Spain\", \"Sri Lanka\", \"Sudan\", \"Suriname\", \"Svalbard\", \"Swaziland\", \"Sweden\", \"Switzerland\", \"Syrian Arab Republic\", \"Taiwan\", \"Tajikistan\", \"Tanzania\", \"Thailand\", \"The Grenadines\", \"Timor-Leste\", \"Tobago\", \"Togo\", \"Tokelau\", \"Tonga\", \"Trinidad\", \"Tunisia\", \"Turkey\", \"Turkmenistan\", \"Turks Islands\", \"Tuvalu\", \"Uganda\", \"Ukraine\", \"United Arab Emirates\", \"United Kingdom\", \"United States\", \"Uruguay\", \"US Minor Outlying Islands\", \"Uzbekistan\", \"Vanuatu\", \"Vatican City State\", \"Venezuela\", \"Vietnam\", \"Virgin Islands (British)\", \"Virgin Islands (US)\", \"Wallis\", \"Western Sahara\", \"Yemen\", \"Zambia\", \"Zimbabwe\"];\n }", "title": "" }, { "docid": "479dd23ce11323ad61506dec2f81c90b", "score": "0.69330233", "text": "public function getAllCountries() {\n\t\t$all_country_codes \t\t= ProjectCountry::with('OrmCountry')->get();\n\t\tforeach($all_country_codes as $all_country_code) {\n\t\t\t$data[] = '\"' . strtolower($all_country_code->OrmCountry->code) . '\"';\n\t\t}\n\t\t$all_countries = implode(\",\", $data);\t\n\t\treturn $all_countries;\t\t\n\t}", "title": "" }, { "docid": "415ce9a3ba55f561fdaf1a256b0ca2a8", "score": "0.6911521", "text": "public function getAllCountries()\n\t{\n\t\treturn $this->country->all();\n\t}", "title": "" }, { "docid": "4d2d6ef1ed41bc46ae7a11c9ea9224ce", "score": "0.6872796", "text": "public function countries()\n {\n return $this->baseResource($this->request('GET', '/country')->body);\n }", "title": "" }, { "docid": "272de003a8d9b9cf77860d6557e3fc73", "score": "0.6853746", "text": "public function getCountries()\n {\n return $this->countries;\n }", "title": "" }, { "docid": "67ba72986902bbfeeaacc57705b1b393", "score": "0.6845363", "text": "public static function getAll() {\n $result = lC_Countries_Admin::getAll();\n $result['rpcStatus'] = RPC_STATUS_SUCCESS;\n\n echo json_encode($result);\n }", "title": "" }, { "docid": "fd6e31ee7e90d04ce1cddda3a59dbb16", "score": "0.682371", "text": "public function list(): Collection\n {\n $countryNames = $this->iso->getDatabaseInstance('countries')->all();\n\n return collect($this->iso->getDatabaseInstance('countryCodes')->all())\n ->map(function ($country, $code) use ($countryNames) {\n $country['name'] = $countryNames[$code];\n return $country;\n });\n }", "title": "" }, { "docid": "7c5382503209f087635622108c638465", "score": "0.67897224", "text": "public function getAll_Countries(){\n $countries = ArrayHelper::map(Countries::find()->orderBy('name')->all(),'id', 'name');\n\n return $countries;\n }", "title": "" }, { "docid": "949083fd7900d50f9b870891488f34d1", "score": "0.6785521", "text": "public function getAllCountriesSelectList()\n\t{\n\t\treturn $this->country->lists('name','id')->toArray();\n\t}", "title": "" }, { "docid": "6f908bfac1dc456575741e3d9fc1486c", "score": "0.676427", "text": "static function countriesList()\n {\n $countries = countries();\n asort($countries);\n return $countries;\n }", "title": "" }, { "docid": "be3f0e28a130f186081754e5e2623328", "score": "0.6761031", "text": "function getCountry();", "title": "" }, { "docid": "67f96ab514366cc53f57583f9f6e9bd7", "score": "0.6745989", "text": "public static function getAll(){\n return DB::table('countries')->get();\n }", "title": "" }, { "docid": "aeb6276ffffbf6a1e497629bc940f754", "score": "0.67459244", "text": "public function getCountries() {\n $query = $this->db->query(\"SELECT `country_id`,`country` FROM `country`\");\n return $query->result();\n }", "title": "" }, { "docid": "dbeb5db5f79c18c06ee3df76986092f1", "score": "0.6745388", "text": "function tep_get_countries($default = '') {\n $countries_array = array();\n if ($default) {\n $countries_array[] = array('id' => '',\n 'text' => $default);\n }\n $countries_query = tep_db_query(\"select countries_id, countries_name from \" . TABLE_COUNTRIES . \" order by countries_name\");\n while ($countries = tep_db_fetch_array($countries_query)) {\n $countries_array[] = array('id' => $countries['countries_id'],\n 'text' => $countries['countries_name']);\n }\n\n return $countries_array;\n }", "title": "" }, { "docid": "dbeb5db5f79c18c06ee3df76986092f1", "score": "0.6745388", "text": "function tep_get_countries($default = '') {\n $countries_array = array();\n if ($default) {\n $countries_array[] = array('id' => '',\n 'text' => $default);\n }\n $countries_query = tep_db_query(\"select countries_id, countries_name from \" . TABLE_COUNTRIES . \" order by countries_name\");\n while ($countries = tep_db_fetch_array($countries_query)) {\n $countries_array[] = array('id' => $countries['countries_id'],\n 'text' => $countries['countries_name']);\n }\n\n return $countries_array;\n }", "title": "" }, { "docid": "aef3db9fa0d9c0a56a933d917cf07643", "score": "0.6741731", "text": "public function getAllCountriesColorCodes() {\n\t\t$all_country_codes \t\t= ProjectCountry::with('OrmCountry')->get();\n\t\tforeach($all_country_codes as $all_country_code) {\n\t\t\t$data[] = strtolower($all_country_code->OrmCountry->code) . \":'#32d134'\";\n\t\t}\t\n\t\t$countries = implode(\",\", $data);\t\n\t\treturn $countries;\n\t}", "title": "" }, { "docid": "2aa973d0fa8402e556bc0be299beb494", "score": "0.6736318", "text": "function statelist_get()\n {\n $country_id = $this->get('country_id');\n\n if ($country_id > 0) {\n $response = $this->commonfn->get_states_city($country_id);\n\n if ($response != \"\") {\n $this->response($response, 200);\n } else {\n //$this->response(array('error' => lang('error_try_again')), 404);\n $this->response(\"\", 404);\n }\n }\n }", "title": "" }, { "docid": "af8a0881b4efe14779735618fd5c15e4", "score": "0.6726942", "text": "public function getCountry();", "title": "" }, { "docid": "af8a0881b4efe14779735618fd5c15e4", "score": "0.6726942", "text": "public function getCountry();", "title": "" }, { "docid": "af8a0881b4efe14779735618fd5c15e4", "score": "0.6726942", "text": "public function getCountry();", "title": "" }, { "docid": "af8a0881b4efe14779735618fd5c15e4", "score": "0.6726942", "text": "public function getCountry();", "title": "" }, { "docid": "6cd18e33481533bb2d51a33f57ce3d32", "score": "0.6725719", "text": "public static function getCountries()\r\n {\r\n $db = JFactory::getDbo();\r\n $query = $db->getQuery(true);\r\n\r\n //Get all the countries from the country list.\r\n $query->select('alpha_2 AS code, lang_var AS text')\r\n\t ->from('#__odyssey_country')\r\n\t ->where('published=1');\r\n $db->setQuery($query);\r\n $countries = $db->loadAssocList();\r\n\r\n //Set text value in the proper language.\r\n foreach($countries as $key => $country) {\r\n $countries[$key]['text'] = JText::_($country['text']);\r\n }\r\n\r\n return json_encode($countries);\r\n }", "title": "" }, { "docid": "a01d092e3b7adeb84b3a31165bf17d01", "score": "0.67110217", "text": "public function getCountryTranslationList()\n {\n return $this->getLocale()->getTranslationList('territory', $this->getLocale(), 2);\n }", "title": "" }, { "docid": "36e95c7121a0e4a827e11dbf9ab94208", "score": "0.67072356", "text": "public static function getCountryList()\n {\n $locale = Core::get('locale');\n $language = $locale->getLanguage();\n \n //try lazy loading of translated country list\n if (empty(self::$_countryLists[$language])) {\n $countries = [];\n asort($countries);\n foreach($countries as $shortName => $translatedName) {\n $results[] = array(\n 'shortName' => $shortName, \n 'translatedName' => $translatedName\n );\n }\n \n self::$_countryLists[$language] = $results;\n }\n\n return array('results' => self::$_countryLists[$language]);\n }", "title": "" }, { "docid": "ce942d2ddd724b6bba9fabeade650e8a", "score": "0.66799587", "text": "public function getCountryLanguages();", "title": "" }, { "docid": "68130934e2a9d55271fc925881cf04f8", "score": "0.66795963", "text": "public function getAvailableCountries () {\n\t\treturn $this->AvailableCountries;\n\t}", "title": "" }, { "docid": "987ef1f72b78799d526aab994f2c30ed", "score": "0.6661758", "text": "public function listcountry(){ \n $sts=$this->db->prepare(\"SELECT * FROM `country`\");\n $sts->execute();\n\t\t$data=$sts->fetchAll(PDO::FETCH_ASSOC);\n return $data;\n print_r($data);\n }", "title": "" }, { "docid": "6fa3f375663875918da683e30b8957e6", "score": "0.66617525", "text": "public function countriesAction() {\r\n $countryCollection = Mage::getSingleton('directory/country')->getResourceCollection()->loadByStore();\r\n $options = $countryCollection->toOptionArray();\r\n $returnOptions = array();\r\n foreach ($options as $key => $value) {\r\n $value['value'] = trim($value['value']);\r\n $value['label'] = trim($value['label']);\r\n if (empty($value['value']) === false &&\r\n empty($value['label']) === false) {\r\n $returnOptions[] = array(\"name\" => $value['label'], \"code\" => $value['value']);\r\n } \r\n }\r\n\r\n $this->_JSONencodeAndRespond($returnOptions);\r\n }", "title": "" }, { "docid": "b98c9ee728b01e5858c0a75f5ab3dc6c", "score": "0.66508925", "text": "public function all_countries () {\r\n\t\treturn array(\r\n\t\t\t'AC'=>array('Ascension Island', 'ACI'),\r\n\t\t\t'AD'=> array('Andorra', 'AND'),\r\n\t\t\t'AE'=>array('United Arab Emirates', ''),\r\n\t\t\t'AF'=> array('Afghanistan', 'AFG'),\r\n\t\t\t'AG'=>array('Antigua and Barbuda', ''),\r\n\t\t\t'AI'=>array('Anguilla', ''),\r\n\t\t\t'AL'=>array('Albania', ''),\r\n\t\t\t'AM'=>array('Armenia', ''),\r\n\t\t\t'AN'=>array('Netherland Antilles', ''),\r\n\t\t\t'AO'=>array('Angola', ''),\r\n\t\t\t'AQ'=>array('Antarctica', ''),\r\n\t\t\t'AR'=>array('Argentina', ''),\r\n\t\t\t'AS'=>array('American Samoa', ''),\r\n\t\t\t'AT'=>array('Austria', ''),\r\n\t\t\t'AU'=>array('Australia', ''),\r\n\t\t\t'AW'=>array('Aruba', ''),\r\n\t\t\t'AZ'=>array('Azerbaidjan', ''),\r\n\t\t\t'BA'=>array('Bosnia-Herzegovina', ''),\r\n\t\t\t'BB'=>array('Barbados', ''),\r\n\t\t\t'BD'=>array('Bangladesh', ''),\r\n\t\t\t'BE'=>array('Belgium', ''),\r\n\t\t\t'BF'=>array('Burkina Faso', ''),\r\n\t\t\t'BG'=>array('Bulgaria', ''),\r\n\t\t\t'BH'=>array('Bahrain', ''),\r\n\t\t\t'BI'=>array('Burundi', ''),\r\n\t\t\t'BJ'=>array('Benin', ''),\r\n\t\t\t'BM'=>array('Bermuda', ''),\r\n\t\t\t'BN'=>array('Brunei Darussalam', ''),\r\n\t\t\t'BO'=>array('Bolivia', ''),\r\n\t\t\t'BR'=>array('Brazil', ''),\r\n\t\t\t'BS'=>array('Bahamas', ''),\r\n\t\t\t'BT'=>array('Buthan', ''),\r\n\t\t\t'BV'=>array('Bouvet Island', ''),\r\n\t\t\t'BW'=>array('Botswana', ''),\r\n\t\t\t'BY'=>array('Belarus', ''),\r\n\t\t\t'BZ'=>array('Belize', ''),\r\n\t\t\t'CA'=>array('Canada', ''),\r\n\t\t\t'CC'=>array('Cocos (Keeling) Islands', ''),\r\n\t\t\t'CD'=>array('Congo, The Democratic Republic of the', ''),\r\n\t\t\t'CF'=>array('Central African Rep.', ''),\r\n\t\t\t'CG'=>array('Congo, Republic of', ''),\r\n\t\t\t'CH'=>array('Switzerland', ''),\r\n\t\t\t'CI'=>array('Ivory Coast', ''),\r\n\t\t\t'CK'=>array('Cook Islands', ''),\r\n\t\t\t'CL'=>array('Chile', ''),\r\n\t\t\t'CM'=>array('Cameroon', ''),\r\n\t\t\t'CN'=>array('China', ''),\r\n\t\t\t'CO'=>array('Colombia', ''),\r\n\t\t\t'CR'=>array('Costa Rica', ''),\r\n\t\t\t'CS'=>array('Serbia and Montenegro', ''),\r\n\t\t\t'CU'=>array('Cuba', ''),\r\n\t\t\t'CV'=>array('Cape Verde', ''),\r\n\t\t\t'CX'=>array('Christmas Island', ''),\r\n\t\t\t'CY'=>array('Cyprus', ''),\r\n\t\t\t'CZ'=>array('Czech Republic', ''),\r\n\t\t\t'DE'=>array('Germany', ''),\r\n\t\t\t'DJ'=>array('Djibouti', ''),\r\n\t\t\t'DK'=>array('Denmark', ''),\r\n\t\t\t'DM'=>array('Dominica', ''),\r\n\t\t\t'DO'=>array('Dominican Republic', ''),\r\n\t\t\t'DZ'=>array('Algeria', ''),\r\n\t\t\t'EC'=>array('Ecuador', ''),\r\n\t\t\t'EE'=>array('Estonia', ''),\r\n\t\t\t'EG'=>array('Egypt', ''),\r\n\t\t\t'EH'=>array('Western Sahara', ''),\r\n\t\t\t'ER'=>array('Eritrea', ''),\r\n\t\t\t'ES'=>array('Spain', ''),\r\n\t\t\t'ET'=>array('Ethiopia', ''),\r\n\t\t\t'FI'=>array('Finland', ''),\r\n\t\t\t'FJ'=>array('Fiji', ''),\r\n\t\t\t'FK'=>array('Falkland Islands (Malvinas)', ''),\r\n\t\t\t'FM'=>array('Micronesia', ''),\r\n\t\t\t'FO'=>array('Faroe Islands', ''),\r\n\t\t\t'FR'=>array('France', ''),\r\n\t\t\t'GA'=>array('Gabon', ''),\r\n\t\t\t'GB'=>array('Great Britain (UK)', ''),\r\n\t\t\t'GD'=>array('Grenada', ''),\r\n\t\t\t'GE'=>array('Georgia', ''),\r\n\t\t\t'GF'=>array('Guyana (Fr.)', ''),\r\n\t\t\t'GG'=>array('Guernsey', ''),\r\n\t\t\t'GH'=>array('Ghana', ''),\r\n\t\t\t'GI'=>array('Gibraltar', ''),\r\n\t\t\t'GL'=>array('Greenland', ''),\r\n\t\t\t'GM'=>array('Gambia', ''),\r\n\t\t\t'GN'=>array('Guinea', ''),\r\n\t\t\t'GP'=>array('Guadeloupe (Fr.)', ''),\r\n\t\t\t'GQ'=>array('Equatorial Guinea', ''),\r\n\t\t\t'GR'=>array('Greece', ''),\r\n\t\t\t'GS'=>array('South Georgia and the South Sandwich Islands', ''),\r\n\t\t\t'GT'=>array('Guatemala', ''),\r\n\t\t\t'GU'=>array('Guam (US)', ''),\r\n\t\t\t'GW'=>array('Guinea Bissau', ''),\r\n\t\t\t'GY'=>array('Guyana', ''),\r\n\t\t\t'HK'=>array('Hong Kong', ''),\r\n\t\t\t'HM'=>array('Heard and McDonald Islands', ''),\r\n\t\t\t'HN'=>array('Honduras', ''),\r\n\t\t\t'HR'=>array('Croatia', ''),\r\n\t\t\t'HT'=>array('Haiti', ''),\r\n\t\t\t'HU'=>array('Hungary', ''),\r\n\t\t\t'ID'=>array('Indonesia', ''),\r\n\t\t\t'IE'=>array('Ireland', ''),\r\n\t\t\t'IL'=>array('Israel', ''),\r\n\t\t\t'IM'=>array('Isle of Man', ''),\r\n\t\t\t'IN'=>array('India', ''),\r\n\t\t\t'IO'=>array('British Indian O. Terr.', ''),\r\n\t\t\t'IQ'=>array('Iraq', ''),\r\n\t\t\t'IR'=>array('Iran', ''),\r\n\t\t\t'IS'=>array('Iceland', ''),\r\n\t\t\t'IT'=>array('Italy', ''),\r\n\t\t\t'JM'=>array('Jamaica', ''),\r\n\t\t\t'JO'=>array('Jordan', ''),\r\n\t\t\t'JP'=>array('Japan', ''),\r\n\t\t\t'KE'=>array('Kenya', ''),\r\n\t\t\t'KG'=>array('Kirgistan', ''),\r\n\t\t\t'KH'=>array('Cambodia', ''),\r\n\t\t\t'KI'=>array('Kiribati', ''),\r\n\t\t\t'KM'=>array('Comoros', ''),\r\n\t\t\t'KN'=>array('SaintKitts Nevis Anguilla', ''),\r\n\t\t\t'KP'=>array('Korea (North)', ''),\r\n\t\t\t'KR'=>array('Korea (South)', ''),\r\n\t\t\t'KW'=>array('Kuwait', ''),\r\n\t\t\t'KY'=>array('Cayman Islands', ''),\r\n\t\t\t'KZ'=>array('Kazachstan', ''),\r\n\t\t\t'LA'=>array('Laos', ''),\r\n\t\t\t'LB'=>array('Lebanon', ''),\r\n\t\t\t'LC'=>array('Saint Lucia', ''),\r\n\t\t\t'LI'=>array('Liechtenstein', ''),\r\n\t\t\t'LK'=>array('Sri Lanka', ''),\r\n\t\t\t'LR'=>array('Liberia', ''),\r\n\t\t\t'LS'=>array('Lesotho', ''),\r\n\t\t\t'LT'=>array('Lithuania', ''),\r\n\t\t\t'LU'=>array('Luxembourg', ''),\r\n\t\t\t'LV'=>array('Latvia', ''),\r\n\t\t\t'LY'=>array('Libya', ''),\r\n\t\t\t'MA'=>array('Morocco', ''),\r\n\t\t\t'MC'=>array('Monaco', ''),\r\n\t\t\t'MD'=>array('Moldavia', ''),\r\n\t\t\t'MG'=>array('Madagascar', ''),\r\n\t\t\t'MH'=>array('Marshall Islands', ''),\r\n\t\t\t'MK'=>array('Macedonia, The Former Yugoslav Republic of', ''),\r\n\t\t\t'ML'=>array('Mali', ''),\r\n\t\t\t'MM'=>array('Myanmar', ''),\r\n\t\t\t'MN'=>array('Mongolia', ''),\r\n\t\t\t'MO'=>array('Macau', ''),\r\n\t\t\t'MP'=>array('Northern Mariana Islands', ''),\r\n\t\t\t'MQ'=>array('Martinique (Fr.)', ''),\r\n\t\t\t'MR'=>array('Mauritania', ''),\r\n\t\t\t'MS'=>array('Montserrat', ''),\r\n\t\t\t'MT'=>array('Malta', ''),\r\n\t\t\t'MU'=>array('Mauritius', ''),\r\n\t\t\t'MV'=>array('Maldives', ''),\r\n\t\t\t'MW'=>array('Malawi', ''),\r\n\t\t\t'MX'=>array('Mexico', ''),\r\n\t\t\t'MY'=>array('Malaysia', ''),\r\n\t\t\t'MZ'=>array('Mozambique', ''),\r\n\t\t\t'NA'=>array('Namibia', ''),\r\n\t\t\t'NC'=>array('New Caledonia (Fr.)', ''),\r\n\t\t\t'NE'=>array('Niger', ''),\r\n\t\t\t'NF'=>array('Norfolk Island', ''),\r\n\t\t\t'NG'=>array('Nigeria', ''),\r\n\t\t\t'NI'=>array('Nicaragua', ''),\r\n\t\t\t'NL'=>array('Netherlands', ''),\r\n\t\t\t'NO'=>array('Norway', ''),\r\n\t\t\t'NP'=>array('Nepal', ''),\r\n\t\t\t'NR'=>array('Nauru', ''),\r\n\t\t\t'NU'=>array('Niue', ''),\r\n\t\t\t'NZ'=>array('New Zealand', ''),\r\n\t\t\t'OM'=>array('Oman', ''),\r\n\t\t\t'PA'=>array('Panama', ''),\r\n\t\t\t'PE'=>array('Peru', ''),\r\n\t\t\t'PF'=>array('Polynesia (Fr.)', ''),\r\n\t\t\t'PG'=>array('Papua New Guinea', ''),\r\n\t\t\t'PH'=>array('Philippines', ''),\r\n\t\t\t'PK'=>array('Pakistan', ''),\r\n\t\t\t'PL'=>array('Poland', ''),\r\n\t\t\t'PM'=>array('Saint Pierre and Miquelon', ''),\r\n\t\t\t'PN'=>array('Pitcairn', ''),\r\n\t\t\t'PR'=>array('Puerto Rico (US)', ''),\r\n\t\t\t'PT'=>array('Portugal', ''),\r\n\t\t\t'PW'=>array('Palau', ''),\r\n\t\t\t'PY'=>array('Paraguay', ''),\r\n\t\t\t'QA'=>array('Qatar', ''),\r\n\t\t\t'RE'=>array('Reunion (Fr.)', ''),\r\n\t\t\t'RO'=>array('Romania', ''),\r\n\t\t\t'RU'=>array('Russian Federation', ''),\r\n\t\t\t'RW'=>array('Rwanda', ''),\r\n\t\t\t'SA'=>array('Saudi Arabia', ''),\r\n\t\t\t'SB'=>array('Solomon Islands', ''),\r\n\t\t\t'SC'=>array('Seychelles', ''),\r\n\t\t\t'SD'=>array('Sudan', ''),\r\n\t\t\t'SE'=>array('Sweden', ''),\r\n\t\t\t'SG'=>array('Singapore', ''),\r\n\t\t\t'SH'=>array('Saint Helena', ''),\r\n\t\t\t'SI'=>array('Slovenia', ''),\r\n\t\t\t'SJ'=>array('Svalbard and Jan Mayen Islands', ''),\r\n\t\t\t'SK'=>array('Slovak Republic', ''),\r\n\t\t\t'SL'=>array('Sierra Leone', ''),\r\n\t\t\t'SM'=>array('San Marino', ''),\r\n\t\t\t'SN'=>array('Senegal', ''),\r\n\t\t\t'SO'=>array('Somalia', ''),\r\n\t\t\t'SR'=>array('Suriname', ''),\r\n\t\t\t'ST'=>array('Saint Tome and Principe', ''),\r\n\t\t\t'SV'=>array('El Salvador', ''),\r\n\t\t\t'SY'=>array('Syria', ''),\r\n\t\t\t'SZ'=>array('Swaziland', ''),\r\n\t\t\t'TC'=>array('Turks and Caicos Islands', ''),\r\n\t\t\t'TD'=>array('Chad', ''),\r\n\t\t\t'TF'=>array('French Southern Territories', ''),\r\n\t\t\t'TG'=>array('Togo', ''),\r\n\t\t\t'TH'=>array('Thailand', ''),\r\n\t\t\t'TJ'=>array('Tadjikistan', ''),\r\n\t\t\t'TK'=>array('Tokelau', ''),\r\n\t\t\t'TM'=>array('Turkmenistan', ''),\r\n\t\t\t'TN'=>array('Tunisia', ''),\r\n\t\t\t'TO'=>array('Tonga', ''),\r\n\t\t\t'TP'=>array('East Timor', ''),\r\n\t\t\t'TR'=>array('Turkey', ''),\r\n\t\t\t'TT'=>array('Trinidad and Tobago', ''),\r\n\t\t\t'TV'=>array('Tuvalu', ''),\r\n\t\t\t'TW'=>array('Taiwan', ''),\r\n\t\t\t'TZ'=>array('Tanzania', ''),\r\n\t\t\t'UA'=>array('Ukraine', ''),\r\n\t\t\t'UG'=>array('Uganda', ''),\r\n\t\t\t'UK'=>array('United Kingdom', ''),\r\n\t\t\t'UM'=>array('US Minor outlying Islands', ''),\r\n\t\t\t'US'=>array('United States', ''),\r\n\t\t\t'UY'=>array('Uruguay', ''),\r\n\t\t\t'UZ'=>array('Uzbekistan', ''),\r\n\t\t\t'VA'=>array('Vatican City State', ''),\r\n\t\t\t'VC'=>array('SaintVincent and Grenadines', ''),\r\n\t\t\t'VE'=>array('Venezuela', ''),\r\n\t\t\t'VG'=>array('Virgin Islands (British)', ''),\r\n\t\t\t'VI'=>array('Virgin Islands (US)', ''),\r\n\t\t\t'VN'=>array('Vietnam', ''),\r\n\t\t\t'VU'=>array('Vanuatu', ''),\r\n\t\t\t'WF'=>array('Wallis and Futuna Islands', ''),\r\n\t\t\t'WS'=>array('Samoa', ''),\r\n\t\t\t'YE'=>array('Yemen', ''),\r\n\t\t\t'YU'=>array('Yugoslavia', ''),\r\n\t\t\t'ZA'=>array('South Africa', ''),\r\n\t\t\t'ZM'=>array('Zambia', ''),\r\n\t\t\t'ZR'=>array('Zaire', ''),\r\n\t\t\t'ZW'=> array('Zimbabwe', ''),\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "151118857a150696db48bcb276b28b7f", "score": "0.6638419", "text": "public function nationality_list()\n {\n $data = file_get_contents(\"./assets/countries/country_en.json\"); //only english!\n if ($data) {\n\t\t\t$data = json_decode($data, TRUE);\n\t\t\t$ordered = [];\n\t\t\tforeach ($data as $key => $value) {\n\t\t\t\t$item['key'] = $key;\n\t\t\t\t$item['val'] = $value;\n\t\t\t\t$ordered[] = $item;\n\t\t\t}\n\t\t\techo json_encode($ordered);\n }\n }", "title": "" }, { "docid": "9864ad4167e85e6efcee84748f70e453", "score": "0.663688", "text": "function getCities($countryCode = null);", "title": "" }, { "docid": "ec1f0ff1d5ff163771924d3c2db3ccfe", "score": "0.6632438", "text": "public function get_countries(){\n\t\t\t$this->db->order_by('sort');\n\t\t\t$query = $this->db->get('countries');\n\t\t\treturn $query->result_array();\n\t\t}", "title": "" }, { "docid": "233d8269c7fece4b57445fb555685596", "score": "0.6623178", "text": "protected function get_country_names()\n {\n $array_countries = array (\n 'AF' => 'AFGHANISTAN',\n 'AX' => 'ÅLAND ISLANDS',\n 'AL' => 'ALBANIA',\n\n 'DZ' => 'ALGERIA (El Djazaïr)',\n 'AS' => 'AMERICAN SAMOA',\n 'AD' => 'ANDORRA',\n 'AO' => 'ANGOLA',\n 'AI' => 'ANGUILLA',\n 'AQ' => 'ANTARCTICA',\n 'AG' => 'ANTIGUA AND BARBUDA',\n 'AR' => 'ARGENTINA',\n 'AM' => 'ARMENIA',\n 'AW' => 'ARUBA',\n\n 'AU' => 'AUSTRALIA',\n 'AT' => 'AUSTRIA',\n 'AZ' => 'AZERBAIJAN',\n 'BS' => 'BAHAMAS',\n 'BH' => 'BAHRAIN',\n 'BD' => 'BANGLADESH',\n 'BB' => 'BARBADOS',\n 'BY' => 'BELARUS',\n 'BE' => 'BELGIUM',\n 'BZ' => 'BELIZE',\n 'BJ' => 'BENIN',\n 'BM' => 'BERMUDA',\n 'BT' => 'BHUTAN',\n 'BO' => 'BOLIVIA',\n\n 'BA' => 'BOSNIA AND HERZEGOVINA',\n 'BW' => 'BOTSWANA',\n 'BV' => 'BOUVET ISLAND',\n 'BR' => 'BRAZIL',\n\n 'BN' => 'BRUNEI DARUSSALAM',\n 'BG' => 'BULGARIA',\n 'BF' => 'BURKINA FASO',\n 'BI' => 'BURUNDI',\n 'KH' => 'CAMBODIA',\n 'CM' => 'CAMEROON',\n 'CA' => 'CANADA',\n 'CV' => 'CAPE VERDE',\n 'KY' => 'CAYMAN ISLANDS',\n 'CF' => 'CENTRAL AFRICAN REPUBLIC',\n 'CD' => 'CONGO, THE DEMOCRATIC REPUBLIC OF THE (formerly Zaire)',\n 'CL' => 'CHILE',\n 'CN' => 'CHINA',\n 'CX' => 'CHRISTMAS ISLAND',\n\n 'CO' => 'COLOMBIA',\n 'KM' => 'COMOROS',\n 'CG' => 'CONGO, REPUBLIC OF',\n 'CK' => 'COOK ISLANDS',\n 'CR' => 'COSTA RICA',\n 'CI' => 'CÔTE D\\'IVOIRE (Ivory Coast)',\n 'HR' => 'CROATIA (Hrvatska)',\n 'CU' => 'CUBA',\n 'CW' => 'CURAÇAO',\n 'CY' => 'CYPRUS',\n 'CZ' => 'ZECH REPUBLIC',\n 'DK' => 'DENMARK',\n 'DJ' => 'DJIBOUTI',\n 'DM' => 'DOMINICA',\n 'DC' => 'DOMINICAN REPUBLIC',\n 'EC' => 'ECUADOR',\n 'EG' => 'EGYPT',\n 'SV' => 'EL SALVADOR',\n 'GQ' => 'EQUATORIAL GUINEA',\n 'ER' => 'ERITREA',\n 'EE' => 'ESTONIA',\n 'ET' => 'ETHIOPIA',\n 'FO' => 'FAEROE ISLANDS',\n\n 'FJ' => 'FIJI',\n 'FI' => 'FINLAND',\n 'FR' => 'FRANCE',\n 'GF' => 'FRENCH GUIANA',\n\n 'GA' => 'GABON',\n 'GM' => 'GAMBIA, THE',\n 'GE' => 'GEORGIA',\n 'DE' => 'GERMANY (Deutschland)',\n 'GH' => 'GHANA',\n 'GI' => 'GIBRALTAR',\n // 'GB' => 'UNITED KINGDOM',\n 'GR' => 'GREECE',\n 'GL' => 'GREENLAND',\n 'GD' => 'GRENADA',\n 'GP' => 'GUADELOUPE',\n 'GU' => 'GUAM',\n 'GT' => 'GUATEMALA',\n 'GG' => 'GUERNSEY',\n 'GN' => 'GUINEA',\n 'GW' => 'GUINEA-BISSAU',\n 'GY' => 'GUYANA',\n 'HT' => 'HAITI',\n\n 'HN' => 'HONDURAS',\n 'HK' => 'HONG KONG (Special Administrative Region of China)',\n 'HU' => 'HUNGARY',\n 'IS' => 'ICELAND',\n 'IN' => 'INDIA',\n 'ID' => 'INDONESIA',\n 'IR' => 'IRAN (Islamic Republic of Iran)',\n 'IQ' => 'IRAQ',\n 'IE' => 'IRELAND',\n 'IM' => 'ISLE OF MAN',\n 'IL' => 'ISRAEL',\n 'IT' => 'ITALY',\n 'JM' => 'JAMAICA',\n 'JP' => 'JAPAN',\n 'JE' => 'JERSEY',\n 'JO' => 'JORDAN (Hashemite Kingdom of Jordan)',\n 'KZ' => 'KAZAKHSTAN',\n 'KE' => 'KENYA',\n 'KI' => 'KIRIBATI',\n 'KP' => 'KOREA (Democratic Peoples Republic of [North] Korea)',\n 'KR' => 'KOREA (Republic of [South] Korea)',\n 'KW' => 'KUWAIT',\n 'KG' => 'KYRGYZSTAN',\n\n 'LV' => 'LATVIA',\n 'LB' => 'LEBANON',\n 'LS' => 'LESOTHO',\n 'LR' => 'LIBERIA',\n 'LY' => 'LIBYA (Libyan Arab Jamahirya)',\n 'LI' => 'LIECHTENSTEIN (Fürstentum Liechtenstein)',\n 'LT' => 'LITHUANIA',\n 'LU' => 'LUXEMBOURG',\n 'MO' => 'MACAO (Special Administrative Region of China)',\n 'MK' => 'MACEDONIA (Former Yugoslav Republic of Macedonia)',\n 'MG' => 'MADAGASCAR',\n 'MW' => 'MALAWI',\n 'MY' => 'MALAYSIA',\n 'MV' => 'MALDIVES',\n 'ML' => 'MALI',\n 'MT' => 'MALTA',\n 'MH' => 'MARSHALL ISLANDS',\n 'MQ' => 'MARTINIQUE',\n 'MR' => 'MAURITANIA',\n 'MU' => 'MAURITIUS',\n 'YT' => 'MAYOTTE',\n 'MX' => 'MEXICO',\n 'FM' => 'MICRONESIA (Federated States of Micronesia)',\n 'MD' => 'MOLDOVA',\n 'MC' => 'MONACO',\n 'MN' => 'MONGOLIA',\n 'ME' => 'MONTENEGRO',\n 'MS' => 'MONTSERRAT',\n 'MA' => 'MOROCCO',\n 'MZ' => 'MOZAMBIQUE (Moçambique)',\n 'MM' => 'MYANMAR (formerly Burma)',\n 'NA' => 'NAMIBIA',\n 'NR' => 'NAURU',\n 'NP' => 'NEPAL',\n 'NL' => 'NETHERLANDS',\n 'AN' => 'NETHERLANDS ANTILLES (obsolete)',\n 'NC' => 'NEW CALEDONIA',\n 'NZ' => 'NEW ZEALAND',\n 'NI' => 'NICARAGUA',\n 'NE' => 'NIGER',\n 'NG' => 'NIGERIA',\n 'NU' => 'NIUE',\n 'NF' => 'NORFOLK ISLAND',\n 'MP' => 'NORTHERN MARIANA ISLANDS',\n 'ND' => 'NORWAY',\n 'OM' => 'OMAN',\n 'PK' => 'PAKISTAN',\n 'PW' => 'PALAU',\n 'PS' => 'PALESTINIAN TERRITORIES',\n 'PA' => 'PANAMA',\n 'PG' => 'PAPUA NEW GUINEA',\n 'PY' => 'PARAGUAY',\n 'PE' => 'PERU',\n 'PH' => 'PHILIPPINES',\n 'PN' => 'PITCAIRN',\n 'PL' => 'POLAND',\n 'PT' => 'PORTUGAL',\n 'PR' => 'PUERTO RICO',\n 'QA' => 'QATAR',\n 'RE' => 'RÉUNION',\n 'RO' => 'ROMANIA',\n 'RU' => 'RUSSIAN FEDERATION',\n 'RW' => 'RWANDA',\n 'BL' => 'SAINT BARTHÉLEMY',\n 'SH' => 'SAINT HELENA',\n 'KN' => 'SAINT KITTS AND NEVIS',\n 'LC' => 'SAINT LUCIA',\n\n 'PM' => 'SAINT PIERRE AND MIQUELON',\n 'VC' => 'SAINT VINCENT AND THE GRENADINES',\n 'WS' => 'SAMOA (formerly Western Samoa)',\n 'SM' => 'SAN MARINO (Republic of)',\n 'ST' => 'SAO TOME AND PRINCIPE',\n 'SA' => 'SAUDI ARABIA (Kingdom of Saudi Arabia)',\n 'SN' => 'SENEGAL',\n 'RS' => 'SERBIA (Republic of Serbia)',\n 'SC' => 'SEYCHELLES',\n 'SL' => 'SIERRA LEONE',\n 'SG' => 'SINGAPORE',\n 'SX' => 'SINT MAARTEN',\n 'SK' => 'SLOVAKIA (Slovak Republic)',\n 'SI' => 'SLOVENIA',\n 'SB' => 'SOLOMON ISLANDS',\n 'SO' => 'SOMALIA',\n 'ZA' => 'ZAMBIA (formerly Northern Rhodesia)',\n 'GS' => 'SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS',\n 'SS' => 'SOUTH SUDAN',\n 'ES' => 'SPAIN (España)',\n 'LK' => 'SRI LANKA (formerly Ceylon)',\n 'SD' => 'SUDAN',\n 'SR' => 'SURINAME',\n 'SJ' => 'SVALBARD AND JAN MAYE',\n 'SZ' => 'SWAZILAND',\n 'SE' => 'SWEDEN',\n 'CH' => 'SWITZERLAND (Confederation of Helvetia)',\n 'SY' => 'SYRIAN ARAB REPUBLIC',\n 'TW' => 'TAIWAN (\"Chinese Taipei\" for IOC)',\n 'TJ' => 'TAJIKISTAN',\n 'TZ' => 'TANZANIA',\n 'TH' => 'THAILAND',\n 'TL' => 'TIMOR-LESTE (formerly East Timor)',\n 'TG' => 'TOGO',\n 'TK' => 'TOKELAU',\n 'TO' => 'TONGA',\n 'TT' => 'TRINIDAD AND TOBAGO',\n 'TN' => 'TUNISIA',\n 'TR' => 'TURKEY',\n 'TM' => 'TURKMENISTAN',\n 'TC' => 'TURKS AND CAICOS ISLANDS',\n 'TV' => 'TUVALU',\n 'UG' => 'UGANDA',\n 'UA' => 'UKRAINE',\n 'AE' => 'UNITED ARAB EMIRATES',\n 'US' => 'UNITED STATES',\n 'UM' => 'UNITED STATES MINOR OUTLYING ISLANDS',\n 'UK' => 'UNITED KINGDOM',\n 'UY' => 'URUGUAY',\n 'UZ' => 'UZBEKISTAN',\n 'VU' => 'VANUATU',\n 'VA' => 'VATICAN CITY (Holy See)',\n 'VN' => 'VIET NAM',\n 'VG' => 'VIRGIN ISLANDS, BRITISH',\n 'VI' => 'VIRGIN ISLANDS, U.S.',\n 'WF' => 'WALLIS AND FUTUNA',\n 'EH' => 'WESTERN SAHARA (formerly Spanish Sahara)',\n 'YE' => 'YEMEN (Yemen Arab Republic)',\n 'ZW' => 'ZIMBABWE'\n );\n return $array_countries;\n }", "title": "" }, { "docid": "33b72f9dc5e8feb0e05bea7776ed15de", "score": "0.66132486", "text": "function getCountryList(){\n return array(\"Afghanistan\", \"Albania\", \"Algeria\",\"American Samoa\",\"Andorra\",\"Angola\",\"Anguilla\",\"Antigua\",\"Argentina\",\"Armenia\",\"Aruba\",\"Australia\",\"Austria\",\"Azerbaijan\",\"Bahrain\",\"Bangladesh\",\"Barbados\",\"Belarus\",\"Belgium\",\"Belize\",\"Benin\",\"Bermuda\",\"Bhutan\",\"Bolivia\",\"Bonaire, Sint Eustatius and Saba\",\"Bosnia and Herzegovina\",\"Botswana\",\"Brazil\",\"British Indian Ocean Territory\",\"British Virgin Islands\",\"Brunei\",\"Bulgaria\",\"Burkina Faso\",\"Burundi\",\"Cambodia\",\"Cameroon\",\"Canada\",\"Cape Verde\",\"Cayman Islands\",\"Central African Republic\",\"Chad\",\"Chile\",\"China\",\"Colombia\",\"Comoros\",\"Cook Islands\",\"Costa Rica\",\"Côte d'Ivoire\",\"Croatia\",\"Cuba\",\"Curaçao\",\"Cyprus\",\"Czech Republic\",\"Democratic Republic of the Congo\",\"Denmark\",\"Djibouti\",\"Dominica\",\"Dominican Republic\",\"Ecuador\",\"Egypt\",\"El Salvador\",\"Equatorial Guinea\",\"Eritrea\",\"Estonia\",\"Ethiopia\",\"Falkland Islands\",\"Faroe Islands\",\"Federated States of Micronesia\",\"Fiji\",\"Finland\",\"France\",\"French Guiana\",\"French Polynesia\",\"Gabon\",\"Georgia\",\"Germany\",\"Ghana\",\"Gibraltar\",\"Greece\",\"Greenland\",\"Grenada\",\"Guadeloupe\",\"Guam\",\"Guatemala\",\"Guernsey\",\"Guinea\",\"Guinea-Bissau\",\"Guyana\",\"Haiti\",\"Honduras\",\"Hong Kong\",\"Hungary\",\"Iceland\",\"India\",\"Indonesia\",\"Iran\",\"Iraq\",\"Ireland\",\"Isle Of Man\",\"Israel\",\"Italy\",\"Jamaica\",\"Japan\",\"Jersey\",\"Jordan\",\"Kazakhstan\",\"Kenya\",\"Kiribati\",\"Kuwait\",\"Kyrgyzstan\",\"Laos\",\"Latvia\",\"Lebanon\",\"Lesotho\",\"Liberia\",\"Libya\",\"Liechtenstein\",\"Lithuania\",\"Luxembourg\",\"Macau\",\"Macedonia\",\"Madagascar\",\"Malawi\",\"Malaysia\",\"Maldives\",\"Mali\",\"Malta\",\"Marshall Islands\",\"Martinique\",\"Mauritania\",\"Mauritius\",\"Mayotte\",\"Mexico\",\"Moldova\",\"Monaco\",\"Mongolia\",\"Montenegro\",\"Montserrat\",\"Morocco\",\"Mozambique\",\"Myanmar\",\"Namibia\",\"Nauru\",\"Nepal\",\"Netherlands\",\"New Caledonia\",\"New Zealand\",\"Nicaragua\",\"Niger\",\"Nigeria\",\"Niue\",\"Norfolk Island\",\"North Korea\",\"Northern Mariana Islands\",\"Norway\",\"Oman\",\"Pakistan\",\"Palau\",\"Palestine\",\"Panama\",\"Papua New Guinea\",\"Paraguay\",\"Peru\",\"Philippines\",\"Poland\",\"Portugal\",\"Puerto Rico\",\"Qatar\",\"Republic of the Congo\",\"Romania\",\"Runion\",\"Russia\",\"Rwanda\",\"Saint Helena\",\"Saint Kitts and Nevis\",\"Saint Pierre and Miquelon\",\"Saint Vincent and the Grenadines\",\"Samoa\",\"San Marino\",\"Sao Tome and Principe\",\"Saudi Arabia\",\"Senegal\",\"Serbia\",\"Seychelles\",\"Sierra Leone\",\"Singapore\",\"Sint Maarten\",\"Slovakia\",\"Slovenia\",\"Solomon Islands\",\"Somalia\",\"South Africa\",\"South Korea\",\"South Sudan\",\"Spain\",\"Sri Lanka\",\"St. Lucia\",\"Sudan\",\"Suriname\",\"Swaziland\",\"Sweden\",\"Switzerland\",\"Syria\",\"Taiwan\",\"Tajikistan\",\"Tanzania\",\"Thailand\",\"The Bahamas\",\"The Gambia\",\"Timor-Leste\",\"Togo\",\"Tokelau\",\"Tonga\",\"Trinidad and Tobago\",\"Tunisia\",\"Turkey\",\"Turkmenistan\",\"Turks and Caicos Islands\",\"Tuvalu\",\"U.S. Virgin Islands\",\"Uganda\",\"Ukraine\",\"United Arab Emirates\",\"United Kingdom\",\"United States\",\"Uruguay\",\"Uzbekistan\",\"Vanuatu\",\"Venezuela\",\"Vietnam\",\"Wallis and Futuna\",\"Western Sahara\",\"Yemen\",\"Zambia\",\"Zimbabwe\");\n}", "title": "" }, { "docid": "fd600cdfcf5dadb645fe1eba98942702", "score": "0.66059005", "text": "public function getAllCountries()\n {\n $countries = Country::all();\n\n return $countries;\n }", "title": "" }, { "docid": "d331bd48e9d806eb48ae2eb21a05e7da", "score": "0.6591917", "text": "public function getCountries() {\n $this->load->model('localisation/country');\n $countries = $this->model_localisation_country->getCountries();\n $options = array();\n foreach ($countries as $country) {\n $country['value'] = $country['country_id'];\n unset($country['country_id']);\n $options[] = $country;\n }\n return $options;\n }", "title": "" }, { "docid": "00619bfa8782fec43f239ee171519fa7", "score": "0.6586018", "text": "public function getAllCountriesApi()\n {\n $results = DB::table('countries')\n ->orderBy('id')\n ->get();\n\n return $results;\n }", "title": "" }, { "docid": "7d7870fbd9b2e3ec9efb5e815f639cea", "score": "0.6584204", "text": "static function bbanCountriesList()\n {\n $countries = bbanCountries();\n asort($countries);\n return $countries;\n }", "title": "" }, { "docid": "731afc65e6f105c3befef3d25b76309c", "score": "0.65840286", "text": "public function readCountries(){\r\n\t\ttry{\r\n\t\t\t\t$sql = \"SELECT * FROM countries ORDER BY name\";\r\n\t\t\t\t$query = $this->pdo->prepare($sql);\r\n\t\t\t\t$query->execute();\r\n\t\t\t\t$result = $query->fetchALL(PDO::FETCH_BOTH);\r\n\t\t\t}catch (PDOException $e) {\r\n\t\t\tdie($e->getMessage());\r\n\t\t}\r\n\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "faf86c9079ae2b4999e885cad10f0c2c", "score": "0.6572988", "text": "public function getUserCountry();", "title": "" }, { "docid": "90c6691c48c7553bbdb248a569ba3f4d", "score": "0.65708363", "text": "function _get_countries()\n\t{\n\t\t$countries = array(\n\t\t\t\t\"USA\", \"Western Sahara\", \"Viet Nam\", \"Yemen\", \"Zambia\",\n\t\t\t\t\"Hungary\", \"Uganda\", \"Uruguay\", \"Vanuatu\", \"Venezulela\",\n\t\t\t\t\"France\", \"Sweden\", \"Taiwan\", \"Thailand\", \"Togo\", \"Turkey\",\n\t\t\t\t\"Germany\", \"Quatar\", \"Sahara\", \"Samoa\", \"Senegal\", \"Serbia\",\n\t\t\t\t\"United Kingdom\", \"Norway\", \"Pakistan\", \"Palau\", \"Paraguay\",\n\t\t\t\t\"Russia\", \"Nepal\",\"Nederlands\",\"Nauru\",\"Nigeria\",\"Oman\",\n\t\t\t\t\"Cuba\",\"Malawi\",\"Madagascar\",\"Malaysia\",\"Luxembourg\",\"Liberia\",\n\t\t\t\t\"Mexico\",\"Jamaica\",\"Japan\",\"Kosovo\",\"Kuwait\",\"Kenya\",\"Kazakhstan\",\n\t\t\t\t\"Poland\", \"Haiti\",\"Honduras\",\"India\",\"Iraq\",\"Ireland\",\"Israel\",\n\t\t\t\t\"Austria\",\"Denmark\",\"Ethiopia\",\"Fiji\",\"Gabon\",\"Georgia\",\"Grenada\",\n\t\t\t\t\"Spain\",\"Congo\",\"Costa Rica\",\"Cyprus\",\"Dominica\",\"Ecuador\",\n\t\t\t\t\"Australia\",\"Argentina\",\"Belarus\",\"Belgium\",\"Brazil\"\n\t\t);\n\n\t\tsort( $countries );\n\n\t\treturn $countries;\n\t}", "title": "" }, { "docid": "46e701292c5798b8d049487130d9a765", "score": "0.65639174", "text": "public static function getCountryNames()\n\t{\n\t\treturn array_values(self::$code_to_name);\n\t}", "title": "" }, { "docid": "010359ddf86f15c1c00ffa4691906e28", "score": "0.65437007", "text": "public static function getCountryData(){\n return DB::table('lu_country')->where('status', Constants::$Status_Active)->get();\n }", "title": "" }, { "docid": "259e6501f288fc56f10058bfb7fa56b1", "score": "0.6520018", "text": "function getCountries() {\n return $this->countries->find()->sort(array('name' => 1));\n }", "title": "" }, { "docid": "7f8d3590e2000d9fd305d08a701cc029", "score": "0.65190744", "text": "public static function getAllCountry()\n {\n $query = 'SELECT * FROM twp_Country';\n $rep = Model::$pdo->query($query);\n $rep->setFetchMode (PDO::FETCH_ASSOC);\n $tab_obj=$rep->fetchAll();\n return $tab_obj;\n }", "title": "" }, { "docid": "015eba50cfc19750ee5b668eb9ec80e7", "score": "0.65076697", "text": "public function getCountryOptions(){\n\t\t$db\t\t= $this->getDbo();\n\t\t$query\t= $db->getQuery(true);\n\t\t$query->select('a.country_id,a.country_name');\n\t\t$query->from('#__j2store_countries AS a');\n\t\t$query->where('state = 1');\n\t\t$query->order('a.country_name');\n\t\t$db->setQuery($query);\n\t\t$countries = $db->loadObjectList();\n\t\t\n\t\t$country_options = array();\n\t\t$country_options[] = JHTML::_('select.option', '', JText::_('J2STORE_SELECT_COUNTRY'));\n\t\tforeach($countries as $item) {\n\t\t\t$country_options[] = JHTML::_('select.option', $item->country_id, $item->country_name);\n\t\t}\n\t\t\n\t\treturn $country_options;\n\t}", "title": "" }, { "docid": "4bda979abe9a3acd5a367822c3bc98f8", "score": "0.64992934", "text": "public static function getAllActiveCountries()\n\t{\n\t\t$em = \\Zend_Registry::get('em');\n\t\t$dql = \"SELECT con FROM \\Entities\\country_ref con WHERE con.status = \".self::STATUS_ACTIVE.\" Order by con.name asc\";\n\t\t$result= $em->createQuery($dql)->getResult();\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "7b5d75e5735e6d24a6f37d30ea085b01", "score": "0.6498043", "text": "public function getAddedCountries();", "title": "" }, { "docid": "dbadde219d34f18d16d840c8978c9362", "score": "0.6497932", "text": "public function getCountryCollection(){\n return $this->_countryFactory->create()->loadByStore();\n }", "title": "" }, { "docid": "338523e744f7bca90525d00a634e0d8f", "score": "0.64978635", "text": "public static function getCountryCodes()\n\t{\n\t\treturn array_keys(self::$code_to_name);\n\t}", "title": "" }, { "docid": "9284a6fcd4e7bcbe180ccedab7da9cc1", "score": "0.6482503", "text": "public function countries() {\n $this->auth->check_admin();\n if($this->uri->segment(3, 0)) {\n $segment = $this->uri->segment(3, 0);\n if(is_numeric($segment)) {\n $this->_all_countries();\n } else {\n if($segment == 'search') {\n $this->_country_search();\n } else if($segment == 'new') {\n $this->_add_country();\n } else if($segment == 'edit') {\n $this->_edit_country();\n } else if($segment == 'import') {\n $this->_import_country();\n } else if($segment == 'delete') {\n $this->_delete_country();\n } else {\n show_404();\n }\n }\n } else {\n $this->_all_countries();\n }\n }", "title": "" }, { "docid": "3ec2a5fdb5ae6997518a72fd1d3b6dd6", "score": "0.6476146", "text": "public function getOfficeCountry() {\n\t\t$countries = Contact::with('OrmCountry')->get();\n\t\tforeach($countries as $country) {\n\t\t\t$data[] = strtolower($country->OrmCountry->code) . \":'#02007a'\";\n\t\t}\n\t\t$countries = implode(\",\", $data);\t\n\t\treturn $countries;\n\t}", "title": "" }, { "docid": "b79331aa006dda9ee37172d51034ee6a", "score": "0.6459786", "text": "function smarty_function_country_list() {\n\t$countryPlugins = Core::$countryPlugins;\n\t$defaultChecked = Core::getDefaultCountryPlugins();\n\n\techo \"<select id=\\\"gdCountries\\\" name=\\\"gdCountries[]\\\" multiple style=\\\"width: 100%\\\" data-placeholder=\\\"Select a country or two\\\">\";\n\tforeach ($countryPlugins as $obj) {\n\t\t$countryName = $obj->getName();\n\t\t$slug = $obj->getSlug();\n\t\t$selected = (in_array($slug, $defaultChecked)) ? \" selected=\\\"selected\\\"\" : \"\";\n\t\techo \"<option value=\\\"$slug\\\"$selected>$countryName</option>\";\n\t}\n\techo \"</select>\";\n}", "title": "" }, { "docid": "2ff9342916371c8657473d95f0cc520c", "score": "0.6446674", "text": "function getCountryCode();", "title": "" }, { "docid": "7c7b8883928d713dfe41c0fc773f87f9", "score": "0.6431094", "text": "function get_all_countries()\n\t{\n\t\t$this->db->select('countryid,name');\n\t\t$query=$this->db->get('countries');\n\t\t\n\t\t$output=array('-'=>'-');\n\t\t\n\t\tif ($query)\n\t\t{\n\t\t\t$rows=$query->result_array();\n\t\t\t\n\t\t\tforeach($rows as $row)\n\t\t\t{\n\t\t\t\t$output[$row['countryid']]=$row['name'];\n\t\t\t}\t\t\t\t\n\t\t}\n\t\t\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "c5a3971b25eb75d885925f7c51e359cc", "score": "0.6424101", "text": "public function countries () {\r\n\t\t$data = [];\r\n\t\t$this->get_countries();\r\n\t\t\r\n\t\tforeach ($this->countryData AS $info) {\r\n\t\t\t$data[$info['code']] = $info['name'];\r\n\t\t}\r\n\t\t\r\n\t\treturn $data;\r\n\t}", "title": "" }, { "docid": "1f2767dc92e198363e19312ec6473045", "score": "0.6417335", "text": "public function getCurrentCountries() {\n\t\t$past_countries = Project::with('OrmProjectCountry')->where('end_date', '=', '')->select('id', 'title')->get();\n\t\tforeach($past_countries as $past_country) {\n\t\t\t$past_lists[] = $past_country->OrmProjectCountry[0]->country_id;\n\t\t}\t\n\t\t$past_country_lists = array_unique($past_lists);\n\t\tforeach($past_country_lists as $country_id) {\n\t\t\t$country = Country::find($country_id);\n\t\t\t$data[] = strtolower($country->code) . \":'#0000ff'\";\n\t\t}\n\t\t$countries = implode(\",\", $data);\n\t\treturn $countries;\n\t}", "title": "" }, { "docid": "d072bbe2648b231ebc693c02cf32a5ec", "score": "0.64005154", "text": "protected function currecny_list_all()\n {\n $list = array\n (\n \"AED\"=> \"United Arab Emirates dirham\",\n \"AFN\"=> \"Afghan afghani\",\n \"ALL\"=> \"Albanian lek\",\n \"AMD\"=> \"Armenian dram\",\n \"ANG\"=> \"Netherlands Antillean guilder\",\n \"AOA\"=> \"Angolan kwanza\",\n \"ARS\"=> \"Argentine peso\",\n \"AUD\"=> \"Australian dollar\",\n \"AWG\"=> \"Aruban florin\",\n \"AZN\"=> \"Azerbaijani manat\",\n \"BAM\"=> \"Bosnia and Herzegovina convertible mark\",\n \"BBD\"=> \"Barbados dollar\",\n \"BDT\"=> \"Bangladeshi taka\",\n \"BGN\"=> \"Bulgarian lev\",\n \"BHD\"=> \"Bahraini dinar\",\n \"BIF\"=> \"Burundian franc\",\n \"BMD\"=> \"Bermudian dollar\",\n \"BND\"=> \"Brunei dollar\",\n \"BOB\"=> \"Boliviano\",\n \"BRL\"=> \"Brazilian real\",\n \"BSD\"=> \"Bahamian dollar\",\n \"BTN\"=> \"Bhutanese ngultrum\",\n \"BWP\"=> \"Botswana pula\",\n \"BYN\"=> \"New Belarusian ruble\",\n \"BYR\"=> \"Belarusian ruble\",\n \"BZD\"=> \"Belize dollar\",\n \"CAD\"=> \"Canadian dollar\",\n \"CDF\"=> \"Congolese franc\",\n \"CHF\"=> \"Swiss franc\",\n \"CLF\"=> \"Unidad de Fomento\",\n \"CLP\"=> \"Chilean peso\",\n \"CNY\"=> \"Renminbi|Chinese yuan\",\n \"COP\"=> \"Colombian peso\",\n \"CRC\"=> \"Costa Rican colon\",\n \"CUC\"=> \"Cuban convertible peso\",\n \"CUP\"=> \"Cuban peso\",\n \"CVE\"=> \"Cape Verde escudo\",\n \"CZK\"=> \"Czech koruna\",\n \"DJF\"=> \"Djiboutian franc\",\n \"DKK\"=> \"Danish krone\",\n \"DOP\"=> \"Dominican peso\",\n \"DZD\"=> \"Algerian dinar\",\n \"EGP\"=> \"Egyptian pound\",\n \"ERN\"=> \"Eritrean nakfa\",\n \"ETB\"=> \"Ethiopian birr\",\n \"EUR\"=> \"Euro\",\n \"FJD\"=> \"Fiji dollar\",\n \"FKP\"=> \"Falkland Islands pound\",\n \"GBP\"=> \"Pound sterling\",\n \"GEL\"=> \"Georgian lari\",\n \"GHS\"=> \"Ghanaian cedi\",\n \"GIP\"=> \"Gibraltar pound\",\n \"GMD\"=> \"Gambian dalasi\",\n \"GNF\"=> \"Guinean franc\",\n \"GTQ\"=> \"Guatemalan quetzal\",\n \"GYD\"=> \"Guyanese dollar\",\n \"HKD\"=> \"Hong Kong dollar\",\n \"HNL\"=> \"Honduran lempira\",\n \"HRK\"=> \"Croatian kuna\",\n \"HTG\"=> \"Haitian gourde\",\n \"HUF\"=> \"Hungarian forint\",\n \"IDR\"=> \"Indonesian rupiah\",\n \"ILS\"=> \"Israeli new shekel\",\n \"INR\"=> \"Indian rupee\",\n \"IQD\"=> \"Iraqi dinar\",\n \"IRR\"=> \"Iranian rial\",\n \"ISK\"=> \"Icelandic króna\",\n \"JMD\"=> \"Jamaican dollar\",\n \"JOD\"=> \"Jordanian dinar\",\n \"JPY\"=> \"Japanese yen\",\n \"KES\"=> \"Kenyan shilling\",\n \"KGS\"=> \"Kyrgyzstani som\",\n \"KHR\"=> \"Cambodian riel\",\n \"KMF\"=> \"Comoro franc\",\n \"KPW\"=> \"North Korean won\",\n \"KRW\"=> \"South Korean won\",\n \"KWD\"=> \"Kuwaiti dinar\",\n \"KYD\"=> \"Cayman Islands dollar\",\n \"KZT\"=> \"Kazakhstani tenge\",\n \"LAK\"=> \"Lao kip\",\n \"LBP\"=> \"Lebanese pound\",\n \"LKR\"=> \"Sri Lankan rupee\",\n \"LRD\"=> \"Liberian dollar\",\n \"LSL\"=> \"Lesotho loti\",\n \"LYD\"=> \"Libyan dinar\",\n \"MAD\"=> \"Moroccan dirham\",\n \"MDL\"=> \"Moldovan leu\",\n \"MGA\"=> \"Malagasy ariary\",\n \"MKD\"=> \"Macedonian denar\",\n \"MMK\"=> \"Myanmar kyat\",\n \"MNT\"=> \"Mongolian tögrög\",\n \"MOP\"=> \"Macanese pataca\",\n \"MRO\"=> \"Mauritanian ouguiya\",\n \"MUR\"=> \"Mauritian rupee\",\n \"MVR\"=> \"Maldivian rufiyaa\",\n \"MWK\"=> \"Malawian kwacha\",\n \"MXN\"=> \"Mexican peso\",\n \"MXV\"=> \"Mexican Unidad de Inversion\",\n \"MYR\"=> \"Malaysian ringgit\",\n \"MZN\"=> \"Mozambican metical\",\n \"NAD\"=> \"Namibian dollar\",\n \"NGN\"=> \"Nigerian naira\",\n \"NIO\"=> \"Nicaraguan córdoba\",\n \"NOK\"=> \"Norwegian krone\",\n \"NPR\"=> \"Nepalese rupee\",\n \"NZD\"=> \"New Zealand dollar\",\n \"OMR\"=> \"Omani rial\",\n \"PAB\"=> \"Panamanian balboa\",\n \"PEN\"=> \"Peruvian Sol\",\n \"PGK\"=> \"Papua New Guinean kina\",\n \"PHP\"=> \"Philippine peso\",\n \"PKR\"=> \"Pakistani rupee\",\n \"PLN\"=> \"Polish złoty\",\n \"PYG\"=> \"Paraguayan guaraní\",\n \"QAR\"=> \"Qatari riyal\",\n \"RON\"=> \"Romanian leu\",\n \"RSD\"=> \"Serbian dinar\",\n \"RUB\"=> \"Russian ruble\",\n \"RWF\"=> \"Rwandan franc\",\n \"SAR\"=> \"Saudi riyal\",\n \"SBD\"=> \"Solomon Islands dollar\",\n \"SCR\"=> \"Seychelles rupee\",\n \"SDG\"=> \"Sudanese pound\",\n \"SEK\"=> \"Swedish krona\",\n \"SGD\"=> \"Singapore dollar\",\n \"SHP\"=> \"Saint Helena pound\",\n \"SLL\"=> \"Sierra Leonean leone\",\n \"SOS\"=> \"Somali shilling\",\n \"SRD\"=> \"Surinamese dollar\",\n \"SSP\"=> \"South Sudanese pound\",\n \"STD\"=> \"São Tomé and Príncipe dobra\",\n \"SVC\"=> \"Salvadoran colón\",\n \"SYP\"=> \"Syrian pound\",\n \"SZL\"=> \"Swazi lilangeni\",\n \"THB\"=> \"Thai baht\",\n \"TJS\"=> \"Tajikistani somoni\",\n \"TMT\"=> \"Turkmenistani manat\",\n \"TND\"=> \"Tunisian dinar\",\n \"TOP\"=> \"Tongan paʻanga\",\n \"TRY\"=> \"Turkish lira\",\n \"TTD\"=> \"Trinidad and Tobago dollar\",\n \"TWD\"=> \"New Taiwan dollar\",\n \"TZS\"=> \"Tanzanian shilling\",\n \"UAH\"=> \"Ukrainian hryvnia\",\n \"UGX\"=> \"Ugandan shilling\",\n \"USD\"=> \"United States dollar\",\n \"UYI\"=> \"Uruguay Peso en Unidades Indexadas\",\n \"UYU\"=> \"Uruguayan peso\",\n \"UZS\"=> \"Uzbekistan som\",\n \"VEF\"=> \"Venezuelan bolívar\",\n \"VND\"=> \"Vietnamese đồng\",\n \"VUV\"=> \"Vanuatu vatu\",\n \"WST\"=> \"Samoan tala\",\n \"XAF\"=> \"Central African CFA franc\",\n \"XCD\"=> \"East Caribbean dollar\",\n \"XOF\"=> \"West African CFA franc\",\n \"XPF\"=> \"CFP franc\",\n \"XXX\"=> \"No currency\",\n \"YER\"=> \"Yemeni rial\",\n \"ZAR\"=> \"South African rand\",\n \"ZMW\"=> \"Zambian kwacha\",\n \"ZWL\"=> \"Zimbabwean dollar\"\n );\n asort($list);\n $return = array();\n foreach ($list as $key => $val)\n {\n $return[$key] = $val;\n }\n return $return;\n }", "title": "" }, { "docid": "ebcacfe0160798d6f6fe924c5867f158", "score": "0.63947576", "text": "public function access()\n {\n return $this->client->get('access/countries', []);\n }", "title": "" }, { "docid": "3e8372b4dc480f281c819f84f4409136", "score": "0.6392922", "text": "public function fetchCountries()\n {\n $countries = $this->wine->fetchCountries();\n\n if(! $countries) {\n return Response::json([\n 'error' => 'There is no result from the server'\n ],\n 404);\n }\n\n return Response::json([\n 'data'=> $countries\n ], 200);\n }", "title": "" }, { "docid": "9107b6978eec67f49485052d65c4ec15", "score": "0.63912463", "text": "public static function getCountryArray()\n\t{\n\t\treturn self::$code_to_name;\n\t}", "title": "" }, { "docid": "852ebca3c406d5b7d04481980a443db1", "score": "0.63889086", "text": "public function getCountry()\n {\n $data = Country::get();\n \n return $this->respondWithCollection(CountryResource::collection($data));\n }", "title": "" }, { "docid": "d5396fe45b36be50358b0c1a8a3e6e7d", "score": "0.63860434", "text": "static function sepaCountriesList()\n {\n $countries = sepaCountries();\n asort($countries);\n return $countries;\n }", "title": "" }, { "docid": "382e73d6788b607ccd8616f97d50b59d", "score": "0.6372252", "text": "public function get_system_countries($expand=array()) {\n return $this->get(sprintf(\"/system/countries/\"), $expand=$expand);\n}", "title": "" }, { "docid": "e91ed40c2c5eee7ef24cb978143cd29d", "score": "0.63449687", "text": "public function countries()\n {\n return CountryResource::collection(Country::all());\n }", "title": "" }, { "docid": "bb4ee43042baa2b8567f98f25d73190e", "score": "0.63341737", "text": "public function getAllCountriesData()\n {\n // Standard way to retrieve all data from countries table\n // $query = $this->db->query('SELECT * FROM countries');\n\n // Query builder class way\n $query = $this->db->get('countries');\n return $query->result();\n }", "title": "" }, { "docid": "6f21d28816891c63154b61678cc0ea8f", "score": "0.6331665", "text": "public function getCountriesFromDatabase()\r\n {\r\n $sql = 'SELECT id, Country\r\n FROM countries';\r\n $result = PDODAO::getDataArrays($sql);\r\n return $result;\r\n }", "title": "" }, { "docid": "ae8fcc9757caead3fc341d00db105a4c", "score": "0.6306596", "text": "public static function get_country_names() {\n\t\tif ( ! self::confirmed_initialization() ) {\n\t\t\treturn array();\n\t\t}\n\n\t\t$country_names = array_flip( self::$country_id_by_country_name->data() );\n\n\t\t// we have the return value in our country name to id map, all we have to do is swap the keys with the values\n\t\treturn $country_names;\n\t}", "title": "" }, { "docid": "953edbbe949dee8525638ab31d59949e", "score": "0.6265151", "text": "static function get_countries_count() {\n\t\treturn count( self::get_countries() );\n\t}", "title": "" }, { "docid": "4686fd5866385df81e865e7ccbec60e1", "score": "0.6233938", "text": "public function getCountry()\n {\n $data = Country::get();\n\n return $this->respondWithCollection(CountryResource::collection($data));\n }", "title": "" }, { "docid": "d28dfaa4b4a7b3e6696bfe142ddb6ee5", "score": "0.6230109", "text": "function tep_get_countries_with_iso_codes($countries_id)\n{\n return tep_get_countries($countries_id, true);\n}", "title": "" }, { "docid": "826f56e448800db2531c07b621f064bc", "score": "0.62227154", "text": "public function getCountry(){\r\n return $this->country_model->find()->all();\r\n }", "title": "" }, { "docid": "cb05ee193b76c91fd27a327ea1aa11e6", "score": "0.6204501", "text": "public static function list()\n {\n $list = [];\n\n if (($handle = fopen(__DIR__ . '/data/countriesCodes.csv', \"r\")) !== FALSE) {\n $row = 1;\n\n while (($country = fgetcsv($handle, 1000, \",\")) !== FALSE) {\n if ($row > 1) {\n $list[] = new Country($country);\n }\n\n $row++;\n }\n\n fclose($handle);\n }\n\n return $list;\n }", "title": "" }, { "docid": "e008d890ede43fa0fd2d15309be0654d", "score": "0.62032306", "text": "private function _fetchCountries()\n {\n $this->options['countries'] = $this->_db->fetchAllKeyQuery(\"SELECT * FROM countries\");\n }", "title": "" } ]
0824606be6afaf69e1594825e497f68e
Helper function to clear all unseeded tables in the test database (including pivots)
[ { "docid": "b865a4ba386f24174080d714aa99a4fb", "score": "0.7955468", "text": "public static function dbClear(){\n\t\tif (App::runningUnitTests()) {\n\t\t\tself::clearModelTables(TestSettings::$modelTables);\n\t\t\tself::clearTables(TestSettings::$pivotTables);\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "601a1f311bed7f57037613ad2190c1b3", "score": "0.81916267", "text": "private function truncateAllTables()\n {\n $tables = Yii::app()->db->getSchema()->getTableNames();\n $fixtureManager = new CDbFixtureManager();\n foreach ($tables as $tableName) {\n if ($tableName === 'tbl_migration')\n continue;\n $fixtureManager->resetTable($tableName);\n }\n }", "title": "" }, { "docid": "c16b4028ad12e8f808d64f2bbd0e6702", "score": "0.805548", "text": "function tearDown()\n {\n foreach ($this->tables as $table) {\n foreach ($this->$table as $object) {\n delete_records($table, 'id', $object->id);\n }\n\n // If data has been entered in DB for any table, unset corresponding array\n if (count($this->$table) > 0) {\n unset ($this->$table);\n }\n }\n }", "title": "" }, { "docid": "04cdd82bacc43d5c82f85a4c8dfda0a5", "score": "0.79147536", "text": "public function clearTables()\n\t{\n\t\t// Clean the main tables\n\t\t$this->productTable->reset();\n\t\t$this->mediaTable->reset();\n\t\t$this->productMediaTable->reset();\n\t\t$this->productPriceTable->reset();\n\t\t$this->calcsTable->reset();\n\t\t$this->productCustomfieldTable->reset();\n\t\t$this->manufacturerTable->reset();\n\t\t$this->productManufacturerTable->reset();\n\t\t$this->productShoppergroupTable->reset();\n\n\t\t// Clean the language tables\n\t\t$this->productLangTable->reset();\n\t\t$this->manufacturerLangTable->reset();\n\t}", "title": "" }, { "docid": "1fde8e9cbcc29d60e67be619979ee8b3", "score": "0.78499633", "text": "function empty_tables() {\r\n $parts = $this->parts->all();\r\n $bots = $this->robots->all();\r\n //empty parts tables\r\n foreach ($parts as $part) {\r\n $this->parts->delete($part->id);\r\n }\r\n //empty robots table\r\n foreach ($bots as $bot) {\r\n $this->robots->delete($bot->id);\r\n }\r\n }", "title": "" }, { "docid": "eea3991c7f0e4ba7e4740e03e1bdba06", "score": "0.7522331", "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": "56e016dac6e7a4499e7aa7c1dad77c64", "score": "0.74738556", "text": "private function tear_down_all_import_tables()\n {\n foreach ($this->oes_driver->import_strategy->get_import_data_types() as $data_type) {\n $this->drop_import_table($data_type);\n }\n\n $this->oes_driver->enrol_plugin->trace->output('Import tables deleted.');\n }", "title": "" }, { "docid": "cec754346f855456d169ab2d4accbd82", "score": "0.74379957", "text": "function clear() {\n\n switch ($this->type) {\n case 'sqlite':\n case 'mysql':\n $query[0] = 'DROP TABLE `enrolled`;';\n\n $query[1] = 'DROP TABLE `paid`;';\n\n $query[2] = 'DROP TABLE `admin`;';\n\n $query[3] = 'DROP TABLE `log`';\n\n $query[4] = 'DROP TABLE `stage`';\n\n\t\t\t\t$query[5] = 'DROP TABLE `guest`';\n\n break;\n\n default:\n throw new Exception($this->type . \" is not a valid database type.\");\n break;\n\n }\n\n foreach ($query as $drop) {\n $this->query($drop);\n }\n\n /**\n * Integrity Checking goes here\n */\n\n }", "title": "" }, { "docid": "f48e9512c95009a8509885ab15b8226e", "score": "0.74205303", "text": "public function resetTables();", "title": "" }, { "docid": "d80d54fb25adf0c8e342b031ec4f06bf", "score": "0.74189234", "text": "protected function tearDown()\n {\n $this->testDBConnector->clearDataFromTables();\n }", "title": "" }, { "docid": "e200af8c0e0d280de7f810363bae0226", "score": "0.74138474", "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": "50f360bb65d8ae346cc616fb171fcb75", "score": "0.740164", "text": "function emptyTables()\n {\n $this->db->query(\"truncate `product_import`\", \\Zend\\Db\\Adapter\\Adapter::QUERY_MODE_EXECUTE);\n $this->db->query(\"truncate `product_categories_import`\", \\Zend\\Db\\Adapter\\Adapter::QUERY_MODE_EXECUTE);\n $this->db->query(\"delete from `product`\", \\Zend\\Db\\Adapter\\Adapter::QUERY_MODE_EXECUTE);\n $this->db->query(\"delete from `category`\", \\Zend\\Db\\Adapter\\Adapter::QUERY_MODE_EXECUTE);\n $this->db->query(\"delete from `product_categories`\", \\Zend\\Db\\Adapter\\Adapter::QUERY_MODE_EXECUTE);\n }", "title": "" }, { "docid": "1a303888b28335866bfb71b7e59ed9f4", "score": "0.7393271", "text": "public function emptyAllLogTables()\n\t{\n\t\t$db = Zend_Registry::get('db');\n\t\t$db->query('TRUNCATE TABLE '.Piwik::prefixTable('log_action'));\n\t\t$db->query('TRUNCATE TABLE '.Piwik::prefixTable('log_visit'));\n\t\t$db->query('TRUNCATE TABLE '.Piwik::prefixTable('log_link_visit_action'));\n\t}", "title": "" }, { "docid": "859549891fe473fb7e93b9726bfd3adf", "score": "0.7320936", "text": "public function tearDown()\n {\n $this->schema()->drop('users');\n $this->schema()->drop('users32');\n $this->schema()->drop('usersb');\n $this->schema()->drop('posts');\n $this->schema()->drop('posts32');\n $this->schema()->drop('postsb');\n $this->schema()->drop('rolesb');\n $this->schema()->drop('roles32');\n $this->schema()->drop('user32_role32');\n $this->schema()->drop('userb_roleb');\n }", "title": "" }, { "docid": "db59b7a07771e75b2a3b7dc56f815140", "score": "0.72571725", "text": "public function tearDown()\n {\n // TODO:Truncate database after each test\n $this->truncateTables();\n parent::tearDown();\n }", "title": "" }, { "docid": "c132e31c489af883c5b4925794d17d5c", "score": "0.72529805", "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": "f474d2385ab17e8233197eeddf49afb2", "score": "0.7245412", "text": "protected function tearDown(): void\r\n {\r\n parent::tearDown();\r\n\r\n $this->dropTables();\r\n\r\n unset($this->Db);\r\n\r\n // Remove as pastas criadas\r\n $this->clearApplicationData();\r\n }", "title": "" }, { "docid": "95322899d7bb195df2fc2c2f7bbb73ed", "score": "0.72296476", "text": "public function tearDown() {\n foreach ($this->dbRows as $dbRow) {\n $dbRow->delete();\n }\n foreach ($this->cacheIds as $cacheId) {\n Default_Helpers_Cache::remove($cacheId);\n }\n $this->dbRows = array();\n $this->cacheIds = array();\n parent::tearDown();\n }", "title": "" }, { "docid": "1f400a10c7d082dbf73fbea6366b4ee1", "score": "0.721851", "text": "protected function tearDown(): void {\n unset($this->table);\n }", "title": "" }, { "docid": "7209d4082893e5fcae734a7e3183dcde", "score": "0.7211167", "text": "public function dropAllData()\n {\n $database_name = $this->conn->getDatabase();\n\n $tables = $this->conn->query(\"SELECT concat('DROP TABLE IF EXISTS ', table_name, ';') FROM information_schema.tables WHERE table_schema = '$database_name';\")->fetchAll();\n\n $queries = \"SET FOREIGN_KEY_CHECKS=0;\\n\";\n\n foreach ($tables as $aTable){\n $queries .= reset($aTable);\n }\n\n $this->conn->executeQuery($queries);\n\n $editora_structure = file_get_contents(__DIR__ .'/../../../../data/editora.sql');\n\n $this->conn->executeQuery($editora_structure);\n }", "title": "" }, { "docid": "72c2de54073d5a336b5b69382e342b18", "score": "0.7181668", "text": "public static function globalResetAll()\r\n {\r\n $db = self::dsConnect();\r\n $db->query('SHOW TABLES');\r\n while($row = $db->fetch())\r\n {\r\n $toLowerFName = 'Tables_in_' . DB_NAME;\r\n mysql_query(\"TRUNCATE \" . $row->$toLowerFName);\r\n //$returnMe[$row->Field] = $table.'.'.$row->Field;\r\n }\r\n return true; \r\n \r\n \r\n }", "title": "" }, { "docid": "faa438b5512bbcdcc5325865eff5a0bb", "score": "0.71661", "text": "protected function tearDown()\n\t {\n\t\tunset($this->object);\n\t\t$this->_db->execUntilSuccessful(\"DROP TABLE IF EXISTS `FailedDocuments`\");\n\t\t$this->_db->execUntilSuccessful(\"DROP TABLE IF EXISTS `HTTPcache`\");\n\t }", "title": "" }, { "docid": "9161e88615e127c6beb453cbfa32bca4", "score": "0.7108594", "text": "protected function truncateAllTables()\n {\n $tableNames = self::getAllDatabaseTables(self::$databaseName);\n\n foreach ($tableNames as $record) {\n $tableName = $record['TABLE_NAME'];\n\n // Truncate the table.\n self::$pdo->exec(\"TRUNCATE TABLE {$tableName};\");\n }\n }", "title": "" }, { "docid": "fb1d335bd3d3fa394c5b31890e4e9342", "score": "0.71023613", "text": "protected function tearDown() {\n\t\tparent::tearDown();\n\n\t\tglobal $wpdb;\n\n\t\t$wpdb->query( 'ROLLBACK' );\n\n\t\tremove_filter( 'query', array( $this, '_create_temporary_tables' ) );\n\t\tremove_filter( 'query', array( $this, '_drop_temporary_tables' ) );\n\t}", "title": "" }, { "docid": "194ed9ca3b1b96428213daf3cad869f6", "score": "0.7062917", "text": "public function tearDown()\n {\n $sqlBuilder = new \\Apps\\Database\\Delete();\n $sql = $sqlBuilder->delete()->from('Shows')->where('Country = :country')->result();\n $pdo = array('country' => 'UnitTest');\n $this->database->run($sql, $pdo);\n\n $sql = $sqlBuilder->delete()->from('Songs')->where('Title LIKE :title')->result();\n $pdo = array('title' => 'UnitTest%');\n $this->database->run($sql, $pdo);\n\n $sql = $sqlBuilder->delete()->from('People')->where('Name LIKE :name')->result();\n $pdo = array('name' => 'UnitTest%');\n $this->database->run($sql, $pdo);\n\n $this->database->close();\n }", "title": "" }, { "docid": "301364344a31edc4aa925abb34240c8a", "score": "0.7022978", "text": "public function truncateAllTables()\n {\n $tables = DB::select('SHOW TABLES');\n\n $tables_in_db = 'Tables_in_'.env('DB_DATABASE');\n\n foreach ($tables as $table) {\n if ($table->$tables_in_db !== 'migrations')\n DB::table($table->$tables_in_db)->truncate();\n\n $output = new \\Symfony\\Component\\Console\\Output\\ConsoleOutput();\n $output->writeln($table->$tables_in_db . ' truncate successful');\n }\n }", "title": "" }, { "docid": "54f269c977979c98d484bb6de5bb2eee", "score": "0.6976396", "text": "public function dropAllTables()\n {\n $this->connection->statement($this->grammar->compileDropAllForeignKeys());\n\n $this->connection->statement($this->grammar->compileDropAllTables());\n }", "title": "" }, { "docid": "4fcd1c37e2945a71a3794a1d23290771", "score": "0.69731426", "text": "public function deleteTables()\n {\n $db = Core::$db;\n\n $db->query(\"DROP TABLE IF EXISTS {PREFIX}module_form_builder_forms\");\n $db->execute();\n\n $db->query(\"DROP TABLE IF EXISTS {PREFIX}module_form_builder_form_placeholders\");\n $db->execute();\n\n $db->query(\"DROP TABLE IF EXISTS {PREFIX}module_form_builder_form_templates\");\n $db->execute();\n\n $db->query(\"DROP TABLE IF EXISTS {PREFIX}module_form_builder_templates\");\n $db->execute();\n\n $db->query(\"DROP TABLE IF EXISTS {PREFIX}module_form_builder_template_sets\");\n $db->execute();\n\n $db->query(\"DROP TABLE IF EXISTS {PREFIX}module_form_builder_template_set_placeholders\");\n $db->execute();\n\n $db->query(\"DROP TABLE IF EXISTS {PREFIX}module_form_builder_template_set_placeholder_opts\");\n $db->execute();\n\n $db->query(\"DROP TABLE IF EXISTS {PREFIX}module_form_builder_template_set_resources\");\n $db->execute();\n }", "title": "" }, { "docid": "df8dc9d46d09590ff45383c1b72a6b8e", "score": "0.69725424", "text": "public function deleteAll() {\n $this->resetDatabase();\n }", "title": "" }, { "docid": "a687cc1238ba941121b6aeb34862cfef", "score": "0.6969833", "text": "public function tearDown()\n {\n \\r\\tableDrop(PersistentObject::collectionName())->run($this->fixture->getConnection()->getHandle());\n\n parent::tearDown();\n }", "title": "" }, { "docid": "fa6374e5d5be16381fcc553253b67efe", "score": "0.69678855", "text": "protected function tearDown(): void\n {\n $this->schema()->drop('users');\n $this->schema()->drop('users_created_at');\n $this->schema()->drop('users_updated_at');\n }", "title": "" }, { "docid": "e411f8f868a0507a386a0ebf91f21e03", "score": "0.6948806", "text": "public function tearDown()\n {\n $this->dropTable('test_model1');\n\n parent::tearDown();\n }", "title": "" }, { "docid": "202b1e49e4f4616700079b9d27f365f7", "score": "0.6944598", "text": "protected function tearDown()\n { \n\t\tPhactory::reset();\n\n $this->pdo->exec(\"DROP TABLE `users`\");\n }", "title": "" }, { "docid": "5b275ffb1a2a5851dab14b222bed67d6", "score": "0.694172", "text": "public static function dbClearTable($table){\n\t\tif (App::runningUnitTests()) {\n\t\t\tif (DB::table($table)->count() != 0) {\n\t\t\t\t//Turn foreign key checks off <- USE WITH CAUTION!\n\t\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\t\t\t\t//Delete all entries & reset indexes\n\t\t\t\tDB::table($table)->truncate();\n\t\t\t\t//Turn foreign key checks on <- SHOULD RESET ANYWAY BUT JUST TO MAKE SURE!\n\t\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "592fc476411a669672da8fec0c224b58", "score": "0.692113", "text": "function DB_empty_curMonth_tables()\n{\n global $connection;\n $results = $connection->query(\"TRUNCATE TABLE outcome\");\n if (!$results) {\n print (\"error=\".$connection->get_error().\"<br>\");\n return false;\n }\n $results = $connection->query(\"TRUNCATE TABLE income_and_status\");\n if (!$results) {\n print (\"error=\".$connection->get_error().\"<br>\");\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "cf99cb71d72250a212053c7761bc74a0", "score": "0.69199383", "text": "protected function recreate_tables()\n {\n }", "title": "" }, { "docid": "121b6a44d6f948f94bf605c287aa360f", "score": "0.6915894", "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": "fb23b7e4e8d34f15f847d03666a8b921", "score": "0.6914088", "text": "protected function tearDown(): void\n {\n $this->_connection->dropTable($this->_tableName);\n $this->_connection->resetDdlCache($this->_tableName);\n $this->_connection = null;\n }", "title": "" }, { "docid": "b58b24cc54c2fc789f5609cda83e2db0", "score": "0.690833", "text": "protected function tearDown()\n {\n $this->_oUpay->delete('_testOxId');\n $this->_oUpay->delete('_testOxId2');\n $this->cleanUpTable('oxuserpayments');\n $this->cleanUpTable('oxorder');\n\n parent::tearDown();\n }", "title": "" }, { "docid": "dc80450d4a0f4ea470c461c129791dac", "score": "0.68958336", "text": "function empty_facts_and_rules_table($con)\n{\n\t$result1 = mysqli_query($con,\"TRUNCATE tbl_facts\");\n\t$result2 = mysqli_query($con,\"TRUNCATE tbl_rules\");\n\tif(!($result1 && $result2))\n\t\t die(\"Tables not found\");\n}", "title": "" }, { "docid": "b6a108ad9b137ceff77ed3f618d67bf1", "score": "0.684797", "text": "protected function setUp() {\n $db = Kohana::config('database.default.connection.database');\n Kohana::config('database')->default['connection']['database'] = 'test_'.$db;\n DB::query(Database::DELETE, 'DROP TABLE IF EXISTS ut_init, ut_pop, db_deltas')\n ->execute();\n }", "title": "" }, { "docid": "c9bc7f4395ae0aad03982c63b0452266", "score": "0.6831635", "text": "private function dropOldTables() \n\t{\n\t\t$query = $this->dbQuery(\"DROP TABLE IF EXISTS `\".$this->_db_prefix.\"articles`\");\n\t\t$query = $this->dbQuery(\"DROP TABLE IF EXISTS `\".$this->_db_prefix.\"article_cats`\");\n\t\t$query = $this->dbQuery(\"DROP TABLE IF EXISTS `\".$this->_db_prefix.\"captcha`\");\n\t\t$query = $this->dbQuery(\"DROP TABLE IF EXISTS `\".$this->_db_prefix.\"custom_pages`\");\n\t\t$query = $this->dbQuery(\"DROP TABLE IF EXISTS `\".$this->_db_prefix.\"downloads`\");\n\t\t$query = $this->dbQuery(\"DROP TABLE IF EXISTS `\".$this->_db_prefix.\"download_cats`\");\n\t\t$query = $this->dbQuery(\"DROP TABLE IF EXISTS `\".$this->_db_prefix.\"faqs`\");\n\t\t$query = $this->dbQuery(\"DROP TABLE IF EXISTS `\".$this->_db_prefix.\"faq_cats`\");\n\t\t$query = $this->dbQuery(\"DROP TABLE IF EXISTS `\".$this->_db_prefix.\"forums`\");\n\t\t$query = $this->dbQuery(\"DROP TABLE IF EXISTS `\".$this->_db_prefix.\"forum_attachments`\");\n\t\t$query = $this->dbQuery(\"DROP TABLE IF EXISTS `\".$this->_db_prefix.\"flood_control`\");\n\t\t$query = $this->dbQuery(\"DROP TABLE IF EXISTS `\".$this->_db_prefix.\"infusions`\");\n\t\t$query = $this->dbQuery(\"DROP TABLE IF EXISTS `\".$this->_db_prefix.\"messages_options`\");\n\t\t$query = $this->dbQuery(\"DROP TABLE IF EXISTS `\".$this->_db_prefix.\"new_users`\");\n\t\t$query = $this->dbQuery(\"DROP TABLE IF EXISTS `\".$this->_db_prefix.\"photos`\");\n\t\t$query = $this->dbQuery(\"DROP TABLE IF EXISTS `\".$this->_db_prefix.\"photo_albums`\");\n\t\t$query = $this->dbQuery(\"DROP TABLE IF EXISTS `\".$this->_db_prefix.\"poll_votes`\");\n\t\t$query = $this->dbQuery(\"DROP TABLE IF EXISTS `\".$this->_db_prefix.\"polls`\");\n\t\t$query = $this->dbQuery(\"DROP TABLE IF EXISTS `\".$this->_db_prefix.\"posts`\");\n\t\t$query = $this->dbQuery(\"DROP TABLE IF EXISTS `\".$this->_db_prefix.\"ratings`\");\n\t\t$query = $this->dbQuery(\"DROP TABLE IF EXISTS `\".$this->_db_prefix.\"submissions`\");\n\t\t$query = $this->dbQuery(\"DROP TABLE IF EXISTS `\".$this->_db_prefix.\"vcode`\");\n\t\t$query = $this->dbQuery(\"DROP TABLE IF EXISTS `\".$this->_db_prefix.\"buttons`\");\n\t\t$query = $this->dbQuery(\"DROP TABLE IF EXISTS `\".$this->_db_prefix.\"cautions`\");\n\t\t$query = $this->dbQuery(\"DROP TABLE IF EXISTS `\".$this->_db_prefix.\"cautions_config`\");\n\t\t$query = $this->dbQuery(\"DROP TABLE IF EXISTS `\".$this->_db_prefix.\"colors`\"); \n\t\t$query = $this->dbQuery(\"DROP TABLE IF EXISTS `\".$this->_db_prefix.\"panels_article`\");\n\t\t$query = $this->dbQuery(\"DROP TABLE IF EXISTS `\".$this->_db_prefix.\"panels_download`\");\n\t\t$query = $this->dbQuery(\"DROP TABLE IF EXISTS `\".$this->_db_prefix.\"panels_forum`\");\n\t\t$query = $this->dbQuery(\"DROP TABLE IF EXISTS `\".$this->_db_prefix.\"rss_builder`\");\n\t\t$query = $this->dbQuery(\"DROP TABLE IF EXISTS `\".$this->_db_prefix.\"site_links`\");\n\t\t$query = $this->dbQuery(\"DROP TABLE IF EXISTS `\".$this->_db_prefix.\"site_links_groups`\");\n\t\t$query = $this->dbQuery(\"DROP TABLE IF EXISTS `\".$this->_db_prefix.\"threads`\");\n\t\t$query = $this->dbQuery(\"DROP TABLE IF EXISTS `\".$this->_db_prefix.\"thread_notify`\");\n\t\t$query = $this->dbQuery(\"DROP TABLE IF EXISTS `\".$this->_db_prefix.\"user_groups`\");\n\t\t$query = $this->dbQuery(\"DROP TABLE IF EXISTS `\".$this->_db_prefix.\"eps_points`\");\n\t\t$query = $this->dbQuery(\"DROP TABLE IF EXISTS `\".$this->_db_prefix.\"eps_rangs`\");\n\t\t$query = $this->dbQuery(\"DROP TABLE IF EXISTS `\".$this->_db_prefix.\"forumrang`\");\n\t\t$query = $this->dbQuery(\"DROP TABLE IF EXISTS `\".$this->_db_prefix.\"weblinks`\");\n\t\t$query = $this->dbQuery(\"DROP TABLE IF EXISTS `\".$this->_db_prefix.\"weblink_cats`\");\n\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "2d09d360376b35e0219cbc68bf462e38", "score": "0.68299574", "text": "protected function tearDown()\n {\n parent::tearDown();\n $pdo = $this->getDatabaseTester()->getConnection()->getConnection();\n $pdo->exec(\"DELETE FROM eav_entity;\");\n $pdo->exec(\"DELETE FROM eav_entity_int;\");\n $pdo->exec(\"DELETE FROM eav_entity_decimal;\");\n $pdo->exec(\"DELETE FROM eav_entity_string;\");\n $pdo->exec(\"DELETE FROM eav_entity_text;\");\n $pdo->exec(\"DELETE FROM eav_attribute;\");\n }", "title": "" }, { "docid": "aa28f37fcc5970a24715f0a04d01baa6", "score": "0.6827371", "text": "static function empty_temp_db() {\n\t\tif(self::using_temp_db()) {\n\t\t\t$dbadmin = new DatabaseAdmin();\n\t\t\t$dbadmin->clearAllData();\n\t\t\t\n\t\t\t// Some DataExtensions keep a static cache of information that needs to \n\t\t\t// be reset whenever the database is cleaned out\n\t\t\tforeach(array_merge(ClassInfo::subclassesFor('DataExtension'), ClassInfo::subclassesFor('DataObject')) as $class) {\n\t\t\t\t$toCall = array($class, 'on_db_reset');\n\t\t\t\tif(is_callable($toCall)) call_user_func($toCall);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "3828b71119c913b75e290b7933033f99", "score": "0.6823395", "text": "private function cleanCoreTables() {\n\n $core_tables = [\n 'glpi_datacenters',\n 'glpi_dcrooms',\n 'glpi_items_racks',\n 'glpi_pdus',\n 'glpi_racks',\n 'glpi_rackmodels',\n 'glpi_racktypes',\n 'glpi_passivedcequipments',\n 'glpi_passivedcequipmenttypes',\n 'glpi_passivedcequipmentmodels',\n ];\n\n foreach ($core_tables as $table) {\n $result = $this->db->query('TRUNCATE ' . DB::quoteName($table));\n\n if (!$result) {\n throw new RuntimeException(\n sprintf('Unable to truncate table \"%s\"', $table)\n );\n }\n }\n }", "title": "" }, { "docid": "34a197d7cfafec201486d323d0943900", "score": "0.6819414", "text": "function base_clear(){\n $tables = array(\n 'oc_product',\n 'oc_product_image',\n 'oc_manufacturer',\n 'oc_manufacturer_description',\n 'oc_product_description',\n 'oc_product_to_category',\n 'oc_product_attribute',\n 'oc_attribute',\n 'oc_attribute_description',\n // 'oc_attribute_value',\n // 'oc_category',\n // 'oc_category_description',\n 'oc_product_to_store',\n // 'oc_category_to_store',\n 'oc_manufacturer_to_store',\n 'oc_product_to_layout',\n // 'oc_category_to_layout',\n );\n foreach ($tables as $table)\n {\n sDb::query(\"TRUNCATE TABLE $table\");\n echo \"Таблица $table очищена\\n\";\n }\n}", "title": "" }, { "docid": "209d5e3a66ff038a8921a637f7935423", "score": "0.68045837", "text": "protected function tearDown(): void\n {\n parent::tearDown();\n\n $this->dropTables();\n\n unset($this->repository);\n\n $this->clearDataDir();\n }", "title": "" }, { "docid": "c0a73e209d2d1e34914de39d5f15f6d4", "score": "0.68042094", "text": "public function truncate_all_tables_associated_with_contract_table()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n ContractParticipant::truncate();\n Contract::truncate();\n Participant::truncate();\n Payment::truncate();\n Invoice::truncate();\n Legal::truncate();\n Individual::truncate();\n Client::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $this->assertNull(ContractParticipant::first());\n $this->assertNull(Contract::first());\n $this->assertNull(Participant::first());\n $this->assertNull(Payment::first());\n $this->assertNull(Invoice::first());\n $this->assertNull(Legal::first());\n $this->assertNull(Individual::first());\n $this->assertNull(Client::first());\n }", "title": "" }, { "docid": "cccbac6cf93af27d3a33b31439b9be9b", "score": "0.6779593", "text": "public function dropAllTables()\n {\n $tables = [];\n\n $excludedTables = $this->connection->getConfig('dont_drop') ?? ['spatial_ref_sys'];\n\n foreach ($this->getAllTables() as $row) {\n $row = (array) $row;\n\n $table = reset($row);\n\n if (! in_array($table, $excludedTables)) {\n $tables[] = $table;\n }\n }\n\n if (empty($tables)) {\n return;\n }\n\n $this->connection->statement(\n $this->grammar->compileDropAllTables($tables)\n );\n }", "title": "" }, { "docid": "cccbac6cf93af27d3a33b31439b9be9b", "score": "0.6779593", "text": "public function dropAllTables()\n {\n $tables = [];\n\n $excludedTables = $this->connection->getConfig('dont_drop') ?? ['spatial_ref_sys'];\n\n foreach ($this->getAllTables() as $row) {\n $row = (array) $row;\n\n $table = reset($row);\n\n if (! in_array($table, $excludedTables)) {\n $tables[] = $table;\n }\n }\n\n if (empty($tables)) {\n return;\n }\n\n $this->connection->statement(\n $this->grammar->compileDropAllTables($tables)\n );\n }", "title": "" }, { "docid": "caf2d2d0ff03dbeace0d0977c709a42b", "score": "0.6770395", "text": "public function tearDown()\n {\n $GLOBALS['db']->query(\"DELETE FROM accounts WHERE id= '{$this->account->id}'\");\n $GLOBALS['db']->query(\"DELETE FROM leads WHERE id= '{$this->lead->id}'\");\n $GLOBALS['db']->query(\"DELETE FROM contacts WHERE id= '{$this->contact->id}'\");\n $GLOBALS['db']->query(\"DELETE FROM campaigns WHERE id= '{$this->campaign->id}'\");\n $GLOBALS['db']->query(\"DELETE FROM campaign_log WHERE campaign_id= '{$this->campaign->id}'\");\n SugarTestUserUtilities::removeAllCreatedAnonymousUsers();\n\n //unset values\n unset($GLOBALS['current_user']);\n unset($this->user);\n unset($this->account);\n unset($this->contact);\n unset($this->lead);\n unset($this->campaign);\n }", "title": "" }, { "docid": "950769796434286a85ca50090d1eb09b", "score": "0.67507803", "text": "public static function dropTables()\n\t{\n\t}", "title": "" }, { "docid": "0f850adf6e59498638528b263c7efc06", "score": "0.6732337", "text": "protected function resetTable(): void\n {\n DB::table($this->getTable())->delete();\n }", "title": "" }, { "docid": "874eef1e936932e9f7de134eb3806a3a", "score": "0.67115945", "text": "protected function tearDown()\n\t {\n\t\tunset($this->object);\n\n\t\t$conn = $this->getConnection();\n\t\t$db = $conn->getConnection();\n\t\t$db->exec(\"DROP TABLE IF EXISTS `MySQLdatabase`;\");\n\n\t\tunset($GLOBALS[\"errstr\"]);\n\t\tunset($GLOBALS[\"stuckerror\"]);\n\t }", "title": "" }, { "docid": "816a523f4a4b3c1031f496e8e3e6e0a2", "score": "0.67050594", "text": "public function deleteTable(){\n\t \n\t\tglobal $wpdb;\n\n\t\t$wpdb->query('DELETE FROM wp_nouveautes_test WHERE datep_nouveaute > \"2014-04-13\"');\n\n\t\t$wpdb->query('DELETE FROM wp_custom_categories_test WHERE term_id > 247');\n\t\t\t\t \n\t\t$wpdb->query('TRUNCATE TABLE wp_subcategories_test');\n\t\t\n\t\t$wpdb->query('TRUNCATE TABLE wp_extracategories_test');\n\t\t\n\t\t$wpdb->query('TRUNCATE TABLE wp_updated');\n\t\t \t\t \n\t}", "title": "" }, { "docid": "54ff04646d50ed8a5661d78d8ff15b74", "score": "0.6689768", "text": "private static function clearTables(array $tableArray){\n\t\tif (App::runningUnitTests()) {\n\t\t\t//Truncate every table in the array\n\t\t\tforeach ($tableArray as $table){\n\t\t\t\tself::dbClearTable($table);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "f0520c1c213c7e5ecf375dbc21f719ce", "score": "0.6668668", "text": "public function testDrop()\n {\n // make sure all tables were created\n $this->fixture->setup();\n $tables = $this->fixture->getDBObject()->fetchList('SHOW TABLES');\n $this->assertEquals(6, \\count($tables));\n\n // remove all tables\n $this->fixture->drop();\n\n // check that all tables were removed\n $tables = $this->fixture->getDBObject()->fetchList('SHOW TABLES');\n $this->assertEquals(0, \\count($tables));\n }", "title": "" }, { "docid": "8e3d72bea7307d6c48617daae8d867ed", "score": "0.66577756", "text": "public function resetTable();", "title": "" }, { "docid": "6cc57a7b83fff38ec01c8ecb26441970", "score": "0.6641983", "text": "protected function dropDatabaseTables()\n {\n $this->useCamundaDatabase(function() {\n if ($tables = DB::select('SHOW TABLES')) {\n $this->line('Dropping existing database tables...');\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n foreach ($tables as $table) {\n $array = get_object_vars($table);\n Schema::drop($array[key($array)]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS = 1');\n\n $this->info('All tables dropped.');\n }\n });\n }", "title": "" }, { "docid": "a8d9d3fd7672e259172351ba7169a401", "score": "0.66298664", "text": "private function truncate()\n {\n // Deactivates Foreign Key constraints\n $this->connection->query('SET foreign_key_checks = 0');\n // Truncates\n $this->connection->query('TRUNCATE TABLE videogame');\n $this->connection->query('TRUNCATE TABLE platform');\n $this->connection->query('TRUNCATE TABLE review');\n // etc.\n }", "title": "" }, { "docid": "209183f02969dc3953b5e6ee56c0545f", "score": "0.66284144", "text": "protected function tearDown()\n {\n oxDb::getDb()->execute( \"delete from oxarticles where oxid='_testArticle'\" );\n oxDb::getDb()->execute( \"delete from oxobject2selectlist where oxid='_testOxid'\" );\n oxDb::getDb()->execute( \"delete from oxobject2selectlist where oxobjectid='_testRemove'\" );\n oxDb::getDb()->execute( \"delete from oxobject2selectlist where oxobjectid='_testAdd'\" );\n oxDb::getDb()->execute( \"delete from oxselectlist where oxid='_testSelectList'\" );\n oxDb::getDb()->execute( \"delete from oxobject2article where oxid='_testOxid'\" );\n \n parent::tearDown();\n }", "title": "" }, { "docid": "00d75307ac08df4ba304325061bd8fa0", "score": "0.6615436", "text": "public function tearDown()\n {\n unset($this->db);\n unset($this->statement);\n unset($this->mockData);\n }", "title": "" }, { "docid": "e44064382e4ae1bedb54a26f7be44c80", "score": "0.6604182", "text": "protected function tearDown() {\r\n\t\t$this->dbh = null;\r\n\t\t$this->storage = null;\r\n\t\tparent::tearDown ();\r\n\t}", "title": "" }, { "docid": "c0314c68875c55d32ab0bca99b045394", "score": "0.6595857", "text": "protected function tearDown()\n\t {\n\t\tunset($this->object);\n\t\t$this->_db->exec(\"DROP TABLE IF EXISTS `FailedDocuments`\");\n\t }", "title": "" }, { "docid": "067e429fffcfb8645f43521c26e9bd1e", "score": "0.6595476", "text": "protected function tearDown() {\n\t\t// delete all data\n\t\tforeach ($this->data as $data) {\n\t\t\t$data->delete();\n\t\t}\n\t\t$this->config=null;\n\t\tparent::tearDown ();\n\t}", "title": "" }, { "docid": "158941c4f9f5a777564603ab6ea92320", "score": "0.65893894", "text": "public function repair() {\n\t\t$tables = $this->tables->getCache()->getAll();\n\t\tforeach ($tables as $table) {\n\t\t\t$table->getLayout()->repair();\n\t\t}\n\t}", "title": "" }, { "docid": "65b94a96f40c04f9dbcfea9d35c748c1", "score": "0.6582824", "text": "function cleanTables($test = false) {\n\n\t\t$this->cleanForeignKey('sotf_blobs', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_blobs', 'object_id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_nodes', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_user_permissions', 'permission_id', 'sotf_permissions', 'id');\n\n\t\t$this->cleanForeignKey('sotf_stations', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_contacts', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_contacts', 'station_id', 'sotf_stations', 'id');\n\n\t\t$this->cleanForeignKey('sotf_series', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_series', 'station_id', 'sotf_stations', 'id');\n\n\t\t$this->cleanForeignKey('sotf_object_roles', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_object_roles', 'contact_id', 'sotf_contacts', 'id');\n\n\t\t$this->cleanForeignKey('sotf_object_roles', 'object_id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_programmes', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_programmes', 'station_id', 'sotf_stations', 'id');\n\n\t\t//// series field is not compulsory! \n\t\t//// $this->cleanForeignKey('sotf_programmes', 'series_id', 'sotf_series', 'id');\n\n\t\t$this->cleanForeignKey('sotf_rights', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_rights', 'prog_id', 'sotf_programmes', 'id');\n\n\t\t$this->cleanForeignKey('sotf_extradata', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_extradata', 'prog_id', 'sotf_programmes', 'id');\n\n\t\t$this->cleanForeignKey('sotf_other_files', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_other_files', 'prog_id', 'sotf_programmes', 'id');\n\n\t\t$this->cleanForeignKey('sotf_media_files', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_media_files', 'prog_id', 'sotf_programmes', 'id');\n\n\t\t$this->cleanForeignKey('sotf_links', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_links', 'prog_id', 'sotf_programmes', 'id');\n\n\t\t$this->cleanForeignKey('sotf_topic_tree_defs', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_topic_trees', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_topics', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_topics', 'topic_id', 'sotf_topic_tree_defs', 'id');\n\n\t\t$this->cleanForeignKey('sotf_prog_topics', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_prog_topics', 'prog_id', 'sotf_programmes', 'id');\n\n\t\t$this->cleanForeignKey('sotf_genres', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_roles', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_role_names', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_role_names', 'role_id', 'sotf_roles', 'role_id');\n\n\t\t$this->cleanForeignKey('sotf_deletions', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_playlists', 'prog_id', 'sotf_programmes', 'id');\n\n\t\t$this->cleanForeignKey('sotf_ratings', 'prog_id', 'sotf_programmes', 'id');\n\n\t\t$this->cleanForeignKey('sotf_prog_rating', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_prog_rating', 'prog_id', 'sotf_programmes', 'id');\n\n\t\t$this->cleanForeignKey('sotf_prog_refs', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_prog_refs', 'prog_id', 'sotf_programmes', 'id');\n\n\t\t$this->cleanForeignKey('sotf_prog_stats', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_prog_stats', 'prog_id', 'sotf_programmes', 'id');\n\t\t\n\t\t$this->cleanForeignKey('sotf_prog_stats', 'station_id', 'sotf_stations', 'id');\n\n\t\t$this->cleanForeignKey('sotf_stats', 'prog_id', 'sotf_programmes', 'id');\n\n\t\t$this->cleanForeignKey('sotf_stats', 'station_id', 'sotf_stations', 'id');\n\n\t\t$this->cleanForeignKey('sotf_comments', 'prog_id', 'sotf_programmes', 'id');\n\n\t\t$this->cleanForeignKey('sotf_to_forward', 'prog_id', 'sotf_programmes', 'id');\n\n\t\t$this->cleanForeignKey('sotf_unique_access', 'prog_id', 'sotf_programmes', 'id');\n\n\t\t$this->cleanForeignKey('sotf_user_progs', 'prog_id', 'sotf_programmes', 'id');\n\n\t\t$this->cleanForeignKey('sotf_portals', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_station_mappings', 'id_at_node', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_station_mappings', 'station', 'sotf_stations', 'id');\n\n\t\t// very important! for syncing!!\n\t\t$this->cleanForeignKey('sotf_object_status', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanNodeObjects();\n\n\t}", "title": "" }, { "docid": "330932a76526821bb4aa65ed5b2679a4", "score": "0.65743834", "text": "protected function tearDown()\n {\n // Rollback transaction\n if ($conn = $this->getConnection()) {\n $conn->rollback();\n }\n\n $this->getConnection()->clear();\n\n if (function_exists('gc_collect_cycles')) {\n gc_collect_cycles();\n }\n }", "title": "" }, { "docid": "e30f211eb2bbc13c86963b17438a262a", "score": "0.65739846", "text": "function drop_all_tables($db)\n{\n $db->query(\"SET foreign_key_checks = 0\");\n\n if ($result = $db->query(\"SHOW TABLES\")) {\n while ($row = $result->fetch_array(MYSQLI_NUM)) {\n $db->query(\"DROP TABLE IF EXISTS \" . $row[0]);\n }\n }\n\n $db->query(\"SET foreign_key_checks = 1\");\n}", "title": "" }, { "docid": "8b35cf99ce3ec3d61449ba7dcf5d43f9", "score": "0.65657413", "text": "public function clearDatabases();", "title": "" }, { "docid": "b5cfd4f83434aff24e42af1aa9accb8d", "score": "0.65544105", "text": "private function truncateReplicaTables()\n {\n foreach ($this->dimensionCollectionFactory->create() as $dimension) {\n $dimensionTable = $this->dimensionTableMaintainer->getMainReplicaTable($dimension);\n $this->_defaultIndexerResource->getConnection()->truncateTable($dimensionTable);\n }\n }", "title": "" }, { "docid": "c361a02eb0d43121a652d1703f506750", "score": "0.65349513", "text": "public function tearDown()\n {\n $this->connection->execute('DROP TABLE IF EXISTS `writers`');\n\n parent::tearDown();\n }", "title": "" }, { "docid": "8aed99a6fbe1390090028d2c3fd0ba79", "score": "0.65322953", "text": "public function tearDown() {\n\t\t$sql = \"DELETE FROM solrexample WHERE 1=1\";\n\t\tExampleSolrActiveRecord::model()->getDbConnection()->createCommand($sql)->execute();\n\t}", "title": "" }, { "docid": "d555ec83ab95b05317fe374e4d0c1bf4", "score": "0.6528809", "text": "protected function tearDown()\n {\n ORM::reset_db();\n }", "title": "" }, { "docid": "22ed18de9f30d9dfee0fa12a2e969a97", "score": "0.6526432", "text": "public function checkUneccesaryTables()\n {\n //We need have turned on force flag. because we need check all tables for receiving their table names.\n if ( $this->option('force') == false ){\n $this->error('Check for uneccessary tables is possible only with -f/--force flag.');\n return;\n }\n\n $tables = array_map(function($item){\n return array_values((array)$item)[0];\n }, DB::select('SHOW TABLES'));\n\n foreach (array_diff($tables, $this->initializedTables) as $table) {\n $this->info('Unknown table: <comment>'.$table.'</comment>');\n\n if ( $this->confirm('Would you like to drop <comment>'.$table.'</comment> table with <comment>'.DB::table($table)->count().' rows</comment>? [y|N]') ) {\n Schema::drop($table);\n $this->line('<comment>+ Dropped table:</comment> '.$table);\n } else {\n $this->line('<info>+ Skipped table:</info> '.$table);\n }\n }\n }", "title": "" }, { "docid": "13b0a7c1bfccb1532d369294915c951a", "score": "0.6519535", "text": "protected function tearDown()\n {\n User::deleteAll();\n Course::deleteAll();\n }", "title": "" }, { "docid": "01259ed6e458362960ff7694f5466233", "score": "0.6517447", "text": "protected function tearDown() {\n\t\twhile ($this->getDb()->getNestedTransactionsCounter() > 0) {\n\t\t\t$this->getDb()->rollBack();\n\t\t}\n\t}", "title": "" }, { "docid": "40f6556a39e7aa149bc5598913973f80", "score": "0.6513536", "text": "function drop_all_tables($conn) {\n\t\t$sql = \"show tables;\";\n\t\t$result_msg_arr = run_query($conn, $sql);\n\t\t$query_result_arr = $result_msg_arr[1];\n\t\tforeach($query_result_arr as $row) {\n\t\t\t$tbl = $row[\"Tables_in_appbase\"];\n\t\t\t$sql = \"drop table if exists \". $tbl . \";\";\n\t\t\t$result_msg_arr = run_modify_query($conn, $sql);\n\t\t\tif (strlen($result_msg_arr[0]) < 1) {\n\t\t\t\techo \"Table \" . $tbl . \" dropped.\\n\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\techo \"Problem, table \" . $tbl . \" NOT dropped.\\n\";\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "title": "" }, { "docid": "5d995972d2f3f9e1bd2d62473d9b0ada", "score": "0.65069985", "text": "private static function clearModelTables(array $modelTableArray){\n\t\tif (App::runningUnitTests()) {\n\t\t\t//Get count for each table & truncate it if its not empty\n\t\t\tforeach ($modelTableArray as $model => $table){\n\t\t\t\tself::dbClearTable($table);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "d8cdf5ac7a0fddfb3666c31e63d1845b", "score": "0.6499361", "text": "public function deleteAll()\n {\n $query = 'TRUNCATE TABLE `'. $this->getTableName() .'`';\n $this->db->sql_query($query);\n\n $query = 'TRUNCATE TABLE `' . $GLOBALS['tableprefix'] . 'watched' . '`';\n $this->db->sql_query($query);\n }", "title": "" }, { "docid": "277dbf14124d04f66fdb8d2dc1c301b1", "score": "0.64940995", "text": "private function drop_rucss_database_tables() {\n\t\t// If the table exist, then drop the table.\n\t\t$this->drop_rucss_current_site_tables();\n\n\t\tif ( ! is_multisite() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tforeach ( get_sites( [ 'fields' => 'ids' ] ) as $site_id ) {\n\t\t\tswitch_to_blog( $site_id );\n\n\t\t\t$this->drop_rucss_current_site_tables();\n\n\t\t\trestore_current_blog();\n\t\t}\n\n\t}", "title": "" }, { "docid": "3bbbc971225c364eb50f00ea5342159e", "score": "0.6480429", "text": "public function clearTests()\n {\n $this->tests->clear();\n }", "title": "" }, { "docid": "1ec5bbeb0b6a0c31c941cb32eb9cf271", "score": "0.6470697", "text": "protected function tearDown()\n {\n oxDb::getDb()->execute( \"delete from oxobject2attribute where oxobjectid='_testObjectRemove'\" );\n oxDb::getDb()->execute( \"delete from oxobject2attribute where oxattrid='_testRemoveAll'\" );\n oxDb::getDb()->execute( \"delete from oxarticles where oxid='_testArticleRemoveAll'\" );\n oxDb::getDb()->execute( \"delete from oxattribute where oxid='_testAttribute'\" );\n oxDb::getDb()->execute( \"delete from oxattribute where oxid='_testAttributeAddAll'\" );\n oxDb::getDb()->execute( \"delete from oxobject2attribute where oxattrid='_testAttributeAddAll'\" );\n \n parent::tearDown();\n }", "title": "" }, { "docid": "54b125df0479eeee8c2b19c568c612c2", "score": "0.6465902", "text": "public static function cleanDatabase()\n\t{\n\t\tself::checkTestEnv();\n\t\techo \"\\nPersistenceTestHelper: cleaning database\\n\";\n\n\t\trequire path('sys').'cli/dependencies'.EXT;\n\t\tif (!self::checkTableExists('laravel_migrations')) {\n\t\t\techo \"PersistenceTestHelper: creating migrations table\\n\";\n\t\t\tCommand::run(array('migrate:install'));\n\t\t\techo \"\\n\";\n\t\t}\n\n\t\tCommand::run(array('migrate:reset'));\n\t\tCommand::run(array('migrate'));\n\n\t\techo \"PersistenceTestHelper: database cleaned!\\n\";\n\t}", "title": "" }, { "docid": "4964fc28e6837ec3b65f217caf06f8d1", "score": "0.6456913", "text": "public function reset()\n {\n $this->tables = array();\n $this->aliases = array();\n $this->params = array();\n }", "title": "" }, { "docid": "54a01231dd7deb3923dd582b72e47958", "score": "0.64538777", "text": "public function deleteAll() {\n $SQL = \"DELETE FROM \" . $this->tb;\n mysqli_query($this->db_handle,$SQL);\n \n $this->assign();\n }", "title": "" }, { "docid": "5760d09b500527abc1b3789c52fa354b", "score": "0.6451755", "text": "public function wp_clean_sql()\n\t{\n\t\t$bdd = Bdd::getInstance();\n\n\t\t$sql = $bdd->dbh->prepare(\"SHOW TABLES LIKE '\".$this->_table_prefix.\"%'\");\n\t\t$sql->execute();\n\t\t$tables = $sql->fetchAll();\n\n\t\tforeach ($tables as $table)\t{\n\t\t\t$table_name = $table[0];\n\n\t\t\t// To rename the table\n\t\t\t$sql1 = $bdd->dbh->prepare(\"DROP TABLE `{$table_name}`\");\n\t\t\t$sql1->execute();\n\t\t}\n\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "6364223b89a41fb7121805417b3f538c", "score": "0.6443764", "text": "protected function setUp() {\n $unit_test = new \\lib\\database('unit_test');\n $unit_test->query('TRUNCATE database_test');\n }", "title": "" }, { "docid": "387857edb3a269cdcec21379f2aba122", "score": "0.6441857", "text": "function deleteAll() {\n // Suppression des tables de tous les utilisateurs\n $users = getUsers();\n\n while ($user = $users->fetch()) {\n // A mettre dans une array pour plus de place\n $t1 = $user[\"name\"].\"_pokémon\";\n $t2 = $user[\"name\"].\"_statistiques\";\n $t3 = $user[\"name\"].\"_est_pourvu\";\n $t4 = $user[\"name\"].\"_est_doté\";\n $t5 = $user[\"name\"].\"_possède\";\n\n echo \"DROP de \".$t1.\" : \".dropTable($t1).\"\\n\";\n echo \"DROP de \".$t2.\" : \".dropTable($t2).\"\\n\";\n echo \"DROP de \".$t3.\" : \".dropTable($t3).\"\\n\";\n echo \"DROP de \".$t4.\" : \".dropTable($t4).\"\\n\";\n echo \"DROP de \".$t5.\" : \".dropTable($t5).\"\\n\\n\";\n }\n $users->closeCursor();\n \n // Suppression des utilisateurs\n echo \"TRUNCATE de users : \".truncateTable(\"users\").\"\\n\";\n }", "title": "" }, { "docid": "decc0820f31504b04ddb70080d2efa89", "score": "0.6422777", "text": "function empty_kb_tables($con)\n{\n\t$result1 = mysqli_query($con,\"TRUNCATE kb_table_1\");\n\t$result2 = mysqli_query($con,\"TRUNCATE kb_table_2\");\n\tif(!($result1 && $result2))\n\t\t die(\"Tables not found\");\n}", "title": "" }, { "docid": "4a6be71d2a5c0206f772b3b5bc6dc41f", "score": "0.6421704", "text": "public function tearDown() {\n if (isset(UpstartTestDatabaseHelper::$PDO)) {\n $this->testdb_helper->drop($this->test_database_name);\n }\n parent::tearDown();\n }", "title": "" }, { "docid": "2d85b097f7b68df32081ad4b7e80b3fa", "score": "0.6403796", "text": "public function removeAll() {\n $sql = 'SET FOREIGN_KEY_CHECKS = 0; TRUNCATE TABLE student';\n \n $connection_manager = new connection_manager();\n $conn = $connection_manager->connect();\n \n $stmt = $conn->prepare($sql);\n \n $stmt->execute();\n $count = $stmt->rowCount();\n }", "title": "" }, { "docid": "a86ccb117960604631e4b4c7596b660d", "score": "0.63965034", "text": "public static function clear_schema()\n {\n }", "title": "" }, { "docid": "07ea7b754080f86e1e91f075987c7d57", "score": "0.63933015", "text": "public function clearBdd()\n {\n $request = $this->connexion->prepare(\"TRUNCATE TABLE association\");\n $result = $request->execute();\n }", "title": "" }, { "docid": "69629b5adf39b84742da46f6f33e1620", "score": "0.6391904", "text": "public function deleteTablesAndEvents() {\r\n\t\t// drop additional tables for extension module\r\n\t\t$tableNames = ['zasilkovna_weight_rules', 'zasilkovna_shipping_rules', 'zasilkovna_orders'];\r\n\t\tforeach ($tableNames as $shortTableName) {\r\n\t\t\t$sql = 'DROP TABLE `' . DB_PREFIX . $shortTableName . '`;';\r\n\t\t\t$this->db->query($sql);\r\n\t\t}\r\n\t\t// remove events registered for \"zasilkovna\" plugin\r\n\t\t$this->load->model('setting/event');\r\n\t\t$this->model_setting_event->deleteEventByCode(self::EVENT_CODE);\r\n\t}", "title": "" }, { "docid": "25c9bf84578d70a9054c0b4f7f7ff015", "score": "0.6385763", "text": "function clearTables(){\r\n $link = new mysqli($_SERVER['RDS_HOSTNAME'], $_SERVER['RDS_USERNAME'], $_SERVER['RDS_PASSWORD'], $_SERVER['RDS_DB_NAME'], $_SERVER['RDS_PORT']);\r\n if (!$link) {\r\n echo '<script> console.log(\"Connection Failed: ' . mysqli_connect_error() . '\"); </script>';\r\n die(\"Connection failed: \" . mysqli_connect_error());\r\n }\r\n $drop_employee_table = \"DROP TABLE IF EXISTS employees\";\r\n if($link->query($drop_employee_table)){\r\n echo '<script> console.log(\"employees table created\"); </script>';\r\n }\r\n else {\r\n echo '<script> console.log(\"failed to create employees table); </script>';\r\n }\r\n $link->close();\r\n makeEmployeeTable();\r\n}", "title": "" }, { "docid": "a93e87f1bfefb349145796424a32b8f7", "score": "0.6373061", "text": "function cleanVisitorTable($database = \"\"){\n\t\t\n\t\t$sql = \"TRUNCATE TABLE visitor\"; \n\t\t\n\t\ttry{\n\t\t\t\n\t\t\t$query = $database->exec($sql);\n\t\t\t\n\t\t\techo 'Succesfully ran rhe clean up operation.';\n\t\t\t\n\t\t} catch(PDOException $error){\n\t\t\n\t\t\techo 'Error with query. '.$error->getMessage();\n\t\t\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "65e13973ecd5d0b35587ca0396c5d499", "score": "0.63679844", "text": "public function tearDown(): void\n {\n if ($this->connection->inTransaction()) {\n $this->connection->rollback();\n }\n\n $this->connection->execute('DROP TABLE `writers`');\n\n parent::tearDown();\n }", "title": "" }, { "docid": "ca6cb0c873263e013d388d1ed8090da0", "score": "0.63605356", "text": "public static function clear(): void\n {\n self::$dialects = [];\n self::$definitions = [];\n self::$loaded = [];\n }", "title": "" }, { "docid": "710da67ae2b65377776c9bda02325129", "score": "0.63547665", "text": "public final function destroy_all()\n {\n }", "title": "" }, { "docid": "6db44765bb0b198ed7fae6352e5fab21", "score": "0.6352956", "text": "public function tearDown() {\r\n global $cfg;\r\n try {\r\n $dbConn = new mysqli(\r\n $cfg['db']['host'],\r\n $cfg['db']['user'],\r\n $cfg['db']['pass'],\r\n $cfg['db']['db']\r\n );\r\n }catch (Exception $e){\r\n throw new Exception(\"connection error\");\r\n }\r\n $sql = \"DROP TABLE `users`\";\r\n //run sql query\r\n $dbConn->query($sql);\r\n }", "title": "" } ]
e80f833825e8161dea6cc3d9c46a83cb
O metodo SET atribui um valor a cada atributo
[ { "docid": "0c6240484ce6bd0cdacbd35c492c3c47", "score": "0.0", "text": "public function setCodigo($codigo){\n $this->codigo = $codigo;\n }", "title": "" } ]
[ { "docid": "934b212afedea51b76064401adf0a29c", "score": "0.7303467", "text": "public function __SET($atributo, $valor)\n {\n $this->$atributo = $valor;\n }", "title": "" }, { "docid": "bd1c661334828c3b6ef5a30405225620", "score": "0.7165448", "text": "function __set($atributo, $nuevoValor){\r\n $this -> $atributo = $nuevoValor;\r\n }", "title": "" }, { "docid": "2358bb8791d4e8904db4be8d1af1efc1", "score": "0.6852295", "text": "public function __SET($attr, $valor){\n $this->$attr = $valor;\n }", "title": "" }, { "docid": "c7c7202a1a72147fdf8ba63f349b14be", "score": "0.6798938", "text": "public function __set($atributo, $valor) {\n\t\tif ($atributo == 'nome') {\n\t\t\t$this->$atributo = strtoupper($valor);\n\t\t}else{\n\t\t\t$this->$atributo = $valor;\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "3643f381a61cd52603f0d3147ec670b4", "score": "0.6704033", "text": "public function __set($atributo, $valor) {\n\t\tif ($atributo == 'placa') {\n\t\t\t$this->$atributo = strtoupper($valor);\n\t\t}else{\n\t\t\t$this->$atributo = $valor;\n\t\t}\n\t}", "title": "" }, { "docid": "ebedb7248b87efc5e57ece4a416a8061", "score": "0.6317347", "text": "public function __set($name, $value)\n{\n if(isset($value) && !empty($value)){\n\n if($name==\"libelle\") $this->libelle=(String)$value;\n if($name==\"prix\") {\n if(is_int($value))\n $this->prix=(int)$value;\n else {\n throw new Exception(\"Erreur , le prix doit etre numerique\");\n }\n }\n }\n\n \n}", "title": "" }, { "docid": "144444a6fe53616f39706b9ab6817991", "score": "0.6275712", "text": "public function save() {\n parent::save();\n $query = sprintf('DELETE FROM `attribute_values`\n WHERE `attribute` = %d',\n $this->id);\n $this->db->query($query);\n if($this->data['type'] === 'set') {\n foreach($this->options as $option) {\n $query = sprintf('INSERT INTO `attribute_values` (`attribute`, `value`)\n VALUES (%d, %s)',\n $this->id, $this->filterInsert('value', $option));\n $this->db->query($query);\n }\n }\n }", "title": "" }, { "docid": "41149c69ca462eb9dab8637b7cd1177c", "score": "0.6271257", "text": "abstract function setDBValues();", "title": "" }, { "docid": "8dcef303e9c201e936839c15b9efeb06", "score": "0.62026703", "text": "abstract public function set();", "title": "" }, { "docid": "acf410ed6ad720575a2a43675358557d", "score": "0.61641407", "text": "public static function setters();", "title": "" }, { "docid": "acf410ed6ad720575a2a43675358557d", "score": "0.61641407", "text": "public static function setters();", "title": "" }, { "docid": "acf410ed6ad720575a2a43675358557d", "score": "0.61641407", "text": "public static function setters();", "title": "" }, { "docid": "acf410ed6ad720575a2a43675358557d", "score": "0.61641407", "text": "public static function setters();", "title": "" }, { "docid": "acf410ed6ad720575a2a43675358557d", "score": "0.61641407", "text": "public static function setters();", "title": "" }, { "docid": "e1e90a443080ac1ac705fc513dc60a6b", "score": "0.6155235", "text": "function __set($name, $value) {\n if ($name == 'Nascimento'):\n //valida o valor atribuido a propriedade\n if (count(explode('/', $value)) == 3):\n echo \"Dado '$value', atribuido à '$name' <br>\\n \";\n $this->$name = $value;\n\n else:\n echo \"Dado '$value', não atriuido à '$name' <br>\\n \";\n endif;\n\n else:\n $this->$name = $value;\n\n endif;\n }", "title": "" }, { "docid": "30ced3cf84d5d8f1e054d64f3ec60b85", "score": "0.61456054", "text": "public function set() {\n\t\t// determine the param signature we are in and set vars accordingly\n\t\t$args = func_get_args();\n\t\t$comparison_operator = '=';\n\t\t$field_name = $args[0];\n\t\t$field_value = func_num_args()==3?func_get_arg(2):func_get_arg(1);\n\t\tif (func_num_args()==3) { // ($field_name, $comparison_operator, $field_value)\n\t\t\t$field_value = func_get_arg(2);\n\t\t\t$comparison_operator = func_get_arg(1);\n\t\t} else { // ($field_name, $field_value)\n\t\t\t$field_value = func_get_arg(1);\n\t\t}\n\t\t// look to see if setting id\n\t\tif ($field_name==$this->model_id_name) {\n\t\t\t$this->id = $field_value;\n\t\t} else if (key_exists($field_name,$this->attribute_definitions)) {\n\t\t\t$this->field_values[$field_name] = $field_value;\n\t\t\t$this->field_value_comparitors[$field_name] = $comparison_operator;\n\t\t}\n\t}", "title": "" }, { "docid": "af49334b9c813bb0dca071e3bc7ee721", "score": "0.6129755", "text": "public function __set($atrib, $value) {\n $this->$atrib = $value;\n }", "title": "" }, { "docid": "9309c30155d3798e4a448f07fce720ae", "score": "0.6098387", "text": "function setEntityFieldValue($f_name, $attr_name, $attr_value)\n{\n global $entity;\n if ($entity != \"\") {\n for ($i=0; $i < count($entity[\"fields\"]); $i++) {\n $f = $entity[\"fields\"][$i];\n if ($f[\"name\"] == $f_name) {\n $f[$attr_name] = $attr_value;\n $entity[\"fields\"][$i] = $f;\n }\n }\n }\n}", "title": "" }, { "docid": "66a5f48b7e650e3a72bfaacfd881b90b", "score": "0.6096449", "text": "public function setCavalos($cavalos){\r\n$this->cavalos = $cavalos;\r\n}", "title": "" }, { "docid": "edca14052b0f7acfebaf016a946406ba", "score": "0.60794634", "text": "function setIdtipotrabajador($val) {$this->idtipotrabajador=$val;}", "title": "" }, { "docid": "27e65a5cc34f0bcbb5ede2a10ab417d2", "score": "0.6055615", "text": "public function SetApelido($valor){\n\t\t$this->apelido= $valor;\n\t}", "title": "" }, { "docid": "96654de38665b75132383188326b4d18", "score": "0.60469055", "text": "abstract protected function set();", "title": "" }, { "docid": "51cfc24091228c6749af451e38dbdf98", "score": "0.5980345", "text": "public function setLocalidadAttribute( $value = \"\"){\n \n //sacamos los espacios en el valor recibido\n $value = trim( $value );\n //reemplazamos los espacios en guiones del valor recibido\n $value = str_replace( ' ','_', $value);\n //convertimos el valor recibido a minusculas\n $value = strtolower( $value );\n //asignamos el valor al atributo del Modelo\n $this->attributes['localidad'] = $value;\n\n }", "title": "" }, { "docid": "058c7f0a4525102a72ec58362b1d8014", "score": "0.5954175", "text": "function setVal($val)//value yg ada dalam table(termasuk nilai variabel identifier), urutkan sesuai dengan variabel field (urutan pertama adalah nilai dari variabel identifier),pisahkan masing masing value dengan karakter +#+ * value inside table (including identifier's value),arrange the value according to the field (first sequence is the value of identifier),divide each value with +#+\r\n\t{\r\n\t\t$this->Value=$val;\r\n\t}", "title": "" }, { "docid": "058c7f0a4525102a72ec58362b1d8014", "score": "0.5954175", "text": "function setVal($val)//value yg ada dalam table(termasuk nilai variabel identifier), urutkan sesuai dengan variabel field (urutan pertama adalah nilai dari variabel identifier),pisahkan masing masing value dengan karakter +#+ * value inside table (including identifier's value),arrange the value according to the field (first sequence is the value of identifier),divide each value with +#+\r\n\t{\r\n\t\t$this->Value=$val;\r\n\t}", "title": "" }, { "docid": "2420481b6d022fcb26403e388cebcca6", "score": "0.5949294", "text": "function setValue($value) {$this->_value = $value;}", "title": "" }, { "docid": "03e3d6ab8e689f4ea021fafffd8da46b", "score": "0.5946294", "text": "function setidcad($val) {$this->idcad=$val;}", "title": "" }, { "docid": "8de2abff94178f64748fdc482fe6409b", "score": "0.5929697", "text": "abstract function set();", "title": "" }, { "docid": "2c0850013fe5e9c0197cd81997f352a8", "score": "0.5928339", "text": "function cmd_SET() {\n $this->rest();\n }", "title": "" }, { "docid": "d8c2c5544f07615c8064db67b64f9404", "score": "0.5928027", "text": "public function set() {\n if (is_array(Inicio::confVars('idiomas'))) {\n $contador = 0;\n foreach (Inicio::confVars('idiomas') as $key => $value) {\n $idioma_s_ext = substr($value, 0, 2);\n $this->_idioma[$contador] = $value;\n $this->_tbTituloIdioma[$contador] = Bases_InyeccionSql::consulta($_POST['etiqueta_' . $idioma_s_ext]);\n $contador++;\n }\n }\n\n // datos del componente de origen\n if (isset($_POST['origen_cp_id'])) {\n $this->_dcp_origen = Consultas_MatrizObtenerDeComponenteTablaYParametros::armado(Bases_InyeccionSql::consulta($_POST['origen_cp_id']));\n }\n\n // tabla intermedia\n if (isset($_POST['nombre_tabla_relacion'])) {\n $this->_intermedia_tb_nombre = Bases_InyeccionSql::consulta($_POST['nombre_tabla_relacion']);\n }\n \n $this->id_intermedia_tb_prefijo = Bases_InyeccionSql::consulta($_POST['tabla_prefijo']);\n \n // controla si la tabla ya existe\n $tabla_existente = Consultas_Tabla::RegistroConsulta(__FILE__, __LINE__, $this->_intermedia_tb_nombre, $this->id_intermedia_tb_prefijo);\n if ($tabla_existente != '') {\n // la redireccion va al final\n $armado_botonera = new Armado_Botonera();\n $parametros = array('kk_generar' => '0', 'accion' => '5', 'id_tabla' => $_GET['id_tabla']);\n $armado_botonera->armar('redirigir', $parametros);\n }\n \n $id_prefijo_array = Consultas_MatrizPrefijos::armado($this->id_intermedia_tb_prefijo);\n $this->_intermedia_tb_prefijo_texto = $id_prefijo_array[0]['prefijo'];\n\n $this->_pv = Componentes_Componente::componente($this->_nombreComponente, 'ParametrosValores');\n \n }", "title": "" }, { "docid": "86ae2e0ce200f3879d47dc87de167932", "score": "0.59184927", "text": "public function setCodProduto($cod_produto){\r\n $this ->id = $cod_produto;\r\n}", "title": "" }, { "docid": "3660755f7286a8302f1039b5de94a66b", "score": "0.59151465", "text": "public function setId($valor){\n\t\t\t$this->id = $valor;\n\t\t}", "title": "" }, { "docid": "8972d298d142e245197ac645d0d27342", "score": "0.59132546", "text": "public function setFields() {\n\n //instancia campos do formulário\n $this->blocoCampos = new TSetfields();\n\n if(count($this->obBloco->campos) > 0){\n foreach($this->obBloco->campos as $seq=>$dadosCampo){\n\n //instancia objetos campos\n $setCampo = new TSetCampo();\n $setCampo->setOutControl($dadosCampo->outcontrol);\n $setCampo->setNome($dadosCampo->colunadb);\n $setCampo->setId($dadosCampo->campo);\n $setCampo->setLabel($dadosCampo->label);\n \n $tipoCampo = $setCampo->getTipoCampo($dadosCampo->tpcaseq);\n $setCampo->setTipoDado($tipoCampo->tipodado);\n \n \n\t //Seta descrição do campo FK com pesquisa\n\t if($dadosCampo->ativapesquisa != 0){\n\t \t$setCampo->descPesq = $this->headerForm[TConstantes::HEAD_DADOSFORM][$dadosCampo->campo.'Label'];\n\t }\n \n $setCampo->setCampo($seq, $tipoCampo->tpcadesc, $dadosCampo->seletorJQ);\n $setCampo->setPropriedade('alteravel', $dadosCampo->alteravel);\n $setCampo->setValue($dadosCampo->valorpadrao);\n \n if($dadosCampo->manter == true){\n \t$setCampo->setPropriedade('manter', 'true');\n }else{\n \tif($dadosCampo->tipo != 'TButton'){\n \t\t$setCampo->setPropriedade('view', 'true');\n \t}\n }\n \n // atribui atributo para gravação do objeto [se abilitado]\n if($this->headerForm[TConstantes::FIELD_STATUS] == 'edit'){\n \t\n \tif($dadosCampo->alteravel == '0'){\n \t\t\n \t\t$dadosCampo->ativapesquisa = null;\n \t\t$setCampo->setPropriedade('manter', 'false');\n \t\n \t\n\t\t if($dadosCampo->tipo === 'TRadio' or $dadosCampo->tipo === 'TRadioGroup'){\n\t\t \t$setCampo->setPropriedade('onClick', 'this.blur(); return false;');\n\t\t }else{\n\t\t \t$setCampo->setPropriedade('readonly', '');\n\t\t \t$setCampo->setPropriedade('onfocus', 'this.blur(); return false;');\n\t\t } \n \t}\n }\n\n\n //Aplica mascara nos campos\n if(!empty($dadosCampo->mascara) and $dadosCampo->mascara != \"\" and $dadosCampo->tipo != 'TButton') {\n $setCampo->setPropriedade('onkeypress',\"livemask(this,\".$dadosCampo->mascara.\",this)\");\n $setCampo->setPropriedade('onkeyup',\"livemask(this,\".$dadosCampo->mascara.\",this)\");\n }\n\n //atribui uma propriedade seqao botão para ações associadas\n if($dadosCampo->tipo == 'TButton') {\n $setCampo->setPropriedade(TConstantes::SEQUENCIAL,$this->seq);\n }\n if($dadosCampo->tipo == 'TFrameFile' or $dadosCampo->tipo == 'TVoiceFrameFile' or $dadosCampo->tipo == 'TCsvFrameFile') {\n $setCampo->setPropriedade(TConstantes::SEQUENCIAL,$this->seq);\n $setCampo->setPropriedade('form',$this->formseq);\n }\n\n //atribui PROPRIEDADE DOS CAMPOS\n if(is_array($dadosCampo->props)) {\n foreach($dadosCampo->props as $nProp=>$ObProps) {\n //--- Adiciona propriedades aos campos usando a classe TSetFields\n $setCampo->setPropriedade($ObProps->metodo, $ObProps->valor);\n }\n }\n\n // Injeta campo no conteiner TSetFields\n $obCampo = $setCampo->getCampo();\n $this->blocoCampos->addCampo($dadosCampo->label, $obCampo, $dadosCampo->ativapesquisa);\n\n //borbulha mensagem [help] para o metodo responsavel\n if($dadosCampo->help) {\n $this->blocoCampos->setHelp($seq, $dadosCampo->help);\n }\n\n //configura trigger onload no campo\n if($dadosCampo->trigger) {\n $this->blocoCampos->addTrigger($seq, $dadosCampo->trigger);\n }\n\n }//foreach principal\n }\n\n //compila objtos anexos\n if($this->obAnexo) {\n foreach($this->obAnexo as $obAn) {\n $this->blocoCampos->addObjeto($obAn);\n }\n }\n\n $panel = new TElement('div');\n $panel->id = 'contFields'.$this->blocseq;\n $panel->add($this->blocoCampos->getConteiner());\n\n //============================================================================================\n // compila campo tipo TBloco (listagem aninhada)\n //============================================================================================\n if($this->obBloco->blocos) {\n foreach($this->obBloco->blocos as $bl) {\n\n $panelLista = new TElement('div');\n $panelLista->id = TConstantes::CONTEINER_LISTA.$bl->campo;\n $panelLista->style = 'border:1px solid #999999; padding:4px;';\n\n $nbloco = new TCompLista($bl->campo, TConstantes::CONTEINER_LISTA.$bl->campo);\n $lb = $nbloco->get();\n\n //$listDados = $listObj->getListDados();\n $panelLista->add($lb->getLista());\n\n $panel->add($panelLista);\n }\n }\n\n $this->obKDbo->close();\n\n return $panel; \n }", "title": "" }, { "docid": "e86a267c68cc5b0ff9ae0bd7fe528056", "score": "0.59045595", "text": "abstract protected function _set();", "title": "" }, { "docid": "a67fe9b737e3d3988edc252e91eb3203", "score": "0.58925205", "text": "public function setPuestoAttribute( $value = \"\"){\n \n //sacamos los espacios en el valor recibido\n $value = trim( $value );\n //reemplazamos los espacios en guiones del valor recibido\n $value = str_replace( ' ','_', $value);\n //convertimos el valor recibido a minusculas\n $value = strtolower( $value );\n //asignamos el valor al atributo del Modelo\n $this->attributes['puesto'] = $value;\n\n }", "title": "" }, { "docid": "0fc35128feb85e1cf3d9d2a849bd0bc5", "score": "0.5887394", "text": "public function setEmpleadorAttribute( $value = \"\"){\n \n //sacamos los espacios en el valor recibido\n $value = trim( $value );\n //reemplazamos los espacios en guiones del valor recibido\n $value = str_replace( ' ','_', $value);\n //convertimos el valor recibido a minusculas\n $value = strtolower( $value );\n //asignamos el valor al atributo del Modelo\n $this->attributes['empleador'] = $value;\n\n }", "title": "" }, { "docid": "9c6f5af6a09f354764b3646ae27040b6", "score": "0.5882556", "text": "public function setFechaIniAttribute($value = '01-01-1910'){\n \n //modificamos el formato del valor del atributo en una variable\n $value = Carbon::parse($value);\n $value = $value->format('Y-m-d');\n\n //asignamos el valor formateado al atributo del Modelo\n $this->attributes['fecha_ini'] = $value;\n }", "title": "" }, { "docid": "00f8e6e80194a91d31a13d1676f626b7", "score": "0.5873729", "text": "function setValores($nombre_albaran,$tipo_albaran,$id_centro_logistico,$id_usuario,$numero_serie,$averiado,$tipo_motivo,$fecha_desde,$fecha_hasta,$paginacion,$id_almacen,$id_sede) {\n\t\t$this->nombre_albaran = $nombre_albaran;\n\t\t$this->tipo_albaran = $tipo_albaran;\n\t\t$this->id_centro_logistico = $id_centro_logistico;\n\t\t$this->id_usuario = $id_usuario;\n\t\t$this->numero_serie = $numero_serie;\n\t\t$this->averiado = $averiado;\n\t\t$this->tipo_motivo = $tipo_motivo;\n\t\t$this->fecha_desde = $fecha_desde;\n\t\t$this->fecha_hasta = $fecha_hasta;\n\t\t$this->paginacion = $paginacion;\n\t\t$this->id_almacen = $id_almacen;\n $this->id_sede = $id_sede;\n\n\t\t$this->prepararConsulta();\n\t}", "title": "" }, { "docid": "b244f291ea80f62b6abb4045798bcd8d", "score": "0.585345", "text": "public function __SET($attr,$val)\n {\n $this->$attr = $val;\n }", "title": "" }, { "docid": "fe94b68515c8d69bc1ab465884909f44", "score": "0.5852117", "text": "public function setPeso ($peso){\n$this->Peso=$peso;\n}", "title": "" }, { "docid": "bf7ce3721457e1ad2cf086e932bc14c0", "score": "0.58394307", "text": "public function setIdade($idade){\n $this->idade = $idade; //tem de colocar o THIS, \"essa idade (atributo) é igual a idade que está recebendo no parametro. Isso é um método acessor e sempre será publico\n }", "title": "" }, { "docid": "e038cd77baf0d39cf9881216b3630124", "score": "0.5836759", "text": "abstract public function setValue($value);", "title": "" }, { "docid": "3f7cdd688073d48c1675de1fd9e97bb6", "score": "0.5827442", "text": "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setTipo_teleco('');\n $this->setNombre_teleco('');\n $this->setUbi('');\n $this->setPersona('');\n $this->setPrimary_key($aPK);\n }", "title": "" }, { "docid": "f45937266daa125d80e773dee2de70f7", "score": "0.58218265", "text": "private function set_data()\n {\n foreach ($this->fields as $name => &$field)\n if (array_key_exists($name, $this->data))\n $field->set_value($this->data[$name]);\n }", "title": "" }, { "docid": "26a6cbc337fda03c954ce908d3596a77", "score": "0.58152115", "text": "public function __set($nome, $valor) {\n\t\t$this->dados[$nome] = $valor;\n\t}", "title": "" }, { "docid": "5c67f1812bd22691d30c9e06bce8b701", "score": "0.5807445", "text": "protected static function setAttrVals()\n {\n $oHttpRequest = new HttpRequest;\n $oSession = new Session;\n $oUserModel = new UserCoreModel;\n\n if ($oHttpRequest->getExists(SearchQueryCore::MATCH_SEX)) {\n self::$aSexOption += ['value' => $oHttpRequest->get(SearchQueryCore::MATCH_SEX)];\n } else {\n self::$aSexOption += ['value' => self::getGenderVals($oUserModel, $oSession)['user_sex']];\n }\n\n if ($oHttpRequest->getExists(SearchQueryCore::SEX)) {\n self::$aMatchSexOption += ['value' => $oHttpRequest->get(SearchQueryCore::SEX)];\n } else {\n self::$aMatchSexOption += ['value' => self::getGenderVals($oUserModel, $oSession)['match_sex']];\n }\n\n self::$aAgeOption = ['value' => self::getAgeVals($oUserModel, $oSession)];\n if ($oHttpRequest->getExists([SearchQueryCore::MIN_AGE, SearchQueryCore::MAX_AGE])) {\n self::$aAgeOption = [\n 'value' => [\n 'min_age' => $oHttpRequest->get(SearchQueryCore::MIN_AGE),\n 'max_age' => $oHttpRequest->get(SearchQueryCore::MAX_AGE)\n ]\n ];\n }\n\n if ($oHttpRequest->getExists(SearchQueryCore::COUNTRY)) {\n self::$aCountryOption += ['value' => $oHttpRequest->get(SearchQueryCore::COUNTRY)];\n } else {\n self::$aCountryOption += ['value' => Geo::getCountryCode()];\n }\n\n if ($oHttpRequest->getExists(SearchQueryCore::CITY)) {\n $sCity = $oHttpRequest->get(SearchQueryCore::CITY);\n } else {\n $sCity = Geo::getCity();\n }\n self::$aCityOption += ['value' => $sCity, 'onfocus' => \"if('\" . $sCity . \"' == this.value) this.value = '';\", 'onblur' => \"if ('' == this.value) this.value = '\" . $sCity . \"';\"];\n\n self::$aStateOption += ['value' => Geo::getState(), 'onfocus' => \"if('\" . Geo::getState() . \"' == this.value) this.value = '';\", 'onblur' => \"if ('' == this.value) this.value = '\" . Geo::getState() . \"';\"];\n\n if ($oHttpRequest->getExists(SearchQueryCore::ORDER)) {\n self::$aLatestOrder += ['value' => SearchCoreModel::LATEST];\n }\n\n if ($oHttpRequest->getExists(SearchQueryCore::AVATAR)) {\n self::$aAvatarOnly += ['value' => '1'];\n }\n\n if ($oHttpRequest->getExists(SearchQueryCore::ONLINE)) {\n self::$aOnlineOnly += ['value' => '1'];\n }\n }", "title": "" }, { "docid": "2d9252ee1174168d041df1c9f8db06b8", "score": "0.5805429", "text": "public function setValues($data);", "title": "" }, { "docid": "295939610fabcd5f95b9616c09085139", "score": "0.5794487", "text": "public function value($value){ $this->attributes['value']=$value; return $this; }", "title": "" }, { "docid": "3caed72e3985905a30be41c6cde8345d", "score": "0.5791039", "text": "private function setAttributesByUser()\n {\n $this->setAttribute('user_id', Yii::$app->getUser()->getId());\n $this->setAttribute('paid', self::NOT_PAID);\n $this->setAttribute('paid_by', self::DEFAULT_PAID_BY);\n $this->setAttribute('admin_id', self::DEFAULT_ADMIN_ID);\n $this->setAttribute('start_date', self::DEFAULT_START_DATE);\n $this->setAttribute('end_date', self::DEFAULT_END_DATE);\n }", "title": "" }, { "docid": "e8bcff0ecb95fee0e04ecb125cdc3818", "score": "0.5790579", "text": "abstract public function set($data);", "title": "" }, { "docid": "9a26a1cd4bec4f447c5594b940a3a769", "score": "0.57904595", "text": "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_schema('');\n $this->setId_item('');\n $this->setId_nom('');\n $this->setId_asignatura('');\n $this->setId_activ('');\n $this->setTipo('');\n $this->setCurso_inicio('');\n $this->setActa('');\n $this->setPrimary_key($aPK);\n }", "title": "" }, { "docid": "a8cf78d841980afc1b2affe8047e663a", "score": "0.578215", "text": "public function set($nombreAtributo, $valor) {\n if (!isset($this->vars[$nombreAtributo])) {\n $this->vars[$nombreAtributo] = $valor;\n }// if\n }", "title": "" }, { "docid": "b7f4f0970276e8132262886c6af49c7f", "score": "0.57807213", "text": "public function setPrincipal(){\n $listaDomiciliosDelCliente = Domicilio::where('codCliente','=',$this->codCliente)->get();\n //quitamos el esPrincipal de todos los domicilios de ese cliente\n foreach ($listaDomiciliosDelCliente as $itemDom) {\n $itemDom->esPrincipal='0';\n $itemDom->save();\n }\n\n $this->esPrincipal='1';\n $this->save();\n }", "title": "" }, { "docid": "bd6f4c3ad43a5a77589028bac0fd66ca", "score": "0.5776971", "text": "public function setDataIdaAttribute($value)\n {\n $cb = new \\Carbon\\Carbon($value);\n $this->attributes['data_ida'] = $cb->format('Y-m-d');\n }", "title": "" }, { "docid": "bd6f4c3ad43a5a77589028bac0fd66ca", "score": "0.5776971", "text": "public function setDataIdaAttribute($value)\n {\n $cb = new \\Carbon\\Carbon($value);\n $this->attributes['data_ida'] = $cb->format('Y-m-d');\n }", "title": "" }, { "docid": "82c7d7e2231d3ed5aec3771581c61db1", "score": "0.5776818", "text": "public function avaliar() {\n $this->filme->setAvaliacao(5);\n }", "title": "" }, { "docid": "ea3682868f7d915e79d6da44204b5840", "score": "0.57697755", "text": "function asignar_valores(){\n $this->nombre=$_POST['nombre'];\n $this->descripcion=$_POST['descripcion'];\n }", "title": "" }, { "docid": "910f580114479b4d15d6625888b44559", "score": "0.5764696", "text": "public function SetValues($id_TipoDocumento, $nome_TipoDocumento) { \n\t\t\t$this->id_TipoDocumento = $id_TipoDocumento;\n\t\t\t$this->nome_TipoDocumento = $nome_TipoDocumento;\n\t\t}", "title": "" }, { "docid": "dba6e8a81b2b8fdd40bc5a5d3342bad0", "score": "0.5763498", "text": "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_activ('');\n $this->setIngresos('');\n $this->setNum_asistentes('');\n $this->setIngresos_previstos('');\n $this->setNum_asistentes_previstos('');\n $this->setObserv('');\n $this->setPrimary_key($aPK);\n }", "title": "" }, { "docid": "3ecbbc0aefec75e000354a43d1653156", "score": "0.57544225", "text": "public function set(){\r\n\t\tif(\\wp\\Helpers\\urlHelper::context() == \"UPDATE\" || \\wp\\Helpers\\urlHelper::context() == \"DELETE\"){\r\n\t\t\t\r\n\t\t\t$this->mapper->setId(\\wp\\Helpers\\urlHelper::context(\"porteur\"));\r\n\t\t\t$this->mapper->set($this->mapper->getNameSpace());\r\n\t\t\t\t\r\n\t\t\t// Crée le champ caché pour le stockage de la clé primaire\r\n\t\t\t$field = new \\wp\\formManager\\Fields\\hidden();\r\n\t\t\t$field->setId($this->mapper->getTableName() . \".primary\")\r\n\t\t\t->setName($this->mapper->getTableName() . \".primary\")\r\n\t\t\t->setValue(\\wp\\Helpers\\urlHelper::context(\"porteur\"));\r\n\t\t\t$this->addToFieldset($field);\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t// Liste des niveaux d'études\r\n\t\t// Mapping sur paramBase avec code paramètre ETU\r\n\t\t$mapper = new \\arcec\\Mapper\\paramETUMapper();\r\n\t\tif($mapper->getNbRows() > 0){\r\n\t\t\t$field = new \\wp\\formManager\\Fields\\popup();\r\n\t\t\t\r\n\t\t\t$field->setId(\"frmParamETU\")\r\n\t\t\t->setName($this->mapper->getTableName() . \".\" . $this->mapper->getColumnPrefix() . \"etu\")\r\n\t\t\t->setLabel(\"Niveau d'études\")\r\n\t\t\t->setCss(\"control-label\",true)\r\n\t\t\t->setCss(\"col-sm-12\",true)\r\n\t\t\t->setCss(\"form-control\")\r\n\t\t\t->setGroupCss(\"col-sm-12\")\r\n\t\t\t->setForceHeaderStatut(true)\r\n\t\t\t->setMapping($mapper,array(\"value\" => \"id\", \"content\"=>array(\"libellecourt\",\"libellelong\")))\r\n\t\t\t;\r\n\t\t\t\r\n\t\t\t$this->addToFieldset($field);\r\n\t\t}\r\n\t\t\r\n\t\t// Liste des diplômes\r\n\t\t// Mapping sur paramBase avec code paramètre DPL\r\n\t\t$mapper = new \\arcec\\Mapper\\paramDPLMapper();\r\n\t\t\r\n\t\tif($mapper->getNbRows() > 0){\r\n\t\t\t$field = new \\wp\\formManager\\Fields\\popup();\r\n\t\t\t\r\n\t\r\n\t\t\t$field->setId(\"frmParamDPL\")\r\n\t\t\t->setName($this->mapper->getTableName() . \".\" . $this->mapper->getColumnPrefix() . \"dpl\")\r\n\t\t\t->setLabel(\"Diplômes\")\r\n\t\t\t->setCss(\"control-label\",true)\r\n\t\t\t->setCss(\"col-sm-12\",true)\r\n\t\t\t->setCss(\"form-control\")\r\n\t\t\t->setGroupCss(\"col-sm-6\")\r\n\t\t\t->setForceHeaderStatut(true)\r\n\t\t\t->setMapping($mapper,array(\"value\" => \"id\", \"content\"=>array(\"libellecourt\",\"libellelong\")))\r\n\t\t\t;\r\n\t\t\t\r\n\t\t\t$this->addToFieldset($field);\r\n\t\r\n\t\t\t// Spécialité\r\n\t\t\t$field = new \\wp\\formManager\\Fields\\text();\r\n\t\t\t$field->setId(\"frmSpecialite\")\r\n\t\t\t->setName($this->mapper->getTableName() . \".\" . $this->mapper->getColumnPrefix() . \"specdiplome\")\r\n\t\t\t->setLabel(\"Spécialité\")\r\n\t\t\t->setCss(\"control-label\",true)\r\n\t\t\t->setCss(\"col-sm-12\",true)\r\n\t\t\t->isRequired()\r\n\t\t\t->setCss(\"form-control\")\r\n\t\t\t->setGroupCss(\"col-sm-6\")\r\n\t\t\t->isDisabled(true)\r\n\t\t\t->setValue($this->mapper->getObject()->specdiplome);\r\n\t\t\t\r\n\t\t\t$this->addToFieldset($field);\r\n\t\t\t\r\n\t\t\t// Ajouter la dépendance entre les deux champs\r\n\t\t}\r\n\t\t\r\n\t\t// Expérience professionnelle\r\n\t\t$field = new \\wp\\formManager\\Fields\\textarea();\r\n\t\t$field->setId(\"frmExperience\")\r\n\t\t->setName($this->mapper->getTableName() . \".\" . $this->mapper->getColumnPrefix() . \"exppro\")\r\n\t\t->setLabel(\"Expérience professionnelle\")\r\n\t\t->setCss(\"control-label\",true)\r\n\t\t->setCss(\"col-sm-12\",true)\r\n\t\t->setCss(\"form-control\")\r\n\t\t->setGroupCss(\"col-sm-6\")\r\n\t\t->setValue($this->mapper->getObject()->exppro);\r\n\t\t\r\n\t\t$this->addToFieldset($field);\r\n\t\t\r\n\t\t// Liste des prescripteurs\r\n\t\t$field = new \\wp\\formManager\\Fields\\popup();\r\n\t\t\r\n\t\t// Mapping sur paramBase avec code paramètre PRS\r\n\t\t$mapper = new \\arcec\\Mapper\\paramPRSMapper();\r\n\t\t\r\n\t\t$field->setId(\"frmParamPRS\")\r\n\t\t->setName($this->mapper->getTableName() . \".\" . $this->mapper->getColumnPrefix() . \"prs\")\r\n\t\t->setLabel(\"Prescripteur\")\r\n\t\t->setCss(\"control-label\",true)\r\n\t\t->setCss(\"col-sm-12\",true)\r\n\t\t->setCss(\"form-control\")\r\n\t\t->setGroupCss(\"col-sm-6\")\r\n\t\t->setForceHeaderStatut(true)\r\n\t\t->setMapping($mapper,array(\"value\" => \"id\", \"content\"=>array(\"libellecourt\",\"libellelong\")))\r\n\t\t;\r\n\t\t\r\n\t\t$this->addToFieldset($field);\r\n\t\t\r\n\t\t// Nom du prescripteur\r\n\t\t$field = new \\wp\\formManager\\Fields\\text();\r\n\t\t$field->setId(\"frmNomPresc\")\r\n\t\t->setName($this->mapper->getTableName() . \".\" . $this->mapper->getColumnPrefix() . \"nompresc\")\r\n\t\t->setLabel(\"Nom de l'interlocuteur\")\r\n\t\t->setCss(\"control-label\",true)\r\n\t\t->setCss(\"col-sm-12\",true)\r\n\t\t->isRequired()\r\n\t\t->setCss(\"form-control\")\r\n\t\t->setGroupCss(\"col-sm-6\")\r\n\t\t->setValue($this->mapper->getObject()->nompresc);\r\n\t\t\r\n\t\t$this->addToFieldset($field);\r\n\r\n\t\t// Nom du prescripteur\r\n\t\t$field = new \\wp\\formManager\\Fields\\mail();\r\n\t\t$field->setId(\"frmMailPresc\")\r\n\t\t->setName($this->mapper->getTableName() . \".\" . $this->mapper->getColumnPrefix() . \"emailpresc\")\r\n\t\t->setLabel(\"E-Mail\")\r\n\t\t->setCss(\"control-label\",true)\r\n\t\t->setCss(\"col-sm-12\",true)\r\n\t\t->isRequired()\r\n\t\t->setCss(\"form-control\")\r\n\t\t->setGroupCss(\"col-sm-6\")\r\n\t\t->setValue($this->mapper->getObject()->emailpresc);\r\n\t\t\r\n\t\t$this->addToFieldset($field);\r\n\t\t\r\n\t\t\r\n\t\t// Résumé du projet\r\n\t\t$field = new \\wp\\formManager\\Fields\\textarea();\r\n\t\t$field->setId(\"frmResume\")\r\n\t\t->setName($this->mapper->getTableName() . \".\" . $this->mapper->getColumnPrefix() . \"resumeprojet\")\r\n\t\t->setLabel(\"Expérience professionnelle\")\r\n\t\t->setCss(\"control-label\",true)\r\n\t\t->setCss(\"col-sm-12\",true)\r\n\t\t->setCss(\"form-control\")\r\n\t\t->setGroupCss(\"col-sm-6\")\r\n\t\t->setValue($this->mapper->getObject()->resumeprojet);\r\n\t\t\r\n\t\t$this->addToFieldset($field);\r\n\t\t\r\n\t\t// Ajoute le script d'ouverture du datepicker\r\n\t\t$this->toControls();\r\n\t}", "title": "" }, { "docid": "24bf6ae9f79332f766c95b1c1912f7f0", "score": "0.57506275", "text": "public function setValue( $value );", "title": "" }, { "docid": "3364ba0e5edf7668714a97677eac3569", "score": "0.57409763", "text": "public function setReferenciaAttribute( $value = \"\"){\n \n //sacamos los espacios en el valor recibido\n $value = trim( $value );\n //reemplazamos los espacios en guiones del valor recibido\n $value = str_replace( ' ','_', $value);\n //convertimos el valor recibido a minusculas\n $value = strtolower( $value );\n //asignamos el valor al atributo del Modelo\n $this->attributes['referencia'] = $value;\n \n }", "title": "" }, { "docid": "8e08fb8ed13d0ea2238f848d089ee600", "score": "0.57350224", "text": "public function set_values() {\n\t\tparent::set_values();\n\n\t\t$this->confirm_email->value = $this->email->value;\n\t}", "title": "" }, { "docid": "261c5ddd1293343c508cfa17ec8e0901", "score": "0.57318336", "text": "public function setValorCustom($ArDados){\n if($ArDados['id_tp_pessoa'] == '3'){\n unset($ArDados['id_tp_pessoa']);\n $ArDados['sn_estrangeiro'] = 1;\n }\n else{\n /* Tratamento para definir o tipo de pessoa */\n switch($ArDados['id_tp_pessoa']){\n case '1':\n $ArDados['id_tp_pessoa'] = 2;\n break;\n case '2':\n $ArDados['id_tp_pessoa'] = 1;\n break;\n default:\n $ArDados['id_tp_pessoa'] = NULL;\n break;\n }\n }\n if($ArDados['id_micro_regiao'] != ''){\n $QryMicroRegiao = query(\"SELECT id_regiao FROM is_micro_regiao WHERE numreg = \".$ArDados['id_micro_regiao']);\n $ArMicroRegiao = farray($QryMicroRegiao);\n $ArDados['id_regiao'] = $ArMicroRegiao['id_regiao'];\n }\n $ArDados['sn_possui_suframa'] = (trim($ArDados['cod_suframa']) != '')?'1':'0';\n $ArDados['sn_possui_insc_aux_st'] = (trim($ArDados['insc_aux_st']) != '')?'1':'0';\n $ArDados['sn_contribuinte_icms'] = ($ArDados['sn_contribuinte_icms'] == 1)?1:0;\n $ArDados['sn_aceita_faturamento_parcial'] = ($ArDados['sn_aceita_faturamento_parcial'] == 1)?1:0;\n\n return $ArDados;\n }", "title": "" }, { "docid": "8fac7f1ef698246a48e55ba0c4bce9c7", "score": "0.57211", "text": "public function setId($valor)\n\t\t{\n\t\t\t$this->id = $valor;\n\t\t}", "title": "" }, { "docid": "d4595da20fc44ca935fb5de2a1b3e448", "score": "0.57088107", "text": "protected function setModelValues() {\n\n\t \t\t $request = Scope::getRequestScope();\n\t \t $table = ORM::getTableByModel($this->getModel());\n\n\t \t\t if(!$request->getParameters()) return;\n\n \t \t \t foreach($table->getColumns() as $column) {\n\n \t \t \t \t\t $name = $column->getModelPropertyName();\n\t\t \t \t \t $value = $request->get($name);\n\n\t\t \t \t \t $accessor = $this->toAccessor($name);\n\t\t \t \t \t $mutator = $this->toMutator($name);\n\n\t\t \t \t \t // Password fields usually have a confirm box that needs to verify the integrity\n\t\t \t \t \t // of the password. This logic will make sure 'password1' and 'password2' fields match.\n\t\t \t \t \t // The password present in the database at the time the form is loaded is expected to be\n\t\t \t \t \t // present in the POST array named 'oldPassword'.\n \t \t \t \t\t if($name == 'password') {\n\n \t \t \t \t\t\t if($request->getSanitized('password1') !== $request->getSanitized('password2')) {\n\n\t\t\t \t\t \t\t $this->set('error', 'Passwords don\\'t match');\n\t\t\t \t\t \t\t $this->render('error');\n\t\t\t \t\t \t\t exit;\n\t\t\t \t\t \t }\n\n\t\t\t \t\t \t $password = $request->getSanitized('password1');\n\t\t\t \t\t \t if($request->getSanitized('oldPassword') != $password)\n\t\t\t\t\t\t\t $this->getModel()->setPassword($password);\n\n\t\t\t\t\t\t\t continue;\n\t\t\t \t\t }\n\n\t\t\t \t\t // Set model values to null if they are not present in the POST array\n\t\t \t \t \t if(!$request->get($name)) {\n\n\t \t\t \t \t $this->getModel()->$mutator(null);\n\t \t\t \t \t continue;\n\t\t \t \t \t }\n\n\t\t\t \t\t // Dont sanitize the value if the column has sanitize=\"false\" set in orm.xml\n\t\t \t\t \t $value = ($column->getSanitize() === true) ?\n\t \t \t \t\t\t\t\turldecode(stripslashes(stripslashes($request->sanitize($value)))) :\n\t \t \t \t\t\t\t\turldecode(stripslashes(stripslashes($value)));\n\n \t \t \t \t\t if($column->isForeignKey()) {\n\n \t \t \t \t\t\t if(!$value || $value == 'NULL') continue;\n\n \t \t \t \t\t $fmodelName = $column->getForeignKey()->getReferencedTableInstance()->getModel();\n \t \t \t \t\t $fModel = new $fmodelName();\n\t\t\t\t\t\t $refMutator = $this->toMutator($column->getForeignKey()->getReferencedColumnInstance()->getModelPropertyName());\n\t\t\t\t\t\t $fModel->$refMutator($value);\n \t\t\t\t \t\t $this->getModel()->$mutator($fModel);\n\n\t\t\t\t\t\t continue;\n\t\t\t \t\t }\n\n \t\t \t\t \t\t $this->getModel()->$mutator($value);\n \t \t \t }\n\t }", "title": "" }, { "docid": "4fc55891a2ced47ccbc2e52b34d9875b", "score": "0.5694724", "text": "abstract protected function setValue($value);", "title": "" }, { "docid": "4d28eaf4bde66efc2b1d22b9c8ea422b", "score": "0.5689801", "text": "public function setPropriedade($propriedade, $valor){\n\n $actions = array('onabort','onblur','onchange','onclick','ondblclick','ondragdrop','onerror','onfocus','onkeydown','onkeypress','onkeyup','onload','onmousedown','onmousemove','onmouseout','onmouseover','onmouseup','onmove','onreset','onresize','onselect','onsubmit','onunload');\n //caso a propriedade seja uma a�ão javascript\n if(in_array(strtolower($propriedade),$actions)){\n $this->setAction($propriedade, $valor);\n }\n elseif(method_exists($this->fields, $propriedade)) {//se o valor passado for um m�todo do campo\n\n if(!is_array($valor)){\n\n // se valor da propriedade for composto converte em vetor\n $vls = explode(\";\",$valor);\n\n // verifica se o valor da propriedade � composto ou simples\n if(count($vls) > 1) {\n $this->fields->$propriedade($vls[0],$vls[1]);\n }else {\n\n // Propriedades especificas dos bot�es de a�ão\n if($this->fields instanceof TButton and $propriedade == \"setAction\"){\n\n //vefifica as a��es inseridas atravez do registro do kernelsys\n if(strpos($valor, '=')) {\n $vact = explode('=', $valor);\n\n $bAction = new TAction($vact[0]);\n\n $paramentros = explode(',', $vact[1]);\n foreach($paramentros as $kact=>$aparam) {\n $bAction->setParameter('arg'.$kact, $aparam);\n }\n }\n else {\n $bAction = new TAction($valor);\n }\n $this->fields->$propriedade($bAction, $this->label);\n $this->label = ' ';\n\n }else {\n $this->fields->$propriedade($valor);\n }\n }\n\n }else{\n $this->fields->$propriedade($valor);\n }\n\n }\n else {// senão, atribui propriedade\n $this->fields->$propriedade = $valor;\n }\n }", "title": "" }, { "docid": "6b5b2649ee921d80f7b7c15b45ec7b8b", "score": "0.5681959", "text": "public function __set($propriedade, $valor)\n {\n Validacao::protegeAtributo($propriedade);\n $this->$propriedade = $valor;\n }", "title": "" }, { "docid": "922242a4953965234fc95a606ffa5bb1", "score": "0.56817544", "text": "function set(Autor $autor){\r\n \r\n $parametrosWhere=array();\r\n $parametrosWhere[\"id_autor\"]=$autor->getID();\r\n return $this->bd->update($this->tabla, $autor->getGenerico(), $parametrosWhere);\r\n \r\n }", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.56800205", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.56800205", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.56800205", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.56800205", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.56800205", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.56800205", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.56800205", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.56800205", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.56800205", "text": "public function setValue($value);", "title": "" }, { "docid": "b368dd86cfc1b58c062a734b06dbae66", "score": "0.56742543", "text": "abstract public function setData();", "title": "" }, { "docid": "fccfe6836bb6dfaba8853134ac032aee", "score": "0.5656656", "text": "function asignar_valores(){\n\t\t$this->categoria=$_POST['categoria'];\n\t\t$this->titulo=$_POST['titulo'];\n\t\t$this->subtitulo=$_POST['subtitulo'];\n\t\t$this->contenido=$_POST['contenido'];\n\t\t$this->fecha=$_POST['fecha'];\n\t\t$this->autor=$_POST['autor'];\n\t}", "title": "" }, { "docid": "ff7df1ca812a81273cfaab54791c7199", "score": "0.5652291", "text": "function Atualizar()\n\t\t{\n\t\t\t$sql = \"update cliente set\n\t\t\t\t\tnome = ?,email = ?,senha = ?,telefone = ?,celular = ?\n\t\t\t\t\twhere codcli = ?\";\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\t$this->codcli));\n\t\t}", "title": "" }, { "docid": "4652d95eff96f48658af44dcf9178680", "score": "0.56441337", "text": "public function setData($data){\n $parcels = $this->getOrderElement();\n foreach($parcels as &$parcel){\n $parcel->attributes=$data;\n $parcel->save();\n }\n }", "title": "" }, { "docid": "4e05c9a2a4128b6a2460bc8a35dadb06", "score": "0.5641368", "text": "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_item('');\n $this->setId_schema_cambio('');\n $this->setId_item_cambio('');\n $this->setId_usuario('');\n $this->setSfsv('');\n $this->setAviso_tipo('');\n $this->setAvisado('');\n $this->setPrimary_key($aPK);\n }", "title": "" }, { "docid": "073d4405fe422dc402405fc7f9f22d63", "score": "0.564099", "text": "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_schema('');\n $this->setId_item('');\n $this->setId_nom('');\n $this->setId_tipo_activ('');\n $this->setF_ini('');\n $this->setDescripcion('');\n $this->setCdr('');\n $this->setPrimary_key($aPK);\n }", "title": "" }, { "docid": "c3c6a9868c379cdd881efea2468638dc", "score": "0.56387365", "text": "function updateFieldsChoices()\n {\n $code_ent = $this->attributesAccess['supannEntiteAffectation']->getValue();\n $label_ent = $this->attributesAccess['supannEntiteAffectation']->getDisplayValues();\n $this->attributesAccess['supannEntiteAffectationPrincipale']->setChoices(\n $code_ent, $label_ent\n );\n $code_etab = $this->attributesAccess['supannEtablissement']->getValue();\n $label_etab = $this->attributesAccess['supannEtablissement']->getDisplayValues();\n $this->attributesAccess['supannEtuInscription']->attribute->attributes[0]->setChoices($code_etab, $label_etab); // supannEtablissement\n $this->attributesAccess['supannEtuInscription']->attribute->attributes[6]->setChoices($code_ent, $label_ent); // supannEntiteAffectation\n $this->attributesAccess['supannRoleEntite']->attribute->attributes[2]->setChoices($code_ent, $label_ent); // supannEntiteAffectation\n $code_tent = $this->attributesAccess['supannTypeEntiteAffectation']->getValue();\n $label_tent = $this->attributesAccess['supannTypeEntiteAffectation']->getDisplayValues();\n $this->attributesAccess['supannRoleEntite']->attribute->attributes[1]->setChoices($code_tent, $label_tent); // supannTypeEntiteAffectation\n\n $this->attributesAccess['eduPersonPrimaryAffiliation']->setChoices(\n $this->attributesAccess['eduPersonAffiliation']->getValue(),\n $this->attributesAccess['eduPersonAffiliation']->getDisplayValues()\n );\n }", "title": "" }, { "docid": "ab01d8fafc3bc9a9e281d0ad724fbefa", "score": "0.56268346", "text": "public function setNumPatas ($numpatas){\n$this->numPatas=$numpatas;\n}", "title": "" }, { "docid": "3a86793db37edfdcb9c41d1997ce3e2a", "score": "0.56210214", "text": "function setValue($value){\n\t\t$this->value = $value;\n\t}", "title": "" }, { "docid": "ee7d193b5f64f10c9526692b64691283", "score": "0.56188077", "text": "private static function setValues() {\n self::$values = array_values(self::$dados);\n }", "title": "" }, { "docid": "df52eaf068800ee4f4caae9c65830fe6", "score": "0.5606233", "text": "public function applyOptions(): void\n {\n $this->setProp('value', $this->attribute);\n }", "title": "" }, { "docid": "8af180646f4a963c4d67a7850ade98f8", "score": "0.56022245", "text": "public function mutacao(){\r\n\r\n }", "title": "" }, { "docid": "224b0a727d7ebdb3119c5e3e9721fb48", "score": "0.55999815", "text": "public function set_informacion_contacto($id, $telefono, $direccion, $rfc)\n{\n $this->idclientes = $id; \n $this->telefono = $telefono; \n $this->direccion = $direccion;\n $this->rfc = $rfc;\n\n}", "title": "" }, { "docid": "5380442fb3ed18c303b5dd57b30a674d", "score": "0.5580992", "text": "private function actualizar_idioma(){\n\t\t$cols = array('titulo' => $_POST['titulo'],\n\t\t\t\t\t 'descripcion' => $_POST['descripcion']);\n\t\t\n\t\t$this->Builder->reset();\n\t\t$this->Builder->where('id',$this->id);\n\t\t$this->Builder->update('anuncios_idiomas',$cols);\n\n\t}", "title": "" }, { "docid": "02e0eff4d4ef27b4a883e7ed83bbbed6", "score": "0.5575625", "text": "public function __set($name, $value) {\n switch ($name) {\n case \"id\" :\n $this->_id = $value;\n break;\n case \"id_proveedor\" :\n $this->_id_proveedor = $value;\n break;\n case \"id_comuna\" :\n $this->_id_comuna = $value;\n break;\n case \"descripcion\" :\n $this->_descripcion = $value;\n break;\n case \"direccion\" :\n $this->_direccion = $value;\n break;\n case \"telefono1\" :\n $this->_telefono1 = $value;\n break;\n case \"telefono2\" :\n $this->_telefono2 = $value;\n break;\n case \"fax\" :\n $this->_fax = $value;\n break;\n case \"correo\" :\n $this->_correo = $value;\n break;\n case \"fotos\" :\n $this->_fotos = $value;\n break;\n case \"fecha_creacion\" :\n $this->_fecha_creacion = $value;\n break;\n case \"multimarca\" :\n $this->_multimarca = $value;\n break;\n case \"latitud\" :\n $this->_latitud = $value;\n break;\n case \"longitud\" :\n $this->_longitud = $value;\n break;\n default:\n $trace = debug_backtrace();\n trigger_error(\n 'Undefined property via __set(): ' . $name .\n ' in ' . $trace[0]['file'] .\n ' on line ' . $trace[0]['line'],\n E_USER_NOTICE);\n }\n }", "title": "" }, { "docid": "c44a22696351db7a821a59109659c174", "score": "0.55755305", "text": "function __set( $name, $value ) //sega setvame value-to na atributa;\n\t{\n\t\tswitch ( $name )\n\t\t{\n\t\t\tcase \"name\" :\n\t\t\t\t$this -> name = $value;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"favoriteFood\" : \n\t\t\t$this -> favoriteFood = $value;\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"sound\" :\n\t\t\t\t$this -> sound = $value;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tdefault :\n\t\t\t\techo $name . \" Not Found \";\n\t\t\t\t\n\t\t}\n\t\t\n\t\techo \"Set\" . $name . \" to \" . $value ;\n\t\t\n\t}", "title": "" }, { "docid": "b4df380c3671f2d0c4ff22523113a4d4", "score": "0.55674976", "text": "public function set($obj, $attribute);", "title": "" }, { "docid": "937d9156014a41bb7dcd84f1a09eb251", "score": "0.55654216", "text": "public function setItemsValuesAdm()\n {\n $ids = array();\n foreach($this->items as $item) {\n $ids[] = $item->id;\n }\n\n $this->getItemValues($ids);\n $this->checkValues();\n\n foreach($this->items as $id=>$item) {\n foreach($this->isset_fields as $f) {\n if (!$f->published)\n continue;\n $this->items[$id]->subfields->{$f->name} = $this->findValue($item->id, $f->id);\n }\n }\n }", "title": "" }, { "docid": "4e2571e967fbbdda18b426dde92ca6a1", "score": "0.55617154", "text": "public function setAtaqueProgramador($valor){\n $this->ataqueProgramador=$valor;\n }", "title": "" }, { "docid": "cf5b58c4ade96c5b5dbf04794be54892", "score": "0.55586296", "text": "public function setArray($colunas = array()) {\n foreach ($colunas as $coluna => $valor) {\n $method = \"set\" . ucfirst($coluna);\n $this->$method($valor);\n }\n }", "title": "" }, { "docid": "ba954221e305acad24dd9e2af32be9a9", "score": "0.5551006", "text": "public function setValor($valor) {\n $this->valor = $valor;\n }", "title": "" }, { "docid": "0874976808ccdacbc0306aabca5d1fa8", "score": "0.5543784", "text": "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_enc('');\n $this->setId_tipo_enc('');\n $this->setSf_sv('');\n $this->setId_ubi('');\n $this->setId_zona('');\n $this->setDesc_enc('');\n $this->setIdioma_enc('');\n $this->setDesc_lugar('');\n $this->setObserv('');\n $this->setPrimary_key($aPK);\n }", "title": "" } ]
3c0bdb6b191665cec5a0306cf594ce87
adds a course completed by the user
[ { "docid": "8807aa9e2e67e5d8e47cd7fc4844faf8", "score": "0.555031", "text": "public function add($userid, $code) {\n $sql = \"INSERT IGNORE INTO course_completed (userid, code) VALUES (:userid, :code)\";\n\n $connMgr = new ConnectionManager(); \n $conn = $connMgr->getConnection();\n $stmt = $conn->prepare($sql);\n\n $stmt->bindParam(':userid', $userid, PDO::PARAM_STR);\n $stmt->bindParam(':code', $code, PDO::PARAM_STR);\n\n $isAddOK = $stmt->execute();\n\n return $isAddOK;\n }", "title": "" } ]
[ { "docid": "54383debdfb28469e04ce7456070c623", "score": "0.6714445", "text": "public function addCourse() {\r\n\t \r\n\t\tglobal $_DB, $_CORE;\r\n\t\t\r\n\t\t$studentModel = new StudentModel();\r\n\t\t$view = new StudentView();\r\n\t\t$Adminview = new AdminView();\r\n\t\t$result = $studentModel->addCourse($_SESSION['studentId'],$_DB->escape($_GET['courseOfferingID']));\r\n\t\t\r\n\t\tif (is_array($result) AND $result['result']){\r\n\t\t\t$Adminview->set('error','Course Successfully Added!');\r\n \t\t\t$_SESSION['siteMessage'] = $Adminview->sUseTemplate('/components/main/views/success.tpl.php');\r\n \t\t\t$_CORE->redirect('student/viewSchedule/?semester=' .$_DB->escape($result['semester']));//\t\t\t\t\r\n\t\t}\r\n\t\t\t$_CORE->redirect('course/search');\t\r\n\t\t\r\n\t\t\r\n\t}", "title": "" }, { "docid": "6125c3a6c002c9d8fdece99249550060", "score": "0.6663301", "text": "public function addCourse(){\n\n\t\t\t$timezone = new \\DateTimeZone('America/Belize');\n\t $date = new \\DateTime('@' . time(), $timezone);\n\t $date->setTimezone($timezone);\n\t $today = $date->format('Y-m-d H:i:s');\n\n\t\t\t$data = array(\n\t\t\t\t'short' \t\t=> $this->input->post('short_name'),\n\t\t\t\t'name' \t\t\t=> $this->input->post('course'),\n\t\t\t\t'type'\t\t\t=> $this->input->post('type'),\n\t\t\t\t'description' => $this->input->post('des'),\n\t\t\t\t'status' \t\t=> '1',\n\t\t\t\t'deleted' \t=> '0',\n\t\t\t\t'edited_on' \t=> $today\n\t\t\t);\n\n\t\t\t$result = $this->db->insert('courses', $data);\n\t\t\treturn $result;\n\t\t\t//$this->session->set_flashdata('courseAdded_success','Course was successfully added to the system!');\n\t\t}", "title": "" }, { "docid": "90a78883a1a155642b2ab77332a7c21b", "score": "0.64617616", "text": "public function addcourses()\n\t\t{\n\t\t\t$data['title'] = 'Add courses';\n\t\t\t\n\t\t\t$this->load->view('templates/header', $data);\n\t\t\t$this->load->view('users/courses', $data);\n\t\t\t$this->load->view('templates/footer');\n\t\t}", "title": "" }, { "docid": "d6b39bc012a8757a70cdd71730cdbe65", "score": "0.64454955", "text": "public function completed()\n {\n if($this->current->completed){\n // Delete user lesson complete register\n $this->current->users()->detach( auth()->user()->id );\n } else {\n // Insert user lesson complete register\n $this->current->users()->attach( auth()->user()->id );\n }\n\n // Update current lesson static property\n // Update course static property\n $this->current = Lesson::find($this->current->id);\n $this->course = Course::find($this->course->id);\n }", "title": "" }, { "docid": "f5887f6151acf8e8cffc243b411479ac", "score": "0.63849694", "text": "function poasassignment_user_complete($course, $user, $mod, $poasassignment) {\n return true;\n}", "title": "" }, { "docid": "6748a75ca19aeae039bf2f13be63632f", "score": "0.6372822", "text": "function qa_user_complete($course, $user, $mod, $qa) {\n}", "title": "" }, { "docid": "95ddd3b471554978accaa00e1fd60165", "score": "0.62778336", "text": "function threesixty_user_complete($course, $user, $mod, $threesixty) {\n return true;\n}", "title": "" }, { "docid": "d0e2020888ef45cce15743e3d05d0e36", "score": "0.6246149", "text": "function univtutoring_user_complete($course, $user, $mod, $univtutoring) {\n}", "title": "" }, { "docid": "56cb8e72d79b247905ee82d21e8eb0c1", "score": "0.6230266", "text": "public function addCourse(Course $course) {\n $this->addModelToViewArray('courses', $course);\n }", "title": "" }, { "docid": "94d9e3e40b88af395eaebd3a138404ab", "score": "0.62255573", "text": "function course_completed_handler($event) {\n global $DB;\n $id = $event->course;\n $userid = $event->userid;\n $timecompleted = $event->timecompleted;\n $scopes = array();\n array_push($scopes, array(\n 'id' => 'course'.$id,\n 'entity_id' => 'u'.$userid\n ));\n $courses_completed = $DB->get_records('course_completions', array('userid' => $userid));\n $courses_done = array();\n foreach($courses_completed as $course_completed) {\n array_push($courses_done, $course_completed->course);\n }\n // mtrace(json_encode($courses_done));\n $course_group = get('course_group');\n // mtrace(json_encode($course_group));\n foreach($course_group as $index => $cg) {\n $has_done = true;\n $cg_id = 'course_group_'.$index.'_completed';\n foreach($cg as $course_id) {\n if(!in_array($course_id, $courses_done)) {\n $has_done = false;\n }\n }\n if($has_done and !has_finished_rule($cg_id, $userid)) {\n execute_rule($cg_id, $event->userid);\n }\n }\n execute_rule('course_'.$id.'_completed', $userid, $scopes);\n $criteria = $DB->get_record('course_completion_criteria', array('course' => $id, 'criteriatype' => 2));\n if($criteria and $criteria->timeend >= $timecompleted) {\n execute_rule('course_'.$id.'_bonus', $userid, $scopes);\n }\n }", "title": "" }, { "docid": "89025474cd371345ac3f3a1222ae02b5", "score": "0.61452967", "text": "public function add() {\r\n // Set meta data\r\n $metaData = array();\r\n $metaData['title'] = \"Manage courses - Add courses\"; \r\n $this->view->meta = $metaData;\r\n $this->view->dashboardAssets = false; \r\n $this->view->datatableAssets = false;\r\n $this->view->formAssets = true;\r\n $this->view->dropzoneAssets = false;\r\n $this->view->facultyDetails = $this->model->getFaculty();\r\n $this->view->countriesList = file_get_contents(SITEURL.\"index/getCountries\");\r\n // load course view page\r\n $this->view->LoadView('add_course', 'course');\r\n }", "title": "" }, { "docid": "c37d85acbc084c1c38085de5e91fd022", "score": "0.61132103", "text": "public function Add(){\n\t\t\ttry\n\t\t\t{\n\t\t\t\t\tif ( $this->request->is('post')) {\n\t\t\t\t\t\t $this->Course->create();\n\t\t\t\t\t\t // If the form data can be validated and saved...\n\t\t\t\t if ($this->Course->save($this->request->data)) {\n\t\t\t\t // Set a session flash message and redirect.\n\t\t\t\t $this->Session->setFlash('Course has been saved!');\n\t\t\t\t $this->redirect('Index');\n\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tcatch( Exception $e ){\n\t\t\t\techo 'Message: ' . $e->getMessage();\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "6c8505294a6b2c47bb969af2d5c3a3d4", "score": "0.60603464", "text": "public static function check_completion($certification, $userid, $path = null, $completedcourses = null){\n if(!is_object($certification)){\n $certification = new certification($certification, false);\n }\n /**\n * Get all completed courses for user if not provided\n */\n if($completedcourses === null){\n $completedcourses = self::get_completed_courses($userid);\n }\n $certificationcompleted = self::COMPLETION_STATUS_STARTED;\n $completed = true;\n\n /**\n * Check if this is certification or recertification path\n */\n if($path == certification::CERTIFICATIONPATH_RECERTIFICATION || ($path===null && self::is_recertification($certification->id, $userid))){\n $coursesets = $certification->recertificationcoursesets;\n $certifpath = certification::CERTIFICATIONPATH_RECERTIFICATION;\n }else{\n $coursesets = $certification->certificationcoursesets;\n $certifpath = certification::CERTIFICATIONPATH_BASIC;\n }\n\n /**\n * Check if all required courseset are completed\n */\n $lastoperator = '';\n foreach($coursesets as $courseset){\n if($lastoperator == certification::NEXTOPERATOR_OR){\n $completed = true;\n }\n if(!self::check_courseset_completion($courseset, $completedcourses)){\n $completed = false;\n }\n\n /**\n * Update completion status for single courseset\n */\n self::update_courseset_completion_status($courseset->id, $userid, ($completed ? completion::COMPLETION_STATUS_COMPLETED : completion::COMPLETION_STATUS_STARTED));\n /**\n * If nextoperator is OR and previous coursesets are completed then mark entire certification as completed\n */\n if($courseset->nextoperator == certification::NEXTOPERATOR_OR && $completed){\n $certificationcompleted = self::COMPLETION_STATUS_COMPLETED;\n }\n $lastoperator = $courseset->nextoperator;\n }\n if($completed){\n $certificationcompleted = self::COMPLETION_STATUS_COMPLETED;\n }\n /**\n * Update certification completion record info\n */\n self::update_completion_status($certification, $userid, $certifpath, $certificationcompleted);\n return $certificationcompleted;\n }", "title": "" }, { "docid": "ef7fd97fa158f440d67c066afb16583d", "score": "0.6059982", "text": "public function addCourse($trainee_ids, $course_id);", "title": "" }, { "docid": "d7f387de791a65ea441673aaa81c8e6b", "score": "0.603531", "text": "function fluencybuilder_user_complete($course, $user, $mod, $fluencybuilder) {\n}", "title": "" }, { "docid": "8d9fccf76dffa70c297df63862f0e491", "score": "0.6028521", "text": "function webpa_user_complete($course, $user, $mod, $webpa) {\n return true;\n}", "title": "" }, { "docid": "83c09fdc96680b4219ed73cbb7725a67", "score": "0.5994472", "text": "public function notify_new_course() {\n\t\tglobal $menu;\n\n\t\t$current_user = wp_get_current_user();\n\t\tif ( ! in_array( 'administrator', $current_user->roles ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$count_courses = wp_count_posts( LP_COURSE_CPT );\n\t\t$awaiting_mod = $count_courses->pending;\n\t\t$menu['3.14'][0] .= \" <span class='awaiting-mod count-$awaiting_mod'><span class='pending-count'>\" . number_format_i18n( $awaiting_mod ) . '</span></span>';\n\t}", "title": "" }, { "docid": "e1472ad64d676729bde96d4ae627e3ed", "score": "0.5923353", "text": "public function addCourse($data, $user_id = null){\n if(!$user_id) {\n User::get('id');\n }\n \n $model= $this->name;\n if(!$this->Course){\n App::import('Model', 'Course');\n $this->Course = new Course();\n }\n $this->Course->recursive=-1;\n $course = $this->Course->findCurrent($user_id);\n if(isset($data[0])){\n foreach ($data as $id=>$datum){\n $datum[$id]['course_id'] = $course;\n }\n } else {\n $data[$model]['course_id'] = $course;\n }\n return $data;\n }", "title": "" }, { "docid": "15d15dbbe6cb2481c01cd19c0b3b7edd", "score": "0.59171134", "text": "public function completed(User $user);", "title": "" }, { "docid": "2c6828ae4b13cafddc9279469bad46db", "score": "0.58780354", "text": "public function create_course(){\n\t\t\t$data = array(\n\t\t\t\t'course_id' => $this->input->post('course_id'),\n\t\t\t\t'teacher_id' => $this->session->userdata('user_id')\t\t\t\t\n\t\t\t);\n\t\t\treturn $this->db->insert('teacher_course', $data);\n\t}", "title": "" }, { "docid": "27353d3de4cf6dcbf3e7a3ee5407bb1b", "score": "0.58685315", "text": "private function addcoursesection($view)\n {\n $sectionModel = new courseSectionsModel();\n if($_SERVER['REQUEST_METHOD'] === 'POST') {\n $id = filter_var($_POST['course_id'], FILTER_SANITIZE_NUMBER_INT);\n $section = filter_var($_POST['section_name'], FILTER_SANITIZE_STRING);\n if( $sectionModel->addCourseSection(Factory::generateCourseSectionsDataArray($section, $id))) {\n $this->setSuccess('Section Added Successfully');\n Redirect::redirect('course.php?id='.$id);\n } else {\n $this->setError('Section is not valid');\n Redirect::redirect(\"javascript:history.go(-1)\");\n }\n } else {\n Redirect::redirect(\"javascript:history.go(-1)\");\n }\n }", "title": "" }, { "docid": "a88b61307138ba26ebedd640a91bb3b7", "score": "0.58285105", "text": "function add()\n { \n if($this->session->userdata('logged_in') == TRUE && $this->session->userdata('userTypeID') == 4)\n {\n $this->load->library('form_validation');\n\n\t\t$this->form_validation->set_rules('courseCode','CourseCode','required|max_length[10]');\n\t\t$this->form_validation->set_rules('courseName','CourseName','required|max_length[70]');\n\t\t$this->form_validation->set_rules('remarks','Remarks','required|max_length[200]');\n $this->form_validation->set_rules('dateModified','DateModified');\n\t\t\n\t\tif($this->form_validation->run()) \n { \n $params = array(\n\t\t\t\t'courseCode' => $this->input->post('courseCode'),\n\t\t\t\t'courseName' => $this->input->post('courseName'),\n\t\t\t\t'remarks' => $this->input->post('remarks'),\n 'dateModified' => null,\n 'status' => 'Active',\n );\n $this->db->set('dateAdded', 'NOW()', FALSE);\n $course_id = $this->Course_model->add_course($params);\n $idnum = $this->session->userdata('userIDNo');\n $paramsaudit = array(\n 'userIDNo' => $idnum,\n 'auditDesc' => 'Added Course',\n );\n $this->Auditlog_model->add_auditlog($paramsaudit);\n redirect('reg_course/index');\n }\n else\n { \n $data['_view'] = 'registrar_page/course/add';\n $this->load->view('layouts/reg',$data);\n }\n }\n else\n {\n redirect('landing_page/index');\n }\n }", "title": "" }, { "docid": "a75caa92baab9a164f00565578d3f878", "score": "0.58137494", "text": "public function testAddCourse()\n\t{\n\t\t//\n\t\t$testStudentID \t\t= '1';\n\t\t$testSemesterID\t\t= '1';\n\t\t$testCourseID \t\t= '2';\n\t\t$testAssignmentType = 'Quiz';\n\t\t$testName \t\t\t= 'Software Engineering Capstone Quiz 7';\n\t\t$testDueDate \t\t= '2013-01-01';\n\t\t$testStudyTime \t\t= '4';\n\t\t$testPointsAllowed \t= '5';\n\t\t$testPointsRecieved\t= '5';\n\n\t\t\n\t\t//create Course object\n\t\t//\n\t\t$assignmentTestObj = new Assignment();\n\t\t\n\t\t$assignmentTestObj ->setStudentId($testStudentID);\n\t\t$assignmentTestObj ->setSemesterId($testSemesterID);\n\t\t$assignmentTestObj ->setCourseId($testCourseID);\n\t\t$assignmentTestObj ->setAssignmentType($testAssignmentType);\n\t\t$assignmentTestObj ->setName($testName);\n\t\t$assignmentTestObj ->setDueDate($testDueDate);\n\t\t$assignmentTestObj ->setStudyTime($testStudyTime);\n\t\t$assignmentTestObj ->setPointsAllowed($testPointsAllowed);\n\t\t$assignmentTestObj ->setPointsRecieved($testPointsRecieved);\n\n\t\t$assignmentAdded = AssignmentDAO::addNew($assignmentTestObj);\n\t\t\n\t\t$this->assertEquals(\"1\", $assignmentAdded->getStudentId());\n\t\t$this->assertEquals(\"1\", $assignmentAdded->getSemesterId());\n\t\t$this->assertEquals(\"2\", $assignmentAdded->getCourseId());\n\t\t$this->assertEquals(\"4\", $assignmentAdded->getAssignmentId());\n\t\t$this->assertEquals(\"Quiz\", $assignmentAdded->getAssignmentType());\n\t\t$this->assertEquals(\"Software Engineering Capstone Quiz 7\", $assignmentAdded->getName());\n\t\t$this->assertEquals(\"2013-01-01\" , $assignmentAdded->getDueDate());\t\n\t\t$this->assertEquals(\"4\", $assignmentAdded->getStudyTime());\n\t\t$this->assertEquals(\"5\", $assignmentAdded->getPointsAllowed());\n\t\t$this->assertEquals(\"5\" , $assignmentAdded->getPointsRecieved());\t\n\t}", "title": "" }, { "docid": "169094d173e18b2caf488633dfec6e13", "score": "0.58086604", "text": "function create_course($course);", "title": "" }, { "docid": "8fb03fd8434d05fa73000b86fd5b7537", "score": "0.5782314", "text": "function user_course_completion($userid)\n{\n\tglobal $DB;\n\t$ret=0;\n\t$completion=$DB->get_records_sql(\"SELECT * FROM {course_completions} WHERE userid=\".$userid.\" AND timecompleted IS NOT NULL\");\n\t$ret = count($completion);\n\treturn $ret;\n}", "title": "" }, { "docid": "451a0b018a9d2a94092f1adcfbc8195d", "score": "0.57747746", "text": "function subscribe_user_to_course($course, $status, $tutor_id, $user_id);", "title": "" }, { "docid": "16b276e5181db0a523e90dd68fedc673", "score": "0.5769621", "text": "function learn_press_profile_tab_courses_finished( $user, $tab = null ) {\n\t\t$args = array(\n\t\t\t'user' => $user,\n\t\t\t'subtab' => $tab,\n\t\t);\n\t\t$limit = LP()->settings->get( 'profile_courses_limit', 10 );\n\t\t$limit = apply_filters( 'learn_press_profile_tab_courses_finished_limit', $limit );\n\t\t$courses = $user->get(\n\t\t\t'enrolled-courses',\n\t\t\tarray(\n\t\t\t\t'status' => 'finished',\n\t\t\t\t'limit' => $limit,\n\t\t\t)\n\t\t);\n\t\t$num_pages = learn_press_get_num_pages( $user->_get_found_rows(), $limit );\n\t\t$args['courses'] = $courses;\n\t\t$args['num_pages'] = $num_pages;\n\t\tlearn_press_get_template( 'profile/tabs/courses/finished.php', $args );\n\t}", "title": "" }, { "docid": "88ddc63e5b9e5a8fda80339a79728207", "score": "0.56839734", "text": "public function createCourse(){\n $path = '/admin/content/courses/create';\n $branches = Branch::get();\n $sub_branches = SubBranch::get();\n $instructors = Instructor::get();\n $semesters = Semester::get();\n $diplomas = Diploma::get();\n return view('admins.create-course', compact('path', 'branches', 'sub_branches', 'semesters', 'instructors', 'diplomas'));\n }", "title": "" }, { "docid": "547509787daf8f1146fc64cfbbb539dd", "score": "0.56765205", "text": "function sloodle_user_complete($course, $user, $mod, $sloodle) {\n return true;\n }", "title": "" }, { "docid": "d5d63b20af2afc6e6e98d00a1ad142c9", "score": "0.5668444", "text": "public function completed() {\n\t\t$home_lang = $this->session->userdata('home_lang');\n\t\t$diff_lang = $this->session->userdata('diff_lang');\n\t\t$data = array(\n\t\t\t'data' => '',\n\t\t);\n\t\t$this->template->write('title','Completed book tour');\n\t\t$this->template->write_view('content','FRONTEND/content/completed',$data);\n\t\t$this->template->render();\n\t}", "title": "" }, { "docid": "65ad8d0cdb1c1f41c4983e4f34f063de", "score": "0.5656101", "text": "public function save_user_course($id_apprentice = null,$id_user_course = 0){\n if ($this->session->get('user_access')>=config('\\User\\Config\\UserConfig')->access_lvl_trainer) {\n $apprentice = User_model::getInstance()->find($id_apprentice);\n $user_course = UserCourseModel::getInstance()->find($id_user_course);\n\n if ($id_apprentice == null || $apprentice['fk_user_type'] != User_type_model::getInstance()->where('name', lang('plafor_lang.title_apprentice'))->first()['id']) {\n return redirect()->to(base_url('plafor/apprentice/list_apprentice'));\n exit();\n }\n\n if (count($_POST) > 0) {\n $fk_course_plan = $this->request->getPost('course_plan');\n $user_course = array(\n 'fk_user' => $id_apprentice,\n 'fk_course_plan' => $fk_course_plan,\n 'fk_status' => $this->request->getPost('status'),\n 'date_begin' => $this->request->getPost('date_begin'),\n 'date_end' => $this->request->getPost('date_end'),\n );\n if ($id_user_course > 0) {\n //update\n UserCourseModel::getInstance()->update($id_user_course, $user_course);\n } else if (UserCourseModel::getInstance()->where('fk_user', $id_apprentice)->where('fk_course_plan', $fk_course_plan)->first() == null) {\n //insert\n $id_user_course = UserCourseModel::getInstance()->insert($user_course);\n\n $course_plan = UserCourseModel::getCoursePlan($user_course['fk_course_plan']);\n $competenceDomainIds = [];\n\n foreach (CoursePlanModel::getCompetenceDomains($course_plan['id']) as $competence_domain) {\n $competenceDomainIds[] = $competence_domain['id'];\n }\n\n $operational_competences = [];\n // si il n'y a pas de compétence operationnelles associées\n try {\n $operational_competences = OperationalCompetenceModel::getInstance()->withDeleted()->whereIn('fk_competence_domain', $competenceDomainIds)->findAll();\n } catch (\\Exception $e) {\n };\n $objectiveIds = array();\n foreach ($operational_competences as $operational_competence) {\n foreach (OperationalCompetenceModel::getObjectives($operational_competence['id']) as $objective) {\n $objectiveIds[] = $objective['id'];\n }\n }\n foreach ($objectiveIds as $objectiveId) {\n $acquisition_status = array(\n 'fk_objective' => $objectiveId,\n 'fk_user_course' => $id_user_course,\n 'fk_acquisition_level' => 1\n );\n\n AcquisitionStatusModel::getInstance()->insert($acquisition_status);\n }\n }\n if (UserCourseModel::getInstance()->errors() == null) {\n //if ok\n return redirect()->to(base_url('plafor/apprentice/view_apprentice/' . $id_apprentice));\n exit();\n }\n }\n $course_plans = [];\n foreach (CoursePlanModel::getInstance()->findAll() as $courseplan)\n $course_plans[$courseplan['id']] = $courseplan['official_name'];\n $status = [];\n foreach (UserCourseStatusModel::getInstance()->findAll() as $usercoursestatus) {\n $status[$usercoursestatus['id']] = $usercoursestatus['name'];\n }\n $output = array(\n 'title' => lang('plafor_lang.title_user_course_plan_link'),\n 'course_plans' => $course_plans,\n 'user_course' => $user_course,\n 'status' => $status,\n 'apprentice' => $apprentice,\n 'errors' => UserCourseModel::getInstance()->errors()\n );\n\n return $this->display_view('Plafor\\user_course/save', $output);\n }\n else{\n return $this->display_view('\\User\\errors\\403error');\n }\n }", "title": "" }, { "docid": "2f7e35e698312fc20a834c01417d038a", "score": "0.5643558", "text": "public function create()\n {\n $user = auth()->user();\n if($user->type > 2){\n return redirect('/courses')->with('error', 'Access Denied');\n }else{\n $courses = $user->courses;\n if(count($courses) > 0){\n if(!$courses->last()->published){\n return redirect('/courses/'.$courses->last()->id)->with('error', 'Please finish making this course');\n }\n }\n return view('courses.create');\n }\n\n }", "title": "" }, { "docid": "859775d3e9a56b8c4a7fde99361cacc5", "score": "0.5642454", "text": "public function add_to_cart() {\n\t\t$course_id = $this->input->post('course_id');\n\t\t$response = $this->crud_model->add_to_cart($course_id);\n\t\techo json_encode($response);\n\t\treturn true;\n\t}", "title": "" }, { "docid": "6fd6ab9b0a5a423b82359bcea89a2c6c", "score": "0.56243473", "text": "function genetic_user_complete($course, $user, $mod, $genetic) {\n return true;\n}", "title": "" }, { "docid": "f723199a068b7936920dd5ae73cd8d0d", "score": "0.5619803", "text": "function learn_press_after_profile_tab_loop_course( $user, $course_id ) {\n\n\t\t$args = array(\n\t\t\t'user' => $user,\n\t\t\t'course_id' => $course_id,\n\t\t);\n\t\tlearn_press_get_template( 'profile/tabs/courses/progress.php', $args );\n\n\t}", "title": "" }, { "docid": "34ca78406d3f46e6caa4a79bf0483473", "score": "0.5604212", "text": "public function testTakenCourseUpdateTakenCourses ()\r\n\t{\r\n\t\t$userEmail = \"[email protected]\";\r\n\t\t$course = \"COMP249\";\r\n\r\n\t\t$this->assertFalse(updateTakenCourses($userEmail,$course));\r\n\t}", "title": "" }, { "docid": "26d919a0721b205c75a228ecbf61480f", "score": "0.5587128", "text": "public function update(Request $request, AddCourse $addCourse)\n {\n //\n }", "title": "" }, { "docid": "ea054c102206f982597aaf91d86226e5", "score": "0.55690175", "text": "function notebookdec_user_complete($course, $user, $mod, $notebookdec) {\n}", "title": "" }, { "docid": "0613a7708d83374e2571dace472f40be", "score": "0.5564635", "text": "public function insert_course($new_course)\n {\n \t$this->db->insert('courses', $new_course);\n }", "title": "" }, { "docid": "f503bf8d8222d080f48c1cc510485b87", "score": "0.5564362", "text": "function bim_user_complete($course, $user, $mod, $bim) {\n return true;\n}", "title": "" }, { "docid": "aa01fb59316c0d658b352b8b8afb10ea", "score": "0.55601066", "text": "public function save()\n\t\t{\n\t\t\t$this->model->newCourse($_REQUEST);\t\t\n\n\t\t\theader('Location: ?controller=Course');\n\t\t}", "title": "" }, { "docid": "452d304e6a2857706c0c51aca343df54", "score": "0.5554669", "text": "function quiz_user_complete($course, $user, $mod, $quiz) {\n/// a given particular instance of this module, for user activity reports.\n\n return true;\n}", "title": "" }, { "docid": "cfbd19612444dba6f8ea8973969ec59d", "score": "0.5550539", "text": "function get_last_course_completed($userid){\n\tglobal $DB;\n\t$lastcourse=$DB->get_record_sql(\"SELECT course FROM {course_completions} WHERE timecompleted IS NOT NULL GROUP BY timecompleted DESC LIMIT 1\");\n\n\t$courses=$lastcourse->course;\n\treturn $courses;\n}", "title": "" }, { "docid": "8c147bc923d8e0f0f65055369abe419a", "score": "0.55280375", "text": "public static function courseuser_insert($enrolments) {\r\n global $DB, $CFG;\r\n \r\n #require_once($CFG->libdir . '/enrollib.php');\r\n\t\t\t\trequire_once(dirname(dirname(dirname(__FILE__))).'/config.php'); // global moodle config file.\r\n\r\n #$params = self::validate_parameters(self::manual_enrol_users_parameters(),\r\n # array('enrolments' => $enrolments));\r\n\t\t\t\t$params = $enrolments;\r\n\t\t\t\t\tsyncLog(\"courseuser_insert \".$params[\"username\"].\" in \\\"\".$params[\"courseFullname\"].\"\\\" [\".$params[\"coursename\"].\"] as '\".$params[\"roleid\"].\"' \");\r\n # $transaction = $DB->start_delegated_transaction(); //rollback all enrolment if an error occurs\r\n \r\n\t\t\t\t$enrolment = $params;\r\n\t\t\t\t \r\n \r\n // Ensure the current user is allowed to run this function in the enrolment context\r\n \r\n $MoodleCourseId = self::inner_get_courseid_by_coursecode($enrolment[\"coursename\"]);\r\n $courseShort = $enrolment[\"coursename\"];\r\n $username = $enrolment[\"username\"];\r\n \r\n syncLog(\"Coursecode \\\"\".$enrolment[\"coursename\"].\"\\\" has moodle courseId: $MoodleCourseId \");\r\n $context = get_context_instance(CONTEXT_COURSE, $MoodleCourseId);\r\n # self::validate_context($context);\r\n\t\t\t\t \r\n\t\t\t\t \r\n //check that the user has the permission to manual enrol\r\n # require_capability('enrol/manual:enrol', $context);\r\n\t\t\t\t\t\t# $enrolment[\"roleid\"] = $enrolment[\"courseRole\"];\r\n\t\t\t\t\t\t$role_cmp = $enrolment[\"roleid\"];\r\n\t\t\t\t\t\t$role = MOODLE_COURSEROLE_STUDENT;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ($role_cmp == \"student\") { \t\t$role = MOODLE_COURSEROLE_STUDENT;}\r\n\t\t\t\t\t\tif ($role_cmp == \"instructor\") { \t$role = MOODLE_COURSEROLE_INSTRUCTOR;}\r\n\t\t\t\t\t\tif ($role_cmp == \"guest\") { \t$role = MOODLE_COURSEROLE_GUEST;}\r\n\t\t\t\t\t\t\r\n \r\n\t $enrolment['courseid'] = $courses[0]->id;\r\n\t \r\n\t \t$success = true;\r\n\t \t$errors = \"no\";\r\n\t try {\r\n\t $enrol_portal = new enrol_portal_plugin();\r\n\t\t\t$arg = $enrol_portal->enrol_to_course($courseShort,$username,$role); \r\n\t\t\tif ($arg == false) { syncLog(\"enrol_to_course -- error \"); }\r\n\t\t\t\r\n\t\t\t$success = true;\r\n\t\t\tsyncLog(\"courseuserinsert proceed\");\r\n\t\t} catch (Exception $e) {\r\n\t\t\t\r\n\t\t\t\t$success = false;\r\n\t\t\t\t\r\n\t\t\t\tsyncLog(\"error whiule courseuserinsert\");\r\n\t\t}\r\n \r\n # $transaction->allow_commit();\r\n $errors = \"illi\".rand(10,99);\r\n $res = array (\r\n\t\t\t\t\t\t\"success\" => $success ,\r\n\t\t\t\t\t\t\"errors\"\t\t=> $errors\r\n\t\t\t\t);\r\n\t\t\t \r\n\t\t\t\treturn $res;\r\n }", "title": "" }, { "docid": "9a1f5ee9c927e4915ebf7b0d482bd1c1", "score": "0.5524722", "text": "function modmediawiki_user_complete($course, $user, $mod, $modmediawiki) {\n return true;\n}", "title": "" }, { "docid": "728e5e1663cc90e00853cc2fcd4be540", "score": "0.5524418", "text": "public function edit(AddCourse $addCourse)\n {\n //\n }", "title": "" }, { "docid": "ce6a9e285569c617c429799395d97702", "score": "0.5515084", "text": "public function addCourse($newCourse)\r\n {\r\n $sql = \"INSERT INTO \" . Dao::TABLE_COURSES .\r\n \" (coursecode, name, credit, semester, year)\" .\r\n \" VALUES (?, ?, ?, ?, ?)\";\r\n $values = array($newCourse['coursecode'], $newCourse['name'], \r\n $newCourse['credit'], $newCourse['semester'], $newCourse['year']);\r\n return $this->insert($sql, $values);\r\n }", "title": "" }, { "docid": "993d48beb0c4b1983e3ee0b9d2ebffe8", "score": "0.5514507", "text": "public static function update_courseset_completion_status($coursesetid, $userid, $status){\n global $DB;\n $firecompletionevent = false;\n $completionrecord = $DB->get_record('certif_courseset_completions', ['coursesetid' => $coursesetid, 'userid' => $userid]);\n if(!$completionrecord){\n $completionrecord = new \\stdClass();\n $completionrecord->certifid = 0;//todo\n $completionrecord->userid = $userid;\n $completionrecord->coursesetid = $coursesetid;\n $completionrecord->status = $status;\n $completionrecord->timecompleted = $status == self::COMPLETION_STATUS_COMPLETED ? time() : null;\n $completionrecord->id = $DB->insert_record('certif_courseset_completions', $completionrecord, true);\n $firecompletionevent = true;\n }else{\n if($status == self::COMPLETION_STATUS_COMPLETED && $completionrecord->status != self::COMPLETION_STATUS_COMPLETED){\n $completionrecord->timecompleted = time();\n $firecompletionevent = true;\n }\n $completionrecord->status = $status;\n $DB->update_record('certif_courseset_completions', $completionrecord);\n }\n /**\n * Trigger certification_courseset_completed event if status is changed to completed\n */\n if($firecompletionevent){\n $context = \\context_system::instance();\n $params = [\n 'context' => $context,\n 'objectid' => $completionrecord->id,\n 'other' => [\n 'userid' => $userid,\n 'coursesetid' => $coursesetid\n ]\n ];\n $event = event\\certification_courseset_completed::create($params);\n $event->trigger();\n }\n }", "title": "" }, { "docid": "4325e13b9eeb38b3a40ceb87190f7ef0", "score": "0.5498217", "text": "public function complete_task($id, $user)\n\t{\n\t\t// get date and time\n\t\t$timedate = date ('Y\\-m\\-d G\\-i\\-s');\n\n\t\t// update task table, change status to \"1\" (completed)\n\t\t$data = array('status' => 1);\n\t\t$this->db->where('id', $id);\n\t\t$this->db->update('tasks', $data);\n\n\t\t// insert \"completed\" info into table\n\t\t$data = array(\n\t\t\t'task_id' => $id,\n\t\t\t'user_id' => $user,\n\t\t\t'date' => $timedate\n\t\t);\n\n\t\t$this->db->insert('completed_tasks', $data);\n\t}", "title": "" }, { "docid": "7f16858a795fbbae381b61a02859af5b", "score": "0.54973584", "text": "public function addCourse(\\ClassCentral\\SiteBundle\\Entity\\User $user, Course $course, $listId)\n {\n $em = $this->container->get('doctrine')->getManager();\n // Check if the list id is valid\n if(!array_key_exists($listId,UserCourse::$lists))\n {\n throw new \\Exception(\"List id $listId is not valid\");\n }\n\n // Remove the course if it exists\n $this->removeCourse($user, $course, $listId);\n\n //Save it if it does not exist\n $uc = new UserCourse();\n $uc->setCourse($course);\n $uc->setUser($user);\n $uc->setListId($listId);\n\n // Add course to user\n $user->addUserCourse($uc);\n $em->persist($uc);\n $em->flush();\n\n return $uc;\n }", "title": "" }, { "docid": "c0f51b91f03b27da94b19b61225779c2", "score": "0.5493857", "text": "public function can_show_finish_course_btn( $course ): array {\n\t\t$return = array(\n\t\t\t'status' => 'fail',\n\t\t\t'message' => '',\n\t\t);\n\n\t\ttry {\n\t\t\tif ( ! $course ) {\n\t\t\t\tthrow new Exception( esc_html__( 'Error: No Course or User available.', 'learnpress' ) );\n\t\t\t}\n\n\t\t\t$course_id = $course->get_id();\n\n\t\t\t/**\n\t\t\t * Re-calculate result course of user\n\t\t\t */\n\t\t\t$course_data = $this->get_course_data( $course_id );\n\t\t\t$course_results = $course_data->calculate_course_results();\n\t\t\t// End\n\n\t\t\t// Get result to check\n\t\t\t$is_all_completed = $this->is_completed_all_items( $course_id );\n\n\t\t\tif ( ! $this->is_course_in_progress( $course_id ) ) {\n\t\t\t\tthrow new Exception( esc_html__( 'Error: Course is not in-progress.', 'learnpress' ) );\n\t\t\t}\n\n\t\t\t$has_finish = get_post_meta( $course_id, '_lp_has_finish', true ) ? get_post_meta( $course_id, '_lp_has_finish', true ) : 'yes';\n\t\t\t$is_passed = $this->has_reached_passing_condition( $course_id );\n\n\t\t\tif ( ! $is_passed && $has_finish === 'no' ) {\n\t\t\t\tthrow new Exception( esc_html__( 'Error: Course is not has finish.', 'learnpress' ) );\n\t\t\t}\n\n\t\t\tif ( ! $is_all_completed && $has_finish === 'yes' && ! $is_passed ) {\n\t\t\t\tthrow new Exception( esc_html__( 'Error: Cannot finish course.', 'learnpress' ) );\n\t\t\t}\n\n\t\t\tif ( ! apply_filters( 'lp_can_finish_course', true ) ) {\n\t\t\t\tthrow new Exception( esc_html__( 'Error: Filter disable finish course.', 'learnpress' ) );\n\t\t\t}\n\n\t\t\t$return['status'] = 'success';\n\t\t} catch ( Exception $e ) {\n\t\t\t$return['message'] = $e->getMessage();\n\t\t}\n\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "f33aae49e8ca19744384652c35bab63a", "score": "0.5468487", "text": "private function addcourse($view)\n {\n if($_SERVER['REQUEST_METHOD'] === 'POST'){\n $courseName = filter_var($_POST['title'], FILTER_SANITIZE_STRING);\n $coursePrice= filter_var($_POST['price'], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION);\n $description= filter_var($_POST['description'], FILTER_SANITIZE_STRING);\n $categoryId = filter_var($_POST['category'], FILTER_SANITIZE_NUMBER_INT);\n $imgsTypes = array('jpg', 'jpeg', 'png');\n $imgType = explode('/',$_FILES['cover']['type'][0]);\n $extnsn = end($imgType);\n if(in_array($extnsn, $imgsTypes)){\n $imgName = time(). rand(1,10000).$_FILES['cover']['name'][0];\n if(move_uploaded_file($_FILES['cover']['tmp_name'][0], '../uploads/'.$imgName)){\n // echo $categoryId;\n if($this->courseModel->addCourse(Factory::generateCourseDataArray($courseName, $description, $coursePrice,'uploads/'.$imgName, $categoryId, $_SESSION['user']['user_id']))){\n Redirect::redirect('courses.php');\n }else\n $this->setError($this->courseModel->getError());\n }\n }else{\n $this->setError('Image must be of type jpg, jpeg or png');\n }\n }\n $cats = $this->catsModel->getCategories();\n $this->render($view, $cats);\n }", "title": "" }, { "docid": "a892a675525115e0ecd97a7700bcb639", "score": "0.5467554", "text": "function bigbluebuttonbn_user_complete($course, $user, $mod, $bigbluebuttonbn) {\n return true;\n}", "title": "" }, { "docid": "a892a675525115e0ecd97a7700bcb639", "score": "0.5467554", "text": "function bigbluebuttonbn_user_complete($course, $user, $mod, $bigbluebuttonbn) {\n return true;\n}", "title": "" }, { "docid": "96d4a8e123c9b68e6055bdea21aa21ea", "score": "0.5455654", "text": "public function setCompleted($completed);", "title": "" }, { "docid": "37d08adde150d19266dd1b5c0531bbd3", "score": "0.5451099", "text": "function update_course($course);", "title": "" }, { "docid": "ed3330ae9cd6f32473baae354ed7d363", "score": "0.54324967", "text": "public function test_assign_user_complete() {\n global $PAGE, $DB;\n\n $this->resetAfterTest();\n $course = $this->getDataGenerator()->create_course();\n $teacher = $this->getDataGenerator()->create_and_enrol($course, 'teacher');\n $student = $this->getDataGenerator()->create_and_enrol($course, 'student');\n $assign = $this->create_instance($course, ['submissiondrafts' => 1]);\n $this->add_submission($student, $assign);\n\n $PAGE->set_url(new moodle_url('/mod/assign/view.php', array('id' => $assign->get_course_module()->id)));\n\n $submission = $assign->get_user_submission($student->id, true);\n $submission->status = ASSIGN_SUBMISSION_STATUS_DRAFT;\n $DB->update_record('assign_submission', $submission);\n\n $this->expectOutputRegex('/Draft/');\n assign_user_complete($course, $student, $assign->get_course_module(), $assign->get_instance());\n }", "title": "" }, { "docid": "83ca14c93b4fd99d2332b08503942daa", "score": "0.5431502", "text": "public function removeCourse() {\r\n\t\t\r\n\t\t$studentModel = new StudentModel();\r\n\t\t$view = new StudentView();\r\n\t\t$Adminview = new AdminView();\r\n\t\t$result = $studentModel->removeCourse($_SESSION['studentId'],$_POST['courseOfferingID']);\r\n\t\t\r\n\t\tif ($result == true) {\r\n\t\t\t$Adminview->set('error','Course Successfully Dropped');\r\n \t\t\t$_SESSION['siteMessage'] = $Adminview->sUseTemplate('/components/main/views/success.tpl.php');\r\n\t\t} else {\r\n\t\t\t$Adminview->set('error','Unable to drop course. Please contact an administrator');\r\n \t\t\t$_SESSION['siteMessage'] = $Adminview->sUseTemplate('/components/main/views/error.tpl.php');\r\n\t\t}\r\n\t\t\r\n\t\tglobal $_CORE;\r\n\t\t$_CORE->redirect();\r\n\t}", "title": "" }, { "docid": "9d9f5f69f9519b76adefb49c3074bcb1", "score": "0.54313016", "text": "public function create()\n {\n return view('server.course.add');\n }", "title": "" }, { "docid": "525e5d9a490be7e28cc08072afd3b210", "score": "0.5425912", "text": "public function StoreCourse(Request $request){\n \t$data = array([\n \t\t'course_name' => $request->course_name,\n \t\t'course_fee' => $request->course_fee,\n \t\t'course_duration' => $request->course_duration,\n \t\t'course_details' => $request->course_details,\n \t]);\n \t$add = DB::table('coursedetails')\n \t\t\t\t->insert($data);\n \tif ($add){\n \t\t$notification=array(\n 'messege'=>'Successfully Course Added ',\n 'alert-type'=>'success'\n );\n return Redirect()->back()->with($notification);\n \t}\n \telse{\n \t\t$notification=array(\n 'messege'=>'Course Added Failed',\n 'alert-type'=>'danger'\n );\n return Redirect()->back()->with($notification);\n \t}\n }", "title": "" }, { "docid": "6aecdb29308cdb05b065129b3cc9efa4", "score": "0.5421746", "text": "public function attachCourse(UserRequest $request)\n\t{\n\t\t$user = User::findOrFail($request->user_id);\n\t\t$department_faculty = DepartmentFaculty::where([\n\t\t\t['department_id', $request->department_id],\n\t\t\t['faculty_id', $request->user()->type === UserType::getTypeString(UserType::ADMIN) ? $request->faculty_id : $request->user()->profileable->faculty->id]\n\t\t])->firstOrFail();\n\t\t$course_department_faculty = CourseDepartmentFaculty::where([\n\t\t\t['course_id', $request->course_id],\n\t\t\t['department_faculty_id', $department_faculty->id]\n\t\t])->firstOrFail();\n\n\t\tif ($request->user()->can('attachCourse', [User::class, $user, $course_department_faculty]))\n\t\t{\n\t\t\t$this->repo->attachCourse($user, $course_department_faculty);\n\n\t\t\treturn response([], 201);\n\t\t}\n\n\t\treturn response([], 403);\n\t}", "title": "" }, { "docid": "1606b90c89fc82a4fa057f8114c768c0", "score": "0.54183125", "text": "public function add() \n\t\t{\n\t\t\trequire 'views/layout.php';\n\t\t\trequire 'views/course/newCourse.php';\n\t\t\t\n\t\t}", "title": "" }, { "docid": "a6b93c5c5ffb652d8f6f539da32eb7b0", "score": "0.5409448", "text": "public static function get_completed_courses($userid){\n global $DB;\n\n $query = \"\n SELECT\n cc.course\n FROM {course_completions} cc\n WHERE cc.userid = :userid\n AND cc.timecompleted > 0\n \";\n $params = [];\n $params['userid'] = $userid;\n\n $completedcourses = $DB->get_records_sql_menu($query, $params);\n return $completedcourses;\n }", "title": "" }, { "docid": "60a65177cac1d0ab05a37bdecdc6584b", "score": "0.5390352", "text": "public function create()\n {\n return view('add_course');\n }", "title": "" }, { "docid": "783177048dbd56768076249c66c94def", "score": "0.53897935", "text": "function handleAddCourseUnit($conn)\n\t{\n\t\tif (isset($_POST['btn_course'])) {\n\t\t\t$depart = $_POST['depart'];\n\t\t\t$courseName = $_POST['crs_unit'];\n\t\t\t$courseCode = $_POST['crs_code'];\n\t\t\t$semester = $_POST['semester'];\n\t\t\t$year = $_POST['year'];\n\t\t\t$status = $_POST['status'];\n\t\t\t$selectedTable; $fac;\n\n\t\t\t// Check if a course unit has been selected or not\n\t\t\tif ($depart == \"--select--\" || $semester ==\"--select--\" || $year == \"--select--\") {\n\t\t\t\techo \"<div class='alert alert-danger alert-dismissable'> <button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times; </button> \n\t\t\t\t\t\tNo faculty, semester or year selected! </div>\";\n\t\t\t}else{\n\t\t\t\t$sql = \"SELECT * FROM departments WHERE `departName`= '$depart'\";\n\t\t\t\t$result = $conn -> query($sql);\n\t\t\t\tif(mysqli_num_rows($result) > 0){\n\t\t\t\t\twhile ($data = $result -> fetch_assoc()) {\n\t\t\t\t\t\t$selectedTable = $data['depart_table'];\n\t\t\t\t\t\t$fac = $data['facID'];\n\t\t\t\t\t}\n\n\t\t\t\t\t// Check if the particular course unit is available\n\t\t\t\t\t$sql = \"SELECT * FROM $selectedTable WHERE `courseUnit`= '$courseName' OR `course_code` = '$courseCode'\";\n\t\t\t\t\t$result = $conn -> query($sql);\n\n\t\t\t\t\t// if found match\n\t\t\t\t\tif(mysqli_num_rows($result) > 0){\n\t\t\t\t\t\techo \"<div class='alert alert-danger alert-dismissable'> <button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times; </button> \n\t\t\t\t\t\t\t\tCourse Unit already exists </div>\";\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t$query = \"INSERT INTO `$selectedTable`(`courseUnit`, `course_code`, `bit_fac`, `bit_sem`, `bit_year`) VALUES ('$courseName','$courseCode','$fac','$semester','$year')\";\n\n\t\t\t\t\t\t$response = $conn -> query($query);\n\t\t\t\t\t\tif ($response) {\n\t\t\t\t\t\t\techo \"<div class='alert alert-success alert-dismissable'> <button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times; </button> \n\t\t\t\t\t\t\t\tCourse Unit successfully added ! </div>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "9bdee8dde1a3676e265df49ab4cd2a2a", "score": "0.5383934", "text": "protected function CreateCourse()\n\t{\n\t\tglobal $APPLICATION;\n\n\t\tif (strlen($this->LAST_ERROR)>0)\n\t\t\treturn false;\n\n\t\tif (!$title = $this->objXML->SelectNodes(\"/manifest/organizations/organization/item/title\"))\n\t\t{\n\t\t\t$this->LAST_ERROR = GetMessage(\"LEARNING_BAD_NAME\");\n\t\t\treturn false;\n\t\t}\n\n\t\t$arFields = Array(\n\t\t\t\"NAME\" => $title->content,\n\t\t\t\"SITE_ID\" => $this->arSITE_ID,\n\t\t);\n\n\t\t$course = new CCourse;\n\t\t$this->COURSE_ID = $course->Add($arFields);\n\t\t$res = ($this->COURSE_ID);\n\n\t\tif(!$res)\n\t\t{\n\t\t\tif($e = $APPLICATION->GetException())\n\t\t\t\t$this->LAST_ERROR = $e->GetString();\n\t\t\treturn false;\n\t\t}\n\n\t\t$r = new CDataXML();\n\t\tif (!$r->Load($this->package_dir.\"/res1.xml\"))\n\t\t\treturn false;\n\n\t\tif (!$data = $r->SelectNodes(\"/coursetoc/\"))\n\t\t\treturn false;\n\n\t\t$ar = $data->__toArray();\n\t\t$arFields = $this->_MakeFields($ar);\n\n\t\t$res = $course->Update($this->COURSE_ID, $arFields);\n\n\t\tif(!$res)\n\t\t{\n\t\t\tif($e = $APPLICATION->GetException())\n\t\t\t\t$this->LAST_ERROR = $e->GetString();\n\t\t\treturn false;\n\t\t}\n\n\t\tCheckDirPath($_SERVER[\"DOCUMENT_ROOT\"].\"/\".(COption::GetOptionString(\"main\", \"upload_dir\", \"upload\")).\"/learning/\".$this->COURSE_ID);\n\t\tCLearnHelper::CopyDirFiles(\n\t\t\t$this->package_dir.\"/resources/res1\", \n\t\t\t$_SERVER[\"DOCUMENT_ROOT\"] . \"/\" . (COption::GetOptionString(\"main\", \"upload_dir\", \"upload\")) . \"/learning/\" . $this->COURSE_ID . \"/res1\",\n\t\t\ttrue);\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "430701968c75e6bc92d41b58568a6da8", "score": "0.53774023", "text": "public function add_challenge($id, $user_id, $challenger_id, $challengee_id, $complete_challenge_flag);", "title": "" }, { "docid": "2c0f052105a0ca34d6a72308e2dc4ad1", "score": "0.53714186", "text": "public function create()\n {\n return view('admin.addcourse');\n }", "title": "" }, { "docid": "c9f0a4f7d11222564a69d7bc2cc40467", "score": "0.53574014", "text": "public function getAllCourseComplete($userid='') {\n $connMgr = new ConnectionManager();\n $conn = $connMgr->getConnection();\n\n\n $sql = 'SELECT * FROM course_completed where userid =:userid ';\n $stmt=$conn->prepare($sql);\n $stmt->bindParam(':userid',$userid,PDO::PARAM_STR);\n\n\n $status=$stmt->execute();\n\n $course1=[];\n while($row=$stmt->fetch()){\n $course1[]=new CourseCompleted($row['userid'],$row['code']);\n }\n \n $stmt = null;\n $conn = null;\n \n return $course1;\n\n }", "title": "" }, { "docid": "1773b02d76483a06770e7d43ffd413e5", "score": "0.5356873", "text": "function course_registered()\n{\n\tlist($dbc,$error) = connect_to_database();\n\t$success = false;\n\t$user=$_SESSION['user'];\n\t$username=$user[\"Username\"];\n\t\n\t$course_ID=empty($_POST[\"course_ID\"])?\" \":$_POST[\"course_ID\"];\n\t\n\t$courses = (array) null;\n\tif ($dbc)\n\t{\n\t \n\t\t$query = \"INSERT into course_registered (Course_ID,Username) values('$course_ID','$username')\";\n\t\t$result= mysqli_query($dbc,$query);\n\t\tif (!$result) {\n die('You have already registered for this course ' . mysql_error());\n }\n\t\telse\n\t\techo \"the course has been registered\";\n\t}\n\t\n}", "title": "" }, { "docid": "005171f5bcc6f8fafd6e3025466c9600", "score": "0.53498626", "text": "public static function add($db, $name, $project, $deadline, $youtube, $description, $max_xp) {\n $course_id = $db->insert(\"courses\", array(\n\t\t\t\"project_id\" => $project->getID(), \n\t\t\t\"name\" => $name,\n\t\t\t\"description\" => $description,\n\t\t\t\"max_xp\" => $max_xp,\n\t\t\t\"deadline\" => $deadline,\n\t\t\t\"youtube\" => $youtube\n\t\t), true);\n return $course_id;\n }", "title": "" }, { "docid": "b987a6187e9b153c79fdbeea7cef76f0", "score": "0.53454816", "text": "function add_or_edit_my_goals($user_id, $goal_id, $progress){\n\t\t$database = new Database;\n\t\t\n\t\t$insert_user_goals_query = \"INSERT INTO `user_goals` (`user_id`, `goal_id`, `progress`, `date_added`) VALUES (?, ?, ?, CURDATE())\";\n\t\t$params = array($user_id, $goal_id, $progress);\n\t\t$table = \"`user_goals'\";\n\t\t$message = $database->db_insert($insert_user_goals_query, $params, $table);\n\t\tif (strpos($message, 'Added') == false){\n\t\t\t$update_goal_query = \"UPDATE `user_goals` SET `progress` = ? WHERE `user_id` = ? AND `goal_id` = ?\";\n\t\t\t$params = array($progress, $user_id, $goal_id);\n\t\t\t$message = $database->db_insert($update_goal_query, $params, $table);\n\t\t}\n\t\treturn $message;\n\n\t}", "title": "" }, { "docid": "d0d775b4d6a0dc98684ffa2a2fab2b16", "score": "0.5332777", "text": "function course_completion_stats($start=null,$end=null,$categoryid=null,$department=null,$role=null,$city=null)\n{\n\tglobal $DB;\n\t$courses=$DB->get_records('course', array('category'=>$categoryid));\n\t$categoryname=$DB->get_field('course_categories', 'name', array('id'=>$categoryid));\n\t$completed=0;\n\t$inprogress=0;\n\t$notstarted=0;\n\tforeach ($courses as $course) {\n\t\t$courseid=$course->id;\n//manjunath: getting total count of users.\n\t\t$sql='';\n\t\tif(!empty($start)&& !empty($end)){\n\t\t\t$sql.=\" AND c.timeenrolled between $start AND $end\";\n\t\t}\n\t\tif(!empty($department)){\n\t\t\t$sql.=\" AND u.department LIKE '%$department%' \";\n\t\t}\n\t\tif(!empty($role)){\n\t\t\t$sql.=\" AND ra.roleid LIKE '%$role%'\";\n\t\t}\n\t\tif(!empty($city)){\n\t\t\t$sql .=\" AND u.city LIKE '%$city%'\";\n\t\t}\n\n\t\t$totalquery = \"SELECT *\n\t\tFROM {course_completions} c\n\t\tINNER JOIN {user} u ON u.id = c.userid\n\t\tINNER JOIN {role_assignments} ra ON u.id = ra.userid\n\t\tWHERE (c.course = '$courseid')\n\t\t$sql\";\n\t\t$records = count($DB->get_records_sql($totalquery));\n\t\t$totalcount = $records;\n//manjunath: coures completed users count.\n\t\t$completedquery=\"SELECT DISTINCT(mcc.userid) FROM {course_completions} mcc \n\t\tJOIN {course} mc ON mc.id = mcc.course\n\t\tJOIN {user} mu ON mcc.userid=mu.id\n\t\tRIGHT JOIN {role_assignments} mrc ON mrc.userid = mcc.userid\n\t\tWHERE mcc.course= \".$courseid.\" AND mcc.timecompleted is not null\n\t\t$sql\n\t\t\";\n\n\t\t$completedrecords = count($DB->get_records_sql($completedquery));\n\t\t$completedcount = $completedrecords;\n\n//manjunath: course in progress users count.\n\t\t$progressquery=\"SELECT DISTINCT(mcc.userid) FROM {course_completions} mcc \n\t\tJOIN {course} mc ON mc.id = mcc.course\n\t\tJOIN {user} mu ON mcc.userid=mu.id\n\t\tRIGHT JOIN {role_assignments} mrc ON mrc.userid = mcc.userid\n\t\tWHERE mcc.course= \".$courseid.\" AND (mcc.timestarted != 0)\n\t\tAND (mcc.timecompleted is null)\n\t\t$sql\n\t\t\";\n\n\t\t$progessrecords = count($DB->get_records_sql($progressquery));\n\t\t$progresscount = $progessrecords;\n\n//manjunath: course not started users count\n\t\t$notstartedquery = \"SELECT DISTINCT(mcc.userid) FROM {course_completions} mcc \n\t\tJOIN {course} mc ON mc.id = mcc.course\n\t\tJOIN {user} mu ON mcc.userid=mu.id\n\t\tRIGHT JOIN {role_assignments} mrc ON mrc.userid = mcc.userid\n\t\tWHERE mcc.course= \".$courseid.\" AND (mcc.timestarted = 0)\n\t\tAND (mcc.timecompleted is null)\n\t\t$sql\n\t\t\";\n\n\t\t$notstartedrecords = count($DB->get_records_sql($notstartedquery));\n\t\t$notstartedcount = $notstartedrecords;\n\n\t\t$completed = $completed + $completedcount;\n\t\t$inprogress= $inprogress + $progresscount;\n\t\t$notstarted=$notstarted + $notstartedcount;\n\n\t}\n\treturn array($completed,$inprogress,$notstarted,$categoryname);\n\n}", "title": "" }, { "docid": "5edbd9feb8747d0268591a405a5060a9", "score": "0.53306323", "text": "public function enroll(Request $request, $id)\n {\n\t\t$user = Auth::user();\n\n \t$course = Course::where('id', $id)\n \t\t->firstOrFail();\n\n if (Auth::check() && $course->students()->where('user_id', \\Auth::id())->count() != 0)\n {\n return response()\n ->json([\n 'saved' => false,\n 'message' => 'You are already enrolled on this course.'\n ], 401);\n } else {\n $courseStudent = new CourseStudent();\n\n $courseStudent->user_id = $user->id;\n $courseStudent->course_id = $course->id;\n\n // Calculate total hours\n $hrs = 0;\n $mins = 0;\n $secs = 0;\n \n foreach ($course->lessons as $time) {\n if ($time->duration != null) {\n list ($hours, $minutes, $seconds) = explode(':', $time->duration);\n\n $hrs += (int) $hours;\n $mins += (int) $minutes;\n $secs += (int) $seconds;\n\n // Convert each 60 minutes to an hour\n if ($mins >= 60) {\n $hrs++;\n $mins -= 60;\n }\n\n // Convert each 60 seconds to a minute\n if ($secs >= 60) {\n $mins++;\n $secs -= 60;\n }\n }\n }\n $totalDuration = sprintf('%d:%d:%d', $hrs, $mins, $secs);\n $courseStudent->total_time = $totalDuration;\n $courseStudent->save();\n }\n\n\t\tforeach ($course->lessons as $lesson) {\n\t\t\t$userProgress = new CourseUserProgress();\n\n\t\t\t$userProgress->course_id = $course->id;\n\t\t\t$userProgress->user_id = $user->id;\n $userProgress->section_id = $lesson->course_section_id;\n\t\t\t$userProgress->lesson_id = $lesson->id;\n\t\t\t$userProgress->status = 0;\n\n $userProgress->save();\n \n $courseStudent->remaining_lessons += 1;\n $courseStudent->save();\n\t\t}\n\n $firstLesson = $course->firstLesson()->first();\n\n $appUrl = config('app.client_url', config('app.url'));\n \n\t\t$details = [\n\t\t\t'subject' => \"Hello $user->name! Welcome to $course->title\",\n 'greeting' => 'Enrollment Confirmation',\n 'body' => array(\n 'course_id' => $course->id,\n 'course_slug' => $course->slug,\n 'content' => \"Thanks for enrolling in the course, \" . '\"' . $course->title . '\"!',\n ),\n 'actionText' => 'Start Learning',\n 'actionURL' => url(\"$appUrl\" . \"/student/account/my-courses/learning/\" . $firstLesson->id . '/lesson/' . $course->slug . \"/show/overview\"),\n ];\n\n\t\tNotification::send($user, new CourseSubscriptionNotification($details));\n\n \treturn response()\n \t\t->json([\n \t\t\t'enrolled' => true,\n\t\t\t\t'message' => \"Great pick! You are now enrolled to $course->title.\",\n\t\t\t\t'lesson_id' => $firstLesson->id\n \t\t]);\n }", "title": "" }, { "docid": "3fbb015d9ef36c7c75b2e6dee835b114", "score": "0.5311021", "text": "private function completed()\n {\n $this->form->message($this->word('completed'));\n $this->form->hide(true);\n }", "title": "" }, { "docid": "fba6598bfa6534c08dd56efdfd3fa683", "score": "0.5306539", "text": "protected function save() {\n \t$exemptionObj=$this->factory->createContainer(\"course_exemption\");\n\t\t$exemptionObj->load($this->post);\n\t\t$exemptionObj->getField(\"registration\")->setFromDB($this->student_registration[\"id\"]);\n\t\t$exemptionObj->save($this->user);\n\t\t$exemptionObj->cleanup();\n if ($saved !== false) {\n $message = \"Course(s) Exempted Successfully.\";\n } else {\n $message = \"Failed To Exempt Course(s) This Student.\"; \n }\n $this->userMessage($message);\n $this->setRedirect( \"view?id=\" . $this->getPrimary()->getParent() );\n return $saved;\n }", "title": "" }, { "docid": "355a540aa1f7c5ea452d336fa5124b23", "score": "0.52973247", "text": "public function inscribe(Course $course)\n {\n\n $course->students()->attach(auth()->user()->student->id);\n\n Mail::to($course->teacher->user)->send(new NewStudentInCourse($course, auth()->user()->name));\n\n return back()->with('message', ['success', __(\"Inscripto correctamente al curso\")]);\n }", "title": "" }, { "docid": "e37423ab03026274912ebc608d0c6561", "score": "0.52844226", "text": "public static function SendClassAddEmail($user, $professor, $courseobj){\n\t\treturn QuickEvalEmail::SendEmail($user->email, \n\t\t\t\"You have been added to a course\",\n\t\t\tQuickEvalEmail::EmailP(\"You have been added to a course\", \n\t\t\t\tnew Partial(\"email/courseadd\", \n\t\t\t\t\tarray(\n\t\t\t\t\t\t\"inviteduser\"=> $user, \n\t\t\t\t\t\t\"invitinguser\" => $professor,\n\t\t\t\t\t\t\"course\" => $courseobj\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t}", "title": "" }, { "docid": "f12287ffd09912741df44fd8140969af", "score": "0.52770203", "text": "public function complete(Request $request) {\n $pendingAgreement=$request->get('pendingAgreement');\n $id=Auth::id();\n DB::table('userAgreements')\n ->where('userId',$id)\n ->update(['agreements' => $pendingAgreement?$pendingAgreement:'']);\n\n return response(200);\n\t}", "title": "" }, { "docid": "f38403d6b4960fd2be97a27e5ba3e37b", "score": "0.52694446", "text": "public function classAdd(){\n\t\t$course=$this->input->post('course_id');\n\t\t$start=$this->input->post('start');\n\t\t$end=$this->input->post('end');\n\t\t\n\t\t\n\n\t\t$this->load->model('mainModel');\n\t\t$this->mainModel->insertClass($course,$start,$end);\n\n\t\t$this->viewCourse();\n\t}", "title": "" }, { "docid": "25526cb095043c3d6b2cb5792e1b0f86", "score": "0.5266802", "text": "public function course($course)\n {\n /**\n * If user tries to access to course() directly without filtering through term,\n * then the default term will be current term.\n */\n if ($this->termId == NULL) {\n $this->termId = $this->currentTerm()->termId;\n }\n\n $courseData = $this->splitCourseData($course);\n $this->subject = $courseData['subject'];\n $this->course_number = $courseData['course_number'];\n\n if (!$this->checkCourseAvailability($this->termId, $this->subject, $this->course_number)) {\n dd('Course ' . $this->subject . ' ' . $this->course_number . ' not offer during ' . $this->termName);\n }\n\n $course = $this->subject . ' ' . $this->course_number;\n\n $builder = new Builder();\n $query = $builder->endpoint('Courses')\n ->expand('$expand=Classes($expand=Sections($expand=Meetings($expand=Instructors)))')\n ->filter(['course' => $course])->build();\n\n // Main line to get course information.\n $this->courses = $this->requestAsGet($query);\n\n $this->count_courses = count($this->courses);\n\n if ($this->countCourses() > 1) {\n $this->classes = $this->courseId = $this->title = $this->creditHours = $this->description = array();\n\n foreach($this->courses as $course) {\n array_push($this->courseId, $course['CourseId']);\n array_push($this->title, $course['Title']);\n array_push($this->creditHours, $course['CreditHours']);\n array_push($this->description, $course['Description']);\n array_push($this->classes, $this->pullClassData($this->termId, $course['Classes']));\n }\n } else {\n $this->courseId = $this->courses[0]['CourseId'];\n $this->title = $this->courses[0]['Title'];\n $this->creditHours = $this->courses[0]['CreditHours'];\n $this->description = $this->courses[0]['Description'];\n $this->classes = $this->pullClassData($this->termId, $this->courses[0]['Classes']);\n }\n\n return $this;\n }", "title": "" }, { "docid": "004a46c957ccf7394f57e83d1bad5eea", "score": "0.52615875", "text": "public static function add_competency_to_course_returns() {\n return new external_value(PARAM_BOOL, 'True if successful.');\n }", "title": "" }, { "docid": "64efaaced1b0de04738d45c33c4dde73", "score": "0.5261104", "text": "public function create()\n {\n $courses = Course::all();\n return view('task/add_lecture')->with('courses',$courses);\n }", "title": "" }, { "docid": "4366e344a7302390eb65331b064e8edb", "score": "0.52590334", "text": "public static function get_user_progress($certification, $userid){\n global $DB, $CFG;\n require_once($CFG->dirroot.'/completion/criteria/completion_criteria.php');\n require_once($CFG->dirroot.'/lib/completionlib.php');\n\n\n if(!is_object($certification)){\n $certification = new certification($certification, false);\n }\n\n $query = \"\n SELECT\n c.id, \n c.courseid,\n c.coursesetid,\n COUNT(criteria.id) as criterianumber,\n COUNT(compl.id) as completedcriterianumber,\n ccam.method,\n cc.timecompleted\n FROM {certif_courseset_courses} c\n LEFT JOIN {course_completion_criteria} criteria ON criteria.course = c.courseid AND criteria.criteriatype = :criteriatype\n LEFT JOIN {course_completion_crit_compl} compl ON compl.criteriaid = criteria.id AND compl.userid = :userid AND compl.timecompleted > 0\n LEFT JOIN {course_completion_aggr_methd} ccam ON ccam.course = c.courseid AND ccam.criteriatype = criteria.criteriatype\n LEFT JOIN {course_completions} cc ON cc.course = c.courseid AND cc.userid = :ccuserid\n WHERE c.certifid = :certifid\n GROUP by c.courseid, ccam.method, cc.timecompleted, c.coursesetid, c.id\n \";\n\n $params = [];\n $params['criteriatype'] = COMPLETION_CRITERIA_TYPE_ACTIVITY;\n $params['userid'] = $userid;\n $params['certifid'] = $certification->id;\n $params['ccuserid'] = $userid;\n\n $progress = $DB->get_records_sql($query, $params);\n\n\n\n $coursesprogress = [];\n $coursesetscoursesprogress = [];\n\n foreach($progress as $courseprogress){\n $coursesprogress[$courseprogress->courseid] = 0;\n if($courseprogress->method == COMPLETION_AGGREGATION_ANY && $courseprogress->completedcriterianumber > 0){\n /**\n * Set progress to 100% if any acitivity is completed and completion aggreation method is \"ANY\"\n */\n $coursesprogress[$courseprogress->courseid] = 100;\n }elseif($courseprogress->method == COMPLETION_AGGREGATION_ALL){\n /**\n * Calculate progress: divide completed activities by number of all activities which need to be completed\n */\n $coursesprogress[$courseprogress->courseid] = round($courseprogress->completedcriterianumber / max(1, $courseprogress->criterianumber) * 100);\n }\n if($courseprogress->timecompleted > 0){\n /**\n * Set progress to 100% if course is marked as completed\n */\n $coursesprogress[$courseprogress->courseid] = 100;\n }\n\n /**\n * Gather all courses progress into coursesets\n */\n if(!isset($coursesetscoursesprogress[$courseprogress->coursesetid])){\n $coursesetscoursesprogress[$courseprogress->coursesetid] = [];\n }\n $coursesetscoursesprogress[$courseprogress->coursesetid][] = $coursesprogress[$courseprogress->courseid];\n }\n\n $completioninfo = self::get_completion_info($certification->id, $userid);\n\n $certificationprogress = self::calculate_progress_for_coursesets($certification->certificationcoursesets, $coursesetscoursesprogress);\n $recertificationprogress = self::calculate_progress_for_coursesets($certification->recertificationcoursesets, $coursesetscoursesprogress);\n\n /**\n * Check completion info\n */\n if(isset($completioninfo->status) && $completioninfo->status == self::COMPLETION_STATUS_COMPLETED){\n if($completioninfo->certifpath == certification::CERTIFICATIONPATH_BASIC){\n $certificationprogress = 100;\n }\n if($completioninfo->certifpath == certification::CERTIFICATIONPATH_RECERTIFICATION){\n $recertificationprogress = 100;\n }\n }\n\n return ['courses' => $coursesprogress, 'certification' => $certificationprogress, 'recertification' => $recertificationprogress];\n }", "title": "" }, { "docid": "bf290f68d3e3136004b1b652f1665cf6", "score": "0.5245896", "text": "public static function check_courseset_completion($courseset, $completedcourses){\n $completed = false;\n $completedcoursesnumber = 0;\n /**\n * Count completed courses in this courseset\n */\n foreach($courseset->courses as $course){\n if(array_key_exists($course->courseid, $completedcourses) ){\n $completedcoursesnumber++;\n }\n }\n if($courseset->completiontype == certification::COMPLETION_TYPE_ANY && $completedcoursesnumber > 0){\n /**\n * If courseset completion type is any and there is at least one completed course then mark courseset as completed\n */\n $completed = true;\n }elseif($courseset->completiontype == certification::COMPLETION_TYPE_ALL && $completedcoursesnumber == count($courseset->courses)){\n /**\n * If courseset completion type is all and all courses in this courseset are completed then mark courseset as completed\n */\n $completed = true;\n }elseif($courseset->completiontype == certification::COMPLETION_TYPE_SOME && $completedcoursesnumber >= $courseset->mincourses){\n /**\n * If courseset completion type is some check if number of completed courses are higher or equal than required\n */\n $completed = true;\n }\n return $completed;\n }", "title": "" }, { "docid": "0026cc0ab3697511d3520e2f11ede50c", "score": "0.52395356", "text": "public static function CheckCourse()\n {\n $fiveMinuteAfter = helper::get5MinuteAfter();\n $courses = CourseTime::with(\"course\")->get();\n if (count($courses) > 0) {\n foreach ($courses as $row) {\n if (date('Y-m-d H:i', strtotime($row->start_date)) == $fiveMinuteAfter && $row->status == config('globalVariable.pause')) {\n $token = courseTimeRepository::saveCourseHashCode($row->course_id);\n helper::sendSMS('teacher', $row->course->classes->name, $row->course->classes->school->name, route(\"changeCourseStatus\") . \"/\" . $token, $row->course->teacher->mobile);\n helper::smsLog($row->course_id, 'teacher', $token, $row->course->teacher_id);\n presentTeacherRepository::store($row->id);\n }\n }\n }\n }", "title": "" }, { "docid": "a14c0431af3e8484c0bece0b39bb7e7b", "score": "0.52351093", "text": "public function store(Request $request)\n {\n $request->validate([\n 'courseType' => 'required|string',\n 'branch_id' => 'required|numeric',\n 'year' => 'required|numeric',\n 'tution_fees' => 'required',\n 'development_fees' => 'required',\n ]);\n $conditions = ['branch_id' => $request->branch_id, 'courseType' => $request->courseType, 'year' => $request->year, ];\n $records = Course::where($conditions)->count();\n if($records > 0){\n return back()->with('error','Course already added');\n }\n\n $course = new Course();\n $course->courseType = $request->courseType;\n $course->branch_id = $request->branch_id;\n $course->year = $request->year;\n $course->tution_fees = $request->tution_fees;\n $course->development_fees = $request->development_fees;\n $course->total_fees = $request->tution_fees + $request->development_fees;\n $course->save();\n return redirect('/course/list-courses')->with('success','Course added success');\n }", "title": "" }, { "docid": "8df7cfcc02e2d4965a66a2793508790b", "score": "0.5233345", "text": "public function courseValue(){\n\t\t\t$this->load->model('mainModel');\n\t\t\t$getMycourse=$this->mainModel->get_course();\n\t\t\t// print_r($get_course);\n\t\t\t// exit();\n\t\t\t$this->load->view('addTeacher',['get_course'=>$getMycourse]);\n\t\t}", "title": "" }, { "docid": "a68abb4c0873afe4792ed3cc3ae3dba8", "score": "0.52292365", "text": "function get_course_from_category($stime=null,$etime=null,$categoryid=null,$department=null,$role=null,$city=null){\n\tglobal $DB,$CFG;\n\trequire_once($CFG->libdir.'/completionlib.php');\n\t$sql='';\n\t$sql.=\"SELECT DISTINCT({course}.id) FROM {course} \n\tLEFT JOIN {enrol} ON {course}.id = {enrol}.courseid\n\tLEFT JOIN {user_enrolments} ON {enrol}.id = {user_enrolments}.enrolid\n\tLEFT JOIN {user} ON {user_enrolments}.userid = {user}.id\n\tLEFT JOIN {role_assignments} ON {user}.id = {role_assignments}.userid\n\t\tWHERE {course}.visible = 1 AND {course}.id != 1\";\n\tif(!empty($stime) && !empty($stime)){\n\t\t$sql.=\" AND {course}.timecreated BETWEEN \".$stime.\" AND \".$etime.\" \";\n\t}\n\tif(!empty($categoryid)){\n\t\t$sql.=\" AND {course}.category = \".$categoryid.\"\";\n\t}\n\tif(!empty($department)){\n\t\t$sql.=\" AND {user}.department = \".$department.\"\";\n\t}\n\tif(!empty($role)){\n\t\t$sql.=\" AND {role_assignments}.roleid = \".$role.\"\";\n\t}\n\tif(!empty($city)){\n\t\t$sql.=\" AND {user}.city = \".$city.\"\";\n\t}\n\t$courses = $DB->get_records_sql($sql);\n\n\t//here i am getting all courses from this category.\n\t//here intializing counts of completion,enrolled,badges,certificates. \n\t$totalcomplition=0;\n\t$totalenrolled=0;\n\t$totalbadges=0;\n\t$totalcertificates=0;\n\tif(!empty($courses)){\n\n\t\tforeach ($courses as $course) {\n\t\t\t\n \t//here i am getting total user enroll into this course.\n\t\t\t$totalenrolled = $totalenrolled + count(all_enrolled_usersdata($course->id));\n \t//here i am geetting total badge count for this category.\n\t\t\t//$allusers=all_enrolled_usersdata($course->id);\n\t\t\t$enrolled = $DB->get_records_sql(\"\n\n\t\t\tSELECT c.id, u.id\n\n\t\t\tFROM {course} c\n\t\t\tJOIN {context} ct ON c.id = ct.instanceid\n\t\t\tJOIN {role_assignments} ra ON ra.contextid = ct.id\n\t\t\tJOIN {user} u ON u.id = ra.userid\n\t\t\tJOIN {role} r ON r.id = ra.roleid\n\n\t\t\twhere c.id = \".$course->id.\"\");\n\t\t\t\n \t//here i am getting single user using foreach loop.\n\t\t\tforeach ($enrolled as $user) {\n\n \t\t//here getting complition status.\n\t\t\t\t$cinfo = new completion_info($course);\n\n\t\t\t\t$iscomplete = $cinfo->is_course_complete($user->id);\n\t\t\t//here check course is complete or not. \n\t\t\t\tif(!empty($iscomplete)){\n\t\t\t\t\t$totalcomplition = $totalcomplition + 1;\n\t\t\t\t}\n\t\t\t \t//here i am getting all badge count related to this category.\n\t\t\t\t$sql='SELECT * FROM {badge_issued} JOIN {badge} ON {badge_issued}.badgeid={badge}.id WHERE {badge_issued}.userid='.$user->id.' AND {badge}.courseid='.$course->id.'';\n\t\t\t\t$badgecount = count($DB->get_records_sql($sql));\n\t\t\t\t$totalbadges = $totalbadges+$badgecount;\n\n\t \t// here i am getting all certificate count related to this category.\n\t\t\t\t$data='SELECT * FROM {simplecertificate} JOIN {simplecertificate_issues} ON {simplecertificate}.id={simplecertificate_issues}.certificateid WHERE {simplecertificate_issues}.userid='.$user->id.' AND {simplecertificate}.course='.$course->id.'';\n\t\t\t\t$certificatecount = count($DB->get_records_sql($data));\n\t\t\t\t$totalcertificates = $totalcertificates+$certificatecount;\n\n\t\t\t}\n\n\n\t\t}\n\t\t\n\t}\n\t$returnarray = array('enrolcount'=>$totalenrolled,'completioncount'=>$totalcomplition,'badgecount'=>$totalbadges,'certificatecount'=>$totalcertificates);\n\treturn $returnarray ;\n}", "title": "" }, { "docid": "d4ed4401bb33f3400aac941c312ae716", "score": "0.5219693", "text": "public function add()\n\t{\n\t\t# Librerias\n\t\t$this->load->helper('form');\n\t\t$this->load->model('ActivitiesModel', 'activity', TRUE);\n\t\t$this->load->model('CertificationsModel', 'certifications', TRUE);\n\t\t# Notificaciones\n\t\t$data['number_of_pending_notifications'] = $this->activity->number_of_pending_notifications($this->session->userdata['user']['id_user']);\n\t\t$data['notification_details']\t \t\t = $this->activity->notification_details($this->session->userdata['user']['id_user']);\n\t\t# Opciones items del menu principal del contenido\n\t\t$data['option_nav'] = array(\n\t\t\t'box_title' => 'Certificados',\n\t\t\t'box_span' \t=> 'Crear'\n\t\t);\n\t\t$data['option_nav_item'] = array(\n\t\t\t'certificados'\t=> array(\n\t\t\t\t'icon' \t\t=> 'fa fa-ellipsis-v',\n\t\t\t\t'url' \t\t=> 'certifications',\n\t\t\t\t'class' \t=> NULL\n\t\t\t), \n\t\t\t\t'crear' \t=> array(\n\t\t\t\t'icon' \t\t=> '',\n\t\t\t\t'url' \t\t=> '',\n\t\t\t\t'class' \t=> 'active'\n\t\t\t)\n\t\t);\n\t\t# Renderizando la vista | plantilla\n\t\t$this->load->view('template/header', $data);\n\t\t$this->load->view('certifications/add');\n\t\t$this->load->view('template/footer');\n\t}", "title": "" }, { "docid": "038cfcb0decb43627991cc2649e203b1", "score": "0.5208788", "text": "public function test_plan_completed() {\n $this->resetAfterTest(true);\n $this->setAdminUser();\n $dg = $this->getDataGenerator();\n $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');\n $user1 = $dg->create_user();\n $plan = $lpg->create_plan(array('userid' => $user1->id, 'status' => \\core_competency\\plan::STATUS_ACTIVE));\n $planid = $plan->get('id');\n $contextid = $plan->get_context()->id;\n // Trigger and capture the event.\n $sink = $this->redirectEvents();\n $result = api::complete_plan($plan->get('id'));\n $this->assertTrue($result);\n // Get our event event.\n $events = $sink->get_events();\n $event = reset($events);\n $this->assertInstanceOf('\\core\\event\\competency_plan_completed', $event);\n $this->assertEquals($planid, $event->objectid);\n $this->assertEquals($contextid, $event->contextid);\n $this->assertEquals($plan->get('userid'), $event->relateduserid);\n $this->assertEventContextNotUsed($event);\n $this->assertDebuggingNotCalled();\n }", "title": "" }, { "docid": "2d05f820ae4441ca4e314d32d0134ac1", "score": "0.5202068", "text": "public function show(AddCourse $addCourse)\n {\n \n \n }", "title": "" }, { "docid": "789971eb4de9c56f696c9d1e82719e30", "score": "0.5200972", "text": "public function create()\r\n {\r\n return view(\"courses.create\");\r\n }", "title": "" }, { "docid": "d235d325105403e114ae85818c197ce4", "score": "0.52003556", "text": "public function add()\n {\n $view_data = array();\n\n if (!valid_email($this->global_functions->get_user_email()))\n {\n // Not a valid e-mail!\n $this->load->view('profile_needs_update');\n return;\n }\n // Fetch the filesets available for this user to use\n $view_data['fileset_scan'] = $this->global_functions->get_user_allowed_repositories_details();\n $this->load->view('jobs_add', $view_data);\n }", "title": "" }, { "docid": "6a6930b9d0fc2b17e594435e2cf923a5", "score": "0.51985353", "text": "public function addCourse($name, $whatYouWillLearn = '', $whoShouldTake = '', $gearYouWillUse = '', $offeredBy = '') {\n $response = array('error' => true, 'message' => 'An error occured while adding Course. ');\n $stmt = $this->conn->prepare('INSERT INTO ' .\n self::TABLE_COURSE . '(' .\n self::COLUMN_NAME . ',' . self::COLUMN_OFFERED_BY . ',' .\n self::COLUMN_WHAT_YOU_WILL_LEARN . ',' .\n self::COLUMN_WHO_SHOULD_TAKE_THIS_COURSE . ',' .\n self::COLUMN_SCUBA_GEAR_YOU_WILL_USE .\n ') VALUES(?, ?, ?,?,?)');\n $stmt->bind_param('sssss', $name, $offeredBy, $whatYouWillLearn, $whoShouldTake, $gearYouWillUse);\n if ($stmt->execute()) {\n $response['error'] = false;\n $response['message'] = \"$name Successfully added\";\n } else if (strpos($stmt->error, 'Duplicate') !== false) {\n $response['message'] = \"Dive course $name already exist\";\n } else {\n $response['message'] = $response['message'] . $stmt->error;\n }\n $stmt->close();\n return $response;\n }", "title": "" }, { "docid": "5ae3e8754d4747d6ab7dbcd5b170ddd4", "score": "0.5192442", "text": "public function addDialogueCourse($dialogue_node_class_id,$dialogue_title,$course_instance_node_id,$user_instance_node_id,$receipient_user_node_id,$saveType,$chatMessage,$action,$stmntTimestamp,$courseInsId,$course_value,$StmtType)\n\t{\n\t\t//$dialogue_field \t\t\t\t\t\t= array('Title','Admin','Timestamp');\n\t\t$dialogue_field \t\t\t\t\t\t= array('Title', 'Admin', 'Timestamp', 'Updated Timestamp');\n\t\t$node_type_id\t\t\t\t\t\t\t= '2';\n\t\t$dialog_instance_id \t\t\t\t\t= $this->createNodeInstanceCourseDialouge($dialogue_node_class_id,$node_type_id,$saveType);\n\t\t$final_ary \t\t\t\t\t\t\t\t= array();\n\t\t// get dialog instance node id\n\t\t$dialog_instance_node_id \t\t\t\t= $this->getInstanceNodeIdCourseDialogue($dialogue_node_class_id,$dialog_instance_id);\n\t\tforeach($dialogue_field as $value)\n\t\t{\n\t\t\tif($value =='Title')\n\t\t\t{\n\t\t\t\tif($dialogue_title=='')\n\t\t\t\t{\n\t\t\t\t\t$dialogue_title = 'Untitled';\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$dialogue_title = $dialogue_title;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse if($value =='Admin')\n\t\t\t{\n\t\t\t\t$dialogue_title = $user_instance_node_id;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$dialogue_title = date('Y-m-d H:i:s');\n\t\t\t}\n\n\t\t\t$node_class_property_id \t\t\t\t\t\t= $this->getNodeClassPropertyIdCourseDialouge($dialogue_node_class_id,$value);\n\n\t\t\tif($dialog_instance_id)\n\t\t\t{\n\t\t\t\t$dialog_node_instance_property_id \t\t \t= $this->createNodeInstanceCourseDialougeProperty($dialog_instance_id,$node_class_property_id,$node_type_id,$dialogue_title);\n\t\t\t\tif($value =='Title')\n\t\t\t\t{\n\n\t\t\t\t\t$final_ary['dialog_instance_node_id'] \t\t\t= $dialog_instance_node_id;\n\t\t\t\t\t$final_ary['dialog_node_instance_property_id'] \t= $dialog_node_instance_property_id;\n\t\t\t\t\t$final_ary['course_node_id'] \t\t\t= $course_instance_node_id;\n\t\t\t\t\t$final_ary['course_instance_id'] \t\t\t\t= $courseInsId;\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\t//create xy relation between course and dialogue\n\t\t$xy_id = $this->createXYRelationCourseDialogue($course_instance_node_id,$dialog_instance_node_id);\n\n\t\t// create xy relation between user and dialogue\n\t\t$user_xy_id = $this->createXYRelationCourseDialogue($dialog_instance_node_id,$user_instance_node_id);\n\n\n\t\t//$course \t= $this->insertAllCourseInfoById($course_instance_node_id);\t // course_info //**arti //no use of this file\n\n\n\n\n\t\t/* Code here to add new actor for dialogue and course class awdhesh soni*/\n\t\tif(!empty($receipient_user_node_id))\n\t\t{\n\n\t\t\t$user_instance_string = rtrim($receipient_user_node_id, ',');\n\t\t\t$temp = explode(',',$user_instance_string);\n\t\t\t$admin_id \t\t\t\t\t\t= $this->fetchDialogOwnerId($dialog_instance_node_id);\n\t\t\t$user_node_class_id = INDIVIDUAL_CLASS_ID;\n\t\t\t$final_ary['receipient_user_node_id'] = $receipient_user_node_id;\n\t\t\t//get all the instance of user associated with an dialogue\n\t\t\t$sql \t\t\t\t\t=\tnew Sql($this->adapter);\n\t\t\t$select\t\t\t\t\t\t\t\t\t=\t$sql->select();\n\t\t\t$select->from(array('xy' => 'node-x-y-relation'));\n\t\t\t$select->columns(array('node_x_y_relation_id'));\n\t\t\t$select->join(array('ni' => 'node-instance'), 'xy.node_x_id = ni.node_id',array());\n\t\t\t$select->where->equalTo('ni.node_class_id',$user_node_class_id);\n\t\t\t$select->where->AND->equalTo('xy.node_y_id',$dialog_instance_node_id);\n\t\t\t$select->where->AND->notequalTo('xy.node_x_id',$admin_id);\n\t\t\t//echo $select->getSqlstring();\n\t\t\t$statement\t\t\t\t=\t$sql->prepareStatementForSqlObject($select);\n\t\t\t$result\t\t\t\t\t=\t$statement->execute();\n\t\t\t$resultObj\t\t\t\t=\tnew ResultSet();\n\t\t\t$accountInfo\t \t=\t$resultObj->initialize($result)->toArray();\n\n\t\t\tif(!empty($accountInfo))\n\t\t\t{\n\t\t\t\tforeach($accountInfo as $value)\n\t\t\t\t{\n\t\t\t\t\t//delete all the instance of user associated with the dialogue\n\t\t\t\t\t$node_x_y_relation_id = $value['node_x_y_relation_id'];\n\t\t\t\t\t$sql = new Sql($this->adapter);\n\t\t\t\t\t$delete = $sql->delete();\n\t\t\t\t\t$delete->from('node-x-y-relation');\n\t\t\t\t\t$delete->where->equalTo('node_x_y_relation_id',$node_x_y_relation_id);\n\t\t\t\t\t$statement = $sql->prepareStatementForSqlObject($delete);\n\t\t\t\t\t$result = $statement->execute();\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tforeach($temp as $key=> $value)\n\t\t\t{\n\t\t\t\t$res['node_y_id'] \t\t\t\t= $dialog_instance_node_id;\n\t\t\t\t$res['node_x_id'] \t\t\t\t= $temp[$key] ;\n\t\t\t\t//check the xy relation already exists or not between dialogue and user\n\t\t\t\t$sql \t\t\t\t\t=\tnew Sql($this->adapter);\n\t\t\t\t$select\t\t\t\t\t\t\t\t\t=\t$sql->select();\n\t\t\t\t$select->from(array('xy' => 'node-x-y-relation'));\n\t\t\t\t$select->where->equalTo('xy.node_y_id',$dialog_instance_node_id);\n\t\t\t\t$select->where->AND->equalTo('xy.node_x_id',$temp[$key]);\n\t\t\t\t$statement\t\t\t\t=\t$sql->prepareStatementForSqlObject($select);\n\t\t\t\t$result\t\t\t\t\t=\t$statement->execute();\n\t\t\t\t$resultObj\t\t\t\t=\tnew ResultSet();\n\t\t\t\t$exitsInfo\t \t\t=\t$resultObj->initialize($result)->toArray();\n\t\t\t\tif(empty($exitsInfo))\n\t\t\t\t{\n\t\t\t\t\t//insert all the actor into the database to associate with the dialogue\n\t\t\t\t\t$sql \t\t\t\t\t\t=\tnew Sql($this->adapter);\n\t\t\t\t\t$query \t\t\t\t\t\t=\t$sql->insert('node-x-y-relation');\n\t\t\t\t\t$query->values($res);\n\t\t\t\t\t//echo '<br>insert dialogue query:'.$query->getSqlstring();\n\t\t\t\t\t$statement \t\t\t\t\t=\t$sql->prepareStatementForSqlObject($query);\n\t\t\t\t\t$result \t\t\t\t\t=\t$statement->execute();\n\t\t\t\t\t$resultObj \t\t\t\t\t=\tnew ResultSet();\n\t\t\t\t\t$resultObj->initialize($result);\n\t\t\t\t}\n\n\t\t\t\t// check the relation between course and user\n\t\t\t\t$res['node_y_id'] \t\t\t\t= $course_instance_node_id;\n\t\t\t\t$res['node_x_id'] \t\t\t\t= $temp[$key] ;\n\t\t\t\t//check the xy relation already exists or not between dialogue and user\n\t\t\t\t$sql \t\t\t\t\t=\tnew Sql($this->adapter);\n\t\t\t\t$select\t\t\t\t\t\t\t\t\t=\t$sql->select();\n\t\t\t\t$select->from(array('xy' => 'node-x-y-relation'));\n\t\t\t\t$select->where->equalTo('xy.node_y_id',$course_instance_node_id);\n\t\t\t\t$select->where->AND->equalTo('xy.node_x_id',$temp[$key]);\n\t\t\t\t$statement\t\t\t\t=\t$sql->prepareStatementForSqlObject($select);\n\t\t\t\t$result\t\t\t\t\t=\t$statement->execute();\n\t\t\t\t$resultObj\t\t\t\t=\tnew ResultSet();\n\t\t\t\t$exitsInfo\t =\t$resultObj->initialize($result)->toArray();\n\t\t\t\tif(empty($exitsInfo))\n\t\t\t\t{\n\t\t\t\t\t//insert all the actor into the database to associate with the course\n\t\t\t\t\t$sql \t\t\t\t\t\t=\tnew Sql($this->adapter);\n\t\t\t\t\t$query \t\t\t\t\t\t=\t$sql->insert('node-x-y-relation');\n\t\t\t\t\t$query->values($res);\n\t\t\t\t\t//echo '<br>insert Course query:'.$query->getSqlstring();\n\t\t\t\t\t$statement \t\t\t\t\t=\t$sql->prepareStatementForSqlObject($query);\n\t\t\t\t\t$result \t\t\t\t\t=\t$statement->execute();\n\t\t\t\t\t$resultObj \t\t\t\t\t=\tnew ResultSet();\n\t\t\t\t\t$resultObj->initialize($result);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t//insert all the user associated with dialogue in the file\n\t\t\t$this->insertAllDialogActorInstances($dialog_instance_node_id); // dialogueactor\n\t\t\t//insert all the user not associated with dialogue in the file\n\n\t\t\tif($chatMessage!=\"\")\n\t\t\t{\n\t\t\t\tif($StmtType == \"Letter\" )\n\t\t\t\t{\n\t\t\t\t\t/* function here to save blank statement for letter in container form // now parent id use in dialogue */\n\t\t\t\t\t\t$jsonArray['statements'] \t\t\t\t= $chatMessage;\n\t\t\t\t\t\t$jsonArray['user_instance_node_id'] \t= $user_instance_node_id;\n\t\t\t\t\t\t$jsonArray['dialogueId'] \t\t\t\t= $dialog_instance_node_id;\n\t\t\t\t\t\t$jsonArray['Coursetype'] \t\t\t\t= $StmtType;\n\t\t\t\t\t\t$jsonArray['saveType'] \t\t\t\t = $saveType;\n\t\t\t\t\t\t$jsonArray['timestamp'] \t= date_timestamp_get(date_create());\n\t\t\t\t\t\t$savestate = $this->addLetterStatement($jsonArray);\t// add statement letter data\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$jsonArray['message'] \t\t\t\t\t= $chatMessage;\n\t\t\t\t\t$jsonArray['sender'] \t\t\t\t\t= $user_instance_node_id;\n\t\t\t\t\t$jsonArray['dialogue_node_id'] \t\t\t\t= $dialog_instance_node_id;\n\t\t\t\t\t$jsonArray['action'] \t\t\t\t\t= \"Statement\";\n\t\t\t\t//\t$jsonArray['messageType'] = \"Statement\"; **arti\n\t\t\t\t\t$jsonArray['type'] \t\t= \"Statement\";\n\n\t\t\t\t\t$jsonArray['timestamp'] \t= date_timestamp_get(date_create());;\n\t\t\t\t\t$prefixTitle \t\t\t= PREFIX.'user_info';\n\t\t\t\t\t$jsonArray['username'] \t\t\t\t\t= $_SESSION[$prefixTitle]['first_name'].' '.$_SESSION[$prefixTitle]['last_name'];\n\t\t\t\t\t$jsonArray['courseSection'] \t\t= 1;\n\n\n\t\t\t\t\t//$savestate = $this->saveMainStatementInstance($jsonArray);\t// add statement chat data **arti\n\n\t\t\t\t\t$structureObj \t\t= new StructureBuilderTable($this->adapter); // call structure builder table modal\n\t\t\t\t\t$savestate \t\t= $structureObj->saveStatementInstance($jsonArray);\t// add statement chat data\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t$success \t\t= $this->updateDialogTimestamp($dialog_instance_node_id);\n\t\t\t}\n\t\t\t//$courseAry \t\t\t= $this->insertAllDialougeIdBasesOfCourseId($course_instance_node_id); // course_dialogue_list_course_id // removed by arti\n\t\t\t//$allCourseUser \t\t= $this->insertAllCoursesInstanceByUser($user_instance_node_id); \t// user_course_data_ // removed by arti\n\n\t\t\t//$dialogAry \t\t\t= $this->insertAllDialogueCourseInfoById($dialog_instance_node_id);\t \t// dialogue_info\n\n\t\t\t$structureObj \t\t= new StructureBuilderTable($this->adapter); // call structure builder table modal change by awdhesh\n \t$dialogAry \t\t= $structureObj->insertAllDialogueInfoById($dialog_instance_node_id); // dialogue_info // call structure builder table modal change by awdhesh\n\n\t\t\t$allDialougeUser = $this->insertAllDialogueInstanceByUser($user_instance_node_id);\t // user_dialogue_data_\n\t\t\t$final_ary['modeType'] = $StmtType;\n\t\t/* end code here */\n\t\treturn $final_ary; // combination of $dialog_instance_node_id and $dialog_node_instance_property_id of title\n\t}", "title": "" }, { "docid": "4a21aa150957e044d9b37b0fe95d5971", "score": "0.51905507", "text": "function save_course_progress() {\n $response = $this->crud_model->save_course_progress();\n echo $response;\n }", "title": "" }, { "docid": "ba4ed6ee3f3489a0aa2589000b0899d4", "score": "0.5188875", "text": "public function addUser($user_id, $sections = array());", "title": "" }, { "docid": "47fa1e8f0f0c2c0656ddae2ab7456cf4", "score": "0.5180115", "text": "function learn_press_course_lesson_complete_button() {\n\t\tlearn_press_get_template( 'content-lesson/complete-button.php' );\n\t}", "title": "" }, { "docid": "850fa8148053b26abb478f70ecf06bf7", "score": "0.517863", "text": "function learn_press_profile_tab_courses_purchased( $user, $tab = null ) {\n\t\t$args = array(\n\t\t\t'user' => $user,\n\t\t\t'subtab' => $tab,\n\t\t);\n\t\t$limit = LP()->settings->get( 'profile_courses_limit', 10 );\n\t\t$limit = apply_filters( 'learn_press_profile_tab_courses_purchased_limit', $limit );\n\t\t$courses = $user->get( 'purchased-courses', array( 'limit' => $limit ) );\n\t\t$num_pages = learn_press_get_num_pages( $user->_get_found_rows(), $limit );\n\t\t$args['courses'] = $courses;\n\t\t$args['num_pages'] = $num_pages;\n\t\tlearn_press_get_template( 'profile/tabs/courses/purchased.php', $args );\n\t}", "title": "" } ]
ea77fbd12cc2433ff48f275775768d4c
Show all the invalid properties with reasons.
[ { "docid": "0245be6607539e6e4b05deef13023295", "score": "0.0", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if (!is_null($this->container['frequency']) && ($this->container['frequency'] < 1)) {\n $invalidProperties[] = \"invalid value for 'frequency', must be bigger than or equal to 1.\";\n }\n\n if (!is_null($this->container['lookback_periods']) && ($this->container['lookback_periods'] < 0)) {\n $invalidProperties[] = \"invalid value for 'lookback_periods', must be bigger than or equal to 0.\";\n }\n\n if ($this->container['frequency_unit'] === null) {\n $invalidProperties[] = \"'frequency_unit' can't be null\";\n }\n $allowedValues = $this->getFrequencyUnitAllowableValues();\n if (!is_null($this->container['frequency_unit']) && !in_array($this->container['frequency_unit'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'frequency_unit', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n $allowedValues = $this->getScopeAllowableValues();\n if (!is_null($this->container['scope']) && !in_array($this->container['scope'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'scope', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n return $invalidProperties;\n }", "title": "" } ]
[ { "docid": "7fed39667d839c08102ac22f697eafc2", "score": "0.7954126", "text": "public function listInvalidProperties();", "title": "" }, { "docid": "7fed39667d839c08102ac22f697eafc2", "score": "0.7954126", "text": "public function listInvalidProperties();", "title": "" }, { "docid": "7fed39667d839c08102ac22f697eafc2", "score": "0.7954126", "text": "public function listInvalidProperties();", "title": "" }, { "docid": "7fed39667d839c08102ac22f697eafc2", "score": "0.7954126", "text": "public function listInvalidProperties();", "title": "" }, { "docid": "b036e2aa6c43b5c48fced00caf2be093", "score": "0.7814029", "text": "public function listInvalidProperties()\n {\n $invalid_properties = parent::listInvalidProperties();\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "b036e2aa6c43b5c48fced00caf2be093", "score": "0.7814029", "text": "public function listInvalidProperties()\n {\n $invalid_properties = parent::listInvalidProperties();\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "b036e2aa6c43b5c48fced00caf2be093", "score": "0.7814029", "text": "public function listInvalidProperties()\n {\n $invalid_properties = parent::listInvalidProperties();\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "fe2800301ce70d33ff87aa05631c97d6", "score": "0.78096145", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n $allowedValues = $this->getUseOfLoanAllowableValues();\n if (!is_null($this->container['useOfLoan']) && !in_array($this->container['useOfLoan'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'useOfLoan', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n $allowedValues = $this->getIncomeVerificationStatusAllowableValues();\n if (!is_null($this->container['incomeVerificationStatus']) && !in_array($this->container['incomeVerificationStatus'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'incomeVerificationStatus', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n $allowedValues = $this->getGenderAllowableValues();\n if (!is_null($this->container['gender']) && !in_array($this->container['gender'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'gender', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "8bffc3ffe4ddeb386251df2489dd7c4b", "score": "0.780055", "text": "public function listInvalidProperties()\n {\n $invalid_properties = array();\n return $invalid_properties;\n }", "title": "" }, { "docid": "8bffc3ffe4ddeb386251df2489dd7c4b", "score": "0.780055", "text": "public function listInvalidProperties()\n {\n $invalid_properties = array();\n return $invalid_properties;\n }", "title": "" }, { "docid": "8bffc3ffe4ddeb386251df2489dd7c4b", "score": "0.780055", "text": "public function listInvalidProperties()\n {\n $invalid_properties = array();\n return $invalid_properties;\n }", "title": "" }, { "docid": "343c14a564bb2e864d93e5dd24bdf2ce", "score": "0.7781625", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n return $invalid_properties;\n }", "title": "" }, { "docid": "d7aeff97ef9e55272649fd9d7fb5bee5", "score": "0.77678627", "text": "public function listInvalidProperties()\r\n {\r\n $invalid_properties = [];\r\n return $invalid_properties;\r\n }", "title": "" }, { "docid": "701abdd9f96795f775c013d6e3e9c053", "score": "0.77577174", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "701abdd9f96795f775c013d6e3e9c053", "score": "0.77577174", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "701abdd9f96795f775c013d6e3e9c053", "score": "0.77577174", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "701abdd9f96795f775c013d6e3e9c053", "score": "0.77577174", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "701abdd9f96795f775c013d6e3e9c053", "score": "0.77577174", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "701abdd9f96795f775c013d6e3e9c053", "score": "0.77577174", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "42189e358727dc2b01e72f1b24898542", "score": "0.77358544", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "42189e358727dc2b01e72f1b24898542", "score": "0.77358544", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "42189e358727dc2b01e72f1b24898542", "score": "0.77358544", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "42189e358727dc2b01e72f1b24898542", "score": "0.77358544", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "42189e358727dc2b01e72f1b24898542", "score": "0.77358544", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "42189e358727dc2b01e72f1b24898542", "score": "0.77358544", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "42189e358727dc2b01e72f1b24898542", "score": "0.77358544", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "42189e358727dc2b01e72f1b24898542", "score": "0.77358544", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "42189e358727dc2b01e72f1b24898542", "score": "0.77358544", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "42189e358727dc2b01e72f1b24898542", "score": "0.77358544", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "42189e358727dc2b01e72f1b24898542", "score": "0.77358544", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "42189e358727dc2b01e72f1b24898542", "score": "0.77358544", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "42189e358727dc2b01e72f1b24898542", "score": "0.77358544", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "42189e358727dc2b01e72f1b24898542", "score": "0.77358544", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "42189e358727dc2b01e72f1b24898542", "score": "0.77358544", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "42189e358727dc2b01e72f1b24898542", "score": "0.77358544", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "d10aad42b82216b07a46207ff0879c2d", "score": "0.77092606", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n $allowedValues = $this->getReasonAllowableValues();\n if (!is_null($this->container['reason']) && !in_array($this->container['reason'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'reason', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "40831014ca18a9470e0bf127fc0c5a5c", "score": "0.77002573", "text": "public function listInvalidProperties()\n {\n $invalidProperties = parent::listInvalidProperties();\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "40831014ca18a9470e0bf127fc0c5a5c", "score": "0.77002573", "text": "public function listInvalidProperties()\n {\n $invalidProperties = parent::listInvalidProperties();\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "40831014ca18a9470e0bf127fc0c5a5c", "score": "0.77002573", "text": "public function listInvalidProperties()\n {\n $invalidProperties = parent::listInvalidProperties();\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "badc9b5142158067500fbd3102a34a27", "score": "0.76941806", "text": "public function listInvalidProperties()\n {\n $invalidProperties = parent::listInvalidProperties();\n $allowedValues = $this->getTypeAllowableValues();\n if (!in_array($this->container['type'], $allowedValues)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'type', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n $allowedValues = $this->getStyleIdentifierAllowableValues();\n if (!in_array($this->container['style_identifier'], $allowedValues)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'style_identifier', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "945a9cfd28079b25266d9cd35a10bdb1", "score": "0.7663026", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n $allowedValues = $this->getCategoryAllowableValues();\n if (!is_null($this->container['category']) && !in_array($this->container['category'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'category', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n $allowedValues = $this->getCurrencyAllowableValues();\n if (!is_null($this->container['currency']) && !in_array($this->container['currency'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'currency', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "9c9c2488e009c5df558616c9b99759f0", "score": "0.76518965", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n return $invalidProperties;\n }", "title": "" }, { "docid": "9c9c2488e009c5df558616c9b99759f0", "score": "0.76518965", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n return $invalidProperties;\n }", "title": "" }, { "docid": "9c9c2488e009c5df558616c9b99759f0", "score": "0.76518965", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n return $invalidProperties;\n }", "title": "" }, { "docid": "9c9c2488e009c5df558616c9b99759f0", "score": "0.76518965", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n return $invalidProperties;\n }", "title": "" }, { "docid": "d214a1128d588571b3bdb8ead012eef4", "score": "0.763543", "text": "public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n return $invalidProperties;\r\n }", "title": "" }, { "docid": "d214a1128d588571b3bdb8ead012eef4", "score": "0.763543", "text": "public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n return $invalidProperties;\r\n }", "title": "" }, { "docid": "d214a1128d588571b3bdb8ead012eef4", "score": "0.763543", "text": "public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n return $invalidProperties;\r\n }", "title": "" }, { "docid": "d214a1128d588571b3bdb8ead012eef4", "score": "0.763543", "text": "public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n return $invalidProperties;\r\n }", "title": "" }, { "docid": "d214a1128d588571b3bdb8ead012eef4", "score": "0.763543", "text": "public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n return $invalidProperties;\r\n }", "title": "" }, { "docid": "d214a1128d588571b3bdb8ead012eef4", "score": "0.763543", "text": "public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n return $invalidProperties;\r\n }", "title": "" }, { "docid": "d214a1128d588571b3bdb8ead012eef4", "score": "0.763543", "text": "public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n return $invalidProperties;\r\n }", "title": "" }, { "docid": "d214a1128d588571b3bdb8ead012eef4", "score": "0.763543", "text": "public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n return $invalidProperties;\r\n }", "title": "" }, { "docid": "d214a1128d588571b3bdb8ead012eef4", "score": "0.763543", "text": "public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n return $invalidProperties;\r\n }", "title": "" }, { "docid": "33929c8022d02add2628be36d35c091a", "score": "0.7622742", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['code'] === null) {\n $invalidProperties[] = \"'code' can't be null\";\n }\n $allowedValues = $this->getCodeAllowableValues();\n if (!in_array($this->container['code'], $allowedValues)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'code', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n if ($this->container['error_list'] === null) {\n $invalidProperties[] = \"'error_list' can't be null\";\n }\n if ($this->container['message'] === null) {\n $invalidProperties[] = \"'message' can't be null\";\n }\n if ($this->container['error_id'] === null) {\n $invalidProperties[] = \"'error_id' can't be null\";\n }\n return $invalidProperties;\n }", "title": "" }, { "docid": "8aff611d371405165adb5a0d06ae6429", "score": "0.7620793", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n $allowedValues = $this->getFieldIndexFormatAllowableValues();\n if (!in_array($this->container['field_index_format'], $allowedValues)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'field_index_format', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n $allowedValues = $this->getFieldUpdateCultureSourceAllowableValues();\n if (!in_array($this->container['field_update_culture_source'], $allowedValues)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'field_update_culture_source', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "143b5476034d8c25a9228f96cb7fc48c", "score": "0.7608492", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n $allowedValues = $this->getStateAllowableValues();\n if (!is_null($this->container['state']) && !in_array($this->container['state'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'state', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n $allowedValues = $this->getVisibilityAllowableValues();\n if (!is_null($this->container['visibility']) && !in_array($this->container['visibility'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'visibility', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "3e9782e8be1b4df6a3dfccae9b73659e", "score": "0.7594076", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n $allowedValues = $this->getAccountStateAllowableValues();\n if (!is_null($this->container['account_state']) && !in_array($this->container['account_state'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'account_state', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n $allowedValues = $this->getBusinessTypeAllowableValues();\n if (!is_null($this->container['business_type']) && !in_array($this->container['business_type'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'business_type', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75938106", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75938106", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75938106", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75938106", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75938106", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75938106", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75938106", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75938106", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75938106", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75938106", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75938106", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75938106", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75938106", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75938106", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75938106", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75938106", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75938106", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75938106", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75938106", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75938106", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75938106", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75938106", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75938106", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75938106", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75938106", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75938106", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75938106", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75938106", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75938106", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75938106", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75938106", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75938106", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75938106", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75938106", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75938106", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75938106", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75938106", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75938106", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75938106", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75938106", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75938106", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75938106", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75938106", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" } ]
47ff67edbb4db02a662ebaf874fd2f0e
Scan dir to find file and directory
[ { "docid": "0a4f1229610e25566f902b628209aa9a", "score": "0.0", "text": "public function scanDir($dir)\n {\n $objects = scandir($dir);\n\n // unset 2 first elements\n unset($objects[0], $objects[1]);\n\n return $objects;\n }", "title": "" } ]
[ { "docid": "c7bf5f65751de81170558befc1121d5d", "score": "0.7208994", "text": "private function directoryScan($dir) {\n\t\t\n\t\t// check for the validity of input / working directory\n\t\t\n\t\tif (!is_dir($dir)) {\n\t\t\tdie(\"'$dir' is not a directory.\".LE);\n\t\t}\n\t\t\n\t\t// listing directory contents\n\t\t\n\t\t$result = [];\n\t\t\n\t\t$root = scandir($dir);\n\t\tforeach($root as $value)\n\t\t{\n\t\t\t// removing dots & output directory\n\t\t\t\n\t\t\tif($value === '.' || $value === '..') {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// listing only files\n\t\t\t\n\t\t\tif(is_file(\"$dir\".DS.\"$value\")) {\n\t\t\t\t$result[$value]=\"$dir\".DS.\"$value\";\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// recursive call to self(this method) so we can get files listing recursively\n\t\t\t\n\t\t\tforeach($this->directoryScan(\"$dir\".DS.\"$value\") as $value1)\n\t\t\t{\n\t\t\t\t$result[basename($value1)]=$value1;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "064d6427309d6bfb6f3cbbc62f5bcbca", "score": "0.7134403", "text": "private function recSearchFiles($dir)\n {\n $ffs = scandir($dir);\n\n foreach ($ffs as $ff) {\n\n if ($ff != '.' && $ff != '..') {\n\n if (is_dir($dir . '/' . $ff)) {\n $this->recSearchFiles($dir . $ff . '/');\n } else if (strlen($ff) >= 5) {\n $this->searchedFiles[] = $dir . $ff;\n }\n }\n }\n }", "title": "" }, { "docid": "875d5fa97a22bfc0c9d570469d58bbed", "score": "0.71020705", "text": "function DNUI_scan_dir($dirBase) {\r\n return array_diff(scandir($dirBase), array('..', '.'));\r\n}", "title": "" }, { "docid": "41c0e24308f5a0b4c672febaea947e58", "score": "0.70547324", "text": "private function scanFolder()\n {\n return scandir($this->currentPath);\n }", "title": "" }, { "docid": "07f1acc178ec3a1bacad5be6122c242b", "score": "0.7020686", "text": "private function __scanDir($dir) {\n\n if ($dir == '/') {\n $dir = $this->startDirectory;\n $this->__currentDirectory = $dir;\n }\n\n $strippedDir = str_replace('/', '', $dir);\n\n $dir = ltrim($dir, \"/\");\n\n // Prevent listing blacklisted directories\n if (in_array($strippedDir, $this->ignoredDirectories)) {\n return false;\n }\n\n if (! file_exists($dir) || !is_dir($dir)) {\n return false;\n }\n\n return scandir($dir);\n }", "title": "" }, { "docid": "492d3fd2be274bb983c4ad4be1953895", "score": "0.70152855", "text": "function rScanDir($scanMe) {\r\n\t\tglobal $path, $tmpPath, $cur_folder, $tags2;\r\n\t\tforeach($scanMe as $folder)\r\n\t\t{\r\n\t\t\tif(is_dir($path.$tmpPath.$folder) && $folder !=\".\" && $folder !=\"..\")\r\n\t\t\t{\r\n\t\t\t\t$cur_folder[] = $tmpPath.$folder;\r\n\t\t\t\techo \"getTagString input:\".$tmpPath.$folder.\"<br/>\";\r\n\t\t\t\t$tags2[] = getTagString($tmpPath.$folder);\r\n\t\t\t\t$tmpPath .= $folder.\"/\";\r\n\t\t\t\trScanDir(scandir($path.$tmpPath));\r\n\t\t\t}\r\n\t\t}\r\n\t\t$tmpPath = substr($tmpPath, 0, strrpos($tmpPath, \"/\"));\r\n\t\t$tmpPath = substr($tmpPath, 0, strrpos($tmpPath, \"/\")+1);\r\n\t}", "title": "" }, { "docid": "71e23b70b584f1ec37944adba8e10c37", "score": "0.69049734", "text": "public function findFiles();", "title": "" }, { "docid": "bad6c98f10d430b207ac37f063af9abe", "score": "0.689053", "text": "function scan_directory($dir, $ext = '*', $recurse = true) {\n $files = array ();\n if ($handle = opendir($dir)) {\n while (false !== ($file = readdir($handle))) {\n if ($file == '.' || $file == '..' ||\n $file == 'CVS' || preg_match('|^\\.|', $file)) {\n continue;\n }\n if (is_link($dir . '/' . $file)) {\n continue;\n }\n if (is_dir ($dir . '/' . $file)) {\n if ($recurse == true)\n $files = array_merge($files, scan_directory ($dir . '/' . $file, $ext));\n } else {\n if($ext == get_file_extension($file) || $ext == '*') {\n $files[] = $dir . '/' . $file;\n }\n }\n }\n closedir($handle);\n }\n return $files;\n}", "title": "" }, { "docid": "e34d37330a567099c62d095eaa746cb3", "score": "0.68464893", "text": "function find($dir, $pattern){\n // escape any character in a string that might be used to trick\n // a shell command into executing arbitrary commands\n $dir = escapeshellcmd($dir);\n // get a list of all matching files in the current directory\n $files = glob(\"$dir/$pattern\");\n // find a list of all directories in the current directory\n // directories beginning with a dot are also included\n foreach (glob(\"$dir/{.[^.]*,*}\", GLOB_BRACE|GLOB_ONLYDIR) as $sub_dir){\n $arr = find($sub_dir, $pattern); // resursive call\n $files = array_merge($files, $arr); // merge array with files from subdirectory\n }\n // return all found files\n return $files;\n}", "title": "" }, { "docid": "37994b914a89577b39f74a0288bc5652", "score": "0.68427515", "text": "function scanFiles($dir){\n $path = __DIR__ . DIRECTORY_SEPARATOR . $dir; /** Nurodomas kelias iki jsons folderio */\n $files = scandir($path); /** Nuskenuoja folderi pagal kelia($path) ir grazina esanciu failu masyva */\n\n return $files;\n}", "title": "" }, { "docid": "b10e8d246684a82d34e710cbc25d860d", "score": "0.68174857", "text": "function scan_dir($dir){\n\tif( !is_dir( $dir ) )\n\t\treturn false;\n\n\t$files=scandir($dir);\n\n\t$dirs=array();\n\tforeach($files as $file){\n\t\tif($file=='.'||$file=='..'||substr($file,0,1)=='.')\n\t\t\tcontinue;\n\t\tif(is_dir($dir.'/'.$file))\n\t\t\tarray_push($dirs,$file);\n\t}\n\n\treturn $dirs;\n}", "title": "" }, { "docid": "0de5eb616b5acfefc26fb0c904c07dcc", "score": "0.6809656", "text": "protected function scanDir()\n {\n $this->moduleList = [];\n foreach ($this->getVendorList() as $vendorName) {\n $this->moduleList[$vendorName] = [];\n }\n\n $this->readModules();\n }", "title": "" }, { "docid": "61e92f27e8ba1128e46c41571154d981", "score": "0.6785254", "text": "function scanDir() {\r\n $returnArray = array();\r\n \r\n if ($handle = opendir($this->uploadDirectory)) {\r\n \r\n while (false !== ($file = readdir($handle))) {\r\n if (is_file($this->uploadDirectory.\"/\".$file)) {\r\n $returnArray[] = $file;\r\n }\r\n }\r\n \r\n closedir($handle);\r\n }\r\n else {\r\n die(\"<b>ERROR: </b> No se puede leer el directorio <b>\". $this->uploadDirectory.'</b>');\r\n }\r\n return $returnArray; \r\n }", "title": "" }, { "docid": "75456bbaac52ae1354a21e37f3c30bb3", "score": "0.67544377", "text": "function check_dir($dir)\n {\n global $docdir, $lang;\n \n // Collect files and diretcories in these arrays\n $directories = array();\n $files = array();\n \n // Open and traverse the directory\n $handle = @opendir($dir);\n while ($file = @readdir($handle)) {\n if (preg_match(\"/^\\.{1,2}/\",$file) || $file == 'CVS')\n continue;\n\n // Collect files and directories\n if (is_dir($dir.$file)) { $directories[] = $file; }\n else { $files[] = $file; }\n\n }\n @closedir($handle);\n \n // Sort files and directories\n sort($directories);\n sort($files);\n \n // Files first...\n $file_cnt = 0;\n foreach ($files as $file) {\n if (check_file($dir.$file, $file_cnt)) { $file_cnt++; }\n }\n\n // than the subdirs\n foreach ($directories as $file) {\n check_dir($dir.$file.\"/\");\n }\n }", "title": "" }, { "docid": "1ffc9aa2d610d7c44c58007002954bba", "score": "0.67268693", "text": "private static function __fordeepscan($dir, $file)\n {\n $path = \"\";\n $scan = glob($dir.'/*');\n $q = preg_quote($file, '\\\\');\n\n if (is_array($scan))\n {\n foreach ($scan as $d => $f)\n {\n if ($f != '.' && $f != '..')\n {\n $f = preg_replace(\"/[\\/]{1,}/\", '/', $f);\n\n if (!is_dir($f))\n {\n $base = basename($f);\n\n if (($base == $file) && strrpos($f, $file) !== false)\n {\n $path = $f;\n }\n\n $base = null;\n }\n\n if ($path == \"\")\n {\n $path = self::__fordeepscan($f, $file);\n if ($path !== \"\"){\n if (strrpos($path, $file) !== false){\n break;\n }\n }\n }\n\n $f = null;\n }\n }\n\n $scan = null;\n }\n\n return $path;\n }", "title": "" }, { "docid": "72b07e6afcf3592d5872036999f0abcf", "score": "0.6722486", "text": "function scan($dir){\n\n\t$files = array();\n\n\t// Is there actually such a folder/file?\n\n\tif(file_exists($dir)){\n\t\n\t\tforeach(scandir($dir) as $f) {\n\t\t\n\t\t\tif(!$f || $f[0] == '.') {\n\t\t\t\tcontinue; // Ignore hidden files\n\t\t\t}\n\n\t\t\tif(is_dir($dir . '/' . $f)) {\n\n\t\t\t\t// The path is a folder\n\n\t\t\t\t$files[] = array(\n\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\"type\" => \"folder\",\n\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\"items\" => scan($dir . '/' . $f) // Recursively get the contents of the folder\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\n\t\t\t\t// It is a file\n\t\t\t\t$path_info = pathinfo($f);\n\t\t\t\t//if ($path_info && $path_info.extension )\n\t\t\t\t$ext = $path_info['extension'];\n\t\t\t\tif($ext =='html'||$ext =='jpg' || $ext ==='png' || $ext == 'pdf'){\n\t\t\t\t\t$text = ($ext =='html') ?'doc':'image';\n\t\t\t\t\t$files[] = array(\n\t\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\t\"type\" => \"file\",\n\t\t\t\t\t\t\"text\" => $text,\n\t\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\t\"size\" => filesize($dir . '/' . $f) // Gets the size of this file\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t}\n\n\treturn $files;\n}", "title": "" }, { "docid": "5150d03b1c53e0df9911a9a2083952f3", "score": "0.6708006", "text": "protected function scanDirectory($dir, $include_tests) {\n $files = array();\n\n // In order to scan top-level directories, absolute directory paths have to\n // be used (which also improves performance, since any configured PHP\n // include_paths will not be consulted). Retain the relative originating\n // directory being scanned, so relative paths can be reconstructed below\n // (all paths are expected to be relative to $this->root).\n $dir_prefix = ($dir == '' ? '' : \"$dir/\");\n $absolute_dir = ($dir == '' ? $this->root : $this->root . \"/$dir\");\n\n if (!is_dir($absolute_dir)) {\n return $files;\n }\n // Use Unix paths regardless of platform, skip dot directories, follow\n // symlinks (to allow extensions to be linked from elsewhere), and return\n // the RecursiveDirectoryIterator instance to have access to getSubPath(),\n // since SplFileInfo does not support relative paths.\n $flags = \\FilesystemIterator::UNIX_PATHS;\n $flags |= \\FilesystemIterator::SKIP_DOTS;\n $flags |= \\FilesystemIterator::FOLLOW_SYMLINKS;\n $flags |= \\FilesystemIterator::CURRENT_AS_SELF;\n $directory_iterator = new \\RecursiveDirectoryIterator($absolute_dir, $flags);\n\n // Filter the recursive scan to discover extensions only.\n // Important: Without a RecursiveFilterIterator, RecursiveDirectoryIterator\n // would recurse into the entire filesystem directory tree without any kind\n // of limitations.\n $filter = new RecursiveExtensionFilterIterator($directory_iterator);\n $filter->acceptTests($include_tests);\n\n // The actual recursive filesystem scan is only invoked by instantiating the\n // RecursiveIteratorIterator.\n $iterator = new \\RecursiveIteratorIterator($filter,\n \\RecursiveIteratorIterator::LEAVES_ONLY,\n // Suppress filesystem errors in case a directory cannot be accessed.\n \\RecursiveIteratorIterator::CATCH_GET_CHILD\n );\n\n foreach ($iterator as $key => $fileinfo) {\n $name = $fileinfo->getBasename('.info.yml');\n\n if ($this->fileCache && $cached_extension = $this->fileCache->get($fileinfo->getPathName())) {\n $files[$cached_extension->getType()][$key] = $cached_extension;\n continue;\n }\n\n // Determine extension type from info file.\n $type = FALSE;\n $file = $fileinfo->openFile('r');\n while (!$type && !$file->eof()) {\n preg_match('@^type:\\s*(\\'|\")?(\\w+)\\1?\\s*$@', $file->fgets(), $matches);\n if (isset($matches[2])) {\n $type = $matches[2];\n }\n }\n if (empty($type)) {\n continue;\n }\n $name = $fileinfo->getBasename('.info.yml');\n $pathname = $dir_prefix . $fileinfo->getSubPathname();\n\n $filename = $name . '.' . $type;\n\n if (!file_exists(dirname($pathname) . '/' . $filename)) {\n $filename = NULL;\n }\n\n $extension = new Extension($this->root, $type, $pathname, $filename);\n\n // Track the originating directory for sorting purposes.\n $extension->subpath = $fileinfo->getSubPath();\n $extension->origin = $dir;\n\n $files[$type][$key] = $extension;\n\n if ($this->fileCache) {\n $this->fileCache->set($fileinfo->getPathName(), $extension);\n }\n }\n return $files;\n }", "title": "" }, { "docid": "0a7eb4e380e0f1076074cd9dd3eea547", "score": "0.6694122", "text": "function RecursiveScanDir($dir, $prefix = '') {\n\t$dir = rtrim($dir, '\\\\/');\n\t$result = array();\n\tforeach (scandir($dir) as $f) {\n if (\n preg_match('`/tmp/`', \"$dir/$f\")\n || preg_match('`/fpdf.php$`', \"$dir/$f\")\n || preg_match('`/libs/pi_barcode.php$`', \"$dir/$f\")\n || preg_match('`/libs/phpmailer/`', \"$dir/$f\")\n || preg_match('`/libs/securimage/`', \"$dir/$f\")\n || preg_match('`/libs/Smarty/`', \"$dir/$f\")\n )\n continue;\n\t\tif ($f !== '.' and $f !== '..') {\n\t\t\tif (is_dir(\"$dir/$f\")) {\n\t\t\t\t$result = array_merge($result, RecursiveScanDir(\"$dir/$f\", \"$prefix$f/\"));\n\t\t\t} else {\n\t\t\t\tif ( strtolower(substr(pathinfo($f,PATHINFO_EXTENSION),0,3)) == \"php\" && pathinfo(__FILE__,PATHINFO_BASENAME ) != pathinfo($f,PATHINFO_BASENAME ) )\n\t\t\t\t\t$result[] = $prefix.$f;\n\t\t\t}\n\t\t}\n\t}\n\treturn $result;\n}", "title": "" }, { "docid": "c80b40990e78f2e1bb0d1364d36f6238", "score": "0.6665964", "text": "public function test_scan_files()\n {\n $content = array('.gitignore','.htaccess','index.php','README');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC, Directory::SCAN_FILES);\n \n $this->assertEquals(count($content), count($res));\n foreach($res as $path=>$dir){\n $this->assertTrue(in_array($dir->get_base_name(), $content));\n $this->assertInstanceOf('\\Kaili\\File', $dir);\n }\n }", "title": "" }, { "docid": "9cca73c782bc7a3610231da8142b5f83", "score": "0.66625416", "text": "function scan_dir($dir, $type=array(),$only=FALSE, $allFiles=FALSE, $recursive=TRUE, $onlyDir=\"\", &$files){\n\t$handle = @opendir($dir);\n\tif(!$handle)\n\t\treturn false;\n\twhile ($file = @readdir ($handle))\n\t{\n\t\tif (eregi(\"^\\.{1,2}$\",$file) || $file == 'index.html')\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\t\tif(!$recursive && $dir != $dir.$file.\"/\")\n\t\t{\n\t\t\tif(is_dir($dir.$file))\n\t\t\t\tcontinue;\n\t\t}\n\t\tif(is_dir($dir.$file))\n\t\t{\n\t\t\tscan_dir($dir.$file.\"/\", $type, $only, $allFiles, $recursive, $file, $files);\n\t\t}\n\t\telse\n\t\t{\n if($only)\n\t\t\t\t$onlyDir = $dir;\n\n\t\t\t$files = buildArray($dir,$file,$onlyDir,$type,$allFiles,$files);\n\t\t}\n\t}\n\t@closedir($handle);\n\treturn $files;\n}", "title": "" }, { "docid": "acb4a9cfe1e168529f09b0c01e376104", "score": "0.66547525", "text": "function processDir($dir, $link) {\n\t\tif(is_dir($dir)) {\n\t\t\t$currentDir = scandir($dir);\n\t\t\tforeach ($currentDir as $key => $value)\t{\n\t\t\t\tif (!in_array($value,array(\".\", \"..\", \".DS_Store\")))\t{\n\t\t\t\t\tif (is_dir($dir . \"/\" . $value)) {\n\t\t\t\t\t\t$this->processDir($dir . \"/\" . $value, $link);//Recursive\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$metaFileNameFound = \"\";\n\t\t\t//Search the link in the meta files\n\t\t\tforeach (glob($dir.\"/*.meta.xml\") as $file) {\n\t\t\t\t$content = file_get_contents($file);\n\t\t\t\tif (strpos($content, $link) !== false) {\n\t\t\t\t\t//TODO: Optimisation: Memorize the link and the file path together For reusablilty.\n\t\t\t\t\treturn $file;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn \"\";\n\t}", "title": "" }, { "docid": "505da4b95fa56d55638e138f8bde51ba", "score": "0.6649014", "text": "function _ft_search_find_files($dir, $q){\r\n\t$output = array();\r\n\tif (ft_check_dir($dir) && $dirlink = @opendir($dir)) {\r\n\t\twhile(($file = readdir($dirlink)) !== false){\r\n\t\t\tif($file != \".\" && $file != \"..\" && ((ft_check_file($file) && ft_check_filetype($file)) || (is_dir($dir.\"/\".$file) && ft_check_dir($file)))){\r\n\t\t\t\t$path = $dir.'/'.$file;\r\n\t\t\t\t// Check if filename/directory name is a match.\r\n\t\t\t\tif(stristr($file, $q)) {\r\n\t\t\t\t\t$new['name'] = $file;\r\n\t\t\t\t\t$new['shortname'] = ft_get_nice_filename($file, 20);\r\n\t\t\t\t\t$new['dir'] = substr($dir, strlen(ft_get_root()));\r\n\t\t\t\t\tif (is_dir($path)) {\r\n if (ft_check_dir($path)) {\r\n \t\t\t\t\t\t$new['type'] = \"dir\";\t\t\t\t\t \r\n \t\t\t\t\t$output[] = $new;\r\n }\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t $new['type'] = \"file\";\r\n \t\t\t\t\t$output[] = $new;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// Check subdirs for matches.\r\n\t\t\t\tif(is_dir($path)) {\r\n\t\t\t\t\t$dirres = _ft_search_find_files($path, $q);\r\n\t\t\t\t\tif (is_array($dirres) && count($dirres) > 0) {\r\n\t\t\t\t\t\t$output = array_merge($dirres, $output);\r\n\t\t\t\t\t\tunset($dirres);\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\t\tsort($output);\r\n\t\tclosedir($dirlink);\r\n\t\treturn $output;\r\n\t} else {\r\n\t\treturn FALSE;\r\n\t}\r\n}", "title": "" }, { "docid": "1e7ee99875ef74f43871ad0cad4855f1", "score": "0.66362023", "text": "public function dir_readdir() {}", "title": "" }, { "docid": "b41224ed2ac5d968df533555f40c1147", "score": "0.66273534", "text": "static private function scan_dir( $dir ) {\n\t\t$ignored = array( '.', '..', '.svn', '.htaccess', 'test-log.log' );\n\n\t\t$files = array();\n\t\tforeach ( scandir( $dir ) as $file ) {\n\t\t\tif ( in_array( $file, $ignored ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$files[ $file ] = filemtime( $dir . '/' . $file );\n\t\t}\n\t\tarsort( $files );\n\t\t$files = array_keys( $files );\n\n\t\treturn ( $files ) ? $files : false;\n\t}", "title": "" }, { "docid": "c2ef8976c470318c3ca8e67501a54556", "score": "0.6602899", "text": "private function find_module_html_files($dir)\n\t{\n\n\t\tif(!is_dir($dir)) return;\n\n\t\t$files = scandir($dir);\n\t\t\n\t\tforeach($files as $file) \n\t\t{\n\n\t\t $dirfile = $dir.'/'.$file;\n\n\t\t if(is_dir($dirfile) && $file[0]!='.') $this->find_module_html_files($dirfile);\n\n\t\t elseif(is_file($dirfile)) \n\t\t {\n\t\t $index_array = explode('/',$dirfile);\n\t\t array_splice($index_array,2,1);\n\t\t // echo \"OB.UI.htmlCache['\".implode('/',$index_array).\"'] = $.ajax({'url': '$dirfile', 'async': false}).responseText;\\n\";\n\t\t\t\t$this->html_data[implode('/',$index_array)] = file_get_contents($dirfile);\n\t\t }\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "c4340fa70ed7d4352563614f59048d75", "score": "0.6587263", "text": "function searchForFile($dir, $searchfile)\r\n{\r\n\tglobal $total_loops;\r\n\t// Make sure we do not exceed 80% memory usage. If so, return false to prevent hitting memory limit.\r\n\t// if (memory_get_usage()/1048576 > (int)ini_get('memory_limit')*0.8) return false;\r\n\t// Set max number of loops we'll do\r\n\t$max_loops = 20000;\r\n\t// Trim $dir and make sure it ends with directory separator\r\n\t$dir = rtrim(trim($dir), DS) . DS;\r\n\t// Loop through all files and subdirectories\r\n\tforeach (getDirFiles($dir) as $thisFileOrDir) \r\n\t{\r\n\t\t// Increment loop\r\n\t\t$total_loops++;\r\n\t\t// Stop if we've done over $max_loops loops and reset $total_loops for other processes\r\n\t\tif ($total_loops > $max_loops) {\r\n\t\t\t$total_loops = 0;\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t// Set full path of file/dir we're looking at\r\n\t\t$fullPath = $dir.$thisFileOrDir;\r\n\t\t// If it's a file, check if it's the one we're looking for\r\n\t\tif (isFile($fullPath)) {\r\n\t\t\t// Found the file! Return the current directory.\r\n\t\t\tif ($thisFileOrDir == $searchfile) return $dir;\r\n\t\t}\r\n\t\t// If it's a directory, then recursively check all files in that subdirectory\r\n\t\telseif (is_dir($fullPath)) {\r\n\t\t\t// Get return value for this directory\r\n\t\t\t$returnedDir = searchForFile($fullPath, $searchfile);\r\n\t\t\t// If returned a filename and it matches teh search file, return the returned directory\r\n\t\t\tif ($returnedDir !== false) return $returnedDir;\r\n\t\t}\r\n\t}\r\n\t// If didn't find it, return false\r\n\treturn false;\r\n}", "title": "" }, { "docid": "5b791c054d6a5c7d0d91b88268e16428", "score": "0.65603346", "text": "static private function find_contents($dir)\n {\n $result = array();\n $root = scandir($dir);\n foreach ($root as $value) {\n if ($value === '.' || $value === '..') {\n continue;\n }\n if (is_file($dir . DIRECTORY_SEPARATOR . $value)) {\n if (! self::$ext_filter || in_array(strtolower(pathinfo($dir . DIRECTORY_SEPARATOR . $value, PATHINFO_EXTENSION)), self::$ext_filter)) {\n self::$files[] = $result[] = $dir . DIRECTORY_SEPARATOR . $value;\n }\n continue;\n }\n if (self::$recursive) {\n foreach (self::find_contents($dir . DIRECTORY_SEPARATOR . $value) as $value) {\n self::$files[] = $result[] = $value;\n }\n }\n }\n // Return required for recursive search\n return $result;\n }", "title": "" }, { "docid": "9de30a7d7f4e6e83e97419cf166174de", "score": "0.65136975", "text": "function searchFiles($search, $path, $video){\n $searchFiles = scandir($path);\n foreach($searchFiles as $sFile){\n if(($sFile!=\".\")&&($sFile!=\"..\")){\n if(is_dir($path.$sFile)){\n $search = glob($path.$sFile.'/'.$video);\n if(!empty($search)){\n return $search;\n }\n }\n }\n }\n return array('did', 'not', 'work');\n}", "title": "" }, { "docid": "3d4fabc452c21cbad9afce3834efe02d", "score": "0.6513365", "text": "function scan($dir){\n\n\t$files = array();\n\n\t// Is there actually such a folder/file?\n\n\tif(file_exists($dir)){\n\t\n\t\tforeach(scandir($dir) as $f) { // scandir() accepts the full path of the folder to be scanned\n\t\t\n\t\t\tif(!$f || $f[0] == '.') {\n\n\t\t\t\t// It is a hidden file\n\t\t\t\t\n\t\t\t\tcontinue; \n\t\t\t}\n\n\t\t\tif(is_dir($dir . '/' . $f)) {\n\n\t\t\t\t// The path is a folder\n\n\t\t\t\t$files[] = array(\n\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\"type\" => \"folder\",\n\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\"items\" => scan($dir . '/' . $f) // Recursively get the contents of the folder\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\n\t\t\t\t// It is a file\n\n\t\t\t\t$files[] = array(\n\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\"type\" => \"file\",\n\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\"size\" => filesize($dir . '/' . $f) // Gets the size of this file\n\t\t\t\t);\n\t\t\t}\n\n\t\t}\n\t\n\t}\n\n\treturn $files;\n}", "title": "" }, { "docid": "08ffa0cab13be48984ca9c83b5053880", "score": "0.644219", "text": "function searchFile($directory, $file)\n{\n // Blacklisted directory names - not doing so will provoke an endless loop\n $blacklist = array ( '.idea', '.git', '.', '..');\n\n // Getting a handle on the directory\n $dir_handle = opendir($directory);\n\n // Looping on all the directorie's entry to find the right file\n while(false !== ($entry = readdir($dir_handle)))\n {\n //if($entry != '.' && $entry != '..' && $entry != '.idea' && $entry != '.git')\n if(!in_array($entry, $blacklist))\n {\n // if it's a directory - call back the same function recursively\n if(is_dir($directory. DIRECTORY_SEPARATOR .$entry))\n {\n searchFile($directory . DIRECTORY_SEPARATOR . $entry, $file);\n }\n // If it's a file, test against class name to know if it is the right file\n else if(str_replace(\".php\", \"\", $entry) == get_class_name($file))\n {\n $path = $directory . DIRECTORY_SEPARATOR . $entry;\n add_to_cache($file, $path);\n\n return;\n }\n }\n }\n\n closedir($dir_handle);\n\n\n}", "title": "" }, { "docid": "4766875ecd06a2d34544b4f93490e2a8", "score": "0.6420873", "text": "function searchDir($root,$path,&$data)\n\t{\n\t\t$full_path = $root.$path;\n\t\tif(is_dir($full_path))\n\t\t{\n\t\t\t$dp=dir($full_path);\n\t\t\twhile($file=$dp->read())\n\t\t\t{\n\t\t\t\tif($file!='.'&& $file!='..')\n\t\t\t\t{\n\t\t\t\t\tsearchDir($root,$path.'/'.$file,$data);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$dp->close();\n\t\t}\n\t\tif(is_file($full_path))\n\t\t{\n\t\t\t$data[]=$path;\n\t\t}\n\t}", "title": "" }, { "docid": "df2527b8cf14869ccf78482c63344c0e", "score": "0.6420851", "text": "function rd_do_dir($dir)\n{\n\t$out=array();\n\t$_dir=($dir=='')?'.':$dir;\n\t$dh=@opendir($_dir);\n\tif ($dh!==false)\n\t{\n\t\twhile (($file=readdir($dh))!==false)\n\t\t{\n\t\t\tif (!in_array($file,array('.','..','git','.svn','CVS','_vti_cnf')))\n\t\t\t{\n\t\t\t\tif (is_file($_dir.'/'.$file))\n\t\t\t\t{\n\t\t\t\t\t$path=$dir.(($dir!='')?'/':'').$file;\n\t\t\t\t\t$out[]=$path;\n\t\t\t\t} elseif (is_dir($_dir.'/'.$file))\n\t\t\t\t{\n\t\t\t\t\t$out=array_merge($out,rd_do_dir($dir.(($dir!='')?'/':'').$file));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn $out;\n}", "title": "" }, { "docid": "ddf298ad38a23280b694bdf3ebeca252", "score": "0.6417646", "text": "static function find_files( $dir ) {\n\t\t$found_files = array();\n\t\t$files = scandir( $dir );\n\n\t\tforeach ( $files as $value ) {\n\t\t\t// skip special dot files\n\t\t\t// and any file that starts with a . - think hidden directories like .svn or .git\n\t\t\tif ( strpos( $value, '.' ) === 0 ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// is it a file?\n\t\t\tif ( is_file( \"$dir/$value\" ) ) {\n\t\t\t\t$found_files[] = \"$dir/$value\";\n\t\t\t\tcontinue;\n\t\t\t} else { // it's a directory\n\t\t\t\tforeach ( self::find_files( \"$dir/$value\" ) as $value ) {\n\t\t\t\t\t$found_files[] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $found_files;\n\t}", "title": "" }, { "docid": "8ce0356e342a0e0a0f663edbeee4d448", "score": "0.6413325", "text": "private function searchFiles($dir)\n {\n $this->searchedFiles = array();\n\n $this->recSearchFiles($this->basePath . $dir);\n\n return $this->searchedFiles;\n }", "title": "" }, { "docid": "c4faa7ce15ba7e5443a591870cd1127e", "score": "0.6410782", "text": "function checkDirectory($dir){\r\n\t\t\t\t\t\t\tif (is_dir($dir)) {\r\n\t\t\t\t\t\t\t\tif ($dh = opendir($dir)) {\r\n\t\t\t\t\t\t\t\t\twhile (($file = readdir($dh)) !== false) {\r\n\t\t\t\t\t\t\t\t\t\t if ($file == '.' || $file == '..') {\r\n\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t$file_path = $dir . DIRECTORY_SEPARATOR . $file;\r\n\t\t\t\t\t\t\t\t\t\tif(is_dir($file_path)){\r\n\t\t\t\t\t\t\t\t\t\t\techo \"<p class='content_title'>$file <p>\";\r\n\t\t\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\t\t\techo \"<p>$file <p>\";\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tclosedir($dh);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}", "title": "" }, { "docid": "aa090847f9f1eec95bef74449bdc8e88", "score": "0.6373919", "text": "public function scanSrc($dir, $total = array())\n {\n if ($handle = opendir($dir)) {\n while (($file = readdir($handle)) !== false) {\n if ($file != \"..\" && $file != \".\") {\n if (is_dir($dir . \"/\" . $file))\n // Do DFS\n $total += $this->scanSrc($dir . \"/\" . $file, $total);\n else\n array_push($total, $dir . '/' . $file);\n }\n }\n closedir($handle);\n return $total;\n }\n }", "title": "" }, { "docid": "3941039c05ef16e8199fec82e173196d", "score": "0.63721204", "text": "function scanfiles( $path = '' ) {\n\t\t\t\n\t\t\tglobal $bwpsoptions;\n\t\t\t\n\t\t\t$tz = get_option( 'gmt_offset' ) * 60 * 60;\n\n $data = array();\n\n\t\t\tif ( $dirHandle = @opendir( ABSPATH . $path ) ) { //get the directory\n\t\t\t\n\t\t\t\twhile ( ( $item = readdir( $dirHandle ) ) !== false ) { // loop through dirs\n\t\t\t\t\t\n\t\t\t\t\tif ( $item != '.' && $item != '..' ) { //don't scan parent/etc\n\n\t\t\t\t\t\t$relname = $path . $item;\n \n\t\t\t\t\t\t$absname = ABSPATH . $relname;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( $this->checkFile( $relname ) == true ) { //make sure the user wants this file scanned\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ( filetype( $absname ) == 'dir' ) { //if directory scan it\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$data = array_merge( $data, $this->scanfiles( $relname . '/' ) );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} else { //is file so add to array\n\n\t\t\t\t\t\t\t\t$data[$relname] = array();\n\t\t\t\t\t\t\t\t$data[$relname]['mod_date'] = @filemtime( $absname ) + $tz;\n\t\t\t\t\t\t\t\t$data[$relname]['hash'] = @md5_file( $absname );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\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@closedir( $dirHandle ); //close the directory we're working with\n \n\t\t\t} \n\t\t\t\n\t\t\treturn $data; // return the files we found in this dir\n\t\t\t\n\t\t}", "title": "" }, { "docid": "eda1168bdd8aec2a5aeaf6e1893e4397", "score": "0.63622797", "text": "function searchDir($base_dir=\"./\",$p=\"\",$f=\"\",$allowed_depth=-1){\n\t$contents=array();\n\n\t# trim all input arguments for whitespace\n\t$base_dir=trim($base_dir);\n\t$p=trim($p);\n\t$f=trim($f);\n\n # if base dir is not given, use the this\n\tif($base_dir==\"\")$base_dir=\"./\";\n\n\t# if last character of basedir lacks a \"/\" then add one\n\tif(substr($base_dir,-1)!=\"/\")$base_dir.=\"/\";\n\n\t# remove the \"../\" and \"./\" directories, and trim all \"./\"\n\t$p=str_replace(array(\"../\",\"./\"),\"\",trim($p,\"./\"));\n\n\t# add the requested path to the base directory string\n\t$p=$base_dir.$p;\n\n\t#if p is not a directory, meaning it is a file, get the path to it\n\tif(!is_dir($p))$p=dirname($p);\n\n\t#if the last character of p is not a \"/\" then add one\n\tif(substr($p,-1)!=\"/\")$p.=\"/\";\n\n\t# if caps are set on allowed depth (allowed depth>-1) count the dirs\n\tif($allowed_depth>-1){\n\t\t$allowed_depth=count(explode(\"/\",$base_dir))+ $allowed_depth-1;\n\t\t$p=implode(\"/\",array_slice(explode(\"/\",$p),0,$allowed_depth));\n\t\tif(substr($p,-1)!=\"/\")$p.=\"/\";\n\t}\n\n\t# if f is empty, create an empty array, if not explode and store elements\n\t$filter=($f==\"\")?array():explode(\",\",strtolower($f));\n\n\t# store the files in the files array, and shut up while scanning\n\t$files=@scandir($p);\n\n\t# if there are no files after scan, return an empty array and the path\n\tif(!$files)return array(\"contents\"=>array(),\"currentPath\"=>$p);\n\n\t# iterate through all files found\n\tfor ($i=0;$i<count($files);$i++){\n\n\t\t# gather name and path of each file\n\t\t$fName=$files[$i];\n\t\t$fPath=$p.$fName;\n\n\t\t# check if the file is a directory and tag it as directory\n\t\t# each file is tagged as a folder by default\n\t\t$isDir=is_dir($fPath);\n\t\t$add=false;\n\t\t$fType=\"folder\";\n\n\t\t# if the file is a file\n\t\tif(!$isDir){\n\n\t\t\t# extract extension from filename\n\t\t\t$ft=strtolower(substr($files[$i],strrpos($files[$i],\".\")+1));\n\t\t\t$fType=$ft;\n\n\t\t\t# if there is anything in the filter that matches, add it\n\t\t\tif($f!=\"\"){\n\t\t\t\tif(in_array($ft,$filter))$add=true;\n\t\t\t}else{\n\t\t\t\t$add=true;\n\t\t\t}\n\t\t# if the file is a folder\n\t\t}else{\n\t\t\tif($fName==\".\")continue;\n\t\t\t$add=true;\n\n\t\t\t# filter it, and discard if bad\n\t\t\tif($f!=\"\"){\n\t\t\t\tif(!in_array($fType,$filter))$add=false;\n\t\t\t}\n\n\t\t\t# if the file is the \"..\" folder\n\t\t\tif($fName==\"..\"){\n\t\t\t\t# if we are in the base dir, no not add upper directory option\n\t\t\t\tif($p==$base_dir){\n\t\t\t\t\t$add=false;\n\t\t\t\t}else $add=true;\n\n\t\t\t\t# explode the path by path steps\n\t\t\t\t$tempar=explode(\"/\",$fPath);\n\t\t\t\t# remove last two elements, so the file references parent dir\n\t\t\t\tarray_splice($tempar,-2);\n\t\t\t\t# implode the array, to recreate the path string\n\t\t\t\t$fPath=implode(\"/\",$tempar);\n\t\t\t\t# if for some reason, this reference is shorter than basedir, deny it!\n\t\t\t\tif(strlen($fPath)<= strlen($base_dir))$fPath=\"\";\n\t\t\t}\n\t\t}\n\n\t\t# if the created fPath is non-zero, append to basedir\n\t\tif($fPath!=\"\")$fPath=substr($fPath,strlen($base_dir));\n\t\t# if approved to add, add path, name and type to contents[] array\n\t\tif($add)$contents[]=array(\"fPath\"=>$fPath,\"fName\"=>$fName,\"fType\"=>$fType);\n\t}\n\n\t# if p is shorter than base_dir, deny it! Else, cut away base_dir and use it\n\t$p=(strlen($p)<= strlen($base_dir))?$p=\"\":substr($p,strlen($base_dir));\n\t# return the final contents and its respective path\n\treturn array(\"contents\"=>$contents,\"currentPath\"=>$p);\n}", "title": "" }, { "docid": "246f98afd5ae8947fc8dbd873a8a48c1", "score": "0.63560814", "text": "public function listFiles($dir);", "title": "" }, { "docid": "598917c9141d8180f9c84bc1aaeb6c4b", "score": "0.6340737", "text": "protected static function _scanForPlugins(){\n\t\t$directory = __DIR__ . Config::$pluginsDirectory;\n\t\t$handle = opendir( $directory );\n\n\t\t// check to make sure we could open the directory handle\n\t\tif( !$handle )\n\t\t\treturn;\n\n\t\t// now begin looping through all of the contents of the plugin directory\n\t\twhile( ( $dir = readdir( $handle ) ) !== false ){\n\t\t\tif( $dir === '.' || $dir === '..' )\n\t\t\t\tcontinue;\n\n\t\t\t// now we need to verify that the current \"file\" is a directory before continuing\n\t\t\tif( !is_dir( $directory . $dir ) )\n\t\t\t\tcontinue;\n\n\t\t\t// expect a class file to exist in the format \"class-<DirectoryName>.php\"\n\t\t\t$classFile = $directory . $dir . '/' . $dir . '.php';\n\t\t\tif( !file_exists( $classFile ) )\n\t\t\t\tcontinue;\n\n\t\t\t// now actually include the code\n\t\t\trequire_once( $classFile );\n\n\t\t\t// now expect the class name to match whatever the $dir name was\n\t\t\tif( !class_exists( $dir ) )\n\t\t\t\tcontinue;\n\n\t\t\t// now we can instantiate the class name and store it now\n\t\t\tself::$_plugins[] = new $dir();\n\t\t}\n\t}", "title": "" }, { "docid": "c889a28095007b29e3b3c8a1d225036a", "score": "0.63353246", "text": "public function directory( $dir )\n\t{\t\n\t\tif ( !is_dir( $dir ) ) \n\t\t{\n\t\t\tthrow new Packtacular_Exception( \"Packtacular - The source direcotry '\".$dir.\"' is not readable.\" );\n\t\t}\n\t\t\n\t\t// we need to reset the last change timestamp because we might add new files\n\t\t$this->reset_last_change();\n\t\t\n\t\t$iterator = new RecursiveIteratorIterator( new RecursiveDirectoryIterator( $dir ), RecursiveIteratorIterator::SELF_FIRST );\n\t\t\n\t\tforeach ( $iterator as $file ) \n\t\t{\n\t\t\t$file = $file->getPathname();\n\t\t\t\n\t\t\tif ( substr( $file, ( strlen( '.'.$this->type ) * -1 ) ) === '.'.$this->type ) \n\t\t\t{\n\t\t\t\t$this->sources[] = $file;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "e266aa28ef21f76dafbbc44494a16fd9", "score": "0.632543", "text": "function find_all_files($dir) \n{ \n $files = array();\n foreach (glob($dir) as $file) {\n $files[] = $file;\n }\n return $files;\n}", "title": "" }, { "docid": "f604a5be5dfe22a2f939be63d8982c00", "score": "0.63138574", "text": "public function test_scan_directories()\n {\n $content = array('.','..','application','.git','nbproject','system');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC, Directory::SCAN_DIRS);\n \n $this->assertEquals(count($content), count($res));\n foreach($res as $path=>$dir){\n $this->assertTrue(in_array($dir->get_base_name(), $content));\n $this->assertInstanceOf('\\Kaili\\Directory', $dir);\n }\n }", "title": "" }, { "docid": "40519801d6b90d6a149d6afe40d36625", "score": "0.6272241", "text": "public function readInFiles( $sDir ) {\n\t\t$oCurrentDirectory = new DirectoryIterator( $sDir );\n\t\tforeach ( $oCurrentDirectory as $oFileinfo ) {\n\t\t\tif ( $oFileinfo->isFile() ) {\n\t\t\t\t$this->aFiles[] = $oFileinfo->getPathname();\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ( $oFileinfo->isDir() && !$oFileinfo->isDot() && $oFileinfo->getFilename() != $sDir ) {\n\t\t\t\t$this->readInFiles( $oFileinfo->getPath() .DS. $oFileinfo->getFilename() );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "dce8dcdf3121e736f2bf96a917fc26a2", "score": "0.62687796", "text": "function directory_scan($directory, $withfiles) {\n\t$scanned_directory = array_diff(scandir($directory), array(\"..\", \".\")); //This removes all of the unessesary results\n\n\tfor ($i = 0; ($i < count(scandir($directory))) && $withfiles == true; $i = $i + 1) {\n\t\tif (isset($scanned_directory[$i]) && (is_dir($directory . \"/\" . $scanned_directory[$i]) == FALSE)) { // If current item is a file, make it a download link\n\t\t\techo \"<div class='fileDiv'>\";\n\t\t\techo \"<div>\";\n\t\t\techo \"<input type='checkbox' class='modify' name='movefrom[\" . $scanned_directory[$i] . \"]' form='moveto'>\";\n\t\t\techo \"<img src='Assets/SVG/file.svg' class='foldersvg'/>\";\n\t\t\techo \"<p class='fileLink'>\" . $scanned_directory[$i] . \"</p>\";\n\t\t\techo \"</div>\";\n\t\t\techo \"<p class='fileinfo'><b>Type</b>: \" . mime_content_type($directory. \"/\" . $scanned_directory[$i]) . \" <b>Size</b>: \" . getfilesize($directory . \"/\" . $scanned_directory[$i], 0) . \" <b>Last Modified</b>: \" . date(\"F d Y H:i:s.\",filectime($directory. \"/\" . $scanned_directory[$i])) . \"</p> \";\t\t\t\n\t\t\techo \"</div>\";\n\t\t} else if (isset($scanned_directory[$i]) && $directory . \"/\" . $scanned_directory[$i] != \"uploads/\" . $_SESSION[\"username\"] . \"/Trash\") { // Makes this a special dir box if a item is folder\n\t\t\techo \"<div class='folderDiv'>\";\n\t\t\techo \"<div>\";\n\t\t\techo \"<input type='checkbox' class='modify' name='movefrom[\" . $scanned_directory[$i] . \"]' form='moveto'>\";\n\t\t\techo \"<img src='Assets/SVG/folder.svg' class='foldersvg'/>\";\n\t\t\techo \"<input type='button' class='folderButton' value='\" . $scanned_directory[$i] . \"' name='directory[\" . $i . \"]'>\";\n\t\t\techo \"</div>\";\n\t\t\techo \"<p class='folderinfo'><b>Type</b>: Folder <b>Size</b>: \" . getfilesize($directory . \"/\" . $scanned_directory[$i], 1) . \" <b>Last Modified</b>: \" . date(\"F d Y H:i:s.\",filectime($directory. \"/\" . $scanned_directory[$i])) . \"</p> \";\n\t\t\techo \"</div>\"; \n\t\t}\n\t}\n\t\n\tfor ($i = 0; ($i < count(scandir($directory))) && $withfiles == false; $i = $i + 1) { //$withfiles only outputs files when true. when false, it will output files and folders. This is for the right-side of the page\n\t\tif ($i==0 && $directory != \"uploads/\" . $_SESSION[\"username\"]) { //when $i gets to its first iteration, output the \"back a directory\" folder\n\t\t\techo \"<div class='folderDiv'>\";\n\t\t\techo \"<div>\";\n\t\t\techo \"<input type='checkbox' class='modify' name='moveto[../]' form='moveto'>\";\n\t\t\techo \"<img src='Assets/SVG/folder.svg' class='foldersvg'/>\";\n\t\t\techo \"<input type='button' class='folderButton' value='../' name='directory[\" . $i . \"]'>\";\n\t\t\techo \"</div>\";\n\t\t\techo \"<p class='folderinfo'><b>Info</b>: Selecting this will move your selection back a folder.</p> \";\n\t\t\techo \"</div>\";\n\t\t}\n\t\t\n\t\tif (isset($scanned_directory[$i]) && is_dir($directory . \"/\" . $scanned_directory[$i])) { // Makes this a special dir box if an item is folder\n\t\t\techo \"<div class='folderDiv'>\";\n\t\t\techo \"<div>\";\n\t\t\techo \"<input type='checkbox' class='modify' name='moveto[\" . $scanned_directory[$i] . \"]' form='moveto'>\";\n\t\t\tif ($directory . \"/\" . $scanned_directory[$i] == \"uploads/\" . $_SESSION[\"username\"] . \"/Trash\") {\n\t\t\t\techo \"<img src='Assets/SVG/bin.svg' class='foldersvg'/>\";\n\t\t\t} else {\n\t\t\t\techo \"<img src='Assets/SVG/folder.svg' class='foldersvg'/>\";\n\t\t\t}\n\t\t\techo \"<input type='button' class='folderButton' value='\" . $scanned_directory[$i] . \"' name='directory[\" . $i . \"]'>\";\n\t\t\techo \"</div>\";\n\t\t\techo \"<p class='folderinfo'><b>Type</b>: Folder <b>Size</b>: \" . getfilesize($directory . \"/\" . $scanned_directory[$i], 1) . \" <b>Last Modified</b>: \" . date(\"F d Y H:i:s.\",filectime($directory. \"/\" . $scanned_directory[$i])) . \"</p> \";\n\t\t\techo \"</div>\";\n\t\t}\n\t}\n\n}", "title": "" }, { "docid": "f3dfe249ae0897570f8a71456a2e72dc", "score": "0.6209382", "text": "private function checkDir()\n {\n $this->init = $this->url[0].'/';\n\n for ($i=0; $i < $this->count; $i++) { \n if (is_dir($this->init)) {\n if ($i == 0) {\n $this->dir .= $this->init;\n } elseif (is_dir($this->dir.$this->url[$i])) {\n $this->dir .= $this->url[$i].'/';\n } else {\n $this->file = $this->url[$i];\n break;\n }\n } else {\n if ($i == 0) {\n $this->dir .= 'views/';\n }\n \n if (is_dir($this->dir.$this->url[$i])) {\n $this->dir .= $this->url[$i].'/';\n } else {\n $this->file = $this->url[$i];\n break;\n }\n \n }\n }\n\n $this->dir = str_replace(\"//\", \"/\", $this->dir);\n $this->checkFile();\n }", "title": "" }, { "docid": "72d341b60b52ec81d78bca4c496aa84c", "score": "0.61880565", "text": "private function fileSearchAux($dir, $pattern, &$files) {\n $handle = opendir($dir);\n if ($handle) {\n while (($file = readdir($handle)) !== false) {\n\n if ($file == '.' || $file == '..') {\n continue;\n }\n\n $filePath = $dir == '.' ? $file : $dir . '/' . $file;\n\n if (is_link($filePath)) {\n continue;\n }\n\n if (is_file($filePath)) {\n if (preg_match($pattern, $filePath)) {\n $files[] = $filePath;\n }\n }\n\n if (is_dir($filePath) && !$this->isBlacklisted($file)) {\n $this->fileSearchAux($filePath, $pattern, $files);\n }\n }\n closedir($handle);\n }\n }", "title": "" }, { "docid": "06dcef1d7ece2fe6b62ea7f2c79c1c24", "score": "0.61768216", "text": "private function scan_directory($dir, $scan = \"\", &$nb_files = 0, &$nb_errors = 0){\n\t\t//Si c est la ou on etait , alors on reprend\n\t\tif ($dir == $scan or $scan == \"\"){\n\t\t\t$scan = \"\";\n\t\t\tDB::delete(\"delete from movies where directory = ?\",array($dir));\n\t\t\t$files = scandir($dir);\n\t\t\tforeach ($files as $file){\n\t\t\t\tif ($file != \"..\" and $file != \".\"){\n\t\t\t\t\tif (is_dir($dir.\"/\".$file)){\n\t\t\t\t\t\t$this->scan_directory($dir.\"/\".$file, $scan, $nb_files, $nb_errors);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tforeach (config(\"app.MOVIES_FILES\") as $ext){\n\t\t\t\t\t\t\tif (stripos($file,\".\".$ext) !== false){\n\t\t\t\t\t\t\t\t//Analyse du fichier\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$movie = new Movie();\n\t\t\t\t\t\t\t\t//On rajoute le fichier en base\t\t\t\t\t\n\t\t\t\t\t\t\t\t$movie->directory = $dir;\n\t\t\t\t\t\t\t\t$movie->filename = $file;\n\t\t\t\t\t\t\t\t$movie->status = -1;\n\t\t\t\t\t\t\t\t$movie->save();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t$movie->name = $this->remove($file);\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$movie->status = 1;\n\t\t\t\t\t\t\t\t\t$movie->save();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$nb_files++;\n\t\t\t\t\t\t\t\t}catch(\\Exception $e){\n\t\t\t\t\t\t\t\t\t//Next...\n\t\t\t\t\t\t\t\t\t$nb_errors++;\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}\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$json = [];\n\t\t\t$json[\"updated\"] = date(\"Y-m-d H:i:s\");\n\t\t\t$json[\"nb_files\"] = $nb_files;\n\t\t\t$json[\"nb_errors\"] = $nb_errors;\n\t\t\t$json[\"scan\"] = $scan;\n\t\t\tfile_put_contents(storage_path().\"/scan_movies.txt\",json_encode($json));\n\t\t}else{\n\t\t\t//Sinon, on reparcourt a partir de l'endroit, ou on etait\n\t\t\t$files = scandir($dir);\n\t\t\tforeach ($files as $file){\n\t\t\t\tif ($file != \"..\" and $file != \".\"){\n\t\t\t\t\tif (is_dir($dir.\"/\".$file)){\n\t\t\t\t\t\t$this->scan_directory($dir.\"/\".$file, $scan, $nb_files, $nb_errors);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "32ff8ddd3749831057555441b5fb0443", "score": "0.61741906", "text": "function find_file ($dirname, $fname, &$file_path) {\n $dir = opendir($dirname);\n\n while ($file = readdir($dir)) {\n if (empty($file_path) && $file != '.' && $file != '..') {\n if (is_dir($dirname.'/'.$file)) {\n find_file($dirname.'/'.$file, $fname, $file_path);\n }\n else {\n if (file_exists($dirname.'/'.$fname)) {\n $file_path = $dirname.'/'.$fname;\n return;\n }\n }\n }\n }\n\n}", "title": "" }, { "docid": "21e96f760feea662b8067bad37173311", "score": "0.61588335", "text": "public function searchDir($dir) {\r\n\t\t$pages = array();\r\n\t\t// array to hold directories to recurse into\r\n\t\t$dirs = array();\r\n\t\t// mark this directory as seen so we don't look in it again\r\n\t\t$this->seen[realpath($dir)] = true;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tforeach(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir)) as $file) {\r\n\t\t\t\tif($file->isFile() && $file->isReadable() && (!isset($this->seen[$file->getPathname()]))) {\r\n\t\t\t\t\t/*mark this as seen so we skip it if we come to it again*/\r\n\t\t\t\t\t$this->seen[$file->getPathname()] = true;\r\n\t\t\t\t\t// load the contents of the file into $text\r\n\t\t\t\t\t$text = file_get_contents($file->getPathname());\r\n\t\t\t\t\t\r\n\t\t\t\t\t// if the search term is inside the body delimiters\r\n\t\t\t\t\tif(preg_match($this->bodyRegex, $text)) {\r\n\t\t\t\t\t\t/*construct the relative URI of the file by removing\r\n\t\t\t\t\t\tthe document root from the full path*/\r\n\t\t\t\t\t\t$uri = substr_replace($file->getPathname(), '', 0, strlen($_SERVER['DOCUMENT_ROOT']));\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// if the page has a title, find it\r\n\t\t\t\t\tif(preg_match('#<title>(.*?)</title>#Sis', $text, $match)) {\r\n\t\t\t\t\t\t// and add the title and URI to $pages\r\n\t\t\t\t\t\tarray_push($pages, array($uri, $match[1]));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tarray_push($pages, array($uri, $uri));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch(Exception $e) {\r\n\t\t\t// There was a problem opening the directory\r\n\t\t}\r\n\t\t\r\n\t\treturn $pages;\r\n\t}", "title": "" }, { "docid": "4b84ed0ea7cdff4e23e7715007afbb15", "score": "0.6145303", "text": "function parseDir($dir) {\r\n global $zoom;\r\n // start the scan...(open the local dir)\r\n $images = array();\r\n $handle = $zoom->platform->opendir($dir);\r\n while (($file = $zoom->platform->readdir($handle)) != false) {\r\n if ($file != \".\" && $file != \"..\") {\r\n $tag = ereg_replace(\".*\\.([^\\.]*)$\", \"\\\\1\", $file);\r\n $tag = strtolower($tag);\r\n if ($zoom->acceptableFormat($tag)) {\r\n // Tack it onto images...\r\n $images[] = $file;\r\n }\r\n }\r\n }\r\n $zoom->platform->closedir($handle);\r\n return $images;\r\n }", "title": "" }, { "docid": "a6631c83779b7c2c2fc7eba4e47235a6", "score": "0.6144309", "text": "private function listFolderFiles($dir = 'images/')\n {\n echo '<ol>';\n foreach (new \\DirectoryIterator($dir) as $fileInfo) {\n if (!$fileInfo->isDot()) {\n echo '<li>' . $fileInfo->getFilename();\n if ($fileInfo->isDir()) {\n self::listFolderFiles($fileInfo->getPathname());\n }\n echo '</li>';\n }\n }\n echo '</ol>';\n }", "title": "" }, { "docid": "0dd9c53e3740673e3124657da62c3e08", "score": "0.6139907", "text": "function searchFolder( $current_folder, $folder_to_find, &$matches )\n{\n if ( !( $handle = opendir( $current_folder ) ) ) die( \"Cannot open $current_folder.\" );\n\n while ( $entry = readdir( $handle ) ) {\n if ( is_dir( \"$current_folder/$entry\" ) ) {\n if ( $entry != \".\" && $entry != \"..\" ) {\n\n // This entry is a valid folder\n // If it matches our folder name, add it to the list of matches\n if ( $entry == $folder_to_find ) $matches[] = \"$current_folder/$entry\";\n\n // Search this folder\n searchFolder( \"$current_folder/$entry\", $folder_to_find, $matches );\n }\n }\n }\n closedir( $handle );\n}", "title": "" }, { "docid": "88aa0b18ec96ef9750effa61ef46904f", "score": "0.6124408", "text": "function open_and_scan($SCAN_DIRECTORY,$prev_files){\n\tglobal $files,$exempt_files,$prev_files,$exempt_directory;\n\t$changed_files = '';\n\t$file_details = stat($SCAN_DIRECTORY);\n\t$dt = array();\n\tforeach($file_details as $key=>$info){\n\t\t$dt[$key] = $info;\n\t}\n\t$data = array(\n\t\t'file'=>$SCAN_DIRECTORY,\n\t\t'info'=>$dt\n\t);\n\tarray_push($files,$data);\n\t$changed_files .= get_prev_stats($SCAN_DIRECTORY,$prev_files);\n\t\t\t\t\t\n\t$handle = opendir($SCAN_DIRECTORY);\n\twhile($f = readdir($handle)){\n\t\tif($f != '.' && $f != '..'){\n\t\t\tif(!is_dir($SCAN_DIRECTORY.$f)){\n\t\t\t\t$file_array = explode('.',$f);\n\t\t\t\t$count = count($file_array);\n\t\t\t\t$extension = $file_array[$count-1];\n\t\t\t\tif($count > 1 && !in_array($extension,$exempt_files)){\n\t\t\t\t\t$file_details = stat($SCAN_DIRECTORY.$f);\n\t\t\t\t\t$dt = array();\n\t\t\t\t\tforeach($file_details as $key=>$info){\n\t\t\t\t\t\t$dt[$key] = $info;\n\t\t\t\t\t}\n\t\t\t\t\t$data = array(\n\t\t\t\t\t\t'file'=>$SCAN_DIRECTORY.$f,\n\t\t\t\t\t\t'info'=>$dt\n\t\t\t\t\t);\n\t\t\t\t\tarray_push($files,$data);\n\t\t\t\t\t$changed_files .= get_prev_stats($SCAN_DIRECTORY.$f,$prev_files);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif(!in_array($f,$exempt_directory)){\n\t\t\t\t\topen_and_scan($SCAN_DIRECTORY.$f.'/',$prev_files);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn array(\n\t\t'changed'=>$changed_files,\n\t\t'files'=>$files\n\t);\n}", "title": "" }, { "docid": "8470bf2c1ca8fe41b01864b9c7d01d86", "score": "0.60972506", "text": "public function find($file);", "title": "" }, { "docid": "b95224b7a424e8786fd240c246db6e97", "score": "0.60947096", "text": "function include_dir($dir){\n if ( ( $dh = opendir( $dir ) ) !== false ){\n while ( ( $entry = readdir( $dh ) ) !== false ){\n if ( $entry != \".\" && $entry != \"..\" ){\n if ( is_file( $dir.$entry ) ){\n require_once ( $dir.$entry );\n }\n }\n }\n }else{\n echo \"BAD DIRECTORY\";\n }\n }", "title": "" }, { "docid": "2df3fe5355534da70241422b56e0c0d3", "score": "0.6090952", "text": "protected function getFilesInDirCreateTestDirectory() {}", "title": "" }, { "docid": "b98d1903fd63963e674a4f36be77b504", "score": "0.60867226", "text": "function load_files_from_dir($dir) {\n\n\t$catalog = opendir($dir);\n\n\twhile ($filename = readdir($catalog )) // перебираем наш каталог \n\t{\n\t\t\tif (getEndFile($filename) === 'functions.php') {\n\t\t\t\t$filename = $dir.'/'.$filename;\n\t\t\t\tinclude($filename); // один раз подрубаем, чтоб не повторяться \n\t\t\t}\n\t}\n\n\tclosedir($catalog);\n\n}", "title": "" }, { "docid": "82f19746f940d24e06bb3e8228f7ecee", "score": "0.6060214", "text": "static function AJAX_Scan() {\n\t\t$list = RecursiveScanDir(__DIR__);\n\t\tusort($list, \"strnatcasecmp\");\n\t\t\n\t\t// No files?\n\t\tif (!$list || !count($list)) die(\"No .php files located in this<br />folder and/or subfolders\");\n\t\t\n\t\t// For each file we'll present something nice\n\t\t$out = \"\";\n\t\tforeach($list as $file) {\n\t\t\t\n\t\t\t// If Mode is set to 1, we need to parse the file and check the completion\n\t\t\t$analysis = \"\";\n\t\t\tif ($_POST['Mode']) {\n\t\t\t\t$analysis = DocBlock::AnalyzeFile($file);\n\t\t\t}\n\t\t\t\n\t\t\t$out .= \"\n\t\t\t\t$analysis<a href='#' data-filename='\".rawurlencode($file).\"' class='filelink'>$file</a><br />\n\t\t\t\";\n\t\t}\n\t\t\n\t\t// Ouptut\n\t\techo $out;\n\t\t\n\t\t// Exit \"Gracefully\"\n\t\texit(0);\n\t}", "title": "" }, { "docid": "1df750092ca684a176f649399f6f3a5b", "score": "0.60561275", "text": "function read_folder_directory($dir)\r\n{\r\n $listDir = array();\r\n if($handler = opendir($dir)) {\r\n\t while (($sub = readdir($handler)) !== FALSE) {\t\t \r\n\t\t if ($sub != \".\" && $sub != \"..\" && $sub != \"Thumb.db\" && $sub != \"Thumbs.db\") {\r\n\t\t\tif(is_dir($dir.\"/\".$sub) && stripos($sub, 'google-maps')!== false){\r\n\t\t\t $listDir = $dir.\"/\".$sub;\r\n\t\t\t}\r\n\t\t }\r\n\t }\r\n\t closedir($handler);\r\n }\r\n return $listDir;\r\n}", "title": "" }, { "docid": "d3da9b5d0eee84251eb1f74ee451eba1", "score": "0.6040937", "text": "function dir_list($file)\n{\n $file_list = scandir($file);\n foreach($file_list as $item)\n {\n if($item == '.' || $item == '..')continue;\n \n $file_path = $file . '/' . $item;\n if(is_dir($file_path))\n {\n echo \"<font color='red'>$file_path</font><br/>\";\n dir_list($file_path);\n }\n else{\n echo $file_path . \"<br>\";\n }\n }\n}", "title": "" }, { "docid": "25c732bc8823b570e42e82edb2fb29e0", "score": "0.6039671", "text": "function getFiles($dir = \".\")\r\n{\r\n $files = array();\r\n if ($handle = opendir($dir)) {\r\n while (false !== ($item = readdir($handle))) {\r\n if (is_file(\"$dir/$item\")) {\r\n $files[] = \"$dir/$item\";\r\n } elseif (is_dir(\"$dir/$item\") && ($item != \".\") && ($item != \"..\")) {\r\n $files = array_merge($files, getFiles(\"$dir/$item\"));\r\n }\r\n }\r\n closedir($handle);\r\n }\r\n return $files;\r\n}", "title": "" }, { "docid": "9aa706ea7a17a6e13804b7dcd70fc156", "score": "0.60331845", "text": "public function browse_files()\n {\n // Scan file directory, render the images.\n if (is_dir($this->file_path)) {\n $files = preg_grep('/^([^.])/', scandir($this->file_path));\n return $files;\n }\n \n }", "title": "" }, { "docid": "d267e4ef92eb554c917059ef6ab7338d", "score": "0.6028441", "text": "static public function scan_dir($dir = '', $partial = '')\n\t\t{\n\t\t$d = dir($dir);\n\t\twhile ($file = $d->read())\n\t\t\t{\n\t\t\t$full = \"$dir/$file\";\n\t\t\tif (preg_match(\"/^\\./\", $file)) continue;\n\t\t\tif (is_dir($full)) self::scan_dir($full, $partial);\n\t\t\telse {\n\t\t\t\t$class = str_replace('.php', '', $full);\n\t\t\t\t$class = str_replace($partial, '', $class);\n\t\t\t\t$class = str_replace('/', '\\\\', $class);\n\n\t\t\t\tif ($class != \"\\\\Model\\\\Model\"\n\t\t\t\t\t&& strpos($class, 'Model') !== false\n\t\t\t\t\t&& class_exists($class)\n\t\t\t\t\t&& get_parent_class($class) == 'Model'\n\t\t\t\t\t) {\n\t\t\t\t\techo \"\\n\\nFound $class.\";\n\t\t\t\t\t$model = new $class();\n\t\t\t\t\t\\Model\\Create::create($model->my_table(), $model->my_columns());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "3cc746c5584d51d2a2c2c3162e17228e", "score": "0.60255265", "text": "function getFilesFromDir($dir) { \n\n $files = array(); \n if ($handle = opendir($dir)) { \n while (false !== ($file = readdir($handle))) { \n if ($file != \".\" && $file != \"..\") { \n if(is_dir($dir.'/'.$file)) { \n $dir2 = $dir.'/'.$file; \n $files[] = getFilesFromDir($dir2); \n } \n else { \n $files[] = $dir.'/'.$file; \n } \n } \n } \n closedir($handle); \n } \n\n return $files; \n}", "title": "" }, { "docid": "ba7e8580186d0aee5f54111f3bed2b5f", "score": "0.6022768", "text": "public static function findFiles($dir,$options=array())\n\t{\n\t\t$fileTypes=array();\n\t\t$exclude=array();\n\t\t$level=-1;\n\t\t$absolutePaths=true;\n\t\textract($options);\n\t\t$list=self::findFilesRecursive($dir,'',$fileTypes,$exclude,$level,$absolutePaths);\n\t\tsort($list);\n\t\treturn $list;\n\t}", "title": "" }, { "docid": "b891e97eb8762b52929236288d5cfbf6", "score": "0.60167366", "text": "function dir_enter($entry_dir='/', $depth=0)\r\n{\r\n\t$found = 0;\r\n\r\n\t# Remove the last trailing slash and void dual writing\r\n\t$entry_dir = preg_replace('/\\/$/i', '', $entry_dir);\r\n\r\n\t$skip_list = array(\r\n\t\t'.', # self\r\n\t\t'..', # parent\r\n\t);\r\n\r\n\tif($dir_handle = opendir($entry_dir))\r\n\t{\r\n\t\twhile(false !== ($filename = readdir($dir_handle)))\r\n\t\t{\r\n\t\t\tif(in_array($filename, $skip_list))\r\n\t\t\t{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$full_file_path = \"{$entry_dir}/{$filename}\";\r\n\t\t\t\r\n\t\t\tif(is_dir($full_file_path))\r\n\t\t\t{\r\n\t\t\t\t# Need to loop here inside the directory\r\n\r\n\t\t\t\tfecho(str_repeat(' ', $depth)); # depth marker\r\n\t\t\t\t#fecho(\"{$full_file_path}\");\r\n\t\t\t\tfecho(\"{$filename}\");\r\n\r\n\t\t\t\t\r\n\t\t\t\t# Recurse through the file\r\n\t\t\t\t$function = __FUNCTION__;\r\n\t\t\t\t$found += $function($full_file_path, $depth+1);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t#fecho(str_repeat(' ', $depth)); # depth marker\r\n\t\t\t\t#fecho(\"{$full_file_path}\");\r\n\t\t\t\t#fecho(\"{$filename}\");\r\n\r\n\t\t\t\t++$found;\r\n\t\t\t\tprocess_file($full_file_path, $depth);\r\n\t\t\t}\r\n\t\t}\r\n\t\tclosedir($dir_handle);\r\n\t}\r\n\t\r\n\treturn $found;\r\n}", "title": "" }, { "docid": "32e93ccb0cceeb0087c2d281c963523f", "score": "0.6011203", "text": "function _getFilesInDir($dir)\n {\n $files = array();\n if (!is_dir($dir)) {\n return $files;\n }\n \n $dh = dir( $dir );\n while ($entry = $dh->read()) {\n if ($entry == \".\" || $entry == \"..\") {\n continue;\n }\n if (is_readable($dir.\"/\".$entry)) {\n array_push($files,$entry);\n }\n }\n return $files;\n }", "title": "" }, { "docid": "2b2f0f35d856780f29e5fd60a52cf5f9", "score": "0.6008255", "text": "private function listFolderFiles($dir){\n $children = false;\n $isRoot = false;\n if($dir==$this->file_storage){\n $isRoot = true;\n }\n\n $folderName = $this->getFolderName($dir);\n if(!$isRoot){\n //$this->info('Directory Name: '.$folderName['child']);\n //$this->info('Parent Name: '.$folderName['parent']);\n }\n\n //$this->info('Folder: '.$dir);\n\n foreach (new \\DirectoryIterator($dir) as $fileInfo) {\n if (!$fileInfo->isDot()) {\n if ($fileInfo->isDir()) {\n $this->listFolderFiles($fileInfo->getPathname());\n }else{\n $rename = false;\n //$this->info('File: '.$fileInfo->getFilename());\n //$info = new SplFileInfo($dir.'/'.$fileInfo->getFilename());\n $ext = \".\".pathinfo($fileInfo->getFilename(), PATHINFO_EXTENSION);\n //$ext = \".\"$info->getExtension();\n //$this->info('File: extension '.$ext);\n $filebreak = str_replace($ext,\"\",$fileInfo->getFilename());\n if (strpos($filebreak, '.') !== false || strpos($filebreak, \"'\") !== false || strpos($filebreak, \"#\") !== false) {\n $rename = true;\n }\n if($rename){\n $replace = array(\".\", \"'\", \"#\", \";\", \"/\", \"?\", \":\", \"@\", \"=\", \"&\", \",\");\n //“;”, “/”, “?”, “:”, “@”, “=” and “&\n $fileraw = str_replace($replace,\" \",$filebreak);\n //$this->info('File: raw '.$fileraw);\n $newfilename = $fileraw . $ext;\n //$this->info('File: new '.$newfilename);\n $prod_filename = $newfilename;\n rename($dir.'/'.$fileInfo->getFilename(),$dir.'/'.$newfilename);\n }else{\n $prod_filename = $fileInfo->getFilename();\n }\n $this->checkFileExtension($dir.'/'.$prod_filename, $prod_filename, $dir);\n }\n $children = true;\n }else{\n $children = false;\n }\n }\n //$this->info('Children: '.$children);\n\n if(!$isRoot){\n $this->folders[$this->count]['name'] \t\t\t= $folderName['child'];\n $this->folders[$this->count]['parent'] \t\t= $folderName['parent'];\n $this->folders[$this->count]['full_path']\t= $dir;\n $this->folders[$this->count]['children']\t= $children;\n $this->count++;\n }\n //$this->info('#################');\n }", "title": "" }, { "docid": "20e25812f34406c97906542a0eba4740", "score": "0.60029066", "text": "private function listMyFolder($dir = APPPATH) {\n $ffs = scandir($dir);\n\n unset($ffs[array_search('.', $ffs, true)]);\n unset($ffs[array_search('..', $ffs, true)]);\n unset($ffs[array_search('.DS_Store', $ffs, true)]);\n unset($ffs[array_search('', $ffs, true)]);\n\n if (count($ffs) < 1) {\n return;\n }\n\n $ul = '<ul>';\n foreach ($ffs as $ff) {\n if (is_dir($dir . '/' . $ff)) {\n $ul .= '<li>';\n $ul .= $ff;\n $ul .= $this->listMyFolder($dir . '/' . $ff . \"/\");\n $ul .= '</li>';\n } else {\n // Search for color class\n switch ($ff) {\n case '.htaccess' :\n $class = 'text-default';\n break;\n case 'Buildigniter.php' :\n $class = 'text-danger';\n break;\n default :\n $class = 'text-info';\n break;\n }\n // Folder search\n if (strpos($dir . $ff, '_buildigniter')) {\n $class = 'text-danger';\n }\n $ul .= '<li class=\"' . $class . '\" data-jstree=\\'{\"icon\":\"fa fa-file\"}\\'>' . $ff . '</li>';\n }\n }\n $ul .= '</ul>';\n\n return $ul;\n }", "title": "" }, { "docid": "7c8348577333062ec62df05911e61f82", "score": "0.5998371", "text": "function getFiles(){\r\n\r\n global $dirPtr, $theFiles;\r\n \r\n chdir(\".\");\r\n $dirPtr = openDir(\".\");\r\n $currentFile = readDir($dirPtr);\r\n while ($currentFile !== false){\r\n $theFiles[] = $currentFile;\r\n $currentFile = readDir($dirPtr);\r\n } // end while\r\n \r\n}", "title": "" }, { "docid": "7109643f213c424fdb6897b137abf7a5", "score": "0.5997739", "text": "function scan_files( ){\n\n // List of all the audio files found in the directory and sub-directories\n $audioFileArray = array();\n\n // List of filenames already handled during the scan. To detect dupe filenames.\n $alreadyhandledFileArray = array();\n\n // Make list of all files in db to remove non existent files\n $DBaudioFileArray = array();\n foreach ( $this->get_list_of_files()->fetchAll() as $row ) {\n $DBaudioFileArray[] = $row['filename'];\n }\n\n // Prepare variables for file urls\n //$base_dir = dirname(dirname(realpath($this->filedirectorypath))); // Absolute path to your installation, ex: /var/www/mywebsite\n $doc_root = preg_replace(\"!{$_SERVER['SCRIPT_NAME']}$!\", '', $_SERVER['SCRIPT_FILENAME']); # ex: /var/www\n $protocol = empty($_SERVER['HTTPS']) ? 'http' : 'https';\n $port = $_SERVER['SERVER_PORT'];\n $disp_port = ($protocol == 'http' && $port == 80 || $protocol == 'https' && $port == 443) ? '' : \":$port\";\n $domain = $_SERVER['SERVER_NAME'];\n // variables for file urls\n\n // Create recursive dir iterator which skips dot folders\n $dir = new RecursiveDirectoryIterator( $this->filedirectorypath , FilesystemIterator::SKIP_DOTS);\n\n // Flatten the recursive iterator, consider only files, no directories\n $it = new RecursiveIteratorIterator($dir);\n\n // Find all the mp3 files\n foreach ($it as $fileinfo) {\n if ($fileinfo->isFile() && !strcmp($fileinfo->getExtension(), \"mp3\")) {\n $audioFileArray[] = $fileinfo;\n\n //Warning: files with same md5key in different folders will not be inserted into the db.\n //print md5_file($fileinfo) . \"<br />\\n\";\n }\n }\n\n foreach ($audioFileArray as $key => $fileinfo) {\n\n $filename = $fileinfo->getFilename();\n\n //For each file found on disk remove entry from list from DB\n // if any left at the end, they are files that no longer are present on the drive.\n //print \"unsetting: \" . $filename . \"<br>\";\n unset($DBaudioFileArray[array_search($filename,$DBaudioFileArray,true)]);\n\n // check file not in db\n if( !$this->is_file_in_db( $filename ) ) {\n\n //decode filename date if named according to our naming scheme\n $date = $this->decode_filename($filename);\n\n // Build file url based on server path\n $filepath = realpath($fileinfo->getRealPath());\n $base_url = preg_replace(\"!^{$doc_root}!\", '', $filepath); # ex: '' or '/mywebsite'\n $full_url = \"$protocol://{$domain}{$disp_port}{$base_url}\"; # Ex: 'http://example.com', 'https://example.com/mywebsite', etc.\n\n //print $filename . \" - \" . $full_url . \"<br />\\n\";\n\n //insert audiofile in db for first time\n $this->insert_new_file_into_db( $filename, $full_url, $fileinfo->getRealPath(), $fileinfo->getSize(), $date );\n\n $alreadyhandledFileArray[$key] = $filename;\n\n } else {\n // if file in alreadyhandled array, then duplicate named files have been found\n // how to check for duplicate file names?\n // if we're here then the name has already ben added to the db (but maybe during a previous run)\n //we still need to look for the file in the alreadyhandledFileArray\n if( in_array($filename, $alreadyhandledFileArray) ){\n // flag file\n $this->flag_file($filename, \"Il y a 2 ou plusieurs fichiers audio avec le même nom dans le dossier audio du serveur ftp. Veuillez changer les noms ou supprimer les doublons.\");\n }\n }\n\n\n }\n\n // If there are files from the database that weren't found in the audio folder,\n // flag them and add a comment stating that the file can no longer be found.\n if( count($DBaudioFileArray) ){\n //print_r($DBaudioFileArray);\n foreach($DBaudioFileArray as $key => $fn){\n $this->flag_file($fn, \"Le fichier en question n'est plus présent dans le dossier audio du serveur ftp. Il faut le supprimer de la base de données.\");\n $this->set_file_not_new($fn);\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "e09223d2a189d19a5e61a235b4ee6eed", "score": "0.59869635", "text": "function recurseFind($dir, $pattern, $depthRemaining )\n{\n\tglobal $filesep;\n\t$subFiles = array();\n\t$subDirs = array();\n\n\t$dh = opendir($dir);\n\twhile ( false != ($file = readdir($dh)) ) { \n\t\tif ( $file != '.' && $file != '..' ) {\n\n\t\t\t$fullFile = $dir . DIRECTORY_SEPARATOR . $file;\n\n\t\t\tif ( is_dir($fullFile) ) { \n\t\t\t\tarray_push($subDirs, $fullFile);\n\t\t\t} else {\n\t\t\t\tif ( preg_match($pattern, $fullFile) ) { \n\t\t\t\t\tarray_push($subFiles, $fullFile);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tclosedir($dh);\n\n\t// 2016-Aug-28 -- Limiting the recursion\n\tif ( $depthRemaining > 0 ) { \n\n\tforeach ( $subDirs as $subDir ) { \n\t\tforeach ( recurseFind($subDir, $pattern, $depthRemaining-- ) as $subsubFile ) {\n\t\t\tarray_push($subFiles, $subsubFile );\n\t\t}\n\t}\n\n\t}\n\n\treturn $subFiles;\n}", "title": "" }, { "docid": "ba73137731633c22b558cdfd8208feb2", "score": "0.5984054", "text": "public function load_files($dir = '') {\n $dir = trailingslashit($dir);\n if (!empty($dir) && is_dir($dir)) {\n if ($dh = opendir($dir)) {\n while (( $file = readdir($dh) ) !== false) {\n if (!in_array($file, array('.', '..')) && is_file($dir . $file) && 'php' == pathinfo($dir . $file, PATHINFO_EXTENSION)) {\n include_once( $dir . $file );\n }\n }\n closedir($dh);\n }\n }\n }", "title": "" }, { "docid": "48987e411102d8abd151e35de27e4032", "score": "0.5974875", "text": "function getDirContents($dir){\r\n foreach(scandir($dir) as $key => $value){\r\n print \"$value<BR>\";\r\n }\r\n\r\n\r\n }", "title": "" }, { "docid": "aab401080e050ad90780043285f3f127", "score": "0.5958412", "text": "function getFiles($dir)\r\n{\r\n\tglobal $types, $debug, $globalGetFiles;\r\n\tif ( !isset($globalGetFiles[$dir]) )\r\n\t{\r\n\t\t$dir = cleanPath($dir);\r\n\t\t$files = array();\r\n\t\t$list = array();\r\n\t\t\r\n\t\t// Loop through each of the files in this directory\r\n\t\t$files = glob($dir.'/*');\r\n\t\tforeach ( $files as $file )\r\n\t\t{\r\n\t\t\tif ( !empty($debug) && empty($log) )\r\n\t\t\t{\r\n\t\t\t\t$log = \"getFiles(\".$dir.\")\\n----------\\n\";\r\n\t\t\t}\r\n\t\t\t// Check each file against the list of types in config.php\r\n\t\t\tforeach ( $types as $type )\r\n\t\t\t{\r\n\t\t\t\t// Lower case the file extension to be sure\r\n\t\t\t\tif ( substr(strtolower($file),-3) == $type )\r\n\t\t\t\t{\r\n\t\t\t\t\t$list[] = $file;\r\n\t\t\t\t\tif ( !empty($debug) )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$log .= \"list[] = \".$file.\"\\n\";\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\tunset($files);\r\n\t\t// Alphabetize files in case insensitive order\r\n\t\tnatcasesort($list);\r\n\t\tif ( !empty($debug) )\r\n\t\t{\r\n\t\t\t$log .= \"\\n\";\r\n\t\t\tdebugLog($log);\r\n\t\t}\r\n\t\t$globalGetFiles[$dir] = $list;\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$list = $globalGetFiles[$dir];\r\n\t}\r\n\treturn $list;\r\n}", "title": "" }, { "docid": "0a2b60a5a180e0f08c72f62f0da62ed3", "score": "0.59416753", "text": "function loadFiles($folder){\n $files = scandir($folder);\n foreach ($files as $filename)\n {\n if($filename != \".\" && $filename != \"..\") {\n if (is_dir($filename)) {\n //handle nesting\n loadFiles($filename);\n } else {\n if (strpos($filename, '.php') !== false) {\n require $folder.\"/\".$filename;\n }\n }\n }\n\n }\n}", "title": "" }, { "docid": "9c1b6c5e74b35427dab4b318228e9151", "score": "0.59387976", "text": "function getFilesFromDir($dir) {\r\n $filesArray = scandir($dir);\r\n array_shift($filesArray);\r\n array_shift($filesArray);\r\n return $filesArray;\r\n}", "title": "" }, { "docid": "4c2cef6e0d82f239f282a87dbed50680", "score": "0.5921807", "text": "function CheckDir($dir, $startWith = '')\n{\n global $count;\n global $pruned;\n $count++;\n \n echo \"\\r$count ($pruned): Checking $dir \";\n \n $started = false;\n if( !strlen($startWith) )\n $started = true;\n\n // see if this is a directory we need to prune\n if( $started && is_dir(\"$dir/video_2\") )\n {\n PruneDir($dir);\n }\n else\n {\n // recurse into any directories\n $f = scandir($dir);\n foreach( $f as $file )\n {\n if( !$started && $file == $startWith )\n $started = true;\n \n if( $started && is_dir(\"$dir/$file\") && $file != '.' && $file != '..' )\n CheckDir(\"$dir/$file\");\n }\n unset($f);\n }\n}", "title": "" }, { "docid": "401e1b715366a28427d71d7bb9569f62", "score": "0.5917138", "text": "private function find_core_html_files($theme=false,$dir='')\n\t{\n\n\t\t$files = scandir('html/'.$dir);\n\t\t\n\t\tforeach($files as $file) \n\t\t{\n\n\t\t $dirfile = ($dir!='' ? $dir.'/' : '').$file;\n\t\t $fullpath = 'html/'.$dirfile;\n\n\t\t if(is_dir($fullpath) && $file[0]!='.') $this->find_core_html_files($theme,$dirfile);\n\n\t\t elseif(is_file($fullpath) && substr($fullpath,-5)=='.html') \n\t\t {\n\t\t // use theme override?\n\t\t if($theme && is_file('themes/'.$theme.'/'.$fullpath)) $fullpath = 'themes/'.$theme.'/'.$fullpath;\n\t\t // echo \"OB.UI.htmlCache['$dirfile'] = $.ajax({'url': '$fullpath', 'async': false}).responseText;\\n\";\n\t\t\t\t$this->html_data[$dirfile] = file_get_contents($fullpath);\n\t\t }\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "5906edd9e2e76eb61008814044c1e367", "score": "0.59150785", "text": "protected function _findConfigs()\n {\n foreach (new DirectoryIterator($this->_configPath) as $fileInfo) {\n if ($fileInfo->isDot()) {\n continue;\n }\n if ($fileInfo->isDir()) {\n continue;\n }\n if ($fileInfo->getExtension() !== 'xml') {\n continue;\n }\n\n $name = str_replace('.' . $fileInfo->getExtension(), '', $fileInfo->getFilename());\n $this->_configFiles[$name] = [\n 'name' => $name,\n 'basename' => $fileInfo->getBasename(),\n 'pathname' => $fileInfo->getPathname(),\n ];\n }\n }", "title": "" }, { "docid": "707bbc9af4d14388b8badb0e3ef99888", "score": "0.59150755", "text": "function check_dir($dir, $entity)\n{\n // Collect files and directories in these arrays\n $directories = [];\n $files = [];\n \n // Skip old and unused functions directories (theoretically\n // it should only be in the English tree, but we are smart\n // and check for other language trees too...)\n if (preg_match(\"!/([a-z]{2}|pt_BR)/functions!\", $dir)) {\n return;\n }\n \n // Open and traverse the directory\n $handle = @opendir($dir);\n while ($file = @readdir($handle)) {\n \n // Collect directories and XML files\n if ($file != 'CVS' && $file != '.' &&\n $file != '..' && is_dir($dir.$file)) {\n $directories[] = $file;\n }\n elseif (strstr($file, \".xml\")) {\n $files[] = $file;\n }\n\n }\n @closedir($handle);\n \n // Sort files and directories\n sort($directories);\n sort($files);\n \n // Files first...\n foreach ($files as $file) {\n check_file($dir.$file, $entity);\n }\n\n // then the subdirs\n foreach ($directories as $file) {\n check_dir($dir.$file.\"/\", $entity);\n }\n}", "title": "" }, { "docid": "dbd0c41ce6c84d95745c1f93a73f2e5b", "score": "0.5912574", "text": "function scanDir($cfg) //$view, $tdir , $subdir='', $match)\n {\n $ff = HTML_FlexyFramework::get();\n \n $subdir = $cfg['subdir'];\n $scandir = $cfg['tdir']. (empty($subdir) ? '' : '/') . $subdir;\n \n if (in_array($subdir, $cfg['skipdir'])) {\n return array();\n }\n // skip dom_templates\n \n if (!file_exists($scandir)) {\n return array();\n }\n $dh = opendir($scandir);\n if(!$dh){\n return array(); // something went wrong!?\n }\n $ret = array();\n \n while (($fn = readdir($dh)) !== false) {\n // do we care that it will try and parse the template directory??? - not really..\n // as we are only looking for php files..\n if(empty($fn) || $fn[0] == '.'){\n continue;\n }\n \n $fullpath = $scandir.(empty($scandir) ? '' : \"/\").$fn;\n // echo \"filename: $fullpath \\n\";\n \n if (is_link($fullpath)) {\n continue;\n }\n \n if(is_dir($fullpath)){\n // then recursively call self...\n $cfg['subdir'] = $subdir . (empty($subdir) ? '' : '/') . $fn;\n $children = $this->scanDir($cfg);\n if (count($children)) {\n $ret = array_merge($ret, $children);\n \n }\n continue;\n \n }\n \n if (!preg_match($cfg['match'], $fn) || !is_file($fullpath)) {\n continue;\n }\n \n \n \n $ret[] = $subdir . (empty($subdir) ? '' : '/'). $fn; /// this used to be strtolower?? why???\n\n \n \n }\n// print_r($ret);\n \n return $ret;\n \n \n \n \n }", "title": "" }, { "docid": "e7c4a3742e796be18d3a194284955302", "score": "0.59098774", "text": "function dirscan_files($rootFolder){\n $fileNames=[]; // will get filled\n foreach (scandir($rootFolder) as $name){\n if ($name=='.' || $name=='..') continue;\n if (!is_dir($rootFolder.\"/\".$name)) $fileNames[]=$name;\n }\n sort($fileNames);\n return $fileNames;\n}", "title": "" }, { "docid": "ff9adbcb48a57c1be88c805f555325a8", "score": "0.5907455", "text": "public abstract function dir();", "title": "" }, { "docid": "c67a6c18a5a473c8070c599998265cd7", "score": "0.5890564", "text": "function browse($dir) {\nglobal $filenames;\n if ($handle = opendir($dir)) {\n while (false !== ($file = readdir($handle))) {\n if ($file != \".\" && $file != \"..\" && is_file($dir.'/'.$file)) {\n $filenames[] = $dir.'/'.$file;\n }\n else if ($file != \".\" && $file != \"..\" && is_dir($dir.'/'.$file)) {\n browse($dir.'/'.$file);\n }\n }\n closedir($handle);\n }\n return $filenames;\n}", "title": "" }, { "docid": "c8e5323aabac4193ded746ae66b8d114", "score": "0.58886445", "text": "function buscar($dir,&$archivo_buscar) \n{ // Funcion Recursiva \n // Autor DeeRme \n // http://deerme.org \n if ( is_dir($dir) ) \n { \n // Recorremos Directorio \n $d=opendir($dir); \n while( $archivo = readdir($d) ) \n { \n if ( $archivo!=\".\" AND $archivo!=\"..\" ) \n { \n \n if ( is_file($dir.'/'.$archivo) ) \n { \n // Es Archivo \n if ( $archivo == $archivo_buscar ) \n { \n return ($dir.'/'.$archivo); \n } \n \n } \n \n if ( is_dir($dir.'/'.$archivo) ) \n { \n // Es Directorio \n // Volvemos a llamar \n $r=buscar($dir.'/'.$archivo,$archivo_buscar); \n if ( basename($r) == $archivo_buscar ) \n { \n return $r; \n } \n \n \n } \n \n \n \n \n \n } \n \n } \n \n } \n return FALSE; \n}", "title": "" }, { "docid": "6e3b85a51fb2f0ac84b278ef9a928c57", "score": "0.58868486", "text": "private function read_directory(){\n $rdi = new RecursiveDirectoryIterator(ABSPATH);\n $rii = new RecursiveIteratorIterator($rdi);\n foreach($rii as $name => $obj){\n $dir_file = $obj->getRealPath(); \n\n if( strcmp(str_replace(\"\\\\\", \"/\", $dir_file),str_replace(\"\\\\\", \"/\", MD5_HASHER_DIR.$this->file_check)) <> 0 \n && strcmp(str_replace(\"\\\\\", \"/\", $dir_file), str_replace(\"\\\\\", \"/\", MD5_HASHER_DIR.$this->file_change)) <> 0){\n\n if(is_readable($dir_file)){\n $hash_key = @md5_file($dir_file);\n $this->md5_gen_output[$dir_file] = array(\n 'md5' => $hash_key,\n 'filename' => $obj->getFilename(),\n 'real_path' => $dir_file\n );\n\n $file_ext = substr(strrchr($obj->getFilename(),'.'),1);\n\n if(!isset($this->md5_gen_old[$dir_file]->md5)){\n // new file\n $this->md5_changed_output[$dir_file] = array(\n 'md5' => $hash_key,\n 'ext' => $file_ext,\n 'filename' => $obj->getFilename(),\n 'real_path' => $dir_file,\n 'modified' => 'new'\n );\n }else if($this->md5_gen_old[$dir_file]->md5 !== $this->md5_gen_output[$dir_file]['md5']){\n // modified file\n $this->md5_changed_output[$dir_file] = array(\n 'md5' => $hash_key,\n 'ext' => $file_ext,\n 'filename' => $obj->getFilename(),\n 'real_path' => $dir_file,\n 'modified' => 'edited'\n ); \n }\n }\n }\n }\n }", "title": "" }, { "docid": "b032e053c7d99fed3d7e6d46a2942d47", "score": "0.587329", "text": "function GetContents($dir,$files=array()) \n{\n if(!($res=opendir($dir))) exit(\"$dir doesn't exist!\");\n while(($file=readdir($res))==TRUE) \n if($file!=\".\" && $file!=\"..\")\n if(is_dir(\"$dir/$file\")) $files=GetContents(\"$dir/$file\",$files);\n else array_push($files,\"$dir/$file\");\n \n closedir($res);\n return $files;\n}", "title": "" }, { "docid": "61748ac9197d2625ef883d227115fabf", "score": "0.5867992", "text": "function l10n_drupal_files_scan($source = NULL, $automated = FALSE) {\n\n // We look for projects in the working directory.\n $workdir = variable_get('l10n_server_connector_l10n_drupal_files_directory', '');\n\n if (!is_dir($workdir)) {\n drupal_set_message(t('The configured directory (%workdir) cannot be found. <a href=\"@configure\">Check your configuration</a>.', array('%workdir' => $workdir, '@configure' => url('admin/l10n_server/connectors/config/l10n_drupal/files'))));\n }\n else {\n // define a list of allowed extensions, we will use it later on file_scan_directory\n // and further regular expression buildung processing. Thanks to EugenMayer\n $allowed_file_extensions = array('.tar.gz', '.tgz');\n // build the regular expression\n foreach($allowed_file_extensions as $key => $extension) {\n // escape the file extensions for later regular expression usage\n $allowed_file_extensions[$key] = preg_quote($extension);\n }\n $file_extension_pattern = '(' . implode('|', $allowed_file_extensions) . ')$';\n\n // Packages are always .tar.gz files.\n $files = file_scan_directory($workdir, $file_extension_pattern);\n if (count($files)) {\n foreach ($files as $path => $file) {\n\n if (!l10n_drupal_is_supported_version($path)) {\n // Skip files for unsupported versions.\n continue;\n }\n\n // Get rid of $workdir prefix on file names, eg.\n // drupal-6.x-6.19.tar.gz\n // Drupal/drupal-4.6.7.tar.gz or\n // files/Ubercart/ubercart-5.x-1.0-alpha8.tar.gz.\n $path = $package = trim(preg_replace('!(^' . preg_quote($workdir, '!') . ')(.+)\\.tar\\.gz!', '\\2', $path), '/');\n\n // split the filename into parts to $filename_splitted\n // [0] = the full string\n // [1] = the subdirectory and filename with extension\n // [1] = the subdirectory and filename without extension\n // [2] = the extension .tar.gz or .tgz\n $file_splitted = array(); // ensure to be a array....\n // the regular expression pattern (i put it in a var because i can better handle it with dpm for debugging, move if you want...)\n $file_split_pattern = '!^'. preg_quote($workdir, '!') .'((.+)'. $file_extension_pattern .')!';\n preg_match( $file_split_pattern, $path, $file_splitted );\n // put the result in vars for better handling\n list($file_fullpath, $file_subpath_ext, $file_subpath, $file_extension) = $file_splitted;\n\n // redefine the path to subpath without slash at beginning\n $path = trim($file_subpath, '/');\n // same on package\n $package = trim($file_subpath, '/');\n $project_title = '';\n if (strpos($path, '/')) {\n // We have a slash, so this package is in a subfolder.\n // Eg. Drupal/drupal-4.6.7 or Ubercart/ubercart-5.x-1.0-alpha8.\n // Grab the directory name as project title.\n list($project_title, $package) = explode('/', $path);\n }\n if (strpos($package, '-')) {\n // Only remaining are the project uri and release,\n // eg. drupal-4.6.7 or ubercart-5.x-1.0-alpha8.\n list($project_uri, $release_version) = explode('-', $package, 2);\n\n l10n_drupal_save_data($project_uri, ($project_title ? $project_title : $project_uri), $release_version, trim($file_subpath_ext, '/'), filemtime($file->filename));\n }\n else {\n // File name not formatted properly.\n $result['error'] = t('File name should have project codename and version number included separated with hyphen, such as drupal-5.2.tar.gz.');\n }\n }\n }\n }\n\n $user_feedback = FALSE;\n $results = db_query_range(\"SELECT * FROM {l10n_server_release} WHERE pid IN (SELECT pid FROM {l10n_server_project} WHERE connector_module = 'l10n_drupal_files' AND status = 1) ORDER BY last_parsed ASC\", 0, variable_get('l10n_server_connector_l10n_drupal_files_limit', 1));\n while ($release = db_fetch_object($results)) {\n\n // Only parse file if something changed since we last parsed it.\n $file_name = $workdir . '/' . $release->download_link;\n\n if (file_exists($file_name)) {\n if (filemtime($file_name) > $release->last_parsed) {\n $result = l10n_drupal_parse_package($file_name, $release);\n\n // User feedback, if not automated. Log messages are already done.\n if (isset($result['error']) && !$automated) {\n $user_feedback = TRUE;\n drupal_set_message($result['error'], 'error');\n }\n elseif (isset($result['message']) && !$automated) {\n $user_feedback = TRUE;\n drupal_set_message($result['message']);\n }\n }\n else {\n if (!$automated) {\n $user_feedback = TRUE;\n drupal_set_message(t('@release was already parsed, no need to scan again.', array('@release' => $release->download_link)));\n }\n }\n }\n // Hackish update of last parsed time so other tarballs will get into the queue too.\n // @todo: work on something better for this.\n db_query(\"UPDATE {l10n_server_release} SET last_parsed = %d WHERE rid = %d\", time(), $release->rid);\n }\n if (!$automated && !$user_feedback) {\n drupal_set_message(t('No (new) local Drupal files found to scan in %workdir.', array('%workdir' => $workdir)));\n }\n\n // Ensure that a Drupal page will be displayed with the messages.\n return '';\n}", "title": "" }, { "docid": "9e2293bb395d0dd0c14c04576fb4b258", "score": "0.58646417", "text": "function collect_files($folder, &$files) {\n $dir_content = glob(\"$folder/*\");\n foreach ($dir_content as $file) {\n if (is_dir($file) && $file != \".\" && $file != \"..\") {\n collect_files($file, $files);\n } elseif (is_file($file)) {\n $files[] .= $file;\n }\n }\n }", "title": "" }, { "docid": "942c24f76ba1c1d9e9427971dd5b789c", "score": "0.5848702", "text": "public function scanSourceFolders() {\n $this->addons = [];\n foreach ($this->sources as $sourceDir) {\n $this->scanSource($sourceDir);\n }\n }", "title": "" }, { "docid": "15cc8e1cf9fa7654be86e51c1ad5bb16", "score": "0.5845656", "text": "private function scanDir(string $path, array &$files, bool $recursion = false): void\n {\n $handler = opendir($path);\n\n while ($item = readdir($handler)) {\n if (in_array($item, ['.', '..'])) {\n continue;\n }\n\n $itemPath = sprintf('%s/%s', $path, $item);\n\n if (is_file($itemPath)) {\n $files[] = $itemPath;\n continue;\n }\n\n if ($recursion && is_dir($itemPath)) {\n $this->scanDir($itemPath, $files, $recursion);\n }\n }\n }", "title": "" }, { "docid": "2f3f9a5cc5950dee02a609cf5b0986da", "score": "0.5845103", "text": "function scan_directory_recursively($directory, $filter=FALSE)\n{\n\tif(substr($directory,-1) == '/')\n\t{\n\t\t$directory = substr($directory,0,-1);\n\t}\n\tif(!file_exists($directory) || !is_dir($directory))\n\t{\n\t\treturn FALSE;\n\t}elseif(is_readable($directory))\n\t{\n\t\t$directory_list = opendir($directory);\n\t\twhile($file = readdir($directory_list))\n\t\t{\n\t\t\tif($file != '.' && $file != '..' && $file != '.DS_Store' && $file != '.svn')\n\t\t\t{\n\t\t\t\t$path = $directory.'/'.$file;\n\t\t\t\tif(is_readable($path))\n\t\t\t\t{\n\t\t\t\t\t$subdirectories = explode('/',$path);\n\t\t\t\t\tif(is_dir($path))\n\t\t\t\t\t{\n\t\t\t\t\t\t$directory_tree[] = array(\n\t\t\t\t\t\t\t'path' => $path,\n\t\t\t\t\t\t\t'name' => end($subdirectories),\n\t\t\t\t\t\t\t'modified'\t=> filemtime($path),\n\t\t\t\t\t\t\t'kind' => 'directory',\n\t\t\t\t\t\t\t'content' => scan_directory_recursively($path, $filter));\n\t\t\t\t\t}elseif(is_file($path))\n\t\t\t\t\t{\n\t\t\t\t\t\t$extension = end(explode('.',end($subdirectories)));\n\t\t\t\t\t\tif($filter === FALSE || $filter == $extension)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Get metadata and image dimensions\n\t\t\t\t\t\t\t$size = getimagesize($path, $info);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Get containing directory of file\n\t\t\t\t\t\t\t$directory_array = explode('/', $path);\n\t\t\t\t\t\t\t$parent_folder = min($directory_array);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Reset title, caption, tags\n\t\t\t\t\t\t\t$title = $caption = $taglist = $tags = '';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$directory_tree[] = array(\n\t\t\t\t\t\t\t'path'\t\t=> dirname($path),\n\t\t\t\t\t\t\t'group'\t\t=> $parent_folder,\n\t\t\t\t\t\t\t'file'\t\t=> end($subdirectories),\n\t\t\t\t\t\t\t'extension' => $extension,\n\t\t\t\t\t\t\t'size'\t\t=> filesize($path),\n\t\t\t\t\t\t\t'width'\t\t=> $size[0],\n\t\t\t\t\t\t\t'height'\t=> $size[1],\n\t\t\t\t\t\t\t'modified'\t=> filemtime($path),\n\t\t\t\t\t\t\t'title'\t\t=> $title,\n\t\t\t\t\t\t\t'caption'\t=> $caption,\n\t\t\t\t\t\t\t'tags'\t\t=> $tags,\n\t\t\t\t\t\t\t'kind'\t\t=> 'file');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tclosedir($directory_list); \n\t\treturn $directory_tree;\n\t}else{\n\t\treturn FALSE;\t\n\t}\n}", "title": "" }, { "docid": "6357ae40a21d5e8853f3938174cbd648", "score": "0.5835524", "text": "function locateImportFiles($a_dir)\n\t{\n\t\tif (!is_dir($a_dir) || is_int(strpos($a_dir, \"..\")))\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t$importDirectory = \"\";\n\t\t$xmlFile = \"\";\n\n\t\t$current_dir = opendir($a_dir);\n\t\t$files = array();\n\t\twhile($entryname = readdir($current_dir))\n\t\t{\n\t\t\t$files[] = $entryname;\n\t\t}\n\n\t\tforeach($files as $file)\n\t\t{\n\t\t\tif(is_dir($a_dir.\"/\".$file) and ($file != \".\" and $file!=\"..\"))\n\t\t\t{\n\t\t\t\t// found directory created by zip\n\t\t\t\t$importDirectory = $a_dir.\"/\".$file;\n\t\t\t}\n\t\t}\n\t\tclosedir($current_dir);\n\t\tif (strlen($importDirectory))\n\t\t{\n\t\t\t// find the xml file\n\t\t\t$current_dir = opendir($importDirectory);\n\t\t\t$files = array();\n\t\t\twhile($entryname = readdir($current_dir))\n\t\t\t{\n\t\t\t\t$files[] = $entryname;\n\t\t\t}\n\t\t\tforeach($files as $file)\n\t\t\t{\n\t\t\t\tif(@is_file($importDirectory.\"/\".$file) && ($file != \".\" && $file!=\"..\") && (ereg(\"^[0-9]{10}_{2}[0-9]+_{2}(svy_)*[0-9]+\\.[a-z]{1,3}\\$\", $file) || ereg(\"^[0-9]{10}_{2}[0-9]+_{2}(survey__)*[0-9]+\\.[a-z]{1,3}\\$\", $file)))\n\t\t\t\t{\n\t\t\t\t\t// found xml file\n\t\t\t\t\t$xmlFile = $importDirectory.\"/\".$file;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn array(\"dir\" => $importDirectory, \"xml\" => $xmlFile);\n\t}", "title": "" }, { "docid": "fbde33345ce1fe9af7e05b3b5e0588ce", "score": "0.582457", "text": "function _require_all( $dir ) {\n\t$scan = glob( \"$dir/*\" );\n\tforeach ( $scan as $path ) {\n\t\tif ( preg_match( '/\\.php$/', $path ) ) {\n\t\t\trequire_once $path;\n\t\t} elseif ( is_dir( $path ) ) {\n\t\t\t_require_all( $path );\n\t\t}\n\t}\n}", "title": "" }, { "docid": "4825ba121ca979eba348e4c8a2476391", "score": "0.5797862", "text": "protected function _readDirectoryRecursive($content_dir) {\n\t\t$Found = array();\n\t\t$content_dir = rtrim($content_dir, '/') . '/';\n\t\tif(is_dir($content_dir)) {\n\t\t\ttry {\n\t\t\t\t$Resource = opendir($content_dir);\n\t\t\t\twhile(false !== ($Item = readdir($Resource))) {\n\t\t\t\t\t$preg_result = array();\n\t\t\t\t\tif($Item == \".\" || $Item == \"..\" || preg_match_all('/^[\\.-]+.*$/i', $Item, $preg_result, PREG_SET_ORDER) > 0) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif(is_dir($content_dir . $Item)) {\n\t\t\t\t\t\t$Found[] = $content_dir . $Item;\n\t\t\t\t\t\t$Found[] = $this->_readDirectoryRecursive($content_dir . $Item);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$Found[] = $content_dir . $Item;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch(Exception $e) {}\t\t\n\t\t}\n\t\treturn $Found;\t\t\n\t}", "title": "" }, { "docid": "f221e1378a20d8453a8c991ee02e12a6", "score": "0.57910466", "text": "static public function searchFirst($dirList)\n {\n if (!is_array($dirList))\n {\n $dirList = array($dirList);\n }\n\n // this is what we'll be adding to the search path when we're done\n $searchPathList = array();\n\n // iterate through the list of folders\n foreach ($dirList as $dir)\n {\n // get the absolute path\n $dir = realpath($dir);\n\n // remove the folder if it is already in the search list\n static::dontSearchIn($dir);\n\n // add it to the end of the new list\n $searchPathList[] = $dir;\n }\n\n // add the new list to the front of the path\n set_include_path(implode(PATH_SEPARATOR, $searchPathList) . PATH_SEPARATOR . get_include_path());\n }", "title": "" }, { "docid": "78fcf7d6b957419a18592c957a5bbf94", "score": "0.57901585", "text": "protected function _Recusive_Load_Dir($dir) {\r\n if (!is_dir($dir)) { return; }\r\n // Load each of the field shortcodes\r\n foreach (new DirectoryIterator($dir) as $FileInfo) {\r\n // If this is a directory dot\r\n if ($FileInfo->isDot()) { continue; }\r\n // If this is a directory\r\n if ($FileInfo->isDir()) { \r\n // Load the directory\r\n $this->_Recusive_Load_Dir($FileInfo->getPathname());\r\n } // Otherwise load the file\r\n else {\r\n // If this is not false\r\n if (stripos($FileInfo->getFilename(),'.tpl') !== false) { continue; } \r\n // If this is not false\r\n if (stripos($FileInfo->getFilename(),'.php') === false) { continue; } \r\n // Include the file\r\n require_once($FileInfo->getPathname());\r\n }\r\n }\r\n }", "title": "" }, { "docid": "9c99334d50c88f498652fabf78c6e657", "score": "0.577457", "text": "protected function listFiles($dir) {\n $dir = file_stream_wrapper_uri_normalize($dir);\n $files = array();\n if ($items = scandir($dir)) {\n foreach ($items as $item) {\n if (is_file(\"$dir/$item\")) {\n $files[] = \"$dir/$item\";\n }\n }\n }\n return $files;\n }", "title": "" }, { "docid": "80b3ac0be240777d3a0bc48d1debb6e0", "score": "0.57729226", "text": "public static function find_file($dir, $file, $ext = NULL)\n\t{\n\t\tif (self::$profile === TRUE AND class_exists('Profiler', FALSE))\n\t\t{\n\t\t\t// Start a new benchmark\n\t\t\t$benchmark = Profiler::start(__CLASS__, __FUNCTION__);\n\t\t}\n\n\t\t// Use the defined extension by default\n\t\t$ext = ($ext === NULL) ? EXT : '.'.$ext;\n\n\t\t// Create a partial path of the filename\n\t\t$path = $dir.'/'.$file.$ext;\n\n\t\tif ($dir === 'config' OR $dir === 'i18n')\n\t\t{\n\t\t\t// Include paths must be searched in reverse\n\t\t\t$paths = array_reverse(self::$_paths);\n\n\t\t\t// Array of files that have been found\n\t\t\t$found = array();\n\n\t\t\tforeach ($paths as $dir)\n\t\t\t{\n\t\t\t\tif (is_file($dir.$path))\n\t\t\t\t{\n\t\t\t\t\t// This path has a file, add it to the list\n\t\t\t\t\t$found[] = $dir.$path;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// The file has not been found yet\n\t\t\t$found = FALSE;\n\n\t\t\tforeach (self::$_paths as $dir)\n\t\t\t{\n\t\t\t\tif (is_file($dir.$path))\n\t\t\t\t{\n\t\t\t\t\t// A path has been found\n\t\t\t\t\t$found = $dir.$path;\n\n\t\t\t\t\t// Stop searching\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (isset($benchmark))\n\t\t{\n\t\t\t// Stop the benchmark\n\t\t\tProfiler::stop($benchmark);\n\t\t}\n\n\t\treturn $found;\n\t}", "title": "" } ]
c3741ab060552932b654a89091fabd16
Method returns the current table id
[ { "docid": "71fd950f5f95b65b9840ab1196524567", "score": "0.0", "text": "public function getId() {\n\t\treturn $this->_id;\n }", "title": "" } ]
[ { "docid": "eea6671634997fac34292518d4a0c4ee", "score": "0.8263912", "text": "public function getTableId()\n {\n return $this->table_id;\n }", "title": "" }, { "docid": "70ae5225481dc6cce6b40751bacc4951", "score": "0.8195715", "text": "public function getTableid()\n {\n return $this->tableid;\n }", "title": "" }, { "docid": "74bf5140bb7a0c1188ab84c6ee187716", "score": "0.789422", "text": "public function getId()\n {\n return $this->table->id;\n }", "title": "" }, { "docid": "51987a30c2a32e8fe544461d191549e6", "score": "0.74583006", "text": "final public function getTableId(): string\n\t{\n\t\treturn (string) self::$tableId;\n\t}", "title": "" }, { "docid": "c0fa6014ae69de4b1f2ebeedafd814d9", "score": "0.728362", "text": "public static function getTablePk ()\n {\n $className = get_called_class();\n\n return $className::$_pk;\n }", "title": "" }, { "docid": "dae8ffeea9afb7b24ae1017be1df8758", "score": "0.70361835", "text": "abstract public function getPrimaryKey($table);", "title": "" }, { "docid": "750a6d8af63bf55add2284d3068b36da", "score": "0.6949183", "text": "public function getPrimaryKey() {\n\t\treturn $this->tdbmService->getPrimaryKeyStatic($this->db_table_name);\n\t}", "title": "" }, { "docid": "b4be6d509362792f88f48dba1f0cc093", "score": "0.69363075", "text": "public function getTable()\n {\n return $this->modelId;\n }", "title": "" }, { "docid": "b0125f9e5ca444902d4da7ce6251a571", "score": "0.6919789", "text": "function getCurrentId(){\n\t\treturn $this->id;\n\t}", "title": "" }, { "docid": "242ecf57d0fd4505e306d633bf94c185", "score": "0.68943244", "text": "public function getPrimaryKey() {\n\t\treturn $this->sTableIndex;\n\t}", "title": "" }, { "docid": "4d0eff2b6c2ab4c9b0e7eea53084bb94", "score": "0.68930745", "text": "function table($id) {\n return $id;\n}", "title": "" }, { "docid": "de2a0bd7c94f25a213bc03d14984e294", "score": "0.68838423", "text": "static public function getCurrentTabId()\n\t{\n $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('\n SELECT `id_tab` FROM `'._DB_PREFIX_.'tab` WHERE LOWER(class_name)=\\''.pSQL(Tools::strtolower(self::exfeaturesMap(Tools::getValue('tab')))).'\\'\n ');\n if ($result)\n\t\t \treturn $result['id_tab'];\n \t\treturn -1;\n\t}", "title": "" }, { "docid": "7f95b1aad4316707b9690bbabb0ecfcd", "score": "0.6818406", "text": "public function GetKey( ) : string {\n \n // easy done as table names are unique in the database/schema\n \n return $this->m_table_name;\n \n }", "title": "" }, { "docid": "a035b7290afd2f5a953a161977d9bcf6", "score": "0.681501", "text": "private function _key()\n {\n return (static::$_table . ':' . $this->_id);\n }", "title": "" }, { "docid": "9f22d63bca1fe01928555136bf1c3ab2", "score": "0.67025757", "text": "function get_table()\n\t{\n\t\treturn $this->table_name;\n\t}", "title": "" }, { "docid": "0ec140355cb81eaac8970ed046e9b749", "score": "0.6696216", "text": "public function getPrimaryKey() {\n \n \n return strtolower($this->table).\"_id\";\n \n /*\n $sql = \"SELECT k.column_name \n FROM information_schema.table_constraints t \n JOIN information_schema.key_column_usage k \n USING(constraint_name,table_schema,table_name) \n WHERE t.constraint_type='PRIMARY KEY'\n AND t.table_schema='{$this->database}'\n AND t.table_name='{$this->table}'\";\n\n $pkStmt = $this->dbh->query($sql);\n $row = $pkStmt->fetch(PDO::FETCH_ASSOC);\n\n return $row['column_name'];\n */\n }", "title": "" }, { "docid": "f3214a3f28e4746af0643af58401ee3a", "score": "0.66704583", "text": "function &CurrentTable() {\n\treturn $GLOBALS[\"Table\"];\n}", "title": "" }, { "docid": "9ca35ece4b040904b9faa40259b5b68d", "score": "0.666921", "text": "function getCurrentMasterTable() {\n\t\treturn @$_SESSION[EW_PROJECT_NAME . \"_\" . $this->TableVar . \"_\" . EW_TABLE_MASTER_TABLE];\n\t}", "title": "" }, { "docid": "7dab167bf8e463622cd2b12f9307483c", "score": "0.6645267", "text": "public static function getTableName() {\n return self::$TABLE;\n }", "title": "" }, { "docid": "c58fc242a6e9deb93ace75512a308686", "score": "0.66317004", "text": "function get_table_name ()\r\n {\r\n return $this->table_name;\r\n }", "title": "" }, { "docid": "a8a09088c0780b430076802b2be5726a", "score": "0.66256523", "text": "function get_table_name(){\n\t\treturn $this->table_name;\n\t}", "title": "" }, { "docid": "78d053e85d8b3dd845814dee71522e5a", "score": "0.6615995", "text": "public function getPrimaryKey($tableName){\n\n\t}", "title": "" }, { "docid": "b6098fe6900d80ae9905affc867b33c2", "score": "0.65871185", "text": "public static function getCurrentId()\n\t{\n\t\t$context = \\Bitrix\\Main\\Application::getInstance()->getContext();\n\t\t$server = $context->getServer();\n\n\t\t$res = self::getList(array(\n\t\t\t'filter' => array(\n\t\t\t\t'=ACTIVE' => 'Y',\n\t\t\t\t'DOMAIN' => $server->getServerName()\n\t\t\t)\n\t\t));\n\t\tif ($row = $res->fetch())\n\t\t{\n\t\t\treturn $row['ID'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn self::createDefault();\n\t\t}\n\t}", "title": "" }, { "docid": "d2024a7b24f7e7a5c311e978c6e924f2", "score": "0.6585514", "text": "function getCurrentDetailTable() {\r\n\t\treturn @$_SESSION[EW_PROJECT_NAME . \"_\" . $this->TableVar . \"_\" . EW_TABLE_DETAIL_TABLE];\r\n\t}", "title": "" }, { "docid": "3c1797af4c232599da08ccd52bb6ff2b", "score": "0.6584438", "text": "function getCurrentDetailTable() {\n\t\treturn @$_SESSION[EW_PROJECT_NAME . \"_\" . $this->TableVar . \"_\" . EW_TABLE_DETAIL_TABLE];\n\t}", "title": "" }, { "docid": "15bf0b712ec8bd0622fcc951c5d36655", "score": "0.6582073", "text": "static public function getTableName()\n {\n return self::$tableName;\n }", "title": "" }, { "docid": "a04e069258edd5f17771225cd26ec559", "score": "0.65808964", "text": "public function getCurrentId(): int\n {\n return self::$current['id'];\n }", "title": "" }, { "docid": "bde916ef001f38f6dfc7292ddde1697e", "score": "0.65730226", "text": "function get_table()\n\t\t{\n\t\t\n\t\t\t return $this->table;\n\t\t\n\t\t}", "title": "" }, { "docid": "4a8976796c7d82ab7b7a1fd4b459646c", "score": "0.65693307", "text": "function getTableName(){\n\t\t$tbl = $this->_tbl;\n\t\treturn $tbl;\n\t}", "title": "" }, { "docid": "12b582434e9d34d6b0dea03be3f8a6ca", "score": "0.6563972", "text": "function activeTabID()\n {\n if (!$this->activeTab) return NULL;\n return $this->activeTab->id();\n }", "title": "" }, { "docid": "85ec114979684aa38babc32d2f3f3658", "score": "0.6553462", "text": "public function table() {\n\t\t\treturn $this->table;\n\t\t}", "title": "" }, { "docid": "24a6acaeeb60b8b37976aaeae397d37d", "score": "0.6549527", "text": "public function getIdTabela() {\n return $this->idTabela;\n }", "title": "" }, { "docid": "b88bc026ecfc93e5e298e4b17aa745b0", "score": "0.65488636", "text": "function getTableName()\n\t{\n\t\treturn $this->_tbl;\n\t}", "title": "" }, { "docid": "c0a3d60d4410447bd0fade1dad079ccf", "score": "0.65476847", "text": "protected function getTable() {\n\t\treturn self::DB_TABLE;\n\t}", "title": "" }, { "docid": "ad7f21cab4a1404a87af24feeac48a35", "score": "0.6529162", "text": "public function table()\n {\n return $this->table;\n }", "title": "" }, { "docid": "f29d4e6b0b1be0de1f8010318cb79cac", "score": "0.65169483", "text": "public function table() {\n return $this->table;\n }", "title": "" }, { "docid": "841a45ce3c2b105bfe70d8a571e8aebe", "score": "0.6488393", "text": "function getMetaId(){\n if( $this->metaid != 0 ) return $this->metaid;\n if( !isset( $this->db ) ) $this->db = new $this->dbclass;\n $sql = \"SELECT * FROM model WHERE name = '\".$this->tablename.\"'\";\n $this->db->query( $sql );\n if( $this->db->numrows > 0 ){\n $row = $this->db->fetchRow();\n $this->metaid = $row[\"id\"];\n }\n return $this->metaid;\n }", "title": "" }, { "docid": "3845981b4f1991c988e34f07eb63d302", "score": "0.6471296", "text": "abstract public function GetTablePrimaryKey( $sTableName );", "title": "" }, { "docid": "4d56cbea6c6f1b202d812468e13af99a", "score": "0.6458661", "text": "function getPrimaryKey() {\n\t\treturn $this->_UserID.'.'.$this->_TeamID;\n\t}", "title": "" }, { "docid": "098306e4e1bb86981e86742812ff2b9e", "score": "0.64535", "text": "public static function getTableName(){\n\t\treturn static::TABLE_NAME;\n\t}", "title": "" }, { "docid": "ac0f58cd1a4bf8ccc57e4450a13ef7b2", "score": "0.64487374", "text": "public function getPrimaryKey()\n\t{\n\t\treturn $this->getCoTransaccion();\n\t}", "title": "" }, { "docid": "d4b685d0fc94eaf1512b301720c986f9", "score": "0.6437717", "text": "public function get_table() {\n return $this->_table;\n }", "title": "" }, { "docid": "805cfab09209b75ee0acc65024e9e7f9", "score": "0.64370304", "text": "public function getTableName()\n\t\t{\n\t\t\treturn self::$tableName;\n\t\t}", "title": "" }, { "docid": "c104b80a7e64ec41ededb65fdb26256e", "score": "0.6422282", "text": "protected function getPrimaryKey()\n {\n return $this->getLastRowId();\n }", "title": "" }, { "docid": "743f763f323ea7cef4a66622184d4c02", "score": "0.642096", "text": "public function getID()\n {\n return $this->tID;\n }", "title": "" }, { "docid": "a65d58e99252380507651711846b7285", "score": "0.64167774", "text": "function get_table(){\n\t\treturn $this->table;\n\t}", "title": "" }, { "docid": "5a23c7b294b7c25d361516acbce07bb9", "score": "0.64117324", "text": "protected function getTable()\n\t{\n\t\treturn $this->connection->getContext()->table($this->getTableName());\n\t}", "title": "" }, { "docid": "99c2045de6307b11e6f9cd0abcc661ba", "score": "0.64068574", "text": "static function getTableName(): string;", "title": "" }, { "docid": "484ab0529e1f84b2d714bd37595ace7b", "score": "0.6399451", "text": "public static function getTableName(){ return static::TABLE_NAME; }", "title": "" }, { "docid": "eb294f0d06481008771d4043747964ed", "score": "0.63877434", "text": "protected function getTable()\n {\n return self::$DB_TABLE;\n }", "title": "" }, { "docid": "a63abf6b8ea26345a05b581a500f7476", "score": "0.63864535", "text": "abstract public function getAutoIncrement($table);", "title": "" }, { "docid": "d51e60c463dbb996786f06d4e0a86709", "score": "0.63829947", "text": "public function NextID($table)\n {\n return $this->getTableStatus($table, 'Auto_increment');\n }", "title": "" }, { "docid": "0831b3b3ec44b07eaa1f3ca1b695e802", "score": "0.63828415", "text": "public function getTable()\n {\n return Core::constant( \"DB_PREFIX\" ) . $this->table;\n }", "title": "" }, { "docid": "c7526c8d3fa545ec087ed2fccbcafa5b", "score": "0.6382602", "text": "public function get_table()\n {\n return $this->m_table;\n }", "title": "" }, { "docid": "264ea3a773d13d50cab5c575e5b9deb1", "score": "0.6381057", "text": "public function GetNextID(){\n\t\t$sql = \"SHOW TABLE STATUS LIKE '\".$this->dbTable.\"'\";\n\t\t$data = Database::Instance()->QueryRow($sql);\n\t\treturn $data['auto_increment'];\n\t}", "title": "" }, { "docid": "f19a0569e6e5e42f0fa6c135d1781140", "score": "0.63789564", "text": "public static function getTableName(): string;", "title": "" }, { "docid": "7ec95d3b55111b4fbe3b43436a389f2a", "score": "0.63750803", "text": "public function getTableName()\n {\n return $this->tablename;\n }", "title": "" }, { "docid": "cc3f5c28c12e28d5142a60a9120a9d1f", "score": "0.6368887", "text": "public function getTableName(){\n return self::$TABLE_NAME;\n }", "title": "" }, { "docid": "a1cc31b590a966d81a3402ed90e5a16d", "score": "0.6363107", "text": "public function getTableName()\n {\n return (string)$this->tableName;\n }", "title": "" }, { "docid": "5b25b9e596e622ac61993c129147553e", "score": "0.63623476", "text": "public function getId()\n {\n return $this->getKey();\n }", "title": "" }, { "docid": "cd70aa60ab43a17b45e94c01d0965774", "score": "0.6359537", "text": "public function getPrimaryKey($table, $database = null);", "title": "" }, { "docid": "6909113674d98ac74e51cb455a4a12f1", "score": "0.6358613", "text": "function getPrimary($table);", "title": "" }, { "docid": "c577f9d56e5840c1d78983f562d8b3ef", "score": "0.63551635", "text": "public function getTableName() { return self::TABLE_NAME; }", "title": "" }, { "docid": "c577f9d56e5840c1d78983f562d8b3ef", "score": "0.63551635", "text": "public function getTableName() { return self::TABLE_NAME; }", "title": "" }, { "docid": "f258b834b402cd48b9af14d8a3290ef9", "score": "0.635403", "text": "protected function getTableName(): string {\n return self::TABLE_NAME;\n }", "title": "" }, { "docid": "7092708069bc59ceda2c87ecfc229b67", "score": "0.6352851", "text": "public function id()\n {\n return $this->context->id;\n }", "title": "" }, { "docid": "81d69054dc73e017cf45e06e3a0e8ec5", "score": "0.63495976", "text": "public static function getDbPrimaryKey( )\n {\n return 'SET_id';\n }", "title": "" }, { "docid": "8daab5cee83562e747fc9dc078123e8f", "score": "0.6342576", "text": "protected function _getTableName()\n {\n return $this->_tableName;\n }", "title": "" }, { "docid": "b4205388ee9e4c44312345a4a22062af", "score": "0.63383025", "text": "public function getTableName() {\n\t\treturn $this->_tablename;\n\t}", "title": "" }, { "docid": "942abecda28e5e6808753d8f5e96343e", "score": "0.6327624", "text": "public function getPrimaryKey()\n\t{\n\t\treturn $this->getName();\n\t}", "title": "" }, { "docid": "9b61f868d7b25f21264821ea1fc24102", "score": "0.6320751", "text": "function referenceColumnName()\n {\n return 'id';\n }", "title": "" }, { "docid": "deef30f112d02b7b6ae2b2f35131374b", "score": "0.6306973", "text": "public function get_id();", "title": "" }, { "docid": "a0ea7354e194838f14c291687d5fc910", "score": "0.6305705", "text": "public function getPk()\n {\n return $this->_info(Zend_Db_Table_Abstract::PRIMARY);\n }", "title": "" }, { "docid": "85db337f963a8fc61a3514b79d921a9c", "score": "0.6304495", "text": "public function getId()\n {\n return $this->getPrimaryKey();\n }", "title": "" }, { "docid": "85db337f963a8fc61a3514b79d921a9c", "score": "0.6304495", "text": "public function getId()\n {\n return $this->getPrimaryKey();\n }", "title": "" }, { "docid": "85db337f963a8fc61a3514b79d921a9c", "score": "0.6304495", "text": "public function getId()\n {\n return $this->getPrimaryKey();\n }", "title": "" }, { "docid": "35557b0520b35ca2eeb94b2debf0df9e", "score": "0.63028866", "text": "public function getId()\n {\n return $this->base->ID;\n }", "title": "" }, { "docid": "10c648514a33ec13e14197d4c0a487ad", "score": "0.62929446", "text": "public function getLastId($table){\n if($this->getContract()->isTable(strtolower($table))){\n return floatval(parent::getLastId($table));\n } else {\n throw new ExceptionDb(\"Nie istnieje tabela dla tego obiektu\");\n }\n }", "title": "" }, { "docid": "9531179183c0f0ffb8cb3c5b3201389b", "score": "0.6292467", "text": "public static function table() {\n\t\t\treturn db(static::$_database)->getPrefix() . static::$_table;\n\t\t}", "title": "" }, { "docid": "44dfe27e72860097d84c27a273980c97", "score": "0.6291672", "text": "private function getPrimaryKey() {\n\t\t$this->database->query('SHOW KEYS FROM ' . $this->tableName . ' WHERE Key_name = \\'PRIMARY\\'');\n\t\t$row = $this->database->single();\n\t\treturn $row->Column_name;\n\t}", "title": "" }, { "docid": "8024fe132312bb95ddc622c8526a8438", "score": "0.62848353", "text": "public function getPrimaryKey()\n {\n return $this->identifier();\n }", "title": "" }, { "docid": "e92398eb423fb4e6767cc9794300ec5f", "score": "0.6279527", "text": "private function getTable() {\n\t return $this->table;\n }", "title": "" }, { "docid": "133d8b61c48d682955c069acfff141fa", "score": "0.62788", "text": "public static function getDbPrimaryKey( )\n {\n return 'RED_id';\n }", "title": "" }, { "docid": "169efed8d8f002be48ee4e5f02cb1f3e", "score": "0.62787867", "text": "private function getCurrentTable() {\n for ($i = count($this->stack) - 1; $i >= 0; $i--) {\n if ($this->stack[$i]->tagName === 'table') {\n return $this->stack[$i];\n }\n }\n return $this->stack[0];\n }", "title": "" }, { "docid": "e84cc8e667fae0edc65bc0fb3393624b", "score": "0.6278433", "text": "public function getPrimary()\n {\n if (isset($this->_infos['primary']))\n return $this->_infos['primary'];\n else\n return $this->_table.'pk';\n }", "title": "" }, { "docid": "a1edcbe31a581bf8054cff73978082ee", "score": "0.62759894", "text": "public function getResourceId() {\n\t\t$table = $this->getParameter(self::OPTION_TABLE);\n\t\t$uid = $this->getParameter(self::OPTION_UID);\n\t\treturn (empty($uid) ? $table : $table . ':' . $uid);\n\t}", "title": "" }, { "docid": "ef92c32183ffe43f7069dfbdc6107bd1", "score": "0.62663805", "text": "public function currentId()\n {\n if (empty($this->currentId)) {\n $current = Route::current()->parameter('guild');\n $this->currentId = $current ? $current->id : null;\n }\n\n return $this->currentId;\n }", "title": "" }, { "docid": "bd0abdd41f4794872934f8bc394fe455", "score": "0.62601894", "text": "public function TableName()\n\t\t{\n\t\t\treturn self::ClassName();\n\t\t}", "title": "" }, { "docid": "94a9b55302484df93b1f4e5de4153e8a", "score": "0.6256464", "text": "public function getTableName()\r\n {\r\n return $this->tableName;\r\n }", "title": "" }, { "docid": "d0d15226b64695d75ebdfa4ce92d667a", "score": "0.6253242", "text": "public static function getTableName();", "title": "" }, { "docid": "dac2255e0fc40490ef559559b70cd4ad", "score": "0.62527174", "text": "public static function tableName()\n {\n return self::$table;\n }", "title": "" }, { "docid": "e3062822ef80f95d11bdfb15ec22263d", "score": "0.6251582", "text": "public function getTableName() {\n\t\treturn $this->tableName;\n\t}", "title": "" }, { "docid": "b9bf1b4d674705af58eb52515cd7c745", "score": "0.625026", "text": "public static function get_id(){\n\t\treturn self::$id;\n\t}", "title": "" }, { "docid": "2ad113b38672a34448152a339c122ee4", "score": "0.62462753", "text": "public static function getPrimaryKey()\n {\n return \"id\";\n }", "title": "" }, { "docid": "9a4c22171a949d43fa20a1ffa761dda3", "score": "0.6245181", "text": "public function table()\n {\n if ($this->table === null) {\n $this->table = self::DEFAULT_TABLE;\n }\n\n return $this->table;\n }", "title": "" }, { "docid": "b478360d2f077038d6acd91c574038fd", "score": "0.6240916", "text": "public static function getTableName()\n {\n return ((new static)->getTable());\n }", "title": "" }, { "docid": "7e015453485363f93e99b33de1950788", "score": "0.6239147", "text": "function pdo_insert_id($table_name)\n{\n $seq = '';\n if (config('database.default') === 'pgsql') {\n $seq = $table_name . '_id_seq';\n }\n return get_link_identifier(null)->getPdo()->lastInsertId($seq);\n}", "title": "" }, { "docid": "6f1b9ebfaec188b97fe7a150bed0cf75", "score": "0.6237611", "text": "protected function getTable()\n {\n return $this->table;\n }", "title": "" }, { "docid": "4f5de12e12402d59f7ce67f56ee78799", "score": "0.62368804", "text": "public function get_table_name() {\n\t\treturn $this->get_table_prefix() . $this->table_name;\n\t}", "title": "" }, { "docid": "cfadd879b4f3cc01747fac418bbfec0d", "score": "0.6234772", "text": "public function getTableName() {\n return $this->tableName;\n }", "title": "" }, { "docid": "cea6a42ff45f6c31928e81061a7af7f5", "score": "0.62330854", "text": "public function getTableName()\n\t{\n\t\treturn $this->tableName;\n\t}", "title": "" } ]
8a7c89db1bcca6a75507ed2233a99c9c
Handle PUT requests to update a specific resource item
[ { "docid": "0af52505e1e79c137655651d08138069", "score": "0.0", "text": "public function putAction(){\n $this->_helper->json(\"Esto no esta implementado\");\n }", "title": "" } ]
[ { "docid": "11b3e054afd82d1f2f0b07a443ddb617", "score": "0.7042162", "text": "public function update(Request $request, Item $item)\n {\n //\n }", "title": "" }, { "docid": "11b3e054afd82d1f2f0b07a443ddb617", "score": "0.7042162", "text": "public function update(Request $request, Item $item)\n {\n //\n }", "title": "" }, { "docid": "11b3e054afd82d1f2f0b07a443ddb617", "score": "0.7042162", "text": "public function update(Request $request, Item $item)\n {\n //\n }", "title": "" }, { "docid": "b66d45ed275220a344f3f222ce4980b5", "score": "0.70061594", "text": "public function update(Request $request, Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "30ca5d3322fb9ea7d7df9b384c49b32d", "score": "0.68998003", "text": "public function index_put($id)\n {\n $input = $this->put();\n $this->db->update('items', $input, array('id'=>$id));\n \n $this->response(['Item updated successfully.'], REST_Controller::HTTP_OK);\n }", "title": "" }, { "docid": "17bfd9aaf3a134648b28be6ec9b3ca25", "score": "0.683284", "text": "public function updateItem(ItemRequest $request,$id)\n {\n \n }", "title": "" }, { "docid": "d267fa6d2f885379819bf3194d5e6f39", "score": "0.67858404", "text": "abstract public function put(Request $request);", "title": "" }, { "docid": "ecf9c6e9f4e39844dc8c0326afad3dc7", "score": "0.6702447", "text": "function handlePut($isValid, $update)\n{\n $isSuccess = false;\n\n try {\n # extract the id portion of the URL\n $id = substr($_SERVER['PATH_INFO'], 1);\n # get the JSON format body and decode it\n $put = trim(file_get_contents(\"php://input\"));\n $data = json_decode($put, true);\n // var_dump($data);\n $isSuccess = $update($data, $id);\n } catch (Exception $e) {\n}\n\n $resp = new stdClass();\n $resp->success = $isSuccess;\n\n echo json_encode($resp);\n}", "title": "" }, { "docid": "ee3b15f9ebfbebdf21c9624c4a1ff9e4", "score": "0.6674209", "text": "public function update(Request $request, $type=null,$item_id,$id)\n {\n //\n }", "title": "" }, { "docid": "e09f4544f299ba8f915da8a2dbf17e41", "score": "0.6670697", "text": "public function index_put($id)\n {\n $input = $this->put();\n $this->write_db->update($_table, $input, array($_id=>$id));\n \n $this->response(['Item updated successfully.'], REST_Controller::HTTP_OK);\n }", "title": "" }, { "docid": "d53cd52a7f76b5d11d667ef5077ff12a", "score": "0.6646952", "text": "public function testUpdateBrandUsingPUT()\n {\n }", "title": "" }, { "docid": "1e58026b8952df10026ace5fc59fe274", "score": "0.66341156", "text": "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "title": "" }, { "docid": "21014ba3afa30a01e24ddd6f11e6d9c3", "score": "0.6613548", "text": "public function update(Request $request, SalesItem $salesItem)\n {\n //\n }", "title": "" }, { "docid": "18673ee8b4d5deff681726ce9ce0120e", "score": "0.6606206", "text": "public function update(Request $request, ResultItem $resultItem)\n {\n //\n }", "title": "" }, { "docid": "36d6fada0c02d7dcd7a5edbe00b5cf8d", "score": "0.6581118", "text": "public function testUpdateCategoryUsingPUT()\n {\n }", "title": "" }, { "docid": "4016847dea9b55e59a4acd18600a30f5", "score": "0.65626997", "text": "public function update($request, $id);", "title": "" }, { "docid": "b87bb9d195a4ae1c5e8fabade0c0716f", "score": "0.65484124", "text": "public function index_put($id)\n {\n $input = $this->put();\n $this->db->update('sales', $input, array('sales_id'=>$id));\n \n $this->response(['Item updated successfully.'], REST_Controller::HTTP_OK);\n }", "title": "" }, { "docid": "90cec2e0050ecd5971be612c49157c4a", "score": "0.6543867", "text": "public function testUpdateSupplierUsingPUT()\n {\n }", "title": "" }, { "docid": "f8c303fa37e33ec946fe271dede92604", "score": "0.65398383", "text": "public function update(Request $request, ItemUser $itemUser)\n {\n //\n }", "title": "" }, { "docid": "5841ebef13dcfbb8aef950379228320e", "score": "0.65137106", "text": "public function update(Request $request, $id)\n {\n //put (post+get)\n }", "title": "" }, { "docid": "c14df7c28169e6e721e08f97cb644bc3", "score": "0.65124667", "text": "function actionsForPutMethod()\n {\n if (isset($this->id)) {\n /* Check first that there is actually an element with the id before modifying */\n $info = $this->api->get($this->id);\n array_pop($info);\n\n /* If $info is different from 0, the element exists, therefore proceed to modify */\n if (count($info) != 0) {\n /* Decode the body of the request and save it in an array */\n parse_str(html_entity_decode($this->bodyRequest), $array);\n\n $this->api->data = $this->renderizeData(array_keys($array), array_values($array));\n $this->api->id = $this->id;\n $data = $this->api->put();\n\n if ($data) {\n $data = $this->api->get($this->id);\n\n if (count($data) == 0) {\n $this->print_json(200, false, null);\n } else {\n array_pop($data);\n $this->print_json(200, \"OK\", $data);\n }\n } else {\n $this->print_json(200, false, null);\n }\n } else { /* If $info is equal to 0, the element does not exist and there is nothing to modify */\n $this->print_json(404, \"Not Found\", null);\n }\n } else {\n $this->print_json(405, \"Method Not Allowed\", null);\n }\n }", "title": "" }, { "docid": "0d64b6ec891060d5fb31112e7e373b88", "score": "0.64981973", "text": "public function update(Request $request, ProductItem $productItem)\n {\n //\n }", "title": "" }, { "docid": "0d64b6ec891060d5fb31112e7e373b88", "score": "0.64981973", "text": "public function update(Request $request, ProductItem $productItem)\n {\n //\n }", "title": "" }, { "docid": "2beeb68d292201c3827d32fba3268f8c", "score": "0.646253", "text": "public function updateItems(){\n $this->validate($this->request, [\n 'title' => 'required|max:255',\n 'description' => 'string|max:255',\n 'isbn' => 'string',\n 'authorId' => 'integer|min:1',\n 'itemTypeId' => 'integer|min:1',\n 'categoryId' => 'integer|min:1',\n ]);\n $items = array(\n 'title' => $this->request->input('title'),\n 'description' => $this->request->input('description'),\n 'isbn' => $this->request->input('isbn'),\n 'authorId' => $this->request->input('authorId'),\n 'catId' => $this->request->input('categoryId'),\n 'itemTypeId' => $this->request->input('itemTypeId'),\n );\n $id = $this->request->id;\n try {\n $item = new ItemService();\n $result = $item->updateItem($items, $id);\n if ($result) {\n return response()->json([\n 'success' => true,\n 'message' => 'Item Updated Successfully',\n ], 200);\n }\n return response()->json([\n 'success' => false,\n 'message' => 'item could not be updated'\n ], 400);\n } catch (Exception $ex) {\n return response()->json([\n 'success' => false,\n 'message' => 'Error Occured updating Items. Ensure the IDs are Valid'\n ], 400);\n }\n }", "title": "" }, { "docid": "6f7a4757d21bf12bc613d4131ea384d1", "score": "0.6453221", "text": "public function update_item( \\WP_REST_Request $request ) {\n\t\treturn $this->not_yet_response();\n\t}", "title": "" }, { "docid": "9f59208c012c432981ef5be6e114fc75", "score": "0.64404947", "text": "public function update($request,$id) {\n \n\n }", "title": "" }, { "docid": "f4d265a2c85830cf88ef2a5959e4f65b", "score": "0.64343244", "text": "public function putAction()\n {\n try\n {\n $trackingReq = $this->_helper->TrackingRequest($this->_request->getRawBody());\n }\n catch (\\InvalidArgumentException $e)\n {\n $this->sendAlteredResponse(400, 'Malformed APP Envelope');\n }\n\n try\n {\n $this->trackingService->changeFulfillmentStatus($trackingReq);\n }\n catch (\\InvalidArgumentException $e)\n {\n $this->sendAlteredResponse(400, 'No ID passed in content');\n }\n catch (SE\\Infrastructure\\Tracking\\Exception $e)\n {\n $this->sendAlteredResponse(403, 'No Tracking Request Resource With This ID');\n }\n }", "title": "" }, { "docid": "52b1b7a30044d88d43eaebbf3d0a34c5", "score": "0.6419944", "text": "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "title": "" }, { "docid": "62bf511ae4ca9275670047efc46a3603", "score": "0.64177006", "text": "public function put($data)\n {\n global $_PM_;\n $api = 'handler_'.$this->handler.'_api';\n $this->api = new $api($_PM_, PHM_API_UID, $this->principalId);\n $this->api->update_item_content($this->item['id'], $data);\n }", "title": "" }, { "docid": "14284f6820594b8fa846451f988d08f8", "score": "0.64176476", "text": "public function updateEntity($entityId, $request)\n {\n return $this->start()->uri(\"/api/entity\")\n ->urlSegment($entityId)\n ->bodyHandler(new JSONBodyHandler($request))\n ->put()\n ->go();\n }", "title": "" }, { "docid": "c145281144479ae8b8d028504d76821d", "score": "0.6415582", "text": "public function testUpdate()\n {\n Item::factory()->create(\n ['email' => '[email protected]', 'name' => 'test']\n );\n\n Item::factory()->create(\n ['email' => '[email protected]', 'name' => 'test']\n );\n\n Item::factory()->count(10)->create();\n\n //test item not found\n $this->call('PUT', '/items/11111')\n ->assertStatus(404);\n\n //test validation\n $this->put('items/1', array('email' => 'test1!kl'))\n ->seeJson([\n 'email' => array('The email must be a valid email address.'),\n ]);\n\n //test exception\n $this->put('items/1', array('email' => '[email protected]'))\n ->seeJsonStructure([\n 'error', 'code'\n ])\n ->seeJson(['code' => 400]);\n\n //test success updated item\n $this->put('items/1', array('email' => '[email protected]', 'name' => 'test1 updated'))\n ->seeJson([\n 'status' => 'ok',\n ])\n ->seeJson([\n 'email' => '[email protected]',\n ])\n ->seeJson([\n 'name' => 'test1 updated',\n ])\n ->seeJsonStructure([\n 'data' => [\n 'id',\n 'guid',\n 'name',\n 'email',\n 'created_dates',\n 'updated_dates',\n ]\n ]);\n\n $this->seeInDatabase('items', array('email' => '[email protected]', 'name' => 'test1 updated'));\n }", "title": "" }, { "docid": "5138f3f4c833a9cd09dd694f7dc96931", "score": "0.6399894", "text": "public function update(R $request, $id)\n {\n //\n }", "title": "" }, { "docid": "b3d8abec86ebbd8bf61bddeb5110ba38", "score": "0.63771945", "text": "abstract public function put($data);", "title": "" }, { "docid": "ea381cae0d8193340674d73417518898", "score": "0.63554233", "text": "public function update(string $slug, int $id, array $attributes): ResponseInterface;", "title": "" }, { "docid": "6c1a7fca5b00106039e16ff84e8a7c95", "score": "0.63448983", "text": "public function putAction()\n {\n Extra_ErrorREST::setInvalidHTTPMethod($this->getResponse());\n }", "title": "" }, { "docid": "874badecc9e281ff616dec0b4542ba25", "score": "0.6331888", "text": "public function update(Request $request,Item $item)\n {\n $item->update($request->all());\n return response()->json($item, 200);\n }", "title": "" }, { "docid": "315aae7e93a95665370d42ad9dd55a4e", "score": "0.63269794", "text": "public function update(Request $request, Company $company, InvoiceItem $invoiceItem)\n {\n //\n }", "title": "" }, { "docid": "aff02d3ed96d2613c2228d19cf374f20", "score": "0.63244087", "text": "public function update($request, $id)\n {\n }", "title": "" }, { "docid": "aff02d3ed96d2613c2228d19cf374f20", "score": "0.63244087", "text": "public function update($request, $id)\n {\n }", "title": "" }, { "docid": "aff02d3ed96d2613c2228d19cf374f20", "score": "0.63244087", "text": "public function update($request, $id)\n {\n }", "title": "" }, { "docid": "aff02d3ed96d2613c2228d19cf374f20", "score": "0.63244087", "text": "public function update($request, $id)\n {\n }", "title": "" }, { "docid": "aa8f5592b25ed376c63048676fd898b8", "score": "0.6314594", "text": "function album_put( $request, $user ) {\r\n global $hook;\r\n $owner = \\Profile\\profileHandler::getProfileId( $request );\r\n\r\n if (preg_match(\"@{$owner->username}/*$@\", join('/',$request->getRequestVars()) )) {\r\n // profile page\r\n $album = new \\AlbumObject();\r\n $parent = $album->initAlbumById( $owner->albumid )->getParent();\r\n /*\r\n ->getParent();\r\n $path = $album->path();\r\n */\r\n\r\n } elseif ($request->getResource() == 'albums') {\r\n // album page\r\n $album = new \\AlbumObject();\r\n $parent = $album->initAlbumByPath( $request->getRequestVars() )->getParent();\r\n /*\r\n ->getParent();\r\n $path = $album->path();\r\n */\r\n\r\n }\r\n\r\n // get submit data\r\n $json = $request->getData();\r\n\r\n // get item\r\n $item = new \\ItemObject();\r\n $item->getId($json->Id);\r\n\r\n // Check that the user is the owner of the object\r\n if ($item->get('uid') != $user->uid) {\r\n throw new \\Exception(\"You are not authorized to change this item.\", 403);\r\n }\r\n\r\n // check if item and parent match\r\n if ($item->get('parentid') != $parent->get('itemid')) {\r\n throw new \\Exception(\"item does not exist in this space\", 404);\r\n }\r\n //$item->set('path', $path);\r\n //print \"path: \".$item->get('path').\"\\n\";\r\n\r\n $response = new \\stdClass();\r\n\r\n $response->data = $hook->execute('put_article_albums_action', $json, $item, $album);\r\n // perform requested action \r\n switch($json->Item) { // <----- this should be at the favorites section\r\n case 'addFavorite':\r\n break;\r\n case 'removeFavorite':\r\n break;\r\n /*default:\r\n throw new \\Exception(\"Unsupported action\", 404);\r\n break;*/\r\n\r\n }\r\n\r\n $response->Success = true;\r\n print json_encode($response);\r\n //print_r($item);\r\n \r\n}", "title": "" }, { "docid": "6d8e05efa985431c8c591dddab92f27e", "score": "0.6304394", "text": "public function update($request, $id)\n {\n //\n }", "title": "" }, { "docid": "66171235f57479fdaf1fb4d14b84d7a1", "score": "0.62801373", "text": "abstract public function updateItem(&$object);", "title": "" }, { "docid": "bb15b005f7fc6499d3d80ccfb1d2a057", "score": "0.6277103", "text": "public function update(Request $request, FacturaItem $facturaItem)\n {\n //\n }", "title": "" }, { "docid": "eedae986f17f03dcd025a61cfde7df1e", "score": "0.6270447", "text": "public function update(Request $request, Company $company, OldInvoiceItem $oldInvoiceItem)\n {\n //\n }", "title": "" }, { "docid": "106fc919e7629563433a77e6a211bc15", "score": "0.6265696", "text": "public function update(Request $request, Item $item)\n {\n $data = $request->json()->all();\n $request->validate([\n 'name' => 'required|string',\n 'price' => 'required|integer',\n 'stock' => 'required|integer',\n 'description' => 'required|string',\n 'gender_id' => 'required|uuid|exists:genders,id',\n 'type_id' => 'required|uuid|exists:types,id',\n 'supplier_id' => 'required|uuid|exists:suppliers,id',\n ]);\n\n $item->name = $data['name']; \n $item->price = $data['price']; \n $item->stock = $data['stock']; \n $item->description = $data['description']; \n $item->gender_id = $data['gender_id']; \n $item->type_id = $data['type_id']; \n $item->supplier_id = $data['supplier_id'];\n $item->save();\n }", "title": "" }, { "docid": "8dfaf7e8743bc0eafc3d98ade1343d69", "score": "0.62560934", "text": "public function update(){\n\n\t\t/* set method */\n\t\t$this->request_method = 'update';\n\t\t\t\t\n\t\t/* check for a model id */\n\t\tif( ! $this->id) {\n\t\t\t$this->set_error( 10, 'No model id in request, cant update' );\n\t\t\treturn;\t\t\t\n\t\t}\n\t\t\n\t\t/* read the data received from backbone */\n\t\t$this->parse_model_request();\n\n\t\tif($this->get_errors())\n\t\t\treturn;\n\t\t\t\t\t\n\t\t/* get the parsed post data from request */\n\t\t$item_data = $this->parsed_model_request;\n\t\t \t\t\t \t\n\t\t/* insert database */\n\t\tswitch( $this->properties->modelclass ) {\n\t\t\n\t\t\t/* posts */\n\t\t\tcase('post'):\n\t\t\tcase('attachment'):\n\t\t\t\t$post = $item_data['post'];\n\t\t\t\t\n\t\t\t\t/* privileg check */ //improve this for coded api calls, like when setting up bootstrap data (for reading it is no problem any way, because this check is only made for update and create and delete)\n\t\t\t\tif( $this->properties->access == \"loggedin\" && ! current_user_can('edit_post', $this->id)) { \n\t\t\t\t\t$this->set_error( 11, 'no user privileges to update the item on server' );\n\t\t\t\t\treturn;\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\t$result = wp_update_post( $post );\n\t\t\t\t\n\t\t\t\t/* maybe an error while updating */\n\t\t\t\tif( ! $result) {\n\t\t\t\t\t$this->set_error( 12, 'updating the item failed on the server' );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* geting the id means update was a success */\n\t\t\t\t$updated_id = $result;\n\t\t\t\t\n\t\t\t\t/* save custom data, this only method does all the magic, \n\t\t\t\tdetails must be specified in the custom package handlers */\n\t\t\t\t$this->_action_custom_package_data( $updated_id, $item_data);\t\n\t\t\t\t\n\t\t\t\t/* set a clean response */\n\t\t\t\t$this->parse_model_response($updated_id);\t\n\t\t\tbreak;\n\t\t\t\n\t\t\t/* comment */\n\t\t\tcase('comment'):\n\t\t\t\t$comment = $item_data['comment'];\n\t\t\t\t\n\t\t\t\t/* comment updateding is not supported */\n\t\t\t\t$this->set_error( 13, 'comments cant be updated!' );\n\t\t\t\t\treturn; \n\t\t\tbreak;\n\t\t\tcase('user'):\n\t\t\t//@TODO\n\t\t\tbreak;\n\t\t\tcase('idone'):\n\t\t\t\t$new_id = $this->id;\n\t\t\t\t$this->_action_custom_package_data( $new_id, $item_data);\t\t\t\t\t\n\t\t\t\t$this->parse_model_response($new_id);\t\t\n\t\t\tbreak;\n\t\t}\n do_action('bb-wp-api_after_update', $updated_id, $this->properties, $this );\n\t\n\t}", "title": "" }, { "docid": "e439bbc30d7c663aa6f0f164fa2f5ab3", "score": "0.62552196", "text": "public function testUpdate()\n {\n $model = $this->makeFactory();\n $model->save();\n\n $newModel = $this->makeFactory();\n\n $this->json('PUT', static::ROUTE . '/' . $model->id, $newModel->toArray(), [\n 'Authorization' => 'Token ' . self::getToken()\n ])\n ->seeStatusCode(JsonResponse::HTTP_OK) \n ->seeJson($newModel->toArray());\n }", "title": "" }, { "docid": "a1cf7c2c9a80c20a01fdb2fc494c4b37", "score": "0.6248866", "text": "public function update(Request $request, OrderItem $orderItem)\n {\n //\n }", "title": "" }, { "docid": "a1cf7c2c9a80c20a01fdb2fc494c4b37", "score": "0.6248866", "text": "public function update(Request $request, OrderItem $orderItem)\n {\n //\n }", "title": "" }, { "docid": "e03e89f3a487c7a26ed942f14539f6eb", "score": "0.6238751", "text": "public function testRequestUpdateItem()\n {\n\t\t$response = $this\n\t\t\t\t\t->json('PUT', '/api/items/6', [\n\t\t\t\t\t\t'name' => 'Produkt zostal dodany i zaktualizowany przez test PHPUnit', \n\t\t\t\t\t\t'amount' => 0\n\t\t\t\t\t]);\n\n $response->assertJson([\n 'message' => 'Items updated.',\n\t\t\t\t'updated' => true\n ]);\n }", "title": "" }, { "docid": "52a8cd5626d9edc1cd8693981dbdf9e1", "score": "0.6237582", "text": "public function update( Request $request, $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "52a8cd5626d9edc1cd8693981dbdf9e1", "score": "0.6237582", "text": "public function update( Request $request, $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "90d230cc927a0137349fde34497e6334", "score": "0.6226404", "text": "public function update ( Request $request, $id )\n {\n // NO-OP\n }", "title": "" }, { "docid": "d897a40d307670c0a2b7bba76cbe8e66", "score": "0.6224211", "text": "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "title": "" }, { "docid": "ff69883e33549df57bc3fc366db46232", "score": "0.61978793", "text": "public function handlePut($user, $_PUT) {\n\t\t// User must be verified to perform modifications\n\t\tif (!$this->verifyUser($user)) {\n\t\t\techo json_encode($this->throwUnauthorized());\n\t\t\treturn;\n\t\t}\n\t\tif ($_GET['entryid'] == \"\") { // URL rewrite parameter\n\t\t\t// Batch transaction\n\t\t\tif (isset($_PUT['time']) && isset($_PUT['entries'])) {\n\t\t\t\t$result = $this->putEntries($user, $_PUT['entries']);\n\t\t\t\t$result['time'] = $_PUT['time'];\n\t\t\t\techo json_encode($result);\n\t\t\t}\n\t\t} else {\n\t\t\t// Single entry\n\t\t\tif (isset($_PUT['time']) && isset($_PUT['entry'])) {\n\t\t\t\t$result = $this->putEntry($user, $_PUT['entry']);\n\t\t\t\t$result['time'] = $_PUT['time'];\n\t\t\t\techo json_encode($result);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "6f0164e1f0cbab47e1ff7e48ae1a3818", "score": "0.6194554", "text": "public function update(Request $request, string $model, string $id): Response\n {\n //\n }", "title": "" }, { "docid": "ceeb8862d6c8af884b3dea2b19d808a2", "score": "0.6192514", "text": "public function updateItem($id, Request $request){\n\t\tif(\\Auth::check()){\n\t\t\t$user = \\Auth::user();\n\t\t\tif($user->hasRole('admin')){\n\t\t\t\t$story = Story::findOrFail($id);\n\t\t\t\t$story->is_approved = $request->get('is_approved', 0);\n\t\t\t\t$story->priority = $request->get('priority', 0);\n\t\t\t\t$story->is_archived = $request->get('is_archived', 0);\n\n\t\t\t\tif($story->save()){\n\t\t\t\t\t$returnData = ['is_approved' => $story->is_approved, 'priority' => $story->priority, 'is_archived' => $story->is_archived];\n\t\t\t\t\treturn $this->setStatusCode(201)\n\t\t\t\t\t\t->respondUpdatedWithData('story patched', $returnData);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "b63b74da9b6109b98718289434f6d2cf", "score": "0.61886984", "text": "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "title": "" }, { "docid": "5dd04ceb203f7d30ce1633bff3acba55", "score": "0.6182025", "text": "public function update($data) {}", "title": "" }, { "docid": "5dd04ceb203f7d30ce1633bff3acba55", "score": "0.6182025", "text": "public function update($data) {}", "title": "" }, { "docid": "c019712d5491e2b85c0cbbd299b4d911", "score": "0.6179184", "text": "public function doPut($path, array $parsed_body);", "title": "" }, { "docid": "56c2b493ee3f6a8e2fe0dddef47259ba", "score": "0.6173445", "text": "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "title": "" }, { "docid": "a5e2ab03a8c60242022048497c10442c", "score": "0.6164851", "text": "public function update(Request $request, RapportIntervention $rapportIntervention)\n {\n //\n }", "title": "" }, { "docid": "12b81e2051bd0ca5af1ec30e7c4b7f10", "score": "0.6162023", "text": "public function update(Request $request, ResourceSubject $resourceSubject)\n {\n //\n }", "title": "" }, { "docid": "6d9e4ebb984da2cfd68b90087dc30933", "score": "0.61514443", "text": "public function putAction() {}", "title": "" }, { "docid": "57235c8c59ead8d6ab0acccafb9eebb4", "score": "0.6121362", "text": "public function update(Request $request, $id){}", "title": "" }, { "docid": "7680e535ddc097a7c7467f63a1aaeab1", "score": "0.6117022", "text": "public function testUpdateMetadata1UsingPUT()\n {\n }", "title": "" }, { "docid": "700305929ab1a32bbf43595758f79e46", "score": "0.6109338", "text": "protected function handle_put_item_update($Item, $args = array())\n {\n return $Item;\n }", "title": "" }, { "docid": "7aa8621ce8274f3a5ca55a8aa884d01d", "score": "0.61092645", "text": "public function update(Request $request, Shelf $shelf)\n {\n //\n }", "title": "" }, { "docid": "54cc20da8561ab4a0f1560cac0c951ba", "score": "0.6109198", "text": "public function update(Request $request, $id)\n {\n $item = Item::findOrFail($id);\n\n $validator = Validator::make($request->all(), [\n 'item_name' => [\n 'required',Rule::unique('items')->ignore($item->id),\n ]\n ])->validate();\n\n $item->item_name = $request->item_name;\n $item->upc_ean_isbn = $request->upc_ean_isbn;\n $item->packaging = $request->packaging;\n $item->description = $request->description;\n $item->category_id = $request->category;\n $item->update();\n }", "title": "" }, { "docid": "d7bb82fe977f1dfe388844b98b35c5fb", "score": "0.61090076", "text": "public function itemUpdate(Event $event){\n $em = $this->getServiceLocator()->get('Omeka\\EntityManager');\n $entity = $event->getParam('entity');\n $request = $event->getParam('request');\n $operation = $request->getOperation();\n $error_store = $event->getParam('errorStore');\n\n if ($operation == 'update' ){\n $resource_id = $request->getId();\n\n if (array_key_exists('team', $request->getContent())){\n\n //array of team ids\n $teams = $request->getContent()['team'];\n\n //array of media ids\n $media_ids = [];\n foreach ($entity->getMedia() as $media):\n error_log('found a media. Id: ' . $media->getId());\n\n $media_ids[] = $media->getId();\n endforeach;\n\n //remove resource from all teams\n $team_resources = $em->getRepository('Teams\\Entity\\TeamResource')->findBy(['resource' => $resource_id]);\n foreach ($team_resources as $tr):\n $em->remove($tr);\n endforeach;\n\n\n\n //remove associated media from all teams\n foreach ($media_ids as $media_id):\n $team_resources = $em->getRepository('Teams\\Entity\\TeamResource')->findBy(['resource' => $media_id]);\n foreach ($team_resources as $tr):\n $em->remove($tr);\n endforeach;\n endforeach;\n $em->flush();\n\n //resource represented by the item in the resource table\n $resource = $em->getRepository('Omeka\\Entity\\Resource')\n ->findOneBy(['id' => $resource_id]);\n\n foreach ($teams as $team_id):\n $team = $em->getRepository('Teams\\Entity\\Team')->findOneBy(['id' => $team_id]);\n if (! $em->getRepository('Teams\\Entity\\TeamResource')\n ->findOneBy(['team'=>$team_id, 'resource'=>$resource_id])){\n $tr = new TeamResource($team, $resource);\n $em->persist($tr);}\n\n\n foreach ($media_ids as $media_id):\n error_log('this is a media id:' . $media_id);\n if (! $em->getRepository('Teams\\Entity\\TeamResource')\n ->findOneBy(['team'=>$team_id, 'resource'=>$media_id])){\n\n $m = $em->getRepository('Omeka\\Entity\\Resource')->findOneBy(['id'=>$media_id]);\n if ($m){\n $mtr = new TeamResource($team, $m);\n $em->persist($mtr);\n }\n\n }\n endforeach;\n endforeach;\n $em->flush();\n }\n }\n\n }", "title": "" }, { "docid": "d488ce27093a1adce2f110946fa9964c", "score": "0.6108992", "text": "public function update(Request $request, $id)\n {\n $data = $request->all();\n if ($data){\n $item = Category::findOrFail($id);\n $item->update($data);\n return response()->json([\n 'message' => 'Item Updated success',\n 'data' => CategoryResource::collection(Category::where('id',$item->id)->get())\n ], 200);\n }\n return response()->json([\n 'message' => 'Please Choose at least one item to edit',\n ], 503);\n\n\n }", "title": "" }, { "docid": "b766f2d16790377ec47dacaed65b94c3", "score": "0.6105251", "text": "public function updateItem($_id) {\n\t}", "title": "" }, { "docid": "3c8d94300a63fa40e8bcf7092ae73402", "score": "0.6102501", "text": "public function actionUpdate()\r\n {\r\n $this->_userAutehntication();\r\n\r\n /*\r\n * Receive all the PUT parameters\r\n */\r\n parse_str(file_get_contents('php://input'), $put_params);\r\n\r\n switch($_GET['model'])\r\n {\r\n /* Find respective model */\r\n case 'posts': \r\n $model = Post::model()->findByPk($_GET['id']); \r\n break; \r\n default: \r\n $this->_sendResponse(501, sprintf('Error: Mode <b>update</b> is not implemented for model <b>%s</b>',$_GET['model']) );\r\n exit; \r\n }\r\n if(is_null($model))\r\n $this->_sendResponse(400, sprintf(\"Error: Didn't find any model <b>%s</b> with ID <b>%s</b>.\",$_GET['model'], $_GET['id']) );\r\n \r\n /*\r\n * assign PUT parameters to attributes\r\n */ \r\n foreach($put_params as $var=>$value) {\r\n /*\r\n * Check if the model have this attribute\r\n */ \r\n if($model->hasAttribute($var)) {\r\n $model->$var = $value;\r\n } else {\r\n /* Error : model don't have this attribute */\r\n $this->_sendResponse(500, sprintf('Parameter <b>%s</b> is not allowed for model <b>%s</b>', $var, $_GET['model']) );\r\n }\r\n }\r\n /*\r\n *save the model\r\n */\r\n if($model->save()) {\r\n $this->_sendResponse(200, sprintf('The model <b>%s</b> with id <b>%s</b> has been updated.', $_GET['model'], $_GET['id']) );\r\n } else {\r\n $message = \"<h1>Error</h1>\";\r\n $message .= sprintf(\"Couldn't update model <b>%s</b>\", $_GET['model']);\r\n $message .= \"<ul>\";\r\n foreach($model->errors as $attribute=>$attribute_errors) {\r\n $message .= \"<li>Attribute: $attribute</li>\";\r\n $message .= \"<ul>\";\r\n foreach($attribute_errors as $attr_error) {\r\n $message .= \"<li>$attr_error</li>\";\r\n } \r\n $message .= \"</ul>\";\r\n }\r\n $message .= \"</ul>\";\r\n $this->_sendResponse(500, $message );\r\n }\r\n }", "title": "" }, { "docid": "a10124a4c3824fb42e04dc995c482c47", "score": "0.6101736", "text": "public function update_put(){\n $response = $this->PersonM->update_person(\n $this->put('id'),\n $this->put('name'),\n $this->put('hp'),\n $this->put('email'),\n $this->put('message')\n );\n $this->response($response);\n }", "title": "" }, { "docid": "7f7a9fd6176e006243ceab1c20709812", "score": "0.60978705", "text": "public function update( Request $request, $id )\n {\n //\n }", "title": "" }, { "docid": "72f215671ede34463ed0d4b62386ea7e", "score": "0.60963434", "text": "public function update(Request $request, Items $items)\n {\n //\n }", "title": "" }, { "docid": "3c4fd49b004a04a3508cfb394d7f6b54", "score": "0.6087381", "text": "public function update(Request $request, Item $item)\n {\n $item->update($request->only(['name','description']));\n\n Session::flash('status', 'Edited ok!');\n return Redirect::to('/items_php/edit/' . $item->id);\n }", "title": "" }, { "docid": "7116fbf1952fadd57242665f8afbd345", "score": "0.60795885", "text": "public function update(UpdateItemRequest $request, $id)\n {\n // --\n // Check role/permission\n if (!AdminHelper::can_action(115, 'edited')) {\n return response()->json(\"Access denied\", 403);\n }\n\n if ($this->itemRepo->update($request, $id)) {\n return response()->json('success');\n } else {\n return response()->json('error', 401);\n }\n }", "title": "" }, { "docid": "f412822dc23ac90bf01641d64cf06bd3", "score": "0.60794336", "text": "public function update(Request $req)\n { \n\n }", "title": "" }, { "docid": "1a5e48d52f081f95845609c7da06bf66", "score": "0.6076257", "text": "public function update(ItemRequest $request, $id)\n\t{\n $this->item = Item::findOrFail($id);\n $this->item->fill($request->all());\n $this->item->save();\n\n return redirect()->route('admin.items.index');\n\t}", "title": "" }, { "docid": "acef7f0899011d5b0deb3630f73cc66f", "score": "0.6075471", "text": "public function update(Request $request, $id)\n {\n if(Auth::guest()){\n return redirect('/login')->with('error', 'Please Login to Continue');\n }\n\n if(auth()->user()->user_type_id !== 2){\n return redirect('/home')->with('error', 'Unauthorized Page');\n }\n\n $this->validate($request, [\n 'item_id' => 'required|alpha_num|max:40|',\n 'name' => 'required|string|max:255',\n 'description' => 'required|string|max:1000',\n 'price' => 'required|numeric|max:999999.99',\n 'category' => 'required|alpha_num',\n ]);\n\n // update item\n\n $item = Item::find($id);\n $item->item_id = $request->input('item_id');\n $item->name = $request->input('name');\n $item->description = $request->input('description');\n $item->price = $request->input('price');\n $item->category_id = $request->input('category');\n $item->save();\n\n return redirect('/admin/products')->with('success', 'Item Updated');\n }", "title": "" }, { "docid": "3b6c3aaa23b4fb918ebc093545c13dc6", "score": "0.60750973", "text": "public function update($entity);", "title": "" }, { "docid": "3b6c3aaa23b4fb918ebc093545c13dc6", "score": "0.60750973", "text": "public function update($entity);", "title": "" }, { "docid": "7e6dee00b36690b04fc09cb7708283ba", "score": "0.60721684", "text": "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'unit_price' => 'required|int'\n ]);\n if ($validator->fails()) {\n return response()->json([\n \"error\" => 'validation_error',\n \"message\" => $validator->errors(),\n ], 280);\n }\n $item_detail = Item::findOrfail($id);\n if ($item_detail != null) {\n $item_detail->unit_price = $request->unit_price;\n // return $item_authors;\n if ($item_detail->save()) {\n return response()->json([\n 'status_code'=> 200,\n 'status_message'=> 'suceess',\n 'message'=>$item_detail->item_name.' was updated successfully',\n ]);\n }\n else{\n response()->json([\n 'message'=> 'We are unable to save your requests'\n ],501);\n }\n }\n else{\n return response()->json([\n 'message'=> 'Invalid Item ID'\n ],501);\n }\n \n }", "title": "" }, { "docid": "93fdad97174a03ab43158669cd794a6b", "score": "0.6070102", "text": "public function update(Request $request, ExtraItem $extraItem)\n {\n //\n }", "title": "" }, { "docid": "0a371f62e5efb4b56cbce7fb2276c761", "score": "0.6064603", "text": "public function update(Request $request , $id )\n { \n $this->validate( $request , $this->model->rules() ); \n \n if( !$model = $this->model->find($id) ){ \n return response()->json( 'Item Não encontrado.' , 404);\n } \n\n if( !$update = $model->update($request->all()) ){\n return response()->json('Item não atualizado.', 500);\n }\n\n return response()->json( 'Atualização realizada com sucesso' , 200);\n \n }", "title": "" }, { "docid": "e236722144b6ba7ca255eca3358bb644", "score": "0.6063541", "text": "public function handleUpdate($id, $period, $item, Request $request)\n {\n $id = $this->is_digit($id);\n $course = Course::findOrFail($id); \n if ($course->evaluator == Auth::user()->id) {\n $period = $this->is_digit($period);\n $periods = Courseperiod::where('course', $id)->where('id', $period)->count();\n if ($periods == 1) {\n $item = $this->is_digit($item);\n $items = Courseitem::where('period', $period)->where('id', $item)->count();\n if($items == 1){\n $this->updateValidator($request->all())->validate();\n $items = $this->edit($item, $request->all());\n return redirect()->route('course_managed_period_item_show', ['course' => $id, 'period' => $period, 'item' => $item])->with('status', 'New item successfully created!');\n }\n else {\n abort(404);\n }\n }\n else {\n abort(404);\n }\n }\n else {\n return redirect()->route('course_managed')->with('warning', 'Whoops! You\\'re unauthorized to access that page!');\n }\n }", "title": "" }, { "docid": "508602b5573b0f2ffc85c3b2b02e00e1", "score": "0.60625124", "text": "public function update(\\Illuminate\\Http\\Request $request, $id);", "title": "" }, { "docid": "114c137b8d194f7d3ff79d3e7ef95649", "score": "0.6055989", "text": "public function testUpdate()\n {\n $response = $this->action('PUT', '\\Modules\\Admin\\Http\\Controllers\\FaqCategoryController@update', ['id' => '1', 'name' => 'Specific', 'position' => '4', 'status' => '1']);\n\n $this->assertResponseStatus(200 || 302, $response->status());\n\n if ($response->status() == 302) {\n $this->assertInstanceOf('Illuminate\\Http\\RedirectResponse', $response);\n } else if ($response->status() == 200) {\n $this->assertInstanceOf('Illuminate\\Http\\JsonResponse', $response);\n }\n }", "title": "" }, { "docid": "61329b7ef8ead3531f1a05acebdc3cd5", "score": "0.6053022", "text": "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.6051748", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "e4b34a9f15412e411d518f70f2df376a", "score": "0.605047", "text": "public function putAction()\n {\n \n }", "title": "" }, { "docid": "d594abc184c1e304e332822499bb01d5", "score": "0.6050267", "text": "public function updated($item)\n {\n $this->elastic->update($item->getTable(), $item->id, $item->toArray());\n }", "title": "" }, { "docid": "6af36ba7a0998642ff239831f15b0219", "score": "0.60470396", "text": "public function update(Request $request, $id) {\n\t\t//\n\t}", "title": "" }, { "docid": "6af36ba7a0998642ff239831f15b0219", "score": "0.60470396", "text": "public function update(Request $request, $id) {\n\t\t//\n\t}", "title": "" }, { "docid": "6af36ba7a0998642ff239831f15b0219", "score": "0.60470396", "text": "public function update(Request $request, $id) {\n\t\t//\n\t}", "title": "" }, { "docid": "6af36ba7a0998642ff239831f15b0219", "score": "0.60470396", "text": "public function update(Request $request, $id) {\n\t\t//\n\t}", "title": "" }, { "docid": "6af36ba7a0998642ff239831f15b0219", "score": "0.60470396", "text": "public function update(Request $request, $id) {\n\t\t//\n\t}", "title": "" } ]
f4c93e780d95288577ff4f3110168666
MySQL Functions Define the "db_info" array, and fill it with connection information.
[ { "docid": "1c5ae3651451adf00dac5a0f8fdb07a3", "score": "0.0", "text": "public function __construct($server=self::default_server, $username=self::default_username, $password=self::default_password, $database=self::default_database, $connect=true) {\t\n\t\t$this->fill_connection_information($server, $username, $password, $database);\n\t\t\t\n\t\tif ((bool) $connect === true) {\n\t\t\treturn $this->connect();\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "120900fc43c6bf212dd4334c76d42ce3", "score": "0.70544165", "text": "function setup_db() {\n\n\t// Helper function to set up the database.\n\n\t// Read database connection info from config file generated by setup.py.\n\n\t$creds = parse_ini_file(__DIR__ . '/../../utilities/db.cfg',true);\n\n\t$db_conn = new mysqli($creds['main_database']['host'],\n\t\t$creds['main_database']['user'],\n\t\t$creds['main_database']['pass'],\n\t\t$creds['main_database']['name']);\n\n\tif ($db_conn->connect_error) {\n\t\tdie (\"Connection to database refused: \" . $db_conn->connect_error);\n\t}\n\n\t$db_conn->set_charset(\"utf8mb4\");\n\n\t$db_conn_people = new mysqli($creds['people_database']['host'],\n\t\t$creds['people_database']['user'],\n\t\t$creds['people_database']['pass'],\n\t\t$creds['people_database']['name']);\n\n\tif ($db_conn_people->connect_error) {\n\t\tdie (\"Connection to database refused: \" . $db_conn_people->connect_error);\n\t}\n\n\t$db_conn_people->set_charset(\"utf8mb4\");\n\n\treturn array($db_conn,$db_conn_people);\n}", "title": "" }, { "docid": "082408540dee965c98acfe9b2030b023", "score": "0.70189726", "text": "function Database_Connecting(&$info) {\n\n\t// Example:\n\t//var_dump($info);\n\t//if ($info[\"id\"] == \"DB\" && CurrentUserIP() == \"127.0.0.1\") { // Testing on local PC\n\t//\t$info[\"host\"] = \"locahost\";\n\t//\t$info[\"user\"] = \"root\";\n\t//\t$info[\"pass\"] = \"\";\n\t//}\n\n}", "title": "" }, { "docid": "fccbc1f1f84a3378a6fa6878947695e5", "score": "0.665377", "text": "private function conn()\n {\n foreach($this->array as $db_origin => $a){\n try{\n\n $this->conn[$db_origin] = new PDO(\"mysql:host=\".$this->array[$db_origin][\"host\"].\";dbname=\".$this->array[$db_origin][\"database\"], $this->array[$db_origin][\"user\"], $this->array[$db_origin][\"pass\"], array(\\PDO::ATTR_PERSISTENT => true));\n\n }catch(Exception $e){\n print $e->getMessage();\n }\n }\n }", "title": "" }, { "docid": "2995c340ca804897e7a6f6bc2ebfbe7d", "score": "0.65722126", "text": "function db_info() {\n\n\t$connection = db_connect();\n\t\n\treturn $connection->info;\n\n}", "title": "" }, { "docid": "03f6c280ea8addf53451ff6e9e936e5e", "score": "0.64250785", "text": "protected function mysqlConnect($dbinfos)\n {\n $dsn = 'mysql:';\n \n // Getting the host parameter\n if (empty($dbinfos['hostname'])) {\n throw new Exception('Host setting necessary for pgsql connection');\n }\n $dsn .= 'host='.$dbinfos['hostname'].';';\n \n // Getting the port parameter\n $port = empty($dbinfos['hostname']) ? '3306' : $dbinfos['hostname'];\n $dsn .= 'port='.$port.';';\n \n // Getting the database name parameter\n if (empty($dbinfos['database'])) {\n throw new Exception('Dabatase setting necessary for mysql connection');\n }\n $dsn .= 'dbname='.$dbinfos['database'].';';\n \n // Getting the username parameter\n if (empty($dbinfos['username'])) {\n throw new Exception('Username setting necessary for mysql connection');\n }\n $user = $dbinfos['username'];\n $pass = empty($dbinfos['password']) ? '' : $dbinfos['password'];\n \n try {\n $this->dbhandler = new PDO($dsn, $user, $pass);\n } catch (PDOException $e) {\n throw new Exception('Unable to connect to mysql database : '.$dbinfos['database'].' ('.$dbinfos['username'].'@'.$dbinfos['hostname'].':'.$dbinfos['dbport'].')');\n }\n }", "title": "" }, { "docid": "bd63efc1d15ce7d023c381541203fe38", "score": "0.6424883", "text": "public function fetchDatabaseInformation()\n {\n $aaR = array();\n foreach ($this->aaConnections as $conn)\n {\n $aaR[] = array($conn[0],$conn[1]);\n }\n return $aaR;\n }", "title": "" }, { "docid": "aeb425ba6251e30cf51ddddaa5136d04", "score": "0.6368408", "text": "function Mysql() {\n $this->connectionString = NULL;\n $this->sqlQuery = NULL;\n $this->dataSet = NULL;\n $this->result = NULL;\n \n $dbPara = new Dbconfig();\n $this->databaseName = $dbPara->dbName;\n $this->hostName = $dbPara->serverName;\n $this->userName = $dbPara->userName;\n $this->passCode = $dbPara->passCode;\n $dbPara = NULL;\n }", "title": "" }, { "docid": "66efd61ef107a7fae31ccfc318f16611", "score": "0.6345684", "text": "function db_init()\n{\n $log = start_system_log('db_init');\n $dbAccess = DBaccess ? DBaccess : [\n 'host' => DBhost,\n 'user' => DBuser,\n 'port' => DBport,\n 'password' => DBport,\n 'database' => DBname\n ];\n if (DBtype === \"psql\")\n $db = new Psqlo($dbAccess['host'], $dbAccess['user'], $dbAccess['port'], $dbAccess['password'], $dbAccess['database']);\n else\n $db = new mysqli($dbAccess['host'], $dbAccess['user'], $dbAccess['password'], $dbAccess['database']);\n\n if ($db->connect_errno) {\n $log->write(\"Data base connection error! \" . $db->connect_error, LOG_ERROR);\n echo \"severe error\";\n die();\n }\n return $db;\n}", "title": "" }, { "docid": "d84cb961f1da76cc53cd3600b5d170b9", "score": "0.6340195", "text": "function db_get_info($info = \"\")\r\n{\r\n switch (strtolower($info)) {\r\n case \"version\":\r\n return DB_DATABASE . \" \" . raw_get_db_version() . \" with Database Wrapper \" . DB_WRAPVERSION;\r\n\r\n case \"dbtype\":\r\n return DB_DATABASE;\r\n\r\n case \"dbversion\":\r\n return raw_get_db_version();\r\n\r\n case \"wrapversion\":\r\n return DB_WRAPVERSION;\r\n }\r\n}", "title": "" }, { "docid": "d626387e2169f6d6802e377ba1ffd022", "score": "0.6323545", "text": "function getDBsettings () {\n return array (\n 'DBserver' => \"localhost\",\n 'DBname' => \"wideworldimporters\",\n 'DBport' => 3306,\n\n 'DBuser' => \"wwi\",\n 'DBpass' => ''\n );\n}", "title": "" }, { "docid": "fdca98230c30bce33bbfefa0cc761165", "score": "0.6303056", "text": "function get_db_info( $conn_name, $info_name ) {\n\texec(\"php \".SYSPATH.\"index.php --uri=doctrine/db/$conn_name/$info_name\", $output);\n\n\treturn empty($output[0]) ? NULL : $output[0];\n}", "title": "" }, { "docid": "51d29140adec4a999e796cf4267618a1", "score": "0.6286229", "text": "public function get_dbinfo()\n {\n $wpconfig = 'wp-config.php';\n\n $res = preg_grep( '/(DB_\\S+), (\\S+)/', file($wpconfig) );\n $dbinfo = null;\n foreach ( $res as $dbstr ) {\n $res = preg_match( '/\\'(\\S+)\\'\\,\\s*\\'(\\S*)\\'/', $dbstr, $matches );\n if ( $res ) {\n $dbinfo[ $matches[ 1 ] ] = $matches[ 2 ];\n }\n }\n $this->dbinfo = $dbinfo;\n return $dbinfo;\n }", "title": "" }, { "docid": "55e163cfcfc399aa71d5903f22dd414e", "score": "0.6279935", "text": "private function setupDb(){\n include('config.inc');\n }", "title": "" }, { "docid": "628674ba3eee36127a63c1b07ece4c9b", "score": "0.62679034", "text": "function dbValues() {\n return array(\n \"HOST\" => \"localhost\",\n \"USERNAME\" => \"root\",\n \"PASSWORD\" => \"\",\n \"DATABASE\" => \"mycollege\"\n );\n }", "title": "" }, { "docid": "42a24e16de74326133684cbebafcf307", "score": "0.62678057", "text": "function database_config(){\n\t\treturn array(\n\t\t\t\"username\" => \"root\",\n\t\t\t\"password\" => \"root\",\n\t\t\t\"host\" => \"localhost\",\n\t\t\t\"database\" => \"framework\"\n\t\t);\n\t}", "title": "" }, { "docid": "e7ba7f71280878cb7ba646a1eaff5c69", "score": "0.6247879", "text": "public function setDataBase($db){\n $this->mysqlCon = databaseUtil::useNewDatabase($db); \n }", "title": "" }, { "docid": "8b552aec36f55b00eda1a3a83c398bcf", "score": "0.6242223", "text": "function db_init() {\n global $config;\n global $db;\n $db = new mysqli($config['db']['hostname'], $config['db']['username'], $config['db']['password'], $config['db']['db_name']);\n if ($db->connect_errno) {\n die('Could not connect: ' . $db->connect_error);\n }\n \n}", "title": "" }, { "docid": "7d412f5a97df453843b1557e723f28a3", "score": "0.6237396", "text": "private function _db() {\n\n \\R::setup(\n 'mysql:host=' . $this->_getConfig('dbHost') . ';dbname=' .\n $this->_getConfig('dbName'),\n $this->_getConfig('dbUser'),\n $this->_getConfig('dbPassword')\n );\n\n }", "title": "" }, { "docid": "ca5110a4f58a88e43d1520afe8404f9e", "score": "0.6223431", "text": "public function getInformationArray()\n {\n $array = $this->config->get('connections')['mysql'];\n\n return $array;\n }", "title": "" }, { "docid": "07518bc65366189f5ab74ce83d8bd41f", "score": "0.62041795", "text": "protected function getDatabaseConnectionInfo() {\n // If the test is run with argument dburl then use it.\n $db_url = getenv('SIMPLETEST_DB');\n if (empty($db_url)) {\n throw new \\Exception('There is no database connection so no tests can be run. You must provide a SIMPLETEST_DB environment variable to run PHPUnit based functional tests outside of run-tests.sh. See https://www.drupal.org/node/2116263#skipped-tests for more information.');\n }\n else {\n $database = Database::convertDbUrlToConnectionInfo($db_url, $this->root);\n Database::addConnectionInfo('default', 'default', $database);\n }\n\n // Clone the current connection and replace the current prefix.\n $connection_info = Database::getConnectionInfo('default');\n if (!empty($connection_info)) {\n Database::renameConnection('default', 'simpletest_original_default');\n foreach ($connection_info as $target => $value) {\n // Replace the full table prefix definition to ensure that no table\n // prefixes of the test runner leak into the test.\n $connection_info[$target]['prefix'] = $this->databasePrefix;\n }\n }\n return $connection_info;\n }", "title": "" }, { "docid": "ece3dccf4c83a7d8daa71300fc9c2612", "score": "0.61508363", "text": "protected function connect()\n\t{\n\t\tif (self::$db === NULL)\n\t\t{\n\t\t\t// Load database, if not already loaded\n\t\t\tisset(Kohana::instance()->db) or Kohana::instance()->load->database();\n\n\t\t\t// Insert db into this object\n\t\t\tself::$db = Kohana::instance()->db;\n\n\t\t\t// Define ALL\n\t\t\tdefined('ALL') or define('ALL', -1);\n\t\t}\n\n\t\tif (empty(self::$fields[$this->table]))\n\t\t{\n\t\t\tforeach(self::$db->list_fields($this->table) as $field => $data)\n\t\t\t{\n\t\t\t\t// Cache the column names\n\t\t\t\tself::$fields[$this->table][$field] = $data;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "eff8ef2f59c3fd909f13236c30ba10c2", "score": "0.61422014", "text": "protected function init(){ \n $this->db = new MySqlDataAdapter($this->cfg['db']['hostname'], $this->cfg['db']['username'], \n $this->cfg['db']['password'], $this->cfg['db']['database']); \n }", "title": "" }, { "docid": "508379acd263645697c465e119831e84", "score": "0.6131217", "text": "private function createDatabaseConnections()\n {\n // get active LMS\n $this->fetchActiveLmsid();\n \n // get database connection information from musa.database table\n $this->fetchDatabaseConnectivityInformation();\n }", "title": "" }, { "docid": "6b4f41f58af5e57c3a7a1f7ad3a7d911", "score": "0.6116857", "text": "function dbsetup($db = NULL)\n {\n // connect to the database\n\t\t// MUST BE POPULATED\n $link = mysql_connect(\"\", \"\", \"\");\n \n if (!$link) {\n die(mysql_error());\n }\n \n if($db)\n {\n // select the database\n mysql_select_db($db);\n }\n }", "title": "" }, { "docid": "7b08dc1d0e18d9cd7655cb1279a53751", "score": "0.610193", "text": "function connect(&$db){\n\t$mycnf=\"/etc/hw5-mysql.conf\";\n\tif (!file_exists($mycnf)) { \n\t\techo \"Error file not found: $mycnf\"; \n\t\texit;\n\t}\n\n\t$mysql_ini_array=parse_ini_file($mycnf); \n\t$db_host=$mysql_ini_array[\"host\"]; \n\t$db_user=$mysql_ini_array[\"user\"];\n\t$db_pass=$mysql_ini_array[\"pass\"]; \n\t$db_port=$mysql_ini_array[\"port\"];\n\t$db_name=$mysql_ini_array[\"dbName\"];\n\n\t$db = mysqli_connect(\n\t\t$db_host, \n\t\t$db_user, \n\t\t$db_pass, \n\t\t$db_name, \n\t\t$db_port\n\t);\n\n\tif (!$db) { \n\t\tprint \"Error connecting to DB: \" . mysqli_connect_error(); \n\t\texit;\n\n\t}\n\n}", "title": "" }, { "docid": "b7bc052c349fb7cff3dc78d452b7c190", "score": "0.6095171", "text": "public function getDBConfig() {\n\t\t$this->config = $this->getConfig();\n\t\t$this->db_host = $this->config['database']['host'];\n\t\t$this->db_user = $this->config['database']['user'];\n\t\t$this->db_passwd = $this->config['database']['password'];\n\t\t$this->db_name = $this->config['database']['dbname'];\n\t\t$this->db_table = $this->config['database']['table'];\n\t\tDB::$host = $this->db_host;\n\t\tDB::$dbName = $this->db_name;\n\t\tDB::$password = $this->db_passwd;\n\t\tDB::$user = $this->db_user;\n\t}", "title": "" }, { "docid": "719b27f6b93cf0ba70616f707ad4e671", "score": "0.6075439", "text": "function zc_db_init()\n{\n\tglobal $zc, $zcFunc;\n\t\n\tif (!isset($zcFunc['db_fetch_assoc']) || $zcFunc['db_fetch_assoc'] != 'mysql_fetch_assoc')\n\t\t$zcFunc += array(\n\t\t\t'db_query' => 'zc_db_query',\n\t\t\t'db_insert' => 'zc_db_insert',\n\t\t\t'db_update' => 'zc_db_update',\n\t\t\t'db_fetch_assoc' => 'mysql_fetch_assoc',\n\t\t\t'db_fetch_row' => 'mysql_fetch_row',\n\t\t\t'db_free_result' => 'mysql_free_result',\n\t\t\t'db_insert_id' => 'mysql_insert_id',\n\t\t\t'db_num_rows' => 'mysql_num_rows',\n\t\t\t'db_num_fields' => 'mysql_num_fields',\n\t\t\t'db_escape_string' => 'addslashes',\n\t\t\t'db_unescape_string' => 'stripslashes',\n\t\t\t'db_server_info' => 'mysql_get_server_info',\n\t\t\t'db_error' => 'mysql_error',\n\t\t\t'db_select_db' => 'mysql_select_db',\n\t\t\t'db_affected_rows' => 'mysql_affected_rows',\n\t\t\t'db_title' => 'MySQL',\n\t\t);\n\n\t// this stuff we do only if zCommunity is stand-alone\n\tif (!$zc['with_software']['version'])\n\t{\n\t\tif (!empty($zc['db_persist']))\n\t\t\t$connection = @mysql_pconnect($zc['db_server'], $zc['db_user'], $zc['db_passwd']);\n\t\telse\n\t\t\t$connection = @mysql_connect($zc['db_server'], $zc['db_user'], $zc['db_passwd']);\n\n\t\tif (!$connection)\n\t\t\tzc_db_fatal_error();\n\n\t\tif (!@mysql_select_db($zc['db_name'], $connection))\n\t\t\tzc_db_fatal_error();\n\t\n\t\treturn $connection;\n\t}\n}", "title": "" }, { "docid": "bc962398d99fa211ec7d9a4a0bbbd6aa", "score": "0.60467815", "text": "public function getDatabaseInfo()\n\t{\n\t\t$r = $this->pdo->query('SELECT DATABASE()');\n\t\t$name = $r->fetchColumn();\n\t\t$r->closeCursor();\n\t\treturn array(\n\t\t\t'database' => $name,\n\t\t);\n\t}", "title": "" }, { "docid": "d7084ddc35e7a4de8607660bb8eb89f5", "score": "0.60356337", "text": "function dbInit()\n {\n if( $this->IsConnected == false )\n {\n $this->Database = new eZDB( \"site.ini\", \"site\" );\n $this->IsConnected = true;\n }\n }", "title": "" }, { "docid": "2c315a80b9d2b1fed462afc87535862a", "score": "0.6033395", "text": "protected function assignDbFieldsAndTableNames() \n\t{\n\t\t$this->dbParamsTableName = $this->connection->addTableWrappers( $this->paramsTableName );\n\t\t$this->dbTypeFieldName = $this->connection->addFieldWrappers( \"TYPE\" );\n\t\t$this->dbDataFieldName = $this->connection->addFieldWrappers( \"SEARCH\" );\n\t\t$this->dbTableNameFieldName = $this->connection->addFieldWrappers( \"TABLENAME\" );\n\t\t$this->dbCookieFieldName = $this->connection->addFieldWrappers( \"COOKIE\" );\n\t\t$this->dbUserNameFieldName = $this->connection->addFieldWrappers( \"USERNAME\" );\t\n\t\t$this->dbNameFieldName = $this->connection->addFieldWrappers( \"NAME\" );\t\n\t}", "title": "" }, { "docid": "bda3de787add527711c57dd2d6efa154", "score": "0.60258144", "text": "public function get_db_configuration()\n {\n $yana = $this->_getApplication();\n\n $yana->setVar(\"DATABASE_ACTIVE\", YANA_DATABASE_ACTIVE);\n $yana->setVar(\"DATABASE_DBMS\", YANA_DATABASE_DBMS);\n $yana->setVar(\"DATABASE_HOST\", YANA_DATABASE_HOST);\n $yana->setVar(\"DATABASE_PORT\", YANA_DATABASE_PORT);\n $yana->setVar(\"DATABASE_USER\", YANA_DATABASE_USER);\n $yana->setVar(\"DATABASE_PASSWORD\", YANA_DATABASE_PASSWORD);\n $yana->setVar(\"DATABASE_NAME\", YANA_DATABASE_NAME);\n $yana->setVar(\"YANA_DATABASE_ACTIVE\", YANA_DATABASE_ACTIVE);\n $DATABASE_LIST = \\Yana\\Db\\Ddl\\DDL::getListOfFiles();\n $yana->setVar(\"DATABASE_LIST\", $DATABASE_LIST);\n }", "title": "" }, { "docid": "9b967e57b6f474deb2d2d993da4d9f6f", "score": "0.5996494", "text": "function dbConnect() {\n global $config, $dbConnection;\n\n $dbConnection = mysql_connect($config['dbHost'], $config['dbUser'], $config['dbPwd']);\n if (!$dbConnection) {\n internalError(\"Failed to connect to database: \".mysql_error());\n }\n\n mysql_select_db($config['dbName'], $dbConnection);\n}", "title": "" }, { "docid": "0cf04b55da6c247eba116cc6f113ac43", "score": "0.5991549", "text": "public function getMySqlConnectionInfo()\n {\n $connectionInfo = null;\n list($dbType, $dbInfo) = explode(':', $this->dbConnection, 2);\n\n if (strcasecmp($dbType, 'MySQL') === 0) {\n $connectionInfo = explode(':', $dbInfo);\n }\n\n return $connectionInfo;\n }", "title": "" }, { "docid": "5764dcb16724027f3469802547f2e114", "score": "0.59831655", "text": "static function defaults($db_type='mysqli')\n\t{\n\t\tswitch($db_type)\n\t\t{\n\t\t\tcase 'mysql':\n\t\t\tdefault:\n\t\t\t\t$db_type = $meta_db = 'mysql';\n\t\t\t\tbreak;\n\t\t\tcase 'pgsql':\n\t\t\t\t$meta_db = 'template1';\n\t\t\t\tbreak;\n\t\t}\n\t\treturn array(\n\t\t\t'db_type' => $db_type,\n\t\t\t'db_host' => 'localhost',\n\t\t\t'db_port' => 3306,\n\t\t\t'db_name' => 'egw_$domain',\n\t\t\t'db_user' => 'egw_$domain',\n\t\t\t'db_pass' => self::randomstring(),\n\t\t\t'db_root' => 'root',\n\t\t\t'db_root_pw' => '',\t// not really a default\n\t\t\t'db_meta' => $meta_db,\n\t\t\t'db_charset' => 'utf-8',\n\t\t\t'db_grant_host' => 'localhost',\n\t\t);\n\t}", "title": "" }, { "docid": "6e97a3a23281d8ce5386dfe6b5dfa40e", "score": "0.5979959", "text": "public function setupDatabase()\n {\n foreach($this->db_structure as $key => $value){\n switch ($key) {\n case 'tables':\n foreach($value as $table_name => $table_fields){\n\n // minimum 2 fields in table requirement\n if(count($table_fields) < 2){\n return 'Missing table fields for ' . $table_name;\n }\n\n // form query for creating table\n $this->create_table($table_name);\n\n // form query for creating table fields\n $this->create_table_fields($table_fields);\n\n // execute query\n return $this->run_query();\n }\n break;\n\n default:\n # code...\n break;\n }\n }\n }", "title": "" }, { "docid": "912bfdaf369f65a9b1ad705390907717", "score": "0.5967328", "text": "private function initDatabase() {\n $this->database = @new mysqli(\n self::LOCATION,\n self::USERNAME,\n self::PASSWORD,\n self::DATABASE\n );\n if ($this->checkDatabaseConn() == FALSE) die(htmlspecialchars_decode(self::ERRMSG_CONN));\n }", "title": "" }, { "docid": "339db58646ce5c8374b8aa86522afe6d", "score": "0.5962998", "text": "function dbStructure()\n\t{\n\t\t$tables = mysql_list_tables($this->dbname);\n\t\t$num_tables = mysql_num_rows($tables);\n\t\t\n\t\t//Select the current Database and Print.\n\t\t$row=mysql_fetch_row(mysql_query(\"SELECT DATABASE()\"));\n\t\techo \"<br />\";\n\t\techo \"<span class='HeadText18'><b>Database Name:</b></span><span class='ContText14'> [ \".$row[0].\" ]</span>\";\n\t\techo \"<br /><br />\";\n\t\n\t\t$i = 0;\n\t\twhile($num_tables > $i)\n\t\t{\n\t\t\t//Get Table name from array;\n\t\t\t$TableName = mysql_tablename($tables, $i);\n\t\t\t$fields = mysql_db_query($this->dbname, \"SHOW FIELDS FROM \".$TableName) or die(mysql_error());\n\t\t\t$output .= \"<table class='ContText14' border=1 width=650 bordercolor='#C5E2C5'>\";\n\t\t\t$output .= \"<tr bgcolor='#C5E2C5'><td colspan=6>&nbsp;<b>Table Name:</b> \".$TableName.\"</td></tr>\";\n\t\t\t$output .= \"<tr><td height=5 colspan=6></td></tr>\";\n\t\t\t$output .= \"<tr bgcolor='#EEEEDD'>\"\n\t\t\t\t\t\t\t.\"<td>&nbsp;<b>Field Name</b></td>\"\n\t\t\t\t\t\t\t.\"<td>&nbsp;<b>Type</b></td>\"\n\t\t\t\t\t\t\t.\"<td>&nbsp;<b>Null</b></td>\"\n\t\t\t\t\t\t\t.\"<td>&nbsp;<b>Key</b></td>\"\n\t\t\t\t\t\t\t.\"<td>&nbsp;<b>Default</b></td>\"\n\t\t\t\t\t\t\t.\"<td>&nbsp;<b>Extra</b></td>\"\n\t\t\t\t\t\t.\"</tr>\";\n\t\t\t\n\t\t\t//Get column content.\n\t\t\twhile($row=mysql_fetch_array($fields))\n\t\t\t{\n\t\t\t\t$output .=\"<tr bgcolor='#EEEEDD'>\"\n\t\t\t\t\t\t\t.\"<td>&nbsp;\".$row[\"Field\"].\"</td>\"\n\t\t\t\t\t\t\t.\"<td>&nbsp;\".$row[\"Type\"].\"</td>\"\n\t\t\t\t\t\t\t.\"<td>&nbsp;\".$row[\"Null\"].\"</td>\"\n\t\t\t\t\t\t\t.\"<td>&nbsp;\".$row[\"Key\"].\"</td>\"\n\t\t\t\t\t\t\t.\"<td>&nbsp;\".$row[\"Default\"].\"</td>\"\n\t\t\t\t\t\t\t.\"<td>&nbsp;\".$row[\"Extra\"].\"</td>\"\n\t\t\t\t\t\t.\"</tr>\";\n\t\t\t}\n\t\t\t\n\t\t\t$output .=\"</table><br /><br />\";\n\t\n\t\t\t$i++;\n\t\t}\n\t\n\t\techo $output;\n\t}", "title": "" }, { "docid": "24872359882678343ef1862f0e325bea", "score": "0.59604585", "text": "function setConnectionInfo(){\n $connString='mysql:host=localhost;dbname=sushisamadb';\n $user='root';\n $password='';\n //Actual connection to database with this line\n $pdo=new PDO($connString, $user, $password);\n $pdo->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);\n return $pdo;\n }", "title": "" }, { "docid": "555774a0e2cf18712731a95d87baffe4", "score": "0.59514177", "text": "public abstract function getDb() : \\mysqli;", "title": "" }, { "docid": "b41af217e41dee767f36ced372a542dc", "score": "0.59508765", "text": "private function initialize() {\n\t\t$this->db_host = VCDConfig::getDatabaseHost();\n\t\t$this->db_catalog = VCDConfig::getDatabaseName();\n\t\t$this->db_username = VCDConfig::getDatabaseUser();\n\t\t$this->db_password = VCDConfig::getDatabasePassword();\n\t\t$this->db_type = VCDConfig::getDatabaseType();\n\t}", "title": "" }, { "docid": "a44fe4e38238fd6ef68d7ac90c15f778", "score": "0.5949602", "text": "function fetchDbList()\n\t{\n\t\t$result = array();\n\t\t$result[ $this->data[ 'mysql_db' ] ] = array( \t'User'\t\t=> $this->data[ 'mysql_user' ],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Password'\t=> $this->data[ 'mysql_pass' ],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Database'\t=> $this->data[ 'mysql_db' ],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Server' \t=> $this->data[ 'mysql_host' ],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'File'\t\t=> $this->data[ 'mysql_file' ] );\n\t\tif ( isset($this->data[ 'additional_mysql' ]) and is_array( $this->data[ 'additional_mysql' ] ) )\n\t\t{\n\t\t\tforeach( $this->data[ 'additional_mysql' ] as $additional_mysql )\n\t\t\t{\n\t\t\t\tif ( trim($additional_mysql[ 'user' ]) == '' )\n\t\t\t\t{\n\t\t\t\t\t$user = $this->data[ 'mysql_user' ];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$user = $additional_mysql[ 'user' ];\n\t\t\t\t}\n\t\t\t\tif ( trim($additional_mysql[ 'pass' ]) == '' )\n\t\t\t\t{\n\t\t\t\t\t$pass = $this->data[ 'mysql_pass' ];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$pass = $additional_mysql[ 'pass' ];\n\t\t\t\t}\n\t\t\t\tif ( trim($additional_mysql[ 'host' ]) == '' )\n\t\t\t\t{\n\t\t\t\t\t$host = $this->data[ 'mysql_host' ];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$host = $additional_mysql[ 'host' ];\n\t\t\t\t}\n\t\t\t\tif ( trim( $additional_mysql[ 'db' ] ) != '' )\n\t\t\t\t{\n\t\t\t\t\t$result[$additional_mysql['db']] = array( \t'User'\t\t=> $user,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Password'\t=> $pass,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Database'\t=> $additional_mysql['db'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Server'\t=> $host,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'File'\t\t=> $additional_mysql['db'].'.sql' );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "6e7d946e965eac31170324fbe60e966f", "score": "0.5939926", "text": "static public function init_db()\n\t{\n\t\trequire_once(\"system/libraries/rb.php\");\n\t\t\n\t\t$connection_string = 'mysql:dbname='.DB_NAME.';host='.DB_HOST;\n\t\t\n\t\tR::setup($connection_string, DB_USER, DB_PASSWORD);\n\t\tR::debug(true);\n\t}", "title": "" }, { "docid": "902715f1002369f01fd50c0c5a385315", "score": "0.5936789", "text": "public function db($database = null, array $config = []);", "title": "" }, { "docid": "a6131ef4b0ab4224b15f2bd6c8cc19c4", "score": "0.59313256", "text": "private function initDB() {\n// Uncomment to init the database without wrapper class. Works the same both ways.\n// $config = App::getInst()->getConfig();\n// $this->pdo = new \\PDO(\n// 'mysql:host=' . $config['db']['host'] . ';dbname=' . $config['db']['db_name'],\n// $config['db']['username'],\n// $config['db']['password']\n// );\n $this->pdo = DatabaseConnection::get()->getRawConnection();\n\n $this->pdo->exec(\"SET NAMES 'utf8'\");\n }", "title": "" }, { "docid": "454d61fd5a7597db00a30bfe31f4c6ac", "score": "0.5929517", "text": "function create_db_conn_constants(){\n\n // EXPECTED ENV VAR FORMAT: mysql://NEWUSER:NEWPASS@NEWHOST:3306/NEWDATABASE\n $db_conn = getenv('JAWSDB_MARIA_URL', true) ?: getenv('JAWSDB_MARIA_URL');\n\n if(empty($db_conn)) {\n\n // DEV:\n // No hosting database environment connection string found;\n // we must in development.\n\n ob_start();\n $db['db_host'] = 'localhost';\n $db['db_name'] = 'ctest';\n $db['db_user'] = 'ctest_user';\n $db['db_pass'] = 'HemDyZSKxCF2Uk21';\n\n } else {\n\n // PROD:\n // We're in production\n // Time to parse the db connection string for our db login parameters \n // NOTE: Regexes created with help from: https://www.phpliveregex.com\n\n preg_match('/^.+:\\/\\/.+:.+@(.+):.+$/U', $db_conn, $match_list);\n $db['db_host'] = $match_list[1];\n\n preg_match('/^.+\\/(.+)$/', $db_conn, $match_list);\n $db['db_name'] = $match_list[1];\n\n preg_match('/^.+:\\/\\/(.+):.+$/U', $db_conn, $match_list);\n $db['db_user'] = $match_list[1];\n\n preg_match('/^.+:\\/\\/.+:(.+)@.+$/U', $db_conn, $match_list);\n $db['db_pass'] = $match_list[1]; \n\n preg_match('/^.+:(\\d+)\\/.+$/', $db_conn, $match_list);\n $db['db_port'] = $match_list[1];\n\n }\n\n // Turn DB vars into constants\n foreach($db as $key => $value){\n define(strtoupper($key), $value);\n }\n\n}", "title": "" }, { "docid": "fa87b6f27e8339446e7c1215790fb422", "score": "0.59148717", "text": "public function connect($db = NULL);", "title": "" }, { "docid": "f938e47f465a081242adf9f49c505456", "score": "0.5912469", "text": "private function fetchDatabaseConnectivityInformation()\n {\n $aSelect = array('aat_lms.lms_id','db_host','db_port','db_name','db_user','db_pass');\n $aFrom = array('aat_lms','aat_database');\n $aWhere = array('aat_lms.lms_id = ' . $_SESSION['AAT']['ActiveLMS'], 'aat_database.lms_id = aat_lms.lms_id');\n $aaResult = $this->oMusa->fetchData($aSelect,$aFrom,$aWhere);\n foreach ($aaResult as $aRow)\n {\n //$this->aaConnections[] = $aRow;\n\t\t\t//todo: add port col to database table and remove port hardcode\n $conn = new Database($aRow[1],$aRow[2],$aRow[3],$aRow[4],$aRow[5]) or die ('cannot connect to database');\n $conn->connect();\n $this->aaConnections[] = array($aRow[0],$aRow[3],$conn);\n }\n }", "title": "" }, { "docid": "ec9f4e7588e8a68092ad7f7b9104f948", "score": "0.5908719", "text": "private function _getConnectionParamters() {\n // Load the database ini config\n $config = new \\Utility\\Config();\n $config::loadFromIni(\"database\");\n\n // Return formatted connection params\n return array(\n 'host' => $config::getSetting(\"mysql-hostname\"),\n 'dbname' => $config::getSetting(\"mysql-database\"),\n 'user' => $config::getSetting(\"mysql-username\"),\n 'pass' => $config::getSetting(\"mysql-password\"),\n 'charset' => $config::getSetting(\"mysql-charset\")\n );\n }", "title": "" }, { "docid": "1383618a88776b2cff31c66fe2aabe1a", "score": "0.5905017", "text": "function connect() {\n\n //insert the global variables inside this function\n global $serverInfo;\n\n //Create connection\n $conn = new mysqli($serverInfo[0], $serverInfo[1], $serverInfo[2], $serverInfo[3]);\n\n //Check connection\n if ($conn->connect_error) {\n die(\"Connection failed: \" . $conn->connect_error);\n }\n\n return $conn;\n}", "title": "" }, { "docid": "2cb3d389e65928107ce019849521abaf", "score": "0.58980644", "text": "abstract public function getDb();", "title": "" }, { "docid": "cb211a79d68a3c95921ea0d16bab6346", "score": "0.58940125", "text": "function DB_Connect_and_Upgrade()\n{\n global $dbPrefix;\n\n include(dirname(__FILE__).\"/../server/config/get-config.php\");\n\n if (!isset($dbType)) {\n $dbType = 'mysql';\n }\n\n if (!isset($dbServer)) {\n $dbServer = 'localhost';\n }\n\n if (!isset($dbPrefix)) {\n $dbPrefix = 'na';\n }\n\n c_comdef_dbsingleton::init($dbType, $dbServer, $dbName, $dbUser, $dbPassword, 'utf8');\n\n // Migration code that used to be here was moved to a laravel migration\n}", "title": "" }, { "docid": "223ac95d1f256a10021ae13f30325a2a", "score": "0.58913517", "text": "public function setConnectionDb($app_config = array())\n\t{\n\t\tif ($this->getEnvironmentStatus() == 'production') {\n\t\t\tif (isset($app_config[$this->getNameApplication()]['db_production'])) {\n\t\t\t\t$this->setDbConfig($app_config[$this->getNameApplication()]['db_production']);\n\t\t\t}\n\t\t} else if ($this->getEnvironmentStatus() == 'sandbox') {\n\t\t\tif (isset($app_config[$this->getNameApplication()]['db_sandbox'])) {\n\t\t\t\t$this->setDbConfig($app_config[$this->getNameApplication()]['db_sandbox']);\n\t\t\t}\n\t\t} else if ($this->getEnvironmentStatus() == 'staging') {\n\t\t\tif (isset($app_config[$this->getNameApplication()]['db_staging'])) {\n\t\t\t\t$this->setDbConfig($app_config[$this->getNameApplication()]['db_staging']);\n\t\t\t}\n\t\t} else if ($this->getEnvironmentStatus() == 'testing') {\n\t\t\tif (isset($app_config[$this->getNameApplication()]['db_testing'])) {\n\t\t\t\t$this->setDbConfig($app_config[$this->getNameApplication()]['db_testing']);\n\t\t\t}\n\t\t} else if ($this->getEnvironmentStatus() == 'development') {\n\t\t\tif (isset($app_config[$this->getNameApplication()]['db_development'])) {\n\t\t\t\t$this->setDbConfig($app_config[$this->getNameApplication()]['db_development']);\n\t\t\t}\n\t\t}\n\n\t\t$db = $this->getDbConfig();\n\t\tif (isset($db) && !empty($db['host']) && !empty($db['username']) && !empty($db['password']) && !empty($db['database'])) {\n\t\t\t$GLOBALS['CONN'] = ADONewConnection('mysqli'); # eg. 'mysql','mysqlI' or 'oci8'\n\t\t\t$GLOBALS['CONN']->Connect($db['host'], $db['username'], $db['password'], $db['database']);\n\t\t\t$GLOBALS['CONN']->Execute(\"SET NAMES '\" . $db['encoding'] . \"'\");\n\t\t\t$GLOBALS['CONN']->Execute(\"SET character_set_connection=\" . $db['encoding']);\n\t\t\t$GLOBALS['CONN']->Execute(\"SET character_set_client=\" . $db['encoding']);\n\t\t\t$GLOBALS['CONN']->Execute(\"SET character_set_results=\" . $db['encoding']);\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "42f199de6f38f845b445d7396a0a19de", "score": "0.58775324", "text": "public function createDBConfig()\n {\n Config::set(\n 'database.connections.olddb',\n [\n 'driver' => 'mysql',\n 'host' => $this->option('host') ?? '127.0.0.1',\n 'database' => $this->argument('old_db'),\n 'username' => 'root',\n 'password' => $this->option('pass'),\n 'collation' => 'utf8_general_ci',\n 'charset' => 'utf8',\n ]\n );\n }", "title": "" }, { "docid": "39d08e224e5f6f82b3886a51c8a6cb1a", "score": "0.5862214", "text": "function sumarios_get_db_list() {\n\n\t$db = array('mysqli' => moodle_database::get_driver_instance('mysqli', 'native'),\n 'pgsql' => moodle_database::get_driver_instance('pgsql', 'native'),\n 'oci' => moodle_database::get_driver_instance('oci', 'native'),\n 'sqlsrv' => moodle_database::get_driver_instance('sqlsrv', 'native'), // MS SQL*Server PHP driver\n 'mssql' => moodle_database::get_driver_instance('mssql', 'native') // FreeTDS driver\n\t);\n\treturn $db;\n}", "title": "" }, { "docid": "7598e858b1d91377b7c6e23ea368a9a5", "score": "0.5851549", "text": "private function _setupDb()\n\t{\n\t\tsetupImvaOxid2Cr::activate();\n\t}", "title": "" }, { "docid": "5b21848e4519aec5296cb4c884fe8dbf", "score": "0.58506507", "text": "function getMainDB1(){\n\t$host = 'localhost';\n\t$port = '3306';\n\t$database = 'arcsight';\n\t$username = 'root';\n\t$password = '';\n\treturn new DB\\SQL(\n\t\t'mysql:host=' . $host . ';port=' . $port . ';dbname=' . $database,\n\t\t$username,\n\t\t$password\n\t);\n}", "title": "" }, { "docid": "26b1e30eb2779cdab094381e1bcc8493", "score": "0.583979", "text": "function db_connection($type=\"\") { }", "title": "" }, { "docid": "6536d8b10558577fd49a33422bee245e", "score": "0.58349067", "text": "function drush_sqlinit_sql_inti() {\n\n if (drush_get_option('db-url', FALSE)) {\n $db_spec['db-url'] = $GLOBALS['db_url'];\n }\n\n if (!isset($db_spec)) {\n $db_spec = drush_sql_conf();\n }\n\n drush_backend_set_result($db_spec);\n\n if ($db_spec['driver'] != 'mysql') {\n drush_log(dt('Unable to connect to the driver, mysql is the only supported driver'), 'error');\n return FALSE;\n }\n\n $root_url = 'mysql://root@' . $db_spec['host'];\n // Connect as root.\n $root = drush_convert_db_from_db_url($root_url);\n\n mysql_connect($root['host'], $root['username'], $root['password']);\n\n // Create the database.\n mysql_query('CREATE DATABASE `' . $db_spec['database'] . '`');\n\n // Make sure our user can write to it.\n $grant_query = 'GRANT ALL PRIVILEGES ON `' . $db_spec['database'] . '`.* TO \\'' . $db_spec['username'] . '\\'@\\'localhost\\'';\n if (isset($db_spec['password'])) {\n $grant_query .= ' IDENTIFIED BY \\'' . $db_spec['password'] . '\\'';\n }\n mysql_query($grant_query);\n\n return drush_log(dt('Database (@database) and user (@user) created', array('@user' => $db_spec['username'], '@database' => $db_spec['database'])), 'success');\n}", "title": "" }, { "docid": "3bf1ca07f77798a86e21e968221b91c9", "score": "0.5830662", "text": "private function Setup_MySQL($database)\n\t{\n\t\t// Close the connection if called again or the database is different\n\t\tif($this->server['db'] != $database && isset($this->mysql))\n\t\t{\n\t\t\t$this->mysql->Close_Connection();\n\t\t\tunset($this->mysql);\n\t\t}\n\t\telseif(isset($this->mysql))\n\t\t{\n\t\t\t// Don't reconnect if using the same db\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tswitch($database)\n\t\t{\n\t\t\tcase LDB_DB:\n\t\t\t\tswitch(MODE)\n\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\tcase \"local\":\n\t\t\t\t\t\t$this->server = array( \n\t\t\t\t\t\t\t\"host\" => \"db101.clkonline.com:3308\",\n\t\t\t\t\t\t\t\"user\" => \"ldb_writer\",\n\t\t\t\t\t\t\t\"db\" => \"ldb\",\n\t\t\t\t\t\t\t\"password\" => \"password\");\n\t\t\t\t\tbreak;\n\t\t\t\n\t\t\t\t\tcase \"rc\":\n\t\t\t\t\t\t$this->server = array( \n\t\t\t\t\t\t\t\"host\" => \"db101:3308\",\n\t\t\t\t\t\t\t\"user\" => \"ldb_writer\",\n\t\t\t\t\t\t\t\"db\" => \"ldb\",\n\t\t\t\t\t\t\t\"password\" => \"password\");\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase \"live\":\n\t\t\t\t\t\t$this->server = array( \n\t\t\t\t\t\t\t\"host\" => \"db3\",\n\t\t\t\t\t\t\t\"user\" => \"olp\",\n\t\t\t\t\t\t\t\"db\" => \"ldb\",\n\t\t\t\t\t\t\t\"password\" => \"password\");\n\t\t\t\t\tbreak;\t\t\t\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase OLP_DB:\n\t\t\t\tswitch(MODE)\n\t\t\t\t{\n\t\t\t\t\tcase \"local\":// Set MySQL conn vars\n\t\t\t\t\t\t$this->server = array(\"db\"\t\t=> \"olp\",\n\t\t\t\t\t\t\t\t\t\t\"host\"\t\t=> \"monster.tss:3310\",\n\t\t\t\t\t\t\t\t\t\t\"user\"\t\t=> \"olp\",\n\t\t\t\t\t\t\t\t\t\t\"password\"\t=> \"password\");\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase \"rc\":\n\t\t\t\t\t\t$this->server = array(\"db\"\t\t=> \"rc_olp\",\n\t\t\t\t\t\t\t\t\t\t\"host\"\t\t=> \"db101.clkonline.com\",\n\t\t\t\t\t\t\t\t\t\t\"user\"\t\t=> \"sellingsource\",\n\t\t\t\t\t\t\t\t\t\t\"password\"\t=> \"password\");\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase \"live\":\n\t\t\t\t\t\t$this->server = array(\"db\"\t\t=> \"olp\",\n\t\t\t\t\t\t\t\t\t\t\"host\"\t\t=> \"olpdb.internal.clkonline.com\",\n\t\t\t\t\t\t\t\t\t\t\"user\"\t\t=> \"sellingsource\",\n\t\t\t\t\t\t\t\t\t\t\"password\"\t=> \"password\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\ttry\n\t\t{\n\t\t\t$this->mysql = new MySQL_4($this->server['host'], $this->server['user'], $this->server['password']);\n\t\t\t$this->mysql->Connect();\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\tprint $e->getMessage();\n\t\t\tdie();\n\t\t}\n\t}", "title": "" }, { "docid": "e350d9743cb7d3be91a325f6668a0513", "score": "0.58294076", "text": "function db_connector() {\n\t\t$attributes = array(\n\t\t\t\\PDO::ATTR_PERSISTENT => true,\n\t\t\t\\PDO::ATTR_ERRMODE => \\PDO::ERRMODE_EXCEPTION\n\t\t);\n\n\t\t$this->db = new \\PDO( 'mysql:host=' . DB_HOST . ';dbname=' . DB_NAME, DB_USER, DB_PASS, $attributes );\n\t}", "title": "" }, { "docid": "1e1d56b5e5c71ca3ef42336e113e7942", "score": "0.5827096", "text": "function db() {\n\t$endPoints = checkConnections();\n\n\t/*$dbos = array();\n\tforeach($endPoints as $endPoint) {\n\t\tif($endPoint[\"Online\"] = \"Yes\") {\n\t\t\t$dbos[$endPoint[\"Region\"]] = $endPoint[\"IP\"];\n\t\t}\n\t\t\n\t}*/\n\t/*$dbos = array(\n\t\t\"EU\" => \"52.169.151.180\",\n\t\t\"NA\" => \"52.164.184.175\",\n\t\t\"AS\" => \"40.69.220.19\"\n\t);*/\n\t$i = 0;\n\ttry {\n\t\tforeach ($endPoints as $endPoint) {\n\t\t\tif($endPoint[\"Online\"] == \"Yes\") {\n\t\t\t\t$region = $endPoint[\"Region\"];\n\t\t\t\t${\"db$region\"} = new PDO('mysql:host=' . $endPoint[\"IP\"] . ';dbname=' . $endPoint[\"Name\"] . ';charset=utf8', 'app', 'app');\n\t\t\t\t#array_push($connections, ${\"db$region\"});\n\t\t\t\t$endPoints[$i][\"conn\"] = ${\"db$region\"};\n\t\t\t} else {\n\t\t\t\t$endPoints[$i][\"conn\"] = NULL;\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\n\t} catch (PDOException $e){\n\t\techo \"Connection failed: \" . $e->getMessage();\n\t}\n\n\t$returnCode = 0;\n\t#var_dump($endPoints);\n\tif($_GET[\"p\"]==\"getOrders\"){\n\t\tgetOrders($endPoints);\n\t}elseif($_GET[\"p\"]==\"getAllOrders\") {\n\t\tgetAllOrders($endPoints);\n\t} elseif($_GET[\"p\"]==\"getAccountInfo\") {\n\t\tgetAccountInfo();\n\t} elseif($_GET[\"p\"]==\"register\") {\n\t\tregister($endPoints);\n \t} elseif($_GET[\"p\"]==\"login\") {\n\t\tlogin($endPoints);\n\t} elseif($_GET[\"p\"]==\"getOrderDetails\") {\n\t\t$returnCode = 0;\n\t} elseif($_GET[\"p\"]==\"makeOrder\") {\n\t\tmakeOrder($endPoints);\n\t} elseif($_GET[\"p\"]==\"logout\") {\n\t\tlogout();\n\t} elseif($_GET[\"p\"]==\"sync\") {\n\t\tsync($endPoints);\n\t} else {\n\t\thandlerError();\n\t}\n\t\n\t\n}", "title": "" }, { "docid": "7de73a4e7c9ce51d57a910bd13943004", "score": "0.58237803", "text": "public static function database() {\n return array(\n 'host' => '127.0.0.1',\n 'port' => '8889',\n 'dbname' => 'yago2',\n 'user' => 'root',\n 'password' => 'root'\n );\n }", "title": "" }, { "docid": "41fa0997bfe4306acec2cd3cf58210e1", "score": "0.58101714", "text": "function dbinit()\n {\n \n }", "title": "" }, { "docid": "85d84b5c10401d6c0b6e37f01997375e", "score": "0.5810108", "text": "function _setup_database() {\n $_db['hostname'] = $this->input->post('host');\n $_db['username'] = $this->input->post('db_user');\n $_db['password'] = $this->input->post('db_password');\n $_db['database'] = $this->input->post('db_name');\n $_db['dbdriver'] = $this->db_driver;\n $_db['dbprefix'] = $this->db_prefix;\n $_db['char_set'] = $this->db_char_set;\n $_db['dbcollat'] = $this->db_dbcollat;\n\n // Update config/database.php file\n return $this->config->db_config_update($_db);\n }", "title": "" }, { "docid": "5f33368a51a48c802181cde4a200cf78", "score": "0.57931554", "text": "public function connect(...$dbname) {\n global $db;\n\n //Check db settings array\n if(is_array($db)) {\n $db_setting_array=$db;\n } else {\n exit(\"Invalid database setting array\");\n }\n\n //Get dbname\n if(is_array($dbname)) {\n $db_name=$dbname;\n } else {\n $db_name=array($dbname);\n }\n\n //Parse database settings\n $this->db_setting=$this->parse_db($db_setting_array, $db_name);\n\n //Initialize database connection\n $this->load_driver($this->db_setting, $db_name);\n }", "title": "" }, { "docid": "70a3e599f8879a54ad4dc59afddcb8bb", "score": "0.5793109", "text": "protected function parseDatabase()\n {\n $default = config('database.default');\n if (empty($config = getenv($this->database))) {\n return;\n }\n\n if ($url = parse_url($config)) {\n config([\"database.connections.$default.driver\" => 'mysql']);\n if (isset($url['scheme']) && $url['scheme'] === 'postgres') {\n config([\"database.connections.$default.driver\" => 'pgsql']);\n }\n\n if (isset($url['host'])) {\n config([\"database.connections.$default.host\" => $url['host']]);\n }\n\n if (isset($url['port'])) {\n config([\"database.connections.$default.port\" => $url['port']]);\n }\n\n if (isset($url['path'])) {\n config([\"database.connections.$default.database\" => substr($url['path'], 1)]);\n }\n\n if (isset($url['user'])) {\n config([\"database.connections.$default.username\" => $url['user']]);\n }\n\n if (isset($url['pass'])) {\n config([\"database.connections.$default.password\" => $url['pass']]);\n }\n }\n }", "title": "" }, { "docid": "9c383302c0b077e7d19208a2b410d017", "score": "0.5780906", "text": "public function setDbConfig()\n {\n if ($this->config['db']) {\n define('DB_HOST', $this->config['db']['host']);\n define('DB_NAME', $this->config['db']['dbname']);\n define('DB_USER', $this->config['db']['username']);\n define('DB_PASS', $this->config['db']['password']);\n }\n }", "title": "" }, { "docid": "5122b1314450c28ac77342571f2caca1", "score": "0.57778883", "text": "function get_db_info( $conn_name ) {\n\tob_start();\n\t\tpassthru(\"php \".DOCROOT.\"index.php --uri=doctrine/get_db_info/$conn_name\", $output);\n\treturn ob_get_clean();\n}", "title": "" }, { "docid": "ff4988aab5b15042f43618cd69456416", "score": "0.5770923", "text": "function DBManager() {\r\n\t\t$this->dbCon = $this->login();\r\n\t}", "title": "" }, { "docid": "763c804bbb72d23526d784d5edaa7bc9", "score": "0.5766963", "text": "function populate_fullDB($domain_id, $table){\n\t\n\t\t/*\n\t\t * Get field of table\n\t\t */\n\t\t\n\t\t\n\t\t$link_main = @mysql_connect(\"192.168.1.253\",\"root\",\"arca7\");\n\t\tmysql_query(\"SET NAMES 'utf8'\");\n\t\tmysql_query('SET character_set_connection=utf8');\n\t\tmysql_query('SET character_set_client=utf8');\n\t\tmysql_query('SET character_set_results=utf8');\n\t\tif(!mysql_select_db(\"new_demodirectory-domain_1\",$link_main)){\n\t\t\techo \"constructor: select_db\";\n\t\t}\n\t\t\n\t\t$sql = \"desc \".$table;\n\t\t$result = mysql_query($sql, $link_main);\n\t\tif(mysql_num_rows($result)){\n\t\t\tunset($array_fields);\n\t\t\twhile($row = mysql_fetch_assoc($result)){\n\t\t\t\tif($row[\"Field\"] != \"domain_id\"){\n\t\t\t\t\t$array_fields[] = $row[\"Field\"]; \n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t/*\n\t\t * Get info second DB\n\t\t */\n\t\t$sql_connection = \"SELECT database_host, database_port, database_username, database_password, database_name FROM Domain WHERE id = \".$domain_id;\n\t\t$result_connection = mysql_query($sql_connection,$link_main);\n\t\tif(mysql_num_rows($result_connection)){\n\t\t\t$info_db = mysql_fetch_assoc($result_connection);\n\t\t\t\n\t\t\t/*\n\t\t\t * Connect with second DB\n\t\t\t */\n\t\t\t$link1 = @mysql_connect(\"192.168.1.253\",\"root\",\"arca7\");\n\t\t\tmysql_query(\"SET NAMES 'utf8'\");\n\t\t\tmysql_query('SET character_set_connection=utf8');\n\t\t\tmysql_query('SET character_set_client=utf8');\n\t\t\tmysql_query('SET character_set_results=utf8');\n\t\t\t\n\t\t\t$link_id = @mysql_connect($info_db[\"database_host\"],$info_db[\"database_username\"],$info_db[\"database_password\"]);\n\t\t\tmysql_query(\"SET NAMES 'utf8'\");\n\t\t\tmysql_query('SET character_set_connection=utf8');\n\t\t\tmysql_query('SET character_set_client=utf8');\n\t\t\tmysql_query('SET character_set_results=utf8');\n\n\t\t\tif ($link_id) {\n\t\t\t\tif(!mysql_select_db($info_db[\"database_name\"],$link_id)){\n\t\t\t\t\techo \"constructor: select_db\";\n\t\t\t\t}else{\n\t\t\t\t\t\n\t\t\t\t\t/*\n\t\t\t\t\t * Get information of table in main DB\n\t\t\t\t\t */\n\t\t\t\t\tif(!mysql_select_db(\"yellowplaza\",$link1)){\n\t\t\t\t\t\techo \"constructor: select_db\";\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$sql_main = \"select \".implode(\",\",$array_fields).\" from \".$table;\n\t\t\t\t\t$result_main = mysql_query($sql_main,$link1);\n\t\t\t\t\tif(mysql_num_rows($result_main)){\n\t\t\t\t\t\t$link_id = @mysql_connect(\"192.168.1.253\",\"root\",\"arca7\");\n\t\t\t\t\t\tmysql_query(\"SET NAMES 'utf8'\");\n\t\t\t\t\t\tmysql_query('SET character_set_connection=utf8');\n\t\t\t\t\t\tmysql_query('SET character_set_client=utf8');\n\t\t\t\t\t\tmysql_query('SET character_set_results=utf8');\n\t\t\t\t\t\tif(!mysql_select_db(\"new_demodirectory-domain_2\",$link_id)){\n\t\t\t\t\t\t\techo \"constructor: select_db\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile($row_main_table = mysql_fetch_array($result_main)){\n\t\t\t\t\t\t\tunset($array_main_table);\n\t\t\t\t\t\t\tfor($i=0;$i<count($array_fields);$i++){\n\t\t\t\t\t\t\t\t$array_main_table[] = db_formatString($row_main_table[$i]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * Insert into second db table\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tunset($sql_insert);\n\t\t\t\t\t\t\t$sql_insert = \"insert into \".$table.\" (\".implode(\",\",$array_fields).\") values (\".implode(\",\",$array_main_table).\")\";\n\t\t\t\t\t\t\t$result_insert = mysql_query($sql_insert,$link_id);\n\t\t\t\t\t\t\tif(!$result_insert){\n\t\t\t\t\t\t\t\techo \"erro \".mysql_error($link_id).\"<br />\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\techo \"erro \".mysql_error($link_id).\"<br />\";\n\t\t\t\t\t\techo \"erro no select\";\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 \"constructor: mysql_connect\";\n\t\t\t}\n\t\t\t\n\t\t}else{\n\t\t\techo \"nao pegou o segundo banco\";\n\t\t}\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "60fcd4f791dae2bc834f8dbbeee6cdbf", "score": "0.57561773", "text": "function getMainDB(){\n\t$host = '172.25.20.40';\n\t$port = '3306';\n\t$database = 'arcsight';\n\t$username = 'dashboard';\n\t$password = 'dof1234';\n\treturn new DB\\SQL(\n\t\t'mysql:host=' . $host . ';port=' . $port . ';dbname=' . $database,\n\t\t$username,\n\t\t$password\n\t);\n}", "title": "" }, { "docid": "2b242501894b987193ab4da74a7a33c8", "score": "0.5752837", "text": "public static function getInfo($dbh)\r\n {\r\n return mysqli_get_server_info($dbh);\r\n }", "title": "" }, { "docid": "44bf8e26b3d528b94448b48eff40c473", "score": "0.57328814", "text": "function get_mysql_info() {\r\n\t\t$strInfo = mysql_info($this->_conn);\r\n\t \r\n\t\t$return = array();\r\n\t\tereg(\"Records: ([0-9]*)\", $strInfo, $records);\r\n\t\tereg(\"Duplicates: ([0-9]*)\", $strInfo, $dupes);\r\n\t\tereg(\"Warnings: ([0-9]*)\", $strInfo, $warnings);\r\n\t\tereg(\"Deleted: ([0-9]*)\", $strInfo, $deleted);\r\n\t\tereg(\"Skipped: ([0-9]*)\", $strInfo, $skipped);\r\n\t\tereg(\"Rows matched: ([0-9]*)\", $strInfo, $rows_matched);\r\n\t\tereg(\"Changed: ([0-9]*)\", $strInfo, $changed);\r\n\t \r\n\t\t$return['records'] = $records[1];\r\n\t\t$return['duplicates'] = $dupes[1];\r\n\t\t$return['warnings'] = $warnings[1];\r\n\t\t$return['deleted'] = $deleted[1];\r\n\t\t$return['skipped'] = $skipped[1];\r\n\t\t$return['rows_matched'] = $rows_matched[1];\r\n\t\t$return['changed'] = $changed[1];\r\n\t \r\n\t\treturn $return;\r\n\t}", "title": "" }, { "docid": "40b4f50a6bd4c63fb46ec3d5b09a26c9", "score": "0.57270324", "text": "function setup_db() {\n\t\t// may need to optimize the keys (merge multiple variables, leftmost variable being one that is always used in query; leftmost should also have the most duplicates)\n\t\t// nevertheless, the keys will all be used in many searches\n\t\t// also, problems with extra keys (storage space and extra time when updating table) are not issues in this case\n\t\t// varbinary to make sure that edid is case sensitive\n\t\tif (!$this->_parentlist->hastable('History')) {\n\t\t\t$query = 'CREATE TABLE History (\n\t\t\t\thid int UNSIGNED NOT NULL auto_increment,\n\t\t\t\tsetid int UNSIGNED NOT NULL,\n\t\t\t\tactive tinyint,\n\t\t\t\ttime timestamp,\n\t\t\t\trectype char(4),\n\t\t\t\ttext blob,\n\t\t\t\tPRIMARY KEY (hid),\n\t\t\t\tKEY setid (setid),\n\t\t\t\tKEY time (time),\n\t\t\t\tKEY rectype (rectype)\n\t\t\t\t)';\n\t\t\t$this->_parentlist->do_query($query);\n\t\t\t$this->_parentlist->addtable('History');\n\t\t\t$this->_params['_history_setid'] = 1;\n\t\t\t$query = \"INSERT INTO History SET setid=1, active=1, rectype=NULL, text='Initial database creation'\";\n\t\t\t$this->_parentlist->do_query($query);\n\t\t}\n\t\telse {\n\t\t\t$query = 'SELECT MAX(setid) AS maxid FROM History';\n\t\t\t$row = $this->_parentlist->do_query($query, 'onerow');\n\t\t\t$this->_params['_history_setid'] = $row['maxid']+1;\n\t\t\t$query = \"INSERT INTO History SET setid=\".$this->_params['_history_setid'].\", active=1, rectype=NULL\";\n\t\t\t$this->_parentlist->do_query($query);\n\t\t}\n\t\t\n\t\tif ($this->_params['_first_db']) {\n\t\t\t$query = 'CREATE TABLE AllItems (\n\t\t\t\tordid int NOT NULL auto_increment,\n\t\t\t\tedid varbinary(100),\n\t\t\t\tformid char(10),\n\t\t\t\trectype char(4),\n\t\t\t\tfileid tinyint UNSIGNED,\n\t\t\t\tname varchar(100),';\n\t\t\tforeach ($this->_parentlist->get_datatables('', 'AllItems') as $valname) {\n\t\t\t\t$datainfo = $this->_parentlist->get_datainfo('', $valname);\n\t\t\t\t$query .= \"\\n\".$datainfo['sqlname'].\" \".$datainfo['sqlformat'].\",\";\n\t\t\t}\n\t\t\t$query .= 'PRIMARY KEY (ordid),\n\t\t\t\tKEY formid (formid),\n\t\t\t\tKEY edid (edid),\n\t\t\t\tKEY rectype (rectype),\n\t\t\t\tKEY fileid (fileid)\n\t\t\t\t)';\n\t\t\t$this->_parentlist->do_query($query);\n\t\t\t$this->_parentlist->addtable('AllItems');\n\t\t\t\n\t\t\t$query = 'CREATE TABLE Files (\n\t\t\t\tfileid tinyint UNSIGNED NOT NULL,\n\t\t\t\tfilename varchar(50),\n\t\t\t\tfileofficial varchar(50),\n\t\t\t\tfilenamespace varchar(20),\n\t\t\t\tfilemodname varchar(50),\n\t\t\t\tfilemodabbrev varchar(5),\n\t\t\t\tPRIMARY KEY (fileid)\n\t\t\t\t)';\n\t\t\t$this->_parentlist->do_query($query);\n\t\t\t$this->_parentlist->addtable('Files');\n\t\t\t\n\t\t\tif (!empty($this->_reclist)) {\n\t\t\t\t$query = 'CREATE TABLE Reclist (\n\t\t\t\t\trectype char(4),\n\t\t\t\t\tsubrec char(4),\n\t\t\t\t\tnsub int,\n\t\t\t\t\tavsize float,\n\t\t\t\t\tminsize float,\n\t\t\t\t\tmaxsize float,\n\t\t\t\t\tminnum int,\n\t\t\t\t\tmaxnum int,\n\t\t\t\t\tPRIMARY KEY(rectype, subrec)\n\t\t\t\t\t)';\n\t\t\t\t$this->_parentlist->do_query($query);\n\t\t\t\t$this->_parentlist->addtable('Reclist');\n\t\t\t\t\n\t\t\t\tforeach ($this->_reclist as $rectype => $recdata) {\n\t\t\t\t\tforeach ($recdata as $subrec => $nsub) {\n\t\t\t\t\t\t// skip WTHR-*IAD subrecs -- register as duplicate keys in Reclist\n\t\t\t\t\t\tif (!preg_match('/^[A-Z0-9_]*$/', $subrec))\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t$totsize = 0;\n\t\t\t\t\t\t$minsize = NULL;\n\t\t\t\t\t\t$maxsize = NULL;\n\t\t\t\t\t\tforeach ($this->_reclens[$rectype][$subrec] as $size => $num) {\n\t\t\t\t\t\t\t$totsize += $num*$size;\n\t\t\t\t\t\t\tif (!isset($minsize)) {\n\t\t\t\t\t\t\t\t$minsize = $size;\n\t\t\t\t\t\t\t\t$maxsize = $size;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t$minsize = min($minsize, $size);\n\t\t\t\t\t\t\t\t$maxsize = max($maxsize, $size);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!isset($maxsize)) {\n\t\t\t\t\t\t\t$minsize = 0;\n\t\t\t\t\t\t\t$maxsize = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($subrec=='') {\n\t\t\t\t\t\t\t$minnum = 'NULL';\n\t\t\t\t\t\t\t$maxnum = 'NULL';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$minnum = $this->_reccount[$rectype][$subrec]['min'];\n\t\t\t\t\t\t\t$maxnum = $this->_reccount[$rectype][$subrec]['max'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$avsize = $totsize/$nsub;\n\t\t\t\t\t\t$query = \"INSERT INTO Reclist SET rectype='$rectype', subrec='$subrec', nsub=$nsub, avsize=$avsize, minsize=$minsize, maxsize=$maxsize, minnum=$minnum, maxnum=$maxnum\";\n\t\t\t\t\t\t$this->_parentlist->do_query($query);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$query = 'CREATE TABLE Recgroup (\n\t\t\t\t\tgrouptype char(4),\n\t\t\t\t\trectype char(4),\n\t\t\t\t\tPRIMARY KEY(grouptype, rectype)\n\t\t\t\t\t)';\n\t\t\t\t$this->_parentlist->do_query($query);\n\t\t\t\t$this->_parentlist->addtable('Recgroup');\n\t\t\t\t\n\t\t\t\tforeach ($this->_recgroup as $grouptype => $grdata) {\n\t\t\t\t\tforeach ($grdata as $rectype => $x) {\n\t\t\t\t\t\t$query = \"INSERT INTO Recgroup SET grouptype='$grouptype', rectype='$rectype'\";\n\t\t\t\t\t\t$this->_parentlist->do_query($query);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tforeach ($this->_datadef as $rectype => $recdata) {\n\t\t\t$query = \"INSERT INTO History SET setid=\".$this->_params['_history_setid'].\", active=1, rectype='$rectype', text='\".addslashes(serialize($recdata)).\"'\";\n\t\t\t$this->_parentlist->do_query($query);\n\t\t}\n\t\t\n\t\t// how do I figure out which lookup tables need to be redone?\n\t\tforeach ($this->_parentlist->get_lookup_names() as $lookup) {\n\t\t\t$tname = $lookup.\"_Lookup\";\n\t\t\tif ($this->_parentlist->hastable($tname))\n\t\t\t\tcontinue;\n\t\t\t$str = is_string(reset($this->_parentlist->get_lookup_list($lookup)));\n\t\t\t// _lu needs to be larger than tinyint -> ugly arrays such as CTDA_function have more than 255 values\n\t\t\tif ($str)\n\t\t\t $query = \"CREATE TABLE {$tname} (\n\t\t\t\t{$lookup}_lu char(4) NOT NULL,\n\t\t\t\t{$lookup} varchar(50),\n\t\t\t\tPRIMARY KEY ({$lookup}_lu)\n\t\t\t\t)\";\n\t\t\telse\n\t\t\t $query = \"CREATE TABLE {$tname} (\n\t\t\t\t{$lookup}_lu smallint UNSIGNED NOT NULL,\n\t\t\t\t{$lookup} varchar(50),\n\t\t\t\tPRIMARY KEY ({$lookup}_lu)\n\t\t\t\t)\";\n\t\t\t$this->_parentlist->do_query($query);\n\t\t\t$this->_parentlist->addtable($tname);\n\t\t\t\n\t\t\t$query = \"INSERT INTO {$tname} ({$lookup}_lu, {$lookup}) VALUES \";\n\t\t\t$first = true;\n\t\t\tforeach ($this->_parentlist->get_lookup_list($lookup) as $lu => $luname) {\n\t\t\t\tif (!$first)\n\t\t\t\t\t$query .= \", \";\n\t\t\t\telse\n\t\t\t\t\t$first = false;\n\t\t\t\tif ($str)\n\t\t\t\t\t$query .= \"('\".addslashes($lu).\"'\";\n\t\t\t\telse\n\t\t\t\t\t$query .= \"({$lu}\";\n\t\t\t\t$query .= \", '\".addslashes($luname).\"')\";\n\t\t\t}\n\t\t\tif (!$first)\n\t\t\t\t$this->_parentlist->do_query($query);\n\t\t}\n\t\t\n\t\tif (!empty($this->_params['_first_db']) || empty($this->_params['_first_read'])) {\n\t\t\tforeach ($this->_datadef as $rectype => $def) {\n\t\t\t\t$tables = $this->_parentlist->get_datatables($rectype);\n\t\t\t\t// kludge for Morrowind to get REFR_Record re-done whenever CELL is re-read\n\t\t\t\tif ($rectype=='CELL' && substr(get_class($this),0,2)=='MW')\n\t\t\t\t\t$tables[] = 'REFR_Record';\n\t\t\t\tforeach ($tables as $table) {\n\t\t\t\t\t$query = \"DROP TABLE IF EXISTS $table\";\n\t\t\t\t\t$this->_parentlist->do_query($query);\n\t\t\t\t\t$this->create_table($table);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t/*\t\t$tables = $this->_parentlist->get_datatables();\n\t\tforeach ($tables as $table) {\n\t\t\t$this->create_table($table);\n\t\t}*/\n\t\t\n\t\tif ($this->_params['calc_levlists']) {\n\t\t\t$query = \"DROP TABLE IF EXISTS LevelList\";\n\t\t\t$this->_parentlist->do_query($query);\n\t\t\t$query = \"CREATE TABLE LevelList (\n\t\t\t\tlist_ordid int NOT NULL,\n\t\t\t\titem_ordid int NOT NULL,\n\t\t\t\tpav float,\n\t\t\t\tpav_lvl float,\n\t\t\t\tpmin float,\n\t\t\t\tpmax float,\n\t\t\t\tcountav float,\n\t\t\t\tcountmin int,\n\t\t\t\tcountmax int,\n\t\t\t\tlmin int,\n\t\t\t\tlmax int,\n\t\t\t\tllast int,\n\t\t\t\tPRIMARY KEY (list_ordid, item_ordid),\n\t\t\t\tKEY item_ordid (item_ordid)\n\t\t\t\t)\";\n\t\t\t$this->_parentlist->do_query($query);\n\t\t\t$this->_parentlist->addtable('LevelList');\n\t\t}\n\t\t\n\t\t\t/*foreach (array('LevelList', 'LevelList_PLvl', 'LevelList_Src') as $table) {\nprint \"about to drop commented-out tables\\n\";\nexit;\n\t\t\t\t$query = \"DROP TABLE IF EXISTS $table\";\n\t\t\t\t$this->_parentlist->do_query($query);\n\t\t\t}\n\t\t\t$query = \"CREATE TABLE LevelList (\n\t\t\t\tlist_ordid int NOT NULL,\n\t\t\t\titem_ordid int NOT NULL,\n\t\t\t\tpav float,\n\t\t\t\tpav_lvl float,\n\t\t\t\tpmin float,\n\t\t\t\tpmax float,\n\t\t\t\tcountav float,\n\t\t\t\tcountmin int,\n\t\t\t\tcountmax int,\n\t\t\t\tlmin int,\n\t\t\t\tlmax int,\n\t\t\t\tllast int,\n\t\t\t\tPRIMARY KEY (list_ordid, item_ordid),\n\t\t\t\tKEY item_ordid (item_ordid)\n\t\t\t\t)\";\n\t\t\t$this->_parentlist->do_query($query);\n\t\t\t$this->_parentlist->addtable('LevelList');\n\t\t\t\n\t\t\t$query = \"CREATE TABLE LevelList_PLvl (\n\t\t\t\tlist_ordid int NOT NULL,\n\t\t\t\titem_ordid int NOT NULL,\n\t\t\t\tlevel int NOT NULL,\n\t\t\t\tcount int NOT NULL,\n\t\t\t\tprob float NOT NULL,\n\t\t\t\tPRIMARY KEY (list_ordid, item_ordid, level, count)\n\t\t\t\t)\";\n\t\t\t$this->_parentlist->do_query($query);\n\t\t\t$this->_parentlist->addtable('LevelList_PLvl');\n\t\t\t\n\t\t\t$query = \"CREATE TABLE LevelList_Src (\n\t\t\t\tlist_ordid int NOT NULL,\n\t\t\t\titem_ordid int NOT NULL,\n\t\t\t\tseqid int NOT NULL,\n\t\t\t\tnseq int NOT NULL,\n\t\t\t\tsrc_ordid int NOT NULL,\n\t\t\t\tPRIMARY KEY (list_ordid, item_ordid, seqid, nseq)\n\t\t\t\t)\";\n\t\t\t$this->_parentlist->do_query($query);\n\t\t\t$this->_parentlist->addtable('LevelList_Src');\n\t\t}*/\n\t}", "title": "" }, { "docid": "bc0a65d84c85d31f4f3be34f8c2d5029", "score": "0.5721224", "text": "final public function setDbs($db='*')\n\t{\n\t\t$db=trim($db);\n\t\tif (empty($db) || $db == '*'){\n\t\t\t$list=mysql_list_dbs($this->link);\n\t\t\t$rows=query_db_num($list);\n\t\t\tif($rows == 0){\n\t\t\t\ttrigger_error(\"Mysql:THERE IS NO DATABASES ON THE SERVER!!\",E_USER_ERROR);\n\t\t\t}\n\t\t\tfor($i=0;$i<$rows;$i++){\n\t\t\t\t$this->db[]=mysql_tablename($list,$i);\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$db=explode(\",\",$db);\n\t\t\t$this->db=$db;\n\t\t}\n\t}", "title": "" }, { "docid": "5412fd0755ab310163a5a507f1bdad97", "score": "0.56992763", "text": "private function db_connect() {\r\n\t\t$this->connection = new MySQLi(\r\n\t\t\t$this->config[ENVIRONMENT]['database']['hostname'],\r\n\t\t\t$this->config[ENVIRONMENT]['database']['username'],\r\n\t\t\t$this->config[ENVIRONMENT]['database']['password'],\r\n\t\t\t$this->config[ENVIRONMENT]['database']['database']\t\t\t\r\n\t\t\t);\r\n\r\n\t\t// Prepare the MySQL Statements\r\n\t\tif (!($this->add_post_statement = $this->connection->prepare($this->add_post_sql))) {\r\n\t\t echo \"Prepare failed: (\" . $this->connection->errno . \") \" . $this->connection->error;\r\n\t\t}\r\n\t\tif (!($this->remove_post_statement = $this->connection->prepare($this->remove_post_sql))) {\r\n\t\t echo \"Prepare failed: (\" . $this->connection->errno . \") \" . $this->connection->error;\r\n\t\t}\r\n\t\tif (!($this->add_star_statement = $this->connection->prepare($this->add_star_sql))) {\r\n\t\t echo \"Prepare failed: (\" . $this->connection->errno . \") \" . $this->connection->error;\r\n\t\t}\r\n\t\tif (!($this->remove_star_statement = $this->connection->prepare($this->remove_star_sql))) {\r\n\t\t echo \"Prepare failed: (\" . $this->connection->errno . \") \" . $this->connection->error;\r\n\t\t}\r\n\t\tif (!($this->add_repost_statement = $this->connection->prepare($this->add_repost_sql))) {\r\n\t\t echo \"Prepare failed: (\" . $this->connection->errno . \") \" . $this->connection->error;\r\n\t\t}\r\n\t\tif (!($this->remove_repost_statement = $this->connection->prepare($this->remove_repost_sql))) {\r\n\t\t echo \"Prepare failed: (\" . $this->connection->errno . \") \" . $this->connection->error;\r\n\t\t}\r\n\t\tif (!($this->add_reply_statement = $this->connection->prepare($this->add_reply_sql))) {\r\n\t\t echo \"Prepare failed: (\" . $this->connection->errno . \") \" . $this->connection->error;\r\n\t\t}\r\n\t\tif (!($this->remove_reply_statement = $this->connection->prepare($this->remove_reply_sql))) {\r\n\t\t echo \"Prepare failed: (\" . $this->connection->errno . \") \" . $this->connection->error;\r\n\t\t}\r\n\t\tif (!($this->add_follow_statement = $this->connection->prepare($this->add_follow_sql))) {\r\n\t\t echo \"Prepare failed: (\" . $this->connection->errno . \") \" . $this->connection->error;\r\n\t\t}\r\n\t\tif (!($this->add_unfollow_statement = $this->connection->prepare($this->add_unfollow_sql))) {\r\n\t\t echo \"Prepare failed: (\" . $this->connection->errno . \") \" . $this->connection->error;\r\n\t\t}\r\n\t\tif (!($this->add_authorize_statement = $this->connection->prepare($this->add_authorize_sql))) {\r\n\t\t echo \"Prepare failed: (\" . $this->connection->errno . \") \" . $this->connection->error;\r\n\t\t}\r\n\r\n\t\t// Prepare the version 2 statements\r\n\t\tif (!($this->add_star_statement_2 = $this->connection->prepare($this->add_star_sql_2))) {\r\n\t\t echo \"Prepare failed: (\" . $this->connection->errno . \") \" . $this->connection->error;\r\n\t\t}\r\n\t\tif (!($this->remove_star_statement_2 = $this->connection->prepare($this->remove_star_sql_2))) {\r\n\t\t echo \"Prepare failed: (\" . $this->connection->errno . \") \" . $this->connection->error;\r\n\t\t}\r\n\t\tif (!($this->add_repost_statement_2 = $this->connection->prepare($this->add_repost_sql_2))) {\r\n\t\t echo \"Prepare failed: (\" . $this->connection->errno . \") \" . $this->connection->error;\r\n\t\t}\r\n\t\tif (!($this->remove_repost_statement_2 = $this->connection->prepare($this->remove_repost_sql_2))) {\r\n\t\t echo \"Prepare failed: (\" . $this->connection->errno . \") \" . $this->connection->error;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "a4c0d938edb48f6b9dc33b083af325dc", "score": "0.5696485", "text": "abstract function get_connection($database);", "title": "" }, { "docid": "4483bc0d56a3e91406599fd51e0e5b67", "score": "0.56929165", "text": "private static function getdb(){\n //$this-> to refer to the current object\n //self:: to refer to the current class\n if (self::$db == null){\n //self::$db = new PDO(\"mysql:host=localhost;dbname=bibliolib;charset=UTF8\",\"root\",\"\");\n self::$db = new PDO(\"mysql:host=ipssisqbibliolib.mysql.db;dbname=ipssisqbibliolib;charset=UTF8\",\"ipssisqbibliolib\",\"IpssiBibliolib2021\");\n }\n return self::$db;\n }", "title": "" }, { "docid": "0bf651121dec61102352337e51620ba1", "score": "0.5687529", "text": "public static function getSettings() {\n return array(\n 'db' => array(\n 'info' => array(\n 'name' => 'playground',\n 'pass' => 'root',\n 'user' => 'root',\n 'host' => 'localhost',\n ),\n 'type' => 'Core\\DataBase\\MySql\\MySql',\n )\n );\n }", "title": "" }, { "docid": "474e302dc24af858ddce355a3b669401", "score": "0.5686022", "text": "function setupDb($settings)\n{\n assert(isset($settings['host']), 'Db `host` is required');\n assert(isset($settings['port']) && is_int($settings['port']), 'Db `port` is required, should be integer');\n assert(isset($settings['name']), 'Db `name` is required, should be integer');\n // connection code here\n}", "title": "" }, { "docid": "1ef21b873f5370af3c940cca4c1b5d53", "score": "0.5685403", "text": "protected function createDbConnection() {\n\t\t$conn_params = parent::getDbCredentials();\n\t\t$this->db = new Mysql($conn_params['s'], $conn_params['u'], $conn_params['p'], $conn_params['d']);\n\t\treturn $this->db;\n\t}", "title": "" }, { "docid": "99264b591729a0360609e6acb11e35dc", "score": "0.5683715", "text": "private function __construct($dbDetails = array()){\n \n $this->dbName = $dbDetails['db_name'];\n $this->dbHost = $dbDetails['db_host'];\n $this->dbUser = $dbDetails['db_user'];\n $this->dbPass = $dbDetails['db_pass'];\n \n // Your Code here to connect to database //\n $this->dbh = new PDO('mysql:host=' . $this->dbHost . ';dbname=' . $this->dbName, $this->dbUser, $this->dbPass);\n }", "title": "" }, { "docid": "0b1211cb4e1ff2d1d27f8ce793a8d1d8", "score": "0.5683298", "text": "public static function initialiseDB(){}", "title": "" }, { "docid": "9be7d27802c9ff1604cc42287a4b5bf6", "score": "0.5683133", "text": "protected function initDatabase($options = array())\n {\n $config = $this->_di->get('config');\n $logger = new PhLoggerFile(\"logs/error.log\");\n $formatter = new PhLoggerFormatter(\"[%date%][%type%] %message%\");\n $logger->setFormatter($formatter);\n\n $this->_di->set(\n 'db',\n function() use ($config, $logger)\n {\n\n $params = array(\n \"host\" => $config->database->host,\n \"username\" => $config->database->username,\n \"password\" => $config->database->password,\n \"dbname\" => $config->database->dbname,\n );\n\n try {\n $conn = new PhMysql($params);\n }catch (\\PDOException $e){\n $logger->log('['. __FILE__ .']' . $e->getMessage() ,\\Phalcon\\Logger::ERROR);\n }\n\n return $conn;\n }\n );\n }", "title": "" }, { "docid": "b1ec48fa7ef04c1dc4c841d5fdad9ad2", "score": "0.56828064", "text": "function setDbParams ($params = array())\n {\n \tglobal $connectDb;\n\n $this->host = !empty($params['host']) ? $params['host'] : $connectDb[\"host\"];\n $this->port = !empty($params['port']) ? $params['port'] : $connectDb[\"port\"];\n $this->userName = !empty($params['userName']) ? $params['userName'] : $connectDb[\"user\"];\n $this->dbPass = !empty($params['dbPass']) ? $params['dbPass'] : $connectDb[\"pass\"];\n $this->database = !empty($params['database']) ? $params['database'] : $connectDb[\"datb\"];\n $this->charSet = !empty($params['charSet']) ? $params['charSet'] : $connectDb[\"charSet\"];\n }", "title": "" }, { "docid": "a9f6107d7e97986bee255a39802a2ef2", "score": "0.5682354", "text": "function connectedToDb( array $db = null, $suppress_console_msg = false ) {\n\n\tif (!$suppress_console_msg) Console::tell(\"Checking db connection...\");\n\n\t//get db info from config\n\t$conf = array(\"host\" => DB_HOST, \"user\" => DB_USER, \"pw\" => DB_PASS, \"name\" => DB_NAME);\n\n\t//use $db param if required array keys are set.\n\t$db = ( is_array($db) && isset($db['host']) && isset($db['user']) && isset($db['pw']) ) ? $db : $conf;\n\n\t//die(var_dump($db['name']));\n\n\tif ( $db['name'] == null ){\n\n\t\t//don't pass $db['name'] to mysqli_connect if null.\n\n\t\t//suppress mysqli warning on fail\n\t\t$mysqli = @mysqli_connect($db['host'], $db['user'], $db['pw']);\n\n\t\tConsole::tell(\"DB_NAME for mysql connection is null. Ignoring...\");\n\n\t}\n\telse {\n\n\t\t//suppress mysqli warning on fail\n\t\t$mysqli = @mysqli_connect($db['host'], $db['user'], $db['pw'], $db['name']);\n\n\t}\n\n\tif (mysqli_connect_errno($mysqli)) {\n\n\t\tif (!$suppress_console_msg) Console::tell(\"Failed to connect to MySQL: \" . mysqli_connect_error());\n\t\treturn false;\n\n\t}\n\telse {\n\t\treturn $mysqli;\n\t}\n\n}", "title": "" }, { "docid": "50e41d8b1230466995de57a12d7c8520", "score": "0.5670048", "text": "function connect($config)\n\t{\n\t\t#Detects whether live or test (or others), and uses the relevant database.\n\t\t$db_version\t= $config['db'];\n\t\t$config\t\t= $config[$db_version];\n\n\t\t$db_host\t= $config['db_host'];\n\t\t$db_name\t= $config['db_name'];\n\t\t$db_charset\t= $config['db_charset'];\n\t\t$db_user\t= $config['db_user'];\n\t\t$db_password\t= $config['db_password'];\n\n\t\t$db\t\t= new PDO(\"mysql:host=$db_host;dbname=$db_name;charset=$db_charset\", $db_user, $db_password, array(PDO::ATTR_EMULATE_PREPARES => false, PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));\n\t\treturn $db;\n\t}", "title": "" }, { "docid": "b8178388b78aa04bc3817f05272fa4a8", "score": "0.56670755", "text": "private function databaseSettings()\n {\n foreach (['dbhost', 'dbuser', 'dbname'] as $key) {\n $this->lpEngine->addTwigGlobal(\n $key,\n isset($this->config['db'][$key])\n ? $this->config['db'][$key] : null\n );\n }\n\n // database connection status\n\n if ((true === $this->applicationConfig->getDeveloperMode()) &&\n (true === $this->applicationConfig->getNoCapture())) {\n $this->lpEngine->addTwigGlobal('capturing_data', 1);\n } else {\n $this->lpEngine->addTwigGlobal('capturing_data', 0);\n }\n\n try {\n $pdo = $this->lpEngine->getPdoService()->getPdoObject(\n $this->lpEngine->getHost()\n );\n if ($pdo instanceof \\PDO) {\n $this->lpEngine->addTwigGlobal('has_database_connection', 1);\n } else {\n $this->lpEngine->addTwigGlobal('has_database_connection', 0);\n }\n } catch (\\Exception $e) {\n $this->lpEngine->addTwigGlobal('has_database_connection', 0);\n //throw $e;\n }\n }", "title": "" }, { "docid": "96637f9c57ef57dc8ee8b4a92eaa468e", "score": "0.5666174", "text": "function getDatabaseConnection() {\n if ($_SERVER['SERVER_NAME'] == \"cst336-fall-2018-uuts.c9users.io\") { // running on cloud9\n $host = \"localhost\";\n $username = \"bradley\";\n $password = \"cst336\";\n $dbname = \"meme_lab\"; \n }else{\n //JAWSDB (faster than ClearDB)\n $host = \"tj5iv8piornf713y.cbetxkdyhwsb.us-east-1.rds.amazonaws.com\";\n $username = \"f89d4v70t1c7x38p\";\n $password = \"f3qapnhmsbtvmehi\";\n $dbname = \"q04pglwa9t4hfqjm\"; \n }\n // Create connection\n $dbConn = new PDO(\"mysql:host=$host;dbname=$dbname\", $username, $password);\n $dbConn -> setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n return $dbConn; \n}", "title": "" }, { "docid": "fb1ea6145d4a9b74e03864cf8dda7d8a", "score": "0.566376", "text": "public function createConnection() {\n $this->dbc = mysqli_connect($this->database['dbHost'],$this->database['dbUser'],$this->database['dbPassword'],$this->database['dbName']);\n }", "title": "" }, { "docid": "0f99eb91e3933864315d776d53c86b70", "score": "0.5654887", "text": "public static function init()\n {\n\n $conf = Conf::get('db');\n\n $conf['activ'] = isset($conf['activ'])?$conf['activ']:'default';\n\n if(!isset($conf['connection'][$conf['activ']]))\n {\n if(DEBUG)\n Debug::console( 'requested non existing database connection '.$conf['activ'].'!', $conf );\n\n throw new LibDb_Exception\n (\n I18n::s\n (\n 'requested non existing database connection '.$conf['activ'].'!',\n 'wbf.error.db_connection_not_exists'\n )\n );\n }\n\n\n self::connectDb( $conf['activ'] , $conf['connection'][$conf['activ']] , true );\n\n }", "title": "" }, { "docid": "d97c99ebb210d288c221e86f33979b0b", "score": "0.56544673", "text": "function get_server_info() {\n\t\treturn array(\n\t\t\t'MySQL',\n\t\t\tmysql_get_server_info($this->connection)\n\t\t);\n\t}", "title": "" }, { "docid": "42b04d50a2a4a569409576fc6f725882", "score": "0.5653539", "text": "abstract public function connect($selectdb = true);", "title": "" }, { "docid": "ae78552a717ff73a98d5d41f0681bf59", "score": "0.56525207", "text": "function open_database() {\n# initialize database\n global $database_link,$config_data;\n\n $database_link = mysql_connect($config_data['db_hostname'],$config_data['db_user'],'65536') or crit_error(\"Could not connect to host \\\"\".$config_data['db_hostname'].\"\\\" as \\\"\".$config_data['db_user'].\"\\\"<br> Error: \". mysql_error());\n mysql_select_db($config_data['db_name']) or crit_error(\"Could not select database: \". mysql_error() );\n}", "title": "" }, { "docid": "314b1aa09e7d0a2a90b4821bdcb6f6d9", "score": "0.56512165", "text": "function db_connect($dbname = 'smile')\n {\n global $mysql_link;\n if (is_null($mysql_link)) {\n\n $mysql_link = mysqli_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASSWORD, $dbname);\n mysqli_set_charset($mysql_link, 'utf8');\n\n }\n }", "title": "" }, { "docid": "a4b38520ebcc4f9881e0d0ec4c59f2d3", "score": "0.5650645", "text": "function get_db_list() {\r\n global $CONF;\r\n\r\n // if there is given the name of a single database\r\n if ($dbname) {\r\n @mysql_connect($dbhost,$dbuname,$dbpass);\r\n if (@mysql_select_db($dbname)) $dbs=array($dbname);\r\n else $dbs=array();\r\n return $dbs;\r\n }\r\n \r\n // else try to get a list of all available databases on the server\r\n $list=array();\r\n @mysql_connect($dbhost,$dbuname,$dbpass);\r\n $db_list=@mysql_list_dbs();\r\n while ($row=@mysql_fetch_array($db_list))\r\n if (@mysql_select_db($row['Database'])) $list[]=$row['Database'];\r\n return $list;\r\n}", "title": "" }, { "docid": "1b9c66d4664026f20ae3b0110d192aaf", "score": "0.5649446", "text": "public function parse_db(array $db, array $connect) : array{\n //Set db_config default data type.\n $db_config=array();\n foreach($connect as $name) {\n //Check database setting exists or not\n if(array_key_exists($name, $db)) {\n if($db[$name]['dsn']==NULL) {\n $db_config[$name]['dsn']=NULL;\n } else {\n $db_config[$name]['dsn']=$db[$name]['dsn'];\n }\n if($db[$name]['hostname']==NULL) {\n $db_config[$name]['hostname']=NULL;\n } else {\n $db_config[$name]['hostname']=$db[$name]['hostname'];\n }\n if($db[$name]['port']==NULL) {\n $db_config[$name]['port']=NULL;\n } else {\n $db_config[$name]['port']=$db[$name]['port'];\n }\n if($db[$name]['username']==NULL) {\n $db_config[$name]['username']=NULL;\n } else {\n $db_config[$name]['username']=$db[$name]['username'];\n }\n if($db[$name]['password']==NULL) {\n $db_config[$name]['password']=NULL;\n } else {\n $db_config[$name]['password']=$db[$name]['password'];\n }\n if($db[$name]['database']==NULL) {\n $db_config[$name]['database']=NULL;\n } else {\n $db_config[$name]['database']=$db[$name]['database'];\n }\n if($db[$name]['driver']==NULL) {\n $db_config[$name]['driver']=NULL;\n } else {\n $db_config[$name]['driver']=$db[$name]['driver'];\n }\n if($db[$name]['char_set']==NULL) {\n $db_config[$name]['char_set']=NULL;\n } else {\n $db_config[$name]['char_set']=$db[$name]['char_set'];\n }\n } else {\n exit(\"'\".$name.\"' : Database setting not found\");\n }\n }\n return $db_config;\n }", "title": "" }, { "docid": "44f0e4c35a89aa044b7c0fbaca9dda6e", "score": "0.56433165", "text": "public function fill_connection_information($server, $username, $password, $database) {\n\t\t$this->_db_info = array(\n\t\t\t'server' => $server,\n\t\t\t'username' => $username,\n\t\t\t'password' => $password,\n\t\t\t'database' => $database,\n\t\t);\n\t\treturn true;\n\t}", "title": "" }, { "docid": "d4d20bf699cc2f3be61f702b99cfc169", "score": "0.5642264", "text": "static public function initialiseDB();", "title": "" }, { "docid": "38233629db3b0a5a404d9f7cceb38327", "score": "0.56405014", "text": "function setup_db() {\n $response = array('result' => 'failed', 'errors' => '', 'message' => '');\n\n $this->form_validation->set_rules('host', 'Host Name', 'required');\n $this->form_validation->set_rules('db_name', 'Database Name', 'required|callback__check_mysql_connection');\n $this->form_validation->set_rules('db_user', 'Database user', 'required');\n if ($this->form_validation->run() == TRUE) {\n\n // setup database config file\n if (!$this->_setup_database()) {\n $response['errors'] = $this->config->database_path . $this->lang->line('file_not_writable');\n } else {\n\n $update_autoload_data = array();\n $update_autoload_data['libraries'] = \"'database', 'form_validation', 'curl', 'email', 'authentication', 'media'\";\n if (!$this->config->autoload_update($update_autoload_data)) {\n $response['errors'] = $this->lang->line('file_not_writable') . $this->config->autoload_update;\n } else {\n $response['message'] = $this->lang->line('database_installed');\n $response['result'] = 'success';\n }\n }\n } else {\n $response['errors'] = validation_errors();\n }\n\n return $this->output->set_content_type('application/json')->set_output($this->return_json($response));\n }", "title": "" }, { "docid": "6e2d83c70b65f6857bf23faa77422547", "score": "0.5639774", "text": "function connectToDB() {\n // Create database connection\n $connectstr_dbhost = '';\n $connectstr_dbname = '';\n $connectstr_dbusername = '';\n $connectstr_dbpassword = '';\n \n foreach ($_SERVER as $key => $value) {\n if (strpos($key, \"MYSQLCONNSTR_localdb\") !== 0) {\n continue;\n }\n \n $connectstr_dbhost = preg_replace(\"/^.*Data Source=(.+?);.*$/\", \"\\\\1\", $value);\n $connectstr_dbname = 'inventory_manager_db';\n $connectstr_dbusername = preg_replace(\"/^.*User Id=(.+?);.*$/\", \"\\\\1\", $value);\n $connectstr_dbpassword = preg_replace(\"/^.*Password=(.+?)$/\", \"\\\\1\", $value);\n\n }\n \n // Create connection\n $db = mysqli_connect($connectstr_dbhost, $connectstr_dbusername, $connectstr_dbpassword,$connectstr_dbname);\n \n // Check connection\n if ($db->connect_error) {\n die(\"Connection failed: \" . $db->connect_error);\n return null;\n } else {\n return $db;\n }\n }", "title": "" } ]
da2921497bd343db4728b4951d2e213b
Gets the outboundConnectionsBlocked Configures the firewall to block all outgoing connections by default. When OutboundConnectionsRequired and OutboundConnectionsBlocked are both true, OutboundConnectionsBlocked takes priority. This setting will get applied to Windows releases version 1809 and above.
[ { "docid": "58fb1d35d04d5f3f90831abfd77511ea", "score": "0.8351335", "text": "public function getOutboundConnectionsBlocked()\n {\n if (array_key_exists(\"outboundConnectionsBlocked\", $this->_propDict)) {\n return $this->_propDict[\"outboundConnectionsBlocked\"];\n } else {\n return null;\n }\n }", "title": "" } ]
[ { "docid": "a57c9b8cc72f51603097da5ac3212ee9", "score": "0.75789684", "text": "public function getInboundConnectionsBlocked()\n {\n if (array_key_exists(\"inboundConnectionsBlocked\", $this->_propDict)) {\n return $this->_propDict[\"inboundConnectionsBlocked\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "dc831025cd3caf31d478469c6f0047a5", "score": "0.70132226", "text": "public function setOutboundConnectionsBlocked($val)\n {\n $this->_propDict[\"outboundConnectionsBlocked\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "6b7e1cb7256b45e8e72f4e92da5cdc82", "score": "0.6571775", "text": "public function getInboundNotificationsBlocked()\n {\n if (array_key_exists(\"inboundNotificationsBlocked\", $this->_propDict)) {\n return $this->_propDict[\"inboundNotificationsBlocked\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "eca56118c937943c820031fe216e9b49", "score": "0.6484399", "text": "public function getIncomingTrafficBlocked()\n {\n if (array_key_exists(\"incomingTrafficBlocked\", $this->_propDict)) {\n return $this->_propDict[\"incomingTrafficBlocked\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "50436c2e10b6fd66180faa687419b563", "score": "0.614428", "text": "public function setInboundConnectionsBlocked($val)\n {\n $this->_propDict[\"inboundConnectionsBlocked\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "c6281744d80393e107151fef784673ba", "score": "0.589795", "text": "public function getBlocked()\n {\n return $this->Blocked;\n }", "title": "" }, { "docid": "0494b9e060ab0abb58fb63508b4e1cc7", "score": "0.581407", "text": "public function getIsBlocked()\n {\n return $this->isBlocked;\n }", "title": "" }, { "docid": "91004adba22de394ae04c726c0771701", "score": "0.5670221", "text": "public function getB2bCollaborationOutbound()\n {\n if (array_key_exists(\"b2bCollaborationOutbound\", $this->_propDict)) {\n if (is_a($this->_propDict[\"b2bCollaborationOutbound\"], \"\\Beta\\Microsoft\\Graph\\Model\\CrossTenantAccessPolicyB2BSetting\") || is_null($this->_propDict[\"b2bCollaborationOutbound\"])) {\n return $this->_propDict[\"b2bCollaborationOutbound\"];\n } else {\n $this->_propDict[\"b2bCollaborationOutbound\"] = new CrossTenantAccessPolicyB2BSetting($this->_propDict[\"b2bCollaborationOutbound\"]);\n return $this->_propDict[\"b2bCollaborationOutbound\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "85b97a76dfb196d30d023ab3b77672bf", "score": "0.56571966", "text": "public function getIsBlocked();", "title": "" }, { "docid": "7bb16ef10c1a8c9c0ec20527ccf6c83c", "score": "0.5647141", "text": "public function getB2bDirectConnectOutbound()\n {\n if (array_key_exists(\"b2bDirectConnectOutbound\", $this->_propDict)) {\n if (is_a($this->_propDict[\"b2bDirectConnectOutbound\"], \"\\Beta\\Microsoft\\Graph\\Model\\CrossTenantAccessPolicyB2BSetting\") || is_null($this->_propDict[\"b2bDirectConnectOutbound\"])) {\n return $this->_propDict[\"b2bDirectConnectOutbound\"];\n } else {\n $this->_propDict[\"b2bDirectConnectOutbound\"] = new CrossTenantAccessPolicyB2BSetting($this->_propDict[\"b2bDirectConnectOutbound\"]);\n return $this->_propDict[\"b2bDirectConnectOutbound\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "0ea6d7b42d452e325a8adce04f39ceeb", "score": "0.5452981", "text": "public function getUnicastResponsesToMulticastBroadcastsBlocked()\n {\n if (array_key_exists(\"unicastResponsesToMulticastBroadcastsBlocked\", $this->_propDict)) {\n return $this->_propDict[\"unicastResponsesToMulticastBroadcastsBlocked\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "46b18b366296e92cea6302d457bfd20c", "score": "0.53452975", "text": "public function getB2bCollaborationInbound()\n {\n if (array_key_exists(\"b2bCollaborationInbound\", $this->_propDict)) {\n if (is_a($this->_propDict[\"b2bCollaborationInbound\"], \"\\Beta\\Microsoft\\Graph\\Model\\CrossTenantAccessPolicyB2BSetting\") || is_null($this->_propDict[\"b2bCollaborationInbound\"])) {\n return $this->_propDict[\"b2bCollaborationInbound\"];\n } else {\n $this->_propDict[\"b2bCollaborationInbound\"] = new CrossTenantAccessPolicyB2BSetting($this->_propDict[\"b2bCollaborationInbound\"]);\n return $this->_propDict[\"b2bCollaborationInbound\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "dc5571e26598e8d5b376178cc6b72e1f", "score": "0.5295211", "text": "public function getB2bDirectConnectInbound()\n {\n if (array_key_exists(\"b2bDirectConnectInbound\", $this->_propDict)) {\n if (is_a($this->_propDict[\"b2bDirectConnectInbound\"], \"\\Beta\\Microsoft\\Graph\\Model\\CrossTenantAccessPolicyB2BSetting\") || is_null($this->_propDict[\"b2bDirectConnectInbound\"])) {\n return $this->_propDict[\"b2bDirectConnectInbound\"];\n } else {\n $this->_propDict[\"b2bDirectConnectInbound\"] = new CrossTenantAccessPolicyB2BSetting($this->_propDict[\"b2bDirectConnectInbound\"]);\n return $this->_propDict[\"b2bDirectConnectInbound\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "f3343715a3c536be45ac34fed25f528e", "score": "0.5209694", "text": "public function getOutbound()\n {\n return $this->outbound;\n }", "title": "" }, { "docid": "e7da72caef9eddadec247a30eea0e809", "score": "0.5175764", "text": "public function getBlockedGateways(Request $request)\n {\n return $this->createGetResponse($request,Gateway::where('REG_FLAG', 4));\n }", "title": "" }, { "docid": "c790128fd54eede723716a2ff9798731", "score": "0.5174348", "text": "public function setInboundNotificationsBlocked($val)\n {\n $this->_propDict[\"inboundNotificationsBlocked\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "fd4cfdb39ec9a546a75d75555a844007", "score": "0.51639974", "text": "public function setIncomingTrafficBlocked($val)\n {\n $this->_propDict[\"incomingTrafficBlocked\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "cb412398ce06cd8cc2a452cf518cf50c", "score": "0.5101485", "text": "public function getStealthModeBlocked()\n {\n if (array_key_exists(\"stealthModeBlocked\", $this->_propDict)) {\n return $this->_propDict[\"stealthModeBlocked\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "f9564cf2096653da3b6931137a8b15be", "score": "0.50359875", "text": "public function getMaxConnections() {\n return @$this->attributes['max_connections'];\n }", "title": "" }, { "docid": "45f379d920e85b689a0e4bcbafdef49d", "score": "0.4846868", "text": "public function getBlacklist()\n {\n return $this->blacklist;\n }", "title": "" }, { "docid": "45f379d920e85b689a0e4bcbafdef49d", "score": "0.4846868", "text": "public function getBlacklist()\n {\n return $this->blacklist;\n }", "title": "" }, { "docid": "43fe24dea1065a5e238b8e374d57076f", "score": "0.4834761", "text": "public function getStatusBlacklist()\n {\n return $this->status_blacklist;\n }", "title": "" }, { "docid": "01c9cc8df7b8eadd634a5262e3a161b3", "score": "0.48330024", "text": "public function getAvailableNetworks()\n {\n return $this->networks;\n }", "title": "" }, { "docid": "18495fe181f71f50ea32d0dddb0745b4", "score": "0.4832269", "text": "public function GetAllowedPorts () {\n\t\treturn $this->allowedPorts;\n\t}", "title": "" }, { "docid": "b3139999d6a0c9b5a96347b8f4211da4", "score": "0.48287973", "text": "public function getMaxConnectionsPerIp()\n {\n return $this->_maxConnectionsPerIp;\n }", "title": "" }, { "docid": "98feec145cd3e140df3e2390acf34b19", "score": "0.4828161", "text": "public function max_connections()\n {\n $channel = ChannelRepository::getPublic($this);\n\n return $channel->max_connections;\n }", "title": "" }, { "docid": "9ae2aef1612bd7bebe718b367ff5b693", "score": "0.4791604", "text": "public function getBlacklist()\n {\n return $this->blacklist;\n }", "title": "" }, { "docid": "4963d32702b505a1b82e72d592056106", "score": "0.47588518", "text": "public function getEnableUseInternalSubnetAttributes()\n {\n if (array_key_exists(\"enableUseInternalSubnetAttributes\", $this->_propDict)) {\n return $this->_propDict[\"enableUseInternalSubnetAttributes\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "4275d0a30fa4dacac98b57baa473eeeb", "score": "0.47513247", "text": "public function getBlocking()\n {\n return $this->_blocking;\n }", "title": "" }, { "docid": "16ad2dea7fba52ce0d7c5ed509342ffd", "score": "0.47500193", "text": "public function getCustomConnectionsConfig() {\n\t\treturn $this->_getConfigValueArray('customConnections');\n\t}", "title": "" }, { "docid": "ec2285c7a9edab8122f1fcbf094e0281", "score": "0.47055027", "text": "public function getIpLockIsDisabled() {}", "title": "" }, { "docid": "0a396bda4a212dbb408932f3c42b6346", "score": "0.4676037", "text": "public function isBlocked()\n {\n if (!IS_CLI) {\n $userIp = request()->getUserIP();\n\n $command = app()->db->createCommand('SELECT ip_address FROM ' . SecurityBlockedAccess::getTableSchema()->fullName . ' WHERE is_active = 1');\n $blockedIps = $command->queryColumn();\n\n if (!empty($blockedIps)) {\n $validator = new IpValidator([\n 'subnet' => null,\n ]);\n $validator->setRanges($blockedIps);\n\n return $validator->validate($userIp);\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "4ca558efe91ac84708b2b19bda8a842c", "score": "0.4640747", "text": "public function isBlocked()\n {\n return $this->getStatus() == self::STATUS_BLOCKED;\n }", "title": "" }, { "docid": "e0449ddf933f517e5fa2e469df4d174f", "score": "0.46401855", "text": "public function isBlocked() : bool {\n return $this->delivery_status === WebhookEvent::EVENT_BLOCKED;\n }", "title": "" }, { "docid": "0b3617970ff64669f7852f395131cd07", "score": "0.4634872", "text": "public function getHttpConnectionModeAllowableValues()\n {\n return [\n self::HTTP_CONNECTION_MODE_HTTPCLOSE,\nself::HTTP_CONNECTION_MODE_HTTP_SERVER_CLOSE,\nself::HTTP_CONNECTION_MODE_HTTP_KEEP_ALIVE, ];\n }", "title": "" }, { "docid": "c3b914c4d580a26ec14e12e5c9e0993d", "score": "0.46329695", "text": "public function hasBlocked()\n {\n return $this->blocked !== null;\n }", "title": "" }, { "docid": "965a5cd573bd83cf788ebf1256f8ccf6", "score": "0.4632439", "text": "public function getAllowedNetworks() {\n $networks = CachedConferenceApi::getNetworks();\n if ((SettingsApi::getSetting(SettingsApi::ALLOW_NETWORK_CHAIRS_TO_SEE_ALL_NETWORKS) <> 1)\n && !LoggedInUserDetails::isCrew()\n ) {\n return NetworkApi::getOnlyNetworksOfChair($networks, LoggedInUserDetails::getUser());\n }\n return $networks;\n }", "title": "" }, { "docid": "e33b0bf02e9cbc36d4071fe3bf2e909f", "score": "0.4626585", "text": "public function getAllowedIPRanges()\n {\n return $this->_getVar('user_allowed_ip_ranges');\n }", "title": "" }, { "docid": "ae8e8eb6819504e4a90bf9ac218ab96e", "score": "0.46032462", "text": "public function getBillingThresholds()\n {\n return $this->billingThresholds;\n }", "title": "" }, { "docid": "b479e7253066a65095cb7555c3f7c289", "score": "0.4571826", "text": "public function getOutboundSettings()\n {\n list($response) = $this->getOutboundSettingsWithHttpInfo();\n return $response;\n }", "title": "" }, { "docid": "60d34d5f8d4e01eaf66f9cb2c6bd33b2", "score": "0.45539188", "text": "public function getOutboundSettingsAsync()\n {\n return $this->getOutboundSettingsAsyncWithHttpInfo()\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "b6c46f4faf8dd1496f696b48978da1b5", "score": "0.45321992", "text": "public function getFirewallAllowableValues()\n {\n return [\n self::FIREWALL_ON,\n self::FIREWALL_OFF,\n ];\n }", "title": "" }, { "docid": "585cd65943a001b9da9f691d964a1c01", "score": "0.45308083", "text": "public function blacklist()\n {\n return $this['blacklist'];\n }", "title": "" }, { "docid": "86e7a6612e145bd60864f4798bd79bdf", "score": "0.4528754", "text": "public function isBlocked()\n {\n if ($this->status == 2) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "79707a0f104acb83e754c1365ea8119c", "score": "0.45245144", "text": "public function getChatBlacklist()\n {\n return $this->get(self::_CHAT_BLACKLIST);\n }", "title": "" }, { "docid": "acca283e7f3a01d0b25452801dc41604", "score": "0.45221624", "text": "public function isBlocked() {\n return $this->user !== null && $this->user->blocked;\n }", "title": "" }, { "docid": "0959a2807570baaaac424ee297bea616", "score": "0.45063743", "text": "public function getLimitationWis()\n {\n return $this->limitationWis;\n }", "title": "" }, { "docid": "c45884b6c31b6472162b7412d669d3ec", "score": "0.44588152", "text": "public function getRateLimiterConfig() {\n return $this->rateLimiterConfig;\n }", "title": "" }, { "docid": "8f0856945d684f79d128076d2b013d87", "score": "0.44395277", "text": "public static function get_allowed_on_network()\n {\n }", "title": "" }, { "docid": "658d9d244ea2454b78539a49bc5edd5b", "score": "0.4426726", "text": "public function setBlocked($Blocked = null)\n {\n $this->Blocked = $Blocked;\n return $this;\n }", "title": "" }, { "docid": "35fe96b30aa9eacd0849ad5f1d2771bd", "score": "0.4418935", "text": "public function getMaxConfs()\n {\n return $this->max_confs;\n }", "title": "" }, { "docid": "0a6dab6abd9d40506560ae7ef1f4d6f0", "score": "0.44136602", "text": "private function getAllowedIPs()\n {\n $ips_config = $this->config->get('restrict_login.ips');\n\n return !is_array($ips_config) ? array() : array_keys($ips_config);\n }", "title": "" }, { "docid": "1e0a3dbc97eb6bd425d8d1401eea9766", "score": "0.43993038", "text": "public function getAllowedIpsForIpn()\n {\n return explode(',', Mage::getStoreConfig(self::GENERAL_SETTINGS_PATH . 'allowedips', $this->getStoreId()));\n }", "title": "" }, { "docid": "3994e10dea7b0e0faa6574c3562b8e1e", "score": "0.43971363", "text": "public function getSmsAllowed()\n {\n return $this->smsAllowed;\n }", "title": "" }, { "docid": "4180bfce96209bffff33166624bd0fbe", "score": "0.43956888", "text": "public function getDisableConditions()\n {\n $value = $this->_config->get('general/disable_conditions');\n\n if ($value === null) {\n $value = [];\n }\n\n return $value;\n }", "title": "" }, { "docid": "e96994396eae1c72ddd850ccd95f27c4", "score": "0.43795282", "text": "public function getSupportedWayBills()\n {\n if(isset($this->supportedWayBills[$this->accountType])) {\n return $this->supportedWayBills[$this->accountType];\n }\n\n return false;\n }", "title": "" }, { "docid": "18f6d551e2e87828110717efcf65d6d3", "score": "0.43752554", "text": "function getDenyReasons() {\n return $this->denied_reasons;\n }", "title": "" }, { "docid": "50c0fef6f19fb7445be41acd3ed61846", "score": "0.43619594", "text": "public function getAccountBlockedResponse($duration = null)\n {\n $result['responseCode'] = self::RESPONSE_ACCOUNT_BLOCKED;\n if (!is_null($duration)) {\n $result['duration'] = $duration;\n }\n return $result;\n }", "title": "" }, { "docid": "8a1f3959a8802a63ebf2b9b77d00a4e6", "score": "0.4357555", "text": "public function getSecondaryIpRanges()\n {\n return $this->secondary_ip_ranges;\n }", "title": "" }, { "docid": "5b70654e4cebca175d5d2bd69faf3261", "score": "0.43564457", "text": "public function getFirewallEnabled()\n {\n if (array_key_exists(\"firewallEnabled\", $this->_propDict)) {\n if (is_a($this->_propDict[\"firewallEnabled\"], \"\\Microsoft\\Graph\\Model\\StateManagementSetting\") || is_null($this->_propDict[\"firewallEnabled\"])) {\n return $this->_propDict[\"firewallEnabled\"];\n } else {\n $this->_propDict[\"firewallEnabled\"] = new StateManagementSetting($this->_propDict[\"firewallEnabled\"]);\n return $this->_propDict[\"firewallEnabled\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "86f5a5b7e11345976913996705c7be40", "score": "0.43470708", "text": "private function getNonDatabaseIps()\n {\n return array_merge_recursive(\n array_map(function ($ip) {\n $ip['whitelisted'] = true;\n\n return $ip;\n }, $this->formatIpArray($this->config()->get('whitelist'))),\n array_map(function ($ip) {\n $ip['whitelisted'] = false;\n\n return $ip;\n }, $this->formatIpArray($this->config()->get('blacklist')))\n );\n }", "title": "" }, { "docid": "9642105a0b83e981ff6957f5bf2b0ddc", "score": "0.4337216", "text": "public function getConnections()\n {\n return $this->connections;\n }", "title": "" }, { "docid": "6f5009fc58dc7d8867149ba3499a180e", "score": "0.43366644", "text": "public static function getNetworkAuthenticatedSubnets(){\n\t\t\tglobal $wpdb;\n\t\t\tglobal $switched;\n\n\t\t\tswitch_to_blog(1);\n\n\t\t\t$authenticatedSubnets = $wpdb->get_results(\n\t\t\t\t\"SELECT *\n\t\t\t\t FROM \".$wpdb->prefix.\"wps_subnets\",\n\t\t\tARRAY_A );\n\n\t\t\trestore_current_blog();\n\n\t\t\treturn $authenticatedSubnets;\n\t\t}", "title": "" }, { "docid": "fee2f3a564b854783c249403da2671e6", "score": "0.4311721", "text": "public function getBluetoothBlocked(): ?bool {\n $val = $this->getBackingStore()->get('bluetoothBlocked');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'bluetoothBlocked'\");\n }", "title": "" }, { "docid": "3c8226b4a1512590ed751e21c59c3747", "score": "0.4303726", "text": "public function getIgnoreWarnings()\n {\n return $this->ignore_warnings;\n }", "title": "" }, { "docid": "46f03ab23ac6510329ba195713b7f701", "score": "0.42900866", "text": "public function getReservedIpRanges()\n {\n return $this->reserved_ip_ranges;\n }", "title": "" }, { "docid": "8fe7537a257a7a054e00bccd44f8611c", "score": "0.42844498", "text": "public function getBlacklist()\n {\n if (isset($this->raw->blacklist)) {\n $blacklist = (array) $this->raw->blacklist;\n\n array_walk(\n $blacklist,\n function (&$file) {\n $file = Path::canonical($file);\n }\n );\n\n return $blacklist;\n }\n\n return array();\n }", "title": "" }, { "docid": "2edec537cb1f642c78db245741c84865", "score": "0.42817435", "text": "public function getDisabledByMicrosoftStatus()\n {\n if (array_key_exists(\"disabledByMicrosoftStatus\", $this->_propDict)) {\n return $this->_propDict[\"disabledByMicrosoftStatus\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "e9e2e2bdf7f17324f05c3377e6ccf530", "score": "0.4272224", "text": "public function GetAllowPorts () {\n\t\treturn $this->allowPorts;\n\t}", "title": "" }, { "docid": "a5d3bf8e67f2002dd06ab2ef98ccaeb5", "score": "0.42360052", "text": "public function isBlocking(): bool\n {\n return $this->pluck('blocking');\n }", "title": "" }, { "docid": "a5d3bf8e67f2002dd06ab2ef98ccaeb5", "score": "0.42360052", "text": "public function isBlocking(): bool\n {\n return $this->pluck('blocking');\n }", "title": "" }, { "docid": "45b60c11f20f48182ad92e9489155a50", "score": "0.42356962", "text": "public function getIgnoreRemoteSchedulers()\n {\n return $this->ignoreRemoteSchedulers;\n }", "title": "" }, { "docid": "f8df72c7b03a37420d7b182de32e4205", "score": "0.42317104", "text": "private function validateMaxConnections($max_connections)\n {\n return ChannelRepository::validateMaxConnections($max_connections);\n }", "title": "" }, { "docid": "6144098a20deeb62fd7a784bf38bcdd7", "score": "0.42299712", "text": "public function getNetblock()\n {\n if (array_key_exists(\"netblock\", $this->_propDict)) {\n return $this->_propDict[\"netblock\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "36539586bb5d76ebea47d33db6b0dc05", "score": "0.42279953", "text": "public function getDisabled()\n {\n return array_filter($this->storage, function($val)\n {\n return $val['status'] === ProviderInterface::STATUS_DISABLED;\n });\n }", "title": "" }, { "docid": "7cb50d17f604477bfad77ac2ce7c8944", "score": "0.42270193", "text": "public function isBanned()\n {\n return $this->is_banned;\n }", "title": "" }, { "docid": "3db1398f4cd49ac93189d970366136ce", "score": "0.4218664", "text": "public function getMonitoredStopVisitCancellation()\n {\n return $this->monitoredStopVisitCancellation;\n }", "title": "" }, { "docid": "b6fc2c4472ed6bf4949d8803d30a6602", "score": "0.4214436", "text": "public function getSocketBindings(): array\n {\n return $this->sockets;\n }", "title": "" }, { "docid": "079f8f3641d5ae003ff5862ac34488fe", "score": "0.42136532", "text": "public static function getAvailable()\n {\n $associated_ids = DB::table('campaigns')->pluck('website_id');\n return DB::table('websites')->whereNotIn('id', $associated_ids)\n ->pluck('url', 'id')\n ->toArray();\n }", "title": "" }, { "docid": "47692440777fbd41c8ba30f4567bb5cf", "score": "0.42034245", "text": "public function getDenyMessage()\n {\n return $this->denyMessage;\n }", "title": "" }, { "docid": "5eb54918a9e945e15e095ca148d23e97", "score": "0.41995507", "text": "public function getConnectionTimeoutOptions()\n {\n $options = array();\n \n if(null !== $this->_requestConnectTimeout) {\n $options[CURLOPT_CONNECTTIMEOUT] = $this->_requestConnectTimeout;\n }\n if(null !== $this->_requestTimeout) {\n $options[CURLOPT_TIMEOUT] = $this->_requestTimeout;\n }\n \n return empty($options) ? false : $options;\n }", "title": "" }, { "docid": "497ef3a105603ef30354230ae4595024", "score": "0.41966805", "text": "public function getCommunicationDisabledUntil(): int\n {\n return $this->communication_disabled_until;\n }", "title": "" }, { "docid": "a797a085a0d5a40303a57a4e48effc78", "score": "0.41839063", "text": "public function getResourceLimits()\n {\n return $this->resource_limits;\n }", "title": "" }, { "docid": "21c35ce3f321371fad7d720acafe6b08", "score": "0.41809264", "text": "public function getBotEnabled()\n {\n return $this->get('botEnabled', false);\n }", "title": "" }, { "docid": "8dd09884f8b6ed32a83cc2f5e85db541", "score": "0.4173476", "text": "public function getWallChannels()\n {\n return $this->wallChannels;\n }", "title": "" }, { "docid": "b9c1905f8c7a06fff65bbd1fa0f48eb4", "score": "0.41733906", "text": "public function getExchangeBindings()\n {\n return $this->exchangeBindings;\n }", "title": "" }, { "docid": "3c02dee41e2c80060535104985020487", "score": "0.41575712", "text": "public function getDisabledShippingMethods()\n {\n return $this->getConfig('packages/disabled_shipping_methods');\n }", "title": "" }, { "docid": "fdb55cea96d596d13f27f67019b60ca9", "score": "0.41519222", "text": "public function getPortBindings()\n {\n return $this->_portBindings;\n }", "title": "" }, { "docid": "b9e50801d824678490a14a02667ab1b9", "score": "0.41507605", "text": "public function getB2bDirectConnectOutbound(): ?CrossTenantAccessPolicyB2BSetting {\n $val = $this->getBackingStore()->get('b2bDirectConnectOutbound');\n if (is_null($val) || $val instanceof CrossTenantAccessPolicyB2BSetting) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'b2bDirectConnectOutbound'\");\n }", "title": "" }, { "docid": "07814ac8ec14d9f3f4bad5e15af757ca", "score": "0.41501427", "text": "public function getB2bCollaborationOutbound(): ?CrossTenantAccessPolicyB2BSetting {\n $val = $this->getBackingStore()->get('b2bCollaborationOutbound');\n if (is_null($val) || $val instanceof CrossTenantAccessPolicyB2BSetting) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'b2bCollaborationOutbound'\");\n }", "title": "" }, { "docid": "edb0a8d0f1155a1906f12e518ec184ba", "score": "0.41376135", "text": "public function getBandwidthCapacityInMbps()\n {\n if (array_key_exists(\"bandwidthCapacityInMbps\", $this->_propDict)) {\n if (is_a($this->_propDict[\"bandwidthCapacityInMbps\"], \"\\Beta\\Microsoft\\Graph\\Networkaccess\\Model\\BandwidthCapacityInMbps\") || is_null($this->_propDict[\"bandwidthCapacityInMbps\"])) {\n return $this->_propDict[\"bandwidthCapacityInMbps\"];\n } else {\n $this->_propDict[\"bandwidthCapacityInMbps\"] = new BandwidthCapacityInMbps($this->_propDict[\"bandwidthCapacityInMbps\"]);\n return $this->_propDict[\"bandwidthCapacityInMbps\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "a5f75ce7e2404dca44c5b191fdf04586", "score": "0.41367325", "text": "protected function blockConfig() {\n return [];\n }", "title": "" }, { "docid": "63f9542ad2b07c2ba7bcb08d3ba7b987", "score": "0.41329557", "text": "public function getConfigExclude()\n {\n return $this->configParams['sections_exclude'];\n }", "title": "" }, { "docid": "4756282785cadd49c3e48ff20f609e14", "score": "0.41230068", "text": "public function getConnectionSecurityRulesFromGroupPolicyMerged()\n {\n if (array_key_exists(\"connectionSecurityRulesFromGroupPolicyMerged\", $this->_propDict)) {\n return $this->_propDict[\"connectionSecurityRulesFromGroupPolicyMerged\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "ac287e90d58992cfe073f25309632870", "score": "0.41214696", "text": "public function getConnections(): array\n {\n return $this->connections;\n }", "title": "" }, { "docid": "ac287e90d58992cfe073f25309632870", "score": "0.41214696", "text": "public function getConnections(): array\n {\n return $this->connections;\n }", "title": "" }, { "docid": "dc3edce9e1a2c6006fd890f842e4b92f", "score": "0.41209638", "text": "public function hasNetworks() {\n return $this->_has(5);\n }", "title": "" }, { "docid": "88895c5a7e5d412311526c05ff8b2dff", "score": "0.41192767", "text": "public function setB2bCollaborationOutbound($val)\n {\n $this->_propDict[\"b2bCollaborationOutbound\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "eea5fbe0dd13890cf8eb193d06fa799f", "score": "0.4116814", "text": "public function getInactiveBuses()\n {\n $this->db->where('ESTADO_BUS', 0);\n $query = $this->db->get('view_bus');\n return $query->result();\n }", "title": "" }, { "docid": "3a536dfd4aa9d029b9f4a38179e0ed25", "score": "0.41119394", "text": "final public static function notConfiguredForPayPal()\n {\n return self::get(560);\n }", "title": "" } ]
a6d28bcfc1f5f0e5997ec3c010217bbe
Update the specified resource in storage.
[ { "docid": "7d56ba702b0f53bfb287a0a271448f5e", "score": "0.0", "text": "public function update(Request $request, $id)\n {\n //\n }", "title": "" } ]
[ { "docid": "ae90a700efd6cf3cd7c51c1c4442503a", "score": "0.7658553", "text": "public function update(ResourceInterface $resource);", "title": "" }, { "docid": "d6a508508d13bb02f2a247e9bf196f78", "score": "0.71877676", "text": "function update ( $id, $resource ) {\r\n\r\n }", "title": "" }, { "docid": "8466495927f3bd478b5fd2d917f45f08", "score": "0.7099208", "text": "public function update(Request $request, Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "b66d45ed275220a344f3f222ce4980b5", "score": "0.70558053", "text": "public function update(Request $request, Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "9a55d4f96f94897978c13d34337c1901", "score": "0.6808637", "text": "public function update(StoreResource $request, $id)\n {\n $input = $request->all();\n \n $resource = Resource::find($id);\n \n $resource->fill($input);\n \n $resource->save();\n\n // redirect\n Session::flash('message', 'Successfully saved resource!');\n return redirect('resources');\n }", "title": "" }, { "docid": "cce47cfb911f4e7678d10bb61eec6271", "score": "0.6523108", "text": "public function update(Request $request, Resource $resource)\n {\n $this->validate($request, [\n 'name' => 'required|max:255',\n ]);\n \n $resource->update($request->except(['_method', '_token']));\n \n flash('El recurso fue actualizado');\n \n return redirect()->route('resource.index');\n }", "title": "" }, { "docid": "1414dc19f0f4ccb3b9d9b0c2f9754c1a", "score": "0.64248925", "text": "public function update(Request $request, Storage $storage)\n {\n //\n $storage->update($request->all());\n\n return redirect()->route('storage.index');\n }", "title": "" }, { "docid": "8b641f5e241101e64f479c764289bfd7", "score": "0.64144814", "text": "public function update(Request $request, Resource $resource)\n {\n\n try {\n $this->validate($request, [\n 'name' => 'required|string|unique:resources,name,' . $resource->id,\n 'group' => 'required|exists:groups,id',\n \"description\" => \"nullable|string\"\n ]);\n $resource->name = $request->name;\n $resource->group_id = $request->group;\n $resource->description = $request->description;\n $resource->save();\n session()->flash('flash_success', 'Updated Successfully.');\n return Redirect::route('resources.index');\n } catch (ValidationException $exception) {\n return Redirect::back()->withErrors($exception->errors())->withInput();\n } catch (Exception $e) {\n session()->flash('flash_error', 'Something went wrong');\n return $e->getMessage();\n return Redirect::back();\n }\n }", "title": "" }, { "docid": "d131fb800138c5d8889803afda8ecf7b", "score": "0.62923384", "text": "public function updateResource(){\n\t\t$this->setTitle('Update resource');\n $this->name = $_POST['name'];\n $this->id = $_POST['resource_id'];\n $this->rate = $_POST['rate'];\n $this->description = $_POST['description'];\n $this->type = $_POST['type'];\n $this->loadModel('resource');\n\t\t$this->added_resource = $this->model->updateResources($this->id,$this->name,$this->rate,$this->description,$this->type);\n $this->render('resource/_bewerkt.tpl');\n\t}", "title": "" }, { "docid": "6644414d1c8deb86d17216b9f77e38da", "score": "0.62589455", "text": "public function updateStream($path, $resource, $config = null);", "title": "" }, { "docid": "35958bbf8b0dca0d5dcadddf00962ef1", "score": "0.6193939", "text": "public function update() {\n \t\t//Does the Resource object have an id?\n if ( is_null( $this->id ) ) trigger_error (\"Resource::update(): Attempt to update an Resource object that does not have its ID property set.\", E_USER_ERROR );\n\n\t\t//Update the Resource\n $conn = new mysqli( $DB_HOST, $DB_USERNAME, $DB_PASSWORD, $DB_NAME );\n $sql = \"UPDATE resources SET title=:?, summary=?, url=?, content=?, category=?, is_free=?, is_featured=?, is_favorite=?, date_created=? WHERE id = ?\";\n $st = $conn->prepare ( $sql );\n $st->bind_param( 'sssssiiisi', $this->title, $this->summary, $this->url, $this->content, $this->category, $this->is_free, $this->is_featured, $this->is_favorite, date(\"Y-m-d H:i:s\"), $this->id );\n\n $st->execute();\n $conn = null;\n}", "title": "" }, { "docid": "27fdfad09c0210d824e7b3fabe4e253e", "score": "0.6178334", "text": "public function update(Request $request, $id)\n {\n // if(Auth::user()->admin){\n $storage = Storage::findOrFail($id);\n $storage->name = $request->name;\n $storage->address = $request->address;\n $storage->save();\n Session::flash('success','You successfully updated storage!');\n// }\n// else{\n// Session::flash('error','You do not have enough permission!');\n// }\n return redirect()->route('storage.index');\n }", "title": "" }, { "docid": "a25688f30a6b62a181559b84d042105c", "score": "0.6148197", "text": "public function update(Request $request, $resource)\n {\n $this->authorize('update', $resource);\n\n $resource->load($this->with);\n\n $this->form()->setModel($resource)->save(function($data,$form) use (&$resource){\n $general = $data->pull('general'); \n $relations = $data->get('relations');\n\n $admin = \\Auth::guard('admin')->user();\n \n $resource->forceFill($general->toArray()); \n\n $this->event('updating', $resource); \n\n $resource->save(); \n\n $this->syncRelations($relations, $resource); \n\n $this->event('updated', $resource); \n\n return $resource;\n }); \n\n $this->checkOwner($resource);\n\n return $this->redirect($request, $resource); \n }", "title": "" }, { "docid": "9a5dcd97258a1dde56734d3bfd713b95", "score": "0.6116463", "text": "public function updateResource(Request $request, $id)\n {\n $validatedData = $request->validate(\n [\n 'title' => 'required',\n 'description' => 'required',\n 'uploadedfile' => 'mimes:flv,mp4,avi,wmv,3gp,mov,mkv,vob'\n ],\n [\n 'title.required' => 'Please enter video title.',\n 'description.required' => 'Please enter description.',\n 'uploadedfile.mimes' => 'Video format not supported.'\n ]\n );\n\n if($file = $request->hasFile('uploadedfile')) {\n \n $file = $request->file('uploadedfile') ; \n $fileName = $file->getClientOriginalName() ;\n $destinationPath = public_path().'/storage/resource' ;\n $file->move($destinationPath,$fileName);\n $resourceUpdate = DB::table('table_resources')->where([\n ['id','=',$id],\n ])->update(array(\n 'title' => $request->title,\n 'description' => $request->description,\n 'url' => $fileName\n ));\n if($resourceUpdate) {\n return redirect()->back()->with('message', 'Resource successfully updated.');\n } else {\n return redirect()->back()->withErrors(['Nothing changed. Please try again.']);\n }\n \n } else {\n $resourceUpdate = DB::table('table_resources')->where([\n ['id','=',$id],\n ])->update(array(\n 'title' => $request->title,\n 'description' => $request->description \n ));\n if($resourceUpdate) {\n return redirect()->back()->with('message', 'Resource successfully updated.');\n } else {\n return redirect()->back()->withErrors(['Nothing changed. Please try again.']);\n }\n\n }\n\n }", "title": "" }, { "docid": "7bfce29a195f384d1bcc21b603c792d2", "score": "0.6033452", "text": "public function update(Request $request, $id){\n\n $this->validate($request, $this->getValidationRules($request), $this->getValidationMessages($request));\n \n if($request->file('image')){\n $rules = [\n 'image' => 'image|mimes:jpg,jpeg,png'\n ];\n\n $this->validate($request, $rules);\n }\n\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 $this->setResource($resource, $request);\n \n $resource->spaces()->detach();\n $resource->spaces()->attach($request->spaces);\n\n return redirect()->route('resources.index')\n ->with('session_msg', '¡El recurso, se ha editado correctamente!');\n }", "title": "" }, { "docid": "88d2a1e76ebbaa8bd165532adff21092", "score": "0.6013595", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $resource = Resource::where('product_id', $id)->first();\n\n $this->validate(request(), [\n 'category_id' => 'required',\n 'name' => 'required',\n 'short_name' => 'required',\n// 'article' => 'required',\n 'price' => 'required',\n 'collection_id' => 'required',\n 'atribut_id' => 'required',\n ]);\n\n $product->category_id = $request->get('category_id');\n $product->name = $request->get('name');\n $product->short_name = $request->get('short_name');\n// $product->article = $request->get('article');\n $product->price = $request->get('price');\n $product->collection_id = $request->get('collection_id');\n $product->atribut_id = $request->get('atribut_id');\n\n $method = __METHOD__;\n LogFile::ProductLog($product, $method);\n $product->save(); //Сохраняем изменения продукта\n\n return redirect('admin/products')->with('update', 'Продукт обновлен');\n }", "title": "" }, { "docid": "9349dc7f33c6326d0383abd536af6ce3", "score": "0.596908", "text": "public function updated(\n $resource = null,\n array $links = [],\n $meta = null,\n array $headers = []\n ): Response {\n return $this->getResourceResponse($resource, $links, $meta, $headers);\n }", "title": "" }, { "docid": "4e5acd860dcda74c61d836d96050b079", "score": "0.59593076", "text": "public function put(Storage $storage);", "title": "" }, { "docid": "215d42ed153b26bc9b49ae5c5951d499", "score": "0.5955367", "text": "public function update(StoragesUpdateRequest $request, $id)\n {\n $now = \\Carbon\\Carbon::now();\n $storage = Storage::find($id);\n $by_id = Auth::user()->id;\n\n $storage->fill([\n 'maker' => $request->maker,\n 'model_number' => $request->model_number,\n 'serial_number' => $request->serial_number,\n 'size' => $request->size,\n 'types' => $request->types,\n 'supported_os' => $request->supported_os,\n 'recovery_key' => $request->recovery_key,\n 'storage_password' => $request->storage_password,\n 'deleted_at' => $request->deleted_at === \"1\" ? $now : null,\n 'reason' => $request->reason,\n 'updated_by' => $by_id,\n ])\n ->save();\n\n return redirect()->route('storages.show', $storage->id)->with('information', 'レコードを更新しました。');\n }", "title": "" }, { "docid": "da49ecf5dc35b8e5edb8b21644469290", "score": "0.5939757", "text": "public function update(RespondentStoreRequest $request, $id)\n {}", "title": "" }, { "docid": "b96bbe109f16f366cfd72892d0d0be64", "score": "0.5903822", "text": "public function update(Request $Request, Resource $Resource)\n {\n\t\t\t$Actions = ($Request->actions)?:[1];\n\t\t\t$Action = \"0.\" . implode(\"\",array_replace(array_fill(1,max($Actions),0),array_fill_keys($Actions,1)));\n\t\t\t$Request->action = $Action;\n\t\t\t$UpdateArray = []; $Rules = Resource::ValidationRules(); $MyRules = [];\n\t\t\tforeach($Resource->FillableFields() as $Field){\n\t\t\t\tif($Field == \"code\") continue;\n\t\t\t\tif($Request->$Field != $Resource->$Field){\n\t\t\t\t\t$Resource->$Field = $UpdateArray[$Field] = $Request->$Field;\n\t\t\t\t\tif(isset($Rules[$Field])) $MyRules[$Field] = $Rules[$Field];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(empty($UpdateArray)) return redirect()->back()->with([\"info\"=>true,\"type\"=>\"info\",\"text\"=>\"No fields to update.\"]);\n\t\t\t$Validator = Validator::make($UpdateArray,$MyRules,Resource::ValidationMessages());\n\t\t\tif($Validator->fails()) return redirect()->back()->withErrors($Validator);\n\t\t\tif($Resource->status == \"ACTIVE\" && $Resource->save()) return redirect()->route('resource.index')->with([\"info\"=>true,\"type\"=>\"info\",\"text\"=>\"The Resource: \" . $Resource->displayname . \", updated successfully\"]);\n\t\t\treturn view(\"resource.error\");\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5890722", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "f78906153226222ee5bdfc9d13a06d23", "score": "0.58857", "text": "protected function save($resource) {\n if (isset($resource['public_id'])) {\n $this->collection->update(array('public_id' => $resource['public_id']), $resource, array('upsert' => TRUE));\n }\n }", "title": "" }, { "docid": "99960e81f0d443f90e5e0aa954abd481", "score": "0.5885372", "text": "public function update($id, Request $request) {\n $this->validate($request, isset($this->model->rules_update) ? $this->model->rules_update : $this->model->rules);\n\n ${$this->resource} = $this->model->findOrFail($id);\n\n $fillable_data = array_only($request->all(), $this->model->getFillable());\n\n App::setLocale(Helpers::getLang());\n\n ${$this->resource}->update($fillable_data);\n\n Admin::handleFileUpload('image', ${$this->resource}, 'image');\n\n return Redirect::route($this->view_path . '.index')->with('success', 'yeah');\n }", "title": "" }, { "docid": "a516665e3766b23c94ab33c5940aab8d", "score": "0.5874832", "text": "public function update(UpdateRequest $request, $id)\n {\n $data = $request->all();\n $product = Product::findOrFail($id);\n\n DB::beginTransaction();\n try {\n\n tap($product)->update($data);\n\n if ($request->hasFile('image')) {\n @unlink('products' . $product->image);\n $product->image = time() . '-' . $product->description . '.' . $request->file('image')\n ->getClientOriginalExtension();\n $request->file('image')->move('products', $product->image);\n }\n\n $product->save();\n\n $productResource = new ProductResource($product);\n\n DB::commit();\n return $this->responseSuccess([\n 'message' => trans('response.ProductController.update.success'),\n 'data' => $productResource,\n ]);\n } catch (\\Exception $exception) {\n DB::rollBack();\n return $this->responseError([\n 'message' => trans('response.ProductController.update.error'),\n 'errors' => $exception->getMessage(),\n ], Response::HTTP_INTERNAL_SERVER_ERROR);\n }\n }", "title": "" }, { "docid": "dbe374356cb114ab5e44b198d87b232f", "score": "0.58492017", "text": "public function put($resource, $data){\n $client = new Client([\n 'base_uri' => $this->baseUri\n ]);\n\n //Trim left slashes\n $resource = ltrim($resource,'/');\n\n //Cache miss call to API\n $res = $client->request('PUT', $resource, [\n 'json' => $data,\n 'headers' => [\n 'Authorization' => 'Bearer ' . $this->accessToken,\n 'User-Agent' => env('BASECAMP_AGENT')\n ]\n ]);\n\n //Get JSON payload\n $json = $res->getBody()->getContents();\n\n return json_decode($json);\n }", "title": "" }, { "docid": "0bb389e7c0c131b01dec97c33ec501e0", "score": "0.579422", "text": "public function update(Request $request, $id)\n {\n $resource = MyResource::find($id);\n if ($resource != null) {\n if ($resource->user->id == $request->user()->id || $request->user()->hasRole('Admin')) {\n $request->merge(['module_id' => $request->get('module_id')]);\n $request->validate(['title' => 'required|string', 'description' => 'nullable|string', 'google_drive' => 'nullable|url|max:255', 'publish_year' => 'required|numeric|digits:4|between:2008,' . date('Y'), 'module_id' => 'required|integer|exists:modules,id']);\n $resource->update($request->all());\n\n return redirect()->route('resources.index')\n ->with('success', 'Resource updated successfully');\n }\n return abort(401, 'You\\'re not allowed to edit this resource!');\n }\n return abort('404', 'User not found!');\n }", "title": "" }, { "docid": "7dec035d65557a5fa957575b344e390d", "score": "0.5787175", "text": "protected function saveResource(&$resource) {\n $this->getConfig()->set($resource['key'], $resource['value']);\n\n $resource['id'] = $resource['key'];\n }", "title": "" }, { "docid": "231bf07a63b0a16b02c083ef86c176fd", "score": "0.57833594", "text": "public function update(Request $request, $id)\n {\n $input=$request->file_path;\n if(isset($input)) {\n $File = $this->fileUpload($input);\n }\n else{\n $File = \"course_resource/default.jpg\";\n }\n\n\n $course_resources = CourseResource::whereId($id)->firstOrFail();\n $course_resources->course_id = $request->get('course_id');\n $course_resources->title = $request->get('title');\n $course_resources->description = $request->get('description');\n $course_resources->file_path = $File;\n\n\n $course_resources->save();\n return redirect(action('CourseResourcesController@edit', $course_resources->id))->with('status', 'The file has been updated!');\n }", "title": "" }, { "docid": "611dd800c7185eb18c8f75c9a8595a6c", "score": "0.57606536", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $product->name = $request->name;\n $product->rock = $request->rock;\n $product->weight = $request->weight;\n $product->carat = $request->carat;\n $product->stock = $request->stock;\n $product->price = $request->price;\n $product->color = $request->color;\n $product->category_id =Category::find($request->category_id)->id;\n\n if($request->hasFile(\"image\")){\n //delete old image and save new image\n unlink(storage_path('app/public/productImages/'. $product->src));\n $product->src=$request->image->hashName();\n $request->image->store(\"productImages\",\"public\");\n }\n \n if($product->save()){\n return redirect()->route('products.index');\n }else{\n return view(\"partials.error\");\n }\n }", "title": "" }, { "docid": "3b6c3aaa23b4fb918ebc093545c13dc6", "score": "0.57525045", "text": "public function update($entity);", "title": "" }, { "docid": "eaf18f66946228a152f8b83c6b49e31e", "score": "0.5747208", "text": "public function update($id, $data) {}", "title": "" }, { "docid": "ab7c78237c36ea0911a0a7aba52fe065", "score": "0.5722473", "text": "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $body = json_encode($json);\n $request = new Request('PUT', '/entities', [], $body);\n $response = $this->send($request);\n return $response;\n }", "title": "" }, { "docid": "94a50f00a1fdfc16d75925e06f8f3ece", "score": "0.5718023", "text": "public function update($resource, $id, array $data = [], array $fileData = [],\n array $options = []\n ) {\n $request = new Request(Request::UPDATE, $resource);\n $request->setId($id)\n ->setContent($data)\n ->setFileData($fileData)\n ->setOption($options);\n return $this->execute($request);\n }", "title": "" }, { "docid": "8d0a97cdf24a3e49996a055c1d6f9ee9", "score": "0.5674049", "text": "public function put($data);", "title": "" }, { "docid": "dd89d251e44d4f4288498c4f3fcdbd27", "score": "0.5669232", "text": "public function update(StoreQuestionRequest $request, Question $question)\n {\n $question->update($request->all());\n return (new QuestionResource($question))->response()->setStatusCode(Response::HTTP_OK);\n }", "title": "" }, { "docid": "07d0f77b1ff351c39ea339ec0c30336e", "score": "0.5668569", "text": "public function update(Request $request, $id)\n {\n $product=Product::find($id);\n $photo=$product->photo;\n if($request->file('photo')){\n $photo=$request->file('photo')->store('public/products');\n \\Storage::delete($product->photo);\n \n \n }\n $product->name=$request->name;\n $product->category_id=$request->category;\n $product->subcategory_id=$request->subcategory;\n $product->description=$request->description;\n $product->photo=$photo;\n $product->price=$request->price;\n $product->quantity=10;\n $product->update();\n notify()->success('Product Update Successfully!');\n return redirect('/product');\n }", "title": "" }, { "docid": "50feec899487537246234315718a4677", "score": "0.56560737", "text": "public function updated(Octocat $resource)\n {\n session()->flash('title', $resource->name);\n session()->flash('message', \"Octocat successfully updated\");\n session()->flash('type', 'success');\n }", "title": "" }, { "docid": "6310b8a0a92465d8b22379c86deeecd7", "score": "0.564211", "text": "public function put($resource, array $parameters = [], $headers = [])\n {\n return $this->request('PUT', $resource, [\n 'form_params' => $parameters,\n 'headers' => $headers,\n ]);\n }", "title": "" }, { "docid": "d31fe3056f944a65fa9ec19317300e44", "score": "0.5622648", "text": "public function update(Request $request)\n {\n \t$validator = Validator::make($request->all(), [\n 'title' => 'required',\n 'id' => 'required',\n 'url' => 'required'\n ]);\n if ($validator->fails()) {\n return redirect(route('manage-contractor-resources-edit', $request->id))\n ->withErrors($validator)\n ->withInput();\n }\n\n $info['title'] = $request->title;\n $info['url'] = $request->url;\n $info['chapter'] = $request->chapter;\n $info['description'] = $request->description;\n $id = $info['id'] =$request->id;\n if(!$id){ \n $request->session()->flash('error', \"Nothing to update (or) unable to update.\");\n return redirect(route('manage-contractor-resources'))->withInput();\n }\n if((new ContractorResource)->updateContractorResource($info)) {\n $request->session()->flash('success', \"Contractor Resource Updated Successfully.\");\n return redirect(route('manage-contractor-resources'));\n } else { \n $request->session()->flash('error', \"Nothing to update (or) unable to update.\");\n return redirect(route('manage-contractor-resources'))->withInput();\n }\n }", "title": "" }, { "docid": "45805699e2ef60790309007e165386e9", "score": "0.5617589", "text": "public function update(Request $request, $id)\n {\n if(count($request->all()) == 0)\n {\n return redirect()->route('home');\n }\n $item = Item::where('id', $id)->first();\n \n if($item)\n { $this->validate($request, [\n 'itemDescription' => ['required']\n ]); \n $item->itemDescription = $request->get('itemDescription');\n $item->inventoryID = $request->get('inventoryID');\n if($request->file('select_file'))\n { \n $this->validate($request, ['select_file' => 'image|mimes:jpeg,png,jpg,gif|max:2048']);\n $image = $request->file('select_file');\n $path = $image->store('stock', 's3');\n\n $item->photoUploadLink = $path;\n }\n $item->save();\n return redirect()->route('stock')->with('success','Stock was successfully updated.');\n }\n else{\n return redirect()->route('stock')->with('error','Unfortunately an error has occurred.');\n }\n }", "title": "" }, { "docid": "0ca7ba7cd4456dc2a52499c097eb460d", "score": "0.5611832", "text": "public function update(Request $request, Memory $memory)\n {\n \n }", "title": "" }, { "docid": "28ac32d59483ead96eb99c3920d2d977", "score": "0.56017566", "text": "public function update( Request $request, $id ) {\n if ( $request->hasFile( 'newphoto' ) ) {\n\n $file = $request->file( 'newphoto' );\n $file_name = time() . '.' . $file->extension();\n $file->move( public_path( 'backend/supplier/' ), $file_name );\n\n $supplier = Supplier::find( $id );\n\n $oldPhoto = $supplier->photo;\n\n if ( $oldPhoto ) {\n $photo_url = $oldPhoto;\n $part = explode( '/', $photo_url );\n $slicedArr = array_slice( $part, 3 );\n $photoStr = implode( '/', $slicedArr );\n unlink( $photoStr );\n }\n\n $supplier->name = $request->name;\n $supplier->email = $request->email;\n $supplier->address = $request->address;\n $supplier->phone = $request->phone;\n $supplier->shopname = $request->shopname;\n $supplier->photo = asset( \"backend/supplier/{$file_name}\" );\n $supplier->save();\n return $request;\n } else {\n $supplier = Supplier::find( $id );\n\n $supplier->name = $request->name;\n $supplier->email = $request->email;\n $supplier->address = $request->address;\n $supplier->phone = $request->phone;\n $supplier->shopname = $request->shopname;\n $supplier->photo = $request->photo;\n $supplier->save();\n return $request;\n }\n }", "title": "" }, { "docid": "a9e48624384796f4304eebd40f4ae1bc", "score": "0.5599046", "text": "public function update()\n {\n $id = Input::get('id');\n $obj = Product::find($id);\n if ($obj == null) {\n return view('404');\n }\n $obj->name = Input::get('name');\n $obj->images = Input::get('images');\n $obj->description = Input::get('description');\n $obj->price = Input::get('price');\n $obj->save();\n return redirect('/admin/product');\n }", "title": "" }, { "docid": "feafa85fd136a8bfa7378058dbef8934", "score": "0.55935574", "text": "public function update(StoreQuestion $request, Question $question)\n {}", "title": "" }, { "docid": "5583a1a1065b5e63099c0ebbfcc38083", "score": "0.55854446", "text": "public function modifyResource($uri,\n $sparql = \"\",\n $headers = [],\n $transaction = \"\") {\n $options = [];\n\n // Set content.\n $options['body'] = $sparql;\n\n // Set headers.\n $options['headers'] = $headers;\n $options['headers']['Content-Type'] = 'application/sparql-update';\n\n // Ensure uri takes transaction into account.\n $uri = $this->prepareUri($uri, $transaction);\n\n $response = $this->client->request(\n 'PATCH',\n $uri,\n $options\n );\n\n return null;\n }", "title": "" }, { "docid": "4016847dea9b55e59a4acd18600a30f5", "score": "0.55813426", "text": "public function update($request, $id);", "title": "" }, { "docid": "15b871253c843a97a53c3d5984ec74b9", "score": "0.5576059", "text": "public function update(Request $request, $id)\n {\n //\n $this->validate($request, [\n 'name' => 'required',\n 'price' => 'required',\n 'image_url' => 'image|nullable|max:1999'\n ]);\n\n $product = Product::find($id);\n $product->name = $request->input('name');\n $product->price = $request->input('price');\n $product->groups = $request->input('groups');\n $product->stocks = $request->input('stocks');\n $product->description = $request->input('description');\n //to handle file in updload this way if no new image added the image \n //wont be updated.\n if ($request->hasFile('image_url')){\n //to get the filename with ext\n $file = $request->file('image_url')->getClientOriginalName();\n //get file name\n $filename = pathinfo($file, PATHINFO_FILENAME);\n //get extensiopn\n $ext = $request->file('image_url')->getClientOriginalExtension();\n //new filename\n $fileNameToStore = $filename.'_'.time().'.'.$ext;\n #upload\n $path = $request->file('image_url')->storeAs('public/images', $fileNameToStore);\n }else{\n $fileNameToStore = $product->image_url;\n }\n $product->image_url= $fileNameToStore;\n $product->save();\n\n return redirect('/');\n }", "title": "" }, { "docid": "d30de7511ec7de74e32f94e01d31fafe", "score": "0.5566411", "text": "public function update(Request $r, $id){\n $prk = Portkey::find($id);\n $prk->name = $r->name;\n \n if(isset($r->image)){\n Storage::disk('portkeyMap')->delete($prk->image);\n $path = $r->file('image')->store('', 'portkeyMap');\n $prk->image = $path;\n }\n $prk->save();\n return redirect()->route('portkey.index');\n }", "title": "" }, { "docid": "f77c93b62808595a63d9f6f31b1f80e0", "score": "0.55661047", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "8f8dacf3ca2fb2c9044973cfcebc7c92", "score": "0.555745", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if(!empty($request->input('tags'))){\n $product->tags()->sync($request->input('tags'));\n }else {\n $product->tags()->detach();\n }\n\n //gestion sup image\n if($request->input('delete_picture')=='true'){\n if(!is_null($product->picture)) {\n Storage::delete($product->picture->uri);\n $product->picture->delete();\n }\n }\n\n //gestion de la modification image\n if(!is_null($request->file('thumbnail'))){\n if(!is_null($product->picture)) {\n Storage::delete($product->picture->uri);\n $product->picture->delete();\n }\n\n $im = $request->file('thumbnail');\n $ext = $im->getClientOriginalExtension();\n $uri = str_random(12).'.'.$ext;\n $picture = Picture::create([\n 'uri' => $uri,\n 'type' => $ext,\n 'size' => $im->getClientSize(),\n 'product_id' => $product->id\n ]);\n\n $request->file('thumbnail')->move(env('UPLOAD_PATH','./uploads'), $picture->uri);\n\n }\n\n $product->update($request->all());\n return redirect('product')->with(['message'=>'success']);\n }", "title": "" }, { "docid": "603c333c3d11c6ec2de9c240d7fa4363", "score": "0.55474466", "text": "public function update(Request $request, $id)\n {\n $image = $request->file('image')->store('product', 'public');\n $product = Product::find($id);\n\n $product->nombre = $request->input('nombre');\n $product->descripcion = $request->input('descripcion');\n $product->precio = $request->input('precio');\n $product->stock = $request->input('stock');\n $product->category_id = $request->input('category_id');\n $product->image = $image;\n \n $product->save();\n\n return redirect(\"/$product->id/showProduct\"); \n }", "title": "" }, { "docid": "7412cf8d4f3cd118bf4c8ef71352185b", "score": "0.5544467", "text": "public function update(Request $request, Restify $restify)\n {\n //\n }", "title": "" }, { "docid": "4c0ab51ecbeaff3788498a88d8e05dde", "score": "0.55394554", "text": "public function update($id) {\n \n }", "title": "" }, { "docid": "66139d48c34ab92a5f49f5d92e5064cc", "score": "0.55334014", "text": "public function put_products($productName)\n{\n $raw = file_get_contents('php://input');\n $newProduct = Product::fromJson($raw);\n\n $db = new DataStore();\n $db->beginTransaction();\n $oldProduct = Product::productByName($db, $productName);\n if (is_null($oldProduct))\n throw new RESTException('Product not found.', 404);\n\n $oldProduct->update($db, $newProduct);\n $db->commit();\n echo('Product ' . $productName . ' updated.');\n}", "title": "" }, { "docid": "45a4f9a4a649b70b7c4d70ad32264661", "score": "0.5530422", "text": "public function update(Request $request,$id)\n { \n $slider = Slider::find($id);\n //start image upload\n if($request->file('image') != \"\"){\n $_IMAGE = $request->file('image');\n $name = time().$_IMAGE->getClientOriginalName();\n $uploadPath = 'public/frontend/images/main-slider/';\n $_IMAGE->move($uploadPath,$name);\n $_imageUrl = $uploadPath.$name;\n\n //delete previous image\n if(!empty($slider->image)){\n try{\n unlink(\"$slider->image\");\n }\n catch(\\Exception $e){\n\n }\n finally{\n $flag = true; \n }\n }\n //store updated image\n $slider->image = $_imageUrl;\n\n }\n //end image upload\n $slider->type = $request->type;\n $slider->title = $request->title;\n $slider->sub_title = $request->sub_title;\n $slider->redirect_link = $request->redirect_link;\n $slider->active = $request->active;\n $slider->slider_order = $request->slider_order;\n $slider->save();\n\n return redirect('/admin/sliders')->with('success',' Data Updated');\n }", "title": "" }, { "docid": "0b10222182779f95692d101f822f75b6", "score": "0.55273986", "text": "public function update(Request $request, $id)\n {\n\n $slider=Slider::findorfail($id);\n $this->validate($request,[\n \"title\"=>\"required|max:100\",\n \"image\"=>\"nullable|image\"\n ]);\n\n $slider->name=$request->get(\"title\");\n if($request->hasFile(\"image\")){\n $old_location=public_path(\"images/slider/\".$slider->image_url);\n if(file_exists($old_location))\n unlink($old_location);\n\n $dblocation=uniqid(true).'.png';\n $location=public_path('images/slider/'.$dblocation);\n $file=$request->file(\"image\");\n Image::make($file)->encode(\"png\")->save($location);\n $slider->image_url=$dblocation;\n }\n\n $slider->save();\n Session::flash(\"success\",\"Slider has been updated\");\n\n return redirect()->back();\n\n\n }", "title": "" }, { "docid": "122628d1e06ea888611a75c166b89b4c", "score": "0.552677", "text": "public function patch($data) {\n if (isset($data['id']) && !is_numeric($data['id'])) {\n // Throw an error....\n return new ResourceResponse(\n [\n 'error' => t('You must provide an valid ID when updating a resource.'),\n ],\n ResourceResponse::HTTP_BAD_REQUEST\n );\n }\n $file_system_access_entity = entity_load('file_system_access', $data['id']);\n if (empty($file_system_access_entity)) {\n return new ResourceResponse(\n [\n 'error' => t('Resource not found.'),\n ],\n 404\n );\n }\n if (isset($data['entity_id']) && is_numeric($data['entity_id'])) {\n $file_system_access_entity->set('entity_id', $data['entity_id']);\n }\n if (isset($data['entity_type'])) {\n $file_system_access_entity->set('entity_type', $data['entity_type']);\n }\n if (isset($data['can_view']) && in_array($data['can_view'], [0, 1])) {\n $file_system_access_entity->set('can_view', $data['can_view']);\n }\n if (isset($data['can_write']) && in_array($data['can_write'], [0, 1])) {\n $file_system_access_entity->set('can_write', $data['can_write']);\n }\n if (isset($data['notify_of_upload']) && in_array($data['notify_of_upload'], [0, 1])) {\n $file_system_access_entity->set('notify_of_upload', $data['notify_of_upload']);\n }\n if (isset($data['user_id'])) {\n $file_system_access_entity->set('user_id', ['target_id' => $data['user_id']]);\n }\n // Save the FileSystemAccess Entity.\n $file_system_access_entity->save();\n // Return reponse.\n return new ModifiedResourceResponse(NULL, 202);\n }", "title": "" }, { "docid": "a82e18d865c6a0f13355d38c12c144b4", "score": "0.5523652", "text": "public function updateFilepath(){\n if(!empty($this->originalResource)){\n $this->setFilepath($this->getOriginalResource()->getIdentifier());\n }\n }", "title": "" }, { "docid": "c2ba30e945f68db8e69ec9299a2bf860", "score": "0.55200166", "text": "public function setResource($resource){\n $this->resource = $resource;\n }", "title": "" }, { "docid": "66fbae8975fea1c3ac6a3142735e3664", "score": "0.55114806", "text": "public function update(Request $request, $id)\n {\n $lens = Lens::find($id);\n\n File::delete(str_replace('public','storage',$lens->image));\n\n $lens->delete();\n\n $path = $request->file('image')->store('public');\n\n $lens = Lens::create($request->all());\n\n $lens->image = $path;\n $lens->update();\n\n return redirect()->route('lens.index');\n }", "title": "" }, { "docid": "265c7e4e1d9ccb8f2d919846c5c6d0e1", "score": "0.55072427", "text": "public function update($id, $input);", "title": "" }, { "docid": "70d4983ca950042ec52182066262a01f", "score": "0.55057055", "text": "public function update(Request $request, Product $product)\n {\n \n $product->name = $request->name;\n $product->price = $request->price;\n $product->description = $request->description;\n $product->featured = $request->featured;\n $product->image = $request->image;\n $product->category_id = $request->category_id;\n $product->brand_id = $request->brand_id;\n\n $product->save();\n\n return response([\n 'data' => new ProductResource($product)\n ],Response::HTTP_CREATED);\n }", "title": "" }, { "docid": "a1981e95d8e1e839e57300bff0e83269", "score": "0.5500746", "text": "abstract public function update_storage_site();", "title": "" }, { "docid": "012a18ea3549362ce2727f6242b46f5a", "score": "0.5497882", "text": "public function update(UpdateProductRequest $request, $id)\n {\n $products = Product::find($id);\n $path = null;\n $requestData = $request->all();\n if ($request->file('image')) {\n $path = $request->file('image')->store('public');\n @unlink('storage/'. $products->image);\n }\n if($request->hasFile('image')) {\n //\\File::delete($events->image);\n $requestData['image'] = $path;\n// $requestData['image'] = IdomNotification::uploadAndResize($request->file('image'));\n }\n\n\n\n\n// dd($data);\n $products->update($requestData);\n// $idoms->update($requestData);\n\n return redirect('/admin/products')->with('success','Item update successfully!');\n }", "title": "" }, { "docid": "631ec05d06376fc3d4e4c009809fbc97", "score": "0.54973245", "text": "public function update(SliderRequestUpdate $request, $id)\n {\n $slider=Slider::find($id);;\n $slider->TituloSlider=$request->TituloSlider;\n $slider->DescripcionSlider=$request->DescripcionSlider;\n $slider->EstadoSlider=$request->EstadoSlider;\n\n if ($request->file('file')) {\n \n Storage::disk('s3')->delete('sliders/'.$slider->file_name);\n\n $nameFile = $request->file('file');\n \n $newName = time().rand().'.'.$nameFile->getClientOriginalExtension();\n #Amazon\n\n $path = $nameFile->storeAs('sliders', $newName,'s3');\n Storage::disk('s3')->setVisibility($path, 'public');\n \n $slider->file_url=Storage::disk('s3')->url($path);\n $slider->file=$nameFile->getClientOriginalName();\n $slider->file_name=$newName;\n $slider->file_type=$nameFile->getClientOriginalExtension();\n\n }\n\n \n # $slider->file_url\n $slider->update();\n\n return $slider;\n }", "title": "" }, { "docid": "5ec7d4d96d210f32e09b80058c55a490", "score": "0.5496931", "text": "public function update(Request $request, $id){\n $product = Product::find($id);\n // dd($product);\n if($product){\n if($request->description){\n $product->description = $request->description;\n }\n if($request->name){\n $product->name = $request->name;\n }\n if($request->qty){\n $product->qty = $request->qty;\n }\n if($request->price){\n $product->price = $request->price;\n }\n if ($request->hasFile('image')) {\n $img_src = $request->file('image')->store('public/images');\n $product->image_src = $img_src;\n }\n\n return $product->save() ? 'product updated!' : 'could not update the product';\n }else{\n return 'product not found';\n }\n \n }", "title": "" }, { "docid": "ba09590827a6c41287d661376548ea80", "score": "0.5494963", "text": "public function update(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$resource->load('client');\n\t\t$client = $resource->client;\n\n\t\t$this->authorize('manage', $resource);\n\n\t\t$this->validate($request, [\n\t\t\t'name' => ['required', 'max:255'],\n\t\t\t'slug' => [\n\t\t\t\t'required',\n\t\t\t\t'max:255',\n\t\t\t\t'alpha_dash',\n\t\t\t\t'unique:resources,slug,'.$request->input('slug', $resource->slug).',slug,client_id,'.$resource->client->id,\n\t\t\t\t'not_in:create,destroy,edit,prune'\n\t\t\t],\n\t\t\t// 'metadata' => ['array'],\n\n\t\t\t'attachments' => ['array'],\n\t\t\t'uploads' => ['array'],\n\n\t\t\t'type' => ['required'],\n\n\t\t\t'client' => ['required', 'exists:clients,id'],\n\n\t\t\t'tags' => ['array'],\n\t\t\t'tags.*' => ['exists:tags,id'],\n\t\t]);\n\n\t\tif (($newClient = $request->input('client', $resource->client->id)) != $resource->client->id) {\n\t\t\t$client = Client::find($newClient);\n\t\t\t$resource->client()->associate($client);\n\t\t}\n\n\t\t$resource->name = $request->input('name');\n\t\t$resource->slug = $request->input('slug');\n\t\t$resource->metadata = $request->input('metadata', []);\n\n\t\t$attachments = $request->input('attachments', []);\n\n\t\tif ($request->hasFile('uploads')) {\n\t\t\t$uploads = $request->file('uploads');\n\t\t\t$attachments = array_merge($attachments, $uploads);\n\t\t}\n\n\t\t$resource->attachments = $attachments;\n\n\t\t// set type\n\t\tif (!($type = ResourceType::findBySlug($request->input('type')))) {\n\t\t\t$type = ResourceType::create([\n\t\t\t\t'name' => $request->input('type'),\n\t\t\t\t'slug' => str_slug($request->input('type')),\n\t\t\t]);\n\t\t}\n\n\t\t$resource->type()->associate($type);\n\n\t\t$resource->save();\n\n\t\t$resource->tags()->sync($request->input('tags', []));\n\n\t\treturn redirect()->route('clients.resources.show', ['client' => $resource->client->url, 'resource' => $resource->url])\n\t\t\t->with('alert-success', 'Resource updated!');\n\t}", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54949397", "text": "public function update($id);", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54949397", "text": "public function update($id);", "title": "" }, { "docid": "96e3e53de207d1c0165b2f8d9b2e8bd8", "score": "0.5492371", "text": "public function update(Request $request, $id)\n {\n $book = Book::findOrFail($id);\n $path = Storage::putfile('public',$request->file('image'));\n $url = Storage::url($path);\n\n $book->title = $request->title;\n $book->price = $request->price;\n $book->image = $url;\n $book->subject = $request->subject;\n $book->author = $request->author;\n $book->pub_house = $request->pub_house;\n $book->description = $request->description;\n $book->update();\n\n return redirect()->route('land_page');\n }", "title": "" }, { "docid": "f34e0cee27ed61fcc8d340527f1d9673", "score": "0.5490983", "text": "#[Put('/{slug}', middleware: ['auth', 'can:update,slug'])]\n #[Operation(tags: ['Articles'], security: 'BearerToken')]\n #[RequestBody(factory: UpdateArticleRequestBody::class)]\n #[Response(factory: SingleArticleResponse::class, statusCode: 200)]\n #[Response(factory: ErrorValidationResponse::class, statusCode: 422)]\n public function update(Article $slug, UpdateArticleRequest $request): SingleArticleResource\n {\n $slug->update($request->input('article'));\n\n return new SingleArticleResource($slug->loadCount('favoritedBy'));\n }", "title": "" }, { "docid": "4d408504ca6fc63ae1c9b25f108a04b1", "score": "0.5490762", "text": "public function update(Request $request, $id)\n {\n $item = Item::find($id);\n $item->fill($request->all())->save();\n\n //file upload\n if($request->file('image_img')){\n $path = Storage::disk('public')->put('images/photos' , $request->file('image_img'));\n $item->fill(['image_img' => asset($path)])->save();\n }\n\n //tags\n $item->tags()->sync($request->get('tags'));\n\n return redirect()->route('item.index')->with('flash','Article actualizado correctamente.');\n }", "title": "" }, { "docid": "2f3b20927c08bdb57df533acda52a1fe", "score": "0.5490345", "text": "public function update(Request $request) {\n $this->validateItemInput($request);\n \n $item = Db::get()\n ->find(\n $this->classCall, $request->attributes->get('id')\n );\n if (!($item instanceof $this->classCall)) {\n $response = new Response('Trying to update non existing item.');\n $response->setStatusCode(400);\n return $response;\n }\n $oldPath = $item->path;\n $item->update($request->request->all());\n if ($oldPath !== $item->path) {\n $item->path = $this->getUniquePath($item->path);\n }\n Db::get()->persist($item);\n return $item;\n }", "title": "" }, { "docid": "eb69ca57c3bde9f06755b1a82e717baa", "score": "0.54793954", "text": "public function update(Request $request, $id)\n {\n $item = Item::findOrFail($id);\n \n $currentPhoto = $item->photo;\n if ($request->photo != $currentPhoto) {\n $name = time().'.' . explode('/',explode(':', substr($request->photo, 0, strpos($request->photo, ';')))[1])[1];\n\n \\Image::make($request->photo)->save(public_path('/img/item/').$name);\n $request->merge(['photo' => $name]);\n\n $itemPhoto = public_path('/img/item/').$currentPhoto;\n if (file_exists($itemPhoto)) {\n @unlink($itemPhoto);\n }\n }\n $item->update($request->all());\n \n return ['message' => 'Updated Success'];\n }", "title": "" }, { "docid": "ceac6ee3c36ec0367a2b9490feebe7a9", "score": "0.5478989", "text": "public function update(Request $request, $id)\n {\n\n $requestData = $request->all();\n $imagePaths = [];\n\n if ($request->hasFile('path')) {\n for ( $index = 0; $index < sizeof( $requestData['path']); $index++) {\n $imagePath = 'storage/' . $request->file('path')[$index]\n ->store('uploads', 'public');\n array_push($imagePaths, $imagePath);\n }\n }\n $image = Image::findOrFail($id);\n\n if (sizeof($imagePaths) === 0) {\n $requestData['path'] = $image->path;\n $image->update($requestData);\n }\n else {\n $oldImagePath = $image->path;\n $oldImagePath = str_replace(\"storage/\",storage_path('') . '/app/public/' , $oldImagePath);\n\n foreach ($imagePaths as $imagePath){\n\n $requestData['path'] = $imagePath;\n $image->update($requestData);\n }\n\n if(File::exists($oldImagePath)){\n File::delete($oldImagePath);\n }\n }\n\n\n\n return redirect('images/' . $request->get('post_id'))->with('flash_message', 'Image updated!');\n }", "title": "" }, { "docid": "6dbe9a80c3cc7c4c7214a73b919cb78b", "score": "0.54670787", "text": "public function update($request);", "title": "" }, { "docid": "2840f4acb2ccb4170d4557d937e25de4", "score": "0.5465156", "text": "public function update(Request $request, $id)\n {\n $data = Image::find($id);\n $all = $request->all();\n if(is_null($data))\n return response()->json(['error' => 'Resource introuvable'], 404);\n else\n {\n if(isset($all['url']))\n {\n $name = File::image($all['url']);\n if($name)\n {\n $all['url'] = $name;\n }else $all['url'] = $data->url;\n }\n\n $data->update($all);\n $data->categories()->sync($request->categories);\n $data->tags()->sync($request->tags);\n\n return response()->json(new ImageResource($data), 200);\n }\n }", "title": "" }, { "docid": "9080726c97000b95123e3a3548679cb5", "score": "0.5464735", "text": "public function update(Request $request, $id)\n {\n $this->slider = $this->slider->find($id);\n $rule =$this->slider->getRules('update');\n $request->validate($rule);\n $data = $request->except('image');\n\n if($request->image){\n $image_name = uploadImage($request->image,'slider','500x300');\n if($image_name){\n $data['image'] = $image_name;\n if($this->slider->image!= ''){\n deleteImage($this->slider->image,'slider');\n };\n }\n }\n $update = $this->slider->update($data);\n if($update){\n request()->session()->flash('success','Product has been updated');\n }else {\n request()->session()->flash('error','Product has not Been updated');\n\n }\n return redirect()->route('slider.index');\n\n }", "title": "" }, { "docid": "a1d61f0aa122378fb9049378295f5945", "score": "0.54586715", "text": "public function update($entity)\n {\n }", "title": "" }, { "docid": "a1d61f0aa122378fb9049378295f5945", "score": "0.54586715", "text": "public function update($entity)\n {\n }", "title": "" }, { "docid": "a1d61f0aa122378fb9049378295f5945", "score": "0.54586715", "text": "public function update($entity)\n {\n }", "title": "" }, { "docid": "536db9f9519d6601d2b49cdcde95f013", "score": "0.5458005", "text": "public function update(Request $request, $id)\n {\n //\n $this->validate($request,[\n 'id_manufacture' => 'required',\n 'asset_tag' => 'required',\n 'id_category' => 'required',\n 'order_number' => 'required',\n 'qty' => 'required',\n 'min_qty' => 'required',\n 'id_location' => 'required'\n ]);\n $input = $request->all();\n $asset = Assets::find($id);\n if(!empty($input['image'])){\n Storage::delete(public_path('storage'),$asset->image);\n $input['image'] = time().'.'.$request->image->getClientOriginalExtension();\n $request->image->move(public_path('storage/assets/'), $input['image']);\n }else {\n $input = array_except($input, array('image'));\n }\n $input['created_by'] = Auth::user()->name;\n $asset->update($input);\n return redirect()->route('assets.index')->with(['success' => 'Asset updated successfully', 'class' => 'close']);\n }", "title": "" }, { "docid": "db3837780a308513dc99c922897e898e", "score": "0.54579574", "text": "public function update()\n {\n $this->delete();\n $this->save();\n }", "title": "" }, { "docid": "5f36cdc3217c7c251089de9b1597e8a0", "score": "0.54572374", "text": "public static function put(string $resource, array $body = []) {\r\n $response = self::getClient()->request(\r\n \"PUT\",\r\n self::createUrl($resource),\r\n self::createHeaders(!empty($body)),\r\n NullStripper::strip($body)\r\n );\r\n\r\n if (!self::isSuccessful($response)) {\r\n self::handleFailure($response);\r\n }\r\n return self::handleSuccess($response);\r\n }", "title": "" }, { "docid": "8f4a12a4a3962d1da8617ab2c1add338", "score": "0.5455601", "text": "public function update(Request $request, Product $product)\n {\n if($request->image != NULL) {\n #Image uploading\n $storedPath = $request->file('image')->store('public/products'); \n }\n \n \n #Update the current product\n $product->update([\n 'title' => $request->title,\n 'body' => $request->body,\n 'price' => auth()->user()->id == $product->user_id ? $request->price : $product->price,\n 'category' => $request->category,\n 'image_path' => $request->image != NULL ? $storedPath : $product->image_path,\n 'status' => $request->status\n ]);\n\n #Return back to list page\n return redirect('/products');\n }", "title": "" }, { "docid": "19323452d4f8b1e3cc766b966234512d", "score": "0.54551905", "text": "public function update($obj) {\n }", "title": "" }, { "docid": "236d64bd92646776ec0d62483983f6b1", "score": "0.5442009", "text": "public function update($id, $data)\n {\n try {\n $this->logger->info(\"Trying to update resource in database table\");\n $this->checkId($id);\n\n $putValues = $this->putValues($id, $data);\n\n $query = \"UPDATE guest.student SET name = :name, surname = :surname, indexno = :indexno, address = :address WHERE id = :id\";\n $stmt = $this->conn->prepare($query);\n\n $stmt->bindParam(\":id\", $id);\n $stmt->bindParam(\":name\", $putValues[\"name\"]);\n $stmt->bindParam(\":surname\", $putValues[\"surname\"]);\n $stmt->bindParam(\":indexno\", $putValues[\"indexno\"]);\n $stmt->bindParam(\":address\", $putValues[\"address\"]);\n\n $stmt->execute();\n echo \"Resource successfully updated\";\n $this->logger->info(\"Updating resource successful in database table\");\n\n } catch (InvalidIdException $e) {\n $this->logger->warning(\"ID doesn't exist in database table\");\n echo \"Error: \" . $e->getMessage();\n } catch (\\Exception $e) {\n $this->logger->warning(\"Error updating resource in database table\");\n echo \"Error updating resource: \" . $e->getMessage();\n }\n }", "title": "" }, { "docid": "a098fb5d396525d0b997679afe399e81", "score": "0.54363286", "text": "public function update(Request $request, $id)\n {\n\n $product = $this->productRepo->getById($id);\n $request_data = $request->except(['_method', '_token', 'photo', 'product_cats', 'ar', 'en']);\n\n $locale = $request->only('ar', 'en');\n $cats = $request->product_cats;\n\n\n if ($request->hasFile('photo')) {\n /*delete old photo*/\n $oldPath = public_path('/images/products/' . $product->photo);\n $oldThumbPPath = public_path('/images/products/thumb/' . $product->photo);\n File::delete($oldPath, $oldThumbPPath);\n\n $image = $this->upload($request->photo, 'products', true);\n $request_data['photo'] = $image;\n\n }\n\n $this->productRepo->updateData($id, $request_data, $locale, $cats);\n\n return redirect()->route('products.index')->with('update', 'data updated successfully');\n\n\n }", "title": "" }, { "docid": "78c9828cfb522a8b15c9e25aecac3a44", "score": "0.54266506", "text": "public function update(Request $request, $id)\n {\n $order = Order::findOrFail($id);\n $previous_qty = $order->quantity;\n $order->user_id = auth()->id();\n $order->product_id = $request['product_id'];\n $order->quantity = $request['quantity'];\n\n if ($order->save()) {\n Inventory::where('product_id', $order->product_id)->decrement('quantity', $order->quantity);\n Inventory::where('product_id', $order->product_id)->increment('quantity', $previous_qty);\n return new OrderResource($order);\n }\n }", "title": "" }, { "docid": "ecf201c555a1f2a407beb441493f659d", "score": "0.5425398", "text": "public function update(Request $request, $id)\n {\n //\n // dd($request);\n $this->validate($request, [\n 'name' => 'required',\n 'price' => 'required',\n 'point' => 'required',\n 'category' => 'required',\n 'image' => 'image|mimes:jpeg,png,jpg,gif|max:2048',\n ]);\n $new_name = \"\";\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $new_name = time() . '.' . $image->getClientOriginalExtension();\n Image::make($image)->resize(450, 400)->save(public_path('picture/product/' . $new_name));\n $out_of_stock = Out_of_stock::find($id);\n $out_of_stock->name = $request->get('name');\n $out_of_stock->price = $request->get('price');\n $out_of_stock->point = $request->get('point');\n $out_of_stock->category = $request->get('category');\n $oldpruductname = $out_of_stock->picture;\n $out_of_stock->picture = $new_name;\n Storage::delete('product/'.$oldpruductname);\n } else {\n $out_of_stock = Out_of_stock::find($id);\n $out_of_stock->name = $request->get('name');\n $out_of_stock->price = $request->get('price');\n $out_of_stock->point = $request->get('point');\n $out_of_stock->category = $request->get('category');\n }\n\n $out_of_stock->save();\n return back()->with('success', 'Edit data success');\n }", "title": "" }, { "docid": "4da53910fe95b40fc7708d69a5bc4caf", "score": "0.54252774", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'sub_title' => 'required',\n 'image' => 'required|mimes:jpeg,bmp,png'\n ]);\n $slider = Slider::find($id);\n $image = $request->file('image');\n $filename = $image->getClientOriginalName();\n $filename = time(). '.' . $filename;\n $path = 'upload/slider/'.$filename;\n $storage = Storage::disk('s3');\n $storage->put($path, fopen($image, 'r+'), 'public');\n\n $slider->title = $request->title;\n $slider->sub_title = $request->sub_title;\n $slider->image = $path;\n $slider->save();\n Toastr::success('Slider Successefully Updated!', 'Success', [\"positionClass\" =>\"toast-top-right\"]);\n return redirect()->route('slider.index');\n }", "title": "" }, { "docid": "a4ae1c30e150f5cf694572b68551bd23", "score": "0.5425028", "text": "public function update(Request $request, $id)\n {\n $this->validate($request,[\n 'title'=>'required',\n 'content'=>'required',\n 'date'=>'required',\n 'image'=>'required|image',\n ]);\n $product = Product::find($id);\n $product->edit($request->all());\n $product -> uploadImage($request->file('image'));\n $product->setCategory($request->get('category_id'));\n $product->toggleStock($request->get('in_stock'));\n\n return redirect()->route('products.index');\n }", "title": "" }, { "docid": "f08541062169cb53c21e52b58cdb2dcd", "score": "0.5424735", "text": "public function update(Request $request, $id)\n {\n //\n $id = $request->id;\n $store_edit = Store::find($id);\n $store_edit->store_name = $request->store_name;\n $store_edit->store_tel = $request->store_tel;\n $store_edit->store_type_id = $request->store_type;\n $store_edit->store_lineid = $request->store_line;\n $store_edit->store_contact = $request->store_contact;\n $store_edit->store_address = $request->store_address;\n $store_edit->store_detail = $request->store_detail;\n $store_edit->store_status = $request->store_status;\n $store_edit->store_tax_contact = $request->store_tax_contact;\n $store_edit->store_tax_name = $request->store_tax_name;\n $store_edit->store_tax_id = $request->store_tax_id;\n $store_edit->confirm = $request->confirm;\n $store_edit->store_lat = $request->store_lat;\n $store_edit->store_lng = $request->store_lng;\n $tmp = '';\n if($request->check_list){\n foreach($request->check_list as $key => $item){\n if($key == 0){\n $tmp = $item;\n }\n else{\n $tmp = $item.','.$tmp;\n } \n }\n }\n $store_edit->store_promotion = $tmp;\n $store_edit->store_status = $request->store_status;\n\n\n if($request->hasFile('storeimage')){\n Storage::disk('do_spaces')->delete('stores/'.$store_edit->store_image); \n $newFileName = uniqid().'.'.$request->storeimage->extension();//gen name\n $imageStore = $request->file('storeimage');\n $t = Storage::disk('do_spaces')->put('stores/'.$newFileName, file_get_contents($imageStore), 'public');\n $store_edit->store_image = $newFileName;\n }\n if($request->hasFile('storeimageline')){\n Storage::disk('do_spaces')->delete('stores/'.$store_edit->store_lineid_image);\n $newFileName = uniqid().'.'.$request->storeimageline->extension();//gen name\n $imageStoreLine = $request->file('storeimageline');\n $t = Storage::disk('do_spaces')->put('stores/'.$newFileName, file_get_contents($imageStoreLine), 'public');\n $store_edit->store_lineid_image = $newFileName;\n }\n if($request->hasFile('storeimagetax')){\n Storage::disk('do_spaces')->delete('stores/'.$store_edit->store_tax_image);\n $newFileName = uniqid().'.'.$request->storeimagetax->extension();//gen name\n $imageStoreTax = $request->file('storeimagetax');\n $t = Storage::disk('do_spaces')->put('stores/'.$newFileName, file_get_contents($imageStoreTax), 'public');\n $store_edit->store_tax_image = $newFileName;\n }\n $store_edit->save();\n return redirect()->route('store.index')->with('feedback' ,'แก้ไขข้อมูลเรียบร้อยแล้ว');\n }", "title": "" }, { "docid": "2ed05e577c404795cab2b1dde733d75c", "score": "0.5418497", "text": "public function update(Request $request, $id)\n {\n $datos = $request->except('_token','_method');\n\n if ($request->hasFile('foto')) {\n $artista = Artista::findOrfail($id);\n Storage::delete('public/uploads/'.$artista->id.'/'. $artista->foto);\n $datos['foto'] = $request->file('foto')->getClientOriginalName();\n $request->file('foto')->storeAs('public/uploads/'.$artista->id, $datos['foto']);\n }\n\n Artista::where('id','=',$id)->update($datos);\n return redirect('artista');\n }", "title": "" }, { "docid": "da9aacaea3d57116c579322deaba3198", "score": "0.5416959", "text": "public function update(Request $request, $id)\n {\n try {\n $result = $this->model->find($id);\n\n if ($result) {\n $inputs = $request->except('_token');\n\n if ($request->hasFile('image')) {\n $fileName = time() . '.' . $request->image->getClientOriginalExtension();\n $file = $request->file('image');\n\n Storage::put($this->dishImageStoragePath . $fileName, file_get_contents($file), 'public');\n\n $inputs['image'] = $fileName;\n\n if (isset($result->image) && $result->image) {\n if (Storage::exists($this->dishImageStoragePath . $result->image)) {\n Storage::delete($this->dishImageStoragePath . $result->image);\n }\n }\n }\n\n $isSaved = $result->update($inputs);\n\n if ($isSaved) {\n return redirect($this->moduleRoute)->with(\"success\", __($this->moduleName . \" updated!\"));\n }\n }\n return redirect($this->moduleRoute)->with(\"error\", __(\"Something went wrong, please try again later.\"));\n } catch (\\Exception $e) {\n return redirect($this->moduleRoute)->with('error', $e->getMessage());\n }\n }", "title": "" }, { "docid": "9909c434dfa1fa2de013b52dc098057a", "score": "0.54166603", "text": "public function updateProduct();", "title": "" }, { "docid": "83fd3d73dd82fcaecb92e078c534bdfe", "score": "0.54161036", "text": "public function update(Request $request, $id)\n {\n $data = array();\n $data['status'] = $request->status;\n \n \n $image = $request->newphoto;\n\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/supplier/';\n $image_url = $upload_path.$name;\n $success = $img->save($image_url);\n \n if ($success) {\n $data['photo'] = $image_url;\n $img = DB::table('patients')->where('id',$id)->first();\n $image_path = $img->photo;\n $done = unlink($image_path);\n $user = DB::table('patients')->where('id',$id)->update($data);\n }\n \n }else{\n $oldphoto = $request->photo;\n $data['photo'] = $oldphoto;\n $user = DB::table('patients')->where('id',$id)->update($data);\n }\n }", "title": "" }, { "docid": "fa90d4335b5457d60aed5f93219c9fb9", "score": "0.5414578", "text": "function update($resource_id,$options)\n\t{\n\t\t//allowed fields\n\t\t$valid_fields=array(\n\t\t\t//'resource_id',\n\t\t\t//'survey_id',\n\t\t\t'dctype',\n\t\t\t'title',\n\t\t\t'subtitle',\n\t\t\t'author',\n\t\t\t'dcdate',\n\t\t\t'country',\n\t\t\t'language',\n\t\t\t//'id_number',\n\t\t\t'contributor',\n\t\t\t'publisher',\n\t\t\t'rights',\n\t\t\t'description',\n\t\t\t'abstract',\n\t\t\t'toc',\n\t\t\t'subjects',\n\t\t\t'filename',\n\t\t\t'dcformat',\n\t\t\t'changed');\n\n\t\t//add date modified\n\t\t$options['changed']=date(\"U\");\n\t\t\t\t\t\n\t\t//remove slash before the file path otherwise can't link the path to the file\n\t\tif (isset($options['filename']))\n\t\t{\n\t\t\tif (substr($options['filename'],0,1)=='/')\n\t\t\t{\n\t\t\t\t$options['filename']=substr($options['filename'],1,255);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//pk field name\n\t\t$key_field='resource_id';\n\t\t\n\t\t$update_arr=array();\n\n\t\t//build update statement\n\t\tforeach($options as $key=>$value)\n\t\t{\n\t\t\tif (in_array($key,$valid_fields) )\n\t\t\t{\n\t\t\t\t$update_arr[$key]=$value;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//update db\n\t\t$this->db->where($key_field, $resource_id);\n\t\t$result=$this->db->update('resources', $update_arr); \n\t\t\n\t\treturn $result;\t\t\n\t}", "title": "" }, { "docid": "cc834cb0ddf4d709f9b0966aeba0c395", "score": "0.5407511", "text": "public function update(Request $request, Product $product)\n {\n\n if (Auth::id()==$product->user_id) {\n $product->update($request->all());\n\n return response([\n 'data'=>new ProductResource($product)\n ],Response::HTTP_CREATED); \n }\n\n \nelse {\n return response([\n 'error'=>'product doesnt belong to current user'\n ],Response::HTTP_NOT_FOUND); \n}\n // return response()->json(new ProductResource($product), 200); \n\n \n\n \n }", "title": "" } ]
d8bb7fe72025affc2d6f6abe4c29a993
A basic feature test example.
[ { "docid": "941b8b3a72cda6aa07f57e8a69839387", "score": "0.0", "text": "public function test_insert_point(): void\n {\n factory(Customer::class, 10)->create();\n $customer = Customer::inRandomOrder()->limit(1)->first();\n $user = User::find(1);\n $response = $this->actingAs($user)->post('/master/customer-point', [\n 'date' => today()->format('Y-m-d'),\n 'point' => rand(0, 100),\n 'customer_id' => $customer->id,\n ]);\n\n $response->assertStatus(302);\n $response->assertRedirect('/master/customer');\n }", "title": "" } ]
[ { "docid": "27b72376743993e6021918ebdb7625cb", "score": "0.73942447", "text": "function skilltest_features() {\n }", "title": "" }, { "docid": "00a539965df7dcf2762e8364efe391d7", "score": "0.7217584", "text": "public function testExample()\n {\n \n \n\n }", "title": "" }, { "docid": "c3415b5013f4d819f86b68e8df4da7fb", "score": "0.7183731", "text": "public function testGetActorFeatures()\n {\n\n }", "title": "" }, { "docid": "8b51bead5ad79fd11ff3c698d4b1170c", "score": "0.70225805", "text": "public function test_sample() {\n\t\t$this->assertTrue( true );\n\t}", "title": "" }, { "docid": "8b51bead5ad79fd11ff3c698d4b1170c", "score": "0.70225805", "text": "public function test_sample() {\n\t\t$this->assertTrue( true );\n\t}", "title": "" }, { "docid": "9ec17ef48dcc37fefab1b634c98d8a53", "score": "0.69854325", "text": "public function testBasicExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "60c3061714987994fe20cecf14f46108", "score": "0.6977395", "text": "public function testExample()\n {\n\t try {\n\t\t $this->browse(function (Browser $browser) {\n\t\t\t $browser->visit('/contact')\n\t\t\t\t ->assertSee('Contact')\n\t\t\t\t ->assertSee('Addresses');\n\t\t });\n\t } catch (\\Exception $e) {\n\t } catch (\\Throwable $e) {\n\t }\n }", "title": "" }, { "docid": "c4cbcd4d25e89bec18372a2d349296f9", "score": "0.6891839", "text": "public function testBasicExample()\n {\n $this->browse(function (Browser $browser) {\n $this->seed();\n\n // ユーザー登録テスト\n $browser->visit('/login')\n ->type('email', '[email protected]')\n ->type('password', 'root')\n ->press('ログイン')\n ->assertPathIs('*/posts');\n\n // tabテスト\n $browser->visit('/users/1')\n ->click('.user-tabs > li:nth-child(2)')\n ->assertSee('今日のランチおいしかった。')\n ->click('.user-tabs > li:nth-child(1)')\n ->assertSee('次は何の本を読もうかな。');\n\n\n $browser->visit('users/1/edit')\n ->assertSee('アカウント編集')\n ->attach('image_name', __DIR__ . '/test.jpg')\n ->press('保存');\n });\n }", "title": "" }, { "docid": "dca98cb346eb6d2e827d6ff40968bfd3", "score": "0.6876892", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "cfb1c755edf1ff155fbe7fadab5088db", "score": "0.6865566", "text": "public function testExample()\n\t{\n\t\t$this->assertTrue(true);\n\t}", "title": "" }, { "docid": "5e17d6a48dd3141b60d52efc04bc2f85", "score": "0.6771783", "text": "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/')\n ->assertSee('MuitxoBem Empregos');\n });\n }", "title": "" }, { "docid": "ad6058edace6396c3cbe847a053d9c43", "score": "0.67589414", "text": "public function testBasicExample()\n\t\t{\n\t\t\t\t$this->visit( '/' )\n\t\t\t\t\t\t->see( 'Laravel 5' );\n\t\t}", "title": "" }, { "docid": "036475fe99891606fd4541aa12e64558", "score": "0.6755726", "text": "public function testExample()\n {\n $this->executeTest('google.sk', true);\n $this->executeTest('https://reinto.cz', false);\n $this->executeTest('https://www.reddit.com', true);\n }", "title": "" }, { "docid": "a148b0d9e2c5737cbbac83bb42a59cf8", "score": "0.67463404", "text": "public function testExample()\n {\n\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "91d6438e0a157861dba52c544b1ff5a5", "score": "0.67169183", "text": "public function testExample()\n {\n //$this->assertTrue(true);\n $r=$this->get('Services');\n $r->assertStatus(200);\n $r->assertSee('about');\n }", "title": "" }, { "docid": "4f4c040a228992397c837133949593f5", "score": "0.67138183", "text": "public function testExample()\n {\n $this->visit('/')\n ->see('About')\n ->see('Campuses')\n ->see('Location')\n ->see('Contact Us');\n }", "title": "" }, { "docid": "8bc07322314c88bdad6f741a44d1c7fb", "score": "0.6697918", "text": "function test_basic_example()\n {\n $user = factory(\\App\\User::class)\n ->create();\n\n $this->actingAs($user, 'api')\n ->visit('api/user')\n ->see($user->name);\n }", "title": "" }, { "docid": "a4c12687e93f054902518ef41662df8d", "score": "0.6677475", "text": "public function testScenarioAnalysis()\n {\n }", "title": "" }, { "docid": "72239d27dfd53e20a7148e576a31b146", "score": "0.666891", "text": "public function testExample() {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "72239d27dfd53e20a7148e576a31b146", "score": "0.666891", "text": "public function testExample() {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "710ac0d4bcf4a51f4a75664a3eeaf638", "score": "0.66583854", "text": "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/project_bookstore/client')\n ->assertSee('Trang chủ');\n });\n }", "title": "" }, { "docid": "16da467030dda1b42de1ff40c585bea1", "score": "0.665831", "text": "public function testExample()\n {\n $this->actingAs( \\App\\User::first() )\n ->visit('driver')\n ->see('Driver Listing');\n }", "title": "" }, { "docid": "a1ba82117ffe9caa25050db40e57b583", "score": "0.6653591", "text": "public function test_basic_example()\n {\n $user = factory(\\App\\User::class)->create([\n 'name' => 'Agustin',\n 'email' => '[email protected]'\n ]);\n\n $this->actingAs($user, 'api')\n ->visit('api/user')\n ->see('Agustin')\n ->see('[email protected]');\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "8e0ea47dc846d7a0bc3423eb4b68993e", "score": "0.66365665", "text": "public function testBasicExample()\n {\n $this->visit('/')\n ->see('Laravel');\n }", "title": "" }, { "docid": "6fa04073291900658631ed42606e397d", "score": "0.662138", "text": "public function testExample()\n {\n $response = $this->get(\"/hunter/\");\n $response->assertStatus(Response::HTTP_OK);\n }", "title": "" }, { "docid": "d6d61d13e1398de16f59845ffe2d3350", "score": "0.6606115", "text": "public function testExample()\n {\n $this->browse(function ($first) {\n// $first->visit('/login')\n// ->type('email','[email protected]')\n// ->type('password','maksimqwerty')\n// ->click('.btn-primary')\n// ->assertSee('Dashboard');\n\n $first->visit('/login')\n ->type('email','[email protected]')\n ->type('password','maksimqwerty')\n ->click('.btn-primary')\n ->visit('/posts/create')\n ->type('#title','New post test')\n ->type('#body','Test description')\n ->click('.btn-warning')\n //-- Resizing browser screen\n //->resize(420, 580)\n ->assertSee('New post test');\n });\n }", "title": "" }, { "docid": "304d138957781970cb5e9449e76ad833", "score": "0.6604926", "text": "public function test()\n {\n $this->executeScenario();\n }", "title": "" }, { "docid": "304d138957781970cb5e9449e76ad833", "score": "0.6604926", "text": "public function test()\n {\n $this->executeScenario();\n }", "title": "" }, { "docid": "304d138957781970cb5e9449e76ad833", "score": "0.6604926", "text": "public function test()\n {\n $this->executeScenario();\n }", "title": "" }, { "docid": "304d138957781970cb5e9449e76ad833", "score": "0.6604926", "text": "public function test()\n {\n $this->executeScenario();\n }", "title": "" }, { "docid": "304d138957781970cb5e9449e76ad833", "score": "0.6604926", "text": "public function test()\n {\n $this->executeScenario();\n }", "title": "" }, { "docid": "304d138957781970cb5e9449e76ad833", "score": "0.6604926", "text": "public function test()\n {\n $this->executeScenario();\n }", "title": "" }, { "docid": "5206edc2a16a4a8673d371a5e2a7eb76", "score": "0.65999097", "text": "public function testBasicExample()\n {\n $this->visit('/')\n ->see('Laravel 5');\n }", "title": "" }, { "docid": "2d1c4f342bed22fc8963c16eed10b9cd", "score": "0.659085", "text": "public function testExample()\n {\n $response = $this->get('/suggest');\n\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "e11b32dc387af3ce6f1531fa68317149", "score": "0.65834606", "text": "public function testBasicTest()\n {\n $response = $this->get('/')->assertSee('The Bulma Blog');\n\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "cdefc1a3f354429876acb2a269beb461", "score": "0.655233", "text": "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/');\n $browser->clickLink('Login');\n $browser->visit('/login');\n $browser->type('email', '[email protected]');\n $browser->type('password', 'test123456');\n $browser->press('Login');\n $browser->assertPathIs('/home');\n $browser->clickLink('Job Target');\n $browser->visit('/jobTargets');\n $browser->visit('/jobRequirements?job_target_id=3');\n $browser->visit('/jobRequirements/5921/edit');\n $browser->select('competency_id', '5');\n $browser->type('skill_level', '2');\n $browser->press('Save');\n });\n }", "title": "" }, { "docid": "575de5bef13f2420fba0a3c89522b2e5", "score": "0.6551746", "text": "public function testExample()\n {\n $this->assertTrue(true);\n\n }", "title": "" }, { "docid": "9bb7d6a32f7db4bf20830ab46f52b6b9", "score": "0.6547736", "text": "public function testMe()\n\t{\n\t}", "title": "" }, { "docid": "d19aff52e47b00cb71a897870e43b48e", "score": "0.6540462", "text": "public function testExampleTest()\n\t{\n\t\t$response = $this->get('/');\n\t\t$response->assertStatus(200);\n\t}", "title": "" }, { "docid": "fba37bbf137912a875cc9f7d60bf670c", "score": "0.65359604", "text": "public function testBasicExample()\n {\n /*$this->visit('/')\n ->see('Laravel');*/\n\n // Grand 1: On initialise les données exemple :\n $data = [10, 20, 30];\n // Grand 2: On agit sur ces données exemple :\n $result = array_sum($data);\n // Grand 3: On teste le resultat exemple :\n $this->assertEquals(60, $result);\n // Grand 4: On teste si tous ce passe bien avec la commande php phpunit.phar,\n // bien sur le but est que tous passe vert :-)\n }", "title": "" }, { "docid": "ee18b9c7a0b5d7021793bebc3ed3fe64", "score": "0.6526566", "text": "public function testGetSimple()\n {\n $this->assertEquals(\"Danny\", Fig::get(\"name\"));\n }", "title": "" }, { "docid": "881c37ccc8ebde4c1b1a1a04362b0d2d", "score": "0.6525439", "text": "function test_basic_example()\n {\n $this->visit('/')\n ->see('Laravel');\n\n $name = 'Ernesto Aides';\n $email = '[email protected]';\n $user = factory(\\App\\User::class)->create([\n 'name' => $name,\n 'email' => $email,\n ]);\n $user->name = 'Ernesto Aides';\n\n $this->actingAs($user, 'api')\n ->visit('api/user/name')\n ->see($name);\n\n $this->actingAs($user, 'api')\n ->visit('api/user/name/email')\n ->see($name)\n ->see($email);\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": "a5a742c5eb76d32c32823659c256e71f", "score": "0.783437", "text": "public function actionCreate() {\n $this->render('resource_create');\n }", "title": "" }, { "docid": "246a2b1ff9c2e296275420128d62692d", "score": "0.7765723", "text": "public function create()\n {\n return view(\"aasource.addform\");\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": "012fdc290aa72d4266b090e3a18611f3", "score": "0.7522791", "text": "public function create()\n\t{\n return View::make('resources.create');\n\t}", "title": "" }, { "docid": "c22dae1333d29c28ed855dcb7f069232", "score": "0.7491396", "text": "public function create()\n {\n return view('resources.create');\n }", "title": "" }, { "docid": "5d140c321df7acb8c739eadcc5bc3d54", "score": "0.746548", "text": "public function create()\n {\n return view('laramanager::resources.create');\n }", "title": "" }, { "docid": "4408460962e2d641154ff1e778cccd2d", "score": "0.7411503", "text": "public function create()\n {\n $view_elements = [];\n \n $view_elements['page_title'] = 'Resources'; \n $view_elements['component'] = 'resources'; \n $view_elements['menu'] = 'resources'; \n $view_elements['breadcrumbs']['All Resources'] = array(\"link\"=>'/resources',\"active\"=>'1');\n \n\n $view = viewName('resources.add');\n return view($view, $view_elements);\n }", "title": "" }, { "docid": "eefd3a34279d87bd94753b0beae69b0d", "score": "0.7391348", "text": "public function create()\n {\n return view('humanresources::create');\n }", "title": "" }, { "docid": "e3088f55fa2e4660ea43003f9f05103e", "score": "0.738591", "text": "public function create()\n\t{\n\t\treturn view('subResourceDetails.create');\n\t}", "title": "" }, { "docid": "8346857a727217603e3b507224e6f4fb", "score": "0.7360721", "text": "public function create()\n {\n return view(\"form\");\n }", "title": "" }, { "docid": "a88dfafe57fd2497dd585577ba27a652", "score": "0.7350552", "text": "public function create()\n {\n $pageTitle = trans(config('dashboard.trans_file').'add_new');\n $submitFormRoute = route('pages.store');\n $submitFormMethod = 'post';\n return view(config('dashboard.resource_folder').$this->controllerResource.'form', compact('pageTitle', 'submitFormRoute', 'submitFormMethod'));\n }", "title": "" }, { "docid": "d56752c440e87fca7ccd76e6743512e6", "score": "0.7350431", "text": "public function create()\n\t{\n\t\treturn View::make('catalogue.form');\t\n\t}", "title": "" }, { "docid": "33b0ce2d35b3db36c2ec35ffb91a2cba", "score": "0.733998", "text": "public function showCreateForm(){\n return view('client.create');\n }", "title": "" }, { "docid": "e1c4a637db2fd84ef7dabb5b305e9961", "score": "0.7336561", "text": "public function create()\n {\n $resource = $this->resource;\n $resource['action'] = 'Create';\n return view('dashboard.views.'.$this->resources.'.create',compact( 'resource'));\n\n }", "title": "" }, { "docid": "e6adbf3fbac4429738c92777eeac55a6", "score": "0.7333788", "text": "public function create()\n {\n $this->authorize('create', Form::class);\n\n return view('forms.create');\n }", "title": "" }, { "docid": "d3a655273e3662ac11954ec099dd187c", "score": "0.7281861", "text": "public function create()\n {\n //\n $data = array('new' => True,\n 'contentTitle' => 'Registrar Livro',);\n return view('bookform', $data);\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.72809595", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "70a09b9f9f3cf55e7b53ed7137155a00", "score": "0.7273827", "text": "public function create()\n {\n $pageTitle = trans(config('dashboard.trans_file').'add_new');\n $submitFormRoute = route('countries.store');\n $submitFormMethod = 'post';\n return view(config('dashboard.resource_folder').$this->controllerResource.'form', compact('pageTitle', 'submitFormRoute', 'submitFormMethod'));\n }", "title": "" }, { "docid": "c5dd91fcabe4863a8febd91fd23029bc", "score": "0.7238648", "text": "public function create()\n {\n return view ('penilaian.form');\n }", "title": "" }, { "docid": "755e91a474eae625dfda22659e4c1f6c", "score": "0.72203404", "text": "public function create()\n {\n return view('form.create');\n }", "title": "" }, { "docid": "21f60e4229ecd12f595a1f02490e2be5", "score": "0.7207343", "text": "public function create()\n\t{\n\t\tdd('show create form');\n\t}", "title": "" }, { "docid": "99deb8b0d3d11f3aacdf9b0837643062", "score": "0.7185418", "text": "public function create()\n {\n return view('Meringue/Form/views/new');\n }", "title": "" }, { "docid": "f5c4717b4547490715e81217fb91fcef", "score": "0.71719545", "text": "public function create() {\n $this->setObject();\n $record = $this->object;\n $page_title = \"Create {$this->singular_name}\";\n $route = $this->route;\n $form_fields = $this->setLabelClass($this->fields_config['form_fields']); \n return view($this->view . '.create', compact('record', 'page_title', 'route', 'form_fields'));\n }", "title": "" }, { "docid": "a46b2fb11623e72b333198e2c3c5bf3c", "score": "0.71715325", "text": "public function create()\n {\n $this->authorize('create', [ShowBusinessIdeas::class]);\n\n return view('resourceRoute.create');\n }", "title": "" }, { "docid": "f2873502c738e8bf31240f26e62893fc", "score": "0.71546483", "text": "public function create()\n {\n\t\t\treturn view('partner.form');\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": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "c403d39d383b8b091f07950a420dc3f5", "score": "0.7114736", "text": "public function create()\n\t{\n\n\t\treturn view('new');\n\n\n\t}", "title": "" }, { "docid": "05a788f6cee6a481e60579669c5fc2cd", "score": "0.71131325", "text": "public function create()\n\t{\n\t\t//\n\t\treturn View::make(\"newUserForm\");\n\t}", "title": "" }, { "docid": "52886d3e49bbf4a926e71b6960578798", "score": "0.7101583", "text": "public function create()\n {\n //displaying form to create task\n return view('crud.create');\n }", "title": "" }, { "docid": "d304f8f134892d68ca540b0b858fd6cd", "score": "0.7088207", "text": "public function create()\n {\n return view('Home.add-new');\n }", "title": "" }, { "docid": "d1aa4707a9c6ebf5c8103249dbc1a2a3", "score": "0.7087244", "text": "public function create()\n {\n $view = 'create';\n\n $active = $this->active;\n $word = $this->create_word;\n $model = null;\n $select = null;\n $columns = null;\n $actions = null;\n $item = null;\n\n return view('admin.crud.form', compact($this->compact));\n }", "title": "" }, { "docid": "5dcbca5c2b296e16817ce45da193474b", "score": "0.70829123", "text": "public function create()\n {\n return view ('nafila.add');\n }", "title": "" }, { "docid": "dc7d007f8e9a89a82e7dd48856914140", "score": "0.7073015", "text": "public function newAction()\n {\n \t$this->_helper->noCacheHeader();\n\n \t// check if the backButton is diabled if so redirect\n\t\tif (isset($this->_namespace->noBackButton)) {\n\t\t\t$this->_redirectToDefault();\n\t\t}\n\n \t$this->view->form =\t$this->_service->getPopulatedForm(null, false);\n \t$this->_viewRenderer->render($this->_viewFolder . '/form', null, true);\n }", "title": "" }, { "docid": "533cfd54aea57067b2e130dc0d9b0d25", "score": "0.7060761", "text": "public function create()\n {\n return view('conection.form');\n }", "title": "" }, { "docid": "05e2241ee7d60144e91c052c80c01ae0", "score": "0.70603824", "text": "public function newAction()\n {\n $entity = new Book();\n $form = $this->formFactory->create(new BookType(), $entity);\n\n return $this->templating->renderResponse('elseymShelfBundle:Book:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "29f2d81a8230f1a71f0b822e8888c4b6", "score": "0.70505977", "text": "public function create()\n\t{\n\t\t//load the create form\n\t\treturn View::make('products.create');\n\t}", "title": "" }, { "docid": "eef8c1edfb3ab338d65c165479d67819", "score": "0.70433134", "text": "public function create()\n {\n return view('.form');\n }", "title": "" }, { "docid": "201ef6ea5f0160eb38fbe375126231cb", "score": "0.7032151", "text": "public function create()\n\t{\n\t\treturn View('materi.create');\n\t}", "title": "" }, { "docid": "b4abce55cb4a2ce8c33525b5a465907f", "score": "0.7024339", "text": "public function create()\n {\n return view(\"dashboard.car.create-edit\");\n }", "title": "" }, { "docid": "69091643d0249f6381b6ffd4215df94c", "score": "0.70228004", "text": "public function create()\n {\n return view('admin.books.book-form');\n }", "title": "" }, { "docid": "a1f0d1fef33570d235574b68a0aebcaf", "score": "0.7007119", "text": "public function create()\n {\n return view('fp4forms.create');\n }", "title": "" }, { "docid": "8c02f51227a2ebf45d5aa88aa1fbdd14", "score": "0.70046675", "text": "public function create()\n {\n return view('forms.create_late');\n }", "title": "" }, { "docid": "e3b7436816780585c955089205ac6539", "score": "0.69987273", "text": "public function newAction()\n {\n $this->view->form = new PersonajeForm(null, array('edit' => true));\n }", "title": "" }, { "docid": "9ba9ef4da9377c7d495a4dbf879551a4", "score": "0.69980985", "text": "public function create()\n\t{\n\t\treturn 'This should render the view to create a new resource!!';\n\t}", "title": "" }, { "docid": "21ac5bcda502a99b37477c3732d29a10", "score": "0.6997003", "text": "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem(\"Inicio\", $this->get(\"router\")->generate(\"home_page\"));\n $breadcrumbs->addItem(\"Usuario\", $this->get(\"router\")->generate(\"usuario\"));\n $breadcrumbs->addItem(\"Nuevo\", $this->get(\"router\")->generate(\"usuario_new\"));\n\n $entity = new Usuario();\n $form = $this->createForm(new UsuarioType(), $entity);\n\n return $this->render('UsuarioBundle:Usuario:new.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "1cd57fc10fe9533cb291e668546ebc3f", "score": "0.69927114", "text": "public function createAction()\n {\n $action = $this->view->url(['action' => 'save'], 'controllers');\n $this->view->userForm = $this->service->getFormForCreating($action);\n }", "title": "" }, { "docid": "fd33fc0da35476a9bd97bd2366215cad", "score": "0.69897515", "text": "public function actionCreate()\n {\n return $this->render('create');\n }", "title": "" }, { "docid": "fd33fc0da35476a9bd97bd2366215cad", "score": "0.69897515", "text": "public function actionCreate()\n {\n return $this->render('create');\n }", "title": "" }, { "docid": "552c23a4878608a4c2d75ce4352fa7ec", "score": "0.6985989", "text": "public function create()\n {\n return view('add.create');\n }", "title": "" }, { "docid": "19bcb614303c40b1d1ee9ab328c61c1b", "score": "0.69832903", "text": "public function showCreateForm(){\n\t\t\n\t\t// Set the state and tell plugins.\n\t\t$this->setState('SHOW_CREATE_FORM');\n\t\t$this->notifyObservers();\n\t\t\n\t\t//Get Create Form Title\n\t\t$title = $this->openFile(\"core/fragments/users/newUserTitle.phtml\");\n\t\t\n\t\t//Get Create Form\n\t\t$form = $this->openFile(\"core/fragments/users/newUser.phtml\");\n\n\t\t//Set form content to show\n\t\t$this->setContentTitle($title);\n\t\n\t\t//Set form content to show\n\t\t$this->setContent($form);\n\t}", "title": "" }, { "docid": "cab3875b40e1926cadf5d240d5755c33", "score": "0.69831926", "text": "public function create()\n\t{\n\t\treturn view('add');\n\t}", "title": "" }, { "docid": "7b27be70fa64e0a7965ca1f5f2324b8d", "score": "0.6981883", "text": "public function create()\n {\n //\n return view('new.create');\n }", "title": "" }, { "docid": "a4ac77c2b41d5381f9f521f9a9ef9c15", "score": "0.69774544", "text": "public function create()\n {\n return view('manage::create');\n }", "title": "" }, { "docid": "16ebda2fce028f53ff9acd2cdb27e61a", "score": "0.6973155", "text": "public function create()\n {\n return view('prijave.create');\n }", "title": "" }, { "docid": "1c39811f7717ee4b671fb0dabc86d306", "score": "0.69695777", "text": "public function create()\n {\n //\n return view('Sponsors/Admin/form');\n }", "title": "" }, { "docid": "f6da1d0450698bec5313ba023877e2c9", "score": "0.6969481", "text": "public function create()\n {\n return view(\"librarians.create\");\n }", "title": "" }, { "docid": "b9dcd814df4a67ac3130f45aff38f1ee", "score": "0.6968916", "text": "public function create()\n {\n return view('nbform.create');\n }", "title": "" }, { "docid": "67affbe8defecaec0068c8df880bef78", "score": "0.6957839", "text": "public function create()\n {\n return view('hr::create');\n }", "title": "" }, { "docid": "3ff55b7631fd394f17ff84e6d8858428", "score": "0.6957047", "text": "public function create()\n {\n \n return view('pabrik.create');\n }", "title": "" }, { "docid": "faab52446786eb57de6d45ef5c9751a9", "score": "0.6954935", "text": "public function create()\n {\n $countries = Country::all();\n $pageTitle = trans(config('dashboard.trans_file').'add_new');\n $submitFormRoute = route('cities.store');\n $submitFormMethod = 'post';\n return view(config('dashboard.resource_folder').$this->controllerResource.'form', compact('countries', 'pageTitle', 'submitFormRoute', 'submitFormMethod'));\n }", "title": "" }, { "docid": "13cfb81541a9764e54a683020f59b8bd", "score": "0.6952626", "text": "public function create() {\n $breadcrumb = [\n 'pageLable' => 'Create '.$this->className,\n 'links' => [\n ['name' => 'Create '.$this->className]\n ]\n ];\n return view('backend.layouts.form.create',\n $this->preparedCreateForm())\n ->with(['className' => $this->className, 'breadcrumb' => $breadcrumb])\n ->with('formAttributes', $this->formAttributes);\n }", "title": "" }, { "docid": "8ed65484ff2ee4c220e635b0137f51c9", "score": "0.69491976", "text": "public function create()\n {\n return view('show.create');\n }", "title": "" }, { "docid": "edcff5ad61f56a5f713509f282ab987f", "score": "0.694893", "text": "public function create()\n {\n //return form\n return view('admin.store.create');\n }", "title": "" }, { "docid": "07b43788dfee25823f1bfa779101007b", "score": "0.69488627", "text": "public function create()\n {\n return view('hrm::create');\n }", "title": "" }, { "docid": "86e74634806a61ed0f710d1b4aa1b622", "score": "0.69432896", "text": "public function create()\n {\n //return create view\n return view($this->getViewFolder().'.create',[\n 'properties' => $this->model->getPropertiesCreate(),\n 'resource' => $this->resource\n ]);\n }", "title": "" }, { "docid": "5e44d678b4e0518c96aebd2237cd5c11", "score": "0.69430643", "text": "public function create()\n {\n return view('dashboard.post.form_create');\n }", "title": "" }, { "docid": "9d347981a9dc58fed97cdffb7431509a", "score": "0.69423616", "text": "public function create()\n\t{\n\t\treturn view('admin.marca.new');\n\t}", "title": "" }, { "docid": "c8545d13c92a2bfc49784e47f3eece3a", "score": "0.6937241", "text": "public function create()\n {\n // Menampilkan form create\n return view('mahasiswa.create');\n }", "title": "" }, { "docid": "a8643f5298a2feeab2dd1817ae9a5e62", "score": "0.69359756", "text": "public function create(){\r\n\t\t\t$this->view('create');\r\n\t\t}", "title": "" }, { "docid": "62264d4253eb3b74399ec1e90a8bbcda", "score": "0.69322455", "text": "public function newAction()\n {\n $entity = new Phone();\n $form = $this->createForm(new PhoneType(), $entity);\n\n return $this->render('JblStudioBundle:Phone:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "title": "" }, { "docid": "03eea4206e77f982ad1e30911c57b32a", "score": "0.6929893", "text": "public function create()\n {\n return view('matakuliahs.create');\n }", "title": "" }, { "docid": "58cf4220e8a5e664b1119cbca77648f3", "score": "0.6928969", "text": "public function create()\n {\n $data = array_merge([\n 'tabs' => TabManager::get($this->getModel()->getTable()),\n $this->getResourceName() => $this->getModel(),\n ], $this->getFormData('create'));\n\n return view(\"{$this->viewPath}.create\", $data);\n }", "title": "" }, { "docid": "64f42d4ca1c0601a437ae6c5d9a1f2a9", "score": "0.6928629", "text": "public function create()\n {\n return view(\"residentials.add\");\n }", "title": "" }, { "docid": "8e841fda4e78530e752dec74ec809b42", "score": "0.69278556", "text": "public function create()\n {\n return view('ryutsuisen::role.form');\n }", "title": "" }, { "docid": "0fb248e24532b7357981b8412bbcd700", "score": "0.6917571", "text": "public function create()\n {\n return view('buku.form');\n }", "title": "" }, { "docid": "4e929a4b2808dee4d30b9afc14bcf480", "score": "0.6917477", "text": "public function create()\n {\n return view('landlord.add');\n }", "title": "" }, { "docid": "6945326379d789dcaf379e8368057f99", "score": "0.6915064", "text": "public function newAction()\n {\n $entity = new Rezyser();\n $form = $this->createCreateForm($entity);\n\n return $this->render('AppBundle:Rezyser:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "a09a0efe9eece0c7f21dac4f5e096ee9", "score": "0.6912519", "text": "public function create()\n {\n return view('objectAdmin.create');\n }", "title": "" }, { "docid": "efb1a49f7e393c53db8698527f5440e8", "score": "0.69094497", "text": "public function create()\n\t{\n\t\treturn view('admin.book.create');\n\t}", "title": "" }, { "docid": "74bad321580cd692d72a5bc68292375c", "score": "0.6907924", "text": "public function create()\n {\n return view('projects.form', ['project' => new Project()]);\n }", "title": "" }, { "docid": "d135d57cf231c80bd81581e84bc5d101", "score": "0.689978", "text": "public function create()\n {\n return view(\"pages.mahasiswa.form\");\n }", "title": "" }, { "docid": "e193be5267ce5df3d9a89c422be1cdf0", "score": "0.6896789", "text": "public function newAction()\n {\n $repertoire = new Repertoire();\n $form = $this->createForm( RepertoireType::class, $repertoire);\n\n \n\t\treturn $this->render('repertoire/new.html.twig', array( 'repertoire' => $repertoire,\n 'form' => $form->createView(), ));\n }", "title": "" }, { "docid": "1e595d1c40410662eea090eb45d97ba4", "score": "0.6890229", "text": "public function create()\n {\n $model = $this->model;\n $role = Role::pluck('title', 'id')->all();\n return view(\"{$this->view}.form\", compact('model', 'role'));\n }", "title": "" }, { "docid": "e7931b0c0f69aa6a52b8b61f7d2e9a87", "score": "0.68901664", "text": "public function newAction() { \t\n \t$this->view->form = $this->_form; \t\n }", "title": "" }, { "docid": "e4e19ff4b09ce0b41c6e81d7794d0b45", "score": "0.6888766", "text": "public function create()\n {\n return view('product-create-form');\n }", "title": "" }, { "docid": "1964a7650dd5906a93274754d7b9a2d1", "score": "0.68877786", "text": "public function newAction()\n {\n $entity = new Regiao();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CMSConfiguracoesBundle:Regiao:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'error' => null\n ));\n }", "title": "" }, { "docid": "e7b489419b81ae7a77026305a8b01920", "score": "0.6885279", "text": "public function create()\n {\n return view('procrm::create');\n }", "title": "" }, { "docid": "e5666dcb2071335d352cdbc90f7e0f4d", "score": "0.6883182", "text": "public function create() { dd($this);\n return view('forms.create');\n }", "title": "" }, { "docid": "fddc7b44639ba32c68e6fa179d42af11", "score": "0.6882655", "text": "public function create() {\n\t\treturn view('admin::create');\n\t}", "title": "" }, { "docid": "e541aa1606e75bbf5778d3a7f0256cb1", "score": "0.6881101", "text": "public function create() {\n return view('admin.new');\n }", "title": "" }, { "docid": "2185bccd0ff9ecd23830f83e5ad143d4", "score": "0.6879935", "text": "public function create()\n {\n return view('regimen.create');\n }", "title": "" }, { "docid": "9f6a0c281e47a1d0a3dec201147718e6", "score": "0.68771493", "text": "public function newAction()\n {\n $entity = new BaseForms();\n\n $form = $this->createCreateForm($entity);\n\n return $this->render('AppBundle:BaseForms:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "edef682535630deffcd3d6a6fdcdbe2f", "score": "0.6877042", "text": "public function create()\n {\n //\n return view('pages/createitemform');\n }", "title": "" }, { "docid": "64134e0334d9a96a3451da65dbded2e2", "score": "0.6874127", "text": "public function newAction()\n {\n $this->readAndSetExtendsTemplate();\n $entity = new Status();\n $form = $this->createForm(new StatusType(), $entity);\n\n return $this->render('HttpiCoreBundle:Status:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'extendsTemplate' => $this->extendsTemplate\n ));\n }", "title": "" }, { "docid": "4a3a37470b286041123bc977ccd01097", "score": "0.6870055", "text": "public function create()\n {\n return view('backend.forms.etudiant.create');\n }", "title": "" }, { "docid": "64be16e54c6140be0cde6c7bfb89beab", "score": "0.68632406", "text": "public function create()\n {\n return view('admin.show.create');\n }", "title": "" }, { "docid": "ad131f9e123018caa9b4e43a222f86af", "score": "0.68617475", "text": "public function create()\n {\n return view ('prelims.create');\n }", "title": "" }, { "docid": "bde062793a4b4defae59a778a806e252", "score": "0.68591446", "text": "public function create()\n\t{\n\t\t$tool = new Tool;\n\t\t$form_data = ['route' => self::$prefixRoute . 'store', 'method' => 'POST'];\n\n\t\treturn view(self::$prefixView . 'form', compact('tool', 'form_data'));\n\t}", "title": "" } ]
7e96b3ee2d9645753f240287fdc8eae8
Returns the given Namespaceprefix
[ { "docid": "25c14e09bf3482ffdbd9ca4cd9dbc61a", "score": "0.75679725", "text": "public function getNamespacePrefix() {\n $ns= explode(\":\", key($this->tree->root->attribute));\n return empty($ns[1]) ? 'D' : $ns[1];\n }", "title": "" } ]
[ { "docid": "a1ff838ab4db1844185bd4ecd3e9d7ef", "score": "0.8107106", "text": "public static function lookupNamespace($prefix)\n {\n return isset(self::$_namespaces[$prefix]) ?\n self::$_namespaces[$prefix] :\n $prefix;\n }", "title": "" }, { "docid": "5d92e8da0ad843ceb9e5f166886fc9ec", "score": "0.8009017", "text": "function getPrefix();", "title": "" }, { "docid": "4f181d8c97e7db59a082051d07e99ad6", "score": "0.7982819", "text": "protected function getNormalizedNamespace($prefix = '')\n {\n return Str::start(Str::lower(self::PACKAGE_NAME), $prefix);\n }", "title": "" }, { "docid": "6049cb8ed76a2084c29b4a474a2aa6be", "score": "0.79174876", "text": "public function getPrefix();", "title": "" }, { "docid": "6049cb8ed76a2084c29b4a474a2aa6be", "score": "0.79174876", "text": "public function getPrefix();", "title": "" }, { "docid": "1ed3b8b84d1901ceb3211af875d4a9d3", "score": "0.7822835", "text": "function getNamespaceURI($prefix) {\r\n\t $total = count($this->namespaceMap);\r\n\t $uri = $prefix; //in case uri can't be found, just send back prefix\r\n\t //should really generate an error, but worry about this later\r\n\t\t//reset($this->namespaceMap);\r\n\r\n\t for ($i = ($total - 1); $i >= 0; $i--) {\r\n\t $currMap =& $this->namespaceMap[$i];\r\n\r\n\t if (isset($currMap[$prefix])) {\r\n\t $uri = $currMap[$prefix];\r\n\t break;\r\n\t }\r\n\t }\r\n\r\n\t return $uri;\r\n\t}", "title": "" }, { "docid": "7fac5a3fe5100ebcba0da2c72f576654", "score": "0.7510114", "text": "public function getPrefix():string;", "title": "" }, { "docid": "09c68f05d0bd19b53aec88aa216931ec", "score": "0.739961", "text": "public function getPrefix()\n {\n }", "title": "" }, { "docid": "2b8011463fc2207c8bf6468e0cb3c6e6", "score": "0.73868215", "text": "public function get_prefix() { return $this->prefix; }", "title": "" }, { "docid": "4904167a9cbee9e832948fe625ec01df", "score": "0.7344392", "text": "protected function _getPrefix()\n {\n $prefix = $this->param('prefix');\n if (!$prefix) {\n return '';\n }\n $parts = explode('/', $prefix);\n\n return implode('/', array_map([$this, '_camelize'], $parts));\n }", "title": "" }, { "docid": "c9935f96664a3ceea65ccfc5dbc19a1c", "score": "0.7320662", "text": "protected function getPrefix()\n\t{\n\t\treturn $this->prefix;\n\t}", "title": "" }, { "docid": "540b3705cac3a692ad7d9a26e731b0f4", "score": "0.72955716", "text": "public function getPrefix(): string\n {\n return $this->prefix;\n }", "title": "" }, { "docid": "8be17ffde495b349173575936173c474", "score": "0.72674733", "text": "public function getPrefix()\n\t{\n\t\treturn $this->prefix;\n\t}", "title": "" }, { "docid": "143b23d4581cc5239918d899f2064f40", "score": "0.7266349", "text": "public function getPrefix(){\n\t\treturn($this->prefix);\n\t}", "title": "" }, { "docid": "7181b626feea966f66fa4006ec511d8b", "score": "0.7253192", "text": "public function getPrefix() : string {\n\t\treturn $this->prefix;\n\t}", "title": "" }, { "docid": "0d791ec3036e1356dd947b305e68c84b", "score": "0.72457534", "text": "public function get_prefix() {\n\t \treturn $this->_prefix;\n\t }", "title": "" }, { "docid": "45fb69f84ff55294d3890b5dcfdaf97a", "score": "0.7238962", "text": "public function getPrefix()\n {\n return $this->prefix;\n }", "title": "" }, { "docid": "45fb69f84ff55294d3890b5dcfdaf97a", "score": "0.7238962", "text": "public function getPrefix()\n {\n return $this->prefix;\n }", "title": "" }, { "docid": "45fb69f84ff55294d3890b5dcfdaf97a", "score": "0.7238962", "text": "public function getPrefix()\n {\n return $this->prefix;\n }", "title": "" }, { "docid": "45fb69f84ff55294d3890b5dcfdaf97a", "score": "0.7238962", "text": "public function getPrefix()\n {\n return $this->prefix;\n }", "title": "" }, { "docid": "45fb69f84ff55294d3890b5dcfdaf97a", "score": "0.7238962", "text": "public function getPrefix()\n {\n return $this->prefix;\n }", "title": "" }, { "docid": "45fb69f84ff55294d3890b5dcfdaf97a", "score": "0.7238962", "text": "public function getPrefix()\n {\n return $this->prefix;\n }", "title": "" }, { "docid": "671a2cafac9f8f465364e3183baa1899", "score": "0.72380346", "text": "public function getPrefix()\r\n {\r\n return $this->_prefix;\r\n }", "title": "" }, { "docid": "8255c3dfdafe063c5e0f8b86c1046cdb", "score": "0.7224329", "text": "public static function getPrefix() : string\n {\n return self::$prefix;\n }", "title": "" }, { "docid": "5e11d9fb62182fbf6067a76d603dca44", "score": "0.7216788", "text": "public function getPrefix(){\r\n\t\treturn $this->prefix;\r\n\t}", "title": "" }, { "docid": "cd621ae7bb5666d7768be8d1a9039a90", "score": "0.72111493", "text": "public function getPrefix() {\n return \"{$this->_name}://{$this->_container}/\";\n }", "title": "" }, { "docid": "514f118b944f3ae105b2e4e6ed05856f", "score": "0.7198808", "text": "public function findPrefix();", "title": "" }, { "docid": "241159fb04910ba775375cf6ff2c8e03", "score": "0.7162927", "text": "public function getPrefix(){\n\t\t\treturn($this->prefix);\n\t\t}", "title": "" }, { "docid": "3bfd750b8b10ae726e3c8418be908aa9", "score": "0.7153072", "text": "public function getPrefix() {\n return $this->prefix;\n }", "title": "" }, { "docid": "0ff1d293c81465793299f154c03d74be", "score": "0.7065341", "text": "public function getPrefix(): string\n {\n return $this->isPrefixed() ? $this->prefix : '';\n }", "title": "" }, { "docid": "18037597affaa2f9b5ea9650f00f6b38", "score": "0.7041321", "text": "private function prefix($prefix)\n {\n if ($prefix) {\n $prefixLastChar = substr($prefix, -1);\n\n if ($prefixLastChar != '.' && $prefixLastChar != ':') {\n $prefix .= '.';\n }\n }\n\n return $prefix;\n }", "title": "" }, { "docid": "9868cf55cdd2a22537ea388a1a2bad06", "score": "0.7040373", "text": "public function prefix($prefix = null)\n {\n return $this->prefix = $prefix ?: $this->prefix;\n }", "title": "" }, { "docid": "a7d857275523599439f0dd8d0fed1180", "score": "0.6986286", "text": "public function getPrefix() {\n\t\tif (!empty($this->prefix)) {\n\t\t\treturn $this->prefix;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "cadeee1c9f64d30277cf9762ad88755c", "score": "0.6963425", "text": "protected function get_prefix()\n {\n return $this->config['prefix'];\n }", "title": "" }, { "docid": "badd7ef9595cf89d161cb8b54b1aec7a", "score": "0.6942399", "text": "protected function getNameSpace() {\n\t\treturn $this->prefix;\n\t}", "title": "" }, { "docid": "92209bd56b0e24845b8e462da4d7e4ce", "score": "0.69238806", "text": "function getPrefix() {\n return $this->_prefix;\n }", "title": "" }, { "docid": "cb3537ccceb293262cec767f0d7fa2d4", "score": "0.69021016", "text": "public function getPrefix() {\n return $this->_prefix;\n }", "title": "" }, { "docid": "332be776c18ae081b4aac6fe4ae8f861", "score": "0.68968105", "text": "public function getPrefix()\n {\n $params = $this->Controller->request->params;\n if (key_exists('prefix', $params)) {\n $prefix = $params['prefix'];\n if ($prefix) {\n return $prefix;\n }\n }\n return false;\n }", "title": "" }, { "docid": "7deb2cc079763e1e59047ebfae96e391", "score": "0.68943566", "text": "public function getPrefix()\n {\n return $this->backend->getPrefix();\n }", "title": "" }, { "docid": "096156c4fe57f4c7224e9d07834a7e19", "score": "0.68219244", "text": "public function getSwiftPrefix() {}", "title": "" }, { "docid": "cabd0b6fbf16ecc4d12b78680cc06051", "score": "0.68192494", "text": "public function getNS($prefix)\n {\n $this->checkRepository();\n\n if (empty($prefix)) {\n throw new \\Exception('Please supply a prefix.');\n }\n\n $request = new HTTP_Request2($this->dsn . '/repositories/' . $this->repository . '/namespaces/' . $prefix,\n HTTP_Request2::METHOD_GET);\n $request->setHeader('Accept: text/plain; charset=' . $this->acceptCharset);\n $request = $this->prepareRequest($request);\n $response = $request->send();\n\n if ($response->getStatus() != 200) {\n throw new \\Exception('Failed to run query, HTTP response error: ' . $response->getStatus());\n }\n\n\n return (string) $response->getBody();\n\n }", "title": "" }, { "docid": "535bcd6bc9d25a6cca07fca4694036d7", "score": "0.68117905", "text": "protected function getGroupPrefix($prefix)\n {\n return empty($prefix) ? '' : sprintf(\"'prefix' => '%s',\", $prefix);\n }", "title": "" }, { "docid": "faca67b507bb1ec816770e6960c0666e", "score": "0.67817956", "text": "public function getXpathPrefix()\n {\n return $this->xpathPrefix;\n }", "title": "" }, { "docid": "0ae1f8bcffd727e09c41e2f226e315e9", "score": "0.6774698", "text": "public function getPrefix()\n {\n return '';\n }", "title": "" }, { "docid": "0ae1f8bcffd727e09c41e2f226e315e9", "score": "0.6774698", "text": "public function getPrefix()\n {\n return '';\n }", "title": "" }, { "docid": "0ae1f8bcffd727e09c41e2f226e315e9", "score": "0.6774698", "text": "public function getPrefix()\n {\n return '';\n }", "title": "" }, { "docid": "6f147921b28b9af5f196e16eda217779", "score": "0.6764144", "text": "public function getNamespacePrefixMappings(): array;", "title": "" }, { "docid": "8d55b1deee6714911eb70467ddb4ad96", "score": "0.6763395", "text": "static public function sGetPrefix() {\n\t\treturn self::$sCachePrefix;\n\t}", "title": "" }, { "docid": "d9e367626f939585e14835c049d69591", "score": "0.6761787", "text": "private function getPrefix()\n {\n return $this->name.'-';\n }", "title": "" }, { "docid": "3ee19e015b8850814ec8cd8aff6f6acb", "score": "0.67516077", "text": "function GetTTLPrefix($ns)\n\t{\n\t\t return '@prefix '.$ns.': <'.$this->getNSURI($ns).'> .'.PHP_EOL;\n\t}", "title": "" }, { "docid": "80c79d5c26b8c68c940381cf9afa13c0", "score": "0.6748924", "text": "public function getNamespaceName();", "title": "" }, { "docid": "e7bf89a4256118461caac4aae7e615cb", "score": "0.67389643", "text": "public function getPrefixId()\n\t{\n\t\treturn $this->prefixId;\n\t}", "title": "" }, { "docid": "da1ce6cdc15294c6012d1481f2c081e5", "score": "0.67317915", "text": "public function get_name_prefix() {\n return $this->prefix_name;\n }", "title": "" }, { "docid": "55a85a294effb89151497312ba9924d8", "score": "0.67004246", "text": "public function setNamespacePrefix($prefix) {\n $this->namespacePrefix = $prefix;\n return $this;\n }", "title": "" }, { "docid": "f8c148c03c6a3d74071b79bec20c0f09", "score": "0.6644146", "text": "public function prefix() {\r\n\t\treturn $this->prefix.$this->_;\r\n\t}", "title": "" }, { "docid": "30fdfbd6e31ccb3aa49a0030a8319dfe", "score": "0.66432524", "text": "function getPrefix($fn) {\n\t\n\t$prefix = $fn;\n\tif (strlen($prefix)<1) {\n\t\t$prefix = \"tag\";\n\t}\t\n\treturn $prefix;\n}", "title": "" }, { "docid": "a76c1ae28715dd7b30ea7e3081fdd213", "score": "0.6612457", "text": "public function getRoutePrefix();", "title": "" }, { "docid": "182e264a649264e3161c389e9e3e9e82", "score": "0.6601839", "text": "private function prefix() {\n\n global $WC;\n\n $prefix = $this->local_prefix;\n\n $cache_prefix = xcache_get($prefix.\"_cache_prefix\");\n\n if($cache_prefix===false){\n $cache_prefix = $this->set_cache_prefix();\n }\n\n $prefix.=\"_$cache_prefix\";\n\n return $prefix;\n }", "title": "" }, { "docid": "7a5012fd95fcc019972a5f5e2eea3e27", "score": "0.6567367", "text": "private function getPrefixedToken($prefix)\n {\n return uniqid($prefix);\n }", "title": "" }, { "docid": "fa90cfdd0130ed7fb2e57afe1d317257", "score": "0.65620685", "text": "public function getPrefix(string $prefix, string $className): string\n {\n // the prefix of annotation is exist\n if (! empty($prefix)) {\n return $prefix;\n }\n\n // the prefix of annotation is empty\n $reg = '/^.*\\\\\\(\\w+)' . $this->suffix . '$/';\n $prefix = '';\n\n if ($result = preg_match($reg, $className, $match)) {\n $prefix = lcfirst($match[1]);\n }\n\n return $prefix;\n }", "title": "" }, { "docid": "8094391b1697f48fbaa66d8184b11fb3", "score": "0.655036", "text": "public function prefix($prefix = NULL)\n\t{\n\t\tif ($prefix !== NULL)\n\t\t{\n\t\t\t$this->_prefix = $prefix;\n\t\t\treturn $this;\n\t\t}\n\n\t\treturn $this->_prefix;\n\t}", "title": "" }, { "docid": "0aa67da3c64d61dfdb81af001cdb3217", "score": "0.6544646", "text": "public function getNamespaceName()\n {\n if ( ( $pos = strrpos( $this->_name, '\\\\' ) ) === false )\n {\n return '';\n }\n return substr( $this->_name, 0, $pos );\n }", "title": "" }, { "docid": "e5b2819b2e8db9b28ce3ecff01cd056d", "score": "0.65435916", "text": "public function getPrefix()\n {\n return $this->redis->get($this->prefixKey);\n }", "title": "" }, { "docid": "234d8b00926cf225a94e9e55ae2b677b", "score": "0.653835", "text": "public function getPrefix()\n {\n try {\n $result = $this->prefixExists();\n if (!$result) {\n if ($this->prefix) {\n $prefix = new DomainPrefix();\n $prefix->setPrefix($this->prefix);\n $this->entityManager->persist($prefix);\n return $prefix;\n }\n }\n return isset($result[0]) ? $result[0] : false;\n } catch (\\Exception $ex) {\n var_dump($ex->getMessage());\n die();\n }\n return false;\n }", "title": "" }, { "docid": "20e160a0187d78040447dce8811d44f9", "score": "0.65347403", "text": "public function setPrefix($prefix);", "title": "" }, { "docid": "20e160a0187d78040447dce8811d44f9", "score": "0.65347403", "text": "public function setPrefix($prefix);", "title": "" }, { "docid": "068773d074aac4a895b1976858ee69ac", "score": "0.65332896", "text": "public function getKeyPrefix(){\n\t\treturn $this->keyPrefix;\n\t}", "title": "" }, { "docid": "46c89abd5851741140eb5c8d938765a4", "score": "0.6526193", "text": "public function getContainerNamespace();", "title": "" }, { "docid": "d1f02ae2c6436289590c5198c1dd35b5", "score": "0.65192074", "text": "public function getNamespace(): string\n {\n return $this->first->getNamespace() ?? '';\n }", "title": "" }, { "docid": "a21f65cd049374056a238f27813e6544", "score": "0.6514688", "text": "function getNamespace();", "title": "" }, { "docid": "fcdea0fa2b7d9429fc92162743f0333a", "score": "0.65016276", "text": "public function registerLocalNamespace($prefix)\n {\n }", "title": "" }, { "docid": "6f4719511a1cabb73b5f704d9913bf87", "score": "0.65010846", "text": "abstract public function getMetadataPrefix();", "title": "" }, { "docid": "c734d9a8ee99463b2b5d32927a4f102e", "score": "0.65008414", "text": "protected function parseConfigPrefix(?string $prefix)\n {\n if (! filled($prefix)) {\n return '';\n }\n\n return ends_with($prefix, '.') ? $prefix : \"$prefix.\";\n }", "title": "" }, { "docid": "465471ddc35f2a572fe903365bb56926", "score": "0.6496941", "text": "function setPrefix($prefix);", "title": "" }, { "docid": "2085387643d4441e687c7e8a1a9e59d3", "score": "0.64927804", "text": "public function getNamespace()\n {\n return trim($this->namespace, \"\\\\\");\n }", "title": "" }, { "docid": "5f29ec155d15b5969c697e3448ec88b8", "score": "0.6489053", "text": "protected function prefix()\n {\n if ($this->root) {\n return $this->root;\n }\n\n $name = $this->name();\n\n if (!$name) {\n return null;\n }\n\n $parts = explode(\".\", $name);\n\n return $parts[0];\n }", "title": "" }, { "docid": "1f9852962102f597ffe85a7a01b912b2", "score": "0.6483499", "text": "public function getPrefix()\n {\n return $this->action['prefix'] ?? null;\n }", "title": "" }, { "docid": "bf544ea45da1e1c60d5d08b1e02d6743", "score": "0.6473981", "text": "public function declareNamespace($prefix, $namespace) {}", "title": "" }, { "docid": "b319382c13a90428bb72cb06874a47d4", "score": "0.6466051", "text": "public function getPrefixTag()\n {\n return $this->prefixTag;\n }", "title": "" }, { "docid": "7b8cd2b66387c68f094050d7b30dada0", "score": "0.6464672", "text": "private function getNamespacePrefixes(): array\n {\n return array_keys($this->getNamespaces());\n }", "title": "" }, { "docid": "2826ecb854cc5ccf55c603d3a2847988", "score": "0.64624566", "text": "public function getTemplatePrefix();", "title": "" }, { "docid": "cd91cce84dcf48d500e3bc947d07efc5", "score": "0.64462036", "text": "abstract public function getRoutePrefix();", "title": "" }, { "docid": "907728b96676264d944b15d2ab1c5a06", "score": "0.64225", "text": "public function prefix()\n {\n if ($this->prefix === null) {\n $script = $this->server('SCRIPT_NAME');\n $request = $this->server('REQUEST_URI');\n //\n if (PHP_SAPI == 'cli-server') {\n $prefix = '';\n } else if (substr($request, 0, strlen($script)) == $script) {\n $prefix = $script;\n } else {\n $offset = strrpos($script, '/');\n if ($offset !== false) {\n $prefix = substr($script, 0, $offset);\n } else {\n $prefix = '';\n }\n }\n $this->prefix = (string) $prefix;\n }\n return $this->prefix;\n }", "title": "" }, { "docid": "2203674c27f72a7ee8df95343cadffbd", "score": "0.6420319", "text": "public function getLabelPrefix(): string;", "title": "" }, { "docid": "98bcf2062443c43e1b1d8f4c4b153017", "score": "0.6405522", "text": "public function prefixValor($prefix)\r\n {\r\n return \"{$prefix}ClassConcreta1\";\r\n }", "title": "" }, { "docid": "11201124184e0f3700a904b01824969d", "score": "0.6398674", "text": "public function setPrefix($var)\n {\n GPBUtil::checkString($var, True);\n $this->prefix = $var;\n }", "title": "" }, { "docid": "f384003004be15609920f18ab4f03307", "score": "0.63979566", "text": "public function createUriFromPrefix(string $prefix): string{\n \n if(empty($prefix)){ return false; }\n \n $res = \"\";\n \n $newValue = explode(':', $prefix);\n $newPrefix = $newValue[0];\n $newValue = $newValue[1];\n \n $prefixes = \\Drupal\\oeaw\\ConnData::$prefixesToChange;\n \n foreach ($prefixes as $key => $value){\n if($value == $newPrefix){\n $res = $key.$newValue;\n }\n } \n return $res;\n }", "title": "" }, { "docid": "180dfc8002e86a0355e0ccc1d04b87e9", "score": "0.63934904", "text": "public function getConfigPrefix(): string;", "title": "" }, { "docid": "c56dc61c3d9e787e31af2e954ea909b7", "score": "0.63843846", "text": "public function getNamespace(): string\n {\n return $this->_namespace;\n }", "title": "" }, { "docid": "cf7d897d5c02d08ed5c576b71309b4fe", "score": "0.63757205", "text": "protected function init_prefix()\r\n\t\t{ \r\n\t\t\treturn self::PREFIX; \r\n\t\t}", "title": "" }, { "docid": "fd9a3cefe439e8954c22c493b874f242", "score": "0.6374", "text": "public function registerLocalNamespace($name_prefix) {}", "title": "" }, { "docid": "fc4537aa8fb6330168825cbf546becbd", "score": "0.63695943", "text": "public function buildPrefix();", "title": "" }, { "docid": "28f8e4b6c7916ab305f70e18ce152317", "score": "0.6365999", "text": "public function slugPrefix()\n {\n if (!$this->slugPrefix) {\n $metadata = $this->metadata();\n\n if (isset($metadata['routable']['prefix'])) {\n $this->slugPrefix = $this->translator()->translation($metadata['routable']['prefix']);\n }\n }\n\n return $this->slugPrefix;\n }", "title": "" }, { "docid": "9d2b0be34ae5b73cd5ebc44743015245", "score": "0.6364707", "text": "public function getNamespace(): string\n {\n return $this->namespace;\n }", "title": "" }, { "docid": "c6c52ae985c96addaceb3df2dae07c68", "score": "0.6363523", "text": "public function getNamespace();", "title": "" }, { "docid": "c6c52ae985c96addaceb3df2dae07c68", "score": "0.6363523", "text": "public function getNamespace();", "title": "" }, { "docid": "c6c52ae985c96addaceb3df2dae07c68", "score": "0.6363523", "text": "public function getNamespace();", "title": "" }, { "docid": "86c3a89aebd2aac73b1d5c823dd47486", "score": "0.6362618", "text": "protected function getNamespace()\r\n\t{\r\n\t\t$arguments = array(self::$config['namespace']);\r\n\t\t\r\n\t\tforeach (func_get_args() as $item)\r\n\t\t{\r\n\t\t\t$arguments[] = resolveName($item);\r\n\t\t}\r\n\t\t\r\n\t\treturn implode('\\\\', $arguments);\r\n\t}", "title": "" }, { "docid": "bd1e8f1ef1ae1163eaee1914d59e2ac1", "score": "0.636003", "text": "public function getNamespace() : string\n {\n return $this->namespace;\n }", "title": "" }, { "docid": "1d26a6cb115371da74a03ff6888fc579", "score": "0.6353", "text": "public static function get_tprefix(): string;", "title": "" } ]
a9dec412e80966367d80d46bd1c95c6e
Create request for operation 'invoiceBookAmount'
[ { "docid": "7ebe648f75abaec258d6425a42c506fd", "score": "0.6498586", "text": "protected function invoiceBookAmountRequest($id, $ammount, $date, $body = null)\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling invoiceBookAmount'\n );\n }\n // verify the required parameter 'ammount' is set\n if ($ammount === null || (is_array($ammount) && count($ammount) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $ammount when calling invoiceBookAmount'\n );\n }\n // verify the required parameter 'date' is set\n if ($date === null || (is_array($date) && count($date) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $date when calling invoiceBookAmount'\n );\n }\n\n $resourcePath = '/Invoice/{id}/bookAmmount';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($ammount !== null) {\n $queryParams['ammount'] = ObjectSerializer::toQueryValue($ammount);\n }\n // query params\n if ($date !== null) {\n $queryParams['date'] = ObjectSerializer::toQueryValue($date);\n }\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'application/json'],\n ['application/x-www-form-urlencoded']\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 API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('token');\n if ($apiKey !== null) {\n $queryParams['token'] = $apiKey;\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": "5d022bb5f09c26bf20aeafdaf13e4cfb", "score": "0.6858561", "text": "protected function invoiceCalcTotalDebitRequest()\n {\n\n $resourcePath = '/Invoice/calcTotalDebit';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'application/json'],\n ['application/x-www-form-urlencoded']\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 API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('token');\n if ($apiKey !== null) {\n $queryParams['token'] = $apiKey;\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": "62b6619097a9c649ec4f9479f497c96e", "score": "0.59451216", "text": "protected function invoiceGetTotalRequest($id, $invoice_amount = 'false')\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling invoiceGetTotal'\n );\n }\n\n $resourcePath = '/Invoice/{id}/getTotal';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($invoice_amount !== null) {\n $queryParams['invoiceAmount'] = ObjectSerializer::toQueryValue($invoice_amount);\n }\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'application/json'],\n ['application/x-www-form-urlencoded']\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 API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('token');\n if ($apiKey !== null) {\n $queryParams['token'] = $apiKey;\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": "710bf17410dcf5b9cb5db4a14aed124f", "score": "0.59002376", "text": "public function createInvoice();", "title": "" }, { "docid": "16ba816d2322a085a9d1a404f6abec41", "score": "0.58528364", "text": "protected function addInvoiceRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling addInvoice'\n );\n }\n\n $resourcePath = '/Invoice';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'application/json'],\n ['application/x-www-form-urlencoded']\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 API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('token');\n if ($apiKey !== null) {\n $queryParams['token'] = $apiKey;\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": "9f919210121a7dabf3779d1737e878f7", "score": "0.5723497", "text": "protected function invoiceGetTotalNetRequest($id, $invoice_amount = 'false', $without_discounts = 'false')\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling invoiceGetTotalNet'\n );\n }\n\n $resourcePath = '/Invoice/{id}/getTotalNet';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($invoice_amount !== null) {\n $queryParams['invoiceAmount'] = ObjectSerializer::toQueryValue($invoice_amount);\n }\n // query params\n if ($without_discounts !== null) {\n $queryParams['withoutDiscounts'] = ObjectSerializer::toQueryValue($without_discounts);\n }\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'application/json'],\n ['application/x-www-form-urlencoded']\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 API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('token');\n if ($apiKey !== null) {\n $queryParams['token'] = $apiKey;\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": "d6a21224ceb4c808d72a19c52f988c7a", "score": "0.5721924", "text": "public function bitpay(Request $request){\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\n\t\t\n\t\t$input = $this->sample_products();\n\t $config = $this->config();\n\t\t\treturn $this->invoice($input, $config);\n}", "title": "" }, { "docid": "8882542b4bbdc72047c9eb68d80e8982", "score": "0.5721897", "text": "protected function getInvoiceAndReminderAmountRequest($invoice_id, $invoice_object_name)\n {\n // verify the required parameter 'invoice_id' is set\n if ($invoice_id === null || (is_array($invoice_id) && count($invoice_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $invoice_id when calling getInvoiceAndReminderAmount'\n );\n }\n // verify the required parameter 'invoice_object_name' is set\n if ($invoice_object_name === null || (is_array($invoice_object_name) && count($invoice_object_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $invoice_object_name when calling getInvoiceAndReminderAmount'\n );\n }\n\n $resourcePath = '/Invoice/Factory/getTotalInvoiceReminderAndInvoiceAmount';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($invoice_id !== null) {\n $queryParams['invoice[id]'] = ObjectSerializer::toQueryValue($invoice_id);\n }\n // query params\n if ($invoice_object_name !== null) {\n $queryParams['invoice[objectName]'] = ObjectSerializer::toQueryValue($invoice_object_name);\n }\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'application/json'],\n ['application/x-www-form-urlencoded']\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 API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('token');\n if ($apiKey !== null) {\n $queryParams['token'] = $apiKey;\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": "5543d5dd446297dac56280a995113049", "score": "0.5635804", "text": "protected function getInvoiceReminderAmountRequest($invoice_id, $invoice_object_name)\n {\n // verify the required parameter 'invoice_id' is set\n if ($invoice_id === null || (is_array($invoice_id) && count($invoice_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $invoice_id when calling getInvoiceReminderAmount'\n );\n }\n // verify the required parameter 'invoice_object_name' is set\n if ($invoice_object_name === null || (is_array($invoice_object_name) && count($invoice_object_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $invoice_object_name when calling getInvoiceReminderAmount'\n );\n }\n\n $resourcePath = '/Invoice/Factory/getTotalInvoiceReminderAmount';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($invoice_id !== null) {\n $queryParams['invoice[id]'] = ObjectSerializer::toQueryValue($invoice_id);\n }\n // query params\n if ($invoice_object_name !== null) {\n $queryParams['invoice[objectName]'] = ObjectSerializer::toQueryValue($invoice_object_name);\n }\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'application/json'],\n ['application/x-www-form-urlencoded']\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 API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('token');\n if ($apiKey !== null) {\n $queryParams['token'] = $apiKey;\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": "65f331ea715d664cf93702cc7232c3e1", "score": "0.55418473", "text": "public function actionCreate()\n {\n \n $model = new invoice();\n $nextId = new \\app\\models\\NextIds();\n $listSetup = \\app\\models\\ListSetup::getItemByList('Tax');\n if($model->load(Yii::$app->request->post()) && isset($_REQUEST['member_id']))\n {\n $model->member_id=$_REQUEST['member_id'];\n if(isset($_REQUEST['membership_id']))\n $model->invoice_type_id=$_REQUEST['membership_id'];\n elseif(isset ($_REQUEST['training_id']))\n $model->invoice_type_id=$_REQUEST['training_id'];\n $model->invoice_type=$_POST['invoice_type'];\n $model->invoice_term=$_POST['invoice']['invoice_term'];\n $model->created_by=Yii::$app->user->id;\n $model->invoice_no=$nextId->getNextInvoice();\n $model->invoice_gst_value = (isset($listSetup[$model->invoice_gst]) ? $listSetup[$model->invoice_gst] : 0);\n \n }\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n //save invoice item\n $invoiceItem = new InvoiceItem();\n $invoiceItem->invoice_id=$model->invoice_id;\n $invoiceItem->invoice_item_quantity=$_POST['invoice_item_quantity'];\n $invoiceItem->invoice_item_price= str_replace('.','',$_POST['invoice_item_price']);\n $invoiceItem->invoice_item_amount=$_POST['invoice_item_quantity']*$invoiceItem->invoice_item_price;\n $invoiceItem->invoice_item_description= trim(strip_tags($_POST['invoice_item_description']));\n \n $invoiceItem->save();\n \n //save payment\n $payment_no_array=array();\n if(isset($_POST['payment_no']))\n {\n \n $payment_no_array = $_POST['payment_no'];\n $payment_date_array = $_POST['payment_date'];\n $payment_Method_array = $_POST['Method'];\n $payment_amount_array = $_POST['payment_amount'];\n $payment_note_array = $_POST['payment_note'];\n $reference_array = $_POST['reference'];\n \n foreach ($payment_no_array as $key=>$value)\n {\n $payment = new Payment();\n $payment->payment_no=$value;\n $payment->payment_amount=str_replace('.','',$payment_amount_array[$key]);\n $payment->payment_note=$payment_note_array[$key];\n $payment->payment_method=$payment_Method_array[$key];\n $payment->payment_date=$payment_date_array[$key];\n $payment->invoice_id=$model->invoice_id;\n $payment->member_id=$_REQUEST['member_id'];\n $payment->created_by=Yii::$app->user->id;\n $payment->reference=$reference_array[$key];\n $payment->save();\n }\n \n //Update trang thai Tranning sau khi thanh toan\n $outstanding = $model->getInvoiceOustanding($model->invoice_id);\n $tranning = \\app\\modules\\training\\models\\MemberTrainings::findOne ($model->invoice_type_id);\n if($tranning){\n if($outstanding<=0)\n $tranning->member_training_status = \\app\\modules\\members\\models\\Members::STATUS_ACTIVE_MEMBERS_TRAINING;\n else\n $tranning->member_training_status = \\app\\modules\\members\\models\\Members::STATUS_INACTIVE_MEMBERS_TRAINING;\n $tranning->save();\n }\n \n// //Update trang thai MemberShip sau khi thanh toan\n// $memberShip = \\app\\modules\\members\\models\\Membership::findOne ($model->invoice_type_id);\n// if($memberShip){\n// if($outstanding<1){\n// $memberShip->membership_status = \\app\\modules\\members\\models\\Membership::STATUS_ACTIVE_MEMBERSHIP;\n// $memberShip->save();\n// }\n// }\n }\n \n $status=$model->getStatusInvoice($model->invoice_id);\n if(isset($_POST['written_off']))\n {\n $status= invoice::INVOICE_STATUS_WRITTEN_OFF;\n }\n \n $model->invoice_status=$status;\n $model->save();\n \n //Update total\n $model->update_total($model->invoice_id);\n\n if(isset($_GET['training_id']))\n $url = Yii::$app->urlManager->createUrl('/invoice/default/update?id='.$model->invoice_id.'&training_id='.$model->invoice_type_id);\n else\n $url = Yii::$app->urlManager->createUrl('/invoice/default/update?id='.$model->invoice_id.'&membership_type='.$_REQUEST['membership_type'].'&member_id='.$model->member_id.'&membership_id='.$_REQUEST['membership_id'].'');\n return $this->redirect($url);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "2702055afb0ecd2ea58808ebf6e61e70", "score": "0.5533729", "text": "public function request($amount){\n\t\t\tif(!$this->restClient) throw new Exception('No se ha inicializado la conexión');\n\n\t\t\treturn $this->restClient->post('income/request', [\n\t\t\t\t'amount' => $amount\n\t\t\t]);\n\t\t}", "title": "" }, { "docid": "6fde3fb61c62d3635aa012c27a83981b", "score": "0.55134237", "text": "protected function invoiceGetTotalCalcRequest($id)\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling invoiceGetTotalCalc'\n );\n }\n\n $resourcePath = '/Invoice/{id}/getTotalCalc';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'application/json'],\n ['application/x-www-form-urlencoded']\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 API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('token');\n if ($apiKey !== null) {\n $queryParams['token'] = $apiKey;\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": "1abae0a471f5d9f224ed110d2e313400", "score": "0.53849715", "text": "protected function createInvoiceFromOrderRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling createInvoiceFromOrder'\n );\n }\n\n $resourcePath = '/Invoice/Factory/createInvoiceFromOrder';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'application/json'],\n ['application/x-www-form-urlencoded']\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 API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('token');\n if ($apiKey !== null) {\n $queryParams['token'] = $apiKey;\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": "573a268ff8a088944107ea2c0c6b4f36", "score": "0.5381995", "text": "public function store(Request $request)\n {\n\n $dt = Carbon::now();\n $date_today = $dt->timezone('Europe/London');\n $date = $date_today->toDateString();\n $invoice = new invoice;\n $client = client::find($request->receiver_name);\n $invoice->client_id = $client->id;\n $invoice->receiver_name = strtoupper($client->first_name.' '.$client->last_name);\n $invoice->billing_address = strtoupper($request->billing_address);\n $invoice->invoice_date = $request->invoice_date;\n $invoice->invoice_no = $request->invoice_no;\n $invoice->discount = str_replace(',', '', $request->discount);\n $invoice->currency = $request->currency;\n $invoice->total = str_replace(',', '', $request->total);\n $invoice->discounted_total =str_replace(',', '', $request->total) - str_replace(',', '', $request->discount);\n $invoice->mail_sent = $date;\n $invoice->remarks = $request->remarks;\n $invoice->save();\n $tax = settings::all();\n if($tax[0]->enable == 'yes'){\n $invoice->VAT_percentage = $tax[0]->tax;\n $invoice->VAT_amount = ($tax[0]->tax)/100*(str_replace(',', '', $invoice->discounted_total));\n }\n\n $invoice->paid = 0;\n if($request->credit_amount != null){\n $invoice->credit = 1;\n $invoice->credit_amount = $invoice->credit_amount + str_replace(',', '', $request->credit_amount);\n $invoice->paid = $invoice->paid + str_replace(',', '', $request->credit_amount);\n }\n if($request->debit_amount != null){\n $invoice->debit = 1;\n $invoice->debit_amount = $invoice->debit_amount + str_replace(',', '', $request->debit_amount);\n $invoice->paid = $invoice->paid + str_replace(',', '', $request->debit_amount);\n }\n if($request->cash_amount != null){\n $invoice->cash = 1;\n $invoice->cash_amount = $invoice->cash_amount +str_replace(',', '', $request->cash_amount) ;\n $invoice->paid = $invoice->paid + str_replace(',', '', $request->cash_amount);\n }\n if($request->bank_amount != null){\n $invoice->bank = 1;\n $invoice->bank_amount = $invoice->bank_amount +str_replace(',', '', $request->bank_amount) ;\n $invoice->paid = $invoice->paid + str_replace(',', '', $request->bank_amount);\n }\n $invoice->save();\n $invoice->pending_amount =$invoice->discounted_total + $invoice->VAT_amount - $invoice->paid ;\n $invoice->save();\n $flight_counter=0;\n $visa_counter=0;\n $insurance_counter=0;\n $hotel_counter=0;\n $local_sight_sceen_counter=0;\n $local_transport_counter=0;\n $car_rental_counter=0;\n $other_facilities_counter=0;\n for ($k = 0; $k < count($request->service_name); $k++) {\n if ($request->service_name[$k]=='Flight') {\n $flight = new Flight;\n $flight->invoice_id = $invoice->id;\n $flight->universal_pnr = strtoupper($request->universal_pnr[$flight_counter]);\n $flight->pnr = strtoupper($request->pnr[$flight_counter]);\n $flight->agency_pcc = strtoupper($request->agency_pcc[$flight_counter]);\n $flight->airline_ref = strtoupper($request->airline_ref[$flight_counter]);\n $flight->total_amount = str_replace(',', '', $request->flight_amount[$flight_counter]);\n $flight->segment_one_from = strtoupper($request->segment_one_from[$flight_counter]);\n $flight->segment_two_from = strtoupper($request->segment_two_from[$flight_counter]);\n $flight->segment_one_to = strtoupper($request->segment_one_to[$flight_counter]);\n $flight->segment_two_to = strtoupper($request->segment_two_to[$flight_counter]);\n $flight->segment_one_carrier = strtoupper($request->segment_one_carrier[$flight_counter]);\n $flight->segment_two_carrier = strtoupper($request->segment_two_carrier[$flight_counter]);\n $flight->segment_one_flight = strtoupper($request->segment_one_flight[$flight_counter]);\n $flight->segment_two_flight = strtoupper($request->segment_two_flight[$flight_counter]);\n $flight->segment_one_class = strtoupper($request->segment_one_class[$flight_counter]);\n $flight->segment_two_class = strtoupper($request->segment_two_class[$flight_counter]);\n $flight->segment_one_departure = $request->segment_one_departure[$flight_counter];\n $flight->segment_two_departure = $request->segment_two_departure[$flight_counter];\n $flight->segment_one_arrival = $request->segment_one_arrival[$flight_counter];\n $flight->segment_two_arrival = $request->segment_two_arrival[$flight_counter];\n $flight->flight_remarks = strtoupper($request->flight_remarks[$flight_counter]);\n $flight->save();\n\n foreach($request->pax_type as $index=>$pax_type){\n if($request->verify[$index] == $flight->pnr ){\n $passenger = new Passenger;\n $passenger->flight_id = $flight->id;\n $passenger->pax_type = strtoupper($request->pax_type[$index]);\n $passenger->first_name = strtoupper($request->first_name[$index]);\n $passenger->last_name = strtoupper($request->last_name[$index]);\n $passenger->DOB = $request->DOB[$index];\n $passenger->segment_one_fare_cost = str_replace(',', '', $request->segment_one_fare_cost[$index]);\n $passenger->segment_two_fare_cost = str_replace(',', '', $request->segment_two_fare_cost[$index]);\n $passenger->segment_one_fare_sell = str_replace(',', '', $request->segment_one_fare_sell[$index]);\n $passenger->segment_two_fare_sell = str_replace(',', '', $request->segment_two_fare_sell[$index]);\n $passenger->save();\n }\n }\n $flight_counter++;\n }\n\n if ($request->service_name[$k]=='Visa Services') {\n $invoice_info = new invoiceInfo;\n $invoice_info->invoice_id = $invoice->id;\n $invoice_info->receiver_name = $invoice->receiver_name;\n $invoice_info->service_name = 'Visa Services';\n $invoice_info->name_of_visa_applicant = strtoupper($request->name_of_visa_applicant[$visa_counter]);\n $invoice_info->passport_origin = strtoupper($request->passport_origin[$visa_counter]);\n $invoice_info->passport_member_dob = $request->passport_member_dob[$visa_counter];\n $invoice_info->passport_no = strtoupper($request->passport_no[$visa_counter]);\n $invoice_info->visa_country = strtoupper($request->visa_country[$visa_counter]);\n $invoice_info->visa_type = strtoupper($request->visa_type[$visa_counter]);\n $invoice_info->visa_charges = str_replace(',', '', $request->visa_charges[$visa_counter]);\n $invoice_info->service_charge = str_replace(',', '', $request->service_charge[$visa_counter]);\n $invoice_info->visa_amount = str_replace(',', '', $request->visa_amount[$visa_counter]);\n $invoice_info->save();\n $visa_counter++;\n }\n\n if ($request->service_name[$k]=='Insurance') {\n $invoice_info = new invoiceInfo;\n $invoice_info->invoice_id = $invoice->id;\n $invoice_info->receiver_name = $invoice->receiver_name;\n $invoice_info->service_name = 'Insurance';\n $invoice_info->name_of_insurance_applicant = strtoupper($request->name_of_insurance_applicant[$insurance_counter]);\n $invoice_info->name_of_insurance_company = strtoupper($request->name_of_insurance_company[$insurance_counter]);\n $invoice_info->insurance_amount = str_replace(',', '', $request->insurance_amount[$insurance_counter]);\n $invoice_info->insurance_remarks = strtoupper($request->insurance_remarks[$insurance_counter]);\n $invoice_info->save();\n $insurance_counter++;\n }\n\n if ($request->service_name[$k]=='Hotel') {\n $invoice_info = new invoiceInfo;\n $invoice_info->invoice_id = $invoice->id;\n $invoice_info->receiver_name = $invoice->receiver_name;\n $invoice_info->service_name = 'Hotel';\n\n $invoice_info->hotel_applicant_name = strtoupper($request->hotel_applicant_name[$hotel_counter]);\n $invoice_info->hotel_city = strtoupper($request->hotel_city[$hotel_counter]);\n $invoice_info->hotel_country = strtoupper($request->hotel_country[$hotel_counter]);\n $invoice_info->hotel_name = strtoupper($request->hotel_name[$hotel_counter]);\n $invoice_info->check_in_date = $request->check_in_date[$hotel_counter];\n $invoice_info->check_out_date = $request->check_out_date[$hotel_counter];\n $invoice_info->no_of_children = $request->no_of_children[$hotel_counter];\n $invoice_info->no_of_rooms = $request->no_of_rooms[$hotel_counter];\n $invoice_info->hotel_amount = str_replace(',', '', $request->hotel_amount[$hotel_counter]);\n\n $invoice_info->save();\n $hotel_counter++;\n }\n\n if ($request->service_name[$k]=='Local Sight Sceen') {\n $invoice_info = new invoiceInfo;\n $invoice_info->invoice_id = $invoice->id;\n $invoice_info->receiver_name = strtoupper($invoice->receiver_name);\n $invoice_info->service_name = 'Local Sight Sceen';\n $invoice_info->local_sight_sceen_amount = str_replace(',', '', $request->local_sight_sceen_amount[$local_sight_sceen_counter]);\n $invoice_info->local_sight_sceen_remarks = strtoupper($request->local_sight_sceen_remarks[$local_sight_sceen_counter]);\n $invoice_info->save();\n $local_sight_sceen_counter++;\n }\n\n if ($request->service_name[$k]=='Local Transport') {\n $invoice_info = new invoiceInfo;\n $invoice_info->invoice_id = $invoice->id;\n $invoice_info->receiver_name = $invoice->receiver_name;\n $invoice_info->service_name = 'Local Transport';\n\n\n $invoice_info->local_transport_amount = str_replace(',', '', $request->local_transport_amount[$local_transport_counter]);\n $invoice_info->local_transport_remarks = strtoupper($request->local_transport_remarks[$local_transport_counter]);\n\n $invoice_info->save();\n $local_transport_counter++;\n }\n\n if ($request->service_name[$k]=='Car Rental') {\n $invoice_info = new invoiceInfo;\n $invoice_info->invoice_id = $invoice->id;\n $invoice_info->receiver_name = $invoice->receiver_name;\n $invoice_info->service_name = 'Car Rental';\n\n\n $invoice_info->car_rental_amount = str_replace(',', '', $request->car_rental_amount[$car_rental_counter]);\n $invoice_info->car_rental_remarks = strtoupper($request->car_rental_remarks[$car_rental_counter]);\n\n $invoice_info->save();\n $car_rental_counter++;\n }\n\n if ($request->service_name[$k]=='Other Facilities') {\n $invoice_info = new invoiceInfo;\n $invoice_info->invoice_id = $invoice->id;\n $invoice_info->receiver_name = $invoice->receiver_name;\n $invoice_info->service_name = 'Other Facilities';\n $invoice_info->other_facilities_amount = str_replace(',', '', $request->other_facilities_amount[$other_facilities_counter]);\n $invoice_info->other_facilities_remarks = strtoupper($request->other_facilities_remarks[$other_facilities_counter]);\n $invoice_info->save();\n $other_facilities_counter++;\n }\n }\n\n foreach (invoice::all() as $inv) {\n if($inv->pending_amount < 0){\n $inv->advance = 0 - $inv->pending_amount;\n $inv->pending_amount = 0;\n $inv->save();\n }\n if ($inv->pending_amount == 0) {\n $inv->status = 1;\n $inv->save();\n }\n if ($inv->pending_amount > 0) {\n $inv->status = 0;\n $inv->save();\n }\n }\n\n if ($request->confirmation_via == 'email') {\n $visa = invoice::find($invoice->id)->invoiceInfo->where('service_name','Visa Services');\n $hotel = invoice::find($invoice->id)->invoiceInfo->where('service_name','Hotel');\n $insurance = invoice::find($invoice->id)->invoiceInfo->where('service_name','Insurance');\n $local_sight_sceen = invoice::find($invoice->id)->invoiceInfo->where('service_name','Local Sight Sceen');\n $local_transport = invoice::find($invoice->id)->invoiceInfo->where('service_name','Local Transport');\n $car_rental = invoice::find($invoice->id)->invoiceInfo->where('service_name','Car Rental');\n $other_facilities = invoice::find($invoice->id)->invoiceInfo->where('service_name','Other Facilities');\n do {\n $token = str_random();\n }while (invoice::where('token', $token)->first());\n $invoice->token = $token;\n $invoice->save();\n $data = [\n 'tax'=> settings::all(),\n 'invoice'=> invoice::find($invoice->id),\n 'products'=> products::all(),\n 'airlines'=> airlines::all(),\n 'visa' => $visa,\n 'hotel' => $hotel,\n 'insurance' =>$insurance,\n 'local_sight_sceen' => $local_sight_sceen,\n 'local_transport' => $local_transport,\n 'car_rental' => $car_rental,\n 'other_facilities' => $other_facilities,\n 'token' =>$token,\n ];\n $contactEmail = $invoice->client->email;\n Mail::send('emails.invoice', $data, function($message) use ($contactEmail)\n {\n $message->to($contactEmail)->subject('Invoice!!');\n });\n }\n Session::flash('success','Invoice Created Successfully');\n return redirect()->route('invoice');\n }", "title": "" }, { "docid": "36e29d974bd123230621ec1e379c8a77", "score": "0.5341488", "text": "public function actionCreate()\n\t{\n\t\t$model=new Invoice;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n $profile=Yii::app()->getModule('user')->user()->profile;\n\n\t\tif(isset($_POST['Invoice']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Invoice'];\n $model->subtotal=number_format(0, 2);\n $model->vatexemptsale=number_format(0, 2);\n $model->total=number_format(0, 2);\n $model->preparedby=$profile->first_name.' '.$profile->last_name;\n $model->patient_id=$_GET['id'];\n $patient = Patient::model()->findByPk($model->patient_id);\n $model->patientname=$patient->firstname.' '.$patient->lastname;\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t} else\n {\n if (!$_GET)\n $this->redirect(array('select'));\n else\n $model->date=date('Y-m-d');\n }\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "7b2d6e94d7fe5930df7f693edc678d5b", "score": "0.53220123", "text": "public function pay(Invoice $invoice): ContractsResult;", "title": "" }, { "docid": "3a26426fab2cf2acadccc9c7fc7d8a7a", "score": "0.53169435", "text": "public function create($request)\n {\n $subTotal = 0;\n $totalTax = 0;\n $totalDiscount = 0;\n $totalAmount = 0;\n $input = $request->all();\n $user = Auth::user();\n $invoice = new Invoice;\n $input['user_id'] = $user->id;\n $input['invoice_number'] = $this->_getInvoiceNumber();\n $invoice = $invoice->create($input);\n if ($invoice) {\n $items = $input['items'];\n foreach ($items as $key => $value) {\n $value['total_item_amount'] = $value['unit_price'] * $value['quantity'];\n $invoiceItem = $invoice->items()->create($value);\n $subTotal += $value['total_item_amount'];\n\n if(isset($value['taxes'])) {\n foreach ($value['taxes'] as $key1 => $value1) {\n $tax = Tax::findOrFail($value1);\n $item_tax = ($invoiceItem->total_item_amount * $tax->tax_rate / 100);\n $invoiceItem->taxes()->attach($value1, [ 'item_tax' => $item_tax ]);\n $totalTax += $item_tax;\n }\n }\n }\n\n if (isset($input['discount_type'])) {\n if ($input['discount_type'] == 'percent') {\n $totalDiscount = ( ($subTotal + $totalTax) * $input['discount'] ) / 100;\n }elseif ($input['discount_type'] == 'fixed') {\n $totalDiscount = $input['discount'];\n }\n }\n\n $totalAmount = $subTotal + $totalTax + $input['adjustment'] - $totalDiscount;\n\n $invoice->sub_total = $subTotal;\n $invoice->total_tax = $totalTax;\n $invoice->total_discount = $totalDiscount;\n $invoice->total_amount = $totalAmount;\n $invoice->total_due_amount = $totalAmount;\n $invoice->save(); \n\n // Sent invoice to customer.\n $invoiceData = Invoice::with('client', 'items.taxes', 'payments')->find($invoice->id);\n $this->emailsHelper->sendInvoiceEmail($invoiceData);\n\n // --\n // Add activities\n createUserActivity(\n Invoice::MODULE_NAME,\n $invoice->id,\n $request->method(),\n $invoice->invoice_number,\n $request->ip()\n );\n\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "fda96ba729c26352c23ff0969286a03f", "score": "0.53168887", "text": "protected function invoiceRefundAmountRequest($id, $ammount, $date)\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling invoiceRefundAmount'\n );\n }\n // verify the required parameter 'ammount' is set\n if ($ammount === null || (is_array($ammount) && count($ammount) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $ammount when calling invoiceRefundAmount'\n );\n }\n // verify the required parameter 'date' is set\n if ($date === null || (is_array($date) && count($date) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $date when calling invoiceRefundAmount'\n );\n }\n\n $resourcePath = '/Invoice/{id}/refundAmmount';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($ammount !== null) {\n $queryParams['ammount'] = ObjectSerializer::toQueryValue($ammount);\n }\n // query params\n if ($date !== null) {\n $queryParams['date'] = ObjectSerializer::toQueryValue($date);\n }\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'application/json'],\n ['application/x-www-form-urlencoded']\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 API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('token');\n if ($apiKey !== null) {\n $queryParams['token'] = $apiKey;\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": "a17823697167a0be3b564547b920a8a3", "score": "0.5243136", "text": "public function store(StoreInvoiceRequest $request)\n {\n $ten = $this->tenant->find($request->tenant_id);\n $rent = $this->rent->where('tenant_id', $ten->tenant_id)->first();\n $amount = $request->amount - $rent->monthlyDiscount;\n\n $input = new Invoice;\n $input->tenant_id = $request->tenant_id;\n $input->ref_no = strtoupper(substr($rent->buildingName,0,3)).$rent->roomNumber.$rent->bed;\n $input->unit_no = $rent->buildingName.' '.$rent->roomNumber;\n $input->billingDate = $request->billingDate;\n $input->dueDate = $request->dueDate;\n $input->amount = $amount;\n $input->remaining = $amount;\n $input->payment_status = 0;\n $input->is_deleted = 0;\n $input->save();\n\n return response()->json([\n 'message' => 'invoice added successfully'\n ],201);\n }", "title": "" }, { "docid": "08c33daa4430a8879150f2fd4a5dc684", "score": "0.5238192", "text": "public function createAction() {\n if (!$this->request->isPost()) {\n $this->dispatcher->forward([\n 'controller' => \"invoice\",\n 'action' => 'index'\n ]);\n\n return;\n }\n\n $invoice = new Invoice();\n $invoice->setTxnid($this->request->getPost(\"TxnID\"));\n $invoice->setTimecreated($this->request->getPost(\"TimeCreated\"));\n $invoice->setTimemodified($this->request->getPost(\"TimeModified\"));\n $invoice->setEditsequence($this->request->getPost(\"EditSequence\"));\n $invoice->setTxnnumber($this->request->getPost(\"TxnNumber\"));\n $invoice->setCustomerrefListid($this->request->getPost(\"CustomerRef_ListID\"));\n $invoice->setCustomerrefFullname($this->request->getPost(\"CustomerRef_FullName\"));\n $invoice->setClassrefListid($this->request->getPost(\"ClassRef_ListID\"));\n $invoice->setClassrefFullname($this->request->getPost(\"ClassRef_FullName\"));\n $invoice->setAraccountrefListid($this->request->getPost(\"ARAccountRef_ListID\"));\n $invoice->setAraccountrefFullname($this->request->getPost(\"ARAccountRef_FullName\"));\n $invoice->setTemplaterefListid($this->request->getPost(\"TemplateRef_ListID\"));\n $invoice->setTemplaterefFullname($this->request->getPost(\"TemplateRef_FullName\"));\n $invoice->setTxndate($this->request->getPost(\"TxnDate\"));\n $invoice->setRefnumber($this->request->getPost(\"RefNumber\"));\n $invoice->setBilladdressAddr1($this->request->getPost(\"BillAddress_Addr1\"));\n $invoice->setBilladdressAddr2($this->request->getPost(\"BillAddress_Addr2\"));\n $invoice->setBilladdressAddr3($this->request->getPost(\"BillAddress_Addr3\"));\n $invoice->setBilladdressAddr4($this->request->getPost(\"BillAddress_Addr4\"));\n $invoice->setBilladdressAddr5($this->request->getPost(\"BillAddress_Addr5\"));\n $invoice->setBilladdressCity($this->request->getPost(\"BillAddress_City\"));\n $invoice->setBilladdressState($this->request->getPost(\"BillAddress_State\"));\n $invoice->setBilladdressPostalcode($this->request->getPost(\"BillAddress_PostalCode\"));\n $invoice->setBilladdressCountry($this->request->getPost(\"BillAddress_Country\"));\n $invoice->setBilladdressNote($this->request->getPost(\"BillAddress_Note\"));\n $invoice->setShipaddressAddr1($this->request->getPost(\"ShipAddress_Addr1\"));\n $invoice->setShipaddressAddr2($this->request->getPost(\"ShipAddress_Addr2\"));\n $invoice->setShipaddressAddr3($this->request->getPost(\"ShipAddress_Addr3\"));\n $invoice->setShipaddressAddr4($this->request->getPost(\"ShipAddress_Addr4\"));\n $invoice->setShipaddressAddr5($this->request->getPost(\"ShipAddress_Addr5\"));\n $invoice->setShipaddressCity($this->request->getPost(\"ShipAddress_City\"));\n $invoice->setShipaddressState($this->request->getPost(\"ShipAddress_State\"));\n $invoice->setShipaddressPostalcode($this->request->getPost(\"ShipAddress_PostalCode\"));\n $invoice->setShipaddressCountry($this->request->getPost(\"ShipAddress_Country\"));\n $invoice->setShipaddressNote($this->request->getPost(\"ShipAddress_Note\"));\n $invoice->setIspending($this->request->getPost(\"IsPending\"));\n $invoice->setIsfinancecharge($this->request->getPost(\"IsFinanceCharge\"));\n $invoice->setPonumber($this->request->getPost(\"PONumber\"));\n $invoice->setTermsrefListid($this->request->getPost(\"TermsRef_ListID\"));\n $invoice->setTermsrefFullname($this->request->getPost(\"TermsRef_FullName\"));\n $invoice->setDuedate($this->request->getPost(\"DueDate\"));\n $invoice->setSalesreprefListid($this->request->getPost(\"SalesRepRef_ListID\"));\n $invoice->setSalesreprefFullname($this->request->getPost(\"SalesRepRef_FullName\"));\n $invoice->setFob($this->request->getPost(\"FOB\"));\n $invoice->setShipdate($this->request->getPost(\"ShipDate\"));\n $invoice->setShipmethodrefListid($this->request->getPost(\"ShipMethodRef_ListID\"));\n $invoice->setShipmethodrefFullname($this->request->getPost(\"ShipMethodRef_FullName\"));\n $invoice->setSubtotal($this->request->getPost(\"Subtotal\"));\n $invoice->setItemsalestaxrefListid($this->request->getPost(\"ItemSalesTaxRef_ListID\"));\n $invoice->setItemsalestaxrefFullname($this->request->getPost(\"ItemSalesTaxRef_FullName\"));\n $invoice->setSalestaxpercentage($this->request->getPost(\"SalesTaxPercentage\"));\n $invoice->setSalestaxtotal($this->request->getPost(\"SalesTaxTotal\"));\n $invoice->setAppliedamount($this->request->getPost(\"AppliedAmount\"));\n $invoice->setBalanceremaining($this->request->getPost(\"BalanceRemaining\"));\n $invoice->setCurrencyrefListid($this->request->getPost(\"CurrencyRef_ListID\"));\n $invoice->setCurrencyrefFullname($this->request->getPost(\"CurrencyRef_FullName\"));\n $invoice->setExchangerate($this->request->getPost(\"ExchangeRate\"));\n $invoice->setBalanceremaininginhomecurrency($this->request->getPost(\"BalanceRemainingInHomeCurrency\"));\n $invoice->setMemo($this->request->getPost(\"Memo\"));\n $invoice->setIspaid($this->request->getPost(\"IsPaID\"));\n $invoice->setCustomermsgrefListid($this->request->getPost(\"CustomerMsgRef_ListID\"));\n $invoice->setCustomermsgrefFullname($this->request->getPost(\"CustomerMsgRef_FullName\"));\n $invoice->setIstobeprinted($this->request->getPost(\"IsToBePrinted\"));\n $invoice->setIstobeemailed($this->request->getPost(\"IsToBeEmailed\"));\n $invoice->setIstaxincluded($this->request->getPost(\"IsTaxIncluded\"));\n $invoice->setCustomersalestaxcoderefListid($this->request->getPost(\"CustomerSalesTaxCodeRef_ListID\"));\n $invoice->setCustomersalestaxcoderefFullname($this->request->getPost(\"CustomerSalesTaxCodeRef_FullName\"));\n $invoice->setSuggesteddiscountamount($this->request->getPost(\"SuggestedDiscountAmount\"));\n $invoice->setSuggesteddiscountdate($this->request->getPost(\"SuggestedDiscountDate\"));\n $invoice->setOther($this->request->getPost(\"Other\"));\n $invoice->setCustomfield1($this->request->getPost(\"CustomField1\"));\n $invoice->setCustomfield2($this->request->getPost(\"CustomField2\"));\n $invoice->setCustomfield3($this->request->getPost(\"CustomField3\"));\n $invoice->setCustomfield4($this->request->getPost(\"CustomField4\"));\n $invoice->setCustomfield5($this->request->getPost(\"CustomField5\"));\n $invoice->setCustomfield6($this->request->getPost(\"CustomField6\"));\n $invoice->setCustomfield7($this->request->getPost(\"CustomField7\"));\n $invoice->setCustomfield8($this->request->getPost(\"CustomField8\"));\n $invoice->setCustomfield9($this->request->getPost(\"CustomField9\"));\n $invoice->setCustomfield10($this->request->getPost(\"CustomField10\"));\n $invoice->setCustomfield11($this->request->getPost(\"CustomField11\"));\n $invoice->setCustomfield12($this->request->getPost(\"CustomField12\"));\n $invoice->setCustomfield13($this->request->getPost(\"CustomField13\"));\n $invoice->setCustomfield14($this->request->getPost(\"CustomField14\"));\n $invoice->setCustomfield15($this->request->getPost(\"CustomField15\"));\n $invoice->setStatus($this->request->getPost(\"Status\"));\n\n\n if (!$invoice->save()) {\n foreach ($invoice->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n $this->dispatcher->forward([\n 'controller' => \"invoice\",\n 'action' => 'new'\n ]);\n\n return;\n }\n\n $this->flash->success(\"invoice was created successfully\");\n\n $this->dispatcher->forward([\n 'controller' => \"invoice\",\n 'action' => 'index'\n ]);\n }", "title": "" }, { "docid": "4dbd927805cbcf4ec93a9b0f2e7cdd25", "score": "0.52305317", "text": "protected function getInvoicesRequest($limit = '100', $offset = '0', $embed = null)\n {\n\n $resourcePath = '/Invoice';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($limit !== null) {\n $queryParams['limit'] = ObjectSerializer::toQueryValue($limit);\n }\n // query params\n if ($offset !== null) {\n $queryParams['offset'] = ObjectSerializer::toQueryValue($offset);\n }\n // query params\n if (is_array($embed)) {\n $embed = ObjectSerializer::serializeCollection($embed, 'csv', true);\n }\n if ($embed !== null) {\n $queryParams['embed'] = ObjectSerializer::toQueryValue($embed);\n }\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'application/json'],\n ['application/x-www-form-urlencoded']\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 API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('token');\n if ($apiKey !== null) {\n $queryParams['token'] = $apiKey;\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": "614036b475e58fc2e3b53bfd581469c0", "score": "0.51957184", "text": "public function create(Request $request)\n\t{\n\t\t// Some checks to start with:\n\n \t$sequenceList = \\App\\Sequence::listFor('CustomerInvoice');\n if ( !$sequenceList )\n return redirect('customerinvoices')\n ->with('error', l('There is not any Sequence for this type of Document &#58&#58 You must create one first', [], 'layouts'));\n\n \t$payments = \\App\\PaymentMethod::count();\n if ( !$payments )\n return redirect('customerinvoices')\n ->with('error', l('There is not any Payment Method &#58&#58 You must create one first', [], 'layouts'));\n\n\n if ( !$request->has('customer_id') ) { \n\t\t\t// No Customer available, ask for one\n\t\t\treturn view('customer_invoices.create');\n\t\t}\n\n\t\t// Do the Mambo!!!\n try {\n\t\t\t$customer = \\App\\Customer::with('addresses')->findOrFail( $request->input('customer_id') );\n\n } catch(ModelNotFoundException $e) {\n\t\t\t// No Customer available, ask for one\n\t\t\treturn view('customer_invoices.create');\n }\n\t\t\n\t\t// Prepare & retrieve customer data to fill in the form\n\t\t// Should check Invoicing Address (at least)\n\t\t$addressBook = $customer->addresses;\n/*\n\t\t$theId = $customer->invoicing_address_id;\n\t\t$invoicing_address = $addressBook->filter(function($item) use ($theId) {\t// Filter returns a collection!\n\t\t return $item->id == $theId;\n\t\t})->first();\n\n\t\t$addressbookList = array();\n\t\tforeach ($addressBook as $address) {\n\t\t\t$addressbookList[$address->id] = $address->alias;\n\t\t}\n*/\n\t\t$invoicing_address = $customer->invoicing_address();\n//\t\t$addressbookList = $customer->getAddressList();\n\t\t$addressbookList = $addressBook->pluck( 'alias', 'id' )->toArray();\n\n\t\t$currency_id = $customer->currency_id > 0 ? $customer->currency_id : \\App\\Context::getContext()->currency->id;\n try {\n if ($currency_id == \\App\\Context::getContext()->currency->id) \n \t$currency = \\App\\Context::getContext()->currency;\n \telse \n \t\t$currency = \\App\\Currency::findOrFail($currency_id);\n\n } catch(ModelNotFoundException $e) {\n\n $currency = \\App\\Context::getContext()->currency;\t\t// Really???\n }\n\n\t\t// Prepare Customer Invoice default data\n\t\t$invoice = $this->customerInvoice;\n\n\t\t$invoice->customer_id = $customer->id;\n\n\t\t$invoice->sequence_id = $customer->sequence_id > 0 ? $customer->sequence_id : Configuration::get('DEF_CUSTOMER_INVOICE_SEQUENCE');\n\t\t$invoice->document_reference = '';\n\n\t\t$invoice->reference = '';\n\t\t$invoice->document_discount = 0.0;\n\n\t\t$invoice->document_date = \\Carbon\\Carbon::now();\n\t\t$invoice->document_date_form = abi_date_short( \\Carbon\\Carbon::now() );\t\t// Formatted date for view\n\t\t\n\t\t$invoice->delivery_date = $invoice->document_date;\n\t\t$invoice->delivery_date_form = $invoice->document_date_form;\n\n\t\t$invoice->printed_at = null;\n\t\t$invoice->edocument_sent_at = null;\n\t\t$invoice->customer_viewed_at = null;\n\t\t$invoice->posted_at = null;\n\n\t\t$invoice->number_of_packages = 1;\n\t\t$invoice->shipping_conditions = '';\n\t\t$invoice->tracking_number = '';\n\n\t\t$invoice->prices_entered_with_tax = Configuration::get('PRICES_ENTERED_WITH_TAX');\n\t\t$invoice->round_prices_with_tax = Configuration::get('ROUND_PRICES_WITH_TAX');\n\n\t\t$invoice->currency_conversion_rate = $currency->conversion_rate;\n\t\t$invoice->down_payment = 0.0;\n\t\t$invoice->open_balance = 0.0;\n\n\t\t$invoice->total_tax_incl = 0.0;\n\t\t$invoice->total_tax_excl = 0.0;\n\n\t\t$invoice->commission_amount = 0.0;\n\n\t\t$invoice->notes = '';\n\t\t$invoice->status = 'draft';\n//\t\t\t$invoice->einvoice = $customer->accept_einvoice;\n\n\t\t$invoice->invoicing_address_id = $customer->invoicing_address_id;\n\t\t$invoice->shipping_address_id = $customer->shipping_address_id > 0 ? $customer->shipping_address_id : $customer->invoicing_address_id;\n\t\t$invoice->warehouse_id = Configuration::get('DEF_WAREHOUSE');\n\t\t$invoice->carrier_id = $customer->carrier_id > 0 ? $customer->carrier_id : Configuration::get('DEF_CARRIER');\n\t\t$invoice->sales_rep_id = $customer->sales_rep_id > 0 ? $customer->sales_rep_id : 0;\n\t\t$invoice->currency_id = $currency->id;\n\t\t$invoice->payment_method_id = $customer->payment_method_id > 0 ? $customer->payment_method_id : Configuration::get('DEF_CUSTOMER_PAYMENT_METHOD');\n\t\t$invoice->template_id = $customer->template_id > 0 ? $customer->template_id : Configuration::get('DEF_CUSTOMER_INVOICE_TEMPLATE');\n//\t\t\t$invoice->parent_document_id = null;\n\n\t\t$invoice->customerInvoiceLines = collect([]);\n\n\t\treturn view('customer_invoices.create', compact('customer', 'invoicing_address', 'addressBook', 'addressbookList', 'invoice', 'sequenceList'));\n\n\t}", "title": "" }, { "docid": "3a26e7ffb83825d40a7dc8cc943a47af", "score": "0.5183911", "text": "private function add_payment_booking_request($total_cost) {\r\n $add_payment_booking_req = '<s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" >\r\n ' . $this->soap_header () . '\r\n <s:Body>\r\n <AddPaymentToBookingRequest xmlns=\"http://schemas.navitaire.com/WebServices/ServiceContracts/BookingService\">\r\n <addPaymentToBookingReqData xmlns=\"http://schemas.navitaire.com/WebServices/DataContracts/Booking\" xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\"> \r\n <MessageState>New</MessageState>\r\n <WaiveFee>false</WaiveFee>\r\n <ReferenceType>Default</ReferenceType>\r\n <PaymentMethodType>AgencyAccount</PaymentMethodType>\r\n <PaymentMethodCode>AG</PaymentMethodCode>\r\n <QuotedCurrencyCode>' . get_application_default_currency () . '</QuotedCurrencyCode>\r\n <QuotedAmount>' . $total_cost . '</QuotedAmount>\r\n <Status>New</Status>\r\n <AccountNumberID>0</AccountNumberID>\r\n <AccountNumber>' . $this->config ['organization_code'] . '</AccountNumber>\r\n <Expiration>2020-01-01T00:00:00</Expiration>\r\n <ParentPaymentID>0</ParentPaymentID>\r\n <Installments>0</Installments>\r\n <PaymentText i:nil=\"true\"/>\r\n <Deposit>false</Deposit>\r\n <PaymentFields i:nil=\"true\"/>\r\n <PaymentAddresses i:nil=\"true\"/>\r\n <AgencyAccount i:nil=\"true\"/>\r\n <CreditShell i:nil=\"true\"/>\r\n <CreditFile i:nil=\"true\"/>\r\n <PaymentVoucher i:nil=\"true\"/>\r\n <ThreeDSecureRequest i:nil=\"true\"/>\r\n <MCCRequest i:nil=\"true\"/>\r\n <AuthorizationCode i:nil=\"true\"/>\r\n </addPaymentToBookingReqData>\r\n </AddPaymentToBookingRequest>\r\n </s:Body>\r\n </s:Envelope>';\r\n $request ['request'] = $add_payment_booking_req;\r\n $request ['url'] = $this->config['end_point']['booking'];\r\n $request ['remarks'] = 'Add Payment to Booking';\r\n $request ['SOAPAction'] = 'http://schemas.navitaire.com/WebServices/IBookingManager/AddPaymentToBooking';\r\n $request ['status'] = SUCCESS_STATUS;\r\n return $request;\r\n }", "title": "" }, { "docid": "f0810d3ffcf593e119bddbba74da962a", "score": "0.5181197", "text": "protected function transferMoneyFromRequest($body = null)\n {\n\n $resourcePath = '/officetransactions';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // 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 // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('fineract-platform-tenantid');\n if ($apiKey !== null) {\n $headers['fineract-platform-tenantid'] = $apiKey;\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": "e737a436e6276aa593d6198d47f6631c", "score": "0.5162822", "text": "public function createInvoice() {\n\t\tlist($typegroup, $class) = $this->api->typeInfo('invoice');\n\t\t$invoice = new $class;\n\t\t$invoice->setApi($this->api);\n\t\t$invoice->setContact($this);\n\t\treturn $invoice;\n\t}", "title": "" }, { "docid": "f764afdde8495f0329d6e2a807d21b69", "score": "0.51511896", "text": "protected function getAccountTransactionsRequest($accountId, $debit = 'true', $credit = 'false', $fromBookingDateTime = null, $toBookingDateTime = null)\n {\n // verify the required parameter 'accountId' is set\n if ($accountId === null || (is_array($accountId) && count($accountId) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $accountId when calling getAccountTransactions'\n );\n }\n\n $resourcePath = '/interoperation/accounts/{accountId}/transactions';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($debit !== null) {\n $queryParams['debit'] = ObjectSerializer::toQueryValue($debit, null);\n }\n // query params\n if ($credit !== null) {\n $queryParams['credit'] = ObjectSerializer::toQueryValue($credit, null);\n }\n // query params\n if ($fromBookingDateTime !== null) {\n $queryParams['fromBookingDateTime'] = ObjectSerializer::toQueryValue($fromBookingDateTime, null);\n }\n // query params\n if ($toBookingDateTime !== null) {\n $queryParams['toBookingDateTime'] = ObjectSerializer::toQueryValue($toBookingDateTime, null);\n }\n\n // path params\n if ($accountId !== null) {\n $resourcePath = str_replace(\n '{' . 'accountId' . '}',\n ObjectSerializer::toPathValue($accountId),\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 // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('fineract-platform-tenantid');\n if ($apiKey !== null) {\n $headers['fineract-platform-tenantid'] = $apiKey;\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": "cba4084d433ebdc0cd549512387423d5", "score": "0.513207", "text": "protected function saveInvoiceRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling saveInvoice'\n );\n }\n\n $resourcePath = '/Invoice/Factory/saveInvoice';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'application/json'],\n ['application/x-www-form-urlencoded']\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 API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('token');\n if ($apiKey !== null) {\n $queryParams['token'] = $apiKey;\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": "eda08909c70fef3827b42b4b8e719295", "score": "0.51051867", "text": "public function getMyPriceForASIN($request);", "title": "" }, { "docid": "6ce9e025555ea0efd8be2f82e136f5fb", "score": "0.5092234", "text": "function invoiceReport(Request $request){\n \n }", "title": "" }, { "docid": "aa8b247ebbb0cb81bef3af7b7856a832", "score": "0.50902593", "text": "public function createInvoice(Request $request)\n\t{\n\t\tif (empty($request->invoice)) {\n\t\t\tthrow new ApiException('Invoice was not provided.');\n\t\t}\n\n\t\t$invoice = ConstructionProjectVendor::create($request->invoice);\n\n\t\tif (! $invoice) {\n\t\t\tthrow new ApiException('Invoice was not created.');\n\t\t}\n\n\t\t$invoice = ConstructionProjectVendor::with(['vendor' => function ($q) {\n\t\t\t$q->with('trades');\n\t\t}])->where('id', '=', $invoice->id)->first();\n\n\t\treturn ['status' => 'success', 'invoice' => $invoice];\n\t}", "title": "" }, { "docid": "ba500af2ce5d89c3c786891fa0b841b3", "score": "0.5083805", "text": "public function setInvoicePayment($request){\n// $invoice_id = Invoice::select('ID')->where('invoice_number', '=', $request->invoice_number)->get();\n// $invoice_payment = array(\n// \"ID_invoice\" => $invoice_id[0]->ID ? $invoice_id[0]->ID : null,\n// \"pay_date\" => $request->issue_date ? $request->issue_date : null,\n// \"amount\" => $request->invoice_payment ? $request->invoice_payment : null,\n// \"currency\" => $request->currency ? $request->currency : \"CZK\",\n// \"payer_account\" => $request->payer_account ? $request->payer_account : null\n// );\n //if invoice ID is AUTO_INCREMENT, end\n\n $invoice_payment = array(\n \"ID_invoice\" => $request->invoice_number ? $request->invoice_number : null,\n \"pay_date\" => $request->issue_date ? $request->issue_date : null,\n \"amount\" => $request->invoice_payment ? $request->invoice_payment : 0.00,\n \"currency\" => $request->currency ? $request->currency : \"CZK\",\n \"payer_account\" => $request->payer_account ? $request->payer_account : null\n );\n\n return InvoicePayment::insert($invoice_payment);\n\n }", "title": "" }, { "docid": "1d43d3877030b876e539b4e60697f43e", "score": "0.50690997", "text": "public function payment(Request $request)\n {\n\t\t$request->validate([\n\t\t\t'amount' => 'required',\n\t\t\t'payment_date' => 'required',\n\t\t\t'payment_mode' => 'required',\n ]);\n\t\t\n\t\tif (!isset($request->do_not_send_invoice)) {\n\t\t\t$do_not_send_invoice = 0;\n\t\t} else {\n\t\t\t$do_not_send_invoice = 1;\n\t\t}\n\t\t\n\t\t$page = \"/\".$request->page.\"/\".$request->invoice_id;\n\t\t$sum = InvoicePayments::where('invoice_id', $request->invoice_id)->sum('amount');\n\t\t$paid_amount = (float)$request->amount;\n\t\t$invoice_amount = (float)$request->invoice_amount;\n\t\t$total_paid_amount = $sum + $paid_amount;\n\t\t\n\t\tif($total_paid_amount >= $invoice_amount){\n\t\t\t$status = \"paid\";\n\t\t} else {\n\t\t\t$status = \"partially paid\";\n\t\t}\n\t\t\n\t\tif(auth()->user()){\n\t\t\tif(auth()->user()->hasRole('admin') || auth()->user() && auth()->user()->hasRole('owner')){\n\t\t\t\t// Update Status\n\t\t\t\t$invoices = Invoices::where(['id' => $request->invoice_id])->first();\n\t\t\t\t$invoices->status = $status;\n\t\t\t\t$invoices->user_id = auth()->user()->id;\n\t\t\t\t$invoices->company_id = auth()->user()->company->id;\n\t\t\t\t$invoices->save();\n\t\t\n\t\t\t\t// Add Invoice Payment\n\t\t\t\t$invoicePayment = new InvoicePayments;\n\t\t\t\t$invoicePayment->amount = $request->amount;\n\t\t\t\t$invoicePayment->payment_date = date(\"Y-m-d\", strtotime($request->payment_date));\n\t\t\t\t$invoicePayment->payment_mode_id = $request->payment_mode;\n\t\t\t\t$invoicePayment->payment_mode_name = $request->payment_mode_name;\n\t\t\t\t$invoicePayment->transaction_id = $request->transaction_id;\n\t\t\t\t$invoicePayment->note = $request->note;\n\t\t\t\t$invoicePayment->do_not_send_invoice = $do_not_send_invoice;\n\t\t\t\t$invoicePayment->invoice_id = $request->invoice_id;\n\t\t\t\t$invoicePayment->company_id = auth()->user()->company->id;\n\t\t\t\t$invoicePayment->user_id = auth()->user()->id;\n\t\t\t\t$invoicePayment->save();\n\t\t\t\t\n\t\t\t\treturn redirect($page);\n\t\t\t} else {\n\t\t\t\treturn redirect($page)->withStatus(__('No Access'));\n\t\t\t}\n\t\t} else {\n\t\t\treturn redirect()->route('login');\n\t\t}\n\t}", "title": "" }, { "docid": "cb86ea529f672e0b3b437d73609bda7b", "score": "0.50662196", "text": "protected function newOfficeTransactionDetailsRequest()\n {\n\n $resourcePath = '/officetransactions/template';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\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 // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('fineract-platform-tenantid');\n if ($apiKey !== null) {\n $headers['fineract-platform-tenantid'] = $apiKey;\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": "0ae9dbb4fcf15802759cba085ca12e11", "score": "0.50314146", "text": "public function update(Request $request, Wallet $invoice)\n {\n //\n }", "title": "" }, { "docid": "6c7a84dcde61adef5c33283b5a70e6ac", "score": "0.5028494", "text": "protected function createTransactionRequestRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling createTransactionRequest'\n );\n }\n\n $resourcePath = '/interoperation/requests';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // 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 // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('fineract-platform-tenantid');\n if ($apiKey !== null) {\n $headers['fineract-platform-tenantid'] = $apiKey;\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": "8161024ad30979654449b0a04657c3d6", "score": "0.50026923", "text": "public function add_supply_invoice()\r\n {\r\n // DEFINES LOAD CRUDS_MODEL FORM MODELS FOLDERS\r\n $this->load->model('Crud_model');\r\n $this->load->model('Transaction_model');\r\n $salesman_id = html_escape($this->input->post('salesman_id'));\r\n $store_id = html_escape($this->input->post('store_id'));\r\n $driver_id = html_escape($this->input->post('driver_id'));\r\n $vehicle_id = html_escape($this->input->post('vehicle_id'));\r\n $region_id = html_escape($this->input->post('region_id'));\r\n $customer_id = html_escape($this->input->post('customer_id'));\r\n $payment_method = html_escape($this->input->post('payment_method'));\r\n $cash_recieved = html_escape($this->input->post('cash_recieved'));\r\n $total_bill = html_escape($this->input->post('total_bill'));\r\n $bill_cost = html_escape($this->input->post('bill_cost'));\r\n $supply_description = html_escape($this->input->post('supply_description'));\r\n $bank_id = html_escape($this->input->post('bank_id'));\r\n $ref_no = html_escape($this->input->post('ref_no'));\r\n $save_available_balance = html_escape($this->input->post('save_available_balance'));\r\n\r\n //SOURCE ID 1 FOR SUPPLY\r\n $source = html_escape($this->input->post('source'));\r\n $discountfield = html_escape($this->input->post('discountfield'));\r\n $user_name = $this->session->userdata('user_id');\r\n $date = date('Y-m-d');\r\n $status = 0;\r\n\r\n $data = array(\r\n 'discount' => $discountfield, \r\n 'date' => $date, \r\n 'status' => $status, \r\n 'agentname' => $user_name['name'], \r\n 'driver_id' => $driver_id, \r\n 'salesman_id' => $salesman_id, \r\n 'store_id' => $store_id, \r\n 'vehicle_id' => $vehicle_id, \r\n 'region_id' => $region_id, \r\n 'payment_method' => $payment_method, \r\n 'total_bill' => $total_bill, \r\n 'net_cost' => $bill_cost,\r\n 'bill_paid' => $cash_recieved, \r\n 'description' => $supply_description, \r\n 'source' => $source, \r\n 'cus_id' => $customer_id,\r\n 'bank_id' => $bank_id,\r\n 'credithead' => ($payment_method == 0 ? '2' : '16'),\r\n 'ref_no' => $ref_no\r\n );\r\n\r\n $temp_data = $this->Crud_model->fetch_userid_source('mp_temp_barcoder_invoice','supply',$user_name['id']);\r\n \r\n if($temp_data != NULL)\r\n {\r\n $result_status = $this->Transaction_model->single_supply_transaction($data);\r\n\r\n\r\n if ($result_status != NULL)\r\n {\r\n\r\n $array_msg = array(\r\n 'msg' => '<i style=\"color:#fff\" class=\"fa fa-check-circle-o\" aria-hidden=\"true\"></i> Created successfully',\r\n 'alert' => 'info'\r\n );\r\n $this->session->set_flashdata('status', $array_msg);\r\n\r\n }\r\n else\r\n {\r\n $array_msg = array(\r\n 'msg' => '<i style=\"color:#c00\" class=\"fa fa-exclamation-triangle\" aria-hidden=\"true\"></i> Error cannot be added',\r\n 'alert' => 'danger'\r\n );\r\n $this->session->set_flashdata('status', $array_msg);\r\n }\r\n } \r\n else\r\n {\r\n $array_msg = array(\r\n 'msg' => '<i style=\"color:#c00\" class=\"fa fa-exclamation-triangle\" aria-hidden=\"true\"></i> Sorry no item seleted',\r\n 'alert' => 'danger'\r\n );\r\n $this->session->set_flashdata('status', $array_msg);\r\n } \r\n\r\n redirect('supply/create_new_supply');\r\n }", "title": "" }, { "docid": "ee57f16f7dcaf55c5cf39f42bd3ba2ac", "score": "0.49920887", "text": "public function store(Request $request)\n {\n //\n $invoice = new Invoice;\n $invoice->number = $request->number;\n $invoice->name = $request->name;\n $invoice->address = $request->address;\n $invoice->address2 = $request->address2;\n $invoice->city = $request->city;\n $invoice->zipcode = $request->zipcode;\n $invoice->country = $request->country;\n $invoice->total = $request->total;\n $invoice->vat = $request->vat;\n $invoice->save();\n\n return \"OK\";\n }", "title": "" }, { "docid": "fb9de2f21834749ef922c2d8166c5d37", "score": "0.49913502", "text": "protected function orderGetTotalNetRequest($id)\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling orderGetTotalNet'\n );\n }\n\n $resourcePath = '/Order/{id}/getTotalNet';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'application/json'],\n ['application/x-www-form-urlencoded']\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 API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('token');\n if ($apiKey !== null) {\n $queryParams['token'] = $apiKey;\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": "8827f4626edb6481495e035adf1f7dca", "score": "0.49859148", "text": "public function testAmount()\n {\n $request = new RefundRequest('', '', '', 4.99);\n\n $this->assertEquals(4.99, $request->getAmount());\n }", "title": "" }, { "docid": "4f0be5779a3dee171d4f91feb9276549", "score": "0.49818498", "text": "protected function voucherDraftsV2PostRequest($body, $amount_includes_vat = null)\n {\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling voucherDraftsV2Post'\n );\n }\n\n $resourcePath = '/v2/voucherdrafts';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($amount_includes_vat !== null) {\n $queryParams['amountIncludesVat'] = ObjectSerializer::toQueryValue($amount_includes_vat, null);\n }\n\n\n // form params\n if ($id !== null) {\n $formParams['Id'] = ObjectSerializer::toFormValue($id);\n }\n // form params\n if ($voucher_date !== null) {\n $formParams['VoucherDate'] = ObjectSerializer::toFormValue($voucher_date);\n }\n // form params\n if ($voucher_text !== null) {\n $formParams['VoucherText'] = ObjectSerializer::toFormValue($voucher_text);\n }\n // form params\n if ($number_series !== null) {\n $formParams['NumberSeries'] = ObjectSerializer::toFormValue($number_series);\n }\n // form params\n if ($created_utc !== null) {\n $formParams['CreatedUtc'] = ObjectSerializer::toFormValue($created_utc);\n }\n // form params\n if ($modified_utc !== null) {\n $formParams['ModifiedUtc'] = ObjectSerializer::toFormValue($modified_utc);\n }\n // form params\n if ($rows !== null) {\n $formParams['Rows'] = ObjectSerializer::toFormValue($rows);\n }\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\n ['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "856112ae08b4f624c53a5eebcc05de79", "score": "0.49725065", "text": "public function getOrderForInvoice(Request $request) \n {\n $order = Order::findOrFail($request->id);\n $order->unformated_order_date = $order->getOriginal('order_date');\n $order->products;\n !empty($order->quantity_type) ? $quantityType = $order->quantity_type : $quantityType = 'packing';\n if(count($order->invoices) > 0){\n $invoice_ids = $order->invoices()->pluck('id')->toArray();\n $invoiced = DB::table('invoice_product')\n ->select('product_id', DB::raw('sum(item_qty) as qty'), DB::raw('sum(item_total) as price') )\n ->whereIn('invoice_id', $invoice_ids)\n ->groupBy('product_id')->get();\n \n foreach($order->products as $item) { \n $invoiced_qty = $invoiced->where('product_id', $item->pivot->product_id)->pluck('qty')->first();\n $invoiced_price = $invoiced->where('product_id', $item->pivot->product_id)->pluck('price')->first();\n $item->pivot->quantity = ($item->pivot->quantity - $invoiced_qty); \n $item->pivot->product_packing = $this->getPacking($item->pivot->product_id, $quantityType, $item->pivot->quantity);\n $item->pivot->item_total = ($item->pivot->item_total - $invoiced_price); \n }\n }\n return response()->json(['order' => $order ]);\n }", "title": "" }, { "docid": "05414f9bcef74fd33c420a32a46cf829", "score": "0.49694708", "text": "public function add($book_id) {\n $user = Auth::user();\n\n $request = new R();\n \n $request->user_id = $user->id;\n $request->book_id = $book_id;\n $request->request_state_id = config('constants.request_states.pendente');\n\n Book::remQuantity($book_id);\n $request->save();\n\n return redirect(\"/book\")->with('sucess', 'Requisição feita');;\n }", "title": "" }, { "docid": "1dc6fa1bd70afcd2c57a36b48205ebb3", "score": "0.49558523", "text": "public function store(Request $request)\n {\n \n if ($purchases= json_decode($request->post('invoice'))) {\n foreach($purchases as $purchase) {\n Invoice::create([\n 'client_id' => $request->post('id'),\n 'description' => $purchase->description,\n 'qty'=> $purchase->qty,\n 'rate'=>$purchase->rate,\n 'amount' => $purchase->rate*$purchase->qty,\n ]);\n }\n return response()->json($purchase); \n }\n return response()->json($request); \n }", "title": "" }, { "docid": "422a19fa525e9eb647c884affe7ef1a6", "score": "0.49507362", "text": "public function store(Request $request)\n {\n\n $invoice = Order::findOrFail(request()->invoice_id);\n $rules =[\n 'product_id' => 'required|exists:products,id|unique:order_details,product_id,NULL,id,order_id,'.request()->invoice_id,\n 'lot' => 'required|numeric|integer|min:1',\n 'price' => 'required|numeric|min:0',\n 'offer_price' => 'required|numeric|min:0'\n ];\n\n $this->validate(request(), $rules);\n $data = array_add(request()->all(), 'order_id', request()->invoice_id);\n $data = array_add($data, 'sale_price', request()->get('price'));\n $data = array_add($data, 'offer_price', request()->get('offer_price'));\n $data = array_add($data, 'purchase_price', request()->get('price'));\n $data = array_add($data, 'total_offer_purchase', request()->get('offer_price') * request()->lot);\n\n\n DB::beginTransaction();\n $lot = $request->lot;\n $new_detail = OrderDetail::create($data);\n while ($lot > 0) {\n $inventory = Stock::select('stocks.id')\n ->leftJoin('order_details', 'order_details.id', '=', 'stocks.order_detail_id' )\n ->leftJoin('products', 'products.id', '=', 'order_details.product_id' )\n ->where('products.id', request()->product_id)\n ->where('status', true)\n ->first();\n $lot = $this->updateStock($inventory->id, $lot, $new_detail);\n }\n $invoice->sumTotals();\n $invoice->sumOfferTotals();\n $invoice->setFinalTotal();\n $invoice->save();\n DB::commit();\n\n return new InvoiceResource($invoice->load('details', 'gift_cards', 'bill', 'cash_register'));\n }", "title": "" }, { "docid": "fa83c523eca0e8118a719a777a281b02", "score": "0.4945117", "text": "public function getReceiptsMonthlyTotalsRequest($company_id, $type, $year, string $contentType = self::contentTypes['getReceiptsMonthlyTotals'][0])\n {\n\n // verify the required parameter 'company_id' is set\n if ($company_id === null || (is_array($company_id) && count($company_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $company_id when calling getReceiptsMonthlyTotals'\n );\n }\n\n // verify the required parameter 'type' is set\n if ($type === null || (is_array($type) && count($type) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $type when calling getReceiptsMonthlyTotals'\n );\n }\n\n // verify the required parameter 'year' is set\n if ($year === null || (is_array($year) && count($year) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $year when calling getReceiptsMonthlyTotals'\n );\n }\n\n\n $resourcePath = '/c/{company_id}/receipts/monthly_totals';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $type,\n 'type', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n true // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $year,\n 'year', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n true // required\n ) ?? []);\n\n\n // path params\n if ($company_id !== null) {\n $resourcePath = str_replace(\n '{' . 'company_id' . '}',\n ObjectSerializer::toPathValue($company_id),\n $resourcePath\n );\n }\n\n\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', ],\n $contentType,\n $multipart\n );\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the form parameters\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if (!empty($this->config->getAccessToken())) {\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 $operationHost = $this->config->getHost();\n $query = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'GET',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "108cb8daded96d5c6d19c9361a1b263e", "score": "0.49382412", "text": "protected function orderGetTotalCalcRequest($id)\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling orderGetTotalCalc'\n );\n }\n\n $resourcePath = '/Order/{id}/getTotalCalc';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'application/json'],\n ['application/x-www-form-urlencoded']\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 API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('token');\n if ($apiKey !== null) {\n $queryParams['token'] = $apiKey;\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": "c66fe2a5a5bbf7cb197f319a0f00fa4d", "score": "0.49374554", "text": "public function store(Request $request)\n {\n $data = $request->all();\n $validator = Validator::make($data, [\n 'bill_no' => 'required|unique:invoice,bill_no',\n 'delivery_date' => 'required',\n 'total' => 'required'\n ]);\n\n if ($validator->fails()) {\n return response()->json(['errors' => $validator->errors()->all()],422);\n }\n\n $data['status_id'] = 1;\n $data['bill_total'] = $data['total'];\n\n DB::beginTransaction();\n\n try {\n $invoice = Invoice::create([\n \"bill_no\" => $data['bill_no'],\n \"customer_name\" => $data['customer_name'],\n \"contact\" => $data['contact'],\n \"status_id\" => 1,\n \"notes\" => $data['note'],\n \"bill_total\" => $data['total'],\n \"full_payment_date\" => $data['total'] == $data['advance'] ? Carbon::now() : null,\n \"delivery_date\" => $data['delivery_date']\n ]);\n if ($data['advance']>0) {\n InvoicePayment::create([\n 'invoice_id'=>$invoice->id,\n 'payment_amount'=>$data['advance']\n ]);\n }\n DB::commit();\n } catch (\\Exception $e) {\n dd($e);\n DB::rollback();\n }\n return response()->json([\n 'msg' => 'Invoice #'.$data['bill_no'].' saved successfully'\n ],201);\n }", "title": "" }, { "docid": "d185f74411a20c2255ac030bd9667292", "score": "0.4932867", "text": "public function createPaymentRequest(Payable $payable): PaymentRequest\n {\n }", "title": "" }, { "docid": "13a34e82c7ae311eecf0d35f657ad1c9", "score": "0.49296892", "text": "protected function orderGetTotalRequest($id, $foreign_currency = 'false')\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling orderGetTotal'\n );\n }\n\n $resourcePath = '/Order/{id}/getTotal';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($foreign_currency !== null) {\n $queryParams['foreignCurrency'] = ObjectSerializer::toQueryValue($foreign_currency);\n }\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'application/json'],\n ['application/x-www-form-urlencoded']\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 API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('token');\n if ($apiKey !== null) {\n $queryParams['token'] = $apiKey;\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": "4e3804dd0e4e0aac616678f681e3ad17", "score": "0.49289438", "text": "protected function retrieveOfficeTransactionsRequest()\n {\n\n $resourcePath = '/officetransactions';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\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 // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('fineract-platform-tenantid');\n if ($apiKey !== null) {\n $headers['fineract-platform-tenantid'] = $apiKey;\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": "1f062fc016f19dd13c03b9e9dc4ba6c4", "score": "0.49179366", "text": "protected function invoiceGetDebitRequest($id)\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling invoiceGetDebit'\n );\n }\n\n $resourcePath = '/Invoice/{id}/getDebit';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'application/json'],\n ['application/x-www-form-urlencoded']\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 API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('token');\n if ($apiKey !== null) {\n $queryParams['token'] = $apiKey;\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": "8e7dbc3fdd61455440d03542a9009aa8", "score": "0.49133474", "text": "public function transaction_request ($from, $to, $amount) {\n\t\tif (VehicleController::validate_authorization($to)) { // if authorized\n\t\t\t$customer = CustomerClient::find($from);\n//\t\t\tdd($customer->credit);\n\t\t\tif ((($amount > 0) && $customer && ($customer->credit >= $amount))) {\n\t\t\t\t// create new transaction object\n\t\t\t\t$transaction = new VehicleCustomerTransaction();\n\t\t\t\t$transaction->amount_nis = $amount;\n\t\t\t\t$transaction->vehicle_client_id = $to;\n\t\t\t\t$transaction->customer_client_id = $from;\n\n\t\t\t\t// apply the transaction between customer and vehicle\n\t\t\t\tVehicleController::deposit_money($to, $amount);\n\t\t\t\tCustomerController::withdraw_money($from, $amount);\n\t\t\t\t// save the transaction\n\t\t\t\t$transaction->save();\n\n\t\t\t\treturn response()->json([\n\t\t\t\t\t'_status' => 200,\n\t\t\t\t\t'_description' => 'success'\n\t\t\t\t]);\n\t\t\t}\n\n\t\t\treturn response()->json([\n\t\t\t\t'_status' => 403,\n\t\t\t\t'_description' => ($customer) ? ('not enough cash') : ('invalid card')\n\t\t\t]);\n\t\t}\n\n\t\treturn response()->json([\n\t\t\t'_status' => 403,\n\t\t\t'_description' => 'compromised car'\n\t\t]);\n\t}", "title": "" }, { "docid": "e18949998ca3b49fb7f1f1bcc08ba1e2", "score": "0.4904979", "text": "protected function getNextInvoiceNumberRequest($invoice_type, $use_next_number)\n {\n // verify the required parameter 'invoice_type' is set\n if ($invoice_type === null || (is_array($invoice_type) && count($invoice_type) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $invoice_type when calling getNextInvoiceNumber'\n );\n }\n // verify the required parameter 'use_next_number' is set\n if ($use_next_number === null || (is_array($use_next_number) && count($use_next_number) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $use_next_number when calling getNextInvoiceNumber'\n );\n }\n\n $resourcePath = '/Invoice/Factory/getNextInvoiceNumber';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($invoice_type !== null) {\n $queryParams['invoiceType'] = ObjectSerializer::toQueryValue($invoice_type);\n }\n // query params\n if ($use_next_number !== null) {\n $queryParams['useNextNumber'] = ObjectSerializer::toQueryValue($use_next_number);\n }\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'application/json'],\n ['application/application/x-www-form-urlencoded']\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 API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('token');\n if ($apiKey !== null) {\n $queryParams['token'] = $apiKey;\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": "195ad1b405de07511931d5f813916f93", "score": "0.48999906", "text": "public function getMyFeesEstimate($request);", "title": "" }, { "docid": "8177398d598610ab4cc1daa4bc9af909", "score": "0.48929542", "text": "public function getInvoice();", "title": "" }, { "docid": "167cb66686e9265e8ca41a291fa384f4", "score": "0.48906544", "text": "protected function getUserPendingInvitationsRequest($offset = '0', $limit = '25')\n {\n\n $resourcePath = '/api/v1/envelope/invitations';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($offset !== null) {\n $queryParams['offset'] = ObjectSerializer::toQueryValue($offset, 'int32');\n }\n // query params\n if ($limit !== null) {\n $queryParams['limit'] = ObjectSerializer::toQueryValue($limit, 'int32');\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 Bearer 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": "0e9b523fbedb3c92a0b35cf4018c11c7", "score": "0.48904487", "text": "public function postInvoice() {\n\t\t$id = request('id');\n\t\tif (!empty($id)) {\n\t\t\t// updates existing invoice\n\t\t\treturn $this->update($id);\n\t\t} else {\n\t\t\t// creates new invoice\n\t\t\treturn $this->store();\n\t\t}\n\n\t}", "title": "" }, { "docid": "7670f002bdd8e773111296a8bf28c64b", "score": "0.4872321", "text": "public function store(Request $request)\n {\n $data = new Invoice();\n\n $data->fill($request->all());\n $data['totalAmount'] = $data['price']*$data['quantity'];\n $data->save();\n return redirect('invoice');\n }", "title": "" }, { "docid": "12f76351c5f43cdb7fa8e20c85bcc648", "score": "0.48707518", "text": "public function addBook(Request $request) {\n try {\n $validator = Validator::make($request->all(), [\n 'name' => 'required|string',\n 'isbn' => 'required|string|max:20',\n 'authors' => 'required',\n 'number_of_pages' => 'required|integer|min:1',\n 'publisher' => 'required|string',\n 'country' => 'required|string',\n 'release_date' => 'required|date_format:Y-m-d',\n ]);\n if ($validator->fails()) {\n return $this->responseJson(200, \"error\", null, $validator->messages());\n }\n $book = Book::create($request->all());\n return $this->responseJson(201, \"success\", $book);\n\n } catch (\\Exception $ex) {\n return $this->responseJson(500, \"error\", null, \"Server error\");\n }\n }", "title": "" }, { "docid": "4b4ce5384feddf7b60f7be1d01dc91c0", "score": "0.48673117", "text": "function add_amount($request,$txn_status)\n {\n $data = array('user_id' =>$request['user_id'],\n 'amount'=>$request['amount'],\n 'transection_via'=>$request['mode'],\n 'type' => 'credit',\n 'transection_detail' =>json_encode($request['transection_detail']),\n 'transaction_status'=>$txn_status,\n 'transection_mode'=>\"deposit by self\",\n 'created_date'=> date('Y-m-d H:i:s'),\n );\n\n $insert = $this->db->insert('transection',$data);\n $id = $this->db->insert_id();\n if($insert)\n {\n $this->db->select('transaction_status');\n $this->db->where('id',$id);\n return $this->db->get('transection')->row();\n } \n else\n {\n return false;\n } \n }", "title": "" }, { "docid": "3bb28212d894e8e7cce2dec7f6985d9a", "score": "0.4864611", "text": "public function make_invoice()\n\t{\n\t\t$this->load->model('order_model');\n\t\t//then actually make/create invoice from order_id and return Invoice number\n\t\t$order_id = $this->input->post('order_id');\n\t\t$invNo = $this->order_model->make_invoice();\n\t\t$oinfo= $this->order_model->get_invoices($invNo);\n\t\t$items= $this->order_model->get_invoice_items($invNo);\n\n\t\t$pdf = new PDF('P','mm',array(230,280));\n\t\t$pdf->setLeftMargin(30);\n\t\t$pdf->setRows($oinfo);\n\t\t$pdf->AddPage();\n\t\t$pdf->InvoiceTable($items);\n\t\t$pdf->Output('F','e:/Documents/Carryon/OnSysOrders/I-'.$invNo.'.pdf');\t// return ($invNo);\n\t\techo json_encode($invNo);\n\t\t// return $this->crud_sales_order(\"Edit\", $order_id);\n\t\t// Cell(float w [, float h [, string txt [, mixed border [, int ln [, string align [, boolean fill [, mixed link]]]]]]])\n\t\t// $pdf = new PDF('P','mm','A4');\n\t\t// $pdf->setRows($oinfo);\n\t\t// $pdf->AddPage();\n\t\t// $pdf->SetFont('Arial','B',16);\n\t\t// $pdf->Cell(40,10,'Hello World!');\n\t\t// //$pdf->FancyTable($items);\n\t\t// //$pdf->Output();\n\t\t// $pdf->Output();\n\t}", "title": "" }, { "docid": "2011c5a05e4e16995d40e3c2b48c5ed6", "score": "0.48540348", "text": "public function updateInvoiceOrder()\n {\n $this->orderType = ConfigurationProvider::INVOICE_TYPE;\n\n return new UpdateOrderRequest($this);\n }", "title": "" }, { "docid": "2165d8e315e84754167222fd74f7b763", "score": "0.48519665", "text": "public function fetchQuantity(Request $request)\n {\n\n $month = $request->input('month');\n\n $now = Carbon::now();\n $year = $now->year;\n $transaction = Transaksi::with(['collection'])\n ->whereMonth('created_at', '=' , $month)\n ->whereYear('created_at', '=', $year)\n ->where('status','DONE')\n ->sum('quantity');\n\n return ResponseFormatter::success($transaction,'File successfully');\n }", "title": "" }, { "docid": "a8232f16119709007085ab90123fd237", "score": "0.48348293", "text": "public function build(): PublishInvoiceRequest\n {\n return CoreHelper::clone($this->instance);\n }", "title": "" }, { "docid": "b06d0ce1cb2522031cabae987d6f218e", "score": "0.48178437", "text": "public function getAmount();", "title": "" }, { "docid": "b06d0ce1cb2522031cabae987d6f218e", "score": "0.48178437", "text": "public function getAmount();", "title": "" }, { "docid": "b06d0ce1cb2522031cabae987d6f218e", "score": "0.48178437", "text": "public function getAmount();", "title": "" }, { "docid": "b06d0ce1cb2522031cabae987d6f218e", "score": "0.48178437", "text": "public function getAmount();", "title": "" }, { "docid": "b06d0ce1cb2522031cabae987d6f218e", "score": "0.48178437", "text": "public function getAmount();", "title": "" }, { "docid": "b06d0ce1cb2522031cabae987d6f218e", "score": "0.48178437", "text": "public function getAmount();", "title": "" }, { "docid": "b06d0ce1cb2522031cabae987d6f218e", "score": "0.48178437", "text": "public function getAmount();", "title": "" }, { "docid": "d4ad641c7ea00c926b60101c33e8af6a", "score": "0.48147458", "text": "protected function addBusinessTransactionRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling addBusinessTransaction'\n );\n }\n\n $resourcePath = '/beta/businessTransaction';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('API-Key');\n if ($apiKey !== null) {\n $headers['API-Key'] = $apiKey;\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": "24bed5ca642c437abf76d3222387052b", "score": "0.48143026", "text": "protected function createEnvelopeRequest($body, $mailbox)\n {\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling createEnvelope'\n );\n }\n // verify the required parameter 'mailbox' is set\n if ($mailbox === null || (is_array($mailbox) && count($mailbox) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $mailbox when calling createEnvelope'\n );\n }\n\n $resourcePath = '/api/v1/envelope';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // header params\n if ($mailbox !== null) {\n $headerParams['Mailbox'] = ObjectSerializer::toHeaderValue($mailbox);\n }\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // // this endpoint requires Bearer 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": "8f3208bc77661d68096f00581b497f31", "score": "0.48085102", "text": "protected function userGetCommissionRequest()\n {\n\n $resourcePath = '/user/commission';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'],\n ['application/json', 'application/x-www-form-urlencoded']\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 API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('api-key');\n if ($apiKey !== null) {\n $headers['api-key'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('api-nonce');\n if ($apiKey !== null) {\n $headers['api-nonce'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('api-signature');\n if ($apiKey !== null) {\n $headers['api-signature'] = $apiKey;\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": "9baf278bb6897edb108adbd12934c158", "score": "0.48079175", "text": "private function create(){\n $total_quantity = 0;\n $voucher = generate_invoice(\"purchase_return\",array());\n foreach ($_POST['product'] as $key => $value) {\n $total_quantity += $_POST['quantity'][$key];\n\n $data = array();\n $data['date'] = $this->input->post('date');\n $data['voucher_no'] = $voucher;\n $data['party_code'] = $this->input->post('party_code');\n $data['product_code'] = $_POST['product_code'][$key];\n $data['purchase_price'] = $_POST['purchase_price'][$key];\n $data['quantity'] = $_POST['quantity'][$key];\n $data['unit'] = $_POST['unit'][$key];\n $data['previous_balance'] = $_POST['previous_balance'];\n $data['grand_total'] = $_POST['grand_total'];\n $data['current_balance'] = $_POST['current_balance'];\n $data['status'] = 'purchase return';\n\n if($this->action->add('purchase_return', $data)){\n $this->handelStock($key);\n }\n }\n \n $this->handelPartyTransaction();\n\n $options = array(\n 'title' => 'success',\n 'emit' => 'Purchase Return successfully Completed!',\n 'btn' => true\n );\n $status = 'success';\n return message($status, $options);\n }", "title": "" }, { "docid": "80b932e587916f40f70362d7ff94b373", "score": "0.4805996", "text": "public function create(array $input)\n {\n $extra_discount = numberClean($input['invoice']['after_disc']);\n $input['invoice']['invoicedate'] = date_for_database($input['invoice']['invoicedate']);\n $input['invoice']['subtotal'] = numberClean($input['invoice']['subtotal']);\n $input['invoice']['shipping'] = numberClean($input['invoice']['shipping']);\n $input['invoice']['discount_rate'] = numberClean($input['invoice']['discount_rate']);\n $input['invoice']['after_disc'] = numberClean($input['invoice']['after_disc']);\n $input['invoice']['total'] = numberClean($input['invoice']['total']);\n $input['invoice']['ship_tax_rate'] = numberClean($input['invoice']['ship_rate']);\n $input['invoice']['ship_tax'] = numberClean($input['invoice']['ship_tax']);\n $input['invoice']['extra_discount'] = $extra_discount;\n\n $total_discount = $extra_discount;\n if ($input['invoice']['sub']) {\n $input['invoice']['i_class'] = 2;\n $input['invoice']['r_time'] = $input['invoice']['recur_after'];\n $input['invoice']['invoiceduedate'] = date(\"Y-m-d\", strtotime($input['invoice']['invoicedate'] . \" +\" . $input['invoice']['r_time'] . 's'));\n unset($input['invoice']['recur_after']);\n } else {\n $input['invoice']['invoiceduedate'] = date_for_database($input['invoice']['invoiceduedate']);\n }\n $sales_channel = @$input['invoice']['sales_channel'];\n $p = @$input['invoice']['p'];\n unset($input['invoice']['after_disc']);\n unset($input['invoice']['ship_rate']);\n unset($input['invoice']['sub']);\n unset($input['invoice']['p']);\n unset($input['invoice']['sales_channel']);\n\n if (!isset($input['invoice_items']['product_id'])) {\n return false;\n }\n\n\n DB::beginTransaction();\n $status=feature(10)['value2'];\n\n $input['invoice'] = array_map('strip_tags', $input['invoice']);\n if($status)$input['invoice']['status']=$status;\n $result = Invoice::create($input['invoice']);\n if ($result) {\n $products = array();\n $subtotal = 0;\n $total_qty = 0;\n $total_tax = 0;\n $stock_update = array();\n $serial_track = array();\n foreach ($input['invoice_items']['product_id'] as $key => $value) {\n\n $subtotal += numberClean(@$input['invoice_items']['product_price'][$key]) * numberClean(@$input['invoice_items']['product_qty'][$key]);\n $total_qty += numberClean(@$input['invoice_items']['product_qty'][$key]);\n $total_tax += numberClean(@$input['invoice_items']['total_tax'][$key]);\n $total_discount += numberClean(@$input['invoice_items']['total_discount'][$key]);\n if ($input['invoice_items']['serial'][$key]) $serial_track[] = array('rel_type' => 2, 'rel_id' => 1, 'ref_id' => $input['invoice_items']['product_id'][$key], 'value' => strip_tags($input['invoice_items']['serial'][$key]), 'value2' => $result->id);\n if ($input['invoice_items']['unit_m'][$key] > 1) {\n $unit_val = $input['invoice_items']['unit_m'][$key];\n $qty = $unit_val * numberClean($input['invoice_items']['product_qty'][$key]);\n } else {\n $unit_val = 1;\n $qty = numberClean($input['invoice_items']['product_qty'][$key]);\n }\n $products[] = array('invoice_id' => $result->id,\n 'product_id' => $input['invoice_items']['product_id'][$key],\n 'product_name' => strip_tags(@$input['invoice_items']['product_name'][$key]),\n 'code' => @$input['invoice_items']['code'][$key],\n 'product_qty' => numberClean(@$input['invoice_items']['product_qty'][$key]),\n 'product_price' => numberClean(@$input['invoice_items']['product_price'][$key]),\n 'product_tax' => numberClean(@$input['invoice_items']['product_tax'][$key]),\n 'product_discount' => numberClean(@$input['invoice_items']['product_discount'][$key]),\n 'product_subtotal' => numberClean(@$input['invoice_items']['product_subtotal'][$key]),\n 'total_tax' => numberClean(@$input['invoice_items']['total_tax'][$key]),\n 'total_discount' => numberClean(@$input['invoice_items']['total_discount'][$key]),\n 'product_des' => strip_tags(@$input['invoice_items']['product_description'][$key], config('general.allowed')),\n 'unit_value' => $unit_val,\n 'serial' => @$input['invoice_items']['serial'][$key],\n 'i_class' => 0,\n 'unit' => $input['invoice_items']['unit'][$key], 'ins' => $result->ins);\n $stock_update[] = array('id' => $input['invoice_items']['product_id'][$key], 'qty' => $qty);\n }\n\n InvoiceItem::insert($products);\n $invoice_d = Invoice::find($result->id);\n $invoice_d->subtotal = $subtotal;\n $invoice_d->tax = $total_tax;\n $invoice_d->discount = $total_discount;\n $invoice_d->items = $total_qty;\n $invoice_d->save();\n if (@$result->id) {\n $fields = array();\n if (isset($input['data2']['custom_field'])) {\n foreach ($input['data2']['custom_field'] as $key => $value) {\n $fields[] = array('custom_field_id' => $key, 'rid' => $result->id, 'module' => 2, 'data' => strip_tags($value), 'ins' => $input['data2']['ins']);\n }\n CustomEntry::insert($fields);\n }\n }\n $update_variation = new ProductVariation;\n $index = 'id';\n Batch::update($update_variation, $stock_update, $index, true);\n $update_variation = new ProductMeta;\n $index = 'value';\n $index2 = 'ref_id';\n $out_s = $this->update_dual($update_variation, $serial_track, $index, $index2);\n if ($p > 0) {\n ProjectRelations::create(array('project_id' => $p, 'related' => 7, 'rid' => $result->id));\n $result['p'] = $p;\n }\n\n if($sales_channel){\n ChannelBill::create(array('bill_id'=>$result->id,'c_id'=>$sales_channel,'ref'=>1));\n }\n\n\n\n DB::commit();\n\n\n return $result;\n }\n throw new GeneralException(trans('exceptions.backend.invoices.create_error'));\n }", "title": "" }, { "docid": "bb216fedcf1b897a05653cdc29330dbd", "score": "0.48056525", "text": "protected function createFundRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling createFund'\n );\n }\n\n $resourcePath = '/funds';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // 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 // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('fineract-platform-tenantid');\n if ($apiKey !== null) {\n $headers['fineract-platform-tenantid'] = $apiKey;\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": "691a4c2f7e2635470174a1fdaa697bd0", "score": "0.48046964", "text": "public function invoice(Request $request)\n {\n \t$cart = session()->get('cart');\n \t\tif(!empty($cart))\n \t\t{\n \t\t\tHelper::emptyCart('cart');\n \t\t\t$Purchase_item = Purchase_item::with('item_name.unit')->get();\n \t\t\tif(!empty($Purchase_item))\n \t\t\t{\n \t\t\t\tPurchase_item::query()->truncate();\n \t\t\t}\n \t\t\t$arr = array(\n \t\t\t\t//'invoice_no' => date(\"Ym\").'/'.mt_rand(00000, 99999).'/'.count($cart),\n \t\t\t\t'invoice_no' => $this->generateInvoiceNumber(),\n \t\t\t\t'items' => json_encode($cart)\n \t\t\t);\n \t\t\tforeach ($cart as $value) {\n \t\t\t$data = array(\n \t\t\t\t'invoice_no' => $arr['invoice_no'],\n \t\t\t\t'item_number' => $value['item_number'], \n \t\t\t\t'quantity' => $value['quantity'], \n \t\t\t);\n \t\t\tPurchase::create($data);\n \t\t}\n \t\tPurchase_item::create($arr);\n \t\tpurchase_invoice::create($arr);\n \t\t$purchases = Purchase_item::all();\n \t\treturn view('purchase.invoice',compact('purchases'));\n \t}\n \telse\n \t{\n \t\treturn redirect()->route('purchase.index')->with('alert','First select any items');\n \t}\n }", "title": "" }, { "docid": "acd54dad70aeecd6599ef89ead11f428", "score": "0.4801386", "text": "protected function userMinWithdrawalFeeRequest($currency = 'XBt')\n {\n\n $resourcePath = '/user/minWithdrawalFee';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($currency !== null) {\n $queryParams['currency'] = ObjectSerializer::toQueryValue($currency);\n }\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'],\n ['application/json', 'application/x-www-form-urlencoded']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "8df38de1a53bd3995b5a2ccd83237cc0", "score": "0.47869897", "text": "public function actionCreate()\n\t{\n\t parent::actionCreate();\n\t $this->lookupdata();\n\t $model=new Invoice;\n\t $model->invoiceno='Reference No';\n\t $model->recordstatus=0;\n\t if (Yii::app()->request->isAjaxRequest)\n\t {\n\t\t if ($model->save()) {\n\t\t\techo CJSON::encode(array(\n\t\t\t\t'status'=>'success',\n\t\t\t\t'invoiceid'=>$model->invoiceid,\n\t\t\t\t'divcreate'=>$this->renderPartial('_form', array('model'=>$model,\n\t\t\t\t 'invoicemat'=>$this->invoicemat,\n 'invoicepay'=>$this->invoicepay), true)\n\t\t\t\t));\n\t\t\tYii::app()->end();\n\t\t }\n\t }\n\t}", "title": "" }, { "docid": "b9390f12713b44e70f247348446a427f", "score": "0.47798675", "text": "public function pay($billable, Invoice $invoice);", "title": "" }, { "docid": "9af3d612e017c741aaf9efdd3e986b47", "score": "0.47797114", "text": "public function process(RequestInterface $request, InvoiceInterface $invoice);", "title": "" }, { "docid": "10ac1ff91eb6d4674d70750c80046c29", "score": "0.47794306", "text": "public function create_bkash_payment($invoice, $amount, $order_id = '')\n {\n\n $token = $this->get_bkash_token($order_id);\n\n $app_key = $this->app_key;\n $intent = 'sale';\n $data = [\n 'amount' => $amount,\n 'currency' => 'BDT',\n 'merchantInvoiceNumber' => $invoice,\n 'intent' => $intent,\n ];\n\n $headers = [\n 'Content-Type' => 'application/json',\n 'authorization' => $token,\n 'x-app-key' => $app_key,\n ];\n\n $api_response = $this->create_requrest($this->createURL, $data, $headers);\n\n return $api_response;\n }", "title": "" }, { "docid": "6319a3995e920df6a29c5b33fbf8e1f8", "score": "0.47770947", "text": "public function setAmount($value)\n {\n return $this->setParameter('amount', $value);\n }", "title": "" }, { "docid": "9af0b7a16c653eea8355226bed0d4791", "score": "0.47731537", "text": "public function createReceiptRequest($company_id, $create_receipt_request = null, string $contentType = self::contentTypes['createReceipt'][0])\n {\n\n // verify the required parameter 'company_id' is set\n if ($company_id === null || (is_array($company_id) && count($company_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $company_id when calling createReceipt'\n );\n }\n\n\n\n $resourcePath = '/c/{company_id}/receipts';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($company_id !== null) {\n $resourcePath = str_replace(\n '{' . 'company_id' . '}',\n ObjectSerializer::toPathValue($company_id),\n $resourcePath\n );\n }\n\n\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', ],\n $contentType,\n $multipart\n );\n\n // for model (json/xml)\n if (isset($create_receipt_request)) {\n if (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the body\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($create_receipt_request));\n } else {\n $httpBody = $create_receipt_request;\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 (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the form parameters\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if (!empty($this->config->getAccessToken())) {\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 $operationHost = $this->config->getHost();\n $query = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'POST',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "ff220755a725ea62ac0f050fb349ddab", "score": "0.47700536", "text": "protected function createTaxCompoentRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling createTaxCompoent'\n );\n }\n\n $resourcePath = '/taxes/component';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // 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 // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('fineract-platform-tenantid');\n if ($apiKey !== null) {\n $headers['fineract-platform-tenantid'] = $apiKey;\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": "5915161d96d1eab582737d85cdb26a6a", "score": "0.47655413", "text": "protected function invoiceGetTaxRequest($id, $invoice_amount = 'false')\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling invoiceGetTax'\n );\n }\n\n $resourcePath = '/Invoice/{id}/getTax';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($invoice_amount !== null) {\n $queryParams['invoiceAmount'] = ObjectSerializer::toQueryValue($invoice_amount);\n }\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'application/json'],\n ['application/x-www-form-urlencoded']\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 API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('token');\n if ($apiKey !== null) {\n $queryParams['token'] = $apiKey;\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": "be2346b6ce58f23ca56eb8468ecdc58f", "score": "0.47637376", "text": "protected function createInvoiceReminderRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling createInvoiceReminder'\n );\n }\n\n $resourcePath = '/Invoice/Factory/createInvoiceReminder';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'application/json'],\n ['application/x-www-form-urlencoded']\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 API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('token');\n if ($apiKey !== null) {\n $queryParams['token'] = $apiKey;\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": "8e9d1d8a6b6b628d9619069ffdc5081b", "score": "0.47580436", "text": "public function generateInvoice($borderou){\n // Sanity check\n if(empty($borderou)) throw new \\Exception('Nu ati specificat borderoul');\n\n // Set method and action\n $method = 'commissions';\n $action = 'generateInvoice';\n\n // Set data\n $data = array(\n 'borderou' => $borderou,\n );\n\n // Send request and retrieve response\n $result = Dispatcher::send($method, $action, $data);\n\n return $result;\n }", "title": "" }, { "docid": "2755e3f29b47fcae95d367e519799d51", "score": "0.4754783", "text": "public function amount($value) {\n $this->annotations['amount'] = $value;\n return $this;\n }", "title": "" }, { "docid": "7ccdf9910c09beef6e027bc752386e11", "score": "0.475447", "text": "public function createIPDServiceBill(Request $request)\n {\n $room_type = trim($request->room_type);\n $cabin_type = trim($request->cabin_type);\n $cabin_room = trim($request->cabin_room);\n $ward_no = trim($request->ward_no);\n $ward_bed = trim($request->ward_bed);\n $branch = $this->branch_id ;\n $bill_date = trim($request->bill_date);\n $billDate = date('Y-m-d',strtotime($bill_date)) ;\n $total_amount = trim($request->total_amount);\n $total_discount = trim($request->total_discount);\n $total_paid = trim($request->total_paid);\n\n $array_invoice_data = $request->arr; \n $invoice_datas = json_decode($array_invoice_data);\n $payableAmount = $total_amount - $total_discount ;\n $total_due = $payableAmount - $total_paid ;\n #------------------------ validation-----------------------------#\n if($room_type == \"\"){\n echo 'r1';\n return false ;\n }\n\n if($room_type == '1'){\n if($cabin_type == ''){\n echo 'r2';\n return false ;\n }\n if($cabin_room == ''){\n echo 'r3';\n return false ;\n }\n\n }\n\n if($room_type == '2'){\n if($ward_no == ''){\n echo 'r4';\n return false ;\n }\n if($ward_bed == ''){\n echo 'r5';\n return false ;\n }\n\n }\n\n if($billDate > $this->rcdate){\n echo \"d1\";\n exit();\n }\n\n if($payableAmount < $total_paid){\n // paid amount not big than total amount\n echo \"p2\";\n exit();\n }\n #------------------------ end validation-----------------------------------------#\n #------------------------ get ipd admission info --------------------------------#\n if($room_type == '1'){\n $cabin_book_info = DB::table('tbl_ipd_cabin_bed_history')->where('branch_id',$this->branch_id)->where('cabin_id',$cabin_room)->where('booked_status',0)->first();\n $ipd_admisison_id_is = $cabin_book_info->ipd_admission_id ;\n $ipd_admisison_invoice_is = $cabin_book_info->invoice_number ;\n $patient_id = $cabin_book_info->patient_id ;\n $patient_primary_id_is = $patient_id ;\n\n }elseif($room_type == '2'){\n $ward_book_info = DB::table('tbl_ipd_cabin_bed_history')->where('branch_id',$this->branch_id)->where('ward_bed_id',$ward_bed)->where('booked_status',0)->first();\n $ipd_admisison_id_is = $ward_book_info->ipd_admission_id ;\n $ipd_admisison_invoice_is = $ward_book_info->invoice_number ;\n $patient_id = $ward_book_info->patient_id ;\n $patient_primary_id_is = $patient_id ;\n }\n #----------------------- end ipd admissiin info ---------------------------------#\n #----------------------------------- INSERT INTO CASHBOOK -----------------------#\n if($total_discount > 0){\n $purpose = \"IPD Service Bill Create With Discount\";\n }else{\n $purpose = \"IPD Service Bill Create\";\n } \n // status = 14\n // tr status = 1 by cash transaction\n $data_cashbook = array();\n $data_cashbook['overall_branch_id'] = $this->branch_id ;\n $data_cashbook['branch_id'] = $this->branch_id ;\n $data_cashbook['admin_id'] = $this->loged_id ;\n $data_cashbook['admin_type'] = 3 ;\n $data_cashbook['earn'] = $total_paid + $total_discount ;\n $data_cashbook['cost'] = $total_discount ;\n $data_cashbook['profit_earn'] = $total_paid + $total_discount ;\n $data_cashbook['profit_cost'] = $total_discount ;\n $data_cashbook['status'] = 14 ;\n $data_cashbook['tr_status'] = 1 ;\n $data_cashbook['purpose'] = $purpose;\n $data_cashbook['added_id'] = $this->loged_id;\n $data_cashbook['created_time'] = $this->current_time;\n $data_cashbook['created_at'] = $billDate;\n $data_cashbook['on_created_at'] = $this->rcdate;\n DB::table('cashbook')->insert($data_cashbook);\n #---------------------------------- END INSERT INTO CASHBOOK --------------------#\n #--------------------- GET LAST CASH BOOK ID -----------------------------------#\n $last_cashbook_id_query = DB::table('cashbook')->orderBy('id','desc')->limit(1)->first();\n $last_cashbook_id = $last_cashbook_id_query->id ; \n #-------------------- GET LAST CASH BOOK ID --------------------------------------#\n #--------------------- GET LAST CASH BOOK ID -----------------------------------#\n $last_cashbook_id_query = DB::table('cashbook')->orderBy('id','desc')->limit(1)->first();\n $last_cashbook_id = $last_cashbook_id_query->id ; \n #-------------------- GET LAST CASH BOOK ID --------------------------------------#\n #------------------- GET INVOICE NUMBER-------------------------------------------#\n // branch wise invoice\n $branch_invoice_count = DB::table('tbl_ipd_service_bill')->where('branch_id',$branch)->orderBy('invoice','desc')->count();\n if($branch_invoice_count == '0'){\n $branch_invoice_number = 1 ;\n }else{\n $branch_invoice_query = DB::table('tbl_ipd_service_bill')->where('branch_id',$branch)->orderBy('invoice','desc')->limit(1)->first();\n $branch_invoice_number = $branch_invoice_query->invoice + 1 ;\n }\n #-------------------- get year invoice------------------------------------#\n $branch_year_invoice_count = DB::table('tbl_ipd_service_bill')->where('year',$this->current_year)->where('branch_id',$branch)->orderBy('year_invoice','desc')->count();\n if($branch_year_invoice_count == '0'){\n $branch_invoice_year_number = 1 ;\n }else{\n $branch_year_invoice_query = DB::table('tbl_ipd_service_bill')->where('year',$this->current_year)->where('branch_id',$branch)->orderBy('year_invoice','desc')->limit(1)->first();\n $branch_invoice_year_number = $branch_year_invoice_query->year_invoice + 1 ;\n }\n #--------------------- daily invoice -------------------------------------#\n $branch_daily_invoice_count = DB::table('tbl_ipd_service_bill')->where('bill_date',$this->rcdate)->where('branch_id',$branch)->orderBy('daily_invoice','desc')->count();\n if($branch_daily_invoice_count == '0'){\n $branch_daily_invoice_number = 1 ;\n }else{\n $branch_daily_invoice_query = DB::table('tbl_ipd_service_bill')->where('bill_date',$this->rcdate)->where('branch_id',$branch)->orderBy('daily_invoice','desc')->limit(1)->first();\n $branch_daily_invoice_number = $branch_daily_invoice_query->daily_invoice + 1 ;\n }\n #------------------ END GET INVIOCE NUMBER ----------------------------------#\n #---------------------------- INSERT INTO PATHOLOGY BILL TABLE---------------#\n $data_pathology_bill_insert = array();\n $data_pathology_bill_insert['cashbook_id'] = $last_cashbook_id ;\n $data_pathology_bill_insert['ipd_admission_id'] = $ipd_admisison_id_is ;\n $data_pathology_bill_insert['ipd_invoice_no'] = $ipd_admisison_invoice_is ;\n $data_pathology_bill_insert['year'] = $this->current_year;\n $data_pathology_bill_insert['invoice'] = $branch_invoice_number;\n $data_pathology_bill_insert['year_invoice'] = $branch_invoice_year_number;\n $data_pathology_bill_insert['daily_invoice'] = $branch_daily_invoice_number ;\n $data_pathology_bill_insert['branch_id'] = $branch ;;\n $data_pathology_bill_insert['patient_id'] = $patient_primary_id_is;\n $data_pathology_bill_insert['purpose'] = 'IPD Service Bill Create'; \n $data_pathology_bill_insert['bill_time'] = $this->current_time ;\n $data_pathology_bill_insert['bill_date'] = $billDate ;\n $data_pathology_bill_insert['added_id'] = $this->loged_id;\n $data_pathology_bill_insert['created_at'] = $this->rcdate ;\n DB::table('tbl_ipd_service_bill')->insert($data_pathology_bill_insert);\n #--------------------------- END INSERT INTO PATHYOLOGY BILL TABLE-------------#\n #------------------------ get last id of pathology bill-----------------------#\n $last_ipd_id_query = DB::table('tbl_ipd_service_bill')->orderBy('id','desc')->limit(1)->first();\n $last_ipd_id = $last_ipd_id_query->id ; \n #------------------------ end get last id of patylogy bill --------------------#\n #--------- CREATE THE BILL ITEAM (INSERT IPD PATHLOGY BILL ITEAM TABEL)------#\n foreach ($invoice_datas as $product_info) {\n $test_id = $product_info[0]; \n $sale_price = $product_info[3];\n $sub_quantity = $product_info[1];\n $sub_total_price = $product_info[4];\n\n $data_pathology_bill_item_insert = array();\n $data_pathology_bill_item_insert['cashbook_id'] = $last_cashbook_id ;\n $data_pathology_bill_item_insert['ipd_admission_id'] = $ipd_admisison_id_is ;\n $data_pathology_bill_item_insert['ipd_invoice_no'] = $ipd_admisison_invoice_is ;\n $data_pathology_bill_item_insert['invoice_number'] = $branch_invoice_number;\n $data_pathology_bill_item_insert['year_invoice_number'] = $branch_invoice_year_number;\n $data_pathology_bill_item_insert['daily_invoice_number'] = $branch_daily_invoice_number;\n $data_pathology_bill_item_insert['branch_id'] = $branch;\n $data_pathology_bill_item_insert['service_id'] = $test_id ;\n $data_pathology_bill_item_insert['service_price'] = $sale_price;\n $data_pathology_bill_item_insert['total_quantity'] = $sub_quantity;\n $data_pathology_bill_item_insert['total_price'] = $sub_total_price ;\n $data_pathology_bill_item_insert['bill_date'] = $billDate ;\n $data_pathology_bill_item_insert['added_id'] = $this->loged_id;\n $data_pathology_bill_item_insert['created_time'] = $this->current_time ;\n $data_pathology_bill_item_insert['created_at'] = $this->rcdate;\n DB::table('tbl_ipd_service_bill_item')->insert($data_pathology_bill_item_insert);\n }\n #------------------------- Insert into ipd ledger--------------------------------------#\n // service type = 3 (ipd service bill)\n $data_ipd_ledger = array();\n $data_ipd_ledger['branch_id'] = $branch ;\n $data_ipd_ledger['ipd_admission_id'] = $ipd_admisison_id_is ;\n $data_ipd_ledger['service_type'] = 3;\n $data_ipd_ledger['service_id'] = $last_ipd_id ;\n $data_ipd_ledger['service_invoice'] = $branch_invoice_number ; \n $data_ipd_ledger['patient_id'] = $patient_primary_id_is;\n $data_ipd_ledger['payable_amount'] = $total_amount ;\n $data_ipd_ledger['payment_amount'] = $total_paid;\n $data_ipd_ledger['discount'] = $total_discount;\n $data_ipd_ledger['purpose'] = $purpose ;\n //$data_ipd_ledger['remarks'] = $remarks ;\n $data_ipd_ledger['added_id'] = $this->loged_id;\n $data_ipd_ledger['created_time'] = $this->current_time;\n $data_ipd_ledger['service_created_at'] = $billDate;\n $data_ipd_ledger['created_at'] = $this->rcdate;\n DB::table('tbl_ipd_ledger')->insert($data_ipd_ledger);\n #------------------------ end insert into ipd ledger ----------------------------------#\n #-------------------------------- incress pettycash amount ------------------------------#\n $pettycash_amount = DB::table('pettycash')->where('branch_id',$branch)->where('type',3)->limit(1)->first();\n $current_pettycash_amt = $pettycash_amount->pettycash_amount ;\n $now_pettycash_amt = $current_pettycash_amt + $total_paid ;\n // update pettycash amount\n $data_update_pettycash = array();\n $data_update_pettycash['pettycash_amount'] = $now_pettycash_amt; \n DB::table('pettycash')->where('branch_id',$branch)->where('type',3)->update($data_update_pettycash);\n #-------------------------------- end incress pettycash amount---------------------------#\n echo $last_ipd_id.'/'.$branch_invoice_number.'/'.$last_cashbook_id.'/'.$ipd_admisison_id_is ;\n }", "title": "" }, { "docid": "cc4143cf92fb521f1cbf6ad10a7f51dc", "score": "0.47481635", "text": "public function newCurrentOrders(request $request)\n { \n $response = new \\stdClass();\n $rules = ['pageNumber' => 'required'];\n $validator = Validator::make($request->all(), $rules);\n if ($validator->fails()) {\n $data = $validator->messages();\n $response->error = Common::error_true;\n $response->errorMessage = $data->first();\n } else {\n if ($request->pageNumber) {\n if ($request->pageNumber == 1) {\n $pageNumber = 0;\n } else {\n $pageNumber = $request->pageNumber - 1;\n }\n // $pageNumber = $request->pageNumber;\n $page_offset= $pageNumber * 15;\n } else {\n $pageNumber = 0;\n $page_offset= $pageNumber * 15;\n }\n $orderManagementService = new OrderManagementService();\n $response = $orderManagementService->newCurrentOrders($pageNumber,$page_offset);\n }\n $responsedata = Defaults::encode($response);\n return $responsedata;\n }", "title": "" }, { "docid": "c821264927e13b318dea013f8d4586d0", "score": "0.47460842", "text": "public function createTxn(\n $request,\n float $amount = null,\n array $processors = null,\n $currency = 'XOF',\n string $label = null,\n string $debtor = null,\n );", "title": "" }, { "docid": "9b8d7c62c1aada7150edc4017a0cb07c", "score": "0.47398975", "text": "public function create_invoice($currency, $amount, $forward_address = '', $ipn_url = '', $invoice_id = '', $hosted_invoice = false, $product_title = '', $product_description = '', $cancel_url = '', $success_url = '', $buyer_email = '') {\n $url = $this->url.$this->version.'/create_invoice';\n\n if($amount == 0) {\n throw new \\Exception('The amount cannot be zero or negative number');\n }\n\n if(!is_numeric($amount)) {\n throw new \\Exception('The amount should be numeric double');\n }\n\n $payload = [\n 'amount'=>$amount,\n 'currency'=>(isset($currency)) ? $currency : $this->default_currency,\n 'forward_address'=>$forward_address,\n 'ipn_url'=>$ipn_url,\n 'invoice_id'=>$invoice_id,\n 'hosted_invoice'=>$hosted_invoice,\n 'product_title'=>$product_title,\n 'product_description'=>$product_description,\n 'cancel_url'=>$cancel_url,\n 'success_url'=>$success_url,\n 'buyer_email'=>$buyer_email\n ];\n\n $res = $this->curl_call($url, $payload);\n return $res;\n }", "title": "" }, { "docid": "0a0d5866fd540130379a79077c82c812", "score": "0.4729728", "text": "public function convretEstimateToInvoice($estimate){\n $invoiceSetting = InvoiceSetting::first();\n $invoice = new Invoice;\n $input['user_id'] = $estimate->user_id;\n $input['client_id'] = $estimate->client_id;\n $input['estimate_id'] = $estimate->id;\n $input['invoice_number'] = $this->_getInvoiceNumber();\n $input['invoice_date'] = date('Y-m-d');\n $input['due_date'] = date('Y-m-d', strtotime('+'.$invoiceSetting->due_after.' days'));\n $input['sub_total'] = $estimate->sub_total;\n $input['total_tax'] = $estimate->total_tax;\n $input['discount_type'] = $estimate->discount_type;\n $input['discount'] = $estimate->discount;\n $input['total_discount'] = $estimate->total_discount;\n $input['adjustment'] = $estimate->adjustment;\n $input['total_amount'] = $estimate->total_amount;\n $input['total_due_amount'] = $estimate->total_amount;\n $input['reference'] = $estimate->reference;\n $input['note'] = $estimate->note;\n $invoice = $invoice->create($input);\n if ($invoice) {\n foreach ($estimate->items as $key => $value) {\n $invoiceItem = $invoice->items()->create([\n \"invoice_id\" => $invoice->id,\n \"item_name\" => $value->item_name,\n \"item_description\" => $value->item_description,\n \"item_unit\" => $value->item_unit,\n \"unit_price\" => $value->unit_price,\n \"quantity\" => $value->quantity,\n \"total_item_amount\" => $value->total_item_amount\n ]);\n\n foreach ($value->taxes as $key1 => $value1) {\n $invoiceItem->taxes()->attach($value1, [ 'item_tax' => $value1->pivot->item_tax ]);\n }\n }\n\n // Sent invoice to customer.\n $invoiceData = Invoice::with('client', 'items.taxes', 'payments')->find($invoice->id);\n $this->emailsHelper->sendInvoiceEmail($invoiceData);\n\n // Update estimate.\n Estimate::where('id', $estimate->id)->update([ 'invoice_id' => $invoice->id ]);\n\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "239b5872bf2805757b8c8b05cbf7d5b4", "score": "0.47288468", "text": "protected function convertAmountsRequest($ingredient_name, $source_amount, $source_unit, $target_unit)\n {\n // verify the required parameter 'ingredient_name' is set\n if ($ingredient_name === null || (is_array($ingredient_name) && count($ingredient_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $ingredient_name when calling convertAmounts'\n );\n }\n // verify the required parameter 'source_amount' is set\n if ($source_amount === null || (is_array($source_amount) && count($source_amount) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $source_amount when calling convertAmounts'\n );\n }\n // verify the required parameter 'source_unit' is set\n if ($source_unit === null || (is_array($source_unit) && count($source_unit) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $source_unit when calling convertAmounts'\n );\n }\n // verify the required parameter 'target_unit' is set\n if ($target_unit === null || (is_array($target_unit) && count($target_unit) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $target_unit when calling convertAmounts'\n );\n }\n\n $resourcePath = '/recipes/convert';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($ingredient_name !== null) {\n $queryParams['ingredientName'] = ObjectSerializer::toQueryValue($ingredient_name);\n }\n // query params\n if ($source_amount !== null) {\n $queryParams['sourceAmount'] = ObjectSerializer::toQueryValue($source_amount);\n }\n // query params\n if ($source_unit !== null) {\n $queryParams['sourceUnit'] = ObjectSerializer::toQueryValue($source_unit);\n }\n // query params\n if ($target_unit !== null) {\n $queryParams['targetUnit'] = ObjectSerializer::toQueryValue($target_unit);\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 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 $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 API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('apiKey');\n if ($apiKey !== null) {\n $queryParams['apiKey'] = $apiKey;\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": "6d0263c20ea8cbec80cfc286242c487f", "score": "0.471787", "text": "protected function addOrderRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling addOrder'\n );\n }\n\n $resourcePath = '/Order';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'application/json'],\n ['application/x-www-form-urlencoded']\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 API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('token');\n if ($apiKey !== null) {\n $queryParams['token'] = $apiKey;\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": "471180381245d986b20df428de7440d8", "score": "0.47166964", "text": "protected function getCountOrderRequest($accept, $content_type)\n {\n // verify the required parameter 'accept' is set\n if ($accept === null || (is_array($accept) && count($accept) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $accept when calling getCountOrder'\n );\n }\n // verify the required parameter 'content_type' is set\n if ($content_type === null || (is_array($content_type) && count($content_type) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $content_type when calling getCountOrder'\n );\n }\n\n $resourcePath = '/orders/count';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // header params\n if ($accept !== null) {\n $headerParams['Accept'] = ObjectSerializer::toHeaderValue($accept);\n }\n // header params\n if ($content_type !== null) {\n $headerParams['Content-Type'] = ObjectSerializer::toHeaderValue($content_type);\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 API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('X-Auth-Client');\n if ($apiKey !== null) {\n $headers['X-Auth-Client'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('X-Auth-Token');\n if ($apiKey !== null) {\n $headers['X-Auth-Token'] = $apiKey;\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": "8ffdc10cc7a26fe2a6a02f418aaa6d05", "score": "0.4714219", "text": "public function actionCreate() {\n $this->active_menu = \"cps\";\n $this->open_class = \"invoice\";\n $this->active_class = \"admin\";\n $imodel = Purchaseinvoice::model()->findByPk(Yii::app()->request->getParam('id'));\n $model = new Purchaseinvoiceitems();\n if (isset($_POST['Purchaseinvoice'])) {\n \n }\n $this->render('create', array(\n 'model' => $model, 'imodel' => $imodel,\n ));\n }", "title": "" }, { "docid": "faaef69c0910fcd46f4293b209cc2955", "score": "0.47100982", "text": "public function getInvoices($filter=null);", "title": "" }, { "docid": "754146357a487d7e0f3f4487f8753b1a", "score": "0.4708383", "text": "protected function userRequestWithdrawalRequest($currency, $amount, $address, $otp_token = null, $fee = null)\n {\n // verify the required parameter 'currency' is set\n if ($currency === null || (is_array($currency) && count($currency) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $currency when calling userRequestWithdrawal'\n );\n }\n // verify the required parameter 'amount' is set\n if ($amount === null || (is_array($amount) && count($amount) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $amount when calling userRequestWithdrawal'\n );\n }\n // verify the required parameter 'address' is set\n if ($address === null || (is_array($address) && count($address) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $address when calling userRequestWithdrawal'\n );\n }\n\n $resourcePath = '/user/requestWithdrawal';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // form params\n if ($otp_token !== null) {\n $formParams['otpToken'] = ObjectSerializer::toFormValue($otp_token);\n }\n // form params\n if ($currency !== null) {\n $formParams['currency'] = ObjectSerializer::toFormValue($currency);\n }\n // form params\n if ($amount !== null) {\n $formParams['amount'] = ObjectSerializer::toFormValue($amount);\n }\n // form params\n if ($address !== null) {\n $formParams['address'] = ObjectSerializer::toFormValue($address);\n }\n // form params\n if ($fee !== null) {\n $formParams['fee'] = ObjectSerializer::toFormValue($fee);\n }\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'],\n ['application/json', 'application/x-www-form-urlencoded']\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 API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('api-key');\n if ($apiKey !== null) {\n $headers['api-key'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('api-nonce');\n if ($apiKey !== null) {\n $headers['api-nonce'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('api-signature');\n if ($apiKey !== null) {\n $headers['api-signature'] = $apiKey;\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": "" } ]
ecc9bdc8373f9c97865b9bc8e95adf18
FORMAT DATE AS DMY
[ { "docid": "f5462de772ca5e95d1cd1a1d1f4a1173", "score": "0.0", "text": "function DateFormatDMY($DateString)\n\t{\n\t\t$date=\"\";\n\t\tif(!is_null($DateString))\n\t\t\t$date = date(\"d-m-Y\", strtotime($DateString));\n\t\treturn $date;\n\t}", "title": "" } ]
[ { "docid": "c3804c7f31db3ed5cbece9e297a9e022", "score": "0.6575383", "text": "function dnm($date) {\n echo strftime(\"%-d %B\", strtotime($date));\n }", "title": "" }, { "docid": "f4ef78f4c2603b149e5c309f558850d1", "score": "0.6573432", "text": "public function getDateFormatter();", "title": "" }, { "docid": "f4ef78f4c2603b149e5c309f558850d1", "score": "0.6573432", "text": "public function getDateFormatter();", "title": "" }, { "docid": "b060c764bdd308a8188077c146be0291", "score": "0.6544658", "text": "public function dateTimeFormat();", "title": "" }, { "docid": "dfc90a1b84d48a1728e9e437d8e2eaef", "score": "0.65033835", "text": "public static function formatDate($d){\r\n\t\treturn date('F jS, Y', strtotime($d));\r\n\t}", "title": "" }, { "docid": "78a26f143854e9413a80d673194b1014", "score": "0.6418456", "text": "function getDATE_FORMAT($date)\n {\n return \"DATE_FORMAT(\".$date.\", \\\"%m/%d/%Y\\\")\";\n }", "title": "" }, { "docid": "a6290ec47d29ffa5e9558e6c6b3069b8", "score": "0.6384038", "text": "public function format_date($date){\n \n }", "title": "" }, { "docid": "364c2b2b0f33888fff6bcec0bb4e3503", "score": "0.63780546", "text": "function mysql_date_format($dt=\"\"){\n $mysql_date=strftime(\"%Y-%m-%d\", $dt);\n return $mysql_date;\n }", "title": "" }, { "docid": "2d966c5b2414e43d36d4d0be4a8fb9a0", "score": "0.6347764", "text": "function set_f_date_dicc()\n{\n\t// función del formato usado\n\t//\n\t// $f_date: diccionario con \n\t//\t\t$f_date['year'] \t'YYYY'\n\t//\t\t$f_date['month']\t'MM'\n\t//\t\t$f_date['day']\t\t'DD'\n\n\t$mktime = set_f_date_mktime($f_date, $dates_fmt);\n\n\treturn mktime_to_str($mktime);\n}", "title": "" }, { "docid": "92c1bd233cfd44cc079b11d2a60c363e", "score": "0.63049996", "text": "function formatDate($d){\t\t\t\t\t\t\t\t\t\n\t\t$date = date('Y-m-d', strtotime($d));\t\t\t\t\t\t\t\t\t\n\t\treturn $date;\n\t}", "title": "" }, { "docid": "dc522f4f0f3aa2c8ce6b4732ef8acf6c", "score": "0.63040406", "text": "function dateformat($target_date)\r\n{\r\n\t$timeformat_qry = mysql_query(\"SELECT DATE_FORMAT('$target_date','%d.%c.%Y') as tdiff\");\r\n\t$rec_time = mysql_fetch_array($timeformat_qry);\r\n\t$timeformat = $rec_time['tdiff'];\r\n\treturn $timeformat;\r\n}", "title": "" }, { "docid": "5a71a586a5d0e543ff3c145d7bddcbcc", "score": "0.6297606", "text": "function eF_dateFormat($returnSpaces = true, $format = false)\n{\n if ($format == false) {\n $format = $GLOBALS['configuration']['date_format'];\n }\n if ($returnSpaces) {\n switch ($format) {\n case \"YYYY/MM/DD\":\n $output = \"Y m d\";\n break;\n case \"DD/MM/YYYY\":\n $output = \"d m Y\";\n break;\n case \"MM/DD/YYYY\":\n $output = \"m d Y\";\n break;\n default :\n $output = \"d m Y\";\n break;\n }\n } else {\n switch ($format) {\n case \"YYYY/MM/DD\":\n $output = \"YMD\";\n break;\n case \"DD/MM/YYYY\":\n $output = \"DMY\";\n break;\n case \"MM/DD/YYYY\":\n $output = \"MDY\";\n break;\n default :\n $output = \"DMY\";\n break;\n }\n }\n return $output;\n}", "title": "" }, { "docid": "f2301ff568eb3adf9be893bf0325a9f8", "score": "0.6295937", "text": "public function getDateFormatter()\n\t{\n\t\treturn 'Y-m-d';\n\t}", "title": "" }, { "docid": "4929351eed552e397b39cfd7f96fbcf8", "score": "0.6294847", "text": "function column_date($item){\n return sprintf('<span>' . date( \"d M y\", strtotime($item['date'])) . '</span><br/><span>' . date( \"h:ia\", strtotime($item['date'])) . '</span>');\n }", "title": "" }, { "docid": "f5dcde0b2297bf6b74c2d0611098b9ff", "score": "0.6292174", "text": "function func_datetochar($fieldname, $format=\"\")\n {\n if ($format==\"\") $format = atkconfig(\"date_to_char\", \"Y-m-d\");\n return \"TO_CHAR($fieldname, '\".$this->vendorDateFormat($format).\"')\";\n }", "title": "" }, { "docid": "afd81b6ae6a1a49fd5cbeecd3a0228d9", "score": "0.6289691", "text": "public static function get_date_format()\n {\n return apply_filters('rp_wcec_date_format', get_option('date_format'));\n }", "title": "" }, { "docid": "899d8836926d53aec087a946ace99d69", "score": "0.62696505", "text": "function _d($date)\n{\n if ($date == '' || is_null($date) || $date == '0000-00-00') {\n return '';\n }\n if (strpos($date, ' ') !== false) {\n return _dt($date);\n }\n $format = get_current_date_format();\n $date = strftime($format, strtotime($date));\n\n return do_action('after_format_date', $date);\n}", "title": "" }, { "docid": "5fb7bf507fcb8fd33afb2443079c2a29", "score": "0.6269367", "text": "public function getDateFormatted() {\r\n\t\t\t$arr = date_parse($this->when);\r\n\t\r\n\t\t\tif ($this->when == (String) intval($this->when)) {\r\n\t\t\t\treturn \"FIXME\";\r\n\t\t\t\t\r\n\t\t\t} else if ($arr['errors']) {\r\n\t\t\t\t$out = '';\r\n\t\t\t\tfor ($i = 0; $i < 7; ++$i) {\r\n\t\t\t\t\tif ($this->when{$i} != '-') {$out .= MyDate::getDayNameShort($i) . ',';}\r\n\t\t\t\t}\r\n\t\t\t\treturn substr($out, 0, strlen($out)-1);\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\t$ts = mktime(0, 0, 0, $arr['month'], $arr['day'], $arr['year']);\r\n\t\t\t\treturn strftime(LANG_DATE_DAYMONTH, $ts);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "title": "" }, { "docid": "a9323c5a7e11cd43bcf1822dce18d6a7", "score": "0.62590885", "text": "function dateToformat($date){\n\treturn substr($date, 5, 2) . \"월 \" . substr($date, 8, 2) . \"일\";\n}", "title": "" }, { "docid": "d9ab76c637fd4a6b43eeb0bc7b2df4e0", "score": "0.6232034", "text": "function getDateFormat() {\n switch ($GLOBALS['configuration']['date_format']) {\n case \"YYYY/MM/DD\": $format = 'YMd'; break;\n case \"MM/DD/YYYY\": $format = 'MdY'; break;\n case \"DD/MM/YYYY\": default: $format = 'dMY'; break;\n }\n return $format;\n}", "title": "" }, { "docid": "199be918e456bb38c31457aba9ed9b09", "score": "0.6223042", "text": "public static function dateFormat($value)\n {\n return date_filter($value, DATE_FORMAT);\n }", "title": "" }, { "docid": "f26361a24f3e5a46f1a8fcd80892a962", "score": "0.62115026", "text": "public function toFormattedDateString();", "title": "" }, { "docid": "e1c9df7e75c5651e5fbd300699d00888", "score": "0.62049264", "text": "function get_date_format_deutsch( $c_date )\n{\r\n\t$c_date_year = substr($c_date, 0, 4);\r\n\t$c_date_month = substr($c_date, 5, 2);\r\n\t$c_date_day = substr($c_date, 8, 2);\r\n\t$c_date_deutsch = $c_date_day.\".\".$c_date_month.\".\".$c_date_year;\r\n\treturn $c_date_deutsch;\r\n}", "title": "" }, { "docid": "1e788f309962fa7475d9f792f986ebce", "score": "0.6198912", "text": "public function dateFormat();", "title": "" }, { "docid": "285a2f349db79a363746ebe45da5b59b", "score": "0.6147498", "text": "function _d($date)\r\n{\r\n if ($date == '' || is_null($date) || $date == '0000-00-00') {\r\n return '';\r\n }\r\n $format = get_current_date_format();\r\n $date = strftime($format, strtotime($date));\r\n return do_action('after_format_date', $date);\r\n}", "title": "" }, { "docid": "cae1b984b4de8aaaf0d1d095edbf3ad5", "score": "0.6120098", "text": "function get_date_format() {\n\tglobal $date_format;\n\n\tif (isset($date_format))\n\t\treturn $date_format;\n\telse\n\t\treturn \"%x\";\n}", "title": "" }, { "docid": "25044bdf722aa865b7d220f7ea6a1532", "score": "0.6114817", "text": "function my_format_date($d) {\r\n\t$formatted = my_format_date_simple($d);\r\n\tif (!$d) {\r\n\t\treturn $formatted;\r\n\t}\r\n\r\n\treturn '<span class=\"date\" title=\"' . htmlspecialchars(date('r', strtotime($d))) . '\">' . $formatted . '</span>';\r\n}", "title": "" }, { "docid": "2673906ca1be2574263cac06f3d6e224", "score": "0.60812974", "text": "public static function get_date_time_format()\n {\n return apply_filters('rp_wcec_date_time_format', (RP_WCEC::get_date_format() . ' ' . RP_WCEC::get_time_format()));\n }", "title": "" }, { "docid": "049e5b35088865b493d948bc3d689f91", "score": "0.6078954", "text": "function formatDate($origdate='',$format = \"%d/%m/%Y\"){\n\tswitch($format){\n\tcase \"date\"\t\t\t: $format = \"%d-%m-%Y\";\n\tbreak;\n\tcase \"datetime\"\t\t: $format = \"%d-%m-%Y %H:%M:%S\";\n\tbreak;\n\tcase \"mysqldate\"\t: $format = \"%Y-%m-%d\";\n\tbreak;\n\tcase \"mysqldatetime\": $format = \"%Y-%m-%d %H:%M:%S\";\n\tbreak; \n\tcase \"datetime_ampm\": $format = \"%d-%m-%Y at %I:%M:%S %p\";\n\tbreak; \n\tcase \"datetime_word\": $format = \"%a, %B %d, %Y at %I:%M:%S%p\";\n\tdefault: $format;\n\t}\n\tif(strlen($origdate)>0){\n\t\treturn strftime($format,strtotime($origdate));\n\t}else{ return \" \"; }\n}", "title": "" }, { "docid": "5b1a1cf7b10cb8c7dc3cb7e2717e7698", "score": "0.6054684", "text": "public static function format_date_pdf($val) {\r\r\t\tif($val<>null) {\r\r\t\t\t$data = explode('-',$val);\r\r\t\t\t$month = Util::format_month($data[0]);\r\r\t\t\treturn ucfirst($month).', '.$data[1];\r\r\t\t}\r\r\t}", "title": "" }, { "docid": "4ac2932ef1ae874e743741d49c63a8c2", "score": "0.60392964", "text": "function formatDate($date)\n {\n return $date;\n }", "title": "" }, { "docid": "6aaa790c522377fd2e29457819e22eb7", "score": "0.60355085", "text": "public function get_date_format()\n\t{\n\t\treturn 'Y-m-d H:i:s';\n\t}", "title": "" }, { "docid": "ff8551c4ee93c3598b79b7febda3654b", "score": "0.60278815", "text": "public function getTimeFormat(): string\n {\n return DWDConfiguration::getHourlyConfiguration()->parserSettings->dateFormat;\n }", "title": "" }, { "docid": "3a5b6e641ebfc3b18fd50e9da2cbc3dd", "score": "0.60129374", "text": "function date_format (DateTime $object, $format) {}", "title": "" }, { "docid": "b6325c428868dce1ebc89b656ed6adeb", "score": "0.59928566", "text": "public static function formatDate($date){\n return date( 'Y-m-d', strtotime($date));\n }", "title": "" }, { "docid": "ce7a496d8b1a8f1f46a8e418533ee807", "score": "0.59919614", "text": "function format_date($original='', $format=\"%Y-%m-%d\") {\n $format = ($format=='date' ? \"%Y-%m-%d\" : $format);\n $format = ($format=='datetime' ? \"%Y-%m-%d %H:%M:%S\" : $format);\n $format = ($format=='mysql-date' ? \"%%Y-%m-%d\" : $format);\n $format = ($format=='mysql-datetime' ? \"%%Y-%m-%d %H:%M:%S\" : $format);\n return (!empty($original) ? strftime($format, strtotime($original)) : \"\" );\n}", "title": "" }, { "docid": "b1f8e8452bd7ad3d0e4eb9a36c1aefb3", "score": "0.5984262", "text": "function formatDate($date){\r\n\treturn $date;\r\n}", "title": "" }, { "docid": "bbca93aa1beb897fa3946daab6b3f3d6", "score": "0.59355986", "text": "function format_date($date)\n{\n\n\treturn substr($date, 0, 4) . '-' . substr($date, 4, 2) . '-' . substr($date, 6, 2);\n}", "title": "" }, { "docid": "c054d21a087ed7e873dd0c761c3b2885", "score": "0.59261584", "text": "public function fmtDateTime($date,$dfmt,$tfmt)\n {\n $mydate = date_create($date);\n if ($dfmt && $tfmt) return date_format($mydate, 'd/m/Y - H:i');\n if ($dfmt && !$tfmt) return date_format($mydate, 'd/m/Y - h:i A');\n if (!$dfmt && $tfmt) return date_format($mydate, 'm/d/Y - H:i');\n if (!$dfmt && !$tfmt) return date_format($mydate, 'm/d/Y - h:i A');\n }", "title": "" }, { "docid": "06304aa4e319fb8650ee7822b77129e0", "score": "0.5921122", "text": "function vendorDateFormat($format)\n {\n $php_fmt = array(\"Y\", \"m\", \"d\", \"H\", \"h\", \"i\", \"s\");\n $db_fmt = array(\"YYYY\", \"MM\", \"DD\", \"HH24\", \"HH12\", \"MI\", \"SS\");\n return str_replace($php_fmt, $db_fmt, $format);\n }", "title": "" }, { "docid": "f481e6f1854c84beec8b0c7e1bb17621", "score": "0.5919459", "text": "function dateFormatter($date,$format='j.n.Y'){\n\t$dateObj = (new DateTime($date));\n\treturn $dateObj->format($format);\n}", "title": "" }, { "docid": "9de236d0dc1baa06420a1e2ca368623c", "score": "0.5917041", "text": "private function formatDate(\\DateTime $date)\n {\n return $date->format(self::$dateFormat);\n }", "title": "" }, { "docid": "505b9c86994a72657a6d576e44e8cd04", "score": "0.5913257", "text": "public function getDateString() {\r\n $dateString = sprintf(__(\"%s, %s de %s de %s\"), $this->_getDayString(), date('d'), $this->_getMonthString(), date('Y')); \r\n return $dateString;\r\n }", "title": "" }, { "docid": "0e3d26083a194a03877eaea14c458120", "score": "0.59066784", "text": "function date_fmt($str_date)\n{\n\n\tswitch (strlen($str_date)) {\n\t\tcase 4:\n\t\treturn 'YYYY';\n\t\t\n\t\tcase 6:\n\t\treturn 'YYYYMM';\n\n\t\tcase 8:\n\t\treturn 'YYYYMMDD';\n\t}\n}", "title": "" }, { "docid": "9ecafd40919af1b95df24f17595c96d9", "score": "0.5889086", "text": "public static function datetime_format() {\n\n\t\treturn sprintf(\n\t\t\t/* translators: %1$s - date, \\a\\t - specially escaped \"at\", %2$s - time. */\n\t\t\tesc_html__( '%1$s \\a\\t %2$s', 'wp-mail-smtp' ),\n\t\t\tget_option( 'date_format' ),\n\t\t\tget_option( 'time_format' )\n\t\t);\n\t}", "title": "" }, { "docid": "0df094b0eb7179c167e3ffee5c484dae", "score": "0.58888584", "text": "public static function getDateFormat(): string;", "title": "" }, { "docid": "88b161b42991cb7606a464cb8964269e", "score": "0.58888394", "text": "public function formatDate() {\n\t $dateFormat = \\GO::user() ? \\GO::user()->completeDateFormat : \\GO::config()->getCompleteDateFormat();\n\t return parent::format($dateFormat);\n\t}", "title": "" }, { "docid": "2a82ce34898a935f90428a7d501e1822", "score": "0.5882722", "text": "public function getMySQLFormat() {\n\t\treturn $this->format ( 'Y-m-d' );\n\t}", "title": "" }, { "docid": "904b733dc7ae851ca6d0e81162e9fd53", "score": "0.5877679", "text": "function date_formater(string $date, string $format = DATE_FORMAT) :string {\r\n $date = new \\DateTime($date);\r\n return $date->format($format);\r\n}", "title": "" }, { "docid": "cd917237fbb6f7c573d4fea8b7921081", "score": "0.58720285", "text": "function dja_date_format($value, $format = null, $use_l10n = null) {\n if ($format === null) {\n $format = 'DATE_FORMAT';\n }\n\n if ($use_l10n || ($use_l10n === null && Dja::getSetting('USE_L10N'))) {\n $lang = Dja::getSetting('LANGUAGE_CODE');\n \n $translateDateFormatToICUPattern = function($format) {\n $map = [\"'\"=>\"''\",'d'=>'dd','D'=>'eee','jS'=>'d','j'=>'d','l'=>'eeee','N'=>'c','S'=>'','w'=>'e','z'=>'D','W'=>'w','F'=>'MMMM','m'=>'MM','M'=>'MMM','n'=>'M','t'=>'','L'=>'','o'=>'Y','y'=>'yy','Y'=>'y','A'=>'a','B'=>'','g'=>'h','G'=>'H','h'=>'hh','H'=>'HH','i'=>'mm','s'=>'ss','u'=>'','e'=>'vv','I'=>'','O'=>'xx','P'=>'xxx','T'=>'z','Z'=>'','c'=>\"y-MM-dd'T'HH:mm:ssxxx\",'u'=>'','r'=>'eee,ddMMMyHH:mm:ssxx'];\n\n return strtr($format, $map);\n };\n \n $format = $translateDateFormatToICUPattern($format); \n \n if($value instanceof DateTime) {\n $tz = $value->getTimeZone()->getName();\n } else {\n $tz = null;\n }\n \n $ft = new IntlDateFormatter($lang, IntlDateFormatter::FULL, IntlDateFormatter::FULL, $tz, null, $format);\n \n return $ft->format($value); \n \n } elseif ($format=='DATE_FORMAT') {\n $format = Dja::getSetting('DATE_FORMAT');\n } elseif ($format=='SHORT_DATE_FORMAT') {\n $format = Dja::getSetting('SHORT_DATE_FORMAT');\n }\n\n // Mimic Django.\n $format = str_replace(array('N', 'e'), array('M.', 'O'), $format);\n\n if($value instanceof DateTime) {\n return $value->format($format);\n } else {\n return date($format, $value);\n }\n}", "title": "" }, { "docid": "ee86019b93dc21283433cb313c0c6427", "score": "0.5863123", "text": "function datetime($format, Date $date) {\r\n\t\t$format = Msg::get($format);\r\n\t\t$patterns[0] = '/dd/';\r\n\t\t$patterns[1] = '/MM/';\r\n\t\t$patterns[2] = '/yyyy/';\r\n\t\t$patterns[3] = '/yy/';\r\n\t\t$patterns[4] = '/HH/';\r\n\t\t$patterns[5] = '/mm/';\r\n\t\t$patterns[6] = '/ss/';\r\n\t\t$replacements[6] = sprintf(\"%02d\", $date->date);\r\n\t\t$replacements[5] = sprintf(\"%02d\", $date->month);\r\n\t\t$replacements[4] = sprintf(\"%04d\", $date->year);\r\n\t\t$replacements[3] = sprintf(\"%02d\", $date->year % 100);\r\n\t\t$replacements[2] = sprintf(\"%02d\", $date->hour);\r\n\t\t$replacements[1] = sprintf(\"%02d\", $date->minute);\r\n\t\t$replacements[0] = sprintf(\"%02d\", $date->second);\r\n\t\techo preg_replace($patterns, $replacements, $format);\r\n\t}", "title": "" }, { "docid": "9d9bc5821627017a06f685b3ede48c6f", "score": "0.58546865", "text": "public static function dob($value)\n\t{\n\t\tif (!$value)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\treturn HTMLHelper::_('date', $value, Text::_('DATE_FORMAT_LC1'), false);\n\t}", "title": "" }, { "docid": "95a348b6485ec5a8ac706c5fe5ac9dce", "score": "0.58545715", "text": "function sbx_date_format() {\n\treturn apply_filters( 'sealedbox_date_format', get_option( 'date_format' ) );\n}", "title": "" }, { "docid": "b726023daf1db3780b8cf7a0710ad584", "score": "0.5844898", "text": "function wdts_convert_date_format( $format ) {\n\t// Missing: 'o' => '', '!' => '', 'oo' => '', '@' => '', \"''\" => \"'\"\n\t$translation = array(\n\t\t'd' => 'j',\n\t\t'dd' => 'd',\n\t\t'oo' => 'z',\n\t\t'D' => 'D',\n\t\t'DD' => 'l',\n\t\t'm' => 'n',\n\t\t'mm' => 'm',\n\t\t'M' => 'M',\n\t\t'MM' => 'F',\n\t\t'y' => 'y',\n\t\t'yy' => 'Y'\n\t);\n\n\treturn strtr( $format, $translation );\n}", "title": "" }, { "docid": "4a99e0b71b6540820ee83174cc13580e", "score": "0.58338034", "text": "function format_date ( $_da ){\n\t$_mess = \"\";\n\t$_da = explode('-', $_da);\n\t$_dia = $_da[0];\n\t$_mes = $_da[1];\n\t$_ani = $_da[2];\n\n\t$_mess = format_mes($_mes);\n\t$res = $_dia . ' de ' . $_mess . ' del ' . $_ani;\n\treturn $res;\n}", "title": "" }, { "docid": "bbf32fc0230648959c25ab57781e724e", "score": "0.5821642", "text": "function convert_date($date){\r\n $time = strtotime($date);\r\n return strftime(\"%Y-%m-%d\", $time);\r\n}", "title": "" }, { "docid": "b1e27a04a54397cffe5a6125840bac9b", "score": "0.58143616", "text": "function sbx_format_datetime( $date, $format = '' ) {\n\tif ( ! $format ) {\n\t\t$format = sbx_date_format();\n\t}\n\tif ( ! is_a( $date, 'SBX_DateTime' ) ) {\n\t\treturn '';\n\t}\n\treturn $date->date_i18n( $format );\n}", "title": "" }, { "docid": "a493690188a07dd262c45bf917b58758", "score": "0.58106095", "text": "function commerce_iats_direct_debit_get_formatted_date($time) {\n return date('l, F jS, Y', $time);\n}", "title": "" }, { "docid": "8a9b5c8577b768041cd4a3d246aa649f", "score": "0.58101285", "text": "public function getFormattedDate(): string {\n return $this->getDate()->format('H:i d.m.Y');\n }", "title": "" }, { "docid": "fb6f181d869374ab52ea3c318feee570", "score": "0.5809856", "text": "function b1n_formatDateShow($var)\n{\n global $lang;\n $var = strtok($var, '.');\n return date($lang['date_format'], strtotime($var));\n}", "title": "" }, { "docid": "1906547859f057b89c0b55189ef33d43", "score": "0.5798326", "text": "public function formatDate($value)\n {\n $date = Carbon::parse($value);\n return $date->format('Y-m-d');\n }", "title": "" }, { "docid": "9832800419402c5342ab87b6398e40a0", "score": "0.5795015", "text": "function pzdc_date($date_str, $format = NULL) {\n global $PraizedCommunity;\n if ( ! strstr($format, '%') )\n $format = $PraizedCommunity->__('%a, %B %e %Y, %H:%M:%S');\n return strftime($format, strtotime($date_str));\n}", "title": "" }, { "docid": "c7f772a6856c49bd34934ebeb05ef223", "score": "0.5794936", "text": "function acf_format_date( $value, $format ) {\n}", "title": "" }, { "docid": "e94d01771a9dede513eddc27d79df152", "score": "0.5783256", "text": "function smarty_modifier_amember_date_format($string, $format=null)\n{\n if ($string == MAX_SQL_DATE)\n return _COMMON_LIFETIME;\n if ($string == RECURRING_SQL_DATE)\n return _COMMON_RECURRING;\n if ($format == null)\n $format = $GLOBALS['config']['date_format']; \n if ($string != '') {\n return strftime($format, smarty_make_timestamp($string));\n } \n}", "title": "" }, { "docid": "b2e048f1b40e0e9ecf52bd9f479aa98b", "score": "0.57819754", "text": "function prettydate($date)\n {\n return DateTime::createFromFormat('Y-m-d g:i:s', $date)->format(\"F jS, Y - g:ia\");\n }", "title": "" }, { "docid": "77b22e98616d2c219eb323924ba3ff12", "score": "0.57653177", "text": "public function getDateFormat()\n {\n return $this::DATE_FORMAT;\n }", "title": "" }, { "docid": "805ebbbcb49895dad0ebfd1e28250e1d", "score": "0.5763662", "text": "function printDay($my_date) {\t \r\n\t echo date(\"l\", mktime(0,0,0,$my_date['month'],$my_date['day'],$my_date['year']));\r\n }", "title": "" }, { "docid": "b47ce3818a2ee826c587f66a235c76c1", "score": "0.5762494", "text": "function date_format_bd($date) {\n\t\t$array = split(\"/\", $date);\n\t\treturn \"$array[2]-$array[1]-$array[0]\";\n\t}", "title": "" }, { "docid": "8a016573a34f7dd3863419cce97f89a6", "score": "0.5762236", "text": "function showThaiDate($d = \"\", $format = \"T\", $isTimeStamp = 0) {\n\t// $format default \"T\" = short month name, other = month no.\n\t$h = '';\n\tif ($isTimeStamp) {\n\t\t$datetime = explode(\" \", $d);\n\t\t$d = $datetime[0];\n\t\t$h = $datetime[1];\n\t}\n\tif (strlen($d) != 10) {\n\t\treturn \"\";\n\t}\n\t$thMonthName = array(\"\", \"ม.ค.\", \"ก.พ.\", \"มี.ค.\", \"เม.ย.\", \"พ.ค.\", \"มิ.ย.\", \"ก.ค.\", \"ส.ค.\", \"ก.ย.\", \"ต.ค.\", \"พ.ย.\", \"ธ.ค.\");\n\t$dSplit = explode(\"-\", $d);\n\tif ($format == \"T\") {\n\t\treturn $dSplit[2] . \" \" . $thMonthName[$dSplit[1]-0] . \" \" . ($dSplit[0] + 543) . \" \" . $h;\n\t} else {\n\t\treturn $dSplit[2] . \"/\" . $dSplit[1] . \"/\" . ($dSplit[0] + 543) . \" \" . $h;\n\t}\n}", "title": "" }, { "docid": "93e2ca043d47c99f15eab6d631c7bbe2", "score": "0.5761858", "text": "public function fmtDate($date,$fmt) \n {\n $mydate=date_create($date);\n if ($fmt) return date_format($mydate, 'd/m/Y');\n else return date_format($mydate, 'm/d/Y');\n }", "title": "" }, { "docid": "f0946680470f1dbd7d264e241cc054d6", "score": "0.575808", "text": "protected function getDatetimeFormat(): string\n {\n return $this->dateTimeFormat;\n }", "title": "" }, { "docid": "c06baea7fea9c1b1c3031362ca6c304d", "score": "0.57567734", "text": "function formatDate($string, $style=\"date_format\") {\t\r\n\t $timestamp = strtotime($string);\r\n\t \t \r\n\t if(get_locale() == \"de_DE\" || get_locale() == \"de_AT\") {\r\n\t \t$style = \"date_format_de\";\r\n\t \tsetlocale(LC_ALL, get_locale());\r\n\t } \t \t \r\n\t \r\n\t $formated_date = strftime($this->config[$style], $timestamp);\t\t \t\r\n\t return utf8_encode($formated_date);\t\t\r\n\t}", "title": "" }, { "docid": "2ec6266c9be515d99d88f9b5d0277c1c", "score": "0.57483935", "text": "protected function getDateFormat(): string\n {\n return $this->dateFormat;\n }", "title": "" }, { "docid": "fcda2411f32ddec08b09367729183009", "score": "0.5745648", "text": "public static function format_due_in($date)\n {\n global $PERIODS_NAMES, $PERIODS;\n $date = trim($date);\n\n foreach ($PERIODS_NAMES as $i => $v) {\n $date = mb_eregi_replace('([0-9]+)([ ]+)?' .\n $PERIODS[$i] . '$', '\\\\1 ' . $v . ' ', $date);\n $date = mb_eregi_replace('([0-9]+)([ ]+)?' .\n $PERIODS[$i] . '([ 0-9])', '\\\\1 ' . $v . ' \\\\3', $date);\n }\n $date = mb_eregi_replace('^(-?[0-9]{1,2}): # years\n ([0-9]{1,2}): # months\n ([ 0-9]{1,2}): # days\n ([ 0-9]{1,2}) # hours\n $',\n ' \\\\1 years \\\\2 months \\\\3 days \\\\4 hours ',\n $date, 'x');\n $date = mb_eregi_replace('^(-?[0-9]{1,2}): # months\n ([ 0-9]{1,2}): # days\n ([ 0-9]{1,2}) # hours\n $',\n ' \\\\1 months \\\\2 days \\\\3 hours ',\n $date, 'x');\n $date = mb_eregi_replace('^(-?[0-9]{1,2}): # days\n ([ 0-9]{1,2}) # hours\n $', ' \\\\1 days \\\\2 hours ', $date, 'x');\n $date = mb_eregi_replace('^(-?[0-9]{1,2})$', ' \\\\1 days ', $date);\n\n if (false === ($date = strtotime($date))) {\n return false;\n }\n return $date;\n }", "title": "" }, { "docid": "6a514adebbaee37aec7ea8e17bce1e59", "score": "0.57454693", "text": "function setup_be_date_mdy_time() {\n\t\techo '<div class=\"item date\">' . get_the_date( 'M j, Y \\a\\t g:ia' ) . '</div>';\n\t}", "title": "" }, { "docid": "5e1cbb79151ea65c196878995734d643", "score": "0.5739161", "text": "function func_datetimetochar($fieldname)\n {\n return \"TO_CHAR($fieldname, 'YYYY-MM-DD hh:mi')\";\n }", "title": "" }, { "docid": "cf76b66f6bc7615fb7b9033adb45789b", "score": "0.5735687", "text": "public function getTimeFormatter();", "title": "" }, { "docid": "ba27ba347e023d30162a85eacb495578", "score": "0.5731172", "text": "public function formatDate($date)\n\t\t{\n\t\t\treturn date(\"M d, Y h:s\", strtotime($date));\n\t\t}", "title": "" }, { "docid": "0ee0e38e62c20615c550d1d36e56f6d4", "score": "0.5729451", "text": "function formatDate($val) \n { \n list($date, $time) = explode(\" \", $val); \n list($year, $month, $day) = explode(\"-\", $date);\n list($hour, $minute, $second) = explode (\":\", $time);\n return date(\"l, m.j.y @ h:ia\", mktime($hour, $minute, $second, $month, $day, $year)); \n }", "title": "" }, { "docid": "e87bbd323419459a9fd2d9c00596fd34", "score": "0.5728844", "text": "function setup_be_date_day_mdy() {\n\t\techo '<div class=\"item date\">' . get_the_date( 'l | M j, Y' ) . '</div>';\n\t}", "title": "" }, { "docid": "fd7f056e7a2a53b89455fab1dd680ad5", "score": "0.57243663", "text": "function formattd_post_date() {\n\t$mon = get_the_time('M');\n\t$day = get_the_time('d');\n\t$year = get_the_time('Y');\n\t\n\tprintf('<div class=\"post-date\"><span class=\"month\">%s</span><span class=\"day\">%s</span><span class=\"year\">%s</span></div>', $mon, $day, $year);\n}", "title": "" }, { "docid": "c46147e389da3a6531e47e6d9d1f267a", "score": "0.5723246", "text": "function yourls_get_date_format( $format ) {\n return yourls_apply_filter( 'get_date_format', (string)$format );\n}", "title": "" }, { "docid": "406dcf53c2a8148434ae38af3426da6f", "score": "0.5714599", "text": "function format_date($date, $tomysql = true)\n{\n $CI = &get_instance();\n if ($date == '') {\n return '';\n }\n if ($tomysql) {\n if (preg_match(\"/^[0-9]{1,2}-[0-9]{1,2}-[0-9]{4}$/\", $date)) {\n $expl = explode('-', $date);\n return $expl[2] . '-' . $expl[1] . '-' . $expl[0];\n } else {\n return $date;\n }\n } else {\n if (preg_match(\"/^[0-9]{4}-[0-9]{1,2}-[0-9]{1,2}$/\", $date)) {\n $expl = explode('-', $date);\n $rt = $expl[2] . '-' . $expl[1] . '-' . $expl[0];\n if ($rt == '00-00-0000') {\n return '';\n }\n return $rt;\n } else {\n if ($date == '00-00-0000') {\n return '';\n }\n return $date;\n }\n }\n}", "title": "" }, { "docid": "268ff135a280fb54a099b32af4e38554", "score": "0.5709344", "text": "function datify(string $date, string $format = DATE_FORMAT) :string {\r\n $date = new \\DateTime($date);\r\n return $date->format($format);\r\n}", "title": "" }, { "docid": "e1883f18bca8ee773659341355285ffb", "score": "0.57068783", "text": "function formatDate($date) {\n return date(config('const.sitewise_date_format'), strtotime($date));\n}", "title": "" }, { "docid": "7550d8bd4ff307675a21aeb1ead8a074", "score": "0.5704835", "text": "function dateFormat($date = null, $format = null)\n {\n if (!empty($date)) {\n if (empty($format)) {\n $format = 'm/d/y';\n }\n $date = $this->Time->format($format, $date);\n }\n return $date;\n }", "title": "" }, { "docid": "066f21ca1839d2497d22a238b44a528c", "score": "0.5704418", "text": "public function format($value)\n\t{\n\t\t$date = $this->getDate($value);\n\t\t$bits['yyyy'] = $date['year'];\n\t\t$bits['yy'] = substr(\"{$date['year']}\", -2);\n\n\t\t$bits['MM'] = str_pad(\"{$date['mon']}\", 2, '0', STR_PAD_LEFT);\n\t\t$bits['M'] = $date['mon'];\n\n\t\t$bits['dd'] = str_pad(\"{$date['mday']}\", 2, '0', STR_PAD_LEFT);\n\t\t$bits['d'] = $date['mday'];\n\n\t\t$pattern = preg_replace('/M{3,4}/', 'MM', $this->pattern);\n\t\treturn str_replace(array_keys($bits), $bits, $pattern);\n\t}", "title": "" }, { "docid": "bd1b4f46ce9b741f8e597901da128c23", "score": "0.5703109", "text": "public function dateFormated(){\n $date = Carbon::createFromFormat('Y-m-d', $this->date);\n\n return $date->day.' '.self::MONTHS[$date->month - 1].' '.$date->year;\n }", "title": "" }, { "docid": "7d748f9aa03bd2eed401a4875f48dc25", "score": "0.57021123", "text": "public static function format(\\DateTime $date)\n {\n return $date->format('Y-m-d');\n }", "title": "" }, { "docid": "818da53d4f346d317cd92f825dbbf8f2", "score": "0.57014084", "text": "function formatDateYMD($date) {\n $date = only_number($date);\n if (strlen($date) !== 8) return false;\n\n $date = sprintf(\n '%1$s-%2$s-%3$s',\n substr($date, 4, 4),\n substr($date, 2, 2),\n substr($date, 0, 2)\n );\n \n return $date;\n\n}", "title": "" }, { "docid": "e513e53ff7c609513302b0535bb04d64", "score": "0.56835705", "text": "protected function getDateStringForDB () {\n if ($date = $this->getDate()) {\n return $date->format('Y-m-d');\n }\n return '';\n }", "title": "" }, { "docid": "948e88c34e8a74134f49443f8ee71462", "score": "0.5677576", "text": "function wdts_get_format_date_time( $get_date_format_only ) {\n\t$option = wdts_option();\n\t$date = $option['date_format'] ? wdts_convert_date_format( $option['date_format'] ) : 'm/d/Y';\n\t$format = $date;\n\n\treturn $format;\n}", "title": "" }, { "docid": "1359cedec1a9ca292cbbaaffffae5802", "score": "0.5667044", "text": "function formatDate($date)\r\n{\r\n\t$year = getYear($date);\r\n\t$month = getMonth($date);\r\n\t$day = getDay($date);\r\n\tif($month[0] == \"0\") $month = $month[1];\r\n\tif($day[0] == \"0\") $day = $day[1];\r\n\treturn $month.\"/\".$day.\"/\".$year; \r\n}", "title": "" }, { "docid": "3ccfc7c79e4097e065ac18bb85b271f4", "score": "0.5661935", "text": "function adodb_strftime($fmt, $ts=false,$is_gmt=false)\n{\nglobal $ADODB_DATE_LOCALE;\n\n\tif (!defined('ADODB_TEST_DATES')) {\n\t\tif ((abs($ts) <= 0x7FFFFFFF)) { // check if number in 32-bit signed range\n\t\t\tif (!defined('ADODB_NO_NEGATIVE_TS') || $ts >= 0) // if windows, must be +ve integer\n\t\t\t\treturn ($is_gmt)? @gmstrftime($fmt,$ts): @strftime($fmt,$ts);\n\n\t\t}\n\t}\n\n\tif (empty($ADODB_DATE_LOCALE)) {\n\t/*\n\t\t$tstr = strtoupper(gmstrftime('%c',31366800)); // 30 Dec 1970, 1 am\n\t\t$sep = substr($tstr,2,1);\n\t\t$hasAM = strrpos($tstr,'M') !== false;\n\t*/\n\t\t# see http://phplens.com/lens/lensforum/msgs.php?id=14865 for reasoning, and changelog for version 0.24\n\t\t$dstr = gmstrftime('%x',31366800); // 30 Dec 1970, 1 am\n\t\t$sep = substr($dstr,2,1);\n\t\t$tstr = strtoupper(gmstrftime('%X',31366800)); // 30 Dec 1970, 1 am\n\t\t$hasAM = strrpos($tstr,'M') !== false;\n\n\t\t$ADODB_DATE_LOCALE = array();\n\t\t$ADODB_DATE_LOCALE[] = strncmp($tstr,'30',2) == 0 ? 'd'.$sep.'m'.$sep.'y' : 'm'.$sep.'d'.$sep.'y';\n\t\t$ADODB_DATE_LOCALE[] = ($hasAM) ? 'h:i:s a' : 'H:i:s';\n\n\t}\n\t$inpct = false;\n\t$fmtdate = '';\n\tfor ($i=0,$max = strlen($fmt); $i < $max; $i++) {\n\t\t$ch = $fmt[$i];\n\t\tif ($ch == '%') {\n\t\t\tif ($inpct) {\n\t\t\t\t$fmtdate .= '%';\n\t\t\t\t$inpct = false;\n\t\t\t} else\n\t\t\t\t$inpct = true;\n\t\t} else if ($inpct) {\n\n\t\t\t$inpct = false;\n\t\t\tswitch($ch) {\n\t\t\tcase '0':\n\t\t\tcase '1':\n\t\t\tcase '2':\n\t\t\tcase '3':\n\t\t\tcase '4':\n\t\t\tcase '5':\n\t\t\tcase '6':\n\t\t\tcase '7':\n\t\t\tcase '8':\n\t\t\tcase '9':\n\t\t\tcase 'E':\n\t\t\tcase 'O':\n\t\t\t\t/* ignore format modifiers */\n\t\t\t\t$inpct = true;\n\t\t\t\tbreak;\n\n\t\t\tcase 'a': $fmtdate .= 'D'; break;\n\t\t\tcase 'A': $fmtdate .= 'l'; break;\n\t\t\tcase 'h':\n\t\t\tcase 'b': $fmtdate .= 'M'; break;\n\t\t\tcase 'B': $fmtdate .= 'F'; break;\n\t\t\tcase 'c': $fmtdate .= $ADODB_DATE_LOCALE[0].$ADODB_DATE_LOCALE[1]; break;\n\t\t\tcase 'C': $fmtdate .= '\\C?'; break; // century\n\t\t\tcase 'd': $fmtdate .= 'd'; break;\n\t\t\tcase 'D': $fmtdate .= 'm/d/y'; break;\n\t\t\tcase 'e': $fmtdate .= 'j'; break;\n\t\t\tcase 'g': $fmtdate .= '\\g?'; break; //?\n\t\t\tcase 'G': $fmtdate .= '\\G?'; break; //?\n\t\t\tcase 'H': $fmtdate .= 'H'; break;\n\t\t\tcase 'I': $fmtdate .= 'h'; break;\n\t\t\tcase 'j': $fmtdate .= '?z'; $parsej = true; break; // wrong as j=1-based, z=0-basd\n\t\t\tcase 'm': $fmtdate .= 'm'; break;\n\t\t\tcase 'M': $fmtdate .= 'i'; break;\n\t\t\tcase 'n': $fmtdate .= \"\\n\"; break;\n\t\t\tcase 'p': $fmtdate .= 'a'; break;\n\t\t\tcase 'r': $fmtdate .= 'h:i:s a'; break;\n\t\t\tcase 'R': $fmtdate .= 'H:i:s'; break;\n\t\t\tcase 'S': $fmtdate .= 's'; break;\n\t\t\tcase 't': $fmtdate .= \"\\t\"; break;\n\t\t\tcase 'T': $fmtdate .= 'H:i:s'; break;\n\t\t\tcase 'u': $fmtdate .= '?u'; $parseu = true; break; // wrong strftime=1-based, date=0-based\n\t\t\tcase 'U': $fmtdate .= '?U'; $parseU = true; break;// wrong strftime=1-based, date=0-based\n\t\t\tcase 'x': $fmtdate .= $ADODB_DATE_LOCALE[0]; break;\n\t\t\tcase 'X': $fmtdate .= $ADODB_DATE_LOCALE[1]; break;\n\t\t\tcase 'w': $fmtdate .= '?w'; $parseu = true; break; // wrong strftime=1-based, date=0-based\n\t\t\tcase 'W': $fmtdate .= '?W'; $parseU = true; break;// wrong strftime=1-based, date=0-based\n\t\t\tcase 'y': $fmtdate .= 'y'; break;\n\t\t\tcase 'Y': $fmtdate .= 'Y'; break;\n\t\t\tcase 'Z': $fmtdate .= 'T'; break;\n\t\t\t}\n\t\t} else if (('A' <= ($ch) && ($ch) <= 'Z' ) || ('a' <= ($ch) && ($ch) <= 'z' ))\n\t\t\t$fmtdate .= \"\\\\\".$ch;\n\t\telse\n\t\t\t$fmtdate .= $ch;\n\t}\n\t//echo \"fmt=\",$fmtdate,\"<br>\";\n\tif ($ts === false) $ts = time();\n\t$ret = adodb_date($fmtdate, $ts, $is_gmt);\n\treturn $ret;\n}", "title": "" }, { "docid": "acdec9e8772a67290397d9fabc7ca049", "score": "0.5655912", "text": "function formatDate($format = '',$date = '')\n{\n\tif($format)\n\t\treturn date($format,strtotime($date));\n\telse\n\t\treturn date('Y-m-d H:i:s');\n}", "title": "" }, { "docid": "92e26a1bc57864760d213170b12b307d", "score": "0.5643239", "text": "protected function getDateFormat()\n {\n return 'Y-m-d H:i:s';\n }", "title": "" }, { "docid": "4d584f42fc9a801a237359d0aa53afe0", "score": "0.5638899", "text": "function change_format_date($date, $format = 'm/d/Y'){\n\t/*return \\Carbon::parse(strtotime($date))->format($format);*/\n\treturn date($format, strtotime($date));\n}", "title": "" }, { "docid": "804930cb4b7e1c4aa9637f0f0a6cd2de", "score": "0.56300396", "text": "public function date_format($date = '', $format = \"d/m/Y\"){\n\n\t\treturn is_int($date) ? date( $format, $date ) : date_format( date_create($date), $format );\n\n\t}", "title": "" }, { "docid": "a04207e287f4a926c3b7a1f328319039", "score": "0.56262726", "text": "function DateStr($dD, $typeN = DATE_Full, $css = 0) {\n switch ($typeN) {\n case DATE_Full: $f = '%d %B %Y'; break; // f: full form e.g. 03 February 2011\n case DATE_Short: $f = '%d/%m/%Y'; break; // s: short form e.g. 03 Feb 2011 or 03/02/2011 or 03.02.2011 as per preferences\n case DATE_iXBRL: $f = '%Y-%m-%d'; break; // x: iXBRL form e.g. 2011-02-03\n case DATE_Year: $f = '%Y'; break; // y: year form e.g. 2011\n }\n if ($dS = eeDtoStr($dD, $f)) {\n if ($css) $dS = \"<span class='$css'>$dS</span>\";\n }\n return $dS;\n}", "title": "" }, { "docid": "2e59caebbc9a6f23a267aa9ddc3667a8", "score": "0.5624078", "text": "function frenchtojd ($month, $day, $year) {}", "title": "" }, { "docid": "584471e9ad36836f828a4b38a5167edf", "score": "0.5623616", "text": "function getDateFormat( $year, $month, $day, $type ){\n\t\t// Transform to translation strings\n\t\tif( empty( $year )){\n\t\t\t$year = 0;\n\t\t}\n\n\t\tif( empty( $month )){\n\t\t\t$month = 0;\n\t\t}\n\n\t\tif( empty( $day )){\n\t\t\t$day = 1;\n\t\t}\n\n\t\tstatic $format_type;\n\t\tif (!isset($format_type)) {\n\t\t\t$cfg = & JEVConfig::getInstance();\n\t\t\t$format_type\t= $cfg->get('com_dateformat');\n\t\t}\n\t\t$datestp\t\t= ( mktime( 0, 0, 0, $month, $day, $year ));\n\n\t\t// if date format is from langauge file then do this first\n\t\tif( $format_type == 3 ){\n\t\t\treturn JEV_CommonFunctions::jev_strftime(JText::_(\"DATE_FORMAT_\".$type),$datestp);\n\t\t}\n\t\t\n\t\tswitch( $type ){\n\t\t\tcase '0':\n\t\t\t\tif( $format_type == 0 ){\n\t\t\t\t\treturn JEV_CommonFunctions::jev_strftime(\"%A, %d %B %Y\",$datestp);\n\t\t\t\t\t// Fr style : Monday 03 Juillet 2003\n\t\t\t\t}elseif( $format_type == 1 ){\n\t\t\t\t\treturn JEV_CommonFunctions::jev_strftime(\"%A, %B %d, %Y\",$datestp);\n\t\t\t\t\t// Us style : Monday, July 03, 2003\n\t\t\t\t}else{\n\t\t\t\t\t//return strftime(\"%A, %e. %B %Y\",$datestp);\n\t\t\t\t\t// %e not supported by windows\n\t\t\t\t\treturn sprintf(JEV_CommonFunctions::jev_strftime(\"%A, %%s. %B %Y\",$datestp), intval(JEV_CommonFunctions::jev_strftime('%d', $datestp)));\n\t\t\t\t\t// De style : Montag, 3. Juli 2003\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase '1':\n\t\t\t\tif( $format_type == 0 ){\n\t\t\t\t\treturn JEV_CommonFunctions::jev_strftime(\"%d %B %Y\",$datestp);\n\t\t\t\t\t// Fr style : 23 Juillet 2003\n\t\t\t\t}elseif( $format_type == 1 ){\n\t\t\t\t\treturn JEV_CommonFunctions::jev_strftime(\"%B %d, %Y\",$datestp);\n\t\t\t\t\t// Us style : July 23, 2003\n\t\t\t\t}else{\n\t\t\t\t\treturn JEV_CommonFunctions::jev_strftime(\"%d. %B %Y\",$datestp);\n\t\t\t\t\t// De style : 23. Juli 2003\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase '2':\n\t\t\t\tif( $format_type == 0 ){\n\t\t\t\t\treturn JEV_CommonFunctions::jev_strftime(\"%d %B\",$datestp);\n\t\t\t\t\t// Fr style : 23 Juillet\n\t\t\t\t}elseif( $format_type == 1 ){\n\t\t\t\t\treturn JEV_CommonFunctions::jev_strftime(\"%B %d\",$datestp);\n\t\t\t\t\t// Us style : Juillet 23\n\t\t\t\t}else{\n\t\t\t\t\treturn JEV_CommonFunctions::jev_strftime(\"%d. %B\",$datestp);\n\t\t\t\t\t// De style : 23. Juli\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase '3':\n\t\t\t\tif( $format_type == 0 ){\n\t\t\t\t\treturn JEV_CommonFunctions::jev_strftime(\"%B %Y\",$datestp);\n\t\t\t\t\t// Fr style : Juillet 2003\n\t\t\t\t}elseif( $format_type == 1 ){\n\t\t\t\t\treturn JEV_CommonFunctions::jev_strftime(\"%B, %Y\",$datestp);\n\t\t\t\t\t// Us style : Juillet, 2003\n\t\t\t\t}else{\n\t\t\t\t\treturn JEV_CommonFunctions::jev_strftime(\"%B %Y\",$datestp);\n\t\t\t\t\t// De style : Juli 2003\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase '4':\n\t\t\t\tif( $format_type == 0 ){\n\t\t\t\t\treturn JEV_CommonFunctions::jev_strftime(\"%d/%m/%Y\",$datestp);\n\t\t\t\t\t// Fr style : 23/07/2003\n\t\t\t\t}elseif( $format_type == 1){\n\t\t\t\t\treturn JEV_CommonFunctions::jev_strftime(\"%m/%d/%Y\",$datestp);\n\t\t\t\t\t// Us style : 07/23/2003\n\t\t\t\t}else{\n\t\t\t\t\treturn JEV_CommonFunctions::jev_strftime(\"%d.%m.%Y\",$datestp);\n\t\t\t\t\t// De style : 23.07.2003\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase '5':\n\t\t\t\tif( $format_type == 0 ){\n\t\t\t\t\treturn JEV_CommonFunctions::jev_strftime(\"%d/%m\",$datestp);\n\t\t\t\t\t// Fr style : 23/07\n\t\t\t\t}elseif( $format_type == 1 ){\n\t\t\t\t\treturn JEV_CommonFunctions::jev_strftime(\"%m/%d\",$datestp);\n\t\t\t\t\t// Us style : 07/23\n\t\t\t\t}else{\n\t\t\t\t\treturn JEV_CommonFunctions::jev_strftime(\"%d.%m.\",$datestp);\n\t\t\t\t\t// De style : 23.07.\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase '6':\n\t\t\t\tif( $format_type == 0 ){\n\t\t\t\t\treturn JEV_CommonFunctions::jev_strftime(\"%m/%Y\",$datestp);\n\t\t\t\t\t// Fr style : 07/2003\n\t\t\t\t}elseif( $format_type == 1 ){\n\t\t\t\t\treturn JEV_CommonFunctions::jev_strftime(\"%m/%Y\",$datestp);\n\t\t\t\t\t// Us style : 07/2003\n\t\t\t\t}else{\n\t\t\t\t\treturn JEV_CommonFunctions::jev_strftime(\"%m/%Y\",$datestp);\n\t\t\t\t\t// De style : 07/2003\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase '7':\n\t\t\t\tif( $format_type == 0 ){\n\t\t\t\t\treturn JEV_CommonFunctions::jev_strftime(\"%A, %d\",$datestp);\n\t\t\t\t\t// Fr style : Monday 23\n\t\t\t\t}elseif( $format_type == 1 ){\n\t\t\t\t\treturn JEV_CommonFunctions::jev_strftime(\"%A, %d\",$datestp);\n\t\t\t\t\t// Us style : Monday, 23\n\t\t\t\t}else{\n\t\t\t\t\treturn JEV_CommonFunctions::jev_strftime(\"%A, %d.\",$datestp);\n\t\t\t\t\t// De style : Montag, 23.\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t\treturn $newdate;\n\t}", "title": "" } ]
3189426d399019a14229cb04dd25f095
Set default set of text attribute(s) associated with `Intl` number formatter. Array with keys describing number formatter constants and with values describing specific values.
[ { "docid": "1ccdf3798cb30b62e51c850bd60fbf77", "score": "0.5837859", "text": "public function SetIntlDefaultTextAttributes ($intlDefaultTextAttributes = []) {\n\t\t$this->intlDefaultTextAttributes = $intlDefaultTextAttributes;\n\t\treturn $this;\n\t}", "title": "" } ]
[ { "docid": "6c7ff1f29e62c07f1d05ba115a0c9d5e", "score": "0.5446024", "text": "function setStandardArraysAttributes() {\n\t\tglobal $mod_strings;\n\t\tglobal $app_list_strings; // using from month _dom list\n\n\t\t$suffArr = array('','st','nd','rd');\n\t\tfor($i=1; $i<32; $i++) {\n\t\t\tif($i > 3 && $i < 21) {\n\t\t\t\t$this->suffixArray[$i] = $i.\"th\";\n\t\t\t} elseif (substr($i,-1,1) < 4 && substr($i,-1,1) > 0) {\n\t\t\t\t$this->suffixArray[$i] = $i.$suffArr[substr($i,-1,1)];\n\t\t\t} else {\n\t\t\t\t$this->suffixArray[$i] = $i.\"th\";\n\t\t\t}\n\t\t\t$this->datesArray[$i] = $i;\n\t\t}\n\n\t\t$this->dayInt = array('*',1,2,3,4,5,6,0);\n\t\t$this->dayLabel = array('*',$mod_strings['LBL_MON'],$mod_strings['LBL_TUE'],$mod_strings['LBL_WED'],$mod_strings['LBL_THU'],$mod_strings['LBL_FRI'],$mod_strings['LBL_SAT'],$mod_strings['LBL_SUN']);\n\t\t$this->monthsInt = array(0,1,2,3,4,5,6,7,8,9,10,11,12);\n\t\t$this->monthsLabel = $app_list_strings['dom_cal_month_long'];\n\t\t$this->metricsVar = array(\"*\", \"/\", \"-\", \",\");\n\t\t$this->metricsVal = array(' every ','',' thru ',' and ');\n\t}", "title": "" }, { "docid": "dcfe24db1141a9fc655b2d120c8b38d3", "score": "0.53126574", "text": "private function get_font_default_values() {\r\n return $this->font_default_values;\r\n }", "title": "" }, { "docid": "bb83914fafb5b10e9d7c6546b722c3c8", "score": "0.5048493", "text": "private function getTextColorOptions() {\n return [\n 'white' => $this->t('White'),\n 'black' => $this->t('Black'),\n ];\n }", "title": "" }, { "docid": "1288e473a041e9465c97f5f90dc57de2", "score": "0.504469", "text": "public function providerNumberFormat()\n {\n return [\n [1024, \"1,024\"],\n [1024.23, \"1,024.23\"],\n [100.23, \"100.23\"],\n [\"test\", \"0\"]\n ];\n }", "title": "" }, { "docid": "2a256b4c54c62fd80da47a17dff80321", "score": "0.50173974", "text": "public function SetIntlDefaultAttributes ($intlDefaultAttributes = []) {\n\t\t$this->intlDefaultAttributes = $intlDefaultAttributes;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "8e5d7437c5822ed6c4d381c1c4b57b60", "score": "0.4944743", "text": "public function fontsize_formats( $initArray ) {\n $initArray['fontsize_formats'] = \"9px 10px 12px 13px 14px 16px 18px 21px 24px 28px 32px 36px\";\n return $initArray;\n }", "title": "" }, { "docid": "2641e03cebf96d5cd1ec4d93caaa4d6b", "score": "0.49250817", "text": "protected function apply_defaults() {\n // Set the default type, TYPE_TEXT.\n if (!isset($this->data['type'])) {\n $this->data['type'] = manager::TYPE_TEXT;\n }\n }", "title": "" }, { "docid": "39b52fcbdf97e8546d5056eb9e9a3154", "score": "0.48829058", "text": "public static function getLabelFormats(): array\n {\n return [\n self::LABEL_FORMAT_10_X_19_PDF => self::LABEL_FORMAT_10_X_19_PDF,\n self::LABEL_FORMAT_A4_PDF => self::LABEL_FORMAT_A4_PDF,\n self::LABEL_FORMAT_PNG => self::LABEL_FORMAT_PNG,\n self::LABEL_FORMAT_ZPL => self::LABEL_FORMAT_ZPL,\n ];\n }", "title": "" }, { "docid": "3b9eced4a90de8870264667f0fcb18d5", "score": "0.4856683", "text": "protected function getIntlNumberFormatter (\n\t\t$langAndLocale = NULL,\n\t\t$style = NULL,\n\t\t$pattern = NULL,\n\t\t$attributes = [],\n\t\t$textAttributes = []\n\t) {\n\t\t$key = implode('_', [\n\t\t\t'number',\n\t\t\tserialize(func_get_args())\n\t\t]);\n\t\tif (!isset($this->intlFormatters[$key])) {\n\t\t\t$formatter = \\numfmt_create(\n\t\t\t\t$this->langAndLocale, $style, $pattern\n\t\t\t);\n\t\t\tforeach ($attributes as $key => $value)\n\t\t\t\t\\numfmt_set_attribute($formatter, $key, $value);\n\t\t\tforeach ($textAttributes as $key => $value)\n\t\t\t\t\\numfmt_set_text_attribute($formatter, $key, $value);\n\t\t\t$this->intlFormatters[$key] = $formatter;\n\t\t}\n\t\treturn $this->intlFormatters[$key];\n\t}", "title": "" }, { "docid": "619d98d34b19995f7b49220ac98f0804", "score": "0.48410562", "text": "protected function formatByIntlNumberFormatter (\n\t\t$valueToFormat = 0.0,\n\t\t$decimalsCount = NULL,\n\t\t$style = NULL,\n\t\t$pattern = NULL ,\n\t\t$attributes = NULL,\n\t\t$textAttributes = NULL\n\t) {\n\t\tif ($decimalsCount === NULL) $decimalsCount = $this->defaultDecimalsCount;\n\t\t$attributes = is_array($attributes) \n\t\t\t? $attributes \n\t\t\t: $this->intlDefaultAttributes ;\n\t\tif (!array_key_exists(\\NumberFormatter::MIN_FRACTION_DIGITS, $attributes))\n\t\t\t$attributes[\\NumberFormatter::MIN_FRACTION_DIGITS] = $decimalsCount;\n\t\tif (!array_key_exists(\\NumberFormatter::MAX_FRACTION_DIGITS, $attributes))\n\t\t\t$attributes[\\NumberFormatter::MAX_FRACTION_DIGITS] = $decimalsCount;\n\t\t$formatter = $this->getIntlNumberFormatter(\n\t\t\t$this->langAndLocale,\n\t\t\t$style !== NULL\n\t\t\t\t? $style\n\t\t\t\t: $this->intlDefaultStyle,\n\t\t\t$pattern !== NULL\n\t\t\t\t? $pattern\n\t\t\t\t: $this->intlDefaultPattern,\n\t\t\t$attributes,\n\t\t\t$textAttributes !== NULL\n\t\t\t\t? $textAttributes\n\t\t\t\t: $this->intlDefaultTextAttributes\n\t\t);\n\t\treturn \\numfmt_format($formatter, $valueToFormat);\n\t}", "title": "" }, { "docid": "d4a56ba3dc6278dbf83c71b72be804b8", "score": "0.48153198", "text": "function tinymce_customize_text_sizes($initArray) {\n $initArray['fontsize_formats'] = \"8px 9px 10px 11px 12px 13px 14px 15px 16px 17px 18px 19px 20px 21px 22px 23px 24px 25px 26px 27px 28px 29px 30px 32px 48px\";\n return $initArray;\n}", "title": "" }, { "docid": "8aeb6c239ba69426d238986219c7f89c", "score": "0.47954255", "text": "public function enrich_defaults() {\n\t\t$extra_defaults_per_term = apply_filters( 'wpseo_add_extra_taxmeta_term_defaults', array() );\n\t\tif ( is_array( $extra_defaults_per_term ) ) {\n\t\t\tself::$defaults_per_term = array_merge( $extra_defaults_per_term, self::$defaults_per_term );\n\t\t}\n\t}", "title": "" }, { "docid": "6c8b645f723a277d4bad9445b0dab1a8", "score": "0.4793625", "text": "protected function setLabelDefaults() {\n if ($this->data['attrs']['filter_type'] === self::CATEGORY) {\n $this->data['attrs']['label_all_values'] =\n ($this->data['attrs']['label_all_values'] === \\RightNow\\Utils\\Config::getMessage(ALL_PRODUCTS_LBL))\n ? \\RightNow\\Utils\\Config::getMessage(ALL_CATEGORIES_LBL)\n : $this->data['attrs']['label_all_values'];\n\n $this->data['attrs']['label_input'] =\n ($this->data['attrs']['label_input'] === \\RightNow\\Utils\\Config::getMessage(FILTER_BY_PRODUCT_LBL))\n ? \\RightNow\\Utils\\Config::getMessage(FILTER_BY_CATEGORY_LBL)\n : $this->data['attrs']['label_input'];\n\n $this->data['attrs']['label_prompt'] =\n ($this->data['attrs']['label_prompt'] === \\RightNow\\Utils\\Config::getMessage(SELECT_A_PRODUCT_LBL))\n ? \\RightNow\\Utils\\Config::getMessage(SELECT_A_CATEGORY_LBL)\n : $this->data['attrs']['label_prompt'];\n }\n }", "title": "" }, { "docid": "04f5f380822521d2e601b9e51090e173", "score": "0.4793353", "text": "public function set_default_tick_format_string($str){\r\n\t\t$this->options['defaultTickFormatString'] = $str; //sets defaultTickFormatString property\r\n\t}", "title": "" }, { "docid": "aacd597644b71c6e361908025582a814", "score": "0.47494343", "text": "public function __construct () {\n\t\tparent::__construct();\n\t\tif (!$this->intlExtensionFormatting)\n\t\t\t$this->defaultFormatMask = '%e. %B %G, %H:%M:%S';\n\t}", "title": "" }, { "docid": "e0c5604782ef5bc8b51f45a7b55671e9", "score": "0.47311965", "text": "protected function field_default() {\n\t\t\treturn array( 'text' => false );\n\t\t}", "title": "" }, { "docid": "f11a0396004557977ad23227bd5ae5c8", "score": "0.47068655", "text": "function _setDefaults() {\n\t\t\n\t\t$this->setCSS(\"width\",(strlen($this->label)*12).\"px\");\n\t\t\n\t}", "title": "" }, { "docid": "5c2a4672d4fa43d743ef2c8fee74a632", "score": "0.46915317", "text": "function _setDefaults() {\r\n\r\n $this->setCSS(\"width\", (strlen($this->label) * 12) . \"px\");\r\n $this->setCSS(\"padding-top\", \"2px\");\r\n $this->setCSS(\"margin\", \"4px\");\r\n $this->setCSS(\"padding-bottom\", \"2px\");\r\n }", "title": "" }, { "docid": "afd1e20eb41272389607afcf4ca258ae", "score": "0.46815678", "text": "public function getTextStyles();", "title": "" }, { "docid": "9c2a1acc280907d0a00e99054dfab2d0", "score": "0.4672336", "text": "function setDefaultText($t){\n return $this->set($this->default_text=$t);\n }", "title": "" }, { "docid": "69ba84c68af4574453034eeee04c2336", "score": "0.4669277", "text": "private function _get_default_font_icons(){\n\t\treturn json_encode( array(\n\t\t\t\"~\",\n\t\t\t\"1\",\n\t\t\t\"2\",\n\t\t\t\"3\",\n\t\t\t\"4\",\n\t\t\t\"5\",\n\t\t\t\"6\",\n\t\t\t\"7\",\n\t\t\t\"8\",\n\t\t\t\"9\",\n\t\t\t\"0\",\n\t\t\t\"-\",\n\t\t\t\"+\",\n\t\t\t\"Q\",\n\t\t\t\"W\",\n\t\t\t\"E\",\n\t\t\t\"R\",\n\t\t\t\"T\",\n\t\t\t\"Y\",\n\t\t\t\"U\",\n\t\t\t\"I\",\n\t\t\t\"O\",\n\t\t\t\"P\",\n\t\t\t\"{\",\n\t\t\t\"}\",\n\t\t\t\"|\",\n\t\t\t\"A\",\n\t\t\t\"S\",\n\t\t\t\"D\",\n\t\t\t\"F\",\n\t\t\t\"G\",\n\t\t\t\"H\",\n\t\t\t\"J\",\n\t\t\t\"K\",\n\t\t\t\"L\",\n\t\t\t\":\",\n\t\t\t'\"',\n\t\t\t\"Z\",\n\t\t\t\"X\",\n\t\t\t\"C\",\n\t\t\t\"V\",\n\t\t\t\"B\",\n\t\t\t\"N\",\n\t\t\t\"M\",\n\t\t\t\"<\",\n\t\t\t\">\",\n\t\t\t\"?\",\n\t\t) );\n\t}", "title": "" }, { "docid": "7baa3b72f433870091cb75122fefb7c1", "score": "0.4639491", "text": "public function themethreads_mce_text_sizes( $initArray ){\n\t\t$initArray['fontsize_formats'] = \"9px 10px 12px 13px 14px 16px 18px 21px 24px 28px 32px 36px\";\n\t\treturn $initArray;\n\t}", "title": "" }, { "docid": "bb76baf50be30a1242e34f0b171dcdf2", "score": "0.45935196", "text": "protected function get_default_format_fields() {\n\t\treturn ['name', 'id', 'post_type', 'template', 'number_of_pages', 'type'];\n\t}", "title": "" }, { "docid": "69e270b42ae41034f50a2d40acd84358", "score": "0.4582485", "text": "function tinyMceStyleFormats($init_array)\n {\n $style_formats = array(\n // Each array child is a format with it's own settings\n array(\n 'title' => 'bold',\n 'inline' => 'span',\n 'classes' => 'bold',\n ),\n array(\n 'title' => 'semibold',\n 'inline' => 'span',\n 'classes' => 'semibold',\n ),\n array(\n 'title' => 'regular',\n 'inline' => 'span',\n 'classes' => 'regular',\n ),\n array(\n 'title' => 'light',\n 'inline' => 'span',\n 'classes' => 'light',\n ),\n array(\n 'title' => 'thin',\n 'inline' => 'span',\n 'classes' => 'thin',\n ),\n );\n // Insert the array, JSON ENCODED, into 'style_formats'\n $init_array['style_formats'] = json_encode($style_formats);\n\n return $init_array;\n }", "title": "" }, { "docid": "010b1d699e6080c1d21b27915dc4354e", "score": "0.45768481", "text": "protected function initNumbering()\n {\n $this->numbering = !isset($this->json->numbering)\n ? 'decimal'\n : $this->json->numbering;\n }", "title": "" }, { "docid": "a105833ae23f061940aa2f5c52d958fd", "score": "0.45368886", "text": "public static function resetStringFormat()\n {\n static::setStringFormat(static::DEFAULT_STRING_FORMAT);\n }", "title": "" }, { "docid": "4ab476e592f01917cb23f7d8651da316", "score": "0.45062247", "text": "function setTextColor($userRGB)\r\n {\r\n if($userRGB != \"\" && count($userRGB) == 3)\r\n $this->colorTextArray = array(0 => $userRGB[0], 1 => $userRGB[1], 2 => $userRGB[2]);\r\n }", "title": "" }, { "docid": "d4c27b2828d96d952631894a2a14997f", "score": "0.45027745", "text": "function __construct()\n\t{\n\t\tglobal $INFO;\n\n\t\t$this->num_format = ($INFO['number_format'] == 'space')\n\t\t\t? ' '\n\t\t\t: $INFO['number_format'];\n\t}", "title": "" }, { "docid": "37d1878382684a9a42ff618e4435a3f4", "score": "0.4501124", "text": "protected function defaults() {\n\t\treturn array(\n\t\t\t// translators: 1. Add Icon\n\t\t\t'add_button' => sprintf( __( 'Add %s', 'wponion' ), wpo_icon( 'wpoic-plus-circle' ) ),\n\t\t\t'remove_button' => wpo_icon( 'wpoic-delete' ),\n\t\t\t'key_input' => array(),\n\t\t\t'value_input' => array(),\n\t\t\t'limit' => false,\n\t\t\t'sort' => false,\n\t\t\t'error_msg' => __( 'You Can\\'t Add More..', 'wponion' ),\n\t\t);\n\t}", "title": "" }, { "docid": "13441d3ec2b0c539254e65d13140c564", "score": "0.44969317", "text": "function set_text_by_number($number,$text,$frame=-1)\n\t{\n\t\treturn $this->set_inner_html_by_number($number,$text,$frame);\n\t}", "title": "" }, { "docid": "9fbc864aed3511242b78fa083848d461", "score": "0.4485335", "text": "public function setDefaultMessages(array $messages = []);", "title": "" }, { "docid": "b3409872e154e395ac2ed0958085332b", "score": "0.44714794", "text": "public function testPluralSelectionSprintfFormatter(): void\n {\n I18n::setDefaultFormatter('sprintf');\n $translator = I18n::getTranslator(); // en_US\n $result = $translator->translate('%d = 0 or > 1', ['_count' => 1, 1]);\n $this->assertSame('1 is 1 (po translated)', $result);\n\n $result = $translator->translate('%d = 0 or > 1', ['_count' => 2, 2]);\n $this->assertSame('2 is 2-4 (po translated)', $result);\n }", "title": "" }, { "docid": "fdf19e33d5b71755caa4935df9f3cbcb", "score": "0.44645324", "text": "public function applyDefaultValues()\n {\n $this->importance = -1;\n $this->state = 0;\n }", "title": "" }, { "docid": "edeb3fcaf5aa900662a8bd71aaee07aa", "score": "0.4460424", "text": "private function setDefaultAttributes()\n {\n $this->attributes[HtmlAttributes::MARKUPID] = $this->id;\n }", "title": "" }, { "docid": "44bc7e1fd43f9e90f891b63795e61a5b", "score": "0.44553953", "text": "function addresses_cck_field_formatter_info() {\n $default = array(\n 'arguments' => array('element'),\n 'multiple values' => CONTENT_HANDLE_CORE,\n 'field types' => array('addresses_cck'),\n );\n $formatters = array(\n 'default' => array(\n 'label' => t('Default'),\n 'arguments' => array('element'),\n 'multiple values' => CONTENT_HANDLE_CORE,\n 'field types' => array('addresses_cck'),\n ),\n 'single_line' => array(\n 'label' => t('Single Line'),\n 'arguments' => array('element'),\n 'multiple values' => CONTENT_HANDLE_CORE,\n 'field types' => array('addresses_cck'),\n ),\n );\n\n $afields = module_invoke_all('addressesfieldapi', 'fields');\n foreach ($afields as $ftype => $field) {\n if (!empty($field['theme'])) {\n foreach ($field['theme'] as $theme => $description) {\n $formatters['addresses_field_'. $theme] = $default;\n $formatters['addresses_field_'. $theme]['label'] = $description;\n }\n }\n }\n\n return $formatters;\n}", "title": "" }, { "docid": "835b5a47d09ab09ebbfcc1006752d33d", "score": "0.44456935", "text": "function intText($element){\t\t\n\t\tif (is_numeric($element)) {\n\t\t\treturn number_format($element, 0);\n\t\t} else {\n\t\t\treturn $element;\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "7c36914da4ef953326d394308f2b9008", "score": "0.4436752", "text": "function ale_get_font_styles() {\n\treturn array(\n\t\t'normal' => 'Normal',\n\t\t'italic' => 'Italic',\n\t\t'bold' => 'Bold',\n\t\t'bold italic' => 'Bold Italic'\n\t);\n}", "title": "" }, { "docid": "062d48fc0ecedb1a51afd0a77885d199", "score": "0.4427666", "text": "protected function get_default_settings() {\n\t\treturn [\n\t\t\t'label_block' => true,\n\t\t\t'rows' => 3,\n\t\t\t'emojionearea_options' => [],\n\t\t];\n\t}", "title": "" }, { "docid": "f1114a45fc130e026083cc59d86e524c", "score": "0.4425577", "text": "public function loadDefaultDecorators() {\n\t\t$this->setDecorators(array('FormElements'));\n\n\t\t$this->addDisplayGroup(array('email', 'phone1', 'phone2'), 'contactgrp', array('legend' => 'Contact'));\n\t\t$this->contactgrp->setDecorators($this->_d->group);\n\n\t\t$this->addDisplayGroup(array('city', 'state', 'zipcode'), 'locationgrp', array('legend' => 'Location'));\n\t\t$this->locationgrp->setDecorators($this->_d->group);\n\n\t}", "title": "" }, { "docid": "2afebfc6150ead3885b4394756ece1ab", "score": "0.44146338", "text": "function sunix_header_contact_plain_text_attrs($options, $default_value){\n $opts = [\n array(\n 'title' => esc_html__('Show Plain Contact Info', 'sunix'),\n 'subtitle' => esc_html__('Show/Hide contact plain text info', 'sunix'),\n 'id' => 'header_contact_plain',\n 'type' => 'button_set',\n 'options' => $options,\n 'default' => $default_value,\n 'required' => array(\n array('header_layout', '=', array('1','2','5','6','6-white')),\n )\n ),\n array(\n 'title' => esc_html__('Icon 1', 'sunix'),\n 'id' => 'header_contact_plain_icon1',\n 'type' => 'text',\n 'default' => 'lnr lnr-phone-handset',\n 'required' => array(\n array('header_contact_plain', '=', '1'),\n )\n ),\n array(\n 'title' => esc_html__('Title 1', 'sunix'),\n 'id' => 'header_contact_plain_text1',\n 'type' => 'text',\n 'default' => '(+88)222.888.66',\n 'required' => array(\n array('header_contact_plain', '=', '1'),\n )\n ),\n array(\n 'title' => esc_html__('Description 1', 'sunix'),\n 'id' => 'header_contact_plain_subtext1',\n 'type' => 'text',\n 'default' => 'Free call',\n 'required' => array(\n array('header_contact_plain', '=', '1'),\n )\n ),\n array(\n 'title' => esc_html__('Icon 2', 'sunix'),\n 'id' => 'header_contact_plain_icon2',\n 'type' => 'text',\n 'default' => 'lnr lnr-clock',\n 'required' => array(\n array('header_contact_plain', '=', '1'),\n )\n ),\n array(\n 'title' => esc_html__('Title 2', 'sunix'),\n 'id' => 'header_contact_plain_text2',\n 'type' => 'text',\n 'default' => '8:00 AM - 6:00 PM',\n 'required' => array(\n array('header_contact_plain', '=', '1'),\n )\n ),\n array(\n 'title' => esc_html__('Description 2', 'sunix'),\n 'id' => 'header_contact_plain_subtext2',\n 'type' => 'text',\n 'default' => 'Monday - Friday',\n 'required' => array(\n array('header_contact_plain', '=', '1'),\n )\n ),\n array(\n 'title' => esc_html__('Icon 3', 'sunix'),\n 'id' => 'header_contact_plain_icon3',\n 'type' => 'text',\n 'default' => 'lnr lnr-map-marker',\n 'required' => array(\n array('header_contact_plain', '=', '1'),\n )\n ),\n array(\n 'title' => esc_html__('Title 3', 'sunix'),\n 'id' => 'header_contact_plain_text3',\n 'type' => 'text',\n 'default' => '99 Kellen Motorway',\n 'required' => array(\n array('header_contact_plain', '=', '1'),\n )\n ),\n array(\n 'title' => esc_html__('Description 3', 'sunix'),\n 'id' => 'header_contact_plain_subtext3',\n 'type' => 'text',\n 'default' => 'Wallis and Futuna',\n 'required' => array(\n array('header_contact_plain', '=', '1'),\n )\n ),\n ];\n \n return $opts;\n}", "title": "" }, { "docid": "8fabdd50553e674e0946977779e797dc", "score": "0.44143564", "text": "public function toArray()\n {\n return [0 => __('Default'), 1 => __('Custom')];\n }", "title": "" }, { "docid": "f41a6d4135013ee76a932fe98911e4f2", "score": "0.44124922", "text": "public function applyDefaultValues()\n {\n $this->per_birthmonth = 0;\n $this->per_birthday = 0;\n $this->per_gender = 0;\n $this->per_fmr_id = 0;\n $this->per_cls_id = 0;\n $this->per_fam_id = 0;\n $this->per_enteredby = 0;\n $this->per_editedby = 0;\n $this->per_flags = 0;\n }", "title": "" }, { "docid": "cc0b6e0ad4ecd0162f6334e887151b09", "score": "0.44118795", "text": "public function getLabelAllowableValues()\n {\n return [\n self::LABEL_VERIFICATION,\n self::LABEL_MX,\n self::LABEL_SPF,\n self::LABEL_DKIM,\n self::LABEL_DMARC,\n ];\n }", "title": "" }, { "docid": "ecbbc6b49ac744986ba57977532747e8", "score": "0.4396786", "text": "public function getFormattedOptions();", "title": "" }, { "docid": "276d4ed2ff200876f2189340f82f4ba1", "score": "0.43751723", "text": "function set_value_and_text() {\n\t\t\n\t\t$value = $this->fieldProp('value');\n\t\t\n\t\tif ( empty($value) ) {\n\t\t\t$this->setHtml('value', '');\n\t\t\t$this->setHtml('text', 'Edit');\t\n\t\t}\n\t\telse {\n\t\t\t\n\t\t\t$this->setHtml('value', $value);\n\t\t\t\n\t\t\tif ( is_numeric($value) )\n\t\t\t\t$this->setHtml('text', number_format($value, $this->getOption('decimals')));\n\t\t\t\n\t\t\telse\n\t\t\t\t$this->setHtml('text', $value);\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "270da2e71705e2ef0d12163c5b86d44b", "score": "0.4361991", "text": "public function populateDefaults()\n {\n // Populate Defaults (from parent):\n \n parent::populateDefaults();\n \n // Populate Defaults:\n \n $this->Label = _t(__CLASS__ . 'DEFAULTLABEL', 'Scroll to Top');\n }", "title": "" }, { "docid": "ae1b4c774708ac31e85e02e4c7f6581e", "score": "0.43602854", "text": "public function getLabelList()\n {\n return array(\n '0' => '<span class=\"label label-success\">None</span>',\n '1' => '<span class=\"label label-info\">New</span>',\n '2' => '<span class=\"label label-important\">Hot!</span>',\n );\n }", "title": "" }, { "docid": "b504fb3e69a320f7642c933f9dd85412", "score": "0.43594944", "text": "public function providerTestFormatAmount() {\n return [\n ['BLA 12,345.68', '12345.6789', '12345.68'],\n ['BLA 12,345.6789', '12345.6789', '12345.6789'],\n ];\n }", "title": "" }, { "docid": "3cdf2ef4426e0f4a925229b4fa0d6728", "score": "0.43462688", "text": "public function labelledArraysProvider()\n\t{\n\t\treturn array(\n\t\t\t'with labels' => array('#useFirstLineAsLabels'.PHP_EOL.'Name,Email,Phone'.PHP_EOL.'Mark,[email protected],998'.PHP_EOL.'Noemi,[email protected],888')\n\t\t);\n\t}", "title": "" }, { "docid": "4cd8730d57d02a507f7c928b22396488", "score": "0.4345653", "text": "public function get_term_meta_defaults() {\n\t\t/**\n\t\t * @since 2.1.8\n\t\t * @param array $defaults\n\t\t */\n\t\treturn (array) \\apply_filters( 'the_seo_framework_term_meta_defaults', [\n\t\t\t'doctitle' => '',\n\t\t\t'description' => '',\n\t\t\t'noindex' => 0,\n\t\t\t'nofollow' => 0,\n\t\t\t'noarchive' => 0,\n\t\t\t'saved_flag' => 0, // Don't touch, used to prevent data conflict with Genesis.\n\t\t] );\n\t}", "title": "" }, { "docid": "c74838f322221ecfd21be75fad4ec639", "score": "0.43415084", "text": "public function providerMoneyToDefaultConvert()\n {\n return array(\n array('0,00' , '0.00'),\n array('1,11' , '1.11'),\n array('1,000' , '1.00'),\n array('1000' , '1000.00'),\n array('1.234,56' , '1234.56'),\n array('1.000.000,00', '1000000.00'),\n array('1.000.000' , '1000000.00'),\n array('0,000' , '0.00'),\n array('1,111' , '1.11'),\n );\n }", "title": "" }, { "docid": "5dadc09a40a210882e99253a4b67d384", "score": "0.43403962", "text": "public function getDefaultValuesForEdit()\n {\n return [\n 'is_use_cron' => self::CRON_DISABLED,\n 'scopre' => self::SCOPE_EMPTY,\n 'assign_type' => self::ASSIGN_INDIVIDUAL_ITEMS,\n ];\n }", "title": "" }, { "docid": "9ca2bc0a5076c0f24668c281009b6c60", "score": "0.43347174", "text": "public function getDefaultAttributes()\n {\n return [\n 'type' => 'text/css',\n 'media' => 'all'\n ];\n }", "title": "" }, { "docid": "0ecd58b46b194412effe595c9e04c283", "score": "0.4327049", "text": "public function getSettingLabels()\n {\n return array();\n }", "title": "" }, { "docid": "3060338b403a1f7e0f3bad945db0fd87", "score": "0.43208307", "text": "public function initTSLabelMarkers(&$formatter, $confId, $marker, $defaultMarkerArr = 0)\n {\n $arr1 = [];\n if ($labels = $formatter->configurations->get($confId.'labels')) {\n $labels = Strings::trimExplode(',', $labels);\n $labelArr = [];\n foreach ($labels as $label) {\n // Für die Abfrage nach den Labels dürfen keine Punkte als Trenner verwendet werden\n // Daher Umwandlung in Underscores\n $labelId = str_replace('.', '_', $confId.'label.'.$label);\n $labelArr['label_'.$label] = $formatter->configurations->getLL($labelId);\n }\n $arr1 = $formatter->getItemMarkerArrayWrapped($labelArr, $confId, 0, $marker.'_');\n }\n $this->defaultMarkerArr = array_merge($arr1, $this->defaultMarkerArr);\n\n return $this->defaultMarkerArr;\n }", "title": "" }, { "docid": "9c1eccadb7638fe0cfa24de7911e8d02", "score": "0.43106914", "text": "public function initMessages()\n {\n $this->messages = [\n 'numeric' => '{{name}} Debe ser numerico',\n 'noWhitespace' => '{{name}} Espacios en blanco',\n 'notEmpty' => '{{name}} Campo Requerido.'\n ];\n }", "title": "" }, { "docid": "0651e128e58495226e051bc4e612e01b", "score": "0.43100914", "text": "function form_calendar_text(): array\n {\n $now = \\Carbon\\Carbon::now();\n $startOfWeek = $now->startOfWeek(\\Carbon\\Carbon::SUNDAY);\n $days = $months = $monthsShort = [];\n for ($i = 0; $i < 7; $i++) {\n $days[] = $startOfWeek->isoFormat('dd');\n $startOfWeek->addDay();\n }\n for ($i = 1; $i <= 12; $i++) {\n $day = \\Carbon\\Carbon::createFromDate(2020, $i);\n $months[] = $day->isoFormat('MMMM');\n $monthsShort[] = $day->isoFormat('MMM');\n }\n $localization = [\n 'days' => $days,\n 'months' => $months,\n 'monthsShort' => $monthsShort,\n 'today' => __('Hari ini'),\n 'now' => __('Sekarang'),\n ];\n\n return $localization;\n }", "title": "" }, { "docid": "8f2743131e606bce279aee98e544e487", "score": "0.42990634", "text": "public static function getDefaultDecorators()\n {\n return array(\n 'FormElements',\n array('Description', array('placement' => 'prepend',\n 'class' => 'description')),\n 'Fieldset',\n );\n }", "title": "" }, { "docid": "e400f9ccb97afc500dfd394af0cbdba7", "score": "0.4291609", "text": "protected function getDefaultControlValues()\n {\n return [];\n }", "title": "" }, { "docid": "9f044d66b7c5ce7542740135eeab3828", "score": "0.4289403", "text": "function my_custom_styles( $init_array ) { \n \n $style_formats = array( \n // These are the custom styles \n array( \n 'title' => 'Big Paragraph', \n 'block' => 'span', \n 'classes' => 'big-paragraph',\n 'wrapper' => true,\n ),\n array( \n 'title' => 'Capitulate Letter', \n 'block' => 'span', \n 'classes' => 'capitulate-letter',\n 'wrapper' => true,\n ),\n array( \n 'title' => 'Relate-Article Link', \n 'block' => 'span', \n 'classes' => 'related-article',\n 'wrapper' => true,\n )\n ); \n // Insert the array, JSON ENCODED, into 'style_formats'\n $init_array['style_formats'] = json_encode( $style_formats ); \n \n return $init_array; \n \n}", "title": "" }, { "docid": "f4a7d27c79e4b3efe38d0f98db1abc76", "score": "0.42892668", "text": "public function set_point_labels($def){\r\n\t\t//check the 1st degree of the array dimension to see if there is any renderer defined\r\n\t\tforeach($def as $key=>$item1){\r\n\t\t\t// if($key == 'renderer') $def[$key] = '###'.$item1.'###'; //If any renderer defined, then append and prepend '###' to that property\r\n\t\t\tif($key == 'renderer') $def[$key] = $item1; \r\n\t\t}\r\n\t\t$this->options['pointLabels'] = $def; //Assigns the array into pointLabels property\r\n\t}", "title": "" }, { "docid": "f7fb2c648d1047aa58a2317fb034e64a", "score": "0.42850617", "text": "public function setI18nDefaultLocales(array $locales);", "title": "" }, { "docid": "d7dff83fb2a88250ef58713fdc5bf836", "score": "0.42828962", "text": "public function applyDefaultValues()\n {\n $this->event_type = 0;\n $this->event_title = '';\n $this->inactive = 0;\n $this->event_typename = '';\n $this->location_id = 0;\n $this->primary_contact_person_id = 0;\n $this->secondary_contact_person_id = 0;\n }", "title": "" }, { "docid": "04a61f64d1faefa65835ef205b6cf05f", "score": "0.42773655", "text": "public static function getDefaultLocale()\n {\n }", "title": "" }, { "docid": "8c12156c5767f05f8f9963bba7082ece", "score": "0.42763764", "text": "public function dataProviderNoLabelTest()\n {\n return [\n ['-1 day', '#<time title=\".*?\">yesterday</time>#'],\n ['+1 day', '#<time title=\".*?\">tomorrow</time>#'],\n ['-2 day', '#<time title=\".*?\">2 days</time>#'],\n ['-1 year', '#<time title=\".*?\">1 year</time>#'],\n ['+5 seconds', '#<time title=\".*?\">momentarily</time>#'],\n ['-2 year', '#<time title=\".*?\">2 years</time>#'],\n ];\n }", "title": "" }, { "docid": "8a8c2157da1f30d1bbd018601d9be0fd", "score": "0.42759487", "text": "public function getDefaultValue()\n {\n $columnValue = ($this->bootstrapVersion == '2.x') ? \"span3\" : \"col-md-5\";\n\n $value = '\n {\n \"0\" : {\n \"width\": \"' . $columnValue . '\"\n }\n }';\n\n return array('Content' => $value);\n }", "title": "" }, { "docid": "be19f9419affbe4085ae142ec3a59a2f", "score": "0.42758584", "text": "protected function setDefaultLabel(): void\n {\n $this->defaultOptions['label'] = __($this->renderName());\n }", "title": "" }, { "docid": "47b7e2ab774de495b212b98740a62c0b", "score": "0.4240398", "text": "public function defaults() {\n\t\t\treturn array(\n\t\t\t\t'post_content_style' => 'style-1',\n\t\t\t\t'module_animation' => '',\n\t\t\t\t'carousel_mode' => 'off',\n\t\t\t\t'single_custom_post_item' => '',\n\t\t\t\t'post_show_title' => 'on',\n\t\t\t\t'post_show_subtitle' => 'on',\n\t\t\t\t'post_show_price' => 'on',\n\t\t\t\t'post_show_rating' => 'on',\n\t\t\t\t'post_show_content' => 'on',\n\t\t\t\t'post_show_add_to_cart' => 'on',\n\t\t\t\t'post_show_wishlist' => 'on',\n\t\t\t\t'post_content_alignment' => 'text-left',\n\t\t\t\t'title_font_options' => '',\n\t\t\t\t'title_google_fonts' => 'off',\n\t\t\t\t'title_custom_fonts' => '',\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "82f5a821e90587e764413bc131b60385", "score": "0.42330003", "text": "function get_default_values()\n\t{\n\t\t$output = array();\n\t\t$config = &Options_Framework::_optionsframework_options();\n\t\tforeach ((array) $config as $option) {\n\t\t\tif (!isset($option['id'])) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (!isset($option['std'])) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (!isset($option['type'])) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (has_filter('of_sanitize_' . $option['type'])) {\n\t\t\t\t$output[$option['id']] = apply_filters('of_sanitize_' . $option['type'], $option['std'], $option);\n\t\t\t}\n\t\t}\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "11ad6a074666008936c18b7cf4bd33d1", "score": "0.4228799", "text": "public function testPluralSelectionBasicFormatter(): void\n {\n $translator = I18n::getTranslator('special');\n $result = $translator->translate('There are {0} things', ['_count' => 2, 'plenty']);\n $this->assertSame('There are plenty things', $result);\n\n $result = $translator->translate('There are {0} things', ['_count' => 1]);\n $this->assertSame('There is only one', $result);\n }", "title": "" }, { "docid": "594e8cc4c6f59615a6595d89c35a330b", "score": "0.42228577", "text": "public function setTexts( $value ) {\n \n $this->texts = $value;\n \n }", "title": "" }, { "docid": "21bdb1bbe10d9c2d1d0765098fdaa6ac", "score": "0.42216986", "text": "public function get_defaults(){\r\n\t\tif( !isset( $this->defaults )) {\r\n\t\t\t$this->defaults = array(\r\n\t\t\t\t'target_time' => date('Y-m-d H:i:s')\r\n\t\t\t\t//,'format' => '<div class=\"date\"><span class=\"date-week\">#weeks#</span> <span class=\"date-month\">#mon#</span>#d-sep#<span class=\"date-day\">#mday#</span>#d-sep#<span class=\"date-year\">#year#</span></div> <div class=\"time\"><span class=\"time-hour\">#hours#</span>#t-sep#<span class=\"time-minutes\">#minutes#</span>#t-sep#<span class=\"time-seconds\">#seconds#</span></div>'\r\n\t\t\t\t,'format' => '<div class=\"date\"><span class=\"date-month\">{l(Months)}%m</span>#d-sep#<span class=\"date-day\">{l(Days)}%d</span>#d-sep#<span class=\"date-year\">{l(Years)}%y</span></div> <div class=\"time\"><span class=\"time-hour\">{l(Hours)}%H</span>#t-sep#<span class=\"time-minutes\">{l(Minutes)}%M</span>#t-sep#<span class=\"time-seconds\">{l(Seconds)}%S</span></div>'\r\n\t\t\t\t,'date_separator' => '<span class=\"d-sep\">/</span>'\r\n\t\t\t\t,'time_separator' => '<span class=\"t-sep\">:</span>'\r\n\t\t\t\t, 'label_format' => '<em>%s</em> '\r\n\t\t\t\t, 'timezone' => 'America/New_York'\t//per http://php.net/manual/en/datetime.settimezone.php\r\n\t\t\t\t, 'complete_text' => 'It\\'s Over!'\r\n\t\t\t\t/*\r\n\t\t\t\t,'title' => 'Countdown:'\r\n\t\t\t\t,'link' => ''\r\n\t\t\t\t*/\r\n\t\t\t\t// ...etc\r\n\t\t\t);\r\n\t\t}// if not defaults set\r\n\t\t\r\n\t\treturn $this->defaults;\r\n\t}", "title": "" }, { "docid": "ba8f96e764547a076479d39275b1dddc", "score": "0.42193204", "text": "public function set_series_default($def){\r\n\t\t//check the 1st degree of the array dimension to see if there is any renderer defined\r\n\t\tforeach($def as $key=>$item1){\r\n\t\t\t// if($key == 'renderer') $def[$key] = '###'.$item1.'###'; //If any renderer defined, then append and prepend '###' to that property\r\n\t\t\tif($key == 'renderer') $def[$key] = $item1; \r\n\t\t}\r\n\t\t$this->options['seriesDefaults'] = $def; //Assigns the array into seriesDefaults property\r\n\t}", "title": "" }, { "docid": "4d08643c39f8d796e51b1b9012b41858", "score": "0.42137405", "text": "public static function setDefaults($values)\n {\n if (is_array($values) === false) {\n throw new TagException('An array is required as default values');\n }\n\n self::$_displayValues = $values;\n }", "title": "" }, { "docid": "de78a8d460db9623c54b6428964bf34b", "score": "0.42115125", "text": "public function setText0($value)\n {\n $this->tText0 = (string) $value;\n }", "title": "" }, { "docid": "797677676b3b8b8f75a00fad5040fe30", "score": "0.42105347", "text": "public function set_defaults() {\n\n\t\t$this->defaults = $this->get_defaults();\n\n\t}", "title": "" }, { "docid": "16d6abd52757b3824613eef743d19f57", "score": "0.42088336", "text": "function SetStylesArray($arr)\n {\n $style = '';\n foreach (['B', 'I'] as $s) {\n if (isset($arr[$s])) {\n if ($arr[$s]) {\n $this->$s = true;\n $style .= $s;\n } else {\n $this->$s = false;\n }\n } elseif ($this->$s) {\n $style .= $s;\n }\n }\n $this->currentfontstyle = $style;\n $this->SetFont('', $style, 0, false);\n }", "title": "" }, { "docid": "26d6fc0f8b0d6a13092a91fb73dc00c8", "score": "0.42051417", "text": "protected function get_text_format() {\n return FORMAT_PLAIN;\n }", "title": "" }, { "docid": "bed15091f2e613f0624b85078873ccb8", "score": "0.42018333", "text": "public function applyDefaultValues()\n {\n $this->lvl_up_hp = 0;\n $this->lvl_up_atk = 0;\n $this->lvl_up_def = 0;\n $this->lvl_up_satk = 0;\n $this->lvl_up_sdef = 0;\n $this->lvl_up_spd = 0;\n $this->add_hp = 0;\n $this->add_atk = 0;\n $this->add_def = 0;\n $this->add_satk = 0;\n $this->add_sdef = 0;\n $this->add_spd = 0;\n $this->injuries = 0;\n $this->money = 0;\n $this->skill_acrobatics = 2;\n $this->skill_athletics = 2;\n $this->skill_charm = 2;\n $this->skill_combat = 2;\n $this->skill_command = 2;\n $this->skill_general_ed = 2;\n $this->skill_medicine_ed = 2;\n $this->skill_occult_ed = 2;\n $this->skill_pokemon_ed = 2;\n $this->skill_technology_ed = 2;\n $this->skill_focus = 2;\n $this->skill_guile = 2;\n $this->skill_intimidate = 2;\n $this->skill_intuition = 2;\n $this->skill_perception = 2;\n $this->skill_stealth = 2;\n $this->skill_survival = 2;\n $this->ap_spent = 0;\n $this->ap_bound = 0;\n $this->ap_drained = 0;\n $this->sheet_type = 'SIMPLE';\n }", "title": "" }, { "docid": "de40c54fddec2ffbdb46e78122dafd3a", "score": "0.41988888", "text": "public function getDefaults()\n {\n $defaults = parent::getDefaults();\n $showLevel = PHP_CodeSniffer::getConfigData('show_level');\n if ($showLevel === null) {\n if ($defaults['showWarnings']) {\n $defaults['showLevel'] = SQLI_CodeSniffer_Reports::WARNING;\n } else {\n $defaults['showLevel'] = SQLI_CodeSniffer_Reports::ERROR;\n }\n } else {\n $defaults['showLevel'] = $showLevel;\n }\n\n return $defaults;\n\n }", "title": "" }, { "docid": "86da1807b53a0098e811e723f4db5392", "score": "0.41974974", "text": "function wcSetNumberFormat(&$arr)\n{\n $nonValueFields = ['account_no', 'id_card', 'merchant_ref', 'count', 'product', 'bank_code'];\n // name of exchange rate\n $rateNamings = ['rate','fxrate'];\n\n if (!is_array($arr)) {\n return;\n }\n\n foreach ($arr as $k => $v) {\n // ??_date\n if (preg_match('/(^date$|^time$|\\w+\\_date$|\\w+\\_time$)/i', $k)) {\n $arr[$k] = date(WC_DATETIME_FORMAT, strtotime(\"$v\"));\n continue;\n }\n if ((is_string($v) && trim($v)=='') || !is_numeric($v)) {\n continue;\n }\n //could be all digits\n if (in_array(strtolower($k), $nonValueFields)) {\n $arr[$k] = \"$v\";\n continue;\n }\n //conversion rate, not typical value\n if (preg_match('/_rate$/i', $k) || in_array(strtolower($k), $rateNamings)) {\n $v= round($v, WC_NUM_FORMAT_RATE_DECIMALS);\n $v= number_format($v, WC_NUM_FORMAT_RATE_DECIMALS, '.', '');\n } else {\n $v= round($v, WC_NUM_FORMAT_VALUE_DECIMALS);\n $v= number_format($v, WC_NUM_FORMAT_VALUE_DECIMALS, '.', '');\n }\n $arr[$k] = $v;\n }\n}", "title": "" }, { "docid": "f888a5521c815900b0ca5c2e5fbb7a1e", "score": "0.4196522", "text": "function cpotheme_settings_defaults()\n {\n cpotheme_custom_install('cpotheme_settings', cpotheme_metadata_settings(), false);\n }", "title": "" }, { "docid": "4c9cbc9e47be32c806c3d7e9755175bf", "score": "0.419556", "text": "public function set_num_format($num_format) {\n\n $numbers = array();\n\n $numbers[1] = '0';\n $numbers[2] = '0.00';\n $numbers[3] = '#,##0';\n $numbers[4] = '#,##0.00';\n $numbers[11] = '0.00E+00';\n $numbers[12] = '# ?/?';\n $numbers[13] = '# ??/??';\n $numbers[14] = 'mm-dd-yy';\n $numbers[15] = 'd-mmm-yy';\n $numbers[16] = 'd-mmm';\n $numbers[17] = 'mmm-yy';\n $numbers[22] = 'm/d/yy h:mm';\n $numbers[49] = '@';\n\n if ($num_format !== 0 and in_array($num_format, $numbers)) {\n $flipped = array_flip($numbers);\n $this->properties['num_format'] = $flipped[$num_format];\n }\n if (!isset($numbers[$num_format])) {\n return;\n }\n\n $this->properties['num_format'] = $num_format;\n }", "title": "" }, { "docid": "2bba80b12cea4b892fc3a6336cad135e", "score": "0.4195132", "text": "private function setLocale()\n {\n }", "title": "" }, { "docid": "2bba80b12cea4b892fc3a6336cad135e", "score": "0.4195132", "text": "private function setLocale()\n {\n }", "title": "" }, { "docid": "5494ba332ea51556a5e2971ece4b8d80", "score": "0.4195075", "text": "public function defaults()\n {\n return array();\n }", "title": "" }, { "docid": "b3d987f3b5925ab28fc18de053abe42a", "score": "0.41912827", "text": "public function initCategoryI18ns()\n\t{\n\t\tif ($this->collCategoryI18ns === null) {\n\t\t\t$this->collCategoryI18ns = array();\n\t\t}\n\t}", "title": "" }, { "docid": "22e76e4bf5a0548584f967412984d583", "score": "0.41903362", "text": "public function setAttributionTypes() {\n $this->attribution_types = array(\n '0' => array('label' => 'None', 'value' => 'none'),\n '1' => array('label' => 'Organic', 'value' => 'organic'),\n '2' => array('label' => 'Non-organic', 'value' => 'regular')\n );\n }", "title": "" }, { "docid": "391c173327a4a59285148d12224021e4", "score": "0.41884384", "text": "public static function setDefault($locale) {}", "title": "" }, { "docid": "c5e2933c4b6f8535f841b457e597f67d", "score": "0.41880727", "text": "protected function initAttrs(){\n $attrs = self::getAttrs();\n foreach($attrs as $key => $attr){\n if(! isset($attr['default'])) continue;\n if( !isset($this->cleanData[$key])){\n $this->$key = $attr['default'];\n }\n }\n }", "title": "" }, { "docid": "671029d6163ccc4dfaf72962011c27ed", "score": "0.41847008", "text": "public static function defaults() {\n return [];\n }", "title": "" }, { "docid": "671029d6163ccc4dfaf72962011c27ed", "score": "0.41847008", "text": "public static function defaults() {\n return [];\n }", "title": "" }, { "docid": "118918ba6d919e378a15aeae2676e754", "score": "0.41844487", "text": "public function item_get_multilang_fields() {\n $fieldlist = parent::item_get_multilang_fields();\n $fieldlist['character'] = array('defaultvalue');\n\n return $fieldlist;\n }", "title": "" }, { "docid": "92c3ecf90d4c539d09cee09a0c379f2a", "score": "0.4184047", "text": "protected function field_default() {\n\t\t\treturn $this->parse_args( parent::field_default(), array(\n\t\t\t\t'rows' => 5,\n\t\t\t\t'cols' => 5,\n\t\t\t) );\n\t\t}", "title": "" }, { "docid": "55781d2ec37b73547784ca8e745d4745", "score": "0.41838238", "text": "protected function get_default_format_fields() {\n\t\treturn 'id,name,slug,parent,description,display,image,count';\n\t}", "title": "" }, { "docid": "b04bb9602dc926fa2d89ed45e2e51450", "score": "0.41793832", "text": "protected function get_default_formatter() {\n return new LaterPay_Core_Logger_Formatter_Normalizer();\n }", "title": "" }, { "docid": "6f47d5410887848a2d1c8db9b09f1b54", "score": "0.41783404", "text": "function initOptions() {\n $this->options['HtmlText'] = false;\n }", "title": "" }, { "docid": "01dfe3d9ffbe92ef1db25085f62a8865", "score": "0.417778", "text": "public function grid_display_settings($data){\n\treturn array(\n\t\t$this->grid_field_formatting_row($data),\n\t\t$this->grid_text_direction_row($data),\n\t\t$this->grid_max_length_row($data),\t\t\t\n\t);\n\t}", "title": "" }, { "docid": "0b90e0464b4fb3c8c751bcf1ce362794", "score": "0.4176889", "text": "public function toArray()\n {\n return [\n 123 => __('Default Commodity - 123 '),\n 124 => __('Another Commodity - 124 '),\n ];\n }", "title": "" }, { "docid": "c87ed990479d202d63d3a10e7b4b3dd8", "score": "0.41732728", "text": "public function applyDefaultValues()\n {\n $this->quotenbr = '';\n $this->custid = '';\n $this->linenbr = '';\n $this->sublinenbr = '';\n $this->itemid = '';\n $this->desc1 = '';\n $this->desc2 = '';\n $this->custitemid = '';\n $this->vendorid = '';\n $this->vendoritemid = '';\n $this->status = '';\n $this->lostreason = '';\n $this->lostdate = '';\n $this->kititemflag = '';\n $this->hasnotes = '';\n $this->venddetail = '';\n $this->rshipdate = '';\n $this->leaddays = 0;\n $this->taxcode = '';\n $this->ordrqty = '';\n $this->ordrprice = '';\n $this->ordrcost = '';\n $this->ordrtotalprice = '';\n $this->ordrtotalcost = '';\n $this->uom = '';\n $this->costuom = '';\n $this->whse = '';\n $this->listprice = '';\n $this->stancost = '';\n $this->quotind = '';\n $this->quotqty = 0;\n $this->quotprice = '';\n $this->quotcost = '';\n $this->quotmkupmarg = '';\n $this->discpct = '';\n $this->spcord = '';\n $this->error = '';\n $this->errormsg = '';\n $this->minprice = '';\n $this->nsitemgroup = '';\n $this->shipfromid = '';\n $this->itemtype = '';\n $this->dummy = 'x';\n }", "title": "" } ]
25bfd6b67d3333e4482db671b0737ac0
Insert a new record and get the value of the primary key.
[ { "docid": "423256e2aeaa1855d160496d9ddf1ad6", "score": "0.0", "text": "public function insertGetId(array $values, $sequence = null)\n {\n $this->compileWheres();\n $result = $this->query->insert($values);\n\n if (0 == (int) $result['errors']) {\n if (isset($values['id'])) {\n return $values['id'];\n }\n\n // Return id\n return current($result['generated_keys']);\n }\n }", "title": "" } ]
[ { "docid": "556aabdf474557716f81fc9fb2de7f47", "score": "0.7374067", "text": "public function getInsertId();", "title": "" }, { "docid": "8257a5683325f2d027622081d18483eb", "score": "0.7261243", "text": "public function insert()\n {\n $values = [];\n foreach ($this->getFields() as $field) {\n $values[] = sprintf(':%s', $field);\n }\n\n $query = sprintf(\n 'INSERT' . ' INTO %s (%s) VALUES (%s)',\n $this->getTableName(),\n implode(',', $this->getFields()),\n implode(',', $values)\n );\n\n $this->execute($query, $this->getParameters());\n\n return App::getInstance()\n ->getDb()\n ->getActivePdo()\n ->lastInsertId();\n }", "title": "" }, { "docid": "c1b0ac2dc215ea21df2f26da8cee579b", "score": "0.7251808", "text": "function insert_record($table, $dataobject, $returnid = true, $primarykey = 'id') {\n\t\n\tglobal $db, $CFG;\n\t\n\t/// Check we are handling a proper $dataobject\n\tif (is_array ( $dataobject )) {\n\t\t$dataobject = ( object ) $dataobject;\n\t}\n\t\n\t/// In Moodle we always use auto-numbering fields for the primary key\n\t/// so let's unset it now before it causes any trouble later\n\tunset ( $dataobject->{$primarykey} );\n\t\n\t/// Get the correct SQL from adoDB\n\tif (! $insertSQL = _GetInsertSQL ( $table, ( array ) $dataobject, true )) {\n\t\treturn false;\n\t}\n\t\n\t/// Run the SQL statement\n\tif (! $rs = api_sql_query ( $insertSQL, __FILE__, __LINE__ )) {\n\t\treturn false;\n\t}\n\t\n\t/// We already know the record PK if it's been passed explicitly,\n\t/// or if we've retrieved it from a sequence (Postgres and Oracle).\n\tif (! empty ( $dataobject->{$primarykey} )) {\n\t\treturn $dataobject->{$primarykey};\n\t}\n\t\n\t/// This only gets triggered with MySQL and MSQL databases\n\t/// however we have some postgres fallback in case we failed\n\t/// to find the sequence.\n\t$id = Database::get_last_insert_id ();\n\t\n\treturn ( integer ) $id;\n}", "title": "" }, { "docid": "9d2d982663978f51d3b74325c9c1f1ac", "score": "0.7182192", "text": "public function insertGetId()\n {\n return $this->lastId;\n }", "title": "" }, { "docid": "9d2d982663978f51d3b74325c9c1f1ac", "score": "0.7182192", "text": "public function insertGetId()\n {\n return $this->lastId;\n }", "title": "" }, { "docid": "9d2d982663978f51d3b74325c9c1f1ac", "score": "0.7182192", "text": "public function insertGetId()\n {\n return $this->lastId;\n }", "title": "" }, { "docid": "9d2d982663978f51d3b74325c9c1f1ac", "score": "0.7182192", "text": "public function insertGetId()\n {\n return $this->lastId;\n }", "title": "" }, { "docid": "9d2d982663978f51d3b74325c9c1f1ac", "score": "0.7182192", "text": "public function insertGetId()\n {\n return $this->lastId;\n }", "title": "" }, { "docid": "9d2d982663978f51d3b74325c9c1f1ac", "score": "0.7182192", "text": "public function insertGetId()\n {\n return $this->lastId;\n }", "title": "" }, { "docid": "ebc0abca857fb8f964e2f03401cfa249", "score": "0.7168383", "text": "public function insert(){\n\t\tif(!$this->_beforeInsert()) return false;\n\t\t$data=$this->data=static::InsertOne($data=$this->_getData());\n\t\t$this->_afterInsert($data);\n\t\treturn $data['_id'];\n\t}", "title": "" }, { "docid": "58b4630ff3333753dea8c18a9e0b2feb", "score": "0.7154822", "text": "private function _getIDFromDB()\n {\n return $this->db->insert_id();\n }", "title": "" }, { "docid": "0eb6e29097e377b178ad835223d1bb5f", "score": "0.705983", "text": "function insert($row) {\n $query = $this->getStatement(\n \"INSERT INTO `$this->table` (foreign_id) VALUES (:foreignID)\"\n );\n $query->execute($row);\n return $this->db->lastInsertId();\n }", "title": "" }, { "docid": "0a1562539fbfa2a65b3382d452752855", "score": "0.7043763", "text": "public function insert($record = array()) {\n\n // Clean record fields\n $this->_cleanFields($record);\n\n // Insert record and return insert id\n return DB::table($this->_tableName)->insertGetId($record);\n }", "title": "" }, { "docid": "445d2bbb687edfd374818bd5138a4fa7", "score": "0.6976311", "text": "public function insert() {\n\t\t$data = $this->getDataForQuery();\n\t\tunset($data['id']);\n\t\t$fields = array_keys($data);\n\t\t$values = array_values($data);\n\t\t$query =\n\t\t\t'INSERT INTO '.$this->getTableName().'(`'.implode('`,`',$fields).'`) VALUES(\\''.join(\"','\", $values).'\\')';\n\t\t$sqlIterator = new MysqlIterator($query);\n\t\t$id = $sqlIterator->insert();\n\t\t$this->id->set($id);\n\t\treturn $id;\n\t}", "title": "" }, { "docid": "1f76ca59d1995606f055c16d1a251537", "score": "0.6973039", "text": "public static function insertId(){\n\t\treturn self::getWriteConnection()->insert_id;\n\t}", "title": "" }, { "docid": "c270fb001b0e076bc05cdaf788b622fb", "score": "0.6947906", "text": "public function insertId() {\n\t\treturn $this->dbh->lastInsertId();\n\t}", "title": "" }, { "docid": "d6a94bf5326856588871ed1fc226e969", "score": "0.69429827", "text": "public function Create()\n {\n $data = $this->ChangedData();\n if (Norma::$debug) trigger_error('Norma Insert: ' . json_encode($data), E_USER_NOTICE);\n $id = Norma::$dbFacile->insert($data, static::$table);\n // $id will be false if insert fails. Up to programmer to care.\n if ($id !== false && static::$pk && !is_array(static::$pk)) {\n $pk = static::$aliases[ static::$pk ];\n // $id will be true if insert succeeded but didn't generate an id\n if ($id !== true) {\n // why would we not always want to do this?\n //if (static::$pk)\n $this->data[ $pk ] = $id;\n $this->changed = array();\n }\n }\n\n return $id;\n }", "title": "" }, { "docid": "f0bf6ce9463770f241f84f4bf01d7056", "score": "0.69379616", "text": "public function getKey(){\n \n return mysql_insert_id();\n \n }", "title": "" }, { "docid": "3b4edfc90342efc77e7c5ff01b4dce22", "score": "0.69202733", "text": "public function insert_id()\n {\n return $this->insert_id;\n }", "title": "" }, { "docid": "526e0d520b466dbf8c5dcd4f3defec8b", "score": "0.69097036", "text": "function insert($row) {\n $query = $this->getStatement(\n \"INSERT INTO `$this->table` (\n name\n ) \n VALUES (\n :name\n )\"\n );\n $query->execute($row);\n return $this->db->lastInsertId();\n }", "title": "" }, { "docid": "5c74f8120341c5780171945baeb830de", "score": "0.6886275", "text": "public function getInsertId()\n {\n }", "title": "" }, { "docid": "478349bb47ec49c75ab18736f1c94e7d", "score": "0.68456316", "text": "public function insertId()\n {\n return self::$_instance->lastInsertId();\n }", "title": "" }, { "docid": "647c63baf4410278ef8854879384673a", "score": "0.6817675", "text": "function insert($record) {\r\n\t\treturn $this->database->insertRecord($this->table, $record);\r\n\t}", "title": "" }, { "docid": "b27298c0a99a32065480c70854e90401", "score": "0.6816752", "text": "public function save()\r\n {\r\n $data = $this->_data;\r\n $id = $data[$this->_tableClass->getPrimaryKey()];\r\n unset($data[$this->_tableClass->getPrimaryKey()]);\r\n \r\n if ($this->_isNew) {\r\n $inserter = $this->getInserter();\r\n $inserter->data($data);\r\n $id = $inserter->execute();\r\n $this->_data[$this->_tableClass->getPrimaryKey()] = $id;\r\n $this->_isNew = false;\r\n return $id;\r\n }\r\n \r\n $updater = $this->getUpdater();\r\n $updater\r\n ->set($data)\r\n ->where($this->_tableClass->getPrimaryKey() . ' = ?', $id);\r\n \r\n return $updater->execute();\r\n }", "title": "" }, { "docid": "13216e4c170c66aa3650a46f2490036b", "score": "0.68074024", "text": "protected function _saveCreate()\n {\n $this->_recordTimestamps();\n\n // build & execute SQL\n $sql = \"INSERT INTO $this->_tableName (\".\n \" \".$this->getColumnStr().\n \") VALUES (\".\n \" \".$this->getInsertValuesStr().\n \")\";\n $insertId = $this->connection->insert($sql, \"$this->_className Insert\");\n\n // only set the pk if it's not already set\n if ($this->primaryKey() && $this->{$this->primaryKey()} == null) {\n $this->_attributes[$this->primaryKey()] = $insertId;\n }\n return $insertId;\n }", "title": "" }, { "docid": "235921255cca75a71833898ea7b3d509", "score": "0.67967427", "text": "public static function insert_id()\n {\n self::call();\n\n return !empty( self::$instance->insert_id ) ? self::$instance->insert_id : false;\n }", "title": "" }, { "docid": "232e9b47ec2240ac0c4904611ab8cc6b", "score": "0.67851764", "text": "protected function _insert()\n {\n // TODO:what if insert got error\n if (!isset($this->_attributes['update_time'])) {\n $this->_attributes['update_time'] = date(\"Y-m-d H:i:s\");\n }\n static::$ci->db->insert(static::TABLE_NAME, $this->_attributes);\n return static::$ci->db->insert_id();\n }", "title": "" }, { "docid": "a56e1dcea890846c1facf9e4ca068dd9", "score": "0.67790496", "text": "public function insert_id() {\n return $this->connection->insert_id;\n }", "title": "" }, { "docid": "c92fa2f7eb907cd55c1203764a54971a", "score": "0.67718697", "text": "public function insertId()\n\t{\n\t\treturn $this->lastInsertId();\n\t}", "title": "" }, { "docid": "4f09cb73b32933badc6d81a2eaad7490", "score": "0.67703694", "text": "public function getInsertId()\n {\n return $this->insertId;\n }", "title": "" }, { "docid": "5947b451addbbc28f489353b8f67a82a", "score": "0.6767131", "text": "public function insertId(){\n return $this->mypdo->lastInsertId();\n }", "title": "" }, { "docid": "cbda929e60f8be5f59f72eeb208b2025", "score": "0.67490894", "text": "abstract public function get_primary_key();", "title": "" }, { "docid": "8f02caccd5816d6666ed488bc36e41fd", "score": "0.67183053", "text": "function insert_id() {\n $link = $this->write_link;\n return ($id = $link->lastInsertId()) >= 0 ? $id : $this->result($this->query(\"SELECT last_insert_id()\", $link), 0);\n }", "title": "" }, { "docid": "764014958453f27684a6b670dc550aeb", "score": "0.6715496", "text": "public function insert_id() {\n \t\treturn mysqli_insert_id($this->connection);\n \t}", "title": "" }, { "docid": "127c55e52c97ddb97816c3c68d07dae1", "score": "0.6706159", "text": "public function getInsertId()\n {\n return $this->insert_id;\n }", "title": "" }, { "docid": "127c55e52c97ddb97816c3c68d07dae1", "score": "0.6706159", "text": "public function getInsertId()\n {\n return $this->insert_id;\n }", "title": "" }, { "docid": "b8780aa3a58a13f1a18929ced58cd914", "score": "0.6704503", "text": "public function getInsertID() {\r\n return $this->id;\r\n //return $this->last_insert_id;\r\n }", "title": "" }, { "docid": "ac7d03bb2e8b58b4b8f5d509b1e6fed1", "score": "0.6700787", "text": "public function insert_id()\n {\n return $this->db->insert_id();\n }", "title": "" }, { "docid": "587f9e305fd5f18c7ec7790a5a4b4c0a", "score": "0.66929823", "text": "public function getPrimaryKey() {\n return $this->primary;\n }", "title": "" }, { "docid": "1725127a5446cc45502ec58aa4435f81", "score": "0.6687207", "text": "public function new_id()\n\t{\n\t\t$this->result = $this->lastInsertId();\n\t\t\n\t\treturn $this->result;\n\t}", "title": "" }, { "docid": "2bec70ab98134524add75df84905dfbc", "score": "0.66755545", "text": "public function insertId(): int\n {\n return $this->Instance->insert_id;\n }", "title": "" }, { "docid": "772b2c981466d15f5643bc5129757019", "score": "0.6674357", "text": "public function insertId()\n {\n return $this->conn()->insert_id;\n }", "title": "" }, { "docid": "97c370a0d4d464cc560967fa98d33e82", "score": "0.667209", "text": "public function insert_id(){\r\n\t\t\treturn mysqli_insert_id($this->connection);\r\n\t\t}", "title": "" }, { "docid": "148e473aaeb71f37553e5ee7987f55d5", "score": "0.66687375", "text": "protected static function insert_id()\n {\n return \\sabretooth\\session::self()->get_db()->Insert_ID();\n }", "title": "" }, { "docid": "28bea0dfa33f17205f8d68de3ab1beda", "score": "0.66668755", "text": "public function insert_id(){\n\t\t\t// global $connection;\n\t\t\treturn mysqli_insert_id($this->connection);\n\t\t}", "title": "" }, { "docid": "98303e8345ff2a04f16927d2d8ec891b", "score": "0.66634977", "text": "function _insert($data) {\n $db = $this->database;\n $table = $this->get_table();\n $db->insert($table, $data);\n $insert_id = $db->insert_id();\n return $insert_id;\n\n }", "title": "" }, { "docid": "416d4adcaac17de10d211ae2747f814b", "score": "0.6658193", "text": "public function insert_id() {\n\t\treturn mysqli_insert_id($this->connection);\t\n\t}", "title": "" }, { "docid": "bd0dd08718a58b048daec3750b4fc406", "score": "0.66569585", "text": "public static function db_insert_id()\n {\n return tep_db_insert_id();\n }", "title": "" }, { "docid": "63781257d2043ccdddc8e1ecb9dbc18a", "score": "0.66469795", "text": "public function the_insert_id() {\n return $this->connection->insert_id;\n }", "title": "" }, { "docid": "0f17d84a539dcee2dffc486fee0fecc1", "score": "0.6646647", "text": "function getRecordID()\n {\n // return $this->db->lastInsertId();\n return $this->ID;\n }", "title": "" }, { "docid": "07312fe2b3e52b3733e7c50d5ecc3112", "score": "0.6633331", "text": "function insert_id ()\n\t{\n \treturn mysql_insert_id($this->dbh);\n }", "title": "" }, { "docid": "5572283f727fd8ec0f9c96fbff632442", "score": "0.6629512", "text": "public function getPrimaryKey() {\n\n return $this->primary_key;\n\n }", "title": "" }, { "docid": "9d6149e137503286ca16fa8f6ed5c0b9", "score": "0.6614626", "text": "public static function InsertID()\r\n {\r\n return self::$lastInsertId;\r\n\r\n }", "title": "" }, { "docid": "d87aac3c4f25d6df9b7a151be0c9741b", "score": "0.6605227", "text": "function save(){\n $statement = $GLOBALS['DB']->query(\"INSERT INTO courses (course_name, course_number) VALUES ('{$this->getCourseName()}', '{$this->getCourseNumber()}') RETURNING id;\");\n $result = $statement->fetch(PDO::FETCH_ASSOC);\n $this->setId($result['id']);\n }", "title": "" }, { "docid": "644d8b92716955b9b06b56897cf40817", "score": "0.66021186", "text": "public function lastInsertRowid () {}", "title": "" }, { "docid": "dfa541e301f0dc57db5eaf07774c422c", "score": "0.66001767", "text": "public function save()\n {\n $primaryKeyValue = (new Builder($this->pgsql->createConnection()))->setModel($this)->save();\n if (!isset($this->attributes[$this->primaryKey])) {\n $this->attributes[$this->primaryKey] = $primaryKeyValue;\n }\n }", "title": "" }, { "docid": "6a3d9400f1acb35542109a9187320850", "score": "0.6588309", "text": "public function insert_id()\n\t{\n\t\treturn mysqli_insert_id($this->connection);\n\t}", "title": "" }, { "docid": "9d38678561630ca2671d00c8b87cfa6c", "score": "0.6586447", "text": "public function getPrimaryKey()\n {\n return $this->primary;\n }", "title": "" }, { "docid": "e6ea2ae7833af885c9200115a225852d", "score": "0.6576069", "text": "public function db_insert_id()\n\t{\n\t\treturn $this->_db->insert_id();\n\t}", "title": "" }, { "docid": "bd3e2a5995d321f458d7660a4a83333d", "score": "0.657494", "text": "function getPrimaryKey();", "title": "" }, { "docid": "342de6e0c283f89cff41a215efabb2ea", "score": "0.65713733", "text": "public function save(){\n \n $primaryKey = $this->primaryKey;\n \n if( isset($this->$primaryKey) ){\n $return = $this->db->update($this->table, $this->getFields(), array($this->primaryKey => $this->$primaryKey));\n $this->fields = array();\n return $return;\n }\n \n if( $this->db->insert( $this->table, $this->getFields() ) ){\n $insert_id = $this->db->insertId();\n $this->fields = array();\n return $insert_id;\n }\n \n return false;\n }", "title": "" }, { "docid": "3c81c12ef6f59dfc41d67f9ccbac28a5", "score": "0.6568568", "text": "public function getInsertID() {\n\t\treturn $this->insertID;\n\t}", "title": "" }, { "docid": "7838b9ff1c1cc53bee94c64270428f88", "score": "0.6567402", "text": "public function insert_id() {\n return mysqli_insert_id($this->connection);\n }", "title": "" }, { "docid": "59919f7cc70d0202dea8ab7938288d7a", "score": "0.6565861", "text": "public function insertId() {\n\t\treturn mysqli_insert_id(self::$link);\n\t}", "title": "" }, { "docid": "81d56eba4d4351b4fcc581112166c919", "score": "0.6561223", "text": "public static function getId()\n {\n return self::$mysqli -> insert_id;\n }", "title": "" }, { "docid": "e16638cd977bd960475b7bd27815f702", "score": "0.6551191", "text": "public function _getPrimaryKey()\n {\n\n return $this->_primary_key;\n\n }", "title": "" }, { "docid": "89e4bff5c2a0f719a466d2a11342fdab", "score": "0.65459836", "text": "public function getInsertId()\n {\n $resultResource = pg_query($this->connection, 'SELECT lastval()');\n $row = pg_fetch_row($resultResource);\n return (int) $row[0];\n }", "title": "" }, { "docid": "fd12c4f671ee9bb0febad6bc66a3108b", "score": "0.654569", "text": "public function insert_id() {\n\t\treturn mysql_insert_id($this->connection);\n\t}", "title": "" }, { "docid": "c3d49578c030b415df43a9501b8f07ce", "score": "0.65453905", "text": "public function insert(&$data)\n {\n $this->_db->insert(\n $this->_name,\n $data\n );\n return $this->_db->lastInsertId();\n }", "title": "" }, { "docid": "657fce4bff98f4589d25ffcab61f553f", "score": "0.65411985", "text": "protected function _get_primary_key() {\n\t\treturn $this->primaryKey;\t\n\t}", "title": "" }, { "docid": "149dc34a65da74000085f37847acfe09", "score": "0.65404654", "text": "public function insert_id() {\n return mysqli_insert_id($this->connection);\n }", "title": "" }, { "docid": "c974b60dd1b124ff2fc66be182f04519", "score": "0.6536567", "text": "public function getInsertID(){\n return $this->conn->lastInsertId();\n }", "title": "" }, { "docid": "1ad5a888bd3365d449e793d42d48e503", "score": "0.6528885", "text": "public function insert_id() {\n\t\t\t// Neu da ket noi\n\t\t\tif ($this->cn) {\n\t\t\t\t// Lay ID vua insert\n\t\t\t\treturn mysqli_insert_id($this->cn);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "be539a97458eff92f32f00a41ac505d2", "score": "0.65189177", "text": "protected function execInsert() {\n $fields = implode(',', array_map(function($item){\n return \"`$item`\";\n },array_keys($this->attributes)));\n \n $params = array();\n foreach ($this->attributes as $field => $value) {\n $params[':'.$field] = $value;\n }\n \n $sql = 'INSERT INTO '.static::$tableName.\" ($fields) VALUES (\".implode(',',array_keys($params)).\")\";\n \n $db = Database::get();\n $rs = $db->prepare($sql);\n if (!$rs->execute($params))\n return false;\n else {\n return (static::$pk)?\n $db->lastInsertId() : true;\n }\n }", "title": "" }, { "docid": "b998805c25887debe3c02a7f9ac06275", "score": "0.6515197", "text": "public function getPrimaryKey()\r\n\t{\r\n\t\treturn $this->_pk;\r\n\t}", "title": "" }, { "docid": "f67b4226670243d1c7a7a4f0c4288671", "score": "0.6513699", "text": "function id(){return $this->s->insert_id;}", "title": "" }, { "docid": "500becf146a8fcb6d2ffcb4f35e1637c", "score": "0.6511812", "text": "public function insert_id() {\n return mysql_insert_id($this->connection);\n }", "title": "" }, { "docid": "c837827d2a94af5ce4eff98a75b2c0b9", "score": "0.65084064", "text": "public function getPrimaryKey()\n\t{\n\t\treturn $this->pk;\n\t}", "title": "" }, { "docid": "a867ff1d98053411f0ad9c910a501ea4", "score": "0.6500374", "text": "abstract public function getLastInsertId();", "title": "" }, { "docid": "a867ff1d98053411f0ad9c910a501ea4", "score": "0.6500374", "text": "abstract public function getLastInsertId();", "title": "" }, { "docid": "a867ff1d98053411f0ad9c910a501ea4", "score": "0.6500374", "text": "abstract public function getLastInsertId();", "title": "" }, { "docid": "a867ff1d98053411f0ad9c910a501ea4", "score": "0.6500374", "text": "abstract public function getLastInsertId();", "title": "" }, { "docid": "a7144ec8314b536a944328bebe36946a", "score": "0.64955723", "text": "public static function inserted_id() {\n\n if (static::$db) {\n return static::$db->inserted_id();\n }\n\n }", "title": "" }, { "docid": "39bdfc7239a53334026c328b524de9b8", "score": "0.6493042", "text": "public function getPrimaryKey();", "title": "" }, { "docid": "39bdfc7239a53334026c328b524de9b8", "score": "0.6493042", "text": "public function getPrimaryKey();", "title": "" }, { "docid": "39bdfc7239a53334026c328b524de9b8", "score": "0.6493042", "text": "public function getPrimaryKey();", "title": "" }, { "docid": "3de942db9f554d2e12476866d418e83b", "score": "0.6488311", "text": "public static function insertId(): int\n {\n return (int) static::$connection->lastInsertId();\n }", "title": "" }, { "docid": "7c158fe3c460f06d7aea608d66b8136c", "score": "0.6486378", "text": "function insert_id() {\n \treturn mysql_insert_id($this->conn);\n \t}", "title": "" }, { "docid": "4423ef6d0b564c34a0149942bb721ddc", "score": "0.6485126", "text": "public function getPrimaryKeyValue()\r\n {\r\n return $this[$this->primaryKey];\r\n }", "title": "" }, { "docid": "09d58f8b5457eb03ef1d4b0c87bd7176", "score": "0.6480554", "text": "public function _insert($data)\n\t{\n\t\t$this->db->insert($this->table, $data);\n\n\t\treturn $this->db->insert_id();\n\t}", "title": "" }, { "docid": "4e1a9c5c9af2d4d797a3e38a055311f9", "score": "0.6477857", "text": "public function getID(){\r\n //but this is the primary key of the table and auto-incremented\r\n return $this->id ;\r\n }", "title": "" }, { "docid": "f69f71cd0764e34fdc2faa6a5bbf9f2d", "score": "0.64774036", "text": "public function getLastInsertId(): mixed;", "title": "" }, { "docid": "8c2d2fe6e14b268ff71b75076b1947cd", "score": "0.64769644", "text": "function entity() {\n $db = Database::instance()->db();\n \n $stmt = $db->prepare('INSERT INTO entities VALUES(NULL)');\n $stmt->execute();\n $stmt = $db->prepare('SELECT last_insert_rowid() as id');\n $stmt->execute();\n $id = $stmt->fetch();\n return $id['id'];\n }", "title": "" }, { "docid": "2c575c688dc5effca5f7eb1343f80ddf", "score": "0.64759356", "text": "abstract public function lastInsertId();", "title": "" }, { "docid": "4ff2d4fd98b4e1f3a4d2c7247c43ad58", "score": "0.6469247", "text": "public function insert()\n {\n if ($this->isPkAutoIncrement) {\n $this->idEmployee = \"\";\n }\n // $constants = get_defined_constants();\n $sql = <<< SQL\n INSERT INTO employee\n (first_name,last_name,gender,birth_date,birth_place,tax_code,plant)\n VALUES(\n\t\t\t{$this->parseValue($this->firstName, 'notNumber')},\n\t\t\t{$this->parseValue($this->lastName, 'notNumber')},\n\t\t\t{$this->parseValue($this->gender, 'notNumber')},\n\t\t\t{$this->parseValue($this->birthDate, 'date')},\n\t\t\t{$this->parseValue($this->birthPlace, 'notNumber')},\n\t\t\t{$this->parseValue($this->taxCode, 'notNumber')},\n\t\t\t{$this->parseValue($this->plant, 'notNumber')})\nSQL;\n $this->resetLastSqlError();\n $result = $this->query($sql);\n $this->lastSql = $sql;\n if (!$result) {\n $this->lastSqlError = $this->sqlstate . \" - \" . $this->error;\n } else {\n $this->allowUpdate = true;\n if ($this->isPkAutoIncrement) {\n $this->idEmployee = $this->insert_id;\n }\n }\n return $result;\n }", "title": "" }, { "docid": "d9f9d388d74e8b2a2e8e941d5f2080e0", "score": "0.64690983", "text": "public function save()\n {\n $id = $this->primary_key;\n \n if ($this->$id) {\n $execute = $this->update_save($this->$id);\n } else {\n $execute = $this->insert_save();\n }\n \n if (substr($execute, 0, 6) == 'INSERT') {\n $return_id = true;\n }\n \n $execute = $this->pdo->prepare($execute);\n \n if (!$execute->execute()) {\n return false;\n }\n \n if (!$return_id) {\n return true;\n }\n \n return (int)$this->pdo->lastInsertId();\n }", "title": "" }, { "docid": "4d4b339aafd71025e33e7fa3a1b1e273", "score": "0.64653295", "text": "public function insert_id(){\n return $this->mysqli->insert_id;\n }", "title": "" }, { "docid": "0f68bc100a9a90cc56f711ca6fe39dba", "score": "0.6463743", "text": "public function insert_id()\n\t{\n\t\tif ($this->conn) {\n\t\t\treturn mysqli_insert_id($this->conn);\n\t\t}\n\t}", "title": "" }, { "docid": "801ecd965c872395c43293450bb3e10b", "score": "0.6456586", "text": "public static function insertId()\n\t{\n\t\treturn (self::$_lnk) ? self::$_lnk->insert_id : 0;\n\t}", "title": "" }, { "docid": "8804153307162cb721e36570a06f5dd8", "score": "0.6455987", "text": "public function getPrimaryKey()\n {\n return $this->getRid();\n }", "title": "" }, { "docid": "a68a824f31955ad02dd462796bf1fc49", "score": "0.6453552", "text": "public function insert_id() {\n return mysql_insert_id($this->connection);\n\n }", "title": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "8e8e03727ca6544a2d009483f6d1aca9", "score": "0.0", "text": "public function destroy($id)\n {\n //\n }", "title": "" } ]
[ { "docid": "67120cc52c09f1239f92f34fd173437e", "score": "0.7333458", "text": "function remove($resource)\n {\n }", "title": "" }, { "docid": "dcc1d6b4440ac73f55e995eb411296ea", "score": "0.6932749", "text": "public function destroy($id)\n {\n dd('Remove the specified resource from storage.');\n }", "title": "" }, { "docid": "96aa9ea6689a46a9441f009aa879d999", "score": "0.6885214", "text": "public function removeResource($resource)\n {\n // Remove the Saved Resource\n $join = new User_resource();\n $join->user_id = $this->id;\n $join->resource_id = $resource->id;\n $join->delete();\n\n // Remove the Tags from the resource\n $join = new Resource_tags();\n $join->user_id = $this->id;\n $join->resource_id = $resource->id;\n $join->delete();\n }", "title": "" }, { "docid": "d522def58731edf5dda07c4a8e3cb839", "score": "0.6839906", "text": "public function remove(IUser $user, ?IResource $resource): void;", "title": "" }, { "docid": "5b18f4f0f245d93e1d14486ac0afbbc7", "score": "0.6735704", "text": "public function remove(ResourceInterface $resource)\n {\n $this->_em->remove($resource);\n $this->_em->flush($resource);\n }", "title": "" }, { "docid": "6ffd51684d27200dd20bb77ae5392465", "score": "0.65282005", "text": "public function dispatchOnPostRemoveResource($resource);", "title": "" }, { "docid": "20340ae69f46965449dc508b639c84e9", "score": "0.6511765", "text": "public function remove_storage()\n\t{\n\t\t$this->_storage->destroy_storage();\n\t}", "title": "" }, { "docid": "8566de5772ba8f11471da580f8907d09", "score": "0.64848197", "text": "public static function remove(string $resourcePath): void\n {\n $file = self::generatePath(\n self::generateHash($resourcePath)\n );\n\n if (\\is_file($file)) {\n \\unlink($file);\n }\n }", "title": "" }, { "docid": "b9b85ab47af2f085664ea4fb3f54b26d", "score": "0.6444909", "text": "public function dispatchOnPreRemoveResource($resource);", "title": "" }, { "docid": "ae13b12a81ef5a04c54c2ae2a1fbfc6f", "score": "0.61720115", "text": "public function unsetStorageId();", "title": "" }, { "docid": "8c0ed41f8673fd843b7ffdb22bce5eb0", "score": "0.611688", "text": "public function afterDelete($resource)\n {\n return $resource;\n }", "title": "" }, { "docid": "77d39170a9748d8eca11f292068832c6", "score": "0.6077847", "text": "public function delete($storageName, $key);", "title": "" }, { "docid": "43dc6df10818b4435103bc0ee31fc8d1", "score": "0.6045101", "text": "public function destroy($id)\n {\n $record = Resource::where('id', $id)->get();\n\n if (!empty($record[0])) {\n DB::beginTransaction();\n\n $isRemoved = self::remove($record);\n }\n }", "title": "" }, { "docid": "db4382353b96e87cb5a70c801383930a", "score": "0.603214", "text": "public function delete($resourceId = null, $options = []);", "title": "" }, { "docid": "a2014b07fec4eb27432905d903e64664", "score": "0.59784347", "text": "public function destroy($id)\n {\n $storage = Storage::find($id);\n if($storage->item())\n {\n $storage->item()->detach();\n if( $storage->delete() )\n {\n return response('Deleted.',200);\n }\n }\n return response('Error.',400);\n }", "title": "" }, { "docid": "6dd2ae009f2219fb531720e25a26531d", "score": "0.5974692", "text": "public function remove() {\n\t\t$this->storage->rmdir($this->path);\n\t\t$this->user->triggerChange('avatar');\n\t}", "title": "" }, { "docid": "462a710c39c75c675bfe433bce80e2fe", "score": "0.5951811", "text": "public function destroy()\n {\n if ($this->instance instanceof Storage) {\n $this->instance->destroy();\n }\n $this->instance = null;\n }", "title": "" }, { "docid": "c39bd1cfb71eb924026011c0e976a9d4", "score": "0.5933563", "text": "public function delete(string $resourceType, $modelOrResourceId): void;", "title": "" }, { "docid": "31f350f911a74d37fb3a78e6981becb5", "score": "0.5921418", "text": "public function removeStorage()\n\t{\n\t\t$this->taskExec('docker rm chrome-print-storage')->run();\n\t}", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "d03fcfa49d2ade09cffc8d88d701076d", "score": "0.58893216", "text": "public function dropStorageFromName($storageName);", "title": "" }, { "docid": "7a7d76b4d53301e7ae6922b772849358", "score": "0.5886972", "text": "public function destroy($file)\n {\n $file = File::where('id', $file)->first();\n $url = str_replace('storage', 'public', $file->url);\n Storage::delete($url);\n $file->delete();\n return redirect()->route('files.index')->with('eliminar', 'ok');\n }", "title": "" }, { "docid": "3f6a8794d81fc01347d2f3307ac44d78", "score": "0.58504206", "text": "public function destroy($id)\n {\n //\n\n $contratista= contratistas::findOrFail($id);\n\n if (Storage::delete('public/'.$contratista->Foto)){\n Contratistas::destroy($id);\n\n }\n\n \n \n return redirect('contratistas')->with('Mensaje','Contratista eliminado');\n }", "title": "" }, { "docid": "a85763dd50ac74b8d2b8124b1c0e3e7b", "score": "0.5850285", "text": "public function destroy(Resource $resource)\n {\n $resource->delete();\n return back()->with('info', 'Resource deleted');\n }", "title": "" }, { "docid": "02a5bc50f3aa8ecd04834387832bc77c", "score": "0.5844418", "text": "public function destroy($id)\n {\n // $this->authorize('haveaccess','producto.destroy');\n $producto= Producto::findOrFail($id);\n\n if(Storage::delete('public/'.$producto->imagen)){\n\n Producto::destroy($id); \n }\n\n return redirect('producto');\n }", "title": "" }, { "docid": "8f406917023a0110d93d6350033a3ab5", "score": "0.58313775", "text": "public function removeItem($id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "title": "" }, { "docid": "a193f7ebf258b5fb63b8919a07678081", "score": "0.5821789", "text": "public function removeAll ($storage) {}", "title": "" }, { "docid": "dc36a581460d40a22ac889b4e61a4ab9", "score": "0.58165264", "text": "public function removeResource($resourceID)\n {\n $resourceID = db::escapechars($resourceID);\n $sql = \"DELETE FROM kidschurchresources WHERE resourceID='$resourceID' LIMIT 1\";\n $result = db::execute($sql);\n if($result){\n return true;\n }\n else{\n return false;\n }\n }", "title": "" }, { "docid": "8f1b5736b25701e2b67e4f655f581689", "score": "0.57634306", "text": "public function testResourceRemoveOne()\n {\n $resourceArea = new Zend_Acl_Resource('area');\n $this->_acl->add($resourceArea)\n ->remove($resourceArea);\n $this->assertFalse($this->_acl->has($resourceArea));\n }", "title": "" }, { "docid": "5cc9f2ec9efb9c5303b848052688e6c4", "score": "0.5744329", "text": "public function destroy($id)\n {\n $product = Product::findOrFail($id);\n $filename = $product->image;\n $product->delete();\n Storage::delete($filename);\n }", "title": "" }, { "docid": "4d84ab18e7e3c7bf3662c486977fb999", "score": "0.57371354", "text": "public function delete() {\n return $this->storage->delete($this->getId());\n }", "title": "" }, { "docid": "cbac86afaa4d65131418099d416a05f8", "score": "0.5731129", "text": "public function destroy($id)\n {\n $resource = Resource::find($id);\n\n if ($fileName = $resource->book->name) {\n $file = public_path() . '/resources/' . $fileName;\n unlink($file);\n }\n\n $resource->delete();\n\n $message = 'El recurso literario \"' . $resource->title . '\" ha sido eliminado.';\n $class = 'danger';\n\n Session::flash('message', $message);\n Session::flash('class', $class);\n\n return redirect()->route('admin.resources.index');\n }", "title": "" }, { "docid": "fec8d4881ffc82e41c0642f366a1a75a", "score": "0.5726655", "text": "public function delete($resource)\n {\n return DB::transaction(function () use ($resource) {\n $resource = $this->beforeDelete($resource);\n\n $resource->delete();\n\n return $this->afterDelete($resource);\n });\n }", "title": "" }, { "docid": "b8c78cd19161cf7966e7567365e984a3", "score": "0.56849074", "text": "public function remove(): void;", "title": "" }, { "docid": "bf109080b5ee3a89d2c795999303aee7", "score": "0.5680265", "text": "public function delete(){\n if($this->removable) {\n $directory = $this->getRootDir();\n\n App::fs()->remove($directory);\n }\n }", "title": "" }, { "docid": "8bbd28cf62ed375a2f7518342e1d75ae", "score": "0.56680655", "text": "public function removeFile();", "title": "" }, { "docid": "3819490d97e5dfe8f2ffd81ae03e6e53", "score": "0.56674856", "text": "public function remove(ReadModelInterface $element);", "title": "" }, { "docid": "b182edae2a719de4edc919c7a7b5885e", "score": "0.5663417", "text": "public function destroy($id)\n {\n\n $post = Roler::findOrFail($id);\n\n $path=public_path('/storage/uploads/');\n if (isset($post->image)) {\n $oldname=$post->image;\n File::delete($path.''.$oldname);\n }\n\n if (Roler::where('id', $id)->delete()) {\n\n return redirect()->back()->with('success', 'Record deleted successfully');\n\n }\n \n return redirect()->back();\n\n }", "title": "" }, { "docid": "2d475aa3098e33e6020ec88b30a03b25", "score": "0.5662905", "text": "public function purgeAsset($asset);", "title": "" }, { "docid": "cb1740d372b49263432bcc5cf39f97d8", "score": "0.56595594", "text": "public function destroy($id)\n {\n $emp = Employee::where('id',$id)->first();\n $photo = $emp->image;\n if($photo){\n unlink($photo);\n $emp->delete();\n }else{\n $emp->delete();\n }\n\n }", "title": "" }, { "docid": "7567af40a4901dd5dd42113b0bbccb95", "score": "0.56567484", "text": "public function removeResource($name)\n {\n unset($this->resources[$name]);\n if ($name === 'file') {\n $this->resources['file'] = array(\n 'class' => 'Dwoo\\Template\\File',\n 'compiler' => null\n );\n }\n }", "title": "" }, { "docid": "dc84ba400b70ef909d87e4a92424f6ac", "score": "0.5648853", "text": "public function destroy($id)\n {\n $album = Album::find($id);\n if($album==null){\n return reidrect('/portfolio')->with('error','this portfolio does not exist');\n }else{\n if(Storage::delete('public/album_covers/'.$album->cover_image)){\n $album->delete();\n return redirect('/portfolio')->with('success','Album removed');\n }\n }\n}", "title": "" }, { "docid": "ff85d8135b960df73371ee3703e738a4", "score": "0.5643097", "text": "public function destroy($id)\n {\n $file_name = DB::table(\"research\")->where('id',$id)->value('research_image');\n unlink(public_path(\"front/assets/images/what-we-do/research/\".$file_name)); \n DB::table(\"research\")->where('id',$id)->delete();\n return redirect()->route('all-research')->with('msg','Research deleted successfully with the image');\n }", "title": "" }, { "docid": "4dfae537943a63cbddf6151c77a88821", "score": "0.5636697", "text": "public function destroy($id)\n { \n $products = Product::findOrFail($id);\n // $delete = $products->slug;\n if($products->slug) {\n \\File::delete( public_path('storage/'.$products->slug ) );\n }\n \n // File::delete(public_path(\"storage/\"), $delete);\n Product::destroy($id);\n return redirect()->route('product-list.index')->with('success','Product Destory Successfully !!!');\n\n }", "title": "" }, { "docid": "d261281fcf3d7ca08f9b610eb6c3b1f0", "score": "0.56346554", "text": "public function destroy($id)\n {\n $photo = Photo::findOrFail($id);\n unlink(public_path() . $photo->image_url);\n $photo->delete();\n }", "title": "" }, { "docid": "e56ffdb12b7e8ce9ce9b709dd82f37f7", "score": "0.56325144", "text": "public function removeById($id);", "title": "" }, { "docid": "e56ffdb12b7e8ce9ce9b709dd82f37f7", "score": "0.56325144", "text": "public function removeById($id);", "title": "" }, { "docid": "5e46d09ef2d1d9f143d6831260992e3f", "score": "0.56248415", "text": "public function destroy($id)\n {\n $pres=Prescription::find($id);\n $fileName=$pres->item;\n unlink(storage_path().'/'.'app'.'/'.'public' .'/'.'prescriptions'.'/'. $fileName);\n $pres->delete();\n }", "title": "" }, { "docid": "0428848b8d6110c6be21d9479ece2192", "score": "0.56237406", "text": "public function removeImage()\n {\n if (!empty($this->image) && !empty($this->id)) {\n $path = storage_path($this->image);\n if (is_file($path)) {\n unlink($path);\n }\n if (is_file($path.'.thumb.jpg')) {\n unlink($path.'.thumb.jpg');\n }\n }\n }", "title": "" }, { "docid": "1ed1ac142686a23f0827e755ecbc86db", "score": "0.5618705", "text": "public function delete($resource, array $args = [], array $options = []) {\n return $this->do('DELETE', $resource, $args, $options);\n\n }", "title": "" }, { "docid": "c0ac500c5b367ee589c3c33143eb832b", "score": "0.5617002", "text": "public function destroy(Resource $resource)\n {\n $resource->delete();\n return response()->json(['success' => 'borrado correctamente']);\n }", "title": "" }, { "docid": "a9c212129736f6a4e7fd4eddbccc6f2f", "score": "0.56163317", "text": "public function destroy($id)\n {\n $delete = Supplier::where(\"id\", $id)->first();\n $img = $delete->photo;\n if($img){\n unlink('backend/assets/images/supplier/'.$img);\n $delete->delete();\n toast('Supplier Information Delete Successfully','success');\n return redirect()->route('index.supplier');\n }else{\n toast('Supplier Not Deleted','success');\n return redirect()->route('index.supplier');\n }\n }", "title": "" }, { "docid": "6b5dbac631e37705e1c7cf319db2d7e6", "score": "0.56112254", "text": "public function deleteFromDisk()\n {\n return Storage::disk($this->getLocalDiskName())->delete($this->getStoragePath(true));\n }", "title": "" }, { "docid": "30687a12463a759554c0cdd15b679592", "score": "0.56098014", "text": "public function remove (EntityInterface $entity);", "title": "" }, { "docid": "14d4df02668a2d07f51666ab31e093b8", "score": "0.5609148", "text": "public function destroy($id)\n {\n $store = Store::findorFail($id);\n $product = Product::firstorfail()->where('store_id', $id);\n // unlink(public_path() . '/img/' . $product->image);\n $product->delete();\n unlink(public_path() . '/str_img/' . $store->image);\n $store->delete();\n return redirect()->back()->withDelete(\"Store Deleted Succesfully\");\n\n\n \n }", "title": "" }, { "docid": "942f7427e779526c94189558d1185b66", "score": "0.56033164", "text": "public function delete()\n {\n Yii::debug(\"Deleting last upload.\", self::CATEGORY);\n unlink($this->path);\n Yii::$app->session->remove(self::cacheKey());\n }", "title": "" }, { "docid": "f7e25a0f3411ba82d9ef10dbdff68bb4", "score": "0.5600532", "text": "public function beforeDelete($resource)\n {\n return $resource;\n }", "title": "" }, { "docid": "bc970628483c63b419ea48f599c8c972", "score": "0.5598614", "text": "public function destroy($id)\n {\n $product = Product::findOrFail($id);\n $photo = $product->image;\n if ($photo) {\n unlink($photo);\n Product::findOrFail($id)->delete(); \n }else{\n Product::findOrFail($id)->delete();\n }\n\n }", "title": "" }, { "docid": "5f7b880d9042e6af83f1343c11f66a8e", "score": "0.5595085", "text": "public function destroy($record);", "title": "" }, { "docid": "eb90c146961dd680727f52741dd87d78", "score": "0.55930966", "text": "public function delete($key) {\n $this->assertKey($key);\n \n unset($this->storage[$key]);\n }", "title": "" }, { "docid": "1f90eefbc842f865e713597e80b0fc92", "score": "0.55857533", "text": "public function remove($file);", "title": "" }, { "docid": "0d6640f36c0ca88fbe56977a74dad5f1", "score": "0.55737436", "text": "public function remove(MediaInterface $media);", "title": "" }, { "docid": "268c30c6782025503083fc7ba52c1d0a", "score": "0.557298", "text": "public function delete() {\n $this->dataStoreAdapter->deleteObject($this->getUuid());\n }", "title": "" }, { "docid": "68aa5a7a833751b6ce51749cd9ab047e", "score": "0.5570882", "text": "public function destroy()\n {\n LaraFile::delete(\"images/{Auth::user()->avatar}\");\n }", "title": "" }, { "docid": "8179dc9b6bd99410fef7c74e3b56208a", "score": "0.5570384", "text": "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n @unlink($file); \n \n }", "title": "" }, { "docid": "4aff284263b8a4a2b80b972accc89eb6", "score": "0.55585116", "text": "public function removeFile($file_obj)\n\t{\n\t\t$fs = new Filesystem();\n\t\tif($fs->exists($file_obj->getUrlStorage()))\n\t\t{\n\t\t\t$fs->remove($file_obj->getUrlStorage());\n\t\t}\n\t}", "title": "" }, { "docid": "614063fb503a57e9decfce510aa95492", "score": "0.5555877", "text": "public function destroy($id)\n {\n $product = Product::find($id);\n if (($oldFile = $product->photo) !== 'uyuni.jpg'){\n Storage::delete($oldFile);\n }\n $product->delete();\n return redirect()->route('product.index')->with('success', 'Product successfully destroyed');\n }", "title": "" }, { "docid": "e58edf0ef06400cd31b9c6df91114be3", "score": "0.5555602", "text": "public function destroy(Attribute $attribute)\n {\n //delete a attribute by softDelete.\n $userId = $attribute->Category->Store->user_id;\n\n if (auth()->id() == $userId) {\n if ($attribute->delete()) {\n return new AttributeResource($attribute);\n }\n } else {\n abort(400, 'the Auth user do not store owner');\n }\n }", "title": "" }, { "docid": "ec1b691c67eb4c9111f82f370bc46ab2", "score": "0.55521524", "text": "public function removeAction ()\n { \n if (!empty ($this->params ['file']) AND file_exists (UPLOAD_PATH.$this->params ['file']))\n unlink (UPLOAD_PATH.$this->params ['file']); \n if (!empty ($this->params ['media_id']))\n {\n $model = new Model_DbTable_MediaData ();\n $model->delete_media ($this->params ['media_id']);\n } \n }", "title": "" }, { "docid": "cf67810bc53f9cd6c02a127c0ee780e0", "score": "0.55445576", "text": "public function remove()\n\t{\n\t\tFile::remove($this->tempName);\n\t}", "title": "" }, { "docid": "94cb51fff63ea161e1d8f04215cfe7bf", "score": "0.55422723", "text": "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "45876224e081764ab571b0cb929a5473", "score": "0.5533963", "text": "public function destroy($id)\n {\n\n $product=Product::find($id);\n $image=str_slug($product->imagePath);\n //no se borro la imagen ???\n Storage::delete($image);\n $product->delete();\n \n return back();\n \n }", "title": "" }, { "docid": "9ac57f5d74d74f050136ae1e642ec949", "score": "0.5532133", "text": "public function delete($path) {\n $absPath = $this->_getAbsPath($path);\n $status = @unlink($absPath);\n\n if (!$status) {\n if (file_exists($absPath)) {\n throw new Scalar_Storage_Exception('Unable to delete file.');\n } else {\n $this->_log(\"Scalar_Storage_Adapter_Filesystem: Tried to delete missing file '$path'.\");\n }\n }\n }", "title": "" }, { "docid": "584dea86c95ee49398418c499126a231", "score": "0.55317944", "text": "public function forgetUsed()\n {\n if ($this->app['files']->exists($this->getUsedStoragePath())) {\n $this->app['files']->delete($this->getUsedStoragePath());\n }\n }", "title": "" }, { "docid": "52c48eff326d035cdfe9e0df0c79a23f", "score": "0.55300117", "text": "public function removeFromStorage()\n {\n if ( ! $this->is_raw ) {\n return MediaStorage::adapterByDisk($this->disk)->delete($this->path);\n }\n\n return true;\n }", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "62470bdab73b1c8776214a0d888756d6", "score": "0.55259556", "text": "public function delete($filename = null){\r\n $filename = $this->getFile($filename);\r\n unlink($filename);\r\n }", "title": "" }, { "docid": "fca5783c203ebaaaafea2bcc3d6ca335", "score": "0.5525723", "text": "public function destroy($id)\n {\n \n $deleteItem = Slider::where('id', '=', $id)->first();\n $oldImg = $deleteItem->image;\n\n $oldfile = public_path('images/').$deleteItem->image;\n\n if (File::exists($oldfile))\n {\n File::delete($oldfile);\n }\n \n $slider = Slider::findOrFail($id);\n $slider->delete(); \n\n return redirect()->route('admin.slider')->with('success','Slider Item deleted successfully');\n }", "title": "" }, { "docid": "2b40268130454e39a95a6fde14dd39ee", "score": "0.55251133", "text": "public function destroy($id)\n {\n $delete = Image::find($id);\n $image = $delete->name;\n $delete->delete();\n Storage::delete('uploads/'.$image);\n return redirect()->back();\n }", "title": "" }, { "docid": "3d971daf6c6545b8d3f3ab39cedcd813", "score": "0.55225646", "text": "public static function untagOnDelete();", "title": "" }, { "docid": "ec759861dd3d396dcc09d5e1bfcf628b", "score": "0.5521281", "text": "public function unlink($path);", "title": "" }, { "docid": "ec759861dd3d396dcc09d5e1bfcf628b", "score": "0.5521281", "text": "public function unlink($path);", "title": "" }, { "docid": "0d93adedaef8f05d9f7cbb129944a438", "score": "0.55152917", "text": "public function delete()\n {\n imagedestroy($this->image);\n $this->clearStack();\n }", "title": "" }, { "docid": "af145ca4d7fcaa5c229e51cfdaf9bb3d", "score": "0.55152094", "text": "public function delete($identifier);", "title": "" } ]
1d3e54e15557ee672725c609c51ac22e
used by select dropdown list
[ { "docid": "f5c506d73a10aacbfe565ab56d764552", "score": "0.0", "text": "function read(){\n //select all data\n $query = \"SELECT\n *\n FROM\n $this->table_name\";\n \n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n \n return $stmt;\n }", "title": "" } ]
[ { "docid": "63f4c8e44e598a30987cb2d7049334ae", "score": "0.74460447", "text": "public function _generateSelect(){ }", "title": "" }, { "docid": "ac051372f164b700503dc029650daaa3", "score": "0.7080372", "text": "static function select($name,$list,$options,$selected){}", "title": "" }, { "docid": "b7264f62dbfa87b9ef742ffc4f7cb152", "score": "0.6888034", "text": "function gen_select ($nombre,$resultados,$id,$campo,$campo1,$des=\"\") {\r\n \r\n $resultados->MoveFirst();\r\n $cantidad=$resultados->RecordCount();\r\n \r\n echo \"<select name='$nombre' onKeypress='buscar_op(this);' onblur='borrar_buffer()' onclick='borrar_buffer()' $des>\";\r\n for($i=0;$i<$cantidad;$i++) {\r\n\t$datos_ingor=$resultados->fields[\"$campo\"];\r\n\t$string=$resultados->fields[\"$campo1\"];\r\n\t ?>\r\n\t <option value='<?=$datos_ingor?>' <? if ($id==$datos_ingor) echo 'selected'?> > <?= $string?> </option>\r\n\t <? \r\n\t$resultados->MoveNext();\r\n }\r\n echo \"</select>\";\r\n}", "title": "" }, { "docid": "bb8b96904c50f2ffc41c0b011e58dbd8", "score": "0.687587", "text": "public function getSelect()\n\t {\n\t }", "title": "" }, { "docid": "628bd5db95e6a75348c19c5de05b9987", "score": "0.6824778", "text": "public function makeSelect()\n {\n // This function should call the \"makeOptions\" function to produce the options. \n echo \"<select name={$this->getName()}>\";\n $this->makeOptions($this->getValue());\n echo \"</select>\";\n }", "title": "" }, { "docid": "aa007e4750d27a661a216ccf8a2db5a9", "score": "0.67802113", "text": "public function actionSeleccion()\r\n {\r\n \tif($_POST && $_POST['action'] == 'SELECTION')\r\n \t{\r\n \t\t$model = '';\r\n \t\tswitch ($_POST['slt_seleccion'])\r\n \t\t{\r\n \t\t\tcase 'DP':\r\n \t\t\t\t$model = new Reporteencuesta;\r\n \t\t\t\tbreak;\r\n \t\t\tcase 'DV':\r\n \t\t\t\tbreak;\r\n \t\t}\r\n \t\t$data = $model->attributeLabels();\r\n \t\tforeach($data as $id => $value)\r\n \t\t{\r\n \t\t\techo CHtml::tag('option',array('value' => $id),CHtml::encode($value),true);\r\n \t\t}\r\n \t}\r\n }", "title": "" }, { "docid": "b87b5de86fdfc687f16c45bb9af499d2", "score": "0.675115", "text": "protected function dropDownList()\n\t{\n\t\techo $this->getLabel();\n\t\techo $this->form->dropDownList($this->model, $this->attribute, $this->data, $this->htmlOptions);\n\t}", "title": "" }, { "docid": "6e70a3080a72ad0d0a2326640dae13a6", "score": "0.67324895", "text": "function gen_select_concepto ($nombre,$resultados,$id) {\r\n $resultados->MoveFirst();\r\n $cantidad=$resultados->RecordCount();\r\n \r\n echo \"<select name='$nombre' onKeypress='buscar_op(this);' onblur='borrar_buffer()' onclick='borrar_buffer()'>\";\r\n for($i=0;$i<$cantidad;$i++) {\r\n\t$datos_ingor=$resultados->fields['numero_cuenta'];\r\n\t$string=$resultados->fields['concepto'].\"&nbsp;[ \".$resultados->fields['plan'].\" ]\";\r\n\t?>\r\n\t<option value='<?=$datos_ingor?>' <?if ($id==$datos_ingor) echo 'selected'?> > <?=$string ?> </option>\r\n\t<? \r\n\t$resultados->MoveNext();\r\n }\r\n echo \"</select>\";\r\n}", "title": "" }, { "docid": "010cb9c1c78b650c78ffb600122b0b96", "score": "0.67144364", "text": "public function display() {\r\n\t\t$this->create_select_options();\r\n\t\tparent::display();\r\n\t}", "title": "" }, { "docid": "4ff6688e8482cc148427a20561fb25d8", "score": "0.6713258", "text": "public function selectHeadType(){\n //1=>Cash 2=>Bank 3=>Client 4=>Supplier \n echo \"<option value='2'>Bank</option>\"; \n echo \"<option value='3'>Client</option>\"; \n echo \"<option value='4'>Supplier</option>\"; \n }", "title": "" }, { "docid": "01f5d90e539aa28e85f1ced7b25dc1bb", "score": "0.6705073", "text": "public function selectAdminType(){\n //'Super Admin','Admin','Support Person','Data Entry'\n echo \"<option value='1'>Super Admin</option>\"; \n echo \"<option value='2'>Admin</option>\"; \n echo \"<option value='3'>Support Person</option>\"; \n }", "title": "" }, { "docid": "ce208c22d5294929503c42bc25b890cd", "score": "0.66834986", "text": "function drop($selVal,$ln='en',$event='')\n {\n $this->options($selVal,$ln);\n $this->cDrop=\"<select name=\\\"\".$this->name.\"\\\" id=\\\"\".$this->name.\"\\\" class=\\\"\".$this->style.\"\\\" \".$this->script.\" $event \\n >\".$this->options.\" </select>\";\n return $this->cDrop;\n }", "title": "" }, { "docid": "12e48dc8fe3fe2fb76f9f31989be1f33", "score": "0.66767675", "text": "public function uipopulatecombobox()\n\t{\n $params = \\Input::all();\n\n //Verifica se recebeu algum dado\n if ($params)\n {\n $ui_models = \\DB::table($params['table']);\n\n foreach ($params['conditions'] as $condition)\n {\n $ui_models->where($condition['field'], $condition['condition'], $condition['value']);\n }\n\n $ui_models = $ui_models->get();\n\n $html = '<option value=\"\">Selecione...</option>';\n\n if(count($ui_models) > 0)\n {\n foreach ($ui_models as $ui_model)\n {\n if(!empty($params['selected']) && $params['selected'] == $ui_model->{$params['value']})\n $html .= '<option selected=\"selected\" value=\"'. $ui_model->{$params['value']} .'\">'. $ui_model->{$params['label']} .'</option>';\n else\n $html .= '<option value=\"'. $ui_model->{$params['value']} .'\">'. $ui_model->{$params['label']} .'</option>';\n }\n }\n\n echo $html;\n }\n\t}", "title": "" }, { "docid": "9b4a6d4ce0eee7098497d218e058855c", "score": "0.6615287", "text": "function nn_sel(){\n\t\t\n\t\t$options = get_option( 'nn_sub_general_options' );\n\t\tif(!isset($options['nn_select'])) $options['nn_select'] = '';\n\t\techo \"<select id='nn_select' name='nn_sub_general_options[nn_select]'>\n\t\t\t\t<option></option>\n\t\t\t\t<option value='sel1'\".(($options['nn_select'] == 'sel1') ?\" selected='selected'\":\"\").\">\".__( ' One', 'nnp' ).\"</option>\n\t\t\t\t<option value='sel2'\".(($options['nn_select'] == 'sel2') ?\" selected='selected'\":\"\").\">\".__( ' Two', 'nnp' ).\"</option>\n\t\t\t\t<option value='sel3'\".(($options['nn_select'] == 'sel3') ?\" selected='selected'\":\"\").\">\".__( ' Three', 'nnp' ).\"</option>\n\t\t\t</select>\";\n\t}", "title": "" }, { "docid": "b8025622173c7147ebcec555b27b8082", "score": "0.6601399", "text": "private function _getItemSelect()\n {\n \t$items = '';\n \t\t\t$ippArray = $this->itemSelect; \t\t\t\n \t\t\tforeach($ippArray as $ippOpt){ \n\t\t \t$items .= ($ippOpt == $this->itemsPerPage) ? \"<option selected value=\\\"$ippOpt\\\">$ippOpt</option>\\n\":\"<option value=\\\"$ippOpt\\\">$ippOpt</option>\\n\";\n \t\t\t} \t\t\t\n\t \treturn \"<label>\".$this->_navigation['ipp'].\"</label>\n\t \t<select name=\\\"dataTables-example_length\\\" class=\\\"form-control input-sm\\\" onchange=\\\"window.location='$this->_link?current=1&item='+this[this.selectedIndex].value;return false\\\">$items</select>\\n\"; \t\n }", "title": "" }, { "docid": "da87351d2dbd531de2394711e9dfd14f", "score": "0.6545587", "text": "public function render(){\n $style = $this->style != null ? \" style=\\\"\".$this->style.\" !important\\\"\" : \"\";\n\t\techo '<div class=\"JSDropdownListItem\"'.$style.'>';\n\t\techo '<select class=\"select\" data-url=\"'.$this->url.'\">';\n\t\tforeach($this->values as $val => $description){\n\t\t\techo '<option value=\"'.$val.'\" '.($val == $this->currentValue ? 'selected' : '').'>'.$description.'</option>';\t\t\t\n\t\t}\t\t\n\t\techo '</select>';\n\t\techo '</div>';\n\t}", "title": "" }, { "docid": "5caeee51e007954bc8d9b7ae89d960ce", "score": "0.653469", "text": "public function select( $info ) {\n ?>\n <div>\n <label for='<?php echo $this->get_field_id( $info['id'] ); ?>'><?php echo $info['title']; ?></label>\n <select name='<?php echo $this->get_field_name( $info['id'] ); ?>' id='<?php echo $this->get_field_id( $info['id'] ); ?>' >\n <?php foreach($info['options'] as $value => $text ) : ?>\n <option value=\"<?php echo $value ?>\" <?php echo ( $value == $info['value'] ) ? 'selected' : '' ?> ><?php echo esc_attr( $text ) ?></option>\n <?php endforeach; ?> \n </select>\n </div>\n <?php\n }", "title": "" }, { "docid": "f96287c1b2909030a7822eaa313fd10f", "score": "0.653438", "text": "function callback_select( $args ) {\n\n $value = esc_attr( $this->get_option( $args['id'], $args['section'], $args['std'] ) );\n $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular';\n $dis=isset( $args['disabled'] ) && !is_null( $args['disabled'] ) ? $args['disabled'] : '';\n $size = 'gs_select_type';\n $html = sprintf( '<select class=\"%1$s\" name=\"%2$s[%3$s]\" id=\"%2$s[%3$s]\" %4$s >', $size, $args['section'], $args['id'],$dis );\n foreach ( $args['options'] as $key => $label ) {\n $html .= sprintf( '<option value=\"%s\"%s>%s</option>', $key, selected( $value, $key, false ), $label );\n }\n $html .= sprintf( '</select>' );\n $html .= sprintf( '<span class=\"gs_select_desc\"> %s</span>', $args['desc'] );\n\n echo $html;\n }", "title": "" }, { "docid": "16d1f24905d10c498440addcca3fdc44", "score": "0.65199155", "text": "function db_select($query,$txt_name,$txt_value,$function,$default,$class,$tabindex, $readonly = NULL, $additional= NULL){\n \techo \"<select id='$txt_name' name='$txt_name' onchange='$function' class='$class' $readonly $additional>\\n\";\n \tif($default <> '') echo \"<option value=''>$default</option>\\n\";\n \twhile($row = mysqli_fetch_array($query)){\n \t\tif($txt_value == $row[0])\n \t\techo \"<option value='$row[0]' selected>\".stripslashes($row[1]).\"</option>\\n\";\n \t\telse\n \t\techo \"<option value='$row[0]'>\".stripslashes($row[1]).\"</option>\\n\";\n \t}\n \techo \"</select>\\n\";\t\n }", "title": "" }, { "docid": "5c19e02b8f62434ef963b24d6101a699", "score": "0.65059394", "text": "function dropDown($type) {\n\t\tglobal $con;\n\t\t$SQLselect = \"SELECT \";\n\t\t$SQLselect .= \"ID, value \";\t\n\t\t$SQLselect .= \"FROM \";\n\t\t$SQLselect .= \"lookUp WHERE type='$type'\";\n\t\t\n\t\t$result = mysqli_query($con, $SQLselect);\n\t\n\techo '<select class=\"'.$type.'\"name=\"'.$type.'[]\">';\n\techo '<option value=\"\" selected=\"selected\">..select..</option>';\n\t \t\twhile($row = mysqli_fetch_assoc($result)) {\n\t \t\t\techo '<option value=\"'.$row['value'].'\">'.$row['value'].'</option>';\t\n\t\t\t}\n\techo'</select>';\n\t}", "title": "" }, { "docid": "4cd49d77e2f0c5952ec94f3bc1ad4757", "score": "0.64817744", "text": "public function selectGender(){\n //'Super Admin','Admin','Support Person','Data Entry'\n echo \"<option value='Male'>Male</option>\"; \n echo \"<option value='Female'>Female</option>\"; \n }", "title": "" }, { "docid": "9242b85bc6503bb133bc2534ca9171a1", "score": "0.6469684", "text": "function showSelect($options, $name, $label, $column = 'name')\n{\n if(count($options) > 0)\n echo '<div id=\"'.$name.'select\" class=\"form-group form-group-sm \" >\n <label>'.$label.'</label>\n <select required id=\"'.$name.'\" name=\"'.$name.'\" class=\"form-control areaselect\">\n <option disabled selected value=\"\">Please Select an option</option>';\n foreach($options as $option)\n {\n ?>\n <option value=\"<?= $option['id']; ?>\"><?= $option[$column]; ?></option> \n <?php\n }\n echo ' </select>\n </div>';\n}", "title": "" }, { "docid": "f144f0a488178e03ef7ca3526fd04212", "score": "0.6463595", "text": "function print_select($value){\n\t\techo wp_kses_post($this->before_option_title.$value['name'].$this->after_option_title);\n\t\tif (isset($value['std'])) $std = $value['std']; \n\t\telse $std = \"\";\n\t\t$input_value = $this->get_field_value($value['id'], $std);\n\t\t\t\n\t\techo '<select class=\"option-select\" name=\"'.esc_attr($value['id']).'\" id=\"'.esc_attr($value['id']).'\">';\n\t\t\n\t\tforeach ($value['options'] as $option) {\n\t\t\t$attr='';\n\t\t\tif (isset($option['id'])){\n\t\t\t\tif ( get_option( $value['id'] ) == $option['id']) {\n\t\t\t\t\t$attr = ' selected=\"selected\"';\n\t\t\t\t }\n\t\t\t \t if ( $option['id'] == 'disabled') {\n\t\t\t\t\t$attr.= ' disabled=\"disabled\"';\n\t\t\t\t }\n\t\t\t\t if (isset($option['class'])){\n\t\t\t\t\t$attr.=' class=\"'.esc_attr($option['class']).'\"';\t\t\t \t\n\t\t\t\t }\n\t\t\t\techo '<option '.$attr.' value=\"'.esc_attr($option['id']).'\">'.esc_html($option['name']).'</option>';\n\t\t\t}\t \n\t\t} \n\t\n\t\techo '</select>';\n\t\t$this->close_option($value);\n\t}", "title": "" }, { "docid": "953bfdc110de918c896a4b58d79c73d3", "score": "0.6458218", "text": "public function get_combo(){\n if( $_SERVER['REQUEST_METHOD']==\"POST\" ){\n $this->load->model('lists_model');\n $this->load->helper('form');\n \n $eval = '$list = $this->lists_model->get_'. $this->input->post('dataname') .'(';\n\n if( $this->input->post(\"id\") ) $eval.= $this->input->post(\"id\") . ',';\n $eval.= 'array(\"\"=>\"'. $this->input->post('default') .'\"));';\n\n eval($eval);\n\n echo form_dropdown($this->input->post('name'), $list, $this->input->post('selected'), $this->input->post('extra'));\n }\n }", "title": "" }, { "docid": "43a62b4e730f49aced52f02cf0de1c61", "score": "0.6454438", "text": "function _display($list, $name)\n\t{\t\t\n\t\tinclude PATH_THIRD.'reegion_select/libraries/regions.php';\n\t\t\n\t\t$style = (empty(ee()->TMPL->tagdata)) ? 'dropdown' : 'linear';\n\t\t$show = ee()->TMPL->fetch_param('show', FALSE);\n\t\t$hide = ee()->TMPL->fetch_param('hide', FALSE);\n\t\t$title = ee()->TMPL->fetch_param('title', lang('rs_select').' '.lang('rs_'.$name));\n\n\t\t$vars = array();\n\t\t$i = 0;\n\t\tif($title !== 'null') $options = array('' => $title);\n\t\t\t\t\n\t\tif($style == 'dropdown')\n\t\t{\n\t\t\t$type = ee()->TMPL->fetch_param('type', 'name');\n\t\t\t$select_name = ee()->TMPL->fetch_param('name', $name);\n\t\t\t$id = ee()->TMPL->fetch_param('id', FALSE);\n\t\t\t$class = ee()->TMPL->fetch_param('class', 'reegion_select');\n\t\t\t$tabindex = ee()->TMPL->fetch_param('tabindex', FALSE);\n\t\t\t$required = ee()->TMPL->fetch_param('required', FALSE);\n\t\t\t$selected = ee()->TMPL->fetch_param('selected', '');\n\t\t\t$null_divider = ee()->TMPL->fetch_param('null_divider', 'y');\n\t\t\t$lang = ee()->TMPL->fetch_param('language', 'en');\n\t\t\t\n\t\t\t$extra = 'class=\"'.trim($class).'\"';\n\t\t\tif($id)\n\t\t\t{\n\t\t\t\t$extra .= ' id=\"'.trim($id).'\"';\n\t\t\t}\n\t\t\tif($tabindex)\n\t\t\t{\n\t\t\t\t$extra .= ' tabindex=\"'.intval($tabindex).'\"';\n\t\t\t}\n\t\t\tif($required)\n\t\t\t{\n\t\t\t\t$extra .= ' required=\"required\"';\n\t\t\t}\n\t\t\t\n\t\t\t// Check for data- params\n\t\t\tif(!empty(ee()->TMPL->tagparams))\n\t\t\t{\n\t\t\t\tforeach(ee()->TMPL->tagparams as $param => $value)\n\t\t\t\t{\n\t\t\t\t\tif(substr($param, 0, 5) == 'data-')\n\t\t\t\t\t{\n\t\t\t\t\t\t$extra .= ' '.$param.'=\"'.$value.'\"';\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\tif($null_divider == 'y')\n\t\t\t{\n\t\t\t\t$options[] = '--------------------';\n\t\t\t}\t\t\n\t\t\n\t\t}\n\t\t\t\t\n\t\tswitch($list)\n\t\t{\n\t\t\tcase 'countries':\n\t\t\t\t$regions = $countries;\n\t\t\t\tbreak;\n\t\t\tcase 'states':\n\t\t\t\t$regions = $states;\n\t\t\t\tbreak;\n\t\t\tcase 'provinces':\n\t\t\t\t$regions = ($lang == 'fr') ? $provinces_fr : $provinces;\n\t\t\t\tbreak;\n\t\t \tcase 'provinces_states':\n\t\t\t\t$regions[lang('rs_provinces')] = ($lang == 'fr') ? $provinces_fr : $provinces;\n\t\t\t\t$regions[lang('rs_states')] = $states;\n\t\t\t\tbreak;\n\t\t \tcase 'states_provinces':\n\t\t\t\t$regions[lang('rs_states')] = $states;\n\t\t\t\t$regions[lang('rs_provinces')] = ($lang == 'fr') ? $provinces_fr : $provinces;\n\t\t\t\tbreak;\n\t\t\tcase 'ukcounties' :\n\t\t\t\t$regions = $ukcounties;\n\t\t\t\tbreak;\t\t\t\t\n\t\t}\n\t\t\t\n\t\tforeach($regions as $k => $label)\n\t\t{\n\t\t\tif(is_array($label))\n\t\t\t{\n\t\t\t\t// States and provinces are different\n\t\t\t\t// (multidimensional array so we get optgroups)\n\t\t\t\tforeach($label as $sp_k => $sp_label)\n\t\t\t\t{\n\t\t\t\t\t$val = ((isset($type) && $type == 'alpha2') || $style == 'linear') ? $sp_k : $sp_label;\n\t\t\t\t\tif(\n\t\t\t\t\t\t($show == FALSE || in_array($val, explode('|', $show))) && \n\t\t\t\t\t\t($hide == FALSE || !in_array($val, explode('|', $hide)))\n\t\t\t\t\t)\n\t\t\t\t\t{\n\t\t\t\t\t\t$options[$k][$val] = $sp_label;\n\t\t\t\t\t\t$vars[$i]['region_name'] = $sp_label;\n\t\t\t\t\t\t$vars[$i]['region_alpha2'] = $sp_k;\n\t\t\t\t\t\t$vars[$i]['region_alpha3'] = '';\n\t\t\t\t\t\t$i++;\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t\telse\n\t\t\t{\n\t\t\t\tif($style == 'dropdown')\n\t\t\t\t{\n\t\t\t\t\t$val = $label;\n\t\t\t\t\tswitch($type)\n\t\t\t\t\t{\n\t\t\t\t\t\tcase 'alpha2':\n\t\t\t\t\t\t\tif(!is_numeric($k))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$val = $k;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'alpha3':\n\t\t\t\t\t\t\tif(!is_numeric($k) && $list == 'countries')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$val = $countries_alpha3[$k];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\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$val = $k;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(\n\t\t\t\t\t($show == FALSE || in_array($val, explode('|', $show))) && \n\t\t\t\t\t($hide == FALSE || !in_array($val, explode('|', $hide)))\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t$options[$val] = $label;\n\t\t\t\t\t$vars[$i]['region_name'] = $label;\n\t\t\t\t\t$vars[$i]['region_alpha2'] = ($list == 'ukcounties') ? '' : $k;\n\t\t\t\t\t$vars[$i]['region_alpha3'] = ($list == 'countries') ? $countries_alpha3[$k] : '';\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\treturn ($style == 'dropdown') ? \n\t\t\tform_dropdown($select_name, $options, $selected, $extra) : \n\t\t\tee()->TMPL->parse_variables(ee()->TMPL->tagdata, $vars);\n\t}", "title": "" }, { "docid": "d3f12f5abc5bfe8cff3c150fd26fd7b5", "score": "0.6435195", "text": "function toHtml()\n\t{\n\t\tif ( empty($this->_values) && empty($this->_texts) )\n\t\t{\n\t\t}\n\t\t$options = $this->_select->getContent();\n\t\tforeach ($options as $key => $option)\n\t\t{ \n\t\t\t//if( empty($option) ) continue;\n\t\t\t$value = $option->getAttribute('value');\n\t\t\t$text = $option->getContent();\n\t\t\tif (in_array($value, $this->_values) ||\n\t\t\t( !empty($text) && in_array($text[0], $this->_texts)))\n\t\t\t{\n\t\t\t\t$options[$key]->setAttribute('selected');\n\t\t\t}\n\t\t\tif (in_array($value, $this->_disabled))\n\t\t\t{\n\t\t\t\t$options[$key]->setAttribute('disabled');\n\t\t\t}\n\t\t}\n\n\t\t// Ajout du label\n\t\tif ( ! empty($this->_label) )\n\t\t{\n\t\t\t$this->insertContent($this->_label);\n\t\t}\n\t\treturn parent::toHtml();\n\t}", "title": "" }, { "docid": "1e975b32b46c45223082b6e24077d6bf", "score": "0.6424506", "text": "public function vistaIntroduccionSelectController(){\n\t\t\t$respuesta = Datos::vistaIntroduccionModel(\"introduccion\");\n\t\t\t$a=\"\";\n\n\t\t\n\t\t\tforeach($respuesta as $row => $item){\n\t\t\t\t$id=$item[\"id_introduccion\"];\n\t\t\t\t$e=$item[\"codigo\"];\n\n\t\t\t\n\t\t\techo'<option value='.$id.'>'.$e.'</option>';\n\t\t\n\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "3b6c26a837b8f2377c2b720b3196f4f9", "score": "0.64195204", "text": "function get_schedule_site_dropdown($name,$data,$selected_id=''){\n $dropdown = '<select class=\"form-control selectpicker\" data-container=\"body\" data-size=\"5\" data-live-search=\"true\" title=\"\" name=\"'.$name.'[]\" id=\"morning_schedule\" style=\"width:100%;\">\n <option value=\"\"></option>';\n if($data){\n foreach($data as $site){\n $selected = ($selected_id && $selected_id==$site->id) ? \"selected\" : '';\n \n $dropdown.= '<option value=\"'.$site->id.'\" '.$selected.'>#'.$site->reference_no.'-'.$site->description.'</option>';\n }} \n $dropdown .= '</select>';\n\n return $dropdown;\n}", "title": "" }, { "docid": "4c7c1ca7d71382c7802dbff65309ea43", "score": "0.6409008", "text": "public static function dropDownList()\n {\n return ['' => '(nicht gesetzt)'] + \\yii\\helpers\\ArrayHelper::map(self::find()->dropdownScope()->orderBy('modified_ts desc')->all(),'id','name');\n }", "title": "" }, { "docid": "1b9abbc7439e595d648a4ab74056d573", "score": "0.6398483", "text": "function select($name) {\r\n\t\t// Select element properties\r\n\t\t$select_data = array(\"#\" => $this->data, \"name\" => $name, \"id\" => $name);\r\n\r\n\t\t// Merge View::$properties\r\n\t\t$this->merge_properties($select_data);\r\n\r\n\t\t// Generate the tag text\r\n\t\t$this->data = $this->tag(\"select\", $select_data);\r\n\t}", "title": "" }, { "docid": "8e3978c4ded0d466bf2c04ebfefed552", "score": "0.6387414", "text": "public function selectAdmin(){\n $data= $this->getAllRecord(\"admins\");\n if($data!=\"NO_DATA\"){\n foreach ($data as $row){\n echo \"<option value=\".$row['admin_id'].\">(\".$row['admin_id'].\") \".$row['first_name'].\" \".$row['last_name'].\" (\".$row['status'].\")</option>\"; \n }\n }\n }", "title": "" }, { "docid": "8593e66e083e3b982f164babf91adc8f", "score": "0.6382523", "text": "abstract public static function setSelectParams();", "title": "" }, { "docid": "248c528e4b8df3e1f0b2236d0ebb0d9b", "score": "0.6382379", "text": "public function run()\n\t{\n\t\tlist($name,$id) = $this->resolveNameID();\n\t\t\n\t\tif ($this->hasModel()) {\n\t\t\tif ($this->form) {\n\t\t\t\t$this->htmlOptions['class']=$this->htmlOptions['class'].\" selectpicker\";\t\t\t\t\t\t\n\t\t\t\techo $this->form->dropDownList($this->model, $this->attribute, $this->data, $this->htmlOptions);\n\t\t\t\t\t\n\t\t\t} else {\n\t\t\t\t$this->htmlOptions['class']=$this->htmlOptions['class'].\" selectpicker\";\n\t\t\t\techo CHtml::activeDropDownList($this->model, $this->attribute, $this->data, $this->htmlOptions);\n\t\t\t}\n\n\t\t} else {\t\t\t\n\t\t\t$this->htmlOptions['class']=\"selectpicker\";\n\t\t\tif($this->multiple){\n\t\t\t\t$this->htmlOptions['multiple']=\"multiple\";\n\t\t\t}\t\t\t\n\t\t\t$this->htmlOptions['data-live-search']=$this->data_live_search;\n\t\t\techo CHtml::dropDownList($this->name, $this->value, $this->data, $this->htmlOptions);\n\t\t}\n\n\t\t$this->registerClientScript($id);\n\t}", "title": "" }, { "docid": "eed42dfa786eb6111aa010515c106d0d", "score": "0.6376395", "text": "function workarea_form_select2($bez,$name,$value,$_options,$x=200,$br=1)\r\n\t{\r\n\t\t$html=\"\";\r\n\t\t$options=\"\";\r\n\t\tif($bez!=\"\"){$html = $bez.'<br>';}\r\n\t\tforeach ($_options AS $k=>$v)\r\n\t\t{\r\n\t\t\t$selected =\"\";\r\n\t\t\tif ($value==$k)\r\n\t\t\t{\r\n\t\t\t\t$selected = 'selected=\"selected\"';\r\n\t\t\t}\r\n\t\t\t$options.='<option value=\"'.$k.'\" '.$selected.'>'.$v.'</option>';\r\n\t\t}\r\n\r\n\t\t$html .='<select name=\"'.$name .'\" style=\"width: '.$x.'px\" class=\"listmenu\" >'.$options.'</select>';\r\n\t\tif ($br==1){$html.=\"<br>\";}\r\n\t\treturn $html;\r\n\t}", "title": "" }, { "docid": "0af795a110eb2f6f290e5e662ba22014", "score": "0.63609177", "text": "function ui_filter_field_select() {\n $select = new html_select(array('name' => 'field'));\n\n foreach (self::UI_VALID_FIELDS as $field) {\n $select->add($this->gettext($field), $field);\n }\n\n return $select->show();\n }", "title": "" }, { "docid": "36eb72fa1c21c3711cf67421d038b993", "score": "0.63579077", "text": "function workarea_form_select($bez,$name,$options,$x=200,$br=1)\r\n\t{\r\n\t\t$html=\"\";\r\n\t\tif($bez!=\"\"){$html = $bez.'<br>';}\r\n\t\t$html .='<select name=\"'.$name .'\" style=\"width: '.$x.'px\" class=\"listmenu\" >'.$options.'</select>';\r\n\t\tif ($br==1){$html.=\"<br>\";}\r\n\t\treturn $html;\r\n\t}", "title": "" }, { "docid": "1f0fa7dc2d2c1613d09435b78baeba20", "score": "0.6346194", "text": "function select()\n\t{\n\t}", "title": "" }, { "docid": "ce2f4781db8a74e6c7c1223adf4e7826", "score": "0.63419634", "text": "public function getSelects();", "title": "" }, { "docid": "b7763abbc94202ffae52ca186e92a3f8", "score": "0.63395405", "text": "public function Create() {\r\n $this->Html = \"<select size='{$this->size}' \" . $this->Atributos() . \">\";\r\n foreach ($this->items as $v) {\r\n if ($v['valor'] === $this->ItemSelected['valor'] ? $selected = \"selected\" : $selected = \"\")\r\n ;\r\n if ($v['title'] ? $title = \"title='\" . $v['title'] . \"'\" : $title = \"\")\r\n ;\r\n $this->Html .='\r\n <option value=\"' . $v['id'] . '\"' . $selected . ' ' . $title . '>' . $v['valor'] . '</option>';\r\n }\r\n $this->Html .= \"</select>\";\r\n }", "title": "" }, { "docid": "8c7f5cb03a64e2b1e4f7d10018e6a4b5", "score": "0.6338378", "text": "public function vistaElectroSelectController(){\n\t\t\t$respuesta = Datos::vistaElectroModel(\"electrocardiograma\");\n\t\t\t$a=\"\";\n\n\t\t\n\t\t\tforeach($respuesta as $row => $item){\n\t\t\t\t$id=$item[\"id_electro\"];\n\t\t\t\t$e=$item[\"resultado\"];\n\n\t\t\t\n\t\t\techo'<option value='.$id.'>'.$e.'</option>';\n\t\t\n\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "cb995c60323be973235b971ce5ac6cfd", "score": "0.6326147", "text": "function create_select_feld()\n\t\t{\n\t\t\t\t$optionen = $this->get_rapid_content_liste($_POST['rapid_content_list']);\n\n\t\t\t\t$cfeld = '<label for=\"' . $this->name . '\">{$plugin_' . $this->praefix . \"_\" . $this->\n\t\t\t\t\t\tname_org . '}{$plugin_error.'.$this->name.'} </label>';\n\t\t\t\t$cfeld .= \"\\n\";\n\t\t\t#\t$cfeld .= '<br />';\n\t\t\t\t$cfeld .= \"\\n\";\n\t\t\t\t$cfeld .= '<select name=\"' . $this->name . '\" id=\"' . $this->name .\n\t\t\t\t\t\t'\" size=\"1\"/>';\n\t\t\t\t$cfeld .= '<option value=\"0\">{$message_160}</option>';\n\t\t\t\tforeach ($optionen as $key => $value)\n\t\t\t\t{\n\t\t\t\t\t\t$key = $key + 1;\n\t\t\t\t\t\t$cfeld .= '<option {$selected' . $this->name .$value. '} value=\"' . $key . '\">' . $value . '</option>';\n\t\t\t\t}\n\t\t\t\t$cfeld .= \"</select>\\n\";\n\t\t\t\t$cfeld .= '<br />';\n\t\t\t\t#echo $cfeld;\n\t\t\t\t$this->cfeld = $cfeld;\n\t\t}", "title": "" }, { "docid": "8866a2013f6612ff7b31f820fe041d80", "score": "0.63247997", "text": "protected static function getSelectInput(){\n $options = array('key' => JText::_('Translated value'));\n $htmlCode = '<select id=\"'.$this->id.'\" name=\"'.$this->name.'\" class=\"inputbox\">';\n foreach ($options as $key => $value) {\n $selected = $this->value == $key ? ' selected=\"selected\"' : '';\n $htmlCode .= '<option value=\"'.$key.'\"'.$selected.'>'.$value.'</option>';\n }\n $htmlCode .= '</select>';\n return $htmlCode;\n }", "title": "" }, { "docid": "731018c26980a14e9a3e83f502cf1103", "score": "0.6323538", "text": "function clientDropDown($Developer)\n{\n\techo '<select name=\"Client_Selected\" class=\"form-control select select-primary\" data-toggle=\"select\">';\n\n\tif(!isset($_POST['Client_Selected']))\n\t\tforeach($Developer->getClientList() as $client)\n\t\t\techo '<option value=\"' . $client->getClientname() . '\">' . $client->getClientname() . '</option>';\n\telse\n\t\tforeach($Developer->getClientList() as $client)\n\t\t\tif($_POST['Client_Selected'] == $client->getClientname())\n\t\t\t\techo '<option selected=\"selected\" value=\"' . $client->getClientname() . '\">' . $client->getClientname() . '</option>';\n\t\t\telse\n\t\t\t\techo '<option value=\"' . $client->getClientname() . '\">' . $client->getClientname() . '</option>';\n\n\techo '</select>';\n\techo '<br>';\n\techo '<input type=\"submit\" class=\"btn btn-block btn-lg btn-primary\" value=\"Submit\" >';\n\techo '<br>'; \n\n}", "title": "" }, { "docid": "867178e9c827fef9cd70032d6281f362", "score": "0.63196194", "text": "function ReturnSelect() {\n $List = $this->businessLogic->SelectAllFromTable($this->table_name, $this->classneame);\n $CourseSelect=\"<option value='Select a Course'>Select a Course</option>\";\n for ($i = 0; $i < count($List); $i++) {\n $CourseSelect .= \"<option value=\" . $List[$i][\"id\"] . \">\" . $List[$i][\"name\"] . \"</option>\";\n }\n \n return $CourseSelect; \n }", "title": "" }, { "docid": "cc21f807355746ac838c1a737b7b0a45", "score": "0.6319313", "text": "function showFormSelect($row,$name,$filter,$search,$style,$options) {\n\t\t\t\t\n\t $value= $row[$name];\n\n\t\techo '<form method=\"post\" action=\"tracking-update.php\" target=\"hiddenFrame\">';\n\t\techo '<select ';\n\t\tif($style!='X') { echo ' style=\"'.$style.'\"'; }\n\t\techo 'name=\"fieldValue\" onChange=\"this.form.submit()\">';\n\t\techo '<option value=\"\"></option>';\n\t foreach($options as $option) {\n\t\t echo '<option value=\"'.$option.'\"';\t\t\n\t\t\tif($value==$option) { echo ' selected=\"true\"'; }\n\t\t\techo '>'.$option.'</option>';\n\t\t}\n\t\techo '</select>';\n\t\techo '<input type=\"hidden\" name=\"field\" value=\"'.$name.'\">';\n\t echo '<input type=\"hidden\" name=\"id\" value=\"'.$row['ID'].'\">';\n\t echo '</form>';\n\t}", "title": "" }, { "docid": "aaec97978c62612d38e84d1d66c68b63", "score": "0.63104916", "text": "public function getSelectTpVehiculo()\n {\n $htmlOptions = \"\";\n $arrData = $this->model->selectTpVehiculo();\n if (count($arrData) > 0) {\n for ($i=0; $i < count($arrData) ; $i++) { \n $htmlOptions .= '<option value=\"'.$arrData[$i]['id_tp_vehiculo'].'\">'.$arrData[$i]['nom_vehiculo'].'</option>';\n }\n }\n echo $htmlOptions;\n die();\n }", "title": "" }, { "docid": "cd3f1d09d2c2976e8ae502d55b436130", "score": "0.6306311", "text": "public function getDropDown()\n {\n return '';\n }", "title": "" }, { "docid": "cd3f1d09d2c2976e8ae502d55b436130", "score": "0.6306311", "text": "public function getDropDown()\n {\n return '';\n }", "title": "" }, { "docid": "a33a29cb5fa78833440d3d1b8ad37dc3", "score": "0.6298998", "text": "public function vistaLeccionSelectController(){\n\t\t\t$respuesta = Datos::vistaLeccionModel(\"leccion\");\n\t\t\t$a=\"\";\n\n\t\t\n\t\t\tforeach($respuesta as $row => $item){\n\t\t\t\t$id=$item[\"id_leccion\"];\n\t\t\t\t$e=$item[\"leccion\"];\n\n\t\t\t\n\t\t\techo'<option value='.$id.'>'.$e.'</option>';\n\t\t\n\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "e1e3771c3d900986aed5f11f897bd382", "score": "0.62635416", "text": "function _select($name, $options, $label = '',$key_value_field=array(), $selected='',$select_attrs=array(),$extra=''){\n $select_class = '';\n $form_group_class = '';\n $form_group_attr = '';\n $select= '';\n $include_blank = false;\n if(is_array($extra)){\n if(isset($extra['form_group_class']))\n $form_group_class = $extra['form_group_class'];\n \n if(isset($extra['form_group_attr']))\n $form_group_attr = $extra['form_group_attr'];\n \n if(isset($extra['include_blank']))\n $include_blank = $extra['include_blank'];\n \n if(isset($extra['select_class']))\n $select_class = $extra['select_class'];\n }\n $_select_attrs = '';\n foreach ($select_attrs as $key => $val) {\n $_select_attrs .= $key . '=' . '\"' . $val . '\" ';\n }\n $select .= '<div class=\"select-placeholder form-group ' . $form_group_class . '\" ' . $form_group_attr . '>';\n if ($label != '') {\n $select .= '<label for=\"' . $name . '\" class=\"control-label\">' . _l($label, '', false) . '</label>';\n }\n $select .= '<select id=\"' . $name . '\" name=\"' . $name . '\" class=\"form-control select2 js-select2 ' . $select_class . '\" data-live-search=\"true\" '.$_select_attrs.' >';\n if ($include_blank) {\n $select .= '<option value=\"\">'.$include_blank.'</option>';\n }\n foreach($options as $k=>$option){\n $key = '';\n $val = '';\n if(!empty($key_value_field)){\n if($key_value_field[0] == \"key\"){\n $key = $k;\n $val = $k;\n }else if($key_value_field[0] == \"value\"){\n $key = $option;\n $val = $option;\n }else{\n $keyvalue=$key_value_field[0]; \n $key = $option->$keyvalue;\n $val = $option->$keyvalue;\n if(count($key_value_field) > 1){\n $valuekey=$key_value_field[1];\n $val = $option->$valuekey;\n }\n \n }\n }else{\n $key = $k;\n $val = $option;\n }\n $is_selected = \"\";\n if($selected != ''){\n if(is_array($selected) && in_array($key,$selected))\n $is_selected = \"selected\";\n else if($selected == $key)\n $is_selected = \"selected\";\n \n }\n $select .= '<option value=\"' . trim($key) . '\" '.$is_selected.' >' . $val . '</option>';\n }\n $select .= '</select>';\n $select .= '</div>';\n return $select; \n}", "title": "" }, { "docid": "708fb19b76518a924a9505650f182bba", "score": "0.62634015", "text": "protected function _resetSelect()\n {\n }", "title": "" }, { "docid": "930e26f4e01f0d972a7a528107749265", "score": "0.6256415", "text": "public function select()\n {\n }", "title": "" }, { "docid": "3b47cccb22ff0f95396610b800b315d5", "score": "0.6241964", "text": "private function render_select(): string\n\t{\n\t\treturn 'SELECT ' . ($this->select ? $this->select : '*');\n\t}", "title": "" }, { "docid": "84f6ad1ea49014564dcac64f00c6d3a4", "score": "0.622283", "text": "function render_messenger_type_selectbox($name, $type = null)\r\n{\r\n global $BUCKYS_GLOBALS;\r\n ?>\r\n <select name=\"<?php echo $name?>\" class=\"select\">\r\n <option value=\"\">--</option>\r\n <?php\r\n foreach($BUCKYS_GLOBALS['messengerTypes'] as $v){\r\n echo '<option value=\"' . $v . '\" ' . ($v == $type ? 'selected=\"selected\"' : '') . '>' . $v . '</option>';\r\n }\r\n ?>\r\n </select>\r\n <?php\r\n}", "title": "" }, { "docid": "7baeb76b47526814b27cf85b2bc28127", "score": "0.6215479", "text": "function comboboxmanual($name, $id, $value, $isi, $selected)\n{\n $ci = get_instance();\n $cmb = \"<select name='$name' id='$id' class='custom-select col-6'>\";\n $cmb .= \"<option value=''>-- PILIH --</option>\";\n foreach ($value as $d) {\n $cmb .= \"<option value='\" . $d . \"'\";\n $cmb .= $selected == $d ? \"selected='selected'\" : '';\n $cmb .= \">\" . strtoupper($d) . \"</option>\";\n }\n $cmb .= \"</select>\";\n return $cmb;\n}", "title": "" }, { "docid": "64b0d5fe71b2c014e8b1f62c6f345ce5", "score": "0.6212847", "text": "public function vistaEjercicioSelectController(){\n\t\t\t$respuesta = Datos::vistaEjercicioModel(\"ejercicio\");\n\t\t\t$a=\"\";\n\n\t\t\n\t\t\tforeach($respuesta as $row => $item){\n\t\t\t\t$id=$item[\"id_ejercicio\"];\n\t\t\t\t$e=$item[\"nombre\"];\n\n\t\t\t\n\t\t\techo'<option value='.$id.'>'.$e.'</option>';\n\t\t\n\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "3a925551d9de273f7255ae9b0a0fd369", "score": "0.62104917", "text": "public function vistaTestSelectController(){\n\t\t\t$respuesta = Datos::vistaTestModel(\"test\");\n\t\t\t$a=\"\";\n\n\t\t\n\t\t\tforeach($respuesta as $row => $item){\n\t\t\t\t$id=$item[\"id_test\"];\n\t\t\t\t$e=$item[\"codigo\"];\n\n\t\t\t\n\t\t\techo'<option value='.$id.'>'.$e.'</option>';\n\t\t\n\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "c3c4c08a67e5e4ca0f7f40373fc54c11", "score": "0.62030613", "text": "function options($selVal,$ln)\n {\n // country list out sourcing\n\t\t\t\t$this->path=$this->base->_SW['DIR_CLASSES'].\"/base/country.class/\".$ln.'.ln-support.php';\n if(file_exists($this->path)){require_once($this->path);if(is_array($COUNTRIES)){$this->arrCountry=$COUNTRIES;} }\n\t\t\t\tif($this->label){$this->arrCountry[\"\"]=$this->label;}\n\n $keys=array_keys($this->arrCountry);$this->options='';\n for($c=0;$c<count($keys);$c++){\n\t\t\t\t \n\n if($selVal==$keys[$c]){$sel=\"Selected\";}else{$sel=\"\";}\n $this->options.=\"<option value=\\\"\".$keys[$c].\"\\\" $sel >\".$this->arrCountry[$keys[$c]].\"</option>\\n\";\n\n }\n\n }", "title": "" }, { "docid": "194f8fe3b6592909294e7cacb6f3a17b", "score": "0.6202206", "text": "public function selCarrera(){\n\t\t\t\n $respuesta = Datos::VerTablasModel(\"carrera\");\n \n foreach($respuesta as $row => $item) {\n\t\t\techo '<option value='.$item[\"id\"].'> '.$item[\"nombre\"].' </option>';\n\t\t\t}\n\t\t\t\n }", "title": "" }, { "docid": "4a74e11202483c830816ee6220358265", "score": "0.6200443", "text": "public function selectStatus(){\n echo \"<option value='1'>Active</option>\"; \n echo \"<option value='0'>Deactivate</option>\"; \n }", "title": "" }, { "docid": "cf3754e881f3a03cae1db4f834a5fdf0", "score": "0.6199584", "text": "function dropdown_list($con) {\r\n $sql \t = \"SELECT * \r\n FROM zaposleni\r\n ORDER BY ime\";\r\n\r\n $result = mysqli_query($con,$sql);\r\n $resultCheck = mysqli_num_rows($result);\r\n\r\n if ($resultCheck > 0){\r\n while ($row = mysqli_fetch_assoc($result)){\r\n $num = $row[\"id\"];\r\n $ime = $row[\"ime\"].\" \".$row[\"prezime\"];\r\n echo \"<option class='select_btn' value='\".$num.\" \".$ime.\"'>\".$ime.\"</option>\";\r\n }\r\n }\r\n }", "title": "" }, { "docid": "a2a78a840ebe816cd9c5913dd0c3df90", "score": "0.6196825", "text": "public function vistaNutricionSelectController(){\n\t\t$respuesta = Datos::vistaNutricionModel(\"nutricion\");\n\t\t$a=\"\";\n\n\t\n\t\tforeach($respuesta as $row => $item){\n\t\t\t$id=$item[\"id_nutricion\"];\n\t\t\t$e=$item[\"resultado\"];\n\n\t\t\n\t\techo'<option value='.$id.'>'.$e.'</option>';\n\t\n\n\t\t}\n\t}", "title": "" }, { "docid": "97c26412a77b0d6ebbfda55a37c9366c", "score": "0.61951697", "text": "public function vistaBicicletaSelectController(){\n\t\t\t$respuesta = Datos::vistaBicicletaModel(\"bicicleta\");\n\t\t\t$a=\"\";\n\n\t\t\n\t\t\tforeach($respuesta as $row => $item){\n\t\t\t\t$id=$item[\"id_bicicleta\"];\n\t\t\t\t$e=$item[\"marca\"];\n\n\t\t\t\n\t\t\techo'<option value='.$id.'>'.$e.'</option>';\n\t\t\n\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "9c0e05a9b238db80740679a282a9f52b", "score": "0.6195159", "text": "public function vistaLaboratorioSelectController(){\n\t\t\t$respuesta = Datos::vistaLaboratorioModel(\"laboratorio\");\n\t\t\t$a=\"\";\n\n\t\t\n\t\t\tforeach($respuesta as $row => $item){\n\t\t\t\t$id=$item[\"id_laboratorio\"];\n\t\t\t\t$e=$item[\"resultado\"];\n\n\t\t\t\n\t\t\techo'<option value='.$id.'>'.$e.'</option>';\n\t\t\n\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "7ee91ec94c9a0a79cf8b34fa50efd533", "score": "0.6192939", "text": "public function vistaEstadoSelectController(){\n\t\t\t$respuesta = Datos::vistaEstadoModel(\"estado\");\n\t\t\t$a=\"\";\n\n\t\t\n\t\t\tforeach($respuesta as $row => $item){\n\t\t\t\t$id=$item[\"id_estado\"];\n\t\t\t\t$e=$item[\"estado\"];\n\n\t\t\t\n\t\t\techo'<option value='.$id.'>'.$e.'</option>';\n\t\t\n\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "ef15cc8b01be1f88c14f150f92e2dcf7", "score": "0.6156059", "text": "public function vistaPlanEntreSelectController(){\n\t\t\t$respuesta = Datos::vistaPlanEntreModel(\"plan_entrenamiento\");\n\t\t\t$a=\"\";\n\n\t\t\n\t\t\tforeach($respuesta as $row => $item){\n\t\t\t\t$id=$item[\"id_planEntrenamiento\"];\n\t\t\t\t$e=$item[\"codigo\"];\n\n\t\t\t\n\t\t\techo'<option value='.$id.'>'.$e.'</option>';\n\t\t\n\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "2aa54cb10c6b0f0a8788edd12a033d23", "score": "0.6153474", "text": "function rbm_do_field_select( $name, $label = false, $value = false, $args = array() ) {\n\n\tnew RBM_FH_Field_Select( $name, $label, $args, $value );\n}", "title": "" }, { "docid": "1f0e44b9be736ba17edc6ca480e103ad", "score": "0.6146777", "text": "function menu ($arr, $name, $value) {\n\t\t\t\techo '<select name='.$name.'>';\n\t\t\t\tforeach ($arr as $ar) {\n\t\t\t\t\techo '<option value = \"'.$ar.'\"';\n\t\t\t\t\tif ($ar==$value) echo 'selected=\"selected\"';\n\t\t\t\t\t\techo '>'.$ar.'</option>';\n\t\t\t\t\t}\t\n\t\t\t\techo '</select>';\n\t\t\t}", "title": "" }, { "docid": "3b0908c53e9f60a9db71ef4f4b8bd734", "score": "0.6145252", "text": "public function getSelect(){\n\t\t$respuesta_grupos = Datos::obtenerGruposModel(\"grupos\");\n\n\t\t$st_grupo=\"\";\n\t\tfor($i=0;$i<sizeof($respuesta_grupos);$i++)\n\t\t\t$st_grupo=$st_grupo.\"<option value='\".$respuesta_grupos[$i]['id'].\"'>\".$respuesta_grupos[$i]['nombre'].\"</option>\";\n\n\t\treturn $st_grupo;\n\t}", "title": "" }, { "docid": "6dfaf4b450520d7bf9c2c6fe3c05579f", "score": "0.61437255", "text": "public function pilih_dokter() {\n $data['listDokter'] = $this->jadwal_dokter_model->ambil_dokter($this->uri->segment(3));\n $this->load->view('v_drop_down_dokter',$data);\n }", "title": "" }, { "docid": "797f2308d0b9cdb4d42e4774cc8ddf46", "score": "0.61353713", "text": "public function getSelectTipoIndicador() {\n \n $tipo = $this->getTipoIndicador();\n \n echo \"<select name='fkID_tipoI' id='fkID_tipoI' class='form-control'>\";\n echo \"<option></option>\";\n for($a=0;$a<sizeof($tipo);$a++){\n echo \"<option value='\".$tipo[$a][\"pkID\"].\"'>\".$tipo[$a][\"nombre\"].\"</option>\";\n }\n echo \"</select>\";\n }", "title": "" }, { "docid": "75f910dd51e3bb70f4d520c7028b416d", "score": "0.6131919", "text": "function generaSelect() { //creacioon de combo para las Regiones\n conexion::conectar();\n $consulta = pg_query(\"select * \n from mnt_areafarmacia \n inner join mnt_areafarmaciaxestablecimiento mafe\n on mafe.IdArea=mnt_areafarmacia.Id\n where mafe.IdArea <> 7 and mafe.IdArea <> 12 and mafe.Habilitado='S'\n and mafe.IdEstablecimiento=\" . $_SESSION[\"IdEstablecimiento\"].\" \n and mafe.IdModalidad=\".$_SESSION[\"IdModalidad\"]);\n conexion::desconectar();\n // Voy imprimiendo el primer select compuesto por los paises\n echo \"<select name='IdAreaOrigen' id='IdAreaOrigen' onchange='cargaContenido8(this.value);'>\";\n echo \"<option value='0'>[Seleccione Area Origen...]</option>\";\n while ($registro = pg_fetch_row($consulta)) {\n if ($registro[1] != \"--\") {\n echo \"<option value='\" . $registro[0] . \"'>\" . $registro[1] . \"</option>\";\n }\n }\n echo \"</select>\";\n }", "title": "" }, { "docid": "66c2d330d3b817d9750709c12b2763f7", "score": "0.61309123", "text": "function valueCombobox($loaimonan,$tenloai,$row){\n\t\t\tif($row->loaiMonAn == $loaimonan){\n\t\t\t\techo \"<option value='$loaimonan' selected>\".$tenloai.\"</option>\";\n\t\t\t}else{\n\t\t\t\techo \"<option value='$loaimonan'>\".$tenloai.\"</option>\";\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "c20c389ff7ddec93fdc697cc9883809e", "score": "0.6127273", "text": "function _project11b_select_options() {\n return array(\n t('Male'),\n t('Female'),\n t('Other')\n );\n}", "title": "" }, { "docid": "8723c6df54262363dc12497eb1bf2cf0", "score": "0.61180973", "text": "public function vistaRutinaSelectController(){\n\t\t\t$respuesta = Datos::vistaRutinaModel(\"rutina\");\n\t\t\t$a=\"\";\n\n\t\t\n\t\t\tforeach($respuesta as $row => $item){\n\t\t\t\t$id=$item[\"id_rutina\"];\n\t\t\t\t$e=$item[\"recorrido\"];\n\n\t\t\t\n\t\t\techo'<option value='.$id.'>'.$e.'</option>';\n\t\t\n\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "06501122e3d6a39c365db1396aeae81b", "score": "0.6116583", "text": "function get_dropdown() {\n\t\t$category = $this->input->get(\"category\");\n\t\t$value = $this->input->get(\"value\");\n\t\t$field = $this->input->get(\"field\");\n\t\t$parent_id = $this->input->get(\"parent\");\n\t\techo $this->_get_dropdown($category, $value, $field, $parent_id);\n\t}", "title": "" }, { "docid": "3eeef44ca222513ddf93375db82a02f7", "score": "0.61129266", "text": "function generaSelect2() {\n // Voy imprimiendo el primer select compuesto por los paises\n echo \"<select name='IdAreaDestino' id='IdAreaDestino'>\";\n echo \"<option value='0'>[Seleccione Area Destino...]</option>\";\n echo \"</select>\";\n }", "title": "" }, { "docid": "569d2b9a0a55ef5d51a47e472649ad7b", "score": "0.6110149", "text": "function quick_edit_select_options(){\n\t\t//var_dump ('cats');\n\t\t$customLabels = array(\n\t\t\t'pitch',\n\t\t\t'assigned',\n\t\t\t'in progress',\n\t\t\t'archive',\n\t\t);\n\t\t?>\n <script>\n jQuery(document).ready(function($){\n\t\t\t<?php foreach($customLabels as $_label) { ?>\n\t\t\t\t//$(\"select[name='_status']\").css(\"background-color\", \"yellow\");\n\t\t\t\t$(\"select[name='_status']\").append(\"<option value=\\\"<?php echo $_label ?>\\\" <?php selected('<?php echo $_label ?>', $post->post_status); ?>><?php echo ucwords($_label) ?></option>\");\n\t\t\t<?php } ?>\n });\n </script>\n <?php\n\t}", "title": "" }, { "docid": "33fb55b1d30013047860ca66c749b3a1", "score": "0.6098296", "text": "function SO($name, $list, $cmd) {\n #\n echo \"\\n\";\n echo \"<select id='$name' multiple class='\".$name.\"_dropdown' onChange='$cmd(this.id)' onSelect='$cmd(this.id)'>\\n\";\n # iog: <optgroup> counter\n $iog = 0;\n # loop on the list\n for ($i = 0; $i < count($list); $i++) {\n $element = $list[$i];\n $a = explode(':', $element);\n $value = trim($a[0]);\n if ($value == '=') {\n if ($iog == 1) {\n echo \"</optgroup>\";\n $iog--;\n }\n $optgroup = trim($a[1]);\n echo \"<optgroup label='$optgroup'>\\n\";\n $iog++;\n } else {\n echo \"<option value='$value'>$element</option>\\n\";\n }\n }\n if ($iog == 1) {\n echo \"</optgroup>\";\n $iog--;\n }\n echo \"</select>\"; \n}", "title": "" }, { "docid": "fd2e52b9c9f02247508bc31a2bf925d0", "score": "0.6096426", "text": "public function selectOptions()\r\n {\r\n return [];\r\n }", "title": "" }, { "docid": "5c37bfb8f3df868f925c3e8b3030b64b", "score": "0.6086193", "text": "function insertIntoDropdown2()\n{\n $mysqli = Dbh::connexion();\n $records = $mysqli->query(\"SELECT * FROM virtualmachines ORDER BY vmid\");\n echo \"<select name='machines' onchange=showMachine(this.value)>\";\n echo \"<option value=\\\"\\\">Select a machine</option>\";\n while ($row = $records->fetch_assoc())\n {\n unset($name);\n /* $name = $row['comment']; */\n $id = $row['vmid'];\n echo \"<option value=\\\"$id\\\">\" . $id . \"</option>\";\n }\n \n echo \"</select>\";\n}", "title": "" }, { "docid": "cb4e0f86bba25cad80b006e079797d71", "score": "0.60819054", "text": "public function selectUser(){\n $data= $this->getAllRecord(\"users\");\n if($data!=\"NO_DATA\"){\n foreach ($data as $row){\n if($row['status']==\"Active\"){\n echo \"<option value=\".$row['user_id'].\">(\".$row['user_id'].\") \".$row['first_name'].\" \".$row['last_name'].\" (Reg.Status:\".$row['reg_status'].\")</option>\"; \n }\n }\n }\n }", "title": "" }, { "docid": "8f322ca6f8eb2e0f4a158bd77295c68e", "score": "0.608075", "text": "function get_select_option_template() {\r\n\treturn '<option %3$s value=\"%1$s\">%2$s</option>'.\"\\n\";\r\n}", "title": "" }, { "docid": "9ba93f401a379827907d499887f1daee", "score": "0.60729516", "text": "function tampilkan_wilayah_edit($table,$where,$selected)\n{\n $ci=get_instance();\n $str=\"\";\n $query = $ci->db->get_where($table,$where);\n if ($query->num_rows() > 0) {\n foreach ($query->result() as $row) {\n $str .= '<option value=\"'.$row->id.'\"';\n $str .= (($row->id==$selected) ? \" selected >\":\">\");\n $str .= $row->name.\" </option>\";\n }\n }else {\n $str .= \"Gagal memuat table $table\";\n }\n\nreturn $str;\n\n}", "title": "" }, { "docid": "f4de59a1b14981ab611dddae6cb994b1", "score": "0.6070233", "text": "function generateDropdownObject( $conn, $table, $name, $fieldClass ) {\n\t\t$strClass = \"\";\n\n\t\tif( Isset($fieldClass) ) {\n\t\t\t$strClass = \" class= '\" . $fieldClass . \"'\";\n\t\t}\n\n\t\techo \"<select id='sel_\" . $name . \"' name='\" . $name . \"'\" . $strClass . \">\";\n\t\techo \"<option value=''>--[Select]--</option>\";\n\n\t\t$result = mysqli_query($conn, \"SELECT * FROM \".$table.\" ORDER BY \" . $name . \" ASC\" );\n\n\t\tif ($result) {\n\t\t\twhile( $row = mysqli_fetch_assoc( $result ) ) {\n\t\t\t\techo \"<option value='\" . $row['id'] .\"'>\" . $row[$name] . \"</option>\";\n\t\t\t}\n\t\t}\n\n\t\techo \"</select>\";\n\t}", "title": "" }, { "docid": "db2e9aa8e476f78049524bac47725171", "score": "0.60688776", "text": "function preSelect ();", "title": "" }, { "docid": "44825438ba6bb38afc0938ac84046933", "score": "0.6061954", "text": "function ajax_dropdown_css()\r\n{\r\necho\"\t\r\n<style type='text/css'>\r\n\r\n .select-editable {\r\n position:relative;\r\n background-color:white;\r\n border:solid grey 1px;\r\n width:120px;\r\n height:18px;\r\n }\r\n .select-editable select {\r\n position:absolute;\r\n top:20px;\r\n left:0px;\r\n font-size:14px;\r\n border:none;\r\n width:120px;\r\n margin:0;\r\n }\r\n .select-editable input {\r\n position:absolute;\r\n top:0px;\r\n left:0px;\r\n width:100px;\r\n padding:1px;\r\n font-size:12px;\r\n border:none;\r\n }\r\n .select-editable select:focus, .select-editable input:focus {\r\n outline:none;\r\n }\r\n</style>\t\r\n\";\r\n}", "title": "" }, { "docid": "b865f863c402c4fb095ef9ae6d82e1c3", "score": "0.60599196", "text": "function getCsfDropDown($csfList) {\r\n\r\n echo \"CSF: \\n\";\r\n echo \"<select name=\\\"csf_id\\\" id=\\\"csf_id\\\"\\n\";\r\n echo $this->on_change('csfs') . \">\\n\";\r\n\r\n echo \"<option value='all'\";\r\n if (isset($_GET['csfs'])) {\r\n if ('all' == $_GET['csfs']) {\r\n $this->csf_id = 'all';\r\n $this->csfs = 'all';\r\n echo \" selected \";\r\n }\r\n } else if ('all' == $this->csf_id) {\r\n echo \" selected \";\r\n }\r\n\r\n echo \">\";\r\n echo 'All';\r\n echo \"</option>\\n\";\r\n\r\n foreach ($csfList as $csf) {\r\n echo \"<option value=\\\"\" . $csf['id'] . \"\\\"\";\r\n if (isset($_GET['csfs'])) {\r\n if ($csf['id'] == $_GET['csfs']) {\r\n $this->csf_id = $csf['id'];\r\n $this->csfs = $csf['name'];\r\n echo \" selected \";\r\n }\r\n } else if ($csf['id'] == $this->csfs) {\r\n $this->csf_id = $csf['id'];\r\n echo \" selected \";\r\n }\r\n\r\n echo \">\";\r\n echo $csf['name'];\r\n echo \"</option>\\n\";\r\n }\r\n\r\n echo \"</select>\\n\";\r\n }", "title": "" }, { "docid": "0a162019bce6adcb3508980aeadcbad0", "score": "0.60472673", "text": "public function tampil(){\n echo $this->selectData(); // setelah panah pastikan tidak boleah ada tanda $ atau dolar(variabel)\n }", "title": "" }, { "docid": "6fb84744bc63fb9967046d14774f1010", "score": "0.6045963", "text": "public function callback_select( $args ) {\n $args = $this->check_options_type($args);\n\t\t\t$args = $this->get_arguments( $args ); // escapes all attributes\n\t\t\t$value = array_map( 'esc_attr', array_values( (array) $this->get_option( $args ) ) );\n\t\t\t$multiple = ( preg_match( '/multiple=\"multiple\"/', strtolower( $args['attr'] ) ) ) ? '[]' : '';\n\t\t\t$value = ( '[]' === $multiple ) ? $value : $value[0];\n\t\t\t$html = sprintf( '<select id=\"%1$s_%2$s\" name=\"%1$s[%2$s]%4$s\"%3$s>', $args['section'], $args['id'], $args['attr'], $multiple );\n\t\t\tforeach ( (array) $args['options'] as $opt => $label ) {\n\t\t\t\tif ( '[]' === $multiple ) {\n\t\t\t\t\t$selected = ( in_array( $opt , $value ) ) ? ' selected=\"selected\" ' : '';\n\t\t\t\t} else {\n\t\t\t\t\t$selected = selected( $value, $opt, false );\n\t\t\t\t}\n\t\t\t\t$html .= sprintf( '<option value=\"%s\"%s>%s</option>', $opt, $selected, $label );\n\t\t\t}\n\t\t\t$html .= sprintf( '</select>' );\n\t\t\techo $args['before'] . $html . $args['after'] . $this->description( $args['desc'] );\n\t\t}", "title": "" }, { "docid": "2e313201c20b0fc12ae79a5c7fb00c40", "score": "0.60428333", "text": "public function pilih_kabupaten() {\n $data['listKabupaten'] = $this->pasien_model->select_kabupaten($this->uri->segment(4));\n $this->load->view('v_drop_down_kabupaten', $data);\n }", "title": "" }, { "docid": "7d5775866512acbac188ecac97985181", "score": "0.60384476", "text": "public function vistaTecnicoSelectController(){\n\t\t\t$respuesta = Datos::vistaTecnicoModel(\"usuario\");\n\t\t\t$a=\"\";\n\n\t\t\n\t\t\tforeach($respuesta as $row => $item){\n\t\t\t\t$id=$item[\"id_usuario\"];\n\t\t\t\t$e=$item[\"nombre\"];\n\n\t\t\t\n\t\t\techo'<option value='.$id.'>'.$e.'</option>';\n\t\t\n\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "fd901db99cd71d7f1faa7349bb904179", "score": "0.60362387", "text": "public static function dropDownListSearch()\n {\n return ['#' => '(nicht gesetzt)'] + \\yii\\helpers\\ArrayHelper::map(self::find()->dropdownScope()->orderBy('modified_ts desc')->all(),'id','name');\n }", "title": "" }, { "docid": "1d7ff46b0cf01587a8e56719f2806328", "score": "0.6036197", "text": "function shipox_instance_render()\r\n {\r\n $options = get_option('wing_service_config');\r\n ?>\r\n <select name='wing_service_config[instance]' class=\"wing-input-class\" title=\"Shipox Instance\">\r\n <option value='1' <?php selected($options['instance'], 1); ?>>Instance 1</option>\r\n <option value='2' <?php selected($options['instance'], 2); ?>>Instance 2</option>\r\n </select>\r\n <?php\r\n\r\n }", "title": "" }, { "docid": "871de1b21a2883cfff2bba77b64814c8", "score": "0.60336685", "text": "function data2Select ($value,$option,$name=\"select\",$selected_value=\"\",$multiple=0, $js=\"\",$inicial=\"\") {\n\t\t$esmultiple = ($multiple==0)?\"\":\"multiple size='\".$multiple.\"'\";\n\t\t$html_code = \"\\n<!-- Dinamic select - Generated by phpframework - www.cuatrovientos.org -->\\n\";\n\t\t\n\t\t$html_code = \"\\n<select id='\". $name .\"' name='\". $name .\"' \". $esmultiple . \" \" .$js. \"><option></option>\\n\";\n\t\t$selected = \"\";\n\t\t//Poner datos\n\t\t$this->reset();\n//\t\t\techo \" Total: \" . $this->length() .\"<br>\\n\";\n//\t\t\techo \" Valor: \". count($this->matrix). \"<br>\\n\";\n\t\t\n\t\t$html_code .= ($inicial != \"\")?\"\\n\\t<option value='-1'>\".$inicial.\"</option>\\n\":\"\";\n\t\t\n\t\twhile ($this->hasMoreElements()) {\n\t\t\t$selected = ($this->getValue($value) == $selected_value)?'selected':\"\";\n//\t\t\techo \" <!-- \".$this->getValue($value).\" va [\".$selected_value.\"] $value $option-->\\n\";\n\t\t\t$html_code .= \"\\t<option value='\".$this->getValue($value).\"' \".$selected.\">\".$this->getValue($option).\"</option>\\n\";\n\t\t\t$this->next();\n\t\t}\n\t\t\t\t\n\t\t$html_code .= \"\\n</select>\\n<!-- Dinamic select - Table end - Generated by phpframework - www.cuatrovientos.org -->\\n\";\n\t\t// Finalmente, retornamos el codigo HTML generado\n\t\treturn $html_code;\n\t}", "title": "" }, { "docid": "1e3cc7bdf846bea55a9dab45df8c1217", "score": "0.6033502", "text": "function get_option_list($table,$col_id,$col_name,$sel)\n{\n $sql=\"select *from $table\";\n $option_list=\"<option value='0'>plz select</option>\";\n $rs=mysql_query($sql)or die(mysql_error());\n while($data=mysql_fetch_assoc($rs))\n {\n if($sel==$data[$col_id])\n $option_list.=\"<option value='$data[$col_id]' selected>$data[$col_name]</option>\";\n else\n $option_list.=\"<option value='$data[$col_id]'>$data[$col_name]</option>\";\n \n }\n return $option_list;\n}", "title": "" }, { "docid": "970bd25ff01cfe46237bee848de86b7a", "score": "0.6029727", "text": "function menu($array, $name, $value)\n {\n echo '<select name ='.$name.'>';\n for($i=0; $i<count($array); $i++)\n {\n\n echo '<option value=\"'.$array[$i].'\"';\n if($array[$i] == $value) echo 'selected=\"selected\"';\n echo '>'.$array[$i].'</option>';\n echo '<br>';\n }\n echo '</select>';\n }", "title": "" }, { "docid": "123a8cf870cb11c14ff65b2a1cf0ebe4", "score": "0.6023978", "text": "function dropdown_attendance_mark($name, $selected_id, $submit_on_change=false, $disabled=false){\n\tglobal $hrm_attendance_mark;\n\t$options = array(\n\t 'select_submit'=> $submit_on_change,\n\t\t'disabled' => $disabled\n\t);\n\t$leaveTypes = array();\n\t$sql = \"SELECT char_code,description FROM \".TB_PREF.\"kv_empl_leave_types order by description ASC\" ;\n\t$res = db_query($sql , \"Can't get result\");\n\t if(db_num_rows($res)){\n\t\twhile($cont = db_fetch($res))\n\t\t{\n\t\t\t$leaveTypes[$cont[0]] = $cont[1];\n\t\t}\n\t}\n\n\treturn array_selector($name, $selected_id,$leaveTypes, $options);\n}", "title": "" }, { "docid": "c59a76871abba727012245f0eb3fd921", "score": "0.60234356", "text": "public function empty_unit_dropdown_select()\n {\n $empty_select = '<select name=\"iUnitID\" class=\"chosen-select\" data-placeholder=\"Select Unit\" style=\"width: 300px; display: none;\">';\n $empty_select_closed = '</select>';\n //GET THE ID OF THE LISTING USING URI\n $listingID = $this->uri->segment(5);\n \n //LOAD GCRUD AND GET THE STATE\n $crud = new grocery_CRUD();\n $state = $crud->getState();\n \n //CHECK FOR A URI VALUE AND MAKE SURE ITS ON THE EDIT STATE\n if(isset($listingID) && $state == \"edit\") {\n //GET THE STORED STATE ID\n $this->db->select('companyID, divisionID, deptID, iUnitID, iGroupApprovalId')\n ->from('tbl_apv_group_approval')\n ->where('iGroupApprovalId', $listingID);\n $db = $this->db->get();\n $row = $db->row(0);\n $divisionID = $row->divisionID;\n $deptID = $row->deptID;\n $unitID = $row->iUnitID;\n \n //GET THE CITIES PER STATE ID\n $this->db->select('*')\n ->from('tbl_unit')\n ->where('deptID', $deptID);\n $db = $this->db->get();\n \n //APPEND THE OPTION FIELDS WITH VALUES FROM THE STATES PER THE COUNTRY ID\n foreach($db->result() as $row):\n if($row->unitID == $unitID) {\n $empty_select .= '<option value=\"'.$row->unitID.'\" selected=\"selected\">'.$row->NamaUnit.'</option>';\n } else {\n $empty_select .= '<option value=\"'.$row->unitID.'\">'.$row->NamaUnit.'</option>';\n }\n endforeach;\n \n //RETURN SELECTION COMBO\n return $empty_select.$empty_select_closed;\n } else {\n //RETURN SELECTION COMBO\n return $empty_select.$empty_select_closed; \n }\n }", "title": "" }, { "docid": "f421282b79f47d1550f68a8bd48cd36d", "score": "0.6015695", "text": "public function ctrTraerListaTicketsSelectOption(){\r\n\t\t$tabla = \"tickets\";\r\n\t\t$respuesta = ModeloTicket::mdlMostrarListaTicketsActivos($tabla);\r\n\t\t\tforeach ($respuesta as $row => $item){\r\n\t\t\t\techo \r\n\t\t\t\t'\t<option value=\"'.$item[\"ticketTipo\"].'\">'.$item[\"ticketTipo\"].'</option>\t\t\r\n\t\t '; \r\n\t\t}\r\n\t}", "title": "" }, { "docid": "50b875b971b3fe8ca0b0526d28cc1ca5", "score": "0.6013891", "text": "public function vistaAdapBicicletaSelectController(){\n\t\t\t$respuesta = Datos::vistaAdapBicicletaModel(\"adaptacion_bicicleta\");\n\t\t\t$a=\"\";\n\n\t\t\n\t\t\tforeach($respuesta as $row => $item){\n\t\t\t\t$id=$item[\"id_adaptacionBici\"];\n\t\t\t\t$e=$item[\"codigo\"];\n\n\t\t\t\n\t\t\techo'<option value='.$id.'>'.$e.'</option>';\n\t\t\n\n\t\t\t}\n\t\t}", "title": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "20e0df2381c6c8b830d7ab44389b0ca5", "score": "0.0", "text": "public function delete(Request $request)\n { $this->validate($request, [\n 'userid'=>'required'\n ]);\n $ass=Users::findOrFail($request->input('userid'));\n if($ass->delete()){\n \n return redirect('welcome');\n }\n }", "title": "" } ]
[ { "docid": "37dd170c1eaea50870a9bd20839ad070", "score": "0.7137241", "text": "public function remove(ResourceInterface $resource): void\n {\n }", "title": "" }, { "docid": "4b8255c05a264d5d61f546d7bcd507ce", "score": "0.6672584", "text": "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "title": "" }, { "docid": "d9f10892d48fdfd7debb2a97681f0912", "score": "0.6659381", "text": "public function destroy(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "9128270ecb10fe081d7b27ed99999426", "score": "0.6632799", "text": "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "title": "" }, { "docid": "ca4c6cd0f72c6610d38f362f323ea885", "score": "0.6626075", "text": "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "title": "" }, { "docid": "e3c740412fbdcfbb4c5f134b55955877", "score": "0.66060185", "text": "public function deleteStorage($id);", "title": "" }, { "docid": "22e99170ed44ab8bba05c4fea1103beb", "score": "0.65424126", "text": "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "title": "" }, { "docid": "86a97ef20b44d79f474926937530d353", "score": "0.63162404", "text": "public function remove($resourceId)\n {\n return $this->rResourceMixin->remove($resourceId);\n }", "title": "" }, { "docid": "2961fd7e3d8100bdb9570443ca486260", "score": "0.624805", "text": "public function destroy()\n {\n if ($this->resource) {\n sem_remove($this->resource);\n @unlink($this->filePath);\n }\n }", "title": "" }, { "docid": "0145806453a1e9f5ee0809b4db0b14d3", "score": "0.61310524", "text": "public function markAsDeleted(ResolvedResource $resource);", "title": "" }, { "docid": "6c6fe1826f8ec4ac06c5e0ef405b8b7a", "score": "0.6100814", "text": "function deleteResource($id) {\n\t\t\t$id = sqlescape($id);\n\t\t\t$r = $this->getResource($id);\n\t\t\tif ($r) {\n\t\t\t\tsqlquery(\"DELETE FROM bigtree_resources WHERE file = '\".sqlescape($r[\"file\"]).\"'\");\n\t\t\t\t$storage = new BigTreeStorage;\n\t\t\t\t$storage->delete($r[\"file\"]);\n\t\t\t\tforeach ($r[\"thumbs\"] as $thumb) {\n\t\t\t\t\t$storage->delete($thumb);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "60da5cdaab3c2b4a3de543383ff7326a", "score": "0.60893893", "text": "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "title": "" }, { "docid": "ccaddaf8c48305cf51ff4f4e87f7f513", "score": "0.6054415", "text": "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "title": "" }, { "docid": "d7a9a477b41e565ba02b2968aa02b2d8", "score": "0.6054318", "text": "public function remove ($resource = false, $key = false) {\n\t\t$resource = ($resource) ? $resource : $this->resource;\n\t\t$key = ($key) ? $key : $this->key;\n\n\t\treturn DB::execute ('delete from `#prefix#lock` where resource = ? and resource_id = ?', $resource, $key);\n\t}", "title": "" }, { "docid": "5bb36f163668a235aa80821b0746c2bc", "score": "0.60064924", "text": "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "title": "" }, { "docid": "0edce8e39abb5191d53e16b1ad17f69f", "score": "0.5964138", "text": "public function destroy($id)\n {\n $suplier = Supplier::where('id',$id)->first();\n $photo = $suplier->photo;\n if($photo)\n {\n unlink($photo);\n Supplier::where('id',$id)->delete();\n\n }\n }", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.59337646", "text": "public function remove($path);", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.59337646", "text": "public function remove($path);", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.59337646", "text": "public function remove($path);", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.59337646", "text": "public function remove($path);", "title": "" }, { "docid": "b549ee1a3239f6720bb4eae802ea1753", "score": "0.5930772", "text": "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "title": "" }, { "docid": "02436278b72d788803fbd1efa4067eef", "score": "0.59199584", "text": "public function delete(): void\n {\n unlink($this->path);\n }", "title": "" }, { "docid": "78f3fcb6a4df88ba8ea45797087a7e8d", "score": "0.59121597", "text": "public function remove($entity);", "title": "" }, { "docid": "5336825b23ae57c225d3534fd55b1861", "score": "0.5897263", "text": "public function remove() {}", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "83e24f29d0e8d9db1e7e13447c37580c", "score": "0.58936465", "text": "public function deleteResource(Resource $resource)\n {\n //unset all fields (for now)\n foreach (get_class_methods($resource) as $method) {\n if (0 === strpos($method, 'set')) {\n $resource->$method(null);\n }\n }\n\n //set delete date and status\n $resource->setDateDeleted(new \\DateTime());\n $resource->setStatus(Resource::STATUS_DELETED);\n\n return $resource;\n }", "title": "" }, { "docid": "140b6c44eef77c79cbd9edc171fe8e75", "score": "0.5880124", "text": "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "title": "" }, { "docid": "682325cf5de8624768bd5dbfad42738d", "score": "0.5875408", "text": "public function action_remove()\n\t{\n\t\t$this->access('admin.'.strtolower($this->_admin->resource).'.remove');\n\t\t$id = $this->request->param('id');\n\n\t\tif(!$this->request->is_ajax())\n\t\t{\n\t\t\tthrow new Kohana_HTTP_Exception_404;\n\t\t}\n\n\t\t// Needs to be a GET request\n\t\tif($this->request->method() != Request::GET)\n\t\t{\n\t\t\tthrow new Kohana_HTTP_Exception_403('No data was requested to be removed.');\n\t\t}\n\n\t\t$record = $this->_admin->model->where($this->_admin->primary_key, '=', $id)->find();\n\n\t\tif($record->loaded())\n\t\t{\n\t\t\tRD::set(RD::SUCCESS, ':resource #:id has been removed.', array(\n\t\t\t\t':resource' => Inflector::singular($this->_resource),\n\t\t\t\t':id' => $id\n\t\t\t));\n\t\t\t$record->delete();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tRD::set(RD::WARNING, ':resource can\\'t be found.', array(\n\t\t\t\t':resource' => Inflector::singular($this->_resource),\n\t\t\t\t':id' => $id\n\t\t\t));\n\t\t}\n\t}", "title": "" }, { "docid": "7760e18034429a581e9c1073281ca346", "score": "0.5874566", "text": "public function delete ()\n {\n $this->unlock();\n sem_remove( $this->getResource() );\n $this->resource = NULL;\n return $this;\n }", "title": "" }, { "docid": "16ede02ea64f8d696ab94948fa4d095a", "score": "0.5870248", "text": "public function destroyFile($resource, File $file)\n {\n $file->delete();\n return $file->{$resource};\n }", "title": "" }, { "docid": "72dc5bfa6ca53ddd2451fc0e14e6fcfe", "score": "0.58690923", "text": "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "title": "" }, { "docid": "b0b6f080ff9e00a37e1e141de8af472d", "score": "0.5863659", "text": "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "title": "" }, { "docid": "e02a61dc8d778d6f70e60505035c99d1", "score": "0.58621585", "text": "public function onDelete(DeleteResourceEvent $event)\n {\n $em = $this->container->get('doctrine.orm.entity_manager');\n $em->remove($event->getResource());\n $event->stopPropagation();\n }", "title": "" }, { "docid": "ee70945e791659b8782f1f156e69304e", "score": "0.5847799", "text": "public function delete()\n {\n return $this->getStorage()->delete($this->path().DIRECTORY_SEPARATOR.$this->name());\n }", "title": "" }, { "docid": "fbd716173957d995532e7a5839e6a5dc", "score": "0.58406353", "text": "public function rm($item);", "title": "" }, { "docid": "df76e304787c6be76144a24a799b6900", "score": "0.5835866", "text": "public function removeAction()\n {\n Pi::service('log')->mute();\n $id = $this->params('id', 0);\n $fakeId = $this->params('fake_id', 0);\n $affectedRows = 0;\n $module = $this->getModule();\n\n if ($id) {\n $row = $this->getModel('media')->find($id);\n\n if ($row && $row->url) {\n // Delete media\n unlink(Pi::path($row->url));\n\n // Update db\n $row->url = '';\n $row->type = '';\n $row->size = 0;\n $row->meta = '';\n $affectedRows = $row->save();\n }\n } elseif ($fakeId) {\n $session = Media::getUploadSession($module, 'media');\n\n if (isset($session->$fakeId)) {\n $uploadInfo = isset($session->$id) ? $session->$id : $session->$fakeId;\n\n unlink(Pi::path($uploadInfo['tmp_name']));\n\n unset($session->$id);\n unset($session->$fakeId);\n }\n $affectedRows = 1;\n }\n\n echo json_encode([\n 'status' => $affectedRows ? self::AJAX_RESULT_TRUE : self::AJAX_RESULT_FALSE,\n 'message' => 'ok',\n ]);\n exit;\n }", "title": "" }, { "docid": "e47bb1b7bccbeb8651920ef7986252ae", "score": "0.5819071", "text": "protected function destroy(User $resource)\n {\n }", "title": "" }, { "docid": "c6821270bce7c29555a3d0ca63e8ff36", "score": "0.5809161", "text": "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "title": "" }, { "docid": "7e3f12eaa72d671def04991239bd33f4", "score": "0.58077335", "text": "public function destroy(Resource $resource)\n\t{\n\t\t$resource->delete();\n\n return ['success' => true, 'message' => 'Resource deleted'];\n\t}", "title": "" }, { "docid": "3e2addfb4f78b979aaadcf2a7b28b1c4", "score": "0.5783091", "text": "public function destroy(Request $request, $id)\n {\n\n $file= Documents::whereId($id)->firstOrFail();\n\n //unlink(public_path('storage',$file->id));\n\n $file->delete();\n return back();\n\n\n }", "title": "" }, { "docid": "5bc196208c1decbb644cd5cece6edd3f", "score": "0.5773983", "text": "public function unlink($uri) {\n $this->uri = $uri; // set instance URI\n return unlink($this->get_local_path());\n }", "title": "" }, { "docid": "f97458f1a249bea8589e37ce4a19458a", "score": "0.5770823", "text": "public function destroy($id)\n {\n// $info = $request->img;\n// dd($info);\n// dd($id);\n $info = Zhou::where('id',$id)->select('file')->first()->toArray();\n// dd('/storage/'.$info['file']);\n unlink('./storage/'.$info['file']);\n $data = Zhou::where('id',$id)->delete();\n\n\n// dd();\n if($data){\n return json_encode(['code'=>200]);\n }\n }", "title": "" }, { "docid": "27c91ef0cac551b90c12d8956a711079", "score": "0.5768296", "text": "public function deleteFromStore()\n\t{\n\t\t$this->isInStore(true);\n\n\t\t$store = GAMA_Store::singleton();\n\n\t\t// ===============\n\t\tapp_lock(LOCK_EX);\n\t\t// ===============\n\t\ttry\n\t\t{\n\t\t\t// make sure there are no instances of this class\n\t\t\t$count = $store->sqlFetchValue(\n\t\t\t\t'select count(*) from RESOURCE where type=?', $this->id);\n\t\t\t\n\t\t\tif($count > 0)\n\t\t\t{\n\t\t\t\tthrow new Exception('Delete related instances first');\n\t\t\t}\n\n\t\t\t// make sure there are no properties using this class\n\t\t\t$count = $store->sqlFetchValue('\n\t\t\t\tselect count(*) from PROPERTY\n\t\t\t\twhere dom=? or rng=?\n\t\t\t\t', $this->id, $this->id );\n\t\t\t\n\t\t\tif($count > 0)\n\t\t\t{\n\t\t\t\tthrow new Exception('Delete related properties first');\n\t\t\t}\n\t\t\t\n\t\t\t// now we can delete the class\n\t\t\t$store->sql('delete from RESOURCE where id=?', $this->id);\n\n\t\t\t// we should also update our cache\n\t\t\t$this->reloadFromStore();\n\t\t\t\n\t\t} catch(Exception $e)\n\t\t{\n\t\t\tapp_unlock();\n\t\t\tthrow $e;\n\t\t}\n\t\t\t\n\t\t// ==========\n\t\tapp_unlock();\n\t\t// ==========\n\t\t\n\t\tdebug(\"Resource deleted: $this->uri\");\n\t}", "title": "" }, { "docid": "80ccefee911dbbebc88e3854b170acf7", "score": "0.5765826", "text": "public function removeRecord();", "title": "" }, { "docid": "bbd4fbeb169cce49dbdee4fcf4da3308", "score": "0.576368", "text": "public function destroy(Storage $storage)\n {\n //\n }", "title": "" }, { "docid": "81bac0e5ac8e3c967ba616afac4bfb1c", "score": "0.5760811", "text": "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "title": "" }, { "docid": "385e69d603b938952baeb3edc255a4ea", "score": "0.5753559", "text": "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "title": "" }, { "docid": "ddf3faf7670af66339c535dd8de7c088", "score": "0.57453483", "text": "public function destroy(Request $request)\n {\n Storage::delete($request->path);\n return redirect()->route('storage.index');\n }", "title": "" }, { "docid": "9a5dfeb522e8b8883397ebfbc0e9d95b", "score": "0.5726379", "text": "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "title": "" }, { "docid": "883f70738d6a177cbdf3fcaec9e9c05f", "score": "0.57144034", "text": "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "title": "" }, { "docid": "38e5a4eab7d9a854a4348b6f78b1554b", "score": "0.571345", "text": "public function destroy($resource, $id)\n {\n $this->repository->delete($id);\n return response(null, 204);\n }", "title": "" }, { "docid": "20950b5737f7cbea0d1cc5dc11a68eb1", "score": "0.57047796", "text": "public function delete() {\n $filePath = $this->getPath();\n if (is_file($filePath) && is_writable($filePath)) {\n unlink($filePath);\n }\n parent::delete();\n }", "title": "" }, { "docid": "e41dcd69306378f20a25f414352d6e6b", "score": "0.5696585", "text": "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "title": "" }, { "docid": "405f641d9f45ae5d1d63de363880f02b", "score": "0.5691377", "text": "public function destroy($id)\n\n {\n\n $product = Product::findOrFail($id);\n\n\n\n// unlink(public_path(). $icon->file);\n\n\n\n// $photo->delete();\n//\n// $icon->delete();\n Photo::where('product_id',$id)->delete();\n $product->delete();\n\n\n\n\n\n return redirect()->route('admin.products.index');\n\n }", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "88290b89858a6178671f929ae0a7ccba", "score": "0.5677111", "text": "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "title": "" }, { "docid": "f3ecd01b9c9cfcc917a40e1827e8d6a1", "score": "0.56522495", "text": "public function del() {\n sem_acquire($this->__mutex); //block until released\n @shm_remove_var($this->__shm, $this->__key);\n sem_release($this->__mutex); //release mutex\n }", "title": "" }, { "docid": "85a8d03b0c01970f57fe2403d38a7103", "score": "0.56494105", "text": "public function delete(): void\n {\n\t\tif(@unlink($this->getPath())) {\n\t\t\t$this->deleteCacheEntries();\n\t\t\tself::unsetInstance($this->getPath());\n\t\t}\n\t\telse {\n\t\t\tthrow new FilesystemFileException(\"Delete of file '{$this->getPath()}' failed.\", FilesystemFileException::FILE_DELETE_FAILED);\n\t\t}\n\t}", "title": "" }, { "docid": "8b94ff007c35fa2c7485cebe32b8de85", "score": "0.5648262", "text": "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "title": "" }, { "docid": "2752e2223b3497665cc8082d9af5a967", "score": "0.5648085", "text": "public function delete($path, $data = null);", "title": "" }, { "docid": "8cf7657c92ed341a5a4e1ac7b314cf43", "score": "0.5648012", "text": "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "title": "" }, { "docid": "0cb73bdc807934bf8edf7e5eccafdd2b", "score": "0.56407464", "text": "public function delete() {\n $this->storageController->connect();\n $query = sprintf('DELETE FROM items WHERE name=\"%s\"', $this->name);\n $this->storageController->query($query);\n $this->storageController->close();\n\n $this->is_new = TRUE;\n }", "title": "" }, { "docid": "f51aa1f231aecb530fa194d38c843872", "score": "0.5629985", "text": "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "title": "" }, { "docid": "83377e4a1bcc3dc2e77329262b4d9a6d", "score": "0.5628369", "text": "public function delete()\n {\n fclose($this->inputStream);\n }", "title": "" }, { "docid": "9db585fcb135fe60165f9be69e476584", "score": "0.5622851", "text": "private function _remove($id)\n\t{\n\t\t$store = $this->model_store->find($id);\n\n\t\tif (!empty($store->IMAGE)) {\n\t\t\t$path = FCPATH . '/uploads/store/' . $store->IMAGE;\n\n\t\t\tif (is_file($path)) {\n\t\t\t\t$delete_file = unlink($path);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\treturn $this->model_store->remove($id);\n\t}", "title": "" }, { "docid": "342b5fc16c6f42ac6826e9c554c81f4d", "score": "0.55992156", "text": "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "title": "" }, { "docid": "97e50e61326801fa4efc3704e9dd77c1", "score": "0.5598557", "text": "public function revoke($resource, $permission = null);", "title": "" }, { "docid": "eb981a32d53ea8153aa2cec46a4f509f", "score": "0.5581215", "text": "public function destroy($id)\n {\n// if(Auth::user()->role == User::ROLE_SUPERADMIN) {\n $product = ProductItem::findOrFail($id);\n if($product->image_name != '') {\n $image_path = app_path(\"../../files/product/\" . $product->image_name);\n unlink($image_path);\n }\n\n ProductItem::destroy($id);\n\n Alert::success('Your data already deleted !', 'Success !');\n\n return redirect('admin/product');\n// }\n }", "title": "" }, { "docid": "97914eb78d7cf648246f9bcd6ac69124", "score": "0.5573565", "text": "public function destroy($id)\n {\n /*\n\n = R::load( '', $id );\n R::trash( );*/\n }", "title": "" }, { "docid": "9063023fcee6a479bc40053db38d89e0", "score": "0.557017", "text": "public function destroy($id)\n {\n //\n\n\n $post = Post::withTrashed()->where('id',$id)->firstOrFail();\n\n if ($post->trashed()){\n /////$path = 'test.txt';\n /////Storage::disk('s3')->put($path, 'hello');\n ///// Storage::disk('s3')->delete($path);\n //return $post->image;\n\n if(Storage::disk('s3')->exists($post->filename)) {\n Storage::disk('s3')->delete($post->filename);\n } else {\n $post->deleteImage();\n $post->forceDelete();\n\n }\n\n\n return redirect(route('trashed-posts.index'))->with('status', 'Post deleted successfully');\n }\n else {\n $post->delete();\n return redirect(route('posts.index'))->with('status', 'Post deleted successfully');\n }\n\n // return redirect(route('posts.index'))->with('status', 'Post deleted successfully');\n\n }", "title": "" }, { "docid": "ea73af051ca124bba926c5047e1f799b", "score": "0.5566796", "text": "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "title": "" }, { "docid": "a85f6f9231c5a5b648efc0e34b009554", "score": "0.55642897", "text": "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "title": "" }, { "docid": "9ef8b8850e1424f439f75a07b411de21", "score": "0.55641", "text": "public function remove($filePath){\n return Storage::delete($filePath);\n }", "title": "" }, { "docid": "7fbd1a887ad4dca00687bb4abce1ae49", "score": "0.5556536", "text": "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "title": "" }, { "docid": "b45d20ef7b675860a322ba4b6d1dbd5a", "score": "0.55559915", "text": "public function destroy($id)\n {\n $file_data = Media::find($id)->first();\n if(file_exists($file_data->path)){\n @unlink(public_path(), $file_data->path);\n }\n Media::where('id', $id)->delete();\n return redirect()->back()->with('message', 'Media deleted successfully!');\n }", "title": "" }, { "docid": "e98c4608a62ab3f2b92573a4bed86a6f", "score": "0.5551504", "text": "abstract public function Resource_Link_delete($resource_link);", "title": "" }, { "docid": "35753424e21be7d9c22ced54d549e939", "score": "0.5540951", "text": "public function remove()\n\t{\n\t\tif(self::exists($this->name))\n\t\t{\n\t\t\t$this->value = false;\n\t\t\t$this->encodedValue = null;\n\t\t\t$this->sendHeader();\n\n\t\t\t$cookiePath = $this->getMetaFilePath();\n\n\t\t\tif(File::exists($cookiePath))\n\t\t\t\tFile::remove($cookiePath);\n\t\t}\n\t}", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "39fd8b9a4b5864c48e07d66807e5775f", "score": "0.5539789", "text": "public function destroy($id)\n {\n $image = Slider::findOrFail($id);\n //dd($image);\n// $image_path = app_path(\"images/{$image}\");\n// //dd($image_path);\n// if (File::exists($image_path)) {\n// File::delete($image_path);\n// //File::delete(\"images/{$image}\");\n// unlink($image_path);\n// }\n// File::delete(public_path(\"images/{$image->path}\"));\n $image->delete();\n return redirect('admin-group-1/slider');\n }", "title": "" }, { "docid": "0005f2e6964d036d888b5343fa80a1b1", "score": "0.55371785", "text": "public function deleted(Storage $storage)\n {\n //\n }", "title": "" }, { "docid": "d434e2cdc40338f523a40bcd0c8522a0", "score": "0.55343556", "text": "public function delete() {\n $this->client->deleteData($this->uri);\n }", "title": "" }, { "docid": "bd7d7fbce770fd39cf8081927084d5c3", "score": "0.55334973", "text": "public function destroy($id)\n {\n $brand = Brand::findOrFail($id);\n\n if (Storage::disk('public')->exists('Brand/'.$brand->brand_image)) {\n Storage::disk('public')->delete('Brand/'.$brand->brand_image);\n }\n $brand->delete();\n }", "title": "" }, { "docid": "b36cf6614522a902b216519e3592c3ba", "score": "0.55275744", "text": "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "74eb9816661a1e25377a2f46c86cba84", "score": "0.0", "text": "public function show($id,$indicador=null)\n {\n\n $estimates=DB::select(\n DB::raw(\"SELECT\n e.id,\n c.id as company_id,\n c.nombre AS nombrec,\n cp.id AS prove_id,\n cp.nombre AS nombrep,\n estado,\n imagen,\n num_habitacion,\n tipo_cama,\n tipo_hab,\n tipo_estrellas,\n fecha_soli,\n ganancia,\n e.categoria,\n resumen,\n metodo_segui,\n info_segui,\n c.telefono,\n c.celular,\n c.correo,\n proximo_seguimiento,\n fbo,\n cantidad_fuel,\n localidad,\n a.id as avion_id,\n a.tipo,\n matricula,\n total,\n subtotal,\n descuento,\n total_descuento,\n e.categoria\n FROM estimates e\n INNER JOIN companys c ON c.id=e.company_id\n INNER JOIN companys cp ON cp.id=e.prove_id\n INNER JOIN aviones a ON a.company_id=c.id\n WHERE e.id=$id\"));\n $idEstimates=$estimates[0]->id;\n //para saber si ya tiene una factura\n\n $invoice=Invoice::where('estimate_id' ,$idEstimates)->where('estado','<>','4')->count();\n if($invoice>0){\n $id_in = Invoice::select('id')->where('estimate_id' ,$idEstimates)->where('estado','<>','4')->get();\n }else{\n $id_in=null;\n }\n //para saber si ya tiene el fuel release\n $fuelrelease=FuelRelease::where('estimate_id' ,$idEstimates)->count();\n if($fuelrelease>0){\n $id_fuel = FuelRelease::select('id')->where('estimate_id' ,$idEstimates)->get();\n }else{\n $id_fuel=null;\n }\n //saber si solicito un servicio de gasolina\n $fuel =DB::table('dates_estimates')->where('estimate_id', $idEstimates)->join('servicios','servicios.id', '=','servicio_id')->where('nombre', 'LIKE', '%Fuel%')->count();\n $date=DB::select(\n DB::raw(\"SELECT\n s.id AS servicioid,\n s.nombre AS nbservicio,\n s.descripcion,\n cantidad,\n de.precio,\n subtotal,\n recarga,\n total\n FROM dates_estimates de\n INNER JOIN servicios s ON s.id=de.servicio_id\n WHERE estimate_id=$idEstimates \"));\n // dd(DB::getQueryLog());\n\n return view ('estimates.show',compact('date','estimates','invoice','fuel','fuelrelease','id_in','id_fuel'));\n }", "title": "" } ]
[ { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.81890994", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "e273034885bffd94845673642335bb27", "score": "0.73707086", "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.6922487", "text": "public function show(Resource $resource)\n {\n return view('resource.show', ['resource' => $resource]);\n }", "title": "" }, { "docid": "69e7043fb313b27715d4fd190fa0a47b", "score": "0.6674369", "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.66261864", "text": "public function showResource($id) {\n $resource = Resource::find($id);\n return view('update_resource', ['resource' => $resource]);\n }", "title": "" }, { "docid": "e72d7ee458278f6123e38cb93b88d1de", "score": "0.6564684", "text": "public function preview(resource $resource)\n {\n //\n }", "title": "" }, { "docid": "b6006c75ae679ecef360bdf7fe8a47c4", "score": "0.6454079", "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.6350866", "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.6227743", "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.6216314", "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.6215268", "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.61007047", "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.6031364", "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.60213107", "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.6019137", "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.6005619", "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.59978086", "text": "function display()\n\t{\n\t\techo $this->get();\n\t\t\n\t}", "title": "" }, { "docid": "ddc28327288006b3d29c6bdc8761ca44", "score": "0.5989136", "text": "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "title": "" }, { "docid": "e943948b6a11bc29b2f266d55c7ee5a5", "score": "0.5945892", "text": "public function show() {\n\t\t$this->getImageStrategy()->show($this->getImage());\n\t}", "title": "" }, { "docid": "8172ae2b3e517fb12d98874eaa22fd0b", "score": "0.59241897", "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.5908002", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "00d244ef3a763ccdbae14ec11bf19cd4", "score": "0.5900401", "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": "5aa279313a3a2ed339dbfab0f2c848e3", "score": "0.5898797", "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": "488b2f71d703803d51ef92125cfccb32", "score": "0.58683604", "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.5864593", "text": "public function showAction()\r\n\t{\r\n\t\t$this->loadLayout()->renderLayout();\r\n\t}", "title": "" }, { "docid": "96adc772bb49436d8b214bbd7d2c63f8", "score": "0.58295906", "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.58056176", "text": "public function show()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "b3a855f1dce17dcc8d02e34d8071388d", "score": "0.5783755", "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": "6d96f17caa0523cc80db2c2bb885b9c1", "score": "0.57821774", "text": "private function _resource($data, $name)\n {\n $data = get_resource_type($data);\n $this->_renderNode('Resource', $name, $data);\n }", "title": "" }, { "docid": "765678d75db620af12e826ffe74dec55", "score": "0.57729185", "text": "public function display()\n {\n parent::display();\n }", "title": "" }, { "docid": "24c63cc758a7c6c6fe61053136124e16", "score": "0.57629937", "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.57604754", "text": "public function display()\n {\n echo $this->render();\n }", "title": "" }, { "docid": "a3e57330d7cd59896b945f16d0e12a89", "score": "0.57604754", "text": "public function display()\n {\n echo $this->render();\n }", "title": "" }, { "docid": "c856c8e6e792c30d33f8b653e21e8dd3", "score": "0.57546395", "text": "public function display( $object = null ) {\n\t\techo $this->render( $object );\n\t}", "title": "" }, { "docid": "66e03ced3a1ae0b6545066542c4db145", "score": "0.57431996", "text": "public function show($id)\n {\n // NOT CURRENTLY IN USE\n }", "title": "" }, { "docid": "78932871c36f6a29063b014a4f04161e", "score": "0.57389235", "text": "public function show(Supplier $supplier)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "b5e7179ea7c94add1c1af50e9f9b7fdd", "score": "0.57238233", "text": "public function show($id)\n\t{\n\t\n\t}", "title": "" }, { "docid": "b5e7179ea7c94add1c1af50e9f9b7fdd", "score": "0.57238233", "text": "public function show($id)\n\t{\n\t\n\t}", "title": "" }, { "docid": "f66e5d8754a0233237013bb8c45e0377", "score": "0.5723268", "text": "public function show($id)\n\t{\n\t\t//\n\t\t \n\t}", "title": "" }, { "docid": "c27b7f061b14b3c5c61c337e63783752", "score": "0.5721509", "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": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.5710076", "text": "public abstract function display();", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.5705454", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.5705454", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.5705454", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "7b283ba1c0546a155efc95a44dd0f9cf", "score": "0.56997055", "text": "public function show(Response $response)\n {\n //\n }", "title": "" }, { "docid": "f810559c966a6f2c87d7e75698b80a8e", "score": "0.5696114", "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.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" } ]
7a07e03fd8d4896f56b61679c916afc0
Get the situation fam.
[ { "docid": "378a4ca78241e597cb76918e2b06a009", "score": "0.70404935", "text": "public function getSituationFam() {\n return $this->situationFam;\n }", "title": "" } ]
[ { "docid": "746ad5f1e06a811cf6d9ae6190363168", "score": "0.62566096", "text": "public function family()\n\t{\n\t\treturn $this->families()->where('families.id', '=', $this->current_family_id)->first();\n\t}", "title": "" }, { "docid": "25afb6782e011024285ca2c8a255a5e4", "score": "0.618604", "text": "public function getFamily()\n {\n return $this->family;\n }", "title": "" }, { "docid": "c74de3cc5ab9507e40b8913dd951a057", "score": "0.61530155", "text": "abstract function getFamily();", "title": "" }, { "docid": "358d80f65ec28a3f71ef65757ad2ceac", "score": "0.6040927", "text": "public function getFo() {\n\t\treturn $this->_fo;\n\t}", "title": "" }, { "docid": "b1c137b89796a37300c789135a049c4e", "score": "0.60302734", "text": "public function get_familyID()\n {\n return AlevelQualification::FAMILYID;\n }", "title": "" }, { "docid": "30972b7e4963884b49a011be452956da", "score": "0.60188997", "text": "public function getFao()\n {\n return $this->fao;\n }", "title": "" }, { "docid": "f43d1fa533e2d94451d8a8afd40d5ff5", "score": "0.5988492", "text": "public function getFoneA()\n {\n return $this->foneA;\n }", "title": "" }, { "docid": "8c61c49a7150a03114d7ffe6908332df", "score": "0.5903234", "text": "public function get_family_ID()\r\n {\r\n return CGQualification::FAMILYID;\r\n }", "title": "" }, { "docid": "e243322702dc17092ac762443c8066ba", "score": "0.58676374", "text": "public function getF() {\n\t\t//\n\t}", "title": "" }, { "docid": "8590a5b9c780a757b1f1295130a88f2e", "score": "0.5841856", "text": "public function getNomeFantasia()\n { return $this->getAttribute('fantasia'); }", "title": "" }, { "docid": "d1ac140388354d62c9e8068b9f4e8f3b", "score": "0.58166754", "text": "public function getFrais_forfait()\n {\n return $this->frais_forfait;\n }", "title": "" }, { "docid": "450918464424279419f7ebad4577fe13", "score": "0.57707894", "text": "public function getAdFNom() {\n return $this->adFNom;\n }", "title": "" }, { "docid": "31326a301bed4763e84d12ebca931af5", "score": "0.57464266", "text": "public function get_family()\r\n {\r\n return CGQualification::NAME;\r\n }", "title": "" }, { "docid": "cf54802af40e77fdbb2ad01641b2fc46", "score": "0.56818354", "text": "public function get_family_name()\n {\n return AlevelQualification::NAME;\n }", "title": "" }, { "docid": "f56cd72ef49810b64330d6a86fc7fbe9", "score": "0.5677585", "text": "function getNombre_Falta() {\r\n\t\treturn $this->nombre_falta;\r\n }", "title": "" }, { "docid": "80b1e6917bfdb7ffbb0ebdbe7b3ea12e", "score": "0.564502", "text": "public function getFra()\n {\n return $this->fra;\n }", "title": "" }, { "docid": "9283cc0d94fc4a1b3aa046805fd22a03", "score": "0.5637138", "text": "public function getConventionFne() {\n return $this->conventionFne;\n }", "title": "" }, { "docid": "59e9f7661cf5923d52183476090a89a2", "score": "0.56275296", "text": "public function getTipoFalta()\n {\n return $this->tipo_falta;\n }", "title": "" }, { "docid": "a2e1184a960cd2a5935940e92c044e78", "score": "0.55791306", "text": "public function getFiche_frais()\n {\n return $this->fiche_frais;\n }", "title": "" }, { "docid": "b0bb243ddd2969a9aefecff7367df2b2", "score": "0.55179125", "text": "public function getAnoFim()\n {\n return $this->anoFim;\n }", "title": "" }, { "docid": "a8b3bb124c96b36867a54924eb4cb8d7", "score": "0.5474683", "text": "public function getFamilyName()\n {\n return $this->family_name;\n }", "title": "" }, { "docid": "795353cb8e0ce44fdb68e1c2269fb977", "score": "0.5454433", "text": "public function getFio()\n {\n return $this->fio;\n }", "title": "" }, { "docid": "9ef2b77ea4011f4fbee69357e63ca259", "score": "0.54342556", "text": "public function getFounder()\n {\n return $this->founder;\n }", "title": "" }, { "docid": "de3a285a2e336ea71f55799562aec6ab", "score": "0.5431611", "text": "public static function titleFemale()\n {\n return static::titleMale();\n }", "title": "" }, { "docid": "ce7ce340063273782ef75cd91c06dd7f", "score": "0.54235506", "text": "protected function getFamily() {\n if (!$this->fileFamily) {\n // Find which 'Family' the file is in.\n foreach (self::$familyExtensions as $family => $extensions) {\n if (in_array($this->fileExtension, $extensions)) {\n $this->fileFamily = $family;\n break;\n }\n }\n }\n return $this->fileFamily;\n }", "title": "" }, { "docid": "2d21250ca7d662b61f089c56a8ff2d73", "score": "0.54174876", "text": "public function getIndividualDefense()\n {\n return $this->individual_defense;\n }", "title": "" }, { "docid": "00a10878161d425b1569051656e8c475", "score": "0.54005", "text": "public function getFareName()\n {\n return isset($this->FareName) ? $this->FareName : null;\n }", "title": "" }, { "docid": "f5dc6e13f1a87c5bf5d73739759fe80f", "score": "0.5399576", "text": "public function getFamilyName()\n {\n if ($this->getFamily()) {\n return $this->getFamily()\n ->getName();\n }\n //if it reaches here, no family name found. return empty family name\n return \"\";\n }", "title": "" }, { "docid": "428d575cdc1811bf0293648561236ea1", "score": "0.5375139", "text": "public function getFonction()\n {\n return $this->fonction;\n }", "title": "" }, { "docid": "42e39d4cf504454e724b829797a7b1be", "score": "0.53681827", "text": "public function getFigi()\n {\n return $this->figi;\n }", "title": "" }, { "docid": "91c92e4f92fc90aca69cf77ce3d555e8", "score": "0.5359465", "text": "public function feature() {\n\t\treturn $this->feature_gating;\n\t}", "title": "" }, { "docid": "19b005a9096699ab0b73bbd566e799fa", "score": "0.53245014", "text": "public function ferrocarril(){\n $ferro = $this->modelo->get_ferrocarril(); \n return $ferro; \n }", "title": "" }, { "docid": "82f19aba99120d53da95d15b93dc876b", "score": "0.5305536", "text": "public function getMedioDifusion()\r\n {\r\n return $this->hasOne(MedioDifusion::className(), ['medio_difusion' => 'medio_difusion']);\r\n }", "title": "" }, { "docid": "e31daae2962bc0179e58314f2b5c0b67", "score": "0.52969134", "text": "public function getFrecuencia()\n {\n return $this->frecuencia;\n }", "title": "" }, { "docid": "e31daae2962bc0179e58314f2b5c0b67", "score": "0.52969134", "text": "public function getFrecuencia()\n {\n return $this->frecuencia;\n }", "title": "" }, { "docid": "17296ce1f402833fc3c2f70097eee3cf", "score": "0.5288157", "text": "public function getFC()\n {\n return $this->FC;\n }", "title": "" }, { "docid": "b2598b0f971b96b5d8dc37c3292a5291", "score": "0.528638", "text": "public function getFechadeingreso()\n {\n return $this->fechadeingreso;\n }", "title": "" }, { "docid": "8a52486c80682e0fc6d7617b446a521a", "score": "0.5273297", "text": "public function getFarge() {\n return $this->farge;\n }", "title": "" }, { "docid": "3e215166ad12d951513edcc7a4249e45", "score": "0.5270223", "text": "public function getArrangementFraId()\n {\n return $this->arrangement_fra;\n }", "title": "" }, { "docid": "3cf8906b7ea5a015917977885c09d80d", "score": "0.5261192", "text": "public function getDefenseSpe()\n {\n return $this->defense_spe;\n }", "title": "" }, { "docid": "ce2b96e152e5e46ab6987ca056483b54", "score": "0.5255203", "text": "public function getFestivalType()\n {\n return $this->festival_type;\n }", "title": "" }, { "docid": "871d89cbd4421de9ce2d1766fea616e0", "score": "0.52457225", "text": "public function getFiche()\n\t{\n\t\t/*\n\t\t$chaine = \"<table border='1' width=25% align='center'><tr>\";\n\t\t$chaine .= \"<td colspan='3' align='center'><b>\". $this->getNomAnimal() .\"</b></td>\";\n\t\t$chaine .= \"</tr>\";\n\t\t$chaine .= \"<tr>\";\n\t\t$chaine .= \"<td><b>Attaque</b></td>\";\n\t\t$chaine .= \"<td><b>Défense</b></td>\";\n\t\t$chaine .= \"<td><b>Vie</b></td>\";\n\t\t$chaine .= \"</tr>\";\n\t\t$chaine .= \"<tr>\";\n\t\t$chaine .= \"<td>\". $this->getAttaque() .\"</td>\";\n\t\t$chaine .= \"<td>\". $this->getDefense() .\"</td>\";\n\t\t$chaine .= \"<td>\". $this->getVie() .\"</td>\";\n\t\t$chaine .= \"</tr></table>\";\n\t\t*/\n\t\t\n\t\t$chaine = array();\n\t\t$chaine['nomAnimal'] = $this->getNomAnimal();\n\t\t$chaine['attaqueCoef'] = $this->getAttaque();\n\t\t$chaine['defenseCoef'] = $this->getDefense();\n\t\t$chaine['vieCoef'] = $this->getVie();\n\t\t$chaine['niveau'] = $this->getNiveau();\n\t\t\n\t\treturn $chaine;\n\t}", "title": "" }, { "docid": "6d814962739536e8e9408896bf6ecbad", "score": "0.52456343", "text": "public function returnGenderPronounUsage() {\n /** @comment - Your note here is spot on :) */\n //note: i guess instead of writing a switch to determine proper pronoun usage, i could change the setAllowedGender $approved_gender array to be 'male' => 'him' - but for now i am happy with this implementation\n //var to get the current gender\n $existing_pronoun = $this->getGender();\n //var to be used in our switch and to be returned\n $current_gender = NULL;\n\n switch ($existing_pronoun) {\n case 'female':\n $current_gender = \"her\";\n return $current_gender;\n break;\n case 'male':\n $current_gender = \"him\";\n return $current_gender;\n break;\n case 'gender fluid': /** @comment instead of case 'gender fluid':, consider just saying default: */\n $current_gender = \"it\";\n return $current_gender;\n break;\n }\n }", "title": "" }, { "docid": "8cfa8d4eb4b1699b7fe5859fea4e62cb", "score": "0.5236033", "text": "public function getNomeFantasia()\n {\n return $this->nomeFantasia;\n }", "title": "" }, { "docid": "58467bd206c2c1bb7f978987893e170b", "score": "0.52344185", "text": "public function getAdFNomVoie() {\n return $this->adFNomVoie;\n }", "title": "" }, { "docid": "14d4533f65e38f6fb3b8d4aab54f199e", "score": "0.5222268", "text": "public function currentFamily()\n {\n\t\t// if the user doesn't have a current family...\n\t\tif(is_null($this->current_family_id))\n\t\t{\n\t\t\t// ..fetch their first family\n\t\t\t$family = $this->families()->first();\n\n\t\t\t// if it exists...\n\t\t\tif($family)\n\t\t\t{\n\t\t\t\t// ...switch to it\n\t\t\t\t$this->switchFamily($family);\n\t\t\t}\n\t\t}\n\n\t\treturn $this->belongsTo(Family::class, 'current_family_id');\n\t}", "title": "" }, { "docid": "9f856dad65f01a7c5ee15f41ce2adbfa", "score": "0.5208556", "text": "function getAffichage(){\r\nreturn $this->af ;\r\n}", "title": "" }, { "docid": "9f856dad65f01a7c5ee15f41ce2adbfa", "score": "0.5208556", "text": "function getAffichage(){\r\nreturn $this->af ;\r\n}", "title": "" }, { "docid": "78b373ad34789358bae46c0ef29b003b", "score": "0.5206297", "text": "public function getDefense()\n {\n return $this->defense;\n }", "title": "" }, { "docid": "78b373ad34789358bae46c0ef29b003b", "score": "0.5206297", "text": "public function getDefense()\n {\n return $this->defense;\n }", "title": "" }, { "docid": "69e0ffbb1b2a7eefa0012e317050f7ab", "score": "0.5205072", "text": "public function getMontantFGA()\n {\n return $this->montantFGA;\n }", "title": "" }, { "docid": "8a276c6b69db5767bd400a430eb0828c", "score": "0.51979685", "text": "public function getFamilyCountry()\n {\n if ($this->getFamily()) {\n return $this->getFamily()\n ->getCountry();\n }\n //if it reaches here, no country found. return empty country\n return \"\";\n }", "title": "" }, { "docid": "b1476da17818b5b87b69298354ab1fde", "score": "0.5190554", "text": "public function getHoraF()\n {\n return $this->horaF;\n }", "title": "" }, { "docid": "800ab61ad0c4af84927a94f4a6c7f2cd", "score": "0.5182603", "text": "public function getFornecedor()\n {\n return $this->fornecedor;\n }", "title": "" }, { "docid": "24da2479d7623946c057f7b7e366410e", "score": "0.5181055", "text": "public function getFR()\n {\n return $this->FR;\n }", "title": "" }, { "docid": "abed93fe4023cce26e370e4ddc6ff261", "score": "0.51656926", "text": "public function getFamilyName(): ?string\n {\n return $this->familyName;\n }", "title": "" }, { "docid": "54b0cbda919e5e364e8e4a7ba24d56f9", "score": "0.5151345", "text": "public function getRegraFalha()\n {\n return $this->regraFalha;\n }", "title": "" }, { "docid": "c544aed87a67cde0139e7c727e9008dd", "score": "0.5136034", "text": "public function getFurnitrues()\n {\n return $this->Furnitrues;\n }", "title": "" }, { "docid": "d2afc59f77258c2fe0124d4a9d346a2c", "score": "0.51308715", "text": "public function getFoneB()\n {\n return $this->foneB;\n }", "title": "" }, { "docid": "35d4d8167d15621021fffa21a5429620", "score": "0.5125798", "text": "public function getFamilyName() : ?string {\n\t\treturn ($this->familyName);\n\t}", "title": "" }, { "docid": "418be6c7c2cdc8d39d12327fb90f487d", "score": "0.51248133", "text": "public function getBaseAf() {\n return $this->baseAf;\n }", "title": "" }, { "docid": "593313d06ebf2e0d35ed31e31d66e4cf", "score": "0.51207846", "text": "public function getHazardous();", "title": "" }, { "docid": "60bb87c0f410051ef191b03200423278", "score": "0.51136297", "text": "public function getGender();", "title": "" }, { "docid": "eac7dcddd82583eb3f632df54519966e", "score": "0.51127726", "text": "public function getFECHACONSULTA()\n {\n return $this->FECHACONSULTA;\n }", "title": "" }, { "docid": "2a0b72ceb3214737c3de120e0c87a028", "score": "0.5110784", "text": "public function isFeminine()\n {\n return $this->feminine;\n }", "title": "" }, { "docid": "f6eab261f6fb3b4528f7a647d9b82d1e", "score": "0.5098029", "text": "public function _get_family_planning_method() {\n\t\treturn $this->_family_planning_method;\n\t}", "title": "" }, { "docid": "88e57ad2d455c87d8eca3d501c48b094", "score": "0.50818247", "text": "public function getFamilie(){\n return $this->hasOne(FamiliiOcupationale::class, 'id');\n }", "title": "" }, { "docid": "d2ee6dc8e8a9baa29ec3ff614cc4cb39", "score": "0.5062115", "text": "public function getFamilyId() : Uuid {\n\t\treturn($this->familyId);\n\t}", "title": "" }, { "docid": "f890d2cea3dd194333cb78495f51a775", "score": "0.5059213", "text": "public function getGender() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"gender\");\n\t}", "title": "" }, { "docid": "c22b7fa3d2bf45bd68bf5975c0259715", "score": "0.50573874", "text": "public function getFrendsSex()\n\t{\n\t\tif(!$this->user){\n\t\t\treturn array();\t\n\t\t}\n\t\t$return = array(\n\t\t\t\"female\"=>0,\n\t\t\t\"male\"=>0,\n\t\t\t\"unknown\"=>0\n\t\t);\n\t\t$data = $this->facebook->api(array('method' => 'fql.query', 'query' => 'SELECT uid , sex, name FROM user WHERE uid = me() OR uid IN (SELECT uid2 FROM friend WHERE uid1 = me())'));\n\t\t\n\t\tif($data && sizeof($data) > 0)\n\t\t{\n\t\t\tforeach( $data as $k=>$v )\n\t\t\t{\n\t\t\t\tif($v['sex']==\"female\")\n\t\t\t\t\t$return['female'] += 1;\n\t\t\t\tif($v['sex']==\"male\")\n\t\t\t\t\t$return['male'] += 1;\n\t\t\t\tif($v['sex']==\"unknown\")\n\t\t\t\t\t$return['unknown'] += 1;\t\t\t\t\t\t\t\t\t\t \n\t\t\t}\n\t\t}\n\t\treturn $return;\t\n\t}", "title": "" }, { "docid": "70a585eb2621f462f4d6bb19a67e28de", "score": "0.5051502", "text": "public function getEvoFisc() {\n return $this->evoFisc;\n }", "title": "" }, { "docid": "d0222cfc7c5fbc4a33da57ea94b48d7b", "score": "0.50440186", "text": "public function getFormation()\n {\n return $this->formation;\n }", "title": "" }, { "docid": "e5610ee2d3519e38c2dfe95f96aaaa54", "score": "0.5034598", "text": "public function getGender() {\n\t\treturn $this->paziente_sesso;\n\t}", "title": "" }, { "docid": "efc75869efceea933bd91b9620066317", "score": "0.5031783", "text": "public function getGMode()\n {\n }", "title": "" }, { "docid": "3c92858dec78335af03b34c531cc34f3", "score": "0.5029037", "text": "function family()\n\t{\n\t}", "title": "" }, { "docid": "fcc4842fd954a2246141993c07244932", "score": "0.50260127", "text": "public function getBicFi()\n {\n return $this->bic_fi;\n }", "title": "" }, { "docid": "3ba4ab17a2082664792f99c0beddcedc", "score": "0.5025601", "text": "public static function lastNameFemale()\n {\n return static::randomElement(static::$lastNameFemale);\n }", "title": "" }, { "docid": "8b454e79d8ddd323339be50aba97fd91", "score": "0.5020337", "text": "public function _get_family_planning_method_information() {\n\t\treturn $this->_family_planning_method_information;\n\t}", "title": "" }, { "docid": "69ceeeb610b36f22e91251c878a84603", "score": "0.5010659", "text": "function nature(): string { return $this->nature; }", "title": "" }, { "docid": "f7bd4274a4180c9c72e8c5a971e9f608", "score": "0.50075036", "text": "public function getBiografia()\n {\n //return $this->biografia;\n return $this->biografia;\n }", "title": "" }, { "docid": "75a7965eae4e9e6132ed8054649f4288", "score": "0.50008667", "text": "public function getGender()\n {\n return $this->response['gender'] ?: null;\n }", "title": "" }, { "docid": "b4bc139f576022cc18436afe8a52db8a", "score": "0.50001645", "text": "public function setSituationFam($situationFam) {\n $this->situationFam = $situationFam;\n return $this;\n }", "title": "" }, { "docid": "b4bc139f576022cc18436afe8a52db8a", "score": "0.50001645", "text": "public function setSituationFam($situationFam) {\n $this->situationFam = $situationFam;\n return $this;\n }", "title": "" }, { "docid": "2670277e335a9bb897960dbd56713191", "score": "0.49938273", "text": "public function getGender()\n {\n return $this->getField('gender');\n }", "title": "" }, { "docid": "5ae0733ae839acc58bb85d8a5d4e9430", "score": "0.49933034", "text": "public function getFather() {\n return Person::find($this->father_id);\n }", "title": "" }, { "docid": "c8a634caef13048aebdf8d1bef8e1a75", "score": "0.49838576", "text": "public function getFormation() {\n\t\treturn Formation::createFromID($this->idFormation);\n\t}", "title": "" }, { "docid": "242ee04903ee25b66efc1a2711585ae9", "score": "0.49740508", "text": "public function facility_type()\n {\n return $this->hasOne(HealthFacilityType::class, 'HFT_Code', 'type');\n }", "title": "" }, { "docid": "2205c4de9ad9b7135ccbc4eb11e112d5", "score": "0.49739468", "text": "public function getFacultad()\n {\n return $this->hasOne(Facultades::className(), ['id' => 'facultad_id']);\n }", "title": "" }, { "docid": "2205c4de9ad9b7135ccbc4eb11e112d5", "score": "0.49739468", "text": "public function getFacultad()\n {\n return $this->hasOne(Facultades::className(), ['id' => 'facultad_id']);\n }", "title": "" }, { "docid": "ec121d5590ceb0f957bdd498f05618db", "score": "0.4962639", "text": "public function getDefenseSpe()\n {\n return $this->defenseSpe;\n }", "title": "" }, { "docid": "94407bc3aa5acb397ced5e8aea13ccd8", "score": "0.49567798", "text": "public function getRefArticleFournisseur() {\n return $this->refArticleFournisseur;\n }", "title": "" }, { "docid": "737c6a310e11d525df49b68a75064116", "score": "0.4955971", "text": "public function getTipo()\n {\n return self::TIPO_OFERTA;\n }", "title": "" }, { "docid": "d6743bfabc5509e3c159f285a50e0045", "score": "0.4953551", "text": "public function getCodeFournisseur() {\n return $this->codeFournisseur;\n }", "title": "" }, { "docid": "d6743bfabc5509e3c159f285a50e0045", "score": "0.4953551", "text": "public function getCodeFournisseur() {\n return $this->codeFournisseur;\n }", "title": "" }, { "docid": "d2407a4e132fcf778e773cc274d4ca21", "score": "0.4945119", "text": "public function getIdFase0()\n {\n return $this->hasOne(Fase::className(), ['idFase' => 'idFase']);\n }", "title": "" }, { "docid": "1d17a09698627c3703f3cf3b2479d7a0", "score": "0.49413267", "text": "public function getMedicalNeed()\n {\n return $this->medicalNeed;\n }", "title": "" }, { "docid": "b299dd59d3bece08d62c5ab6bbbc9859", "score": "0.4935379", "text": "public function getOmbActief() {\n\t\treturn $this->ombActief;\n\t}", "title": "" }, { "docid": "8d842a7633ecb0d2b1d7cbc477087b56", "score": "0.49352434", "text": "public function getGio() {\r\n return $this->gio;\r\n }", "title": "" }, { "docid": "6e59f1536164aae105b1ee1e611b46c8", "score": "0.49279782", "text": "public function get_gender(){\n return $this->gender;\n }", "title": "" } ]
d03b388b5c2bcd743860d5a3096e1c5d
Execute the console command.
[ { "docid": "706fabf7d458551203cc018d366dc499", "score": "0.0", "text": "public function handle()\n {\n $keywords = Keyword::all();\n foreach ($keywords as $item) {\n $this->info(\"[slug: ] \" . $item->k_slug);\n try {\n DB::connection('tailieu247')->table('keywords')->insert([\n 'id' => $item->id,\n 'k_name' => $item->k_name,\n 'k_slug' => $item->k_slug,\n 'k_description' => $item->k_description_seo,\n 'created_at' => $item->created_at\n ]);\n } catch (\\Exception $exception) {\n $this->error(\"-- Error ID \". $item->id);\n }\n }\n }", "title": "" } ]
[ { "docid": "31bdadb4e31a78e7cdcc6eb471b0e04b", "score": "0.63933367", "text": "public function handle()\n {\n $guild = $this->argument('guild');\n $this->storememberscharacters($guild);\n }", "title": "" }, { "docid": "c80b01e6ccb0ff5ceb0ee1350e2a78d9", "score": "0.63900125", "text": "public function handle()\n {\n $details = $this->getDetails();\n \n $user = $this->user->updateUser($details);\n $this->display($user);\n }", "title": "" }, { "docid": "f93dc34332738d0f288b5eb4fc812294", "score": "0.6290442", "text": "public function handle()\n {\n $ramlFile = $this->argument('ramlFile');\n $this->actionIndex($ramlFile);\n }", "title": "" }, { "docid": "95dce92b670a33d22139f5a09b91862a", "score": "0.62869346", "text": "public function handle()\n\t{\n\t\tparent::handle();\n\n $this->call('panel:createobserver', ['name' => $this->argument('name')]);\n\t}", "title": "" }, { "docid": "bf4a33c6281151962d24fd636f62d63e", "score": "0.62794644", "text": "public function handle()\n {\n $this->validateArguments();\n $this->initializeEntityAdditionalSettings();\n\n $entityClassName = self::AVAILABLE_ENTITIES[$this->argument('entity')];\n\n $entities = RepoFactory::create($entityClassName)->getAll();\n\n $viewName = $this->getViewName($entities[0]);\n\n $entitiesHtmlCollection = [];\n foreach ($entities as $entity) {\n $qrCodeRelativePath = $this->generateQrCode($entity);\n $entitiesHtmlCollection[] = $this->getEntityInfoHtml($viewName, $entity, $qrCodeRelativePath);\n }\n\n $link = $this->saveAsHtmlFile($entitiesHtmlCollection);\n\n $this->info(\"DONE.\");\n $this->info(\"Results are available by link $link\");\n }", "title": "" }, { "docid": "9e7f5e14b1bf132c85c4e407fa9ce8d5", "score": "0.6273879", "text": "public function handle()\n {\n $this->convertImages();\n \n $this->info('Images converted!');\n }", "title": "" }, { "docid": "e73b2506b4b6e393ba7affcf497f92d8", "score": "0.62633914", "text": "public function handle()\n {\n $this->call('make:migration', [\n 'name' => $this->input->getArgument('name'),\n '--create' => $this->input->getOption('create') ?: false,\n '--table' => $this->input->getOption('table'),\n '--path' => 'database/migrations/tenant'\n ]);\n }", "title": "" }, { "docid": "cba33bf33b87a341a3b068b69b28e2bb", "score": "0.62603337", "text": "public function handle()\n {\n $symbol = $this->argument('symbol');\n $stock = $this->stock->bySymbol($symbol)->first();\n if ($stock === null) {\n $this->info(\"No stock $symbol found\");\n return;\n }\n\n $this->database->updateMonthly($stock);\n\n $this->info('done');\n }", "title": "" }, { "docid": "38a06c5776f0e0c1c06c0513f824eb91", "score": "0.6257959", "text": "public function handle()\n {\n $options = ['--provider' => PermissionServiceProvider::class];\n\n if ($this->option('force') == true) {\n $options['--force'] = true;\n }\n\n $this->call('vendor:publish', $options);\n }", "title": "" }, { "docid": "0abac00b2d8833a9c92bcefac47b4b11", "score": "0.6229036", "text": "public function handle()\n {\n $user = $this->userLoader->load($this->argument('user'));\n $package = $this->packageLoader->load($this->argument('package'));\n\n $package->users()->save($user);\n }", "title": "" }, { "docid": "eeca13d3ea402ff9d1db1fb5bc2d2211", "score": "0.62262774", "text": "public function handle()\n {\n $this->matchService->generateMatch();\n $this->info('Match generated');\n }", "title": "" }, { "docid": "609b294b9dff2e1f099fa14d6712371f", "score": "0.6219774", "text": "public function handle()\n {\n $name = $this->argument('name');\n\n $this->generateBaseClasses($name);\n\n $this->generateDomainClasses($name, self::DOMAINS);\n }", "title": "" }, { "docid": "05fa63ad259924d55189006d9e1ddc49", "score": "0.6209215", "text": "public function handle()\n {\n $this->createDirectory();\n\n $this->sprout = ucfirst($this->argument('name'));\n\n file_put_contents(\n app_path(sprintf(\"Sprouts/%s.php\", $this->sprout)),\n $this->compileSproutStub()\n );\n }", "title": "" }, { "docid": "cde62dca9b74f7a44268dd16d0c9b1d3", "score": "0.6202063", "text": "public function handle()\n { \n\t\t$this->comment('-- Stared:'.' '.Carbon::now()->toDateTimeString());\t\t\t\n\t\t\n\t\t$drawid = $this->argument('gameid');\n\t\t\n\t\tif (empty($drawid ) )\n\t\t{\n\t\t\t$this->error('-- unknown gameid');\n\t\t}\t\t\n\t\t$draw = new draw();\n\t\t$draw->game_id = $drawid;\n\t\t$draw->result = generate_random_number(1,6); \n\t\t$draw->save();\n\t\t$this->info('-- Result Generated');\n\t\tevent(new \\App\\Events\\EventDynamicChannel('ResultUpdated', '',$draw->id));\t\t\n\t\t$this->line('-- End:'.' '.Carbon::now()->toDateTimeString());\t\t\n\t\t$this->info('-- All done');\n }", "title": "" }, { "docid": "0fee037af9b274c918a1e6999fe6c6d8", "score": "0.6187628", "text": "public function handle(): void\n {\n $this->info(\"'inspect' command has been renamed 'inspect-method'\");\n }", "title": "" }, { "docid": "73beee98ead764288c19783fa113fea5", "score": "0.6174608", "text": "public function handle()\n {\n $level = $this->option('level');\n\n $this->line(sprintf('<info>%s</info>', $this->generate($level)));\n }", "title": "" }, { "docid": "ced7d003162a68f0ea3006d971c4284c", "score": "0.6151354", "text": "public function handle()\n {\n $users = User::all();\n\n if ($this->argument('user') !== null) {\n $users = User::where('name', $this->argument('user'))\n ->orWhere('id', $this->argument('user'));\n }\n\n $this->payments($users);\n }", "title": "" }, { "docid": "4cb0f56b1144be979a83cf1c0e049e0b", "score": "0.61417806", "text": "public function fire()\n {\n $iesFolder = $this->input->getOption('ies_folder');\n\n $migrationService = new IESMigrationService($this);\n $migrationService->run($iesFolder);\n }", "title": "" }, { "docid": "e18219610ea650a378d6e5cd817cc000", "score": "0.614067", "text": "public function handle()\n {\n $importer = new PictureImporter($this->argument('csv_directory'));\n $importer->run();\n }", "title": "" }, { "docid": "325af524eaeb202a372fcb6868751e34", "score": "0.61317044", "text": "public function handle()\n {\n $source = $this->option('source') ?: config('currency.source');\n\n $this->info('Updating currency exchange rates...');\n\n try {\n $this->manager->fetchFrom($source)->update();\n\n $this->info('Exchange rates were successfully updated.');\n } catch (\\Exception $e) {\n $this->error($e->getMessage());\n }\n }", "title": "" }, { "docid": "271ae77128e1975a9e4bfd8ad333bf61", "score": "0.61289805", "text": "public function handle()\n {\n $command = $this->argument('name');\n $content = file_get_contents(__DIR__.'/../Stubs/Command.stub');\n $data = str_replace('<Command>', $command, $content);\n file_put_contents(__DIR__.\"/../../Http/Bot/$command.php\", $data);\n $this->info(\"$command has been created.\");\n }", "title": "" }, { "docid": "dca776001c5914842949708906f799a2", "score": "0.61267954", "text": "public function handle()\n {\n $user = (int)$this->argument('user');\n $permissions = $this->argument('permissions');\n $attach = $this->option('attach');\n $detach = $this->option('detach');\n if (!$attach and !$detach)\n {\n $this->viewUserPermissions($user);\n } else if ($attach and $detach) {\n $this->error('detach and attach conflicts.');\n } else if ($attach) {\n $this->attachUserPermissions($user, $permissions);\n } else if ($detach) {\n $this->detachUserPermissions($user, $permissions);\n }\n }", "title": "" }, { "docid": "36570478a207941037c92acd6cb8d7ba", "score": "0.61265725", "text": "public function handle()\n {\n $username = $this->argument('username');\n $inbox = $this->argument('inbox');\n\n $user = User::where('username', $username)->first();\n\n if(!$user) {\n $this->error('User not found: '.$username);\n return;\n }\n\n $activity = new Activity();\n $activity->type = 'Update';\n $activity->user_id = $user->id;\n $activity->setData([\n 'object' => $user->toActivityStreamsObject()\n ]);\n $activity->save();\n\n DeliverActivity::dispatch($activity, $inbox);\n }", "title": "" }, { "docid": "03eadb04c751ef0e99e526439fbc92f1", "score": "0.6125155", "text": "public function handle()\n {\n $script = $this->argument('script');\n $this->$script();\n }", "title": "" }, { "docid": "5a4f08b264a6b20564833e0ec6651e6f", "score": "0.6119058", "text": "public function handle()\n {\n $type = $this->argument('type');\n $mappings = $this->manager->getMappings($type);\n $this->info(json_encode($mappings));\n }", "title": "" }, { "docid": "4187c435292c0f5ffbdc7d5689732af4", "score": "0.6117956", "text": "public function handle()\n {\n $this->line('Executando o método ' . __METHOD__);\n $this->newLine();\n\n $userId = $this->argument('userId');\n\n $company = Company::find($userId);\n\n if ($company) {\n $this->comment('Exibindo dados do ID ' . $userId);\n\n $header = ['Key', 'Valor'];\n $rows = [];\n foreach ($company->toArray() as $key => $value) {\n $rows[] = [$key, $value];\n }\n\n $this->table($header, $rows);\n return;\n }\n\n $this->error('Not found company with ID ' . $userId);\n return;\n }", "title": "" }, { "docid": "39e9c39af64dd37e758d4c4c6efc3421", "score": "0.61167425", "text": "public function handle()\n {\n $this->info('Checking Permissions');\n $this->comparePermissionEntities(\n collect($this->permissionRepository->findAll())->map->getName(),\n $this->permissions\n );\n $this->info('Permissions Checked');\n\n $this->line('');\n\n $this->compareRoles();\n $this->info('Roles Checked');\n }", "title": "" }, { "docid": "b3889e74c36bbc001d4b547d3de560e8", "score": "0.61091125", "text": "public function fire()\n {\n $this->getApplication()->setCatchExceptions(false);\n\n $config = new Configuration();\n\n $config->getPresenter()->addCasters(\n $this->getCasters()\n );\n\n $shell = new Shell($config);\n\n $shell->addCommands($this->getCommands());\n $shell->setIncludes($this->argument('include'));\n\n $shell->run();\n }", "title": "" }, { "docid": "6ef616cc30d277a9f6844d3b240b17d3", "score": "0.60974985", "text": "public function handle()\n {\n $users = User::all();\n\n $this->info(\"\\nUsers:\\n\");\n\n foreach ($users as $user) \n {\n $user->update([\"google_token\"=>null,\"refresh_google_token\" => null]);\n $this->info($user->email);\n }\n\n $this->info(\"\\nTotal users: \".count($users).\"\\n\");\n }", "title": "" }, { "docid": "0f3a2902618c4fc9a0e0335a9efc92e8", "score": "0.60967916", "text": "public function handle()\n {\n $user = null;\n\n if ($id = $this->option('user')) {\n $user = User::find($id);\n\n if (blank($user)) {\n $this->error('Unable to find user with id ' . $id);\n }\n } elseif (App::environment('production')) {\n $this->error('Cannot create mock user in production. Use --user=USER to pass an existing user as an argument.');\n } else {\n // Create a mock user\n $user = factory(User::class)->create();\n }\n\n if ($user) {\n Mail::to($user)->send(new UserWelcomeMailable($user));\n $this->info(\"Welcome email sent to {$user->name} at {$user->email}.\");\n }\n }", "title": "" }, { "docid": "16f21c55ab0998fefbcf9dcbd0873285", "score": "0.6082941", "text": "public function handle()\n {\n //\n $option = $this->argument('action');\n\n\n switch ($option)\n {\n case \"start\":\n $this->info('wsprocess observer started');\n $this->start();\n break;\n case \"stop\":\n $this->info('stoped');\n $this->stop();\n break;\n case \"restart\":\n $this->info(\"restarted\");\n $this->restart();\n break;\n }\n }", "title": "" }, { "docid": "01497cfe47027473914dd322f577bad8", "score": "0.6081298", "text": "public function handle() {\n\n $this->info('update password user:');\n $this->getDetails();\n }", "title": "" }, { "docid": "3a6ffab5ba1a962d33748556772e5dae", "score": "0.60774165", "text": "public function handle()\n {\n $count = $this->argument('count');\n\n Exchange::getData($count);\n \n return $this->info('All set!');\n }", "title": "" }, { "docid": "6d2854c8d54651e1d6a4d46f87bf49f1", "score": "0.60678357", "text": "public function handle()\n {\n Slack::to($this->option('channel'))\n ->withIcon(':'.$this->option('icon').':')\n ->send($this->argument('message'));\n }", "title": "" }, { "docid": "a3aa63d85b1ee45a000466709cf2f3bd", "score": "0.6067713", "text": "public function handle()\n {\n \\Log::info('Retrieve orders at . '.\\Carbon\\Carbon::now());\n $this->runPlatformMarketConsoleFunction();\n }", "title": "" }, { "docid": "c779c1811e50aaf7ae288cda55026d9c", "score": "0.60656404", "text": "public function handle()\n {\n $this->info($this->bitfinex->getAllQuotations($this->argument('type')));\n }", "title": "" }, { "docid": "d8a3f116a1e76a82f3289112c70887fa", "score": "0.6055177", "text": "public function handle()\n {\n $this->currentWorkingPath = getcwd();\n\n if (file_exists($this->currentWorkingPath.'/essential.json')) {\n $this->error('essential.json already exists!');\n\n return;\n }\n\n if ($this->option('template')) {\n $this->template = $this->option('template');\n }\n\n file_put_contents($this->currentWorkingPath.'/essential.json', file_get_contents($this->template));\n\n $this->info('[essential.json] successfully generated.');\n }", "title": "" }, { "docid": "be2980f80b5465b65a42ad3194ef6e5a", "score": "0.6051976", "text": "public function handle()\n {\n $path = $this->fileSystem->translatePathArgument($this->argument('path'));\n $exists = file_exists($path);\n $readable = is_readable($path);\n if ($readable) {\n $this->info(\"All good\");\n } else if ($exists) {\n $this->warn(\"Not readable\");\n } else {\n $this->error(\"Doesn't exist\");\n }\n }", "title": "" }, { "docid": "ecc9cf4aaf2db9f8b70884b048f74fc4", "score": "0.60446", "text": "public function handle()\n {\n $email = $this->argument('email');\n $username = implode(\"\",$this->argument('username'));\n \n $request = [\n 'name' => \"Command\",\n 'email' => $email,\n 'mobile' => '9988776655',\n 'username' => $username,\n 'password' => bcrypt('password'),\n ];\n\n $user = User::create($request);\n $this->info($user);\n }", "title": "" }, { "docid": "d50e21085641bf95055715bea9a093ac", "score": "0.6040132", "text": "public function handle()\n {\n $format = $this->option('format') ?? 'mp4';\n $app = $this->option('app') ?? 'IDM';\n console()->comment('Extracting download link...');\n $downloadUrl = (new FZMovies($this->argument('url')))->get($format);\n \n console()->info('Download link extracted.');\n console()->question($downloadUrl)->newLine();\n Intents::call($app, $downloadUrl);\n }", "title": "" }, { "docid": "a5a973598d23cfcac7e510c633d3e8d4", "score": "0.6037342", "text": "public function handle()\n {\n $file = $this->argument('file');\n\n if(!Storage::disk('local')->exists('public/'.$file)){\n $this->error('Source file does not exist!');\n return;\n }\n\n $xml = Storage::disk('local')->get('public/'.$file);\n\n $data = simplexml_load_string($xml);\n\n $cookieExportHandler = DataExportHandlerFactory::make('cookies');\n $cookieExportHandler->prepareXMLObject($xml);\n $cookieExportHandler->exportDataToRedis();\n\n $subdomainsExportHandler = DataExportHandlerFactory::make('subdomains');\n $subdomainsExportHandler->prepareXMLObject($xml);\n $subdomainsExportHandler->exportDataToRedis();\n\n $this->info(\"Data exported successfully\");\n }", "title": "" }, { "docid": "1ccabf50dfa5b900b538ba54893de1cb", "score": "0.6033076", "text": "public function handle() {\n $this->verbose = $this->argument(\"verbose\");\n $configs = Config::getConfigs();\n\n $start = new DateTime();\n\n $this->line(\"<fg=green>Starting with output verbosity: \". $this->verbose .\".</>\");\n $this->line(\"<fg=cyan>Getting WalletExplorer DOM.</>\");\n $walletEContent = Utils::getContentFromURL(\"https://www.walletexplorer.com\");;\n $this->walletExplorerXPath = Utils::getDOMXPath($walletEContent);\n if ($this->walletExplorerXPath == \"\") {\n $this->error(\"WalletExplorer fetching failed...ending.\");\n exit();\n }\n\n $this->parseConfigs($configs);\n \n $end = new DateTime(); \n $diff = $start->diff($end);\n $this->line(\"<fg=green>All work done in: \". $diff->format( '%H:%I:%S' ) .\".</>\");\n }", "title": "" }, { "docid": "18c3b410866fe2368ac703db4f01bc35", "score": "0.6032594", "text": "public function handle()\n {\n $this->validateConfig();\n $this->prepareReportsPath();\n\n $this->actionsProcessTimeSessions();\n }", "title": "" }, { "docid": "4f58255c224a404b4e5277f99fad9229", "score": "0.6030762", "text": "public function handle()\n {\n $raw = app('setting')->getRaw($this->argument('key'));\n $info = $raw->value;\n if ($raw->whereIn('type', ['array', 'json', 'object', 'collection'])) {\n $info = json_encode($info);\n }\n\n $this->info($info);\n }", "title": "" }, { "docid": "2562046c15a574f5de6aaa5178b4fc57", "score": "0.60286856", "text": "public function handle()\n {\n foreach ($this->argument('tables') as $table) {\n switch ($table) {\n case 'manifest':\n $this->info('### Fetching Manifest ###');\n $manifest = new ManifestSeeder($table, $this->option('lang'));\n $this->info(\"### Seeding Manifest Table with paths ###\");\n $manifest->seeder();\n break;\n\n default:\n $this->info(\"Seeded tables\");\n break;\n }\n }\n }", "title": "" }, { "docid": "0571b8be1323d23cf69c2faf960e0ae9", "score": "0.6020347", "text": "public function handle()\n {\n /* FIXME: cant provide the config <22-11-20 sheenazien8> */\n Artisan::call('vendor:publish', [\n '--provider' => Sheenazien8\\Hascrudactions\\HascrudactionsServiceProvider::class,\n ]);\n $this->info('Command success');\n }", "title": "" }, { "docid": "000b594e8fb7543aa6852ecc8423d238", "score": "0.60199386", "text": "public function handle()\n {\n // Prepare command.\n $cmd = new Collection([\n config('modernizr.modernizr_path', base_path('node_modules/.bin/modernizr')),\n '-c', // Config\n config('modernizr.config_path', base_path('modernizr.json')),\n '-d', // Destination\n config('modernizr.resource_path', resource_path('js/modernizr.min.js')),\n ]);\n\n // Minification.\n if (config('modernizr.minify')) {\n $cmd->push('-u');\n }\n\n // Run the command.\n $process = new Process($cmd->toArray());\n $process->run();\n\n // Executes after the command finishes.\n if (! $process->isSuccessful()) {\n throw new ProcessFailedException($process);\n }\n\n // Print the result to the console.\n $this->info($process->getOutput());\n }", "title": "" }, { "docid": "bf2977fa3268050f1158cef68a479adc", "score": "0.60131925", "text": "public function handle()\n {\n $account_id = $this->argument('account');\n try {\n $account = Account::findOrFail($account_id);\n $this->connection->set($account);\n $this->info('Running Tinker on account_id: '.$account_id);\n\n parent::handle();\n\n $this->connection->purge();\n } catch (ModelNotFoundException $exception) {\n throw new RuntimeException(sprintf('The tenancy account_id=%d does not exist.', $account_id));\n }\n }", "title": "" }, { "docid": "bd2bff5fd6ba7b0ff3c512945ed18551", "score": "0.6008753", "text": "public function handle()\n {\n $site = $this->argument('site');\n $depth = $this->argument('depth');\n $requestDelay = $this->argument('request_delay');\n if (!$site) {\n $this->error('Site not found!');\n return;\n }\n\n $parser = new TreeLinksSpider($site, $depth, $requestDelay);\n $parser->crawl();\n }", "title": "" }, { "docid": "828ebee8d74ec7e694c59dacd32eb2ce", "score": "0.6008591", "text": "public function handle()\n {\n $this->dumpConfig($this->argument('key'));\n }", "title": "" }, { "docid": "9d218286e2918c371dc261970afe8828", "score": "0.60082567", "text": "public function handle()\r\n {\r\n $this->info(env($this->argument('key')));\r\n }", "title": "" }, { "docid": "722b7fdd54a43ced0c43c4ee2bc92a3d", "score": "0.600817", "text": "public function handle()\n {\n\n\n if (NULL !== $this->argument(\"email\")) {\n\n $time_start = microtime(true);\n\n $users = User::where('email', $this->argument(\"email\"))\n ->orderBy('partition', 'desc')\n ->get();\n\n $this->updateUserProfileWorking($users);\n\n $time_end = microtime(true);\n $execution_time = ($time_end - $time_start);\n echo '<b>Total Execution Time:</b> ' . $execution_time . ' Seconds' . \"\\n\";\n } else {\n $time_start = microtime(true);\n\n $users = User::whereRaw('email IN (SELECT DISTINCT(email) FROM user_insta_profile)')\n ->where('tier', '>', 1)\n ->orderBy('partition', 'asc')\n ->get();\n\n $this->updateUserProfileWorking($users);\n $time_end = microtime(true);\n $execution_time = ($time_end - $time_start);\n echo 'Total Execution Time: ' . $execution_time . ' Seconds' . \"\\n\";\n }\n }", "title": "" }, { "docid": "88d00d2739c619cd5ea207f572ae2022", "score": "0.60069823", "text": "public function handle()\n {\n\n $crawlerType = $this->argument('crawler_type');\n try {\n $params = [\n 'limit' => 100,\n 'offset' => 0\n ];\n $this->getProjects($params);\n\n } catch (Exception $e) {\n print_r( $e->getMessage());\n }\n }", "title": "" }, { "docid": "af2675e67d0ca0ab3c2f7035edb0b2ef", "score": "0.60064507", "text": "public function handle()\n {\n\n $this->info('Games started');\n\n $this->getTracks($this->games);\n\n }", "title": "" }, { "docid": "e089c1b5a8833bcb545380d4378ea564", "score": "0.6004342", "text": "public function handle()\n {\n\n // Filter by users: \"existing\" or \"all\"\n if ($this->option('users') === 'existing') {\n $applications = ApplicationCollection::findOldAndReadyForExistingUsers(1, 30);\n }\n else {\n $applications = ApplicationCollection::findOldAndReady(1, 30);\n }\n\n foreach ($applications->all() as $application) {\n Automation::sendHandlingConfirmationMail($application);\n }\n }", "title": "" }, { "docid": "ec4f6d67961f78408896f928b72e3af2", "score": "0.60025406", "text": "public function handle()\n {\n $countries = System::me()->getCountries();\n foreach ($countries as $country)\n Country::updateOrCreate(\n ['iso' => $country->isoName],\n [\n 'name' => $country->name,\n 'currency_code' => $country->currencyCode,\n 'currency_name' => $country->currencyName,\n 'currency_symbol' => $country->currencySymbol,\n 'flag' => $country->flag,\n 'calling_codes' => $country->callingCodes\n ]\n );\n }", "title": "" }, { "docid": "fd844ea86adcc37df3a77be7b63c522c", "score": "0.60005426", "text": "public function handle()\n {\n if(file_exists($this->getModulePath($this->argument('module_name')).'/') == false){\n $this->error('module with name '. $this->argument('module_name').' not found');\n return;\n }\n \n $this->call('db:seed', [\n '--class' => $this->getModuleSeederClass(),\n '--database' => $this->option('database'),\n '--force' => $this->option('force')\n ]);\n }", "title": "" }, { "docid": "f9d9b905d96a2bfa108b7e63b73e8444", "score": "0.59998065", "text": "public function handle()\n {\n // if you are on the local environment\n if (!app()->isLocal()) {\n $this->error('This command is only avilable on the local environment.');\n\n return;\n }\n\n $host = $this->argument('host');\n $this->deleteTenant($host);\n }", "title": "" }, { "docid": "32dc912559bc77ae339459ecc9f6b07e", "score": "0.59995383", "text": "public function handle()\n {\n $action = $this->argument('action');\n\n if ($action == 'reconcile-params') {\n\n $classes = explode(',', $this->option('class'));\n\n foreach ($classes as $class) {\n if (!class_exists($class)) {\n $class = $this->helper()->type2Class($class);\n }\n if (in_array(IncludesSubtypesInterface::class, class_implements($class))) {\n $items = $class::all();\n foreach ($items as $item) {\n $item->touch();\n }\n }\n }\n }\n\n }", "title": "" }, { "docid": "f68cff8a608d6a9d5f4b44ada558b381", "score": "0.599745", "text": "public function handle()\n {\n $ident = $this->argument('ident');\n $newName = $this->argument('name');\n\n $club = Club::where('club_name', $ident)->orWhere('join_code', $ident);\n if (!$club->exists()) {\n $this->error(\"Could not find club with identifier \\\"$ident\\\"\");\n die(126);\n }\n\n $club = $club->first();\n $this->info(\"Found club \\\"{$club->club_name}\\\" [{$club->join_code}]\");\n if ($newName) {\n $club->club_name = $newName;\n $club->saveOrFail();\n\n $this->info(\"Changed club name (\\\"{$club->club_name}\\\") to \\\"$newName\\\"\");\n } else {\n $this->error(\"The club's new name is required.\");\n abort(128);\n }\n }", "title": "" }, { "docid": "60df6f037936990c4a19574d227786bb", "score": "0.59874135", "text": "public function handle()\n {\n $this->callSilent('vendor:publish', ['--tag' => 'views' ,'--force' => true]);\n $this->callSilent('vendor:publish', ['--tag' => 'public' ,'--force' => true]);\n\n $this->info('Copied Directory [komeyl/dashboard/src/Views] To [/resources/views/dashboard]');\n $this->info('Copied Directory [komeyl/dashboard/src/Assets] To [/public/assets]');\n $this->info('Dashboard was installed successfully.');\n $this->info(\"\n ____ _ _ _\n | _ \\ __ _ ___ | |__ | |__ ___ __ _ _ __ __| |\n | | | | / _` | / __| | '_ \\ | '_ \\ / _ \\ / _` | | '__| / _` |\n | |_| | | (_| | \\__ \\ | | | | | |_) | | (_) | | (_| | | | | (_| |\n |____/ \\__,_| |___/ |_| |_| |_.__/ \\___/ \\__,_| |_| \\__,_|\n\n\n \");\n }", "title": "" }, { "docid": "4cb5477d8cb2ca008c01b8edae6312be", "score": "0.5986817", "text": "public function handle()\n {\n $telephone = $this->argument('telephone');\n $message = $this->argument('message');\n\n $this->SMSGateway->send($telephone, $message);\n }", "title": "" }, { "docid": "8941281a49fd84066aa02a26f39e833f", "score": "0.5986754", "text": "public function handle()\n {\n $this->init();\n\n $this->validateArguments();\n\n $this->create();\n\n $this->info('Updating configurations...');\n\n $this->updateConfig();\n\n $this->info('Repository created successfully');\n }", "title": "" }, { "docid": "c7f6d1bb23aba93bf6152a79d240ef89", "score": "0.59866345", "text": "public function handle()\n {\n $currentLeagues = explode(',',config('app.poe_leagues'));\n foreach ($currentLeagues as $league) {\n $this->updateLeague($league);\n }\n }", "title": "" }, { "docid": "cdec806a99ebde79f50cbfa0fa1d5f59", "score": "0.59834695", "text": "public function handle()\n {\n $this->init();\n $this->validateArguments();\n $this->create();\n\n $this->info('Translation Files have been created successfully');\n }", "title": "" }, { "docid": "9e43b287df92160bed3d1207163bce4f", "score": "0.5980548", "text": "public function handle()\n {\n $namespace = (string) $this->argument('namespace');\n $foundClasses = ClassFinder::getClassesInNamespace($namespace, ClassFinder::RECURSIVE_MODE);\n\n $classes = [];\n foreach ($foundClasses as $class) {\n if (isset(class_uses($class)[HasEnigma::class]) === true) {\n $classes[] = $class;\n }\n }\n\n $choice = (array) $this->choice(\n 'Which models would you like to hydrate?',\n array_merge([0 => 'All'], $classes),\n 0,\n null,\n true\n );\n\n if (array_search('All', $choice) !== false) {\n $choice = $classes;\n }\n\n foreach ($choice as $class) {\n $this->hydrate(new $class);\n }\n\n $this->info('The hydration indexes has been enqueued / completed.');\n }", "title": "" }, { "docid": "8cd35522e76a21b3f2092fc0d0fe0a75", "score": "0.59773266", "text": "public function handle()\n {\n switch ($this->argument('action')) {\n // 补数据\n case 'refetchReport':\n for ($i=0; $i < $this->option('value'); $i++) {\n LibUchcv2::syncAllCreativeReport(['subDays' => $i]);\n }\n break;\n case 'cronEveryFiveMinutes':\n // 同步 UC汇川(UC头条)状态\n LibUchcv2::syncAllCampaignStatus();\n // LibUchcv2::syncAllAdgroupStatus();\n LibUchcv2::syncAllCreativeReport();\n LibUchcv2::syncAllCreativeStatus();\n break;\n case 'cronDailyAt_00_01':\n // 同步 UC汇川(UC头条) 前一天 创意报表\n LibUchcv2::syncAllCreativeReport(['subDays' => 1]);\n break;\n case 'getCreativeTpls':\n $this->getCreativeTpls();\n break;\n case 'transferV1toV2':\n $this->transferV1toV2();\n break;\n default:\n break;\n }\n }", "title": "" }, { "docid": "b8614e957b8a97683afe971c6301b534", "score": "0.5976579", "text": "protected function fire(): void\n {\n // Site root directory\n $this->changeToSiteDirectory();\n $argument = $this->argument('argument');\n\n $this->execCommandInContainer('composer', $argument, 'php');\n }", "title": "" }, { "docid": "1dbdbbf02a89d03c49a38314ef3bd35d", "score": "0.59736115", "text": "public function handle()\n {\n $networkKey = $this->argument('network');\n try {\n $network = Affiliate::resolveNetwork($networkKey);\n } catch (InvalidArgumentException $e) {\n $this->error($e->getMessage());\n return;\n }\n\n if (!($network instanceof NetworkWithProductFeeds)) {\n $this->error(\"'$networkKey' network must implement '\".NetworkWithProductFeeds::class.\"' interface.\");\n return;\n }\n\n Affiliate::updateFeeds(\n $network,\n $this->output\n );\n\n $this->info('Done.');\n }", "title": "" }, { "docid": "30f20a21b2d3ad58f0a0a8d0ad9808ac", "score": "0.5970742", "text": "public function handle()\n {\n switch ($action = $this->argument('action')) {\n case 'start':\n $this->start();\n break;\n case 'stop':\n $this->shutdown();\n break;\n }\n }", "title": "" }, { "docid": "d077947f251ddf5365810d2d400200e6", "score": "0.5969721", "text": "public function handle()\n {\n $filename = $this->argument('filename');\n if (! file_exists($filename)) {\n $this->error('File not found.');\n exit;\n }\n $mail = file_get_contents($filename);\n\n \\Mail::send([], [], function ($message) use ($mail) {\n $message->to('[email protected]')->subject('Test Message')->setBody($mail, 'text/html');\n });\n\n $this->notify('Mail sent!', 'Your email was sent to Mailtrap');\n }", "title": "" }, { "docid": "421fded74b7e189875c1060148499a3c", "score": "0.5969228", "text": "public function handle()\n {\n $this->call('route:trans:clear');\n\n $this->cacheRoutesPerLocale();\n\n $this->info('Routes cached successfully for all locales!');\n }", "title": "" }, { "docid": "b506762b6cbc615f311dcea13c68d26d", "score": "0.5968975", "text": "public function handle()\n {\n if (!($email = $this->option('email'))) {\n $email = $this->ask('What is the account\\'s email?');\n }\n\n $user = (new User)->where('email', $email)->firstOrFail();\n $user->assignRole('admin');\n }", "title": "" }, { "docid": "c464bb93bc36547e7246d885b51f52d4", "score": "0.5968255", "text": "public function handle()\n {\n $swaggerfile = $this->argument('swaggerfile');\n SwaggerGenerator::setRouter($this->router);\n $yaml = SwaggerGenerator::getSwaggerPaths();\n if ($swaggerfile) {\n file_put_contents($swaggerfile, $yaml);\n } else {\n echo $yaml;\n }\n\n }", "title": "" }, { "docid": "d549f18e775b0d0145c2836941a77049", "score": "0.59653735", "text": "public function handle()\n {\n $type = strtolower($this->option('type'));\n\n switch ($type) {\n case 'laravel':\n $this->laravelResources();\n break;\n default:\n $this->flutterResources();\n break;\n }\n }", "title": "" }, { "docid": "172361bce3fd29a41951226c219d92c3", "score": "0.5964786", "text": "public function handle()\n {\n $this->info('Welcome to command for Bantenprov\\DDGuru package');\n }", "title": "" }, { "docid": "fd51b5811449ad542fc230e15abd4b11", "score": "0.596439", "text": "public function handle()\n {\n $source = $this->option('source');\n $force = $this->option('force') ? true : false;\n $last = $this->option('last') ? true : false;\n $event = $this->option('event') ? true : false;\n\n if ($this->option('now')) {\n \\Modules\\ExternalShop\\Jobs\\GetOrders::dispatchNow($source, $force, $last, $event);\n } else {\n \\Modules\\ExternalShop\\Jobs\\GetOrders::dispatch($source, $force, $last, $event);\n }\n }", "title": "" }, { "docid": "65c6f30add536654bd401ed416d927d7", "score": "0.5961747", "text": "public function handle()\n {\n $this->slug = $this->argument('name');\n $this->fileName = Str::studly(\"{$this->slug}BreadSeeder\");\n $path = $this->getPath();\n $this->info(\"Processing seed for bread\");\n\n if ($this->files->exists($path)) {\n $this->error(\"The seed for {$this->slug} already exist\");\n unlink($path);\n $this->info(\"Removing seed\");\n }\n\n $this->info(\"Generating {$this->fileName}.\");\n $this->files->put($path, $this->buildClass($this->slug));\n $this->composer->dumpAutoloads();\n $this->info('Bread successfully generated.');\n\n }", "title": "" }, { "docid": "166ff4585c81972405d4ad78cb08f6ce", "score": "0.5961541", "text": "public function handle()\n {\n $result = app(Geocoder::class)->geocode($this->argument('address'));\n\n $this->info('Geocoding Results for Query: '.$this->argument('address'));\n $this->info('Lat: '.$result->getLat());\n $this->info('Lng: '.$result->getLng());\n }", "title": "" }, { "docid": "07cf9d665b198b7e8c7b7e5c88d1fef7", "score": "0.596076", "text": "public function handle()\n {\n stream_context_set_default(\n ['http' => [\n 'ignore_errors' => true],\n ]\n );\n\n $players = Player::all();\n\n $bar = $this->output->createProgressBar(count($players));\n\n foreach ($players as $player) {\n $user = $this->osuClient->getUser($player->name);\n\n foreach ($user->getPreviousUsernames() as $alias) {\n Alias::createAlias($player->id, $alias);\n }\n\n $bar->advance();\n }\n\n $bar->finish();\n }", "title": "" }, { "docid": "25741835724a7ff377b0e822fc6cd4c3", "score": "0.5955554", "text": "public function handle()\n {\n $whoisClient = new SimpleWhoisClient();\n $dataLoader = new JsonLoader(app_path('../vendor/helgesverre/domain-availability/src/data/servers.json'));\n\n $service = new DomainAvailability($whoisClient, $dataLoader);\n\n foreach (Word::where('status', 'waiting')->cursor() as $word) {\n if ($service->isAvailable($word->name.'.com', true) && $service->isAvailable($word->name.'.fr')) {\n $word->status = 'success';\n } else {\n $word->status = 'failed';\n }\n $word->save();\n }\n\n return Command::SUCCESS;\n }", "title": "" }, { "docid": "8235a3c21ec73a5f21377019799c61dc", "score": "0.59553564", "text": "public function handle()\n {\n $pairs = Pair::all();\n\n foreach ($pairs as $pair) {\n echo \"Pair {$pair->id} \\n\";\n Matching::dispatchNow($pair->id, $this->argument('dealTime'));\n }\n }", "title": "" }, { "docid": "e063778b7cd39115f939b3b789999505", "score": "0.59544337", "text": "public function handle()\n {\n $number = intval($this->argument('number'));\n $array = $this->argument('array');\n\n $result = Separator::separate($array, $number);\n $this->info($result);\n }", "title": "" }, { "docid": "cbda800c682a7acd36977ba64dccddef", "score": "0.5953621", "text": "public function handle() {\n\t\t$this->call('vendor:publish', [\n '--tag' => 'config',\n '--tag' => 'migrations'\n ]);\n\n $this->info('Download the config file (config/Actionslog.php) to your project');\n\n $this->call('migrate');\n\t}", "title": "" }, { "docid": "ece78db41562c0e60a498bc110fba9c5", "score": "0.5953332", "text": "public function handle()\n {\n $offset = $this->argument('offset') ?? 0;\n $orderId = $this->option('order') ?? null;\n\n $date = $this->option('date') ?? 0; //2019-06-24 00:00:00\n if ($date) {\n $offset = Carbon::parse($date)->diffInDays(Carbon::now());\n }\n\n $this->info(\"Generate ClassRecords for $orderId begin!\");\n if ($orderId) {\n $order = Order::find($orderId);\n if ($order->isActive()) {\n ClassRecordsGenerateQueue::dispatch($order, $offset)->onQueue('high');\n } else {\n Log::error('order is not active', [__CLASS__, __FUNCTION__, __LINE__]);\n }\n } else {\n Order::active()\n ->each(function (Order $order) use ($offset) {\n ClassRecordsGenerateQueue::dispatch($order, $offset)->onQueue('high');\n });\n }\n }", "title": "" }, { "docid": "4232e2fc34b1166717985ad32a270ff3", "score": "0.5951824", "text": "public function handle()\n {\n $this->addConfig();\n $this->initAdminDirectory();\n\n $this->info('Done.');\n }", "title": "" }, { "docid": "8d721d5fe1265c5d8e73b5b8544de255", "score": "0.5951088", "text": "public function handle()\n {\n $id = $this->argument('id');\n\n if($id)\n {\n $client = Client::find($id);\n\n if($client) \n {\n $this->execCommand($client);\n }\n\n return;\n }\n\n $clients = Client::all();\n\n foreach ($clients as $client) {\n $this->execCommand($client);\n }\n }", "title": "" }, { "docid": "3f0f48794df97b5eefedab121bdf1420", "score": "0.5950924", "text": "public function handle()\n {\n $this->info('Get all Colors');\n $colors = $this->color->all();\n foreach ($colors as $color){\n $this->info($color->name);\n \n }\n \n \n }", "title": "" }, { "docid": "e46485576a22a69f417f2121e1155a86", "score": "0.5950593", "text": "public function handle()\n {\n $user = new User();\n $user->name = $this->argument('name');\n $user->email = $this->argument('email');\n $user->password = Hash::make($this->argument('password'));\n\n $user->save();\n }", "title": "" }, { "docid": "3dc44ecd789bffef220f8e4efde10b43", "score": "0.595032", "text": "public function handle()\n {\n $class = config(\"synchronizer.synchronizations.{$this->argument('entity')}.model\");\n\n if (!class_exists($class))\n return $this->error('Entity is not mapped in synchronizer configuration file');\n\n $object = $class::find($this->argument('synchronizable_id'));\n\n if (!$object)\n return $this->error('Entity was not found in database');\n\n $synchronization = app()->make('synchronizer')->add($object, $this->argument('entity'), $this->option('interval'));\n\n if ($synchronization)\n $this->info(sprintf('Added synchronization with id %s', $synchronization->id));\n }", "title": "" }, { "docid": "7fc4b61fa270ce705b48945e8123a292", "score": "0.5950012", "text": "public function handle()\n {\n $domain = $this->argument('domain');\n\n $existing = TrashmailProvider::where('domain', $domain)\n ->first();\n\n if(!$existing) {\n $this->line(\"Domain {$domain} does not exist in database.\");\n return;\n }\n\n $answer = $this->choice('Domain already exist, override?', ['Delete', 'Abort'], 0);\n\n if($answer === 'Abort') {\n $this->line(\"Aborted.\");\n return;\n };\n\n $existing->delete();\n\n $this->info(\"Domain {$domain} deleted from {$existing->list}.\");\n }", "title": "" }, { "docid": "4606eba2db2b46ebeaed5a4843d0d42b", "score": "0.5948824", "text": "public function handle()\n {\n $this->info('Compiling views');\n\n $this->compileViews();\n }", "title": "" }, { "docid": "c1eaa741f9d68037799d42579f3c82e3", "score": "0.5941916", "text": "public function handle() {\n $entities = $this->getEntities($this->entity_id);\n $data = $this->loadData($entities);\n $this->insertData($data);\n\n if ($this->verbose) {\n print \"\\n\";\n }\n }", "title": "" }, { "docid": "a1257c244ded8f3b930013aaea506f24", "score": "0.59385514", "text": "public function fire()\n {\n $command = $this->argument('cmd');\n if ($command === 'make') {\n if ($remote = $this->option('remote')) {\n $this->makeRemote($remote);\n } else {\n $this->make();\n }\n\n } elseif ($command === 'apply') {\n $this->apply();\n } else {\n $this->info(\"Unsupported command. use 'dump' or 'apply'\");\n }\n }", "title": "" }, { "docid": "2dab870b7b15091476f63e4af68c3318", "score": "0.59334594", "text": "public function handle()\n {\n $id = $this->argument('id');\n $user = User::searchUser($id);\n //Controlamos que exista el usuario\n if ($user !== null) {\n //Generamos una cadena de texto aleatoria de 20 caracteres\n $message = substr(str_shuffle(\"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\"), 0, 20);\n $notificationService = new NotificationService(new SesProvider(app()));\n $result = $notificationService->notify($user, $message);\n //Hacemos el output\n $this->info('id: '. $user->id);\n $this->info('email: '. $user->email);\n $this->info('message: '. $message);\n $this->info('result: '. $result);\n }\n else {\n //Si no existe mostramos por consola el mensaje de error\n $this->info('id: ');\n $this->info('email:');\n $this->info('message: El usuario no existe');\n $this->info('result: '. false);\n }\n \n \n }", "title": "" }, { "docid": "fbd941cb80149069517f6415798edeee", "score": "0.59320456", "text": "public function handle()\n {\n $project = $this->argument('project');\n\n try {\n $this->info((new DownDockerCompose($project))->run());\n } catch (\\Exception $e) {\n $this->error($e->getMessage());\n }\n }", "title": "" }, { "docid": "a88b7483e0bb654e71e57cbed822e74c", "score": "0.59298074", "text": "public function handle()\n {\n // Check if the model exists and provide one if it is missing.\n $directory = config('laravel-repo.repositories_directory') . '\\\\' . config('laravel-repo.criteria_directory');\n $this->criteriaBaseName = $this->argument('criteria_name');\n $this->namespace = $this->appNamespace . $directory;\n \n // create the criterion class\n $this->createCriterion();\n\n }", "title": "" }, { "docid": "c4cd4f3f6d108243f7dd44c321dd9d8c", "score": "0.59289265", "text": "public function handle()\n {\n $view = $this->argument('view');\n\n $allViews = empty($view);\n\n if ($allViews) {\n $views = $this->getAllViews();\n $this->allViewsResult = Collection::make();\n } else {\n $views = Collection::wrap($view);\n }\n\n $views->each(function ($view) use ($allViews) {\n $result = Analyze::view($view);\n\n if (! $result) {\n $this->error('view ['.$view.'] not found!');\n\n return;\n }\n\n if (! $allViews) {\n $this->outputOneView($result);\n } else {\n $this->allViewsResult->push([$result, $view]);\n }\n });\n\n if ($allViews) {\n $this->outputAllViews();\n }\n }", "title": "" }, { "docid": "3163c6ac6757e69d96439a2828e9e2ee", "score": "0.59260947", "text": "public function handle()\n {\n $details = $this->getDetails();\n $object = (object) $details;\n $admin = $this->profile->changePwd($object);\n $this->display();\n }", "title": "" }, { "docid": "f77d0fd86a265511f1633097e9557c63", "score": "0.5924136", "text": "public function handle()\n {\n $this->info(date('Y-m-d H:i:s').\"\\n\");\n $this->pic(100);\n $this->info(date('Y-m-d H:i:s').\"\\n\");\n }", "title": "" }, { "docid": "20f8f51063e9c5ed029ae3813e45794f", "score": "0.5924117", "text": "public function handle()\n {\n $this->info('Publishing the Permission database, and config files');\n $this->call('vendor:publish', [\n '--provider' => PermissionServiceProvider::class\n ]);\n\n $this->info('Migrating the database tables into your application');\n $this->call('migrate');\n\n $this->info('Successfully installed Permission! Enjoy');\n }", "title": "" } ]
fe1e91d68f84a49b5656394c68056023
Get View required for Rendering
[ { "docid": "894d197f45aa6c77bda8c11d7cc526d8", "score": "0.0", "text": "public function getView($token)\n {\n $render = new stdClass();\n $render->token = $token;\n $render->scheme = ucfirst(strtolower($token->type));\n $render->extension = new stdClass();\n $render->extension->title = ucfirst(strtolower($token->name));\n $render->extension->include_path = $this->getLocation($render->scheme, $render->extension->title);\n\n return $render;\n }", "title": "" } ]
[ { "docid": "19f982ca42f62383da44a9422ae3ffb4", "score": "0.7863101", "text": "public function getView()\n {\n return $this->view;\n }", "title": "" }, { "docid": "19f982ca42f62383da44a9422ae3ffb4", "score": "0.7863101", "text": "public function getView()\n {\n return $this->view;\n }", "title": "" }, { "docid": "19f982ca42f62383da44a9422ae3ffb4", "score": "0.7863101", "text": "public function getView()\n {\n return $this->view;\n }", "title": "" }, { "docid": "19f982ca42f62383da44a9422ae3ffb4", "score": "0.7863101", "text": "public function getView()\n {\n return $this->view;\n }", "title": "" }, { "docid": "19f982ca42f62383da44a9422ae3ffb4", "score": "0.7863101", "text": "public function getView()\n {\n return $this->view;\n }", "title": "" }, { "docid": "19f982ca42f62383da44a9422ae3ffb4", "score": "0.7863101", "text": "public function getView()\n {\n return $this->view;\n }", "title": "" }, { "docid": "bd48a571c827118db0ab14dac4415730", "score": "0.784899", "text": "public function getView() {\n return $this->view;\n }", "title": "" }, { "docid": "f2634b805b0daa8ca66bcd5dbbed121a", "score": "0.78228235", "text": "public function getView() {\r\n\t\treturn $this->_view;\r\n\t}", "title": "" }, { "docid": "2bd434cfaab93824383e935e3db6fde1", "score": "0.7788475", "text": "public function getView()\n {\n return $this->_view;\n }", "title": "" }, { "docid": "f73df7bda7f4467770bd11e67dfffbcd", "score": "0.7767268", "text": "final public function GetView(){\r\n\t\tif (file_exists($this->View)){\r\n\t\t\treturn $this->View ;\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn $this->ErrorView();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "3143925c06b13aa4d08d0177db9f3be5", "score": "0.75447404", "text": "public function view()\n {\n return $this->view;\n }", "title": "" }, { "docid": "356be898b2b48f0695241b450ade7603", "score": "0.7538406", "text": "public function getView(){\n \n return $this->_view;\n }", "title": "" }, { "docid": "8964f6c690cb7afc691560dc6b0cc3ef", "score": "0.7421646", "text": "public function renderView();", "title": "" }, { "docid": "20815979e3a484e5450811a89c2ec208", "score": "0.7420601", "text": "public function getView()\n {\n if ($this->_view === null) {\n /**\n * @see Zend_Controller_Action_HelperBroker\n */\n require_once 'Zend/Controller/Action/HelperBroker.php';\n \n $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');\n if ($viewRenderer->view === null) {\n $viewRenderer->initView();\n }\n $this->_view = $viewRenderer->view;\n }\n\n return $this->_view;\n }", "title": "" }, { "docid": "4f7212128879687d9a44ca3c54ae9281", "score": "0.7339376", "text": "public function getView()\n\t{\n\t\tif( !isset( $this->view ) ) {\n\t\t\tthrow new \\Aimeos\\Admin\\JsonAdm\\Exception( sprintf( 'No view available' ) );\n\t\t}\n\n\t\treturn $this->view;\n\t}", "title": "" }, { "docid": "d1a87cebe9996e0cf441aa51fc801fab", "score": "0.7325706", "text": "public function getView(): string\n {\n if (is_array($this->route['view']) === true) {\n return $this->route['view']['template'];\n } else {\n return $this->route['view'];\n }\n }", "title": "" }, { "docid": "a2b01c0a6764c4f3c2508abc7433ce7b", "score": "0.7293457", "text": "public function getView(): string\n {\n return (string)$this->view;\n }", "title": "" }, { "docid": "6f3134a2828a9413f79268967d805074", "score": "0.7269396", "text": "final public function getView()\n {\n return $this->module->getView();\n }", "title": "" }, { "docid": "885a041c35dd2e921b2ac6b5a08230ed", "score": "0.72631294", "text": "function viewGet() {\n\t\treturn $this->_view;\n\t}", "title": "" }, { "docid": "ed95687cd4d6cddf208a19117f710a91", "score": "0.72148716", "text": "public function getView()\n {\n if ($this->_view === null) {\n $this->_view = \\Yii::$app->getView();\n }\n\n return $this->_view;\n }", "title": "" }, { "docid": "ed95687cd4d6cddf208a19117f710a91", "score": "0.72148716", "text": "public function getView()\n {\n if ($this->_view === null) {\n $this->_view = \\Yii::$app->getView();\n }\n\n return $this->_view;\n }", "title": "" }, { "docid": "771b1b5f3c527bc5a787bd87f62a7f7b", "score": "0.7152324", "text": "private function getView() {\r\n\t\t\t$render = \\Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');\r\n\r\n\t\t\t// view not initialized?\r\n\t\t\tif (null === $render->view)\r\n\t\t\t\t$render->initView();\r\n\r\n\t\t\t// set the view\r\n\t\t\t$this->view = $render->view;\r\n\t\t}", "title": "" }, { "docid": "e73af8155145aa94b6cdc139748da86e", "score": "0.7087281", "text": "protected function getRenderedView()\n {\n try {\n /** @var \\Phalcon\\Mvc\\View $view */\n $view = \\Phalcon\\DI::getDefault()->get('view');\n } catch (\\Phalcon\\DI\\Exception $e) {\n throw new \\Vegas\\Mvc\\Exception;\n }\n\n $view->start();\n\n $level = $view->getCurrentRenderLevel();\n $view->setRenderLevel(\\Phalcon\\Mvc\\View::LEVEL_ACTION_VIEW);\n $view->render($this->config->getTemplate(), null);\n $view->setRenderLevel($level);\n\n $view->finish();\n\n return $view->getContent();\n }", "title": "" }, { "docid": "d61ef38e9a5d6d30a15e135a1ae29812", "score": "0.70380986", "text": "public function getView()\n {\n return Str::finish($this->getViewPath(), $this->getViewName());\n }", "title": "" }, { "docid": "78f49a455e5abedcb8aed3565645bdb4", "score": "0.70322466", "text": "public function getView()\r\n {\r\n return parent::getView();\r\n }", "title": "" }, { "docid": "03754245304c62b8a0c03994bc705c6d", "score": "0.70237076", "text": "public function getView()\n {\n if (!$this->view) {\n $format = $this->getParameter('format', $this->preferredContentTypeOutOf());\n\n switch ($format) {\n case self::CONTENT_TYPE_HTML:\n case self::FORMAT_HTML:\n $this->view = new HtmlView();\n\n break;\n case self::CONTENT_TYPE_JSON:\n case self::FORMAT_JSON:\n default:\n // JSONP?\n $callback = filter_var($this->getParameter('callback'), FILTER_SANITIZE_STRING);\n\n if ($callback) {\n $this->view = new JsonPView($callback);\n } else {\n $this->view = new JsonView();\n }\n }\n }\n\n return $this->view;\n }", "title": "" }, { "docid": "8c65fc116ce3ea4257b44f2fc001261f", "score": "0.69774055", "text": "public function getView()\n {\n return $this->v_outputView;\n }", "title": "" }, { "docid": "0fbac973da5289022c4bfc16ffc30621", "score": "0.6950018", "text": "public function getView()\n {\n $viewObject = new View($this->route,$this->layout, $this->view, $this->meta);//create\n $viewObject->render($this->data);\n }", "title": "" }, { "docid": "8ebe58c511efa3f1ad0a3a787c3daa42", "score": "0.69464546", "text": "public function getView()\n {\n return apply_filters('cuztom_field_view', $this->view, $this);\n }", "title": "" }, { "docid": "0bbd9137c664006b705582ce646b330b", "score": "0.69318444", "text": "public function getLoadedView(): string\n {\n return $this->loadedView;\n }", "title": "" }, { "docid": "b479565c9029c9de047a95d809002d63", "score": "0.6929222", "text": "public function getView()\n {\n $object = new View($this->route);\n $object->render($this->data);\n }", "title": "" }, { "docid": "a07f4a6b004d026711fb6ca4cc0c706b", "score": "0.6914903", "text": "public static function getView(){\n\t\t\treturn Timber::compile( \n\t\t\t\t'/classes/components/header/views/' \n\t\t\t\t. self::$spark_options['template']\n\t\t\t\t.'.html.twig', \n\t\t\t\tself::getContext() );\n\t\t}", "title": "" }, { "docid": "39aca7d267d412b19a63828770c42ee2", "score": "0.6902218", "text": "protected function _getView()\n\t{\n\t\tif ($viewInstance = Registry::get('view')) {\n\t\t\treturn $viewInstance;\n\t\t}\n\n\t\t$request = Agl::getRequest();\n\t\t$module = $request->getModule();\n\t\t$view = $request->getView();\n\n\t\t$viewPath = APP_PATH\n . Agl::APP_PHP_DIR\n . ViewInterface::APP_PHP_DIR\n . DS\n . $module\n . DS\n . $view\n . Agl::PHP_EXT;\n\n if (file_exists($viewPath)) {\n $className = $module . ucfirst($view) . ViewInterface::APP_VIEW_SUFFIX;\n $viewInstance = Agl::getInstance($className);\n } else {\n $viewInstance = new View();\n }\n\n $viewInstance->setFile($module . DS . $view);\n\n Registry::set('view', $viewInstance);\n\n return $viewInstance;\n\t}", "title": "" }, { "docid": "f70e521827cb65e5744f361d26333318", "score": "0.6899909", "text": "public function getView()\n {\n if (method_exists($this->module, 'getView')) {\n return $this->module->getView();\n }\n\n return parent::getView();\n }", "title": "" }, { "docid": "56146eb49c9c666e0d4da9c98f0ba511", "score": "0.68463796", "text": "public function getRender();", "title": "" }, { "docid": "cb98c5070c82d9b590fc069b75544dfb", "score": "0.6812159", "text": "public static function Get_View()\n {\n $DEFAULT_VIEW = 'blog';\n\n if(isset($_GET['view'])){\n $view = self::Make_Safe($_GET['view']);\n } else {\n $view = $DEFAULT_VIEW;\n }\n\n return $view;\n }", "title": "" }, { "docid": "e64ec7f2ca35908c1b90b31b3538c733", "score": "0.6804521", "text": "public function view_template_get()\n {\n return $this->_view_template;\n }", "title": "" }, { "docid": "6113bd6e3516819eb562266309048876", "score": "0.677669", "text": "abstract protected function getViewComponent(): string;", "title": "" }, { "docid": "1a6a88dddce0ba098a6aa9d861c7e9e0", "score": "0.67682314", "text": "function getCurrentView() {\n return $this->_currentView;\n }", "title": "" }, { "docid": "d6f207ebc2a75589c93e1959c51f25b8", "score": "0.67538697", "text": "public function getView()\n {\n // Instancies twig's environment\n $loader = new \\Twig_Loader_Filesystem(realpath(__DIR__.'/../../app/Views'));\n $twig = new \\Twig_Environment($loader, []);\n\n // Recovers the view generated by twig\n $this->view = $twig->render($this->view, $this->params);\n }", "title": "" }, { "docid": "a2f81df6eef5e72fb657acc54903b3a2", "score": "0.67171186", "text": "public function getDefaultView();", "title": "" }, { "docid": "2166763e764381c23a0c874bdd4ea659", "score": "0.67041624", "text": "public function getJaxonView()\n {\n return Container::getInstance()->getView();\n }", "title": "" }, { "docid": "0861485328e35b84ed117dd5e8ab02de", "score": "0.665548", "text": "public function view()\n {\n if (!$this->view instanceof View\\ViewInterface) {\n $this->setView(new View\\MustacheView());\n }\n return $this->view;\n }", "title": "" }, { "docid": "ce1bbe1216e6fbdddc8b5f6666320d9f", "score": "0.6653227", "text": "public function GetViewClass ();", "title": "" }, { "docid": "b3aa5d747f2c18aadbad948481b9180c", "score": "0.6633883", "text": "public function getViewRenderer()\n {\n return $this->_viewRenderer;\n }", "title": "" }, { "docid": "fc930b3715f36816cdfb0cbf0828693d", "score": "0.6618599", "text": "public function getViewHelper();", "title": "" }, { "docid": "30017fb081ab977382ea42ecaee302b2", "score": "0.66105103", "text": "public function viewRenderClass() {\n\t\t$viewClass = $this->_viewRender;\n\t\tif ($viewClass !== 'View') {\n\t\t\tlist($plugin, $viewClass) = pluginSplit($viewClass, true);\n\t\t\t$viewClass .= 'View';\n\t\t\tApp::uses($viewClass, $plugin . 'View');\n\t\t}\n\n\t\treturn new $viewClass(null);\n\t}", "title": "" }, { "docid": "33fce579174fb4f47814b3ce88034b5d", "score": "0.6606323", "text": "protected function getView()\n {\n if ($this->view) {\n return 'pcmn::content.form.fields.' . snake_case(lcfirst($this->view));\n }\n\n return 'pcmn::content.form.fields.' . snake_case(lcfirst(class_basename(get_class($this))));\n }", "title": "" }, { "docid": "e7898495b22f5b4f427dab1baad8de2a", "score": "0.66014415", "text": "public function view() {\n\t\t\tif (!$GLOBALS['sizzle']->apps['backend']->models['backend']->authenticate()) {\n \t\t\t$GLOBALS['sizzle']->utils->redirect('/backend/login', '<strong>Error:</strong> Please login to continue.');\n\t\t\t}\n\t\t\t// Authorize w/ backend app.\n\t\t\tif (!$GLOBALS['sizzle']->apps['backend']->models['backend']->authorize('galleries', 'view')) {\n \t\t\t$GLOBALS['sizzle']->utils->redirect('/backend', '<strong>Error:</strong> Insufficient user access.');\n\t\t\t}\n\t\t\t// Load view.\n\t\t\treturn $this->_loadView(dirname(__FILE__) .'/views/view.tpl');\n\t\t}", "title": "" }, { "docid": "d0ba01a302ac275b86e5c8f681f76c9d", "score": "0.6565094", "text": "public function getView()\r\n {\r\n if ($this->getStyle() == 'mvc') {\r\n $view = 'auth.register';\r\n } else {\r\n $view = new Register;\r\n }\r\n return $view;\r\n }", "title": "" }, { "docid": "980aa8d77acf5f822a026f8e6b7641e4", "score": "0.65622085", "text": "public function getViewType(): string;", "title": "" }, { "docid": "ec6359c573e918073fa7a784be8fcc83", "score": "0.652328", "text": "public function getViewPath()\n {\n return $this->view_path;\n }", "title": "" }, { "docid": "e6ad10881ce675f19304ebaf4868a4d0", "score": "0.651534", "text": "function get_view_name() {\n return App::getInstance()->getViewName();\n}", "title": "" }, { "docid": "9852231275665e44a04590ea828f39d1", "score": "0.6496967", "text": "public function renderView(){\r\n\t\tif( !$this->is_redirected && !$this->is_alredy_render ){\r\n\t\t\tif( $this->view->getFile() === null || $this->view->getFile() === false ){\r\n\t\t\t\t$this->view->render($this->view_content);\r\n\t\t\t}else{\r\n\t\t\t\t$this->view->render();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "907d886623a7b7d1f7c97d3af4ca0ac6", "score": "0.64822847", "text": "public static function getView(){\n $scriptPath = \"app/views\";\n $html = new View();\n $html->addBasePath($scriptPath);\n foreach(self::$scriptPaths as $path){\n $html->addBasePath($path);\n }\n\n return $html;\n }", "title": "" }, { "docid": "cc7446cb93d43abddd13191f769e751f", "score": "0.64787513", "text": "public function getView(): void\n {\n // Creating a view object and transferring data to it\n $viewObject = new View($this->route, $this->layout, $this->view, $this->meta);\n\n $viewObject->render($this->data);\n }", "title": "" }, { "docid": "2fdea26f3581c3d1b5fd90c18cac755f", "score": "0.6465809", "text": "private function getView( ){\n\t\t\n\t\t$viewActionPath \t\t= 'modules' . DS . $this->_module . DS . 'views' . DS . $this->_controller . DS . $this->_action;\n\t\t\n\t\t/* @var $content Partial */\n\t\t$partial \t\t\t\t\t\t\t\t= new Partial( $viewActionPath );\n\t\t$partial->router \t\t\t\t\t\t= $this;\n\t\t$this->getTemplate()->contentAction \t= $partial;\n\t}", "title": "" }, { "docid": "826f81141498fcab8584aee596f70e83", "score": "0.6454514", "text": "public function getView($viewname);", "title": "" }, { "docid": "fe3206d81ca3000f2f61d41a8981e59c", "score": "0.64491826", "text": "abstract protected function view();", "title": "" }, { "docid": "60bfc928f0ad24a83d87edfa62d532fc", "score": "0.63930047", "text": "public function getFinalViewName() {\n return get_class($this->view);\n }", "title": "" }, { "docid": "79314df65c8fcd35cd520fb56322f6a6", "score": "0.6385961", "text": "public function getViewBaseClass()\n {\n \treturn 'yii\\\\web\\\\View';\n }", "title": "" }, { "docid": "568f788a2511908f76b9528a776d5707", "score": "0.6382827", "text": "function render()\n {\n return app(Mods\\View\\Factory::class)->render();\n }", "title": "" }, { "docid": "091a3f2b26d089e9d2bde46d4610ebd2", "score": "0.63809043", "text": "protected function loadView()\n {\n }", "title": "" }, { "docid": "f0ee06e2ee5087327e35e53e508095fa", "score": "0.63717884", "text": "public function getRootView()\n {\n return $this->_rootView;\n }", "title": "" }, { "docid": "e9faf8e902fbbbad975d8234f8386dcc", "score": "0.63693357", "text": "public function renderView($anAction=null) {\n\t\tif ($anAction=='_blank')\n\t\t\treturn;\n\t\tif (!$this->bHasBeenSetup)\n\t\t\tthrow new BadMethodCallException(__CLASS__.'::setup() must be called first.');\n\t\tif (empty($anAction))\n\t\t\t$anAction = $this->action;\n\t\t$recite =& $this->scene; $v =& $recite; //$this->scene, $recite, $v are all the same\n\t\t$myView = $recite->getViewPath($recite->actor_view_path.$anAction);\n\t\tif (file_exists($myView))\n\t\t\tinclude($myView);\n\t\telse {\n\t\t\t$theAppView = $recite->getViewPath($recite->view_path.$anAction);\n\t\t\tif (file_exists($theAppView))\n\t\t\t\tinclude($theAppView);\n\t\t\telse\n\t\t\t\tthrow new FourOhFourExit(str_replace(BITS_ROOT,'',$myView));\n\t\t}\n\t}", "title": "" }, { "docid": "f7586285ce94ed19ba25a4187ca2fc56", "score": "0.63380283", "text": "public function render()\n {\n $view = new View();\n $viewDir = dirname(__FILE__) . '/views/';\n $view->setViewsDir($viewDir);\n // set vars\n $view->develop = $this;\n $content = $view->getRender('toolbar', 'index');\n return $content;\n }", "title": "" }, { "docid": "a66de5c0b32ba3e20e006fb25b5754b5", "score": "0.6334423", "text": "function view() {\n // Check for view implementations\n\n if (!empty($this->router->view_action) && is_file(\"themes/{$this->theme}/views/{$this->router->view_controller}/{$this->router->view_action}.php\")) {\n // Current theme controller/action\n $this->router->calculated_view = \"themes/{$this->theme}/views/{$this->router->view_controller}/{$this->router->view_action}.php\";\n } elseif (!empty($this->router->view_action) && is_file(\"themes/default/views/{$this->router->view_controller}/{$this->router->view_action}.php\")) {\n // Default theme controller/action\n $this->router->calculated_view = \"themes/default/views/{$this->router->view_controller}/{$this->router->view_action}.php\";\n } elseif (is_file(\"themes/{$this->theme}/views/{$this->router->view_controller}.php\")) {\n // Current theme controller\n $this->router->calculated_view = \"themes/{$this->theme}/views/{$this->router->view_controller}.php\";\n } elseif (is_file(\"themes/default/views/{$this->router->view_controller}.php\")) {\n // Default theme controller\n $this->router->calculated_view = \"themes/default/views/{$this->router->view_controller}.php\";\n } elseif (is_file(\"themes/{$this->theme}/views/index/error.php\")) {\n // 404 from current theme\n $this->router->calculated_view = \"themes/{$this->theme}/views/index/error.php\";\n $this->router->args = array(1 => 404);\n } elseif (is_file(\"themes/default/views/index/error.php\")) {\n // 404 from default theme\n $this->router->calculated_view = \"themes/default/views/index/error.php\";\n $this->router->args = array(1 => 404);\n } else {\n // Time to panic\n $this->router->calculated_view = '';\n header('HTTP/1.0 404 Not Found');\n $this->message['error'] = \"Neither page nor errorpage found.\";\n }\n\n if (empty($this->theme)) { // No wireframe, do raw output\n $this->outputView();\n return;\n } elseif (is_file(\"themes/{$this->theme}/wireframe.php\")) { // Check current theme for wireframe\n $wireframe = \"themes/{$this->theme}/wireframe.php\";\n } elseif (is_file(\"themes/default/wireframe.php\")) { // Check default theme for wireframe\n $wireframe = \"themes/default/wireframe.php\";\n } else { // Time to panic\n header('HTTP/1.0 404 Not Found');\n die(\"No themes found.\");\n }\n\n include $wireframe;\n }", "title": "" }, { "docid": "4e1df67132e863c4467191a3b152aabe", "score": "0.6328773", "text": "public function getFrontendView(){\n\t\treturn $this->getUseFrontend() && $this->getData('frontend_view');\n\t}", "title": "" }, { "docid": "8170125c72e985cba9b1b94bd368428f", "score": "0.6317039", "text": "public function getViewObject(){\n\t\treturn $this->m_viewObject;\n\t}", "title": "" }, { "docid": "18a2a0e7b44321e327fe052075c058d6", "score": "0.63124734", "text": "protected function loadView()\n{\n}", "title": "" }, { "docid": "34525127b1459b3e8a168b5facf2d128", "score": "0.6301024", "text": "protected function _getView()\n\t{\n\t\t$view = new Zend_View();\n\t\t$view->addBasePath(dirname(dirname(dirname(__FILE__))) . '/plugins/' . ucfirst($this->_name) . '/views/');\n\n\t return $view;\n\t}", "title": "" }, { "docid": "840252dabc9e35a7d768ecf7f51254be", "score": "0.6298097", "text": "protected function resolveView()\n {\n $viewObjectName = self::JSON_VIEW;\n $view = $this->objectManager->get($viewObjectName);\n return $view;\n }", "title": "" }, { "docid": "883aeb5f12405b4154000b56d4e0adfd", "score": "0.6290104", "text": "protected function _renderView()\n\t{\n\t\t$isCacheEnabled = Agl::app()->isCacheEnabled();\n\n\t\tif ($isCacheEnabled) {\n\t\t\t$cacheInfo = $this->_getCacheInfo();\n\n\t\t\tif (! empty($cacheInfo)\n\t\t\t\tand $cacheInstance = Agl::getCache()\n\t\t\t\tand $cacheInstance->has($cacheInfo[CacheInterface::CACHE_KEY])) {\n\t\t\t\treturn $cacheInstance->get($cacheInfo[CacheInterface::CACHE_KEY]);\n\t\t\t}\n\t\t}\n\n $viewModel = $this->_getView();\n\n\t\t$content = $viewModel\n\t\t\t->startBuffer()\n\t\t\t->render();\n\n\t\tif ($isCacheEnabled and ! empty($cacheInfo)) {\n \t$cacheInstance->set($cacheInfo[CacheInterface::CACHE_KEY], $content, $cacheInfo[ConfigInterface::CONFIG_CACHE_TTL_NAME]);\n\t\t}\n\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "2b64252e6f6f5d5cfd9d51929fbbffb0", "score": "0.6286097", "text": "public function getCurrentView()\r\n {\r\n return \\Dsc\\ArrayHelper::get($this->dsc_theme, 'views.current');\r\n }", "title": "" }, { "docid": "3820538af326703b9712eb8b0f9b949c", "score": "0.62856656", "text": "public function getView($view_name=NULL)\n {\n return parent::getView('formaction/failed');\n }", "title": "" }, { "docid": "d23477ac0acfc70d63818a9ed8840f14", "score": "0.6281659", "text": "protected function view()\n {\n return $this->app->make(ViewFactory::class);\n }", "title": "" }, { "docid": "65a5132e97d7983429642d60f3ea0200", "score": "0.6275131", "text": "abstract public function view();", "title": "" }, { "docid": "8d68d7222580198905b65c58f661c975", "score": "0.62473786", "text": "static public function getCurrentViewInstance($failSafe=false){\n\t\t$livingView = call_user_func(array(self::$defaultViewClass,'hasLivingInstance'),true);\n\t\tif( $livingView instanceof viewInterface)\n\t\t\treturn $livingView;\n\t\tif(! $failSafe)\n\t\t\treturn null;\n\t\t#- failsafe and get an empty view with viewDirs correctly set\n\t\t$view = call_user_func(array(self::$defaultViewClass,'getInstance'));\n\t\tforeach(self::$defaultViewDirs as $d)\n\t\t\t$view->addViewDir($d);\n\t\treturn $view;\n\t\t#- failsafe and get a view from default controller\n\t\t#- ~ $controller = (defined('DEFAULT_DISPATCH')?preg_replace('!:.*$!','',DEFAULT_DISPATCH):'default').'Controller';\n\t\t#- ~ $controller = new $controller;\n\t\t#- ~ return $controller->view;\n\t}", "title": "" }, { "docid": "34d00193e5e7724fb4ab3a3556b308ff", "score": "0.6244444", "text": "protected function getView()\n {\n return 'cms-models::model.partials.form.strategies.datepicker-range';\n }", "title": "" }, { "docid": "909baaf0b4f4f099c4f70a28a0a86c8b", "score": "0.62421554", "text": "protected function resolveViewObjectName() {\n\n \t// we get view from TS settings?\n \t$viewClassName = $this->resolveTsDefinedViewClassName();\n \tif($viewClassName) {\n\t\t\treturn $viewClassName;\n\t\t} \n\t\t\n\t\t// we get view from controller and action\n\t\t$viewClassName = parent::resolveViewObjectName();\n \t\tif($viewClassName) {\n\t\t\treturn $viewClassName;\n\t\t}\n\t\t\n\t\t// we take default view\n\t\telse {\n\t\t\treturn 'Tx_PtExtlist_View_BaseView';\n\t\t}\n }", "title": "" }, { "docid": "02bd4df01fe4a8793ee9a19238941a0d", "score": "0.6222477", "text": "public function render() {\n\t\techo $this->_view;\n\t}", "title": "" }, { "docid": "673bc1af9d8e2988325f6f840f8eff34", "score": "0.6214334", "text": "public abstract function getView($game);", "title": "" }, { "docid": "1cbb71e772be1d0bbb555d0d20c09b3d", "score": "0.62073535", "text": "public static function getViewName() {\n \n }", "title": "" }, { "docid": "63efc110718973d19ec180ee493632c5", "score": "0.6201073", "text": "protected function renderOutput() {\n if( view()->exists( config('settings.path_folder_frontend').$this->_template_view_name ) ) {\n return view( config('settings.path_folder_frontend').$this->_template_view_name, [\n 'vars_for_template_view' => $this->_vars_for_template_view,\n 'keywords' => $this->_keywords,\n 'meta_description' => $this->_meta_description,\n 'author' => $this->_author,\n 'title' => $this->_title,\n ] )->render();\n }\n else { abort(404); }\n }", "title": "" }, { "docid": "782c1a1487e93899b22af3aea72aa090", "score": "0.61928546", "text": "public function renderView() {\r\n\t\t\r\n\t\t// Check if files exist in directories\r\n\t\t$this->_pathToView = scandir($this->_pathToView);\r\n\t\t$this->_pathToModel = scandir($this->_pathToModel);\r\n\t\t\r\n\t\t// If get view & not empty\r\n\t\tif(isset($_GET['view']) && !empty($_GET['view'])) {\r\n\t\t\t\r\n\t\t\t// Get the file view.php in directories\r\n\t\t\tif(in_array($_GET['view'].'.php',$this->_pathToView)){\r\n\t\t\t\t$view = $_GET['view'];\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$view = \"error\";\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t// If not, get the default view home\r\n\t\telse {\r\n\t\t\t$view = 'home';\r\n\t\t}\r\n\t\t\r\n\t\t// Get the model file view..class.php in directories\r\n\t\tif(in_array($view.'.class.php',$this->_pathToModel)) {\r\n\t\t\tinclude('./model/'.$view.'.class.php');\r\n\t\t}\r\n\t\t\r\n\t\tinclude $this->_pathToTemplate.'default.php';\r\n\t\t\t\t\r\n\t}", "title": "" }, { "docid": "404f4e5b12fb211084744403cfdcb3bd", "score": "0.61846584", "text": "public function getView()\n {\n return $this->hasOne(View::className(), ['product_id' => 'id']);\n }", "title": "" }, { "docid": "e8c5f001d7d69109b82185d3f99ed619", "score": "0.61703706", "text": "public function getViewPath()\n {\n $class = new ReflectionClass($this);\n return dirname($class->getFileName()) . DIRECTORY_SEPARATOR . 'views';\n }", "title": "" }, { "docid": "3fec8f9efcaff012795e263ea4bd892f", "score": "0.6165537", "text": "public function view(){\n $this->share();\n\n $args = func_get_args();\n\n return call_user_func_array('view', $args);\n }", "title": "" }, { "docid": "e7d42d72a7ca82e6e740fce78050e13c", "score": "0.6165431", "text": "public function getViewInfo (){\r\n\t\t$viewObj = Config::getView($this->req_key);\r\n\t\tif (!empty($viewObj[\"extends\"])) {\r\n\t\t\t$viewData = array($viewObj[\"extends\"],$viewObj[\"view\"]);\r\n\t\t\t$viewStr= implode(\"|\",$viewData);\r\n\t\t} else {\r\n\t\t\t$viewStr=$viewObj[\"view\"];\r\n\t\t}\r\n\t\t$viewInfo = array($viewStr,$viewObj[\"type\"]);\r\n\t\t$this->log->write(\"VIEW IS: \".$viewObj[\"view\"].\" +++++++++++++++++++++++++++++++++++++++++++++\");\r\n\t\treturn $viewInfo;\r\n\t}", "title": "" }, { "docid": "000683ac1b758b8435c26b1225a9f4c9", "score": "0.61649054", "text": "protected function _getView() {\n // If no route found, render the 404 error page.\n if ($this->routeName === null) {\n return $this->_getErrorView(404);\n }\n\n // Retrieve the route config.\n $config = $this->_routes[$this->routeName];\n\n // Check if it’s a redirection.\n if (isset($config[\"redirect\"])) {\n $url = $config[\"redirect\"];\n if (ENV !== \"local\" && substr($url, 0, 4) !== \"http\") {\n $url = $this->getSetting(\"baseUrl\", \"\") . $url;\n }\n header(\"Location: {$url}\");\n die;\n }\n\n // Check if there’s a view configured.\n // It can be a callable or the name of a View class (string).\n if (isset($config[\"view\"])) {\n return is_callable($config[\"view\"]) ? $config[\"view\"] : new $config[\"view\"]();\n }\n\n // Otherwise check if a template is defined, verifying that the file exists.\n // Finally, if template is defined, check if a template exists with the route name.\n $template = null;\n if (isset($config[\"template\"])) {\n if ($this->templateExists($config[\"template\"])) {\n $template = $config[\"template\"];\n }\n } elseif ($this->templateExists($this->routeName)) {\n $template = $this->routeName;\n }\n\n // If a template that exists has been found, return a default View to render it.\n if ($template) {\n return new View($template);\n }\n\n // If the route is wrong, render the 500 error page.\n $message = \"Wrong configuration for '{$this->routeName}' in routes.\";\n trigger_error($message);\n minishRender500();\n }", "title": "" }, { "docid": "dabb2fb5bb88afd98b1cbf53c2f27b3c", "score": "0.6158814", "text": "public function get_view_path(){\n return APP_PATH.'/views/'.$this->_class;\n }", "title": "" }, { "docid": "55f900df202b9cde06a5e3ef5cbc9582", "score": "0.6147984", "text": "private function render($view){\n\n // TODO: define behaviour if @extend not defined in view\n return require __DIR__.'/../views/layouts/'.$view['extends'].'.phtml';\n\n }", "title": "" }, { "docid": "8318842847aa8b68aea40a7faadf42b3", "score": "0.61467534", "text": "public function render()\n {\n try {\n return view($this->getLayout(), $this->parseViewParameters())->render();\n } catch (\\Exception $e) {\n $previousHandler = set_exception_handler(function () {\n });\n restore_error_handler();\n call_user_func($previousHandler, $e);\n die;\n }\n }", "title": "" }, { "docid": "81da515b3fa3892f5b018144bb2830ca", "score": "0.6145983", "text": "function getViewMode()\n\t{\n\t\treturn ilContainer::VIEW_BY_TYPE;\n\t}", "title": "" }, { "docid": "6a37899fb0cd0790d05e20b6bb81e933", "score": "0.6136786", "text": "public function getDefaultView ()\r\n\t{\r\n\t\treturn View::SUCCESS;\r\n\t}", "title": "" }, { "docid": "a665a6797576835e6b2527136af3f1af", "score": "0.61339766", "text": "public static function getViewDriver() {\n \n }", "title": "" }, { "docid": "181acb2e5421a4d725217030a4cafc63", "score": "0.6133791", "text": "public function getPathView() {\n return APPPATH . 'views/' . $this->getPathRoot();\n }", "title": "" }, { "docid": "181acb2e5421a4d725217030a4cafc63", "score": "0.6133791", "text": "public function getPathView() {\n return APPPATH . 'views/' . $this->getPathRoot();\n }", "title": "" }, { "docid": "e392f8d87f3623c67ad18da2486c113e", "score": "0.6115665", "text": "public function getSetup()\n {\n $this->view->showSetup();\n return $this->view;\n }", "title": "" }, { "docid": "bc5bfb3f07030fb7e0eb0647f1c2c46d", "score": "0.61133623", "text": "function view_path(): string\n {\n return App::getViewPath();\n }", "title": "" }, { "docid": "0044f41a6561d405c88c904b8769860d", "score": "0.6100268", "text": "public function setup_view();", "title": "" } ]
2e1a3773532fc29dbe6632ddceaf43f6
Get Google API key, for childclasses
[ { "docid": "6d39bd714e1055c13763dbfc60a05759", "score": "0.64806813", "text": "protected function getKey()\n {\n return $this->apiKey;\n }", "title": "" } ]
[ { "docid": "2ef285df3e7265a6384289e72a264f99", "score": "0.7708333", "text": "function _udyux_google_api_key() {\n return get_field('google_api_key', 'options');\n}", "title": "" }, { "docid": "8e94158193d424addaf9b4242bdd19c8", "score": "0.76249105", "text": "function et_get_google_api_key() {\n\t/**\n\t * Get your Google API Credentials from https://console.developers.google.com/apis/\n\t * Make sure to set up restrictions so that the key can only be used from certain HTTP Referrers.\n\t */\n\t$google_api_key = 'as';\n\n\t/**\n\t * Filter the Google API Key.\n\t * @param string $google_api_key\n\t * @return string\n\t */\n\t$google_api_key = apply_filters( 'et_google_api_key', $google_api_key );\n\n\treturn $google_api_key;\n}", "title": "" }, { "docid": "c6bcd1f65b9d124aa41258294b308e6e", "score": "0.69993657", "text": "public function getGoogleMapApiKey()\n {\n $storeId = Mage::app()->getStore()->getStoreId();\n return Mage::getStoreConfig('onestepcheckout/general/api_key',$storeId);\n }", "title": "" }, { "docid": "411944abe80801b3218c7c43856b2540", "score": "0.66534495", "text": "function setAPIKey($key)\n {\n $this->google_api_key = $key;\n }", "title": "" }, { "docid": "db2f1419c5ab3ea52184fb4d2e84d664", "score": "0.66447425", "text": "public static function get_google_maps_js_api_key(): string {\n\t\treturn self::get_constant_value( 'SIW_GOOGLE_MAPS_JS_API_KEY', '' );\n\t}", "title": "" }, { "docid": "594ba91b5e1a0d0423af7907e7252531", "score": "0.6560854", "text": "public function get_api_key() {\n\t\treturn $this->_api_key;\n\t}", "title": "" }, { "docid": "cf350e58998cfa95dfbe84da7341f7b8", "score": "0.6557939", "text": "public function get_api_key() {\n\t\treturn $this->apikey;\n\t}", "title": "" }, { "docid": "09255efb3d32a26cd2f5e526dd0edcbb", "score": "0.65501857", "text": "public function get_api_key()\n\t{\n\t\treturn $this->apikey;\n\t}", "title": "" }, { "docid": "4adefa4c4bf4617c5fda31e243b3537c", "score": "0.6505989", "text": "public function getAPIKey()\n {\n return $this->api_key;\n }", "title": "" }, { "docid": "f4294c59f86f5a04ff3d03fffeb5f2c0", "score": "0.64414257", "text": "public function getAPIKey()\n {\n return Mage::getStoreConfig('kiosked/account_settings/api_key');\n }", "title": "" }, { "docid": "e40c785e8e57cbf5c60d2fa4b1ffa9b8", "score": "0.64392996", "text": "public function getApi_key(): string {\n return $this->api_key ?? \"\";\n }", "title": "" }, { "docid": "999077c8b0f3512514ab8502913ecc60", "score": "0.64187104", "text": "function get_gmaps_api_key()\n{\n return 'AIzaSyCfDxwoigWRerVQMojFfT6nk0MMOYsz8XA';\n}", "title": "" }, { "docid": "86cadaac8aa0775c7eb8955cdba97c92", "score": "0.640924", "text": "public function getAPIKey()\n {\n return $this->APIKey;\n }", "title": "" }, { "docid": "43da31d528d0008350321f3121df8a1a", "score": "0.637576", "text": "public function getAuthKey()\n {\n }", "title": "" }, { "docid": "43da31d528d0008350321f3121df8a1a", "score": "0.637576", "text": "public function getAuthKey()\n {\n }", "title": "" }, { "docid": "43da31d528d0008350321f3121df8a1a", "score": "0.637576", "text": "public function getAuthKey()\n {\n }", "title": "" }, { "docid": "43da31d528d0008350321f3121df8a1a", "score": "0.637576", "text": "public function getAuthKey()\n {\n }", "title": "" }, { "docid": "43da31d528d0008350321f3121df8a1a", "score": "0.637576", "text": "public function getAuthKey()\n {\n }", "title": "" }, { "docid": "43da31d528d0008350321f3121df8a1a", "score": "0.637576", "text": "public function getAuthKey()\n {\n }", "title": "" }, { "docid": "43da31d528d0008350321f3121df8a1a", "score": "0.637576", "text": "public function getAuthKey()\n {\n }", "title": "" }, { "docid": "43da31d528d0008350321f3121df8a1a", "score": "0.637576", "text": "public function getAuthKey()\n {\n }", "title": "" }, { "docid": "ddbccb0ac734a849c411532ef81f1382", "score": "0.63692707", "text": "public function getAuthKey(): string;", "title": "" }, { "docid": "5685322d6315dec0d88b3e6922e999fa", "score": "0.6333951", "text": "public function getApiKey(): string\n {\n return $this->apiKey;\n }", "title": "" }, { "docid": "d046e090fdcd571aa246da84e973ce16", "score": "0.63185424", "text": "public function getAPIkey()\n {\n return $this->apiKey;\n }", "title": "" }, { "docid": "c67572d051f7cf870037a6e0ca040112", "score": "0.6274442", "text": "function blargo_api_key_key() {\n return 'Broadstreet_API_Key'; \n}", "title": "" }, { "docid": "ea074395cd6b27c3deddcc4d6ed41170", "score": "0.62667423", "text": "public function getAuthKey(){\n }", "title": "" }, { "docid": "9de35e52d167483564077f9cd49cbace", "score": "0.6239836", "text": "public static function getApiKey()\n {\n return self::$apiKey;\n }", "title": "" }, { "docid": "97b926c1ad491e7d22767dd8960e0727", "score": "0.62343377", "text": "public function getApiKey()\n {\n return $this->api_key;\n }", "title": "" }, { "docid": "97b926c1ad491e7d22767dd8960e0727", "score": "0.62343377", "text": "public function getApiKey()\n {\n return $this->api_key;\n }", "title": "" }, { "docid": "39b50da21a44ddb92f7e5dad777f2cc5", "score": "0.61989385", "text": "function getClient() {\n $client = new Google_Client();\n $client->setDeveloperKey('AIzaSyAwlujIEYdHghcpposU4F61jcfgJHqHkb8');\n \n return $client;\n}", "title": "" }, { "docid": "e96404fc1fd32e0accab76a7fe073147", "score": "0.61876374", "text": "public function getApiKey() {\n return $this->apikey;\n }", "title": "" }, { "docid": "16151bab3f4527c3e5d91cba2375bed0", "score": "0.61625993", "text": "function getClassKey(){\n static $classkey;\n if (!$classkey) {\n $classkey = sprintf('.%s', $this->getClass());\n }\n return $classkey;\n }", "title": "" }, { "docid": "ed4b1c171c94e01426c858076c11680d", "score": "0.615651", "text": "protected function getApiKey() : string\n\t{\n\t\treturn $this->apiKey;\n\t}", "title": "" }, { "docid": "5d6d40bfe32ed2534858beb10ac094d0", "score": "0.6153915", "text": "private function getKey()\n {\n $key = env('YOUTUBE_KEY');\n\n if (is_string($key) && !empty($key))\n {\n return $key;\n }\n\n // if no key found\n throw new \\Exception('Google API key is Required, please visit https://console.developers.google.com/');\n }", "title": "" }, { "docid": "9372d19cabc1ccd245fe92369ee3e0e9", "score": "0.6139011", "text": "public static function getApiKey()\n {\n return self::$apiKey;\n }", "title": "" }, { "docid": "9372d19cabc1ccd245fe92369ee3e0e9", "score": "0.6139011", "text": "public static function getApiKey()\n {\n return self::$apiKey;\n }", "title": "" }, { "docid": "b7c5a5473ec7c446a3f3bf08ffc2f9a1", "score": "0.6094499", "text": "function rtmedia_transcoding_get_api_key_id() {\n\treturn 'rtmedia-encoding-api-key';\n}", "title": "" }, { "docid": "aac376e5e2aa1453df2610b3f0f7e696", "score": "0.6088397", "text": "function getPackageKey() ;", "title": "" }, { "docid": "e92dd86b87f1009116afbf4d79e508d0", "score": "0.60642725", "text": "public function getJsonWebKey(): string;", "title": "" }, { "docid": "d6ebb94ce806844100c5b637bd5a0cd3", "score": "0.6052803", "text": "function getKey(){\n\t\techo \"AIzaSyDD136-luRsb0FaoghQnQLCSF_nZXhzrhE\";\n\t}", "title": "" }, { "docid": "3bbf4a6a5e28cdbf2570f0bb9ad024ae", "score": "0.60503507", "text": "public function getApiKey(){\n return $this->scopeConfig->getValue('api53/settings/api_key',\n ScopeInterface::SCOPE_STORE);\n }", "title": "" }, { "docid": "a56d40d817812d5a97aac523ffa5dacf", "score": "0.6040015", "text": "private function getAuthKey() {\n\t\t$options = get_option( 'rcMC_options' );\n\t\t\n\t\t//return API key\n\t\treturn esc_html( $options[ 'api_key' ] );\n\t}", "title": "" }, { "docid": "199ee72a6c8865fa9582d8019c862acf", "score": "0.6025674", "text": "public function getPackageKey() {}", "title": "" }, { "docid": "08e4171b3d0d9190edd4bcb89f32703e", "score": "0.6024511", "text": "public function getApiKey(): string\n {\n return $this->config['api_key'];\n }", "title": "" }, { "docid": "6503587de877f7fcd03e07799db44547", "score": "0.602233", "text": "public function API_KEY($value);", "title": "" }, { "docid": "a914a49333f57e9c570e76f16b96ff0a", "score": "0.5988103", "text": "function getApiKey() { \n return Services_Facebook::$apiKey; \n }", "title": "" }, { "docid": "5f82b02920e4c75adcb0551dd2339135", "score": "0.5978837", "text": "public function getApiKey()\n {\n return $this->apiKey;\n }", "title": "" }, { "docid": "5f82b02920e4c75adcb0551dd2339135", "score": "0.5978837", "text": "public function getApiKey()\n {\n return $this->apiKey;\n }", "title": "" }, { "docid": "5f82b02920e4c75adcb0551dd2339135", "score": "0.5978837", "text": "public function getApiKey()\n {\n return $this->apiKey;\n }", "title": "" }, { "docid": "5f82b02920e4c75adcb0551dd2339135", "score": "0.5978837", "text": "public function getApiKey()\n {\n return $this->apiKey;\n }", "title": "" }, { "docid": "5f82b02920e4c75adcb0551dd2339135", "score": "0.5978837", "text": "public function getApiKey()\n {\n return $this->apiKey;\n }", "title": "" }, { "docid": "5f82b02920e4c75adcb0551dd2339135", "score": "0.5978837", "text": "public function getApiKey()\n {\n return $this->apiKey;\n }", "title": "" }, { "docid": "86c6fd28c7dd06d7bb0313a13db1d6d5", "score": "0.5973241", "text": "public function getApiKey()\n {\n try {\n return Mage::getStoreConfig('stacc_recommender/stacc_recommender/stacc_api_key', $this->getStore());\n } catch (Exception $exception) {\n Mage::helper('recommender/logger')->logCritical(\"Helper/Environment->getApiKey() Exception: \", array(get_class($exception), $exception->getMessage(), $exception->getCode()));\n return \"\";\n }\n }", "title": "" }, { "docid": "f6b17a1127ddc5c306df2d097f5c859e", "score": "0.5958137", "text": "public function getApiKey() {\n\t\treturn $this->apiKey;\n\t}", "title": "" }, { "docid": "f6b17a1127ddc5c306df2d097f5c859e", "score": "0.5958137", "text": "public function getApiKey() {\n\t\treturn $this->apiKey;\n\t}", "title": "" }, { "docid": "ad8f4dc2f9ea11c669f6f0f63249c54f", "score": "0.5957976", "text": "public function model()\n {\n return ApiKey::class;\n }", "title": "" }, { "docid": "ec46d3e2b0214e487a463c739645ad4a", "score": "0.59115666", "text": "public function getAuthKey()\n {\n return $this->id;\n }", "title": "" }, { "docid": "26601053b45b64797e1ebb522028030c", "score": "0.5906193", "text": "public function getApiKey()\n {\n return (string)$this->apiKey;\n }", "title": "" }, { "docid": "86ece1db68872b1542e9b78c95f848fd", "score": "0.5894142", "text": "public function getAuthKey()\n {\n // TODO: Implement getAuthKey() method.\n }", "title": "" }, { "docid": "86ece1db68872b1542e9b78c95f848fd", "score": "0.5894142", "text": "public function getAuthKey()\n {\n // TODO: Implement getAuthKey() method.\n }", "title": "" }, { "docid": "e2321bfeb2e3b5b36d0ed7d78508f80a", "score": "0.589395", "text": "public function getPackageKey();", "title": "" }, { "docid": "e2321bfeb2e3b5b36d0ed7d78508f80a", "score": "0.589395", "text": "public function getPackageKey();", "title": "" }, { "docid": "bfebf4c9d2f68f96afec756601477f37", "score": "0.58914614", "text": "public function getClassKey()\n\t{\n\n\t\treturn $this->class_key;\n\t}", "title": "" }, { "docid": "fa05f38f636e9fa1e303b86a95e02a65", "score": "0.5846381", "text": "public function getApiKey()\n {\n return $this->config->getApiKey();\n }", "title": "" }, { "docid": "8640bfa56a633e989a67916bd83b0882", "score": "0.5833292", "text": "public function getApiKey()\n {\n return $this->getParameter('apiKey');\n }", "title": "" }, { "docid": "8640bfa56a633e989a67916bd83b0882", "score": "0.5833292", "text": "public function getApiKey()\n {\n return $this->getParameter('apiKey');\n }", "title": "" }, { "docid": "fc64124759dfe4aa1d355718914f7774", "score": "0.58271027", "text": "public function getServiceKey() {}", "title": "" }, { "docid": "fc64124759dfe4aa1d355718914f7774", "score": "0.5824868", "text": "public function getServiceKey() {}", "title": "" }, { "docid": "7f142bda6906f9b01ecad0e0abd74a9f", "score": "0.58207655", "text": "public function getAppKey()\n\t{\n\t\treturn $this->_key;\n\t}", "title": "" }, { "docid": "17eaf092a92109b093ebbcc229173adc", "score": "0.57989466", "text": "public function get_app_key()\n {\n return $this->_app_key;\n }", "title": "" }, { "docid": "802278833876f890496b8ed499351060", "score": "0.57732993", "text": "public function getAuthKey()\n {\n // return $this->authKey;\n }", "title": "" }, { "docid": "ea91c408725c8fc31b4c787b2c967bc3", "score": "0.57701844", "text": "private function key(): string\n {\n return 'laravel-api-checker.' . $this->checker->id();\n }", "title": "" }, { "docid": "2da987fe34c1def8744c8f2af4738630", "score": "0.5747926", "text": "public function generateApiKey()\n {\n $this->apiKey = StringHelper::generateKey();\n }", "title": "" }, { "docid": "fe912d5c06f1df253eec1fb5b986822f", "score": "0.5741956", "text": "public function key()\n {\n return new Key($this->client);\n }", "title": "" }, { "docid": "b25bb228a2f9f1a3da2de8ae45241b4e", "score": "0.57346946", "text": "public function getGoogleBaseOfferId()\n {\n\t\treturn $this->getItemGoogleShoppingId();\n\t}", "title": "" }, { "docid": "08d5851073ff9e11131a64fda5029679", "score": "0.5714838", "text": "protected static function getResourceKey()\n {\n $resource = self::getInstance();\n if (in_array(get_class($resource), self::$classesToUsePublicKey)) {\n return $resource->_publickey;\n }\n\n return $resource->_secretkey;\n }", "title": "" }, { "docid": "63322c98848d0eb0b0d231a93b0865de", "score": "0.57135504", "text": "public function model(): string\n {\n return Apikey::class;\n }", "title": "" }, { "docid": "b6d0c1eec4849754117c7c025f1f4423", "score": "0.5683347", "text": "public function getAppKey()\n {\n return $this->config->getAppKey();\n }", "title": "" }, { "docid": "5fac1ae33061599a91fb043240ae5648", "score": "0.56822425", "text": "public function getV2ApiClientId();", "title": "" }, { "docid": "ad0cbe56dd171a22c6da9d92225f2741", "score": "0.5679678", "text": "function getClassKey() {\n $class = $this->getClass();\n\t\t$classMap =& $this->getClassMap();\n\t\treturn $classMap[$class];\n\t}", "title": "" }, { "docid": "b067e7af528ca8e2ff58381459df1f75", "score": "0.5678051", "text": "public function getGoogleAuthenticatorUsername(): string;", "title": "" }, { "docid": "77009218d3dff23b89176ff1f82aa060", "score": "0.5677744", "text": "public function getClient(): \\Google_client;", "title": "" }, { "docid": "1c536f19b3f886ac808d680def2ba447", "score": "0.56736946", "text": "function acf_google_maps_api()\n{\n acf_update_setting('google_api_key', 'AIzaSyA3Ibb_wNxXG5xwHIWvti3Ni_qYybQMNac');\n}", "title": "" }, { "docid": "4d45ffcbb6dfaa6578a79c3cbc2f73bc", "score": "0.5669154", "text": "public function signingKey()\n\t{\n\t\treturn parent::signingKey();\n\t}", "title": "" }, { "docid": "093c30268edb4d1d22560cecc8abcda4", "score": "0.565683", "text": "public function identifier()\n {\n return 'google';\n }", "title": "" }, { "docid": "53186b661f3b9590ea05d690b11d572c", "score": "0.5655057", "text": "public function getAuthKey()\n {\n return $this->auth_key;\n }", "title": "" }, { "docid": "53186b661f3b9590ea05d690b11d572c", "score": "0.5655057", "text": "public function getAuthKey()\n {\n return $this->auth_key;\n }", "title": "" }, { "docid": "53186b661f3b9590ea05d690b11d572c", "score": "0.5655057", "text": "public function getAuthKey()\n {\n return $this->auth_key;\n }", "title": "" }, { "docid": "53186b661f3b9590ea05d690b11d572c", "score": "0.5655057", "text": "public function getAuthKey()\n {\n return $this->auth_key;\n }", "title": "" }, { "docid": "53186b661f3b9590ea05d690b11d572c", "score": "0.5655057", "text": "public function getAuthKey()\n {\n return $this->auth_key;\n }", "title": "" }, { "docid": "53186b661f3b9590ea05d690b11d572c", "score": "0.5655057", "text": "public function getAuthKey()\n {\n return $this->auth_key;\n }", "title": "" }, { "docid": "53186b661f3b9590ea05d690b11d572c", "score": "0.5655057", "text": "public function getAuthKey()\n {\n return $this->auth_key;\n }", "title": "" }, { "docid": "f6e6e7c8ab934751cf35ee4c433c5965", "score": "0.564928", "text": "abstract public function getKey(): string;", "title": "" }, { "docid": "e01c4e80421186cd8ea9db77934f3ee6", "score": "0.56448585", "text": "public function getAuthKey()\r\n {\r\n return $this->auth_key;\r\n }", "title": "" }, { "docid": "be0981f70f12d3c908a431207cb74735", "score": "0.5642836", "text": "public function getAppKey()\n {\n return $this->appKey = $this->appKey ?: getKeyFromEnv(\"APP_KEY\");\n }", "title": "" }, { "docid": "4c447b692666b35664b46cc7568e29cc", "score": "0.5640906", "text": "public function wc_am_api_key_text() { }", "title": "" }, { "docid": "08323e5b39cdfa7833208b18ddf16671", "score": "0.5625685", "text": "public function getAuthKey()\n {\n return '';\n }", "title": "" }, { "docid": "630b3e60a6f67eebe856c9e0569b26f4", "score": "0.56118727", "text": "protected function getApiKey() \n {\n if (empty($this->apiKey)) {\n $this->apiKey = config('googleapi.apikey');\n if (empty($this->apiKey)) throw new KeyMissingException();\n }\n return $this->apiKey;\n }", "title": "" }, { "docid": "d69ad6eb08019b040e017c351c9bd83f", "score": "0.5611801", "text": "public function getPackageKey(): string\n {\n return $this->packageKey;\n }", "title": "" }, { "docid": "80fc9a1d56d3e0dfaf21ee02c3cda3fb", "score": "0.5599867", "text": "public function getKey(): string\n {\n return self::KEY;\n }", "title": "" } ]
f75a795b989880b8f5cc54b3c1c779c1
TODO Only for a test a the moment, refactor if you actually use it.
[ { "docid": "e943f6ec514c49f7dfcd17e4106605ce", "score": "0.0", "text": "public function getAnswer($id) {\n\t\tforeach($this->answer as $answer) {\n\t\t\tif ($answer->getId() == $id) {\n\t\t\t\treturn $answer;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "title": "" } ]
[ { "docid": "b4e425e88b336f2040e816b9d78c807f", "score": "0.59971094", "text": "protected function __init__() { }", "title": "" }, { "docid": "a9e876c85e38882c5a3514c2eca20d6c", "score": "0.5930963", "text": "final private function __construct() {}", "title": "" }, { "docid": "abafabb2e6139e8d44ba1c18cfac7358", "score": "0.58482045", "text": "final private function __construct() { }", "title": "" }, { "docid": "abafabb2e6139e8d44ba1c18cfac7358", "score": "0.58482045", "text": "final private function __construct() { }", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5843706", "text": "private function __construct() {}", "title": "" }, { "docid": "dd152fcaf9c3b056c55ddae6060148e5", "score": "0.58270913", "text": "final private function __construct(){}", "title": "" }, { "docid": "95ec5f4562f77d02680d4789ff46f0bb", "score": "0.57845974", "text": "final protected function __construct() {}", "title": "" }, { "docid": "c197e9cc0165d147b80d3b7ca41f6eff", "score": "0.5690776", "text": "protected function _sampleHelper() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.567622", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.567622", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.567622", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.567622", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.567622", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.567622", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.567622", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.567622", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.567622", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.567622", "text": "protected function __construct() {}", "title": "" }, { "docid": "e91b6c3cb8d98cd3a7a8577b85a46de5", "score": "0.56711376", "text": "final private function __construct() {\n\t}", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.56451505", "text": "private function __construct() { }", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.56451505", "text": "private function __construct() { }", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.56451505", "text": "private function __construct() { }", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.56451505", "text": "private function __construct() { }", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.56451505", "text": "private function __construct() { }", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.56451505", "text": "private function __construct() { }", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.56451505", "text": "private function __construct() { }", "title": "" }, { "docid": "a20013630f56448e8a812105d91578ee", "score": "0.56451505", "text": "private function __construct() { }", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.5630073", "text": "protected function init() {}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.5630073", "text": "protected function init() {}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.5630073", "text": "protected function init() {}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.5630073", "text": "protected function init() {}", "title": "" }, { "docid": "9e5fa56e215587fc2fb328eb8bb3e389", "score": "0.55896443", "text": "protected function bofore()\n {\n }", "title": "" }, { "docid": "b2d3b5d1e2c5c5eb37f050b1a362ef72", "score": "0.55753195", "text": "final private function __construct() { }", "title": "" }, { "docid": "b2d3b5d1e2c5c5eb37f050b1a362ef72", "score": "0.55753195", "text": "final private function __construct() { }", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.555581", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.555581", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.555581", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.555581", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.555581", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.555581", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.555581", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.555581", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.555581", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.555581", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.555581", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.555581", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.555581", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.555581", "text": "private function __construct(){}", "title": "" }, { "docid": "e88b6b5b78998e4dcc843b3c08d4e6ab", "score": "0.55407536", "text": "private function __construct() {\n \n }", "title": "" }, { "docid": "e88b6b5b78998e4dcc843b3c08d4e6ab", "score": "0.55407536", "text": "private function __construct() {\n \n }", "title": "" }, { "docid": "3c484d770d75df827c23881d2c6f855a", "score": "0.5506844", "text": "private function __construct() {\n\t\treturn;\n\t}", "title": "" }, { "docid": "303c6463401e09821159820390808780", "score": "0.5506026", "text": "final private function __construct()\n\t{\n\t}", "title": "" }, { "docid": "303c6463401e09821159820390808780", "score": "0.5506026", "text": "final private function __construct()\n\t{\n\t}", "title": "" }, { "docid": "303c6463401e09821159820390808780", "score": "0.5506026", "text": "final private function __construct()\n\t{\n\t}", "title": "" }, { "docid": "303c6463401e09821159820390808780", "score": "0.5506026", "text": "final private function __construct()\n\t{\n\t}", "title": "" } ]
cd1f6bccf8da900a4505da9c60a215dd
Does an LIMIT operation. If the limit is set to 1, the get() operation will return an associative array of column/value pairs
[ { "docid": "2ca92fd8e8d8d12b4ab3e164692d4db7", "score": "0.0", "text": "public function limit($limit) {\n\t\t$this->limit = $limit;\n\t\treturn $this;\n\t}", "title": "" } ]
[ { "docid": "791f0179e8cadd1ff37765bbe25c3dfe", "score": "0.67779624", "text": "private function query($cursor, $limit) {\n // here. Since this is an example, we just use a premade dataset.\n\n return array_slice($this->data, $cursor, $limit);\n }", "title": "" }, { "docid": "f4b074839e04138ba5290814c08e0f8d", "score": "0.67420924", "text": "public function fetch($offset, $limit);", "title": "" }, { "docid": "c377a50e908ebf63373afdda7e545e71", "score": "0.66025186", "text": "public function testFetchAllKeyValueWithLimit(): void\n {\n $platform = $this->connection->getDatabasePlatform();\n\n if ($platform instanceof SQLServerPlatform) {\n self::markTestSkipped('See https://github.com/doctrine/dbal/issues/2374');\n }\n\n $query = $platform->modifyLimitQuery($this->query, 1, 1);\n\n self::assertEquals(['bar' => 2], $this->connection->fetchAllKeyValue($query));\n }", "title": "" }, { "docid": "3f2663f7f4d836888c57691061cbb1fb", "score": "0.6547207", "text": "public function get(int $limit = 0)\n { \n $query= $this->buildSelectQuery($limit);\n $statement = $this->connection->prepare($query);\n $statement->execute(); \n $results = [];\n while($resultArray = $statement->fetch(PDO::FETCH_ASSOC)){\n $model = clone $this;\n foreach($resultArray as $key=>$value){\n $model->$key = $value;\n }\n $results[] = $model;\n }\n return $results;\n }", "title": "" }, { "docid": "8512650d4444b08a78d88e14046a8cd7", "score": "0.6522202", "text": "public function get($offset, $limit);", "title": "" }, { "docid": "4921b673cc69b3a55ccc3617e351e69d", "score": "0.644699", "text": "public function get($table='', $limit=FALSE, $offset=FALSE);", "title": "" }, { "docid": "34d2e14d4538d43e4c17a3324d50cc8f", "score": "0.6383816", "text": "abstract public function limit($sql, $limit, $offset = 0);", "title": "" }, { "docid": "833730b5e1753d0c77201f66ac0c6738", "score": "0.6329336", "text": "public function limit () {\n\t\t$params = $this->obj->limit;\n\t\t\n\t\tif ($this->offset){\n\t\t\t$params['number'] = $this->obj->limit;\n\t\t\t$params['offset'] = $this->obj->offset;\n\t\t}\n\t\treturn $params;\n\t}", "title": "" }, { "docid": "74d3908c94124332a76984276ab29a81", "score": "0.63238144", "text": "function getDataArray()\n{\n global $con;\n global $limit;\n\n if (isset($limit) && !empty($limit)) {\n // only select the limit rows\n $query = \"SELECT * FROM \" . DATA_SOURCE . \" LIMIT \" . $limit . \";\";\n } else {\n // no limit was passed\n $query = \"SELECT * FROM \" . DATA_SOURCE . \";\";\n }\n\n $result = $con->query($query);\n\n return $result->fetch_all(MYSQLI_ASSOC);\n}", "title": "" }, { "docid": "eb5eeb2db589c4f1715a7ea35e3690f0", "score": "0.6305117", "text": "public function fetchLatest($limit);", "title": "" }, { "docid": "a3eb1834d0f9b96e606fc8e882b80211", "score": "0.6295709", "text": "public function get($i_offset, $i_limit);", "title": "" }, { "docid": "f8545ba030ce9023b365851c6eafe2e4", "score": "0.62861127", "text": "public function getLimit(){\n return $this->_limitRows;\n }", "title": "" }, { "docid": "a569874d5bdd3f412b119a38a5abdddb", "score": "0.6262437", "text": "function SelectLimit($sql,$nrows=-1,$offset=-1, $inputarr=false,$secs2cache=0)\n\t{\n\t\t$this->hasTop = preg_match('/ORDER[ \\t\\r\\n]+BY/is',$sql) ? 'top' : false;\n\t\t$ret = ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache);\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "0ff0090ec2e85700b466c013803edde8", "score": "0.6257016", "text": "function getRows($where='',$order='',$limit='100') {\n return $this->getData('*','',$where,$order,$limit);\n }", "title": "" }, { "docid": "43bb3f636789c6d136d9f19fee3b1aea", "score": "0.6239444", "text": "public function get($limit = 100, $offset = 0){\n if ($limit){\n $query = $this->db->get($this::DB_TABLE_NAME, $limit, $offset);\n }\n else{\n $query = $this->db->get($this::DB_TABLE_NAME);\n }\n $ret_value = array();\n $class = get_class($this);\n foreach ($query->result() as $row){\n $model = new $class;\n $model->populate($row);\n $ret_value[$row->{$this::DB_TABLE_PK_VALUE}] = $model;\n }\n return $ret_value;\n }", "title": "" }, { "docid": "b9a4e96ad0d27524e87bf1ddbb71ef1a", "score": "0.62329626", "text": "public function limit($limit, $offset=FALSE);", "title": "" }, { "docid": "8e6bb57d45dadf7d0693ed1fd4a3ca44", "score": "0.61328036", "text": "public function take($limit)\n\t{\n\t\treturn $this->model->take($limit);\n\t}", "title": "" }, { "docid": "e4f8eda779843e75e9a23179a1030ff6", "score": "0.61239916", "text": "public function getAllDataLimit($table, $limit)\n {\n $this->db->select(\"*\");\n $this->db->from($table);\n $this->db->order_by('id', 'desc');\n $this->db->limit($limit);\n $query = $this->db->get(); \n return $query->result();\n }", "title": "" }, { "docid": "483bdbce01f96d50d3756b7121976310", "score": "0.6123741", "text": "public function getAllDataLimit($table, $limit) {\n $this->db->select(\"*\");\n $this->db->from($table);\n $this->db->order_by('id', 'desc');\n $this->db->limit($limit);\n $query = $this->db->get();\n return $query->result();\n }", "title": "" }, { "docid": "401feedc49d1c246c29c1bcb8ea7273f", "score": "0.6104619", "text": "public function limit(string $sql, int $limit, $offset=FALSE): string;", "title": "" }, { "docid": "a31fa196b228f8b2fc203171ce82a99e", "score": "0.6090317", "text": "public function limit($limit);", "title": "" }, { "docid": "a31fa196b228f8b2fc203171ce82a99e", "score": "0.6090317", "text": "public function limit($limit);", "title": "" }, { "docid": "a31fa196b228f8b2fc203171ce82a99e", "score": "0.6090317", "text": "public function limit($limit);", "title": "" }, { "docid": "c3356e86cf85dba7f5d564606c1c32cb", "score": "0.60868233", "text": "function fetchData($table_name,$limit,$start){\r\n\t\t$this->db->limit($limit,$start);\r\n\t\t$query = $this->db->get($table_name);\r\n\t\tif($query->num_rows()>0)\r\n\t\t\treturn $query->result();\r\n\t\telse return false;\r\n\t}", "title": "" }, { "docid": "b3cdb8a9d12a06d39e268e6aba6ec004", "score": "0.6076427", "text": "public function applyLimit(&$sql, $offset, $limit);", "title": "" }, { "docid": "c9c532e596c2dd0e525c09bc44cd7063", "score": "0.60663384", "text": "abstract public function limit($sSql, $iLimit, $iOffset);", "title": "" }, { "docid": "7137ecf27cffeddb79718206a31f9b50", "score": "0.606412", "text": "function SelectLimit($sql,$nrows=-1,$offset=-1, $inputarr=false,$secs2cache=0)\n\t{\n\t\tif (strpos($sql,'/*+') !== false)\n\t\t\t$sql = str_replace('/*+ ','/*+FIRST_ROWS ',$sql);\n\t\telse\n\t\t\t$sql = preg_replace('/^[ \\t\\n]*select/i','SELECT /*+FIRST_ROWS*/',$sql);\n\n\t\t/*\n\t\t\tThe following is only available from 8.1.5 because order by in inline views not\n\t\t\tavailable before then...\n\t\t\thttp://www.jlcomp.demon.co.uk/faq/top_sql.html\n\t\tif ($nrows > 0) {\n\t\t\tif ($offset > 0) $nrows += $offset;\n\t\t\t$sql = \"select * from ($sql) where rownum <= $nrows\";\n\t\t\t$nrows = -1;\n\t\t}\n\t\t*/\n\n\t\treturn ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache);\n\t}", "title": "" }, { "docid": "7137ecf27cffeddb79718206a31f9b50", "score": "0.606412", "text": "function SelectLimit($sql,$nrows=-1,$offset=-1, $inputarr=false,$secs2cache=0)\n\t{\n\t\tif (strpos($sql,'/*+') !== false)\n\t\t\t$sql = str_replace('/*+ ','/*+FIRST_ROWS ',$sql);\n\t\telse\n\t\t\t$sql = preg_replace('/^[ \\t\\n]*select/i','SELECT /*+FIRST_ROWS*/',$sql);\n\n\t\t/*\n\t\t\tThe following is only available from 8.1.5 because order by in inline views not\n\t\t\tavailable before then...\n\t\t\thttp://www.jlcomp.demon.co.uk/faq/top_sql.html\n\t\tif ($nrows > 0) {\n\t\t\tif ($offset > 0) $nrows += $offset;\n\t\t\t$sql = \"select * from ($sql) where rownum <= $nrows\";\n\t\t\t$nrows = -1;\n\t\t}\n\t\t*/\n\n\t\treturn ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache);\n\t}", "title": "" }, { "docid": "77980d927e731a798c5f4b6a5f25f7d7", "score": "0.60458946", "text": "function assignLimitOffset(&$rows, $limit){\n $offset = 'offset';\n $length = 'length';\n if (!is_array($limit) || !array_key_exists($offset, $limit)) {\n $limit = $this->parseLimitTokens($limit);\n }\n if (array_key_exists($offset, $limit)\n && array_key_exists($length, $limit)) {\n if ($limit[$length] === 0) {\n $rows = array();\n } else if ($limit[$length] != null) {\n $rows = array_slice($rows, $limit[$offset], $limit[$length]);\n } else {\n $rows = array_slice($rows, $limit[$offset]);\n }\n } else {\n $this->pushError('illegal the value of arguments on LIMIT clause');\n }\n }", "title": "" }, { "docid": "ae6bd39f51ca3670febb5a14d72dfafb", "score": "0.6044015", "text": "function ApplySqlLimit($sql, $offset, $count);", "title": "" }, { "docid": "dc22c9755880f78523a8ed503005e5a6", "score": "0.6043915", "text": "protected function getLimitSQL() \n { \n return \" LIMIT 0, 100\";\n }", "title": "" }, { "docid": "1e626f40b6d8fb26cc2809b22b0c02fc", "score": "0.60351026", "text": "function get_limit_data($limit, $start = 0, $q = NULL) {\n $this->db->order_by($this->id, $this->order);\n $this->db->like('id', $q);\n $this->db->or_like('user_id', $q);\n $this->db->or_like('appointment_time', $q);\n $this->db->or_like('status', $q);\n $this->db->or_like('active', $q);\n $this->db->or_like('deleted', $q);\n $this->db->or_like('cancelled_by', $q);\n $this->db->limit($limit, $start);\n return $this->db->get($this->table)->result();\n }", "title": "" }, { "docid": "d26d3f5ec708d6348e87058a559eeb62", "score": "0.60271955", "text": "function limit(int limit, int offset = 0): QueryBuilder{\n }", "title": "" }, { "docid": "e60123de4b24aad506c1f217f64d9cec", "score": "0.602175", "text": "function get_limit_data($limit, $start = 0, $q = NULL) {\n\t\t$this->db->order_by($this->id, $this->order);\n\t\t$this->db->like('id', $q);\n\t\t$this->db->or_like('id_sortie', $q);\n\t\t$this->db->or_like('montant_utilise', $q);\n\t\t$this->db->or_like('motif', $q);\n\t\t$this->db->or_like('date_creation', $q);\n\t\t$this->db->limit($limit, $start);\n\t\treturn $this->db->get($this->table)->result();\n\t}", "title": "" }, { "docid": "b094ab2e550ad63508943d12fb875315", "score": "0.60170776", "text": "public function limit()\n {\n $arguments = func_get_args();\n if (count($arguments) == 1 && is_numeric($arguments[0]))\n $max = $arguments[0];\n else\n self::throwUsageException(\"Bad arguments type and count for limit()\");\n\n $out = [];\n $count = 0;\n foreach ($this->data as $key => $row) {\n\n if ($max <= $count)\n break;\n\n $out[$key] = $row;\n\n $count++;\n }\n\n return $this->returnConstant($out);\n }", "title": "" }, { "docid": "a9af753f6fa705dea2b5ab63f4b101d2", "score": "0.60026777", "text": "function getLatest($col, $tbl_name, $order, $lim_num=5){\n global $con;\n $stmt = $con->prepare(\"select $col from $tbl_name order by $order desc limit $lim_num \");\n $stmt->execute();\n $row = $stmt->fetchAll();\n return $row;\n}", "title": "" }, { "docid": "cced00bbbbc3806d2a4a6aea07d0b064", "score": "0.5994064", "text": "protected function get() {\n\n $sql = 'SELECT ';\n if($this->select_fields) {\n $sql .= $this->select_fields;\n } else {\n $sql .= '*';\n }\n\n $sql.=\" FROM $this->table \";\n\n if($this->limit) {\n $sql.= $this->limit;\n }\n\n if($this->where) {\n $sql.= $this->where;\n }\n\n return $this->fetchAll($sql);\n\n }", "title": "" }, { "docid": "83cbd2a08e4c41bf96031c3d7f317402", "score": "0.59773034", "text": "abstract public function fetchEntries($limit = 50, $offset = 0);", "title": "" }, { "docid": "b7a8400b362bd3471b712539c2e266b7", "score": "0.5966287", "text": "public function getLimit();", "title": "" }, { "docid": "b7a8400b362bd3471b712539c2e266b7", "score": "0.5966287", "text": "public function getLimit();", "title": "" }, { "docid": "b7a8400b362bd3471b712539c2e266b7", "score": "0.5966287", "text": "public function getLimit();", "title": "" }, { "docid": "b7a8400b362bd3471b712539c2e266b7", "score": "0.5966287", "text": "public function getLimit();", "title": "" }, { "docid": "13c6c162b8e795ee41087e795c5fac0e", "score": "0.5964354", "text": "public function limit($query, $limit, $offset = 0)\r\n\t{\t\r\n\t\treturn $this->db_handle->limitResult($query, $limit, $offset);\r\n\t}", "title": "" }, { "docid": "3ed799349e02c54c314d1e5f3a7a09f5", "score": "0.59510064", "text": "public function fetchAll($limit = 30, $offset = 0) {\n $sql = 'SELECT * FROM '.$this->tableName.' ORDER BY '.$this->primaryKey.' DESC' . \n ' LIMIT '.$offset.', '.$limit;\n $query = $this->dbHandler->query($sql);\n \n return $query->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "93263598e95948601ca0f767e56b842e", "score": "0.59253657", "text": "public function fetchAllStokes($limit);", "title": "" }, { "docid": "1c400b91dade1f62691bc0769d4133cc", "score": "0.59225917", "text": "public function limit($limit, $offset = null)\n {\n return $this->query->limit(...func_get_args());\n }", "title": "" }, { "docid": "453b01db1155997ace14fd95d794f47c", "score": "0.5907921", "text": "public function fetch_all($table,$limit='', $start=''){\n // if ($limit) {\n // $sql .=\" LIMIT '$limit', '$start' \";\n // }\n // echo $table.\" \".$limit.\" \".$start;exit();\n if(!empty($limit)){\n $this->db->limit($limit, $start);\n }\n\n $query = $this->db->get($table); \n // $query = $this->db->query($sql);\n return $query->result_array();\n }", "title": "" }, { "docid": "7e5353e88bd302b3dbaedc6baa20b2fa", "score": "0.5902759", "text": "function getRecords($limit_low=0,$limit_high=0){}", "title": "" }, { "docid": "339e6ca89c074f7d991152bef0b7d8e0", "score": "0.5896228", "text": "public function getLimit()\r\n {\r\n $req = \"SELECT articles.id,\r\n articles.title,\r\n articles.slug,\r\n articles.content,\r\n articles.date_creation,\r\n articles.url_images,\r\n articles.update_article,\r\n articles.posted,\r\n Users.pseudo\r\n FROM articles\r\n INNER JOIN users\r\n ON articles.user_id = users.id\r\n WHERE articles.posted = 1\r\n ORDER BY articles.id DESC\r\n LIMIT 5\";\r\n $query = $this->connexion->prepare($req);\r\n $query->execute();\r\n return $query->fetchAll();\r\n }", "title": "" }, { "docid": "507cc5ab224a0e5bc01d34e4bcd72a45", "score": "0.5880836", "text": "function get_limit_data($limit, $start = 0, $q = NULL)\n {\n $this->db->order_by($this->id, $this->order);\n $this->db->like('id_hasil', $q);\n $this->db->or_like('id_peserta', $q);\n $this->db->or_like('id_gaya', $q);\n $this->db->limit($limit, $start);\n return $this->db->get($this->table)->result();\n }", "title": "" }, { "docid": "9a767702a2238516a4bb0c1b4e90a6a2", "score": "0.5880409", "text": "public function findAllLimit($limit);", "title": "" }, { "docid": "ad8ea517dfc9cd271b84a2fd54f9b4eb", "score": "0.5866678", "text": "public function getAllDataLimitWhere($table, $where, $limit) {\n $this->db->select(\"*\");\n $this->db->from($table);\n $this->db->where($where);\n $this->db->order_by('id', 'desc');\n $this->db->limit($limit);\n $query = $this->db->get();\n return $query->result();\n }", "title": "" }, { "docid": "517692b6fe987faf17080b3543514871", "score": "0.58609277", "text": "function get_limit_data($limit, $start = 0, $q = NULL) {\r\n $this->db->order_by($this->id, $this->order);\r\n $this->db->like('id', $q);\r\n\t$this->db->or_like('header_id', $q);\r\n\t$this->db->or_like('from_num', $q);\r\n\t$this->db->or_like('dest_num', $q);\r\n\t$this->db->or_like('message_id', $q);\r\n\t$this->db->or_like('message_text', $q);\r\n\t$this->db->or_like('status', $q);\r\n\t$this->db->or_like('created', $q);\r\n\t$this->db->or_like('createdby', $q);\r\n\t$this->db->or_like('updated', $q);\r\n\t$this->db->or_like('updatedby', $q);\r\n\t$this->db->limit($limit, $start);\r\n return $this->db->get($this->table)->result();\r\n }", "title": "" }, { "docid": "d11edd9c635e8c55f8dd2f2cfdf61906", "score": "0.5857743", "text": "public function setLimit($limit = NULL, $offset = NULL, $is_return_limit_offset = FALSE)\n {\n #check if variable $limit empty\n if( !is_null($limit) ) \n {\n $this->limit = $limit;\n $this->offset = $offset;\n \n #$this->db->limit($limit, $offset);\n }\n else \n {\n $this->offset = $offset;\n \n #$this->db->limit($this->limit, $offset);\n }\n \n if( $is_return_limit_offset )\n return array($this->limit, is_null($this->offset) ? 0 : $this->offset);\n else\n return $this->db; \n }", "title": "" }, { "docid": "00535f6b3127b7b3a2d17731dac1c804", "score": "0.58567065", "text": "protected static function limitToQuery($limit)\n {\n return (array)static::getDB()->limitToQuery($limit);\n }", "title": "" }, { "docid": "7c132aa8d876dc77446338f08778dc81", "score": "0.58495104", "text": "function get_limit_data($limit, $start = 0, $q = NULL) {\n $this->db->order_by($this->id, $this->order);\n $this->db->like('id', $q);\n\t$this->db->or_like('ward_name', $q);\n\t$this->db->limit($limit, $start);\n return $this->db->get($this->table)->result();\n }", "title": "" }, { "docid": "0f5d0b75c84d06815acfc90763d3a434", "score": "0.58452666", "text": "public function get_data_with_limit($table, $per_page, $page) {\n // $data = array();\n //$s='select * from bb_products ';\n $s = 'select * from ' . $table;\n if (!empty($page) or ! empty($per_page)) {\n $s .= 'limit ' . $page . ',' . $per_page;\n }\n $query = $this->db->query($s);\n if ($query->num_rows() > 0) {\n// foreach ($query->result() as $row) {\n// $data[] = $row;\n// }\n return $query->result_array();\n }\n // return $data;\n }", "title": "" }, { "docid": "681586b17499e679481eb3c87047688a", "score": "0.58374375", "text": "function getResults($offset, $limit);", "title": "" }, { "docid": "56ea325ea422281c3fcc50dda97692fb", "score": "0.58354807", "text": "public function get(){\n try{\n $stmt = $this->execute();\n if($stmt !== null){\n $rows = $stmt->fetchAll(PDO::FETCH_ASSOC);//result\n $this->data_list = $this->getRowsUptoLimit($rows);\n return $this->data_list;\n }\n }catch(Exception $e){\n throw $e;\n }\n return null;\n }", "title": "" }, { "docid": "ac56cd191344e3de68e14734a6a16a6f", "score": "0.58354545", "text": "function index_limit($limit, $start = 0) {\n $this->db->order_by($this->id, $this->order);\n $this->db->limit($limit, $start);\n return $this->db->get($this->table)->result();\n }", "title": "" }, { "docid": "317ea5908d4f32bd1c98a5920f234b53", "score": "0.5835049", "text": "protected function _applyLimit()\n {\n if (empty($this->_page['limit'])) {\n return;\n }\n if (!empty($this->_page['offset'])) {\n $offset = $this->_page['offset'];\n } else {\n $page = !empty($this->_page['page']) ? $this->_page['page'] : 1;\n $offset = ($page - 1) * $this->_page['limit'];\n }\n $this->statement()->limit($this->_page['limit'], $offset);\n }", "title": "" }, { "docid": "5cef7a516a8960e397b16264b67efecd", "score": "0.58288217", "text": "function getData($fields='*',$tables='',$where='',$order='',$limit='100') {\n $sql = $this->buildQuery($fields,$tables,$where,$order,$limit);\n $res = $this->_db->query($sql);\n if(!$res) return $this->error($this->getError());\n $rows = array();\n while($row = $res->fetch_assoc()) \n $rows[]=$row;\n return $rows;\n }", "title": "" }, { "docid": "a84e6e597a80373da3849d26e3a32c92", "score": "0.58286893", "text": "function getAll($limit = 20){\n $query = $this->db->get($this->table, $limit);\n if($query->num_rows() > 0 ){\n foreach ($query->result() as $row){\n $data[] = $row;\n }\n return $data;\n }\n }", "title": "" }, { "docid": "a84e6e597a80373da3849d26e3a32c92", "score": "0.58286893", "text": "function getAll($limit = 20){\n $query = $this->db->get($this->table, $limit);\n if($query->num_rows() > 0 ){\n foreach ($query->result() as $row){\n $data[] = $row;\n }\n return $data;\n }\n }", "title": "" }, { "docid": "741b960500b41270d8e505d899762c45", "score": "0.58237976", "text": "public function first($count = 1){\n $this->prepare();\n $total = count($this->resultSet);\n if($total == 0){\n return $this->resultSet;\n }\n\n $data = array_slice($this->resultSet,0,$count);\n \n return ($count == 1)?array_shift($data):$data;\n }", "title": "" }, { "docid": "64113a4484a0ca2f3654a7dfd705c3af", "score": "0.5815128", "text": "public function limit(int $limit = null) : SelectInterface;", "title": "" }, { "docid": "79c9855a4327592763fc3a4522e110cd", "score": "0.58047324", "text": "public function limit($sql){\n\t\t$args = func_get_args();\n\t\treturn call_user_func_array(array($this->db, 'limit'), $args);\n\t}", "title": "" }, { "docid": "7e7d697d6ffc51cefc7a7a41fd617dfe", "score": "0.5799748", "text": "public function getLimit() {}", "title": "" }, { "docid": "b3eb5a3d14dd3dcf477f0d62ec13ded4", "score": "0.5797063", "text": "function getAllWhereOrderLimitData($fields,$table,$where,$orders,$row,$lower,$upper)\n\t{ \n\t\t$this->db->select($fields);\n\t\t$this->db->from($table);\n\t\t$this->db->where($where);\n \t $this->db->order_by($orders);\n\t\t$this->db->limit($lower, $upper);\n \t $query=$this->db->get();\n\t\tif($row==1)\n\t\t{\n\t\t\treturn $query->row_array();\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $query->result_array();\n\t\t}\n\t}", "title": "" }, { "docid": "527fbe182ea8293b9d534e3609851e37", "score": "0.57925284", "text": "public function select_limit($p_offset, $p_row, array $arr_where = array(), array $arr_order = array()){\n\t\tif(is_null($arr_order) || count($arr_order)==0){\n\t\t\t$arr_order = array('_id' => -1);//last insert show first\n\t\t}\n\t\t$arr = $this->collection->find($arr_where)->sort($arr_order)->limit($p_row)->skip($p_offset);\n\t\treturn $arr;\n\t}", "title": "" }, { "docid": "0bf25f06ed150f321907ab902e0559fb", "score": "0.5785391", "text": "function db_find_range ($table, $limit, $offset = 0, $fields = '*') {\n return db_select(\"\n SELECT $fields FROM $table \n LIMIT ? \n OFFSET ?\", \n array($limit, $offset)\n );\n}", "title": "" }, { "docid": "a10c1d479d5ec7a1664156f150fae44b", "score": "0.57792765", "text": "function getAllBudgetsActivityLimit($id, $limit, $offset) {\n global $dbh, $schema;\n try {\n \t// using prepared statements will help protect you from SQL injection\n \t$stmt = $dbh->prepare(\"SELECT n.* \n FROM $schema.cabimentacao n\n WHERE n.envolve= :id \n ORDER BY data_pedido\n \tLIMIT :limit OFFSET :offset\");\n $stmt->bindParam(':id', $id, PDO::PARAM_INT);\n \t$stmt->execute(array($limit, $offset));\n \t// get array containing all of the result set rows \n \t$result = $stmt->fetchall(PDO::FETCH_ASSOC);\n \treturn $result;\n }\n catch(PDOException $e) {\n \t$_SESSION[\"s_errors\"][\"generic\"][] = \"ERRO[29]: \".$e->getMessage();\n \theader(\"Location: ../principal/index.php\");\n \tdie;\n }\n }", "title": "" }, { "docid": "cc133dd14ead9603e693bd68e1779a19", "score": "0.57711476", "text": "function limitResult($sql, $limit, $offset=false) {\n return \" $sql LIMIT \".((is_numeric($offset) && $offset != 0)?\"{$offset},\":\"\").\"{$limit} \";\n }", "title": "" }, { "docid": "e095cf5bb13ed7fee7f1817eab29a87c", "score": "0.57696974", "text": "function get_limit_data($limit, $start = 0, $sort_column = '', $sort_by = '', $q = NULL)\n {\n if ($sort_column != '' && $sort_by != '') {\n $this->db->order_by($sort_column, $sort_by);\n } else {\n $this->db->order_by($this->id, $this->order);\n }\n $this->db->like('id', $q);\n $this->db->or_like('order_no', $q);\n $this->db->or_like('customer_id', $q);\n $this->db->or_like('due_date', $q);\n $this->db->or_like('subject', $q);\n $this->db->or_like('description', $q);\n $this->db->or_like('total_qty', $q);\n $this->db->or_like('total_amt', $q);\n $this->db->or_like('discount', $q);\n $this->db->or_like('paid', $q);\n $this->db->or_like('balance', $q);\n $this->db->or_like('refunded', $q);\n $this->db->or_like('terms', $q);\n $this->db->or_like('created_at', $q);\n $this->db->or_like('updated_at', $q);\n $this->db->or_like('status', $q);\n $this->db->limit($limit, $start);\n return $this->db->get($this->table)->result();\n }", "title": "" }, { "docid": "78ef743af9ed7fe8a57f6825b2ac1d9f", "score": "0.5767859", "text": "function data_asesor_limit($limit, $start){\n\t\t$sql = \"SELECT * FROM (SELECT R.*, ROWNUM AS ROW_NUMBER FROM ( SELECT * FROM BKD.BKD_ASESOR ORDER BY KD_DOSEN, NM_PT, NM_ASESOR ASC) R WHERE ROWNUM <= \".$limit.\") \n\t\t\t\tWHERE \".$start.\" < ROW_NUMBER\";\n\t\treturn $this->db->query($sql)->result_array();\n\t}", "title": "" }, { "docid": "e6e7ceea5a87126a7f80fefcee2fc19d", "score": "0.5764534", "text": "function get_limit_data($limit, $start = 0, $q = NULL) {\n\n $this->db->order_by($this->id, $this->order);\n $this->db->like('ID', $q);\n $this->db->or_like('nombres', $q);\n $this->db->or_like('apellido_pat', $q);\n $this->db->or_like('apellido_mat', $q);\n $this->db->or_like('calle', $q);\n $this->db->or_like('colonia', $q);\n $this->db->or_like('cp', $q);\n $this->db->or_like('correo', $q);\n $this->db->or_like('telefono', $q);\n $this->db->or_like('contrasena', $q);\n $this->db->or_like('tipo_usu', $q);\n $this->db->limit($limit, $start);\n\n return $this->db->get($this->table)->result();\n }", "title": "" }, { "docid": "66b4991b0188d7c076388ef3843b697f", "score": "0.5762248", "text": "public function limit($limit, $offset = 0)\n {\n return $this->alterDataQuery(function (DataQuery $query) use ($limit, $offset) {\n $query->limit($limit, $offset);\n });\n }", "title": "" }, { "docid": "1d82485c97042331695c400dca5f868f", "score": "0.57525826", "text": "public function limit ($sql, $count, $offset = 0)\n {\n return $this->adapter->limit($sql, $count, $offset);\n }", "title": "" }, { "docid": "2eee27e6a0cd060e1303cf3be60f38f2", "score": "0.5744081", "text": "public function getDataPelatih($limit, $start){\n $query = $this->db->get('pelatih', $limit, $start);\n return $query;\n }", "title": "" }, { "docid": "2bcab7fa1e58329088dbbd5056fe7288", "score": "0.5731668", "text": "function getCol($sql, $col = 0, $offset = 0, $limit = null, $prefetch = 50, $flags = 0) {\n\t\tif (0 != $offset || null != $limit)\n\t\t\t$sql = $this->limit($sql, $offset, $limit);\n\t\tif ($flags & SYND_SQL_CALC_FOUND_ROWS)\n\t\t\t$sql = preg_replace('/^\\s*SELECT\\s/i', '\\0SQL_CALC_FOUND_ROWS ', $sql);\n\t\tif ($flags & SYND_SQL_HIGH_PRIORITY)\n\t\t\t$sql = preg_replace('/^\\s*SELECT\\s/i', '\\0HIGH_PRIORITY ', $sql);\n\n\t\tif (is_resource($result = mysql_query($sql, $this->_db))) {\n\t\t\t$rows = array();\n\t\t\tif (is_numeric($col)) {\n\t\t\t\twhile (false !== ($row = mysql_fetch_row($result)))\n\t\t\t\t\t$rows[] = $row[$col];\n\t\t\t}\n\t\t\telse {\n\t\t\t\twhile (false !== ($row = mysql_fetch_assoc($result)))\n\t\t\t\t\t$rows[] = $row[$col];\n\t\t\t}\n\t\t\treturn $rows;\n\t\t}\n\t\t\n\t\tif (false === $result)\n\t\t\tthrow new DatabaseQueryException(mysql_error($this->_db), $sql);\n\t\treturn array();\n\t}", "title": "" }, { "docid": "9d853a742556ccf0e4a2bb21f97a17c3", "score": "0.57312196", "text": "public function limit($limit = null)\n {\n if(null === $limit)\n {\n return $this->property('limit');\n }\n return $this->property('limit', (int) $limit);\n }", "title": "" }, { "docid": "108a7d488d241749fe4171e7171d0619", "score": "0.5730919", "text": "function get_limit_data($limit, $start = 0, $q = NULL) {\n $this->db->order_by($this->id, $this->order);\n $this->db->like('id', $q);\n\t$this->db->or_like('type', $q);\n\t$this->db->or_like('name', $q);\n\t$this->db->or_like('father_name', $q);\n\t$this->db->or_like('age', $q);\n\t$this->db->or_like('sex', $q);\n\t$this->db->or_like('address', $q);\n\t$this->db->or_like('mobile', $q);\n\t$this->db->or_like('salary', $q);\n\t$this->db->or_like('work_time', $q);\n\t$this->db->or_like('image', $q);\n\t$this->db->or_like('id_image', $q);\n\t$this->db->or_like('id_number', $q);\n\t$this->db->or_like('created at', $q);\n\t$this->db->or_like('date', $q);\n\t$this->db->or_like('status', $q);\n\t$this->db->limit($limit, $start);\n return $this->db->get($this->table)->result();\n }", "title": "" }, { "docid": "85fc0fc0610a877ff9614d5160b0f1fa", "score": "0.57290024", "text": "function selectLimit ($limit, $offset=null)\n {\n return \" LIMIT {$limit}\".($offset? \"{$offset}\": null);\n // please change to whatever select your database accepts\n // adodb doesn't allow us to get the correct limit string out of it\n }", "title": "" }, { "docid": "03ef5be7b3c5077015f90ba8e851ca86", "score": "0.5727419", "text": "function getWhere($table, $condition, $limit=0) {\n \n if (!$limit) {\n $this->db->limit($limit, 0);\n }else\n {\n $this->db->limit(1, 0);\n }\n\n $q = $this->db->get_where($table, $condition);\n $que = $q->num_rows($q);\n if ($que > 0) {\n if (!$limit) {\n return $q->result_array();\n } else {\n return $q->row_array();\n }\n }\n }", "title": "" }, { "docid": "680327edee9f9d241b7837078ef5dd8f", "score": "0.57206917", "text": "public function readPaging($from_record_num, $records_per_page){\n \n // select query\n $query = \"SELECT\n dataregistro, nome, sobrenome, email, senha\n FROM\n \" . $this->table_name . \" \n ORDER BY nome\n LIMIT ?, ?\";\n \n // prepare query statement\n $stmt = $this->conn->prepare( $query );\n \n // bind variable values\n $stmt->bindParam(1, $from_record_num, PDO::PARAM_INT);\n $stmt->bindParam(2, $records_per_page, PDO::PARAM_INT);\n \n // execute query\n $stmt->execute();\n \n // return values from database\n return $stmt;\n}", "title": "" }, { "docid": "2243a5124ed7168008320eb8ba6cd6c4", "score": "0.57045245", "text": "function mystery_limited_query($query, $params, $offset = 0, $count = 100, $connection = 'dbh') {\n\n\tglobal $_MYSTERY;\n\t\n\tmystery_db_connect($connection);\n\t\n\t$query = mystery_convert_placeholder_query($query, $params);\n\t\n\tif ($offset < 0) { $offset = 0; }\n\t\n\tif ($count <= 0 || $count == '') {\n\t\t$count = 100;\n\t}\n\t\n\t$result =& $_MYSTERY[$connection]->limitQuery($query, $offset, $count);\n\t\n\t$result_array = array();\n\t\n\tif (DB::isError($result)) {\n\t\ttrigger_error('Problem with LIMITED SELECT query: ' . $result->getMessage() . \"\\n\\n\" . $result->getDebugInfo(), E_USER_WARNING);\n\t} else {\n\t\tif ($result->numRows() > 0) {\n\t\t\twhile ($row =& $result->fetchRow()) {\n\t\t\t\t$result_array[] = $row;\n\t\t\t}\n\t\t}\n\t\t$result->free();\n\t}\n\n\t$_MYSTERY['query_list'][] = $_MYSTERY[$connection]->last_query;\n\n\treturn $result_array;\n\n}", "title": "" }, { "docid": "d2f4c179aa3f5648c26b0777891975d6", "score": "0.57043326", "text": "public function getLimit() { return $this->data['limit']; }", "title": "" }, { "docid": "d498f835d9b485f99260c6ec255969ce", "score": "0.5695573", "text": "function getRecords($limit_low=0, $limit_high=0){\n\n\t\tif($limit_low < 0){\n\t\t\techo ('Error: limit_low less then 0<br>');\n\t\t\t$limit_low=0;\n\t\t}\n\t\tif($limit_low>=pg_num_rows($this->result_link)){\n\t\t\techo ('Error: limit_low bigger then total result<br>');\n\t\t\t$limit_low=0;\n\t\t}\n\n\t\tpg_result_seek($this->result_link,$limit_low);\n\t\t\n\t\t$result=array();\n\t\t$count=0;\n\t\twhile($row = pg_fetch_assoc($this->result_link)){\n\t\t\tforeach($row as $id => $value){\n\t\t\t\t$row[$id] = stripslashes($value);\n\t\t\t}\n\n\t\t\t$result[] = $row;\n\t\t\tif( $limit_high !=0 && $limit_high == ++$count ) break;\n\t\t}\n\n\t\treturn ($limit_high==1)?$result[0]:$result;\n\n\t}", "title": "" }, { "docid": "dec31a6be373042c1e62799cc8b56fd1", "score": "0.56910783", "text": "public function get_data($table,$condition=array(),$sortcolumn=false,$orderby=false,$uselimit=false,$limit=false,$offset=false)\r\n {\r\n $this->ci->db->select('*');\r\n $this->ci->db->from($table);\r\n if(count($condition)>0)\r\n $this->ci->db->where($condition);\r\n if($sortcolumn)\r\n $this->ci->db->order_by($sortcolumn,$orderby);\r\n if($uselimit)\r\n {\r\n $limit=isset($limit)?$limit:50;\r\n $offset=isset($offset)?$offset:50;\r\n $this->ci->db->limit($limit, $offset);\r\n }\r\n $query = $this->ci->db->get();\r\n $this->ci->db->last_query();\r\n if($query->num_rows() > 0)\r\n {\r\n $result = $query->result();\r\n $query->free_result();\r\n return $result;\r\n }\r\n return array();\r\n }", "title": "" }, { "docid": "7d9f9eaba13060909ffdff08e20a1882", "score": "0.56872237", "text": "public function limit($limit1,$limit2=null)\n {\n $index=$this->SelectSyntaxIndex('LIMIT');\n\n if ($limit2==null) {\n $this->arr[$index]=\" LIMIT $limit1\";\n }\n else {\n $this->arr[$index]=\" LIMIT $limit1,$limit2 \";\n }\n\n return $this;\n }", "title": "" }, { "docid": "16a19c4c04377cd6f232f87e831c36a7", "score": "0.5682398", "text": "public function limit($sqlQuery, $number){ }", "title": "" }, { "docid": "6adb97e6e609e663a47f3eac428910e6", "score": "0.56822", "text": "public function query($limit = 20, array $orderBy = []);", "title": "" }, { "docid": "3287808dba7f3d2eff686c1fe2d12ed6", "score": "0.567811", "text": "public function result(){\n$query=\"select \".join(\",\",$this->args).\" from \".$this->name.\" where \".$this->whereClause;\n//.\" limit \".$this->limitClause;\n$q=$this->conn->query($query);\nreturn $q; \n}", "title": "" }, { "docid": "1ad85cd2a73d5943ed660381bd3e2204", "score": "0.5673726", "text": "function getLatest($select, $table, $order, $limit = 5)\n {\n global $con;\n $stmtC = $con->prepare(\"SELECT $select FROM $table ORDER BY $order DESC LIMIT $limit\");\n $stmtC->execute();\n $row = $stmtC->fetchAll();\n return $row;\n }", "title": "" }, { "docid": "f9dc5e0b791059dd4856f0733dbfdf4d", "score": "0.5670458", "text": "function get_all($limit=false, $offset=false)\n\t{\n\t\t$this->db->from($this->table_name);\n\t\t$this->db->where('status',1);\n\t\t\n\t\tif ($limit) {\n\t\t\t$this->db->limit($limit);\n\t\t}\n\t\t\n\t\tif ($offset) {\n\t\t\t$this->db->offset($offset);\n\t\t}\n\t\t\n\t\t$this->db->order_by('added','desc');\n\t\treturn $this->db->get();\n\t}", "title": "" }, { "docid": "22d3e76aa31e2bbab5ca8e245ca043ab", "score": "0.5669544", "text": "function getLatest($select,$table,$order,$limit = 5){\n global $con;\n $getstmt = $con->prepare(\"SELECT $select FROM $table ORDER BY $order DESC LIMIT $limit\");\n $getstmt->execute();\n $rows = $getstmt->fetchAll();\n\n return $rows;\n}", "title": "" }, { "docid": "02f6c1f4fc5781780bac861f8d8699ce", "score": "0.5667697", "text": "function get_limit_data($limit, $start = 0, $q = NULL) {\r\n $this->db->order_by($this->id, $this->order);\r\n $this->db->like('id_users', $q);\r\n $this->db->or_like('full_name', $q);\r\n $this->db->or_like('email', $q);\r\n $this->db->or_like('password', $q);\r\n $this->db->or_like('images', $q);\r\n $this->db->or_like('id_user_level', $q);\r\n $this->db->or_like('is_aktif', $q);\r\n $this->db->limit($limit, $start);\r\n return $this->db->get($this->table)->result();\r\n }", "title": "" }, { "docid": "89b827a398bba01f22ee42922a82cf84", "score": "0.56628895", "text": "function getLatest($select, $from, $order, $limit = 5) {\r\n global $con;\r\n $getStmt = $con -> prepare(\"SELECT $select FROM $from ORDER BY $order DESC LIMIT $limit\");\r\n $getStmt -> execute();\r\n $rows = $getStmt -> fetchAll();\r\n return $rows;\r\n }", "title": "" }, { "docid": "e3e583cfa8e9c33881d6bbc736ecceed", "score": "0.5657608", "text": "function getResults($offset, $limit)\n {\n return array_slice($this->array, $offset, $limit, true);\n }", "title": "" }, { "docid": "07a70ad1192c720187c20e32ba914519", "score": "0.5656484", "text": "public function findAllLimit($limit)\n {\n $this->db->select()\n ->from($this->getSource())\n ->orderBy(\"created desc\")\n ->limit($limit);\n $this->db->execute();\n return $this->db->fetchAll();\n }", "title": "" }, { "docid": "ab39f960d0a13f543b767530b3d6567b", "score": "0.5653705", "text": "public function limit($sqlQuery, $number);", "title": "" } ]
c5a92ec75c09c7a3180618282734509a
/ PAGE DE CREATION DES CODES DE REDUCTION ///
[ { "docid": "6c30c7c1fed85e42ea6c3c60ebdbc148", "score": "0.0", "text": "function htm_creer_code_reduc($e)\r\n{\r\n\tglobal $language_adm;\r\n\t\r\n?>\t\r\n\r\n<div id=\"menu_right\">\r\n\r\n\t<div class=\"menus_r_haut\">\r\n\t\r\n\t\t<ul class=\"ul_barre_adm\">\r\n\t\t\t<li class=\"li_barre_adm\">\r\n\t\t\t<?php echo $language_adm['page_code_reduc_crea_info']; ?>\r\n\t\t\t</li>\r\n\t\t</ul>\r\n\t\r\n\t</div>\r\n\t\r\n\t<form method=\"post\" action=\"\">\r\n\t\r\n\t<div class=\"menus_r_fond\">\r\n\t \r\n\t\t<?php\r\n\t\t\r\n\t\tif(!empty($e) && $e == 1) echo '<div class=\"form_left\"></div><div class=\"form_right\"><p><span class=\"error\">'. $language_adm['page_code_reduc_crea_error1'] .'</span></p></div>';\r\n\t\tif(!empty($e) && $e == 2) echo '<div class=\"form_left\"></div><div class=\"form_right\"><p><span class=\"error\">'. $language_adm['page_code_reduc_crea_error2'] .'</span></p></div>';\r\n\t\t\r\n\t\t?>\r\n\r\n\t\t<div class=\"form_left\"><?php echo $language_adm['page_code_reduc_crea_prix']; ?> :</div>\r\n\t\t<div class=\"form_right\"><input class=\"input_con\" type=\"text\" name=\"prix\" value=\"<?php if(isset($_POST['prix'])) echo $_POST['prix']; ?>\" /></div>\r\n\t\t\r\n\t\t<div class=\"form_left\"><?php echo $language_adm['page_code_reduc_crea_code']; ?> :</div>\r\n\t\t<div class=\"form_right\"><input class=\"input_con\" type=\"text\" name=\"code\" value=\"<?php if(isset($_POST['code'])) echo $_POST['code']; ?>\" /></div>\r\n\t\t\r\n\t\t<div class=\"form_left\"><?php echo $language_adm['page_code_reduc_crea_type']; ?> :</div>\r\n\t\t<div class=\"form_right\">\r\n\t\t\t<select name=\"type\" class=\"input_select\">\r\n\t\t\t\t<option value=\"1\" <?php if(isset($_POST['type']) && $_POST['type'] == 1) echo 'selected=\"selected\"'; ?> ><?php echo $language_adm['page_code_reduc_crea_type1']; ?></option>\r\n\t\t\t\t<option value=\"2\" <?php if(isset($_POST['type']) && $_POST['type'] == 2) echo 'selected=\"selected\"'; ?> ><?php echo $language_adm['page_code_reduc_crea_type2']; ?></option>\r\n\t\t\t</select>\r\n\t\t</div>\r\n\t\t\r\n\t\t<div class=\"form_left\"><?php echo $language_adm['page_code_reduc_crea_val1']; ?> :</div>\r\n\t\t<div class=\"form_right_checkbox\">\r\n\t\t\t<input type=\"checkbox\" class=\"input_checkbox\" id=\"val1\" name=\"val1\" value=\"1\" onclick=\"turnImgCheck(this);\" <?php if (!empty($_POST['val1'])) echo 'checked=\"checked\"'; ?> />\r\n\t\t\t<img <?php if (!empty($_POST['val1'])) echo 'src=\"images/check2.png\"'; else echo 'src=\"images/check1.png\"'; ?> id=\"img_check_val1\" alt=\"\" />\r\n\t\t</div>\r\n\t\t\r\n\t\t<div class=\"form_left\"><?php echo $language_adm['page_code_reduc_crea_val2']; ?> :</div>\r\n\t\t<div class=\"form_right_checkbox\">\r\n\t\t\t<input type=\"checkbox\" class=\"input_checkbox\" id=\"val2\" name=\"val2\" value=\"1\" onclick=\"turnImgCheck(this);\" <?php if (!empty($_POST['val2'])) echo 'checked=\"checked\"'; ?> />\r\n\t\t\t<img <?php if (!empty($_POST['val2'])) echo 'src=\"images/check2.png\"'; else echo 'src=\"images/check1.png\"'; ?> id=\"img_check_val2\" alt=\"\" />\r\n\t\t</div>\r\n\t\t\r\n\t\t<div class=\"form_left\"><?php echo $language_adm['page_code_reduc_crea_val3']; ?> :</div>\r\n\t\t<div class=\"form_right_checkbox\">\r\n\t\t\t<input type=\"checkbox\" class=\"input_checkbox\" id=\"val3\" name=\"val3\" value=\"1\" onclick=\"turnImgCheck(this);\" <?php if (!empty($_POST['val3'])) echo 'checked=\"checked\"'; ?> />\r\n\t\t\t<img <?php if (!empty($_POST['val3'])) echo 'src=\"images/check2.png\"'; else echo 'src=\"images/check1.png\"'; ?> id=\"img_check_val3\" alt=\"\" />\r\n\t\t</div>\r\n\t\t\r\n\t\t<div class=\"form_left\"><?php echo $language_adm['page_code_reduc_crea_val4']; ?> :</div>\r\n\t\t<div class=\"form_right_checkbox\">\r\n\t\t\t<input type=\"checkbox\" class=\"input_checkbox\" id=\"val4\" name=\"val4\" value=\"1\" onclick=\"turnImgCheck(this);\" <?php if (!empty($_POST['val4'])) echo 'checked=\"checked\"'; ?> />\r\n\t\t\t<img <?php if (!empty($_POST['val4'])) echo 'src=\"images/check2.png\"'; else echo 'src=\"images/check1.png\"'; ?> id=\"img_check_val4\" alt=\"\" />\r\n\t\t</div>\r\n\t\t\r\n\t\t<div class=\"form_left\"><?php echo $language_adm['page_code_reduc_crea_val5']; ?> :</div>\r\n\t\t<div class=\"form_right_checkbox\">\r\n\t\t\t<input type=\"checkbox\" class=\"input_checkbox\" id=\"val5\" name=\"val5\" value=\"1\" onclick=\"turnImgCheck(this);\" <?php if (!empty($_POST['val5'])) echo 'checked=\"checked\"'; ?> />\r\n\t\t\t<img <?php if (!empty($_POST['val5'])) echo 'src=\"images/check2.png\"'; else echo 'src=\"images/check1.png\"'; ?> id=\"img_check_val5\" alt=\"\" />\r\n\t\t</div>\r\n\t\t\r\n\t\t<div class=\"form_left\"><?php echo $language_adm['page_code_reduc_crea_val6']; ?> :</div>\r\n\t\t<div class=\"form_right_checkbox\">\r\n\t\t\t<input type=\"checkbox\" class=\"input_checkbox\" id=\"val6\" name=\"val6\" value=\"1\" onclick=\"turnImgCheck(this);\" <?php if (!empty($_POST['val6'])) echo 'checked=\"checked\"'; ?> />\r\n\t\t\t<img <?php if (!empty($_POST['val6'])) echo 'src=\"images/check2.png\"'; else echo 'src=\"images/check1.png\"'; ?> id=\"img_check_val6\" alt=\"\" />\r\n\t\t</div>\r\n\t\t\r\n\t\t<div class=\"form_left\"></div>\r\n\t\t<div class=\"form_right\"><input class=\"submit\" type=\"submit\" value=\"<?php echo $language_adm['bt_link_valider']; ?>\" /></div>\r\n\t\t\r\n\t</div>\r\n\t\r\n\t</form>\r\n\r\n</div>\r\n\r\n<?php\r\n}", "title": "" } ]
[ { "docid": "7bc6ef3f58b6e6c6ef5dc8b00c54b3a0", "score": "0.6139613", "text": "function contenidos() \n\t{\n\t\tglobal $__CLI, $__LIB, $CLEAN_GET, $__BD;\n\t\t\n\t\t$__LIB->comprobarCliente(true);\n\t\t\n\t\techo '<div class=\"titPagina\">'._MI_CUENTA.'</div>';\n\t\t\n\t\techo '<div class=\"cajaTexto\">';\n\t\t\n\t\tif (!isset($_SESSION[\"codCliente\"])) {\n\t\t\techo _DEBES_LOGIN;\n\t\t\tinclude(\"../includes/right_bottom.php\");\n\t\t\techo '</div>';\n\t\t\texit;\n\t\t}\n\t\t\t\n\t\t$__CLI->seccionCuenta('pedidos');\n\t\t\n\t\t$codigo = \"\";\n\t\tif (isset($CLEAN_GET[\"codigo\"])) {\n\t\t\t$codigo = $CLEAN_GET[\"codigo\"];\t\n\t\t\t$codCliente = $_SESSION[\"codCliente\"];\n\t\t\t$id = $__BD->db_valor(\"select idpedido from pedidoscli where codigo='$codigo' and codcliente = '$codCliente'\");\n\t\t\n\t\t\tif (!$id) {\n\t\t\t\techo _PEDIDO_ERRONEO;\n\t\t\t\techo '</div>';\n\t\t\t\tinclude(\"../includes/right_bottom.php\");\n\t\t\t\texit;\n\t\t\t}\n\t\n\t\t\techo $__LIB->imprimirDocFacturacion(\"pedido\", $id);\t\t\n\t\t}\n\t\telse\n\t\t\techo $__CLI->docsFacturacion('pedidos');\n\t\t\n\t\techo '<p class=\"separador\"/>';\n\t\techo '</div>';\n\t}", "title": "" }, { "docid": "3229d39c734ca96cb79979bb339a9887", "score": "0.612066", "text": "function CabeceraListado()\n\t{\n\t\t// Obtenemos la gama de colores a usar\n\t\t$gama_colores=InformesNoticiasPDF::ObtenerGamaColores($this->color);\t\t\n\t\t\n\t\t$this->pdf->SetFont('Arial','B',$this->tam_letra);\n\t\t$this->pdf->SetTextColor(0,0,0);\t\n\t\t$this->pdf->SetFillColor($gama_colores['cabecera'][0], $gama_colores['cabecera'][1], $gama_colores['cabecera'][2]);\n\t\t$this->pdf->SetWidths(array(280));\n\t\t$this->pdf->SetAligns(array(\"C\"));\n\n\t\tif(!is_null($this->pos_x))\n\t\t\t$this->pdf->SetX($this->pos_x);\n\t\t$this->pdf->Row(array(\"NOTICIAS\"),true);\t\n\t\t$this->pdf->SetFont('Arial','B',$this->tam_letra);\n\t\t$this->pdf->SetFillColor($gama_colores['cabecera2'][0], $gama_colores['cabecera2'][1], $gama_colores['cabecera2'][2]);\n\t\t$this->pdf->SetWidths(array(60,190,30));\n\t\t$this->pdf->SetAligns(array(\"C\",\"C\",\"C\"));\n\n\t\tif(!is_null($this->pos_x))\n\t\t\t$this->pdf->SetX($this->pos_x);\n\t\t$this->pdf->Row(array(\"Título\",\"Descripción\",\"Fecha Alta\"),true);\t\t\t\t\t\n\t}", "title": "" }, { "docid": "73dc6eacf275d0996c12d630a8db90fe", "score": "0.6110554", "text": "protected function registro_C610(){\n\n\t}", "title": "" }, { "docid": "5a6fef18a70d240ffa601ec4593b6ea5", "score": "0.61104935", "text": "function entetecarte($IDDNR,$TYPECARTE)\n {\n\t//1ere page\n\t//face droite\n\t$this->AddPage('p','A5');\n\t$this->SetDisplayMode('fullpage','single');//mode d affichage \n\t$this->Image('../public/images/photos/LOGOAO.GIF',105,25,15,15,0);//image (url,x,y,hauteur,largeur,0)\n\t$this->SetFont('Arial','B',6);\n\t$this->RoundedRect(78, 1, 70, 100, 2, $style = '');\n\t$this->SetTextColor(225,0,0); \n\t$this->Text(82,10,\"REPUBLIQUE ALGERIENNE DEMOCRATIQUE ET POPULAIRE \");\n\t$this->Text(96,15,\"AGENCE NATIONALE DU SANG\");\n\t$this->Text(90,20,\"AGENCE REGIONALE DU SANG \".$this->nbrtostring($this->db_name,\"ars\",\"IDARS\",$this->REGION(),\"WILAYAS\"));\n\t$this->SetTextColor(0,0,0); \n\t$this->Line(80 ,23 ,145 ,23 );\n\t$this->SetFont('Arial','B',14);\n\t$this->Text(104,48,\"CARTE\");\n\t$this->Text(88,53,$TYPECARTE);\n\t$this->SetFont('Arial','B',8);\n\t$this->Text(90,60,\"Structure de Transfusion Sanguine:\");\n\t$this->Text(90,65,$this->nbrtostring($this->db_name,\"cts\",\"IDCTS\",$this->STRUCTURE(),\"CTS\"));\n\t$this->Text(90,70,\"wilaya de \".$this->nbrtostring($this->db_name,\"wrs\",\"IDWIL\",$this->WILAYA(),\"WILAYAS\"));\n\t$this->SetFont('Arial','B',7);\n\t$this->Text(80,84,\"Numéro d'identification du donneur:\");//\n\t$this->Text(80,98,\"Delivrée le:\");\n\t$this->SetFont('Arial','B',8);\n\t$this->SetTextColor(225,0,0);\n\t$this->Text(93,98,date('d/m/Y'));\n\t$this->SetTextColor(0,0,0);\n\t$this->Code39(80,85 , $IDDNR, $baseline=0.5, $height=5);\n\t}", "title": "" }, { "docid": "f4ada916626bbecbfb543fd6b7e2f2db", "score": "0.61038053", "text": "function cl_cadvencdesc() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"cadvencdesc\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "d91e269cbc33f8076a776046e0dc6801", "score": "0.6077267", "text": "function cl_custoplanoanaliticabens() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"custoplanoanaliticabens\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "70e8f0238bac18d919e8bc6a28e91fa8", "score": "0.60578865", "text": "public function compras()\n {\n }", "title": "" }, { "docid": "d645fc3d5aa7c930a24b7630754cb278", "score": "0.6047119", "text": "public function accueil() {\n\n $billets = $this->billet->get_articles();\n\n $vue = new Vue(\"Accueil\");\n $vue->generer(array('billets' => $billets));\n\n }", "title": "" }, { "docid": "8d64c69e4dee0795c714cbcaf973901b", "score": "0.60149205", "text": "public function initContent()\r\n\t{\r\n\t\t// PAR DEFAUT DESACTIVER COLONNE DE GAUCHE ET DE DROITE\r\n \t\t$this->display_column_left = false;\r\n \t\t$this->display_column_right = false;\r\n\r\n\t\tparent::initContent();\r\n\t\t// VIEW LISTE DOWNLOAD GENERAUX\r\n\t \t$this->viewDownloadList();\r\n\t \t// DISPLAY IF AJAX\r\n\t \tif (Tools::getValue('id_product')){\r\n\t \t $this->ajaxDownloadProduct();\r\n\t \t}\r\n\t \t/*select ref product pour al liste */\r\n\t \t$products = DownloadModule:: getAllRefProduct();\r\n\r\n \t\t/* display des téléchargements généraux */\r\n\t\t$this->context->smarty->assign(array('products' => $products)); \r\n \t\t// VIEW GENERAL FRONT\r\n \t\t$this->setTemplate('downloadpage_front.tpl'); \r\n\t\r\n\t}", "title": "" }, { "docid": "7912af06f04b5dd03d16ebc0654d8630", "score": "0.6001311", "text": "function MTD_INICIALIZAR_PAGINA ()\n {\n \tLOGGER::LOG(\"Asignando el template:\");\n \t\n \t$vlc_codigo_html=FN_LEER_TPL('tpl/tpl-abm-subcategorias.html');\n \t$vlc_codigo_html = FN_REEMPLAZAR(\"{tpl-lista-subcategorias}\",$this->MTD_LISTAR_SUBCATEGORIAS(),$vlc_codigo_html );\n $vlc_codigo_html = FN_REEMPLAZAR(\"{tpl-lista-categorias}\",$this->MTD_SELECCION_CATEGORIAS(),$vlc_codigo_html );\n \t$this->vlc_codigo_html= $vlc_codigo_html;\n \n \n }", "title": "" }, { "docid": "12b43f43b30cabd9e4af0ef927627a2f", "score": "0.5997634", "text": "public function convenios(){\n\t\ttry{\n\t\t\t$crud = new grocery_CRUD();\n\n\t\t\t$crud->where('convenios.eliminado = 0');\n\t\t\t$crud->set_table('convenios');\n\t\t\t$crud->set_subject('convenios');\n\t\t\t$crud->required_fields('cod_convenio', 'convenio');\n\t\t\t$crud->fields('cod_convenio', 'convenio');\n\t\t\t$crud->columns('cod_convenio', 'convenio');\n\t\t\t$crud->display_as('cod_convenio','Código convenio');\n\n\t\t\t$output = $crud->render();\n\n\t\t\t$this->armar_vista_crud($output);\n\n\t\t}catch(Exception $e){\n\t\t\tshow_error($e->getMessage().' --- '.$e->getTraceAsString());\n\t\t}\n\t}", "title": "" }, { "docid": "affd4892ccc0c6063e43802f6ecf0127", "score": "0.5996894", "text": "function cpl_print_page_redac($isLogged){\r\n\r\n cp_print_beginPage('redaction','La rédac',1,$isLogged);\r\n\r\n echo '<section>',\r\n '<h2>Le mot de la rédaction</h2>',\r\n '<p>',\r\n 'Passionnés par le journalisme d\\'investigation depuis notre plus jeune âge, nous avons créé en 2019 ce site ',\r\n 'pour répondre à un réel besoin : celui de fournir une information fiable et précise sur la vie de la ',\r\n '<abbr title=\"Licence Informatique\">L-INFO</abbr> ',\r\n 'de <a href=\"https://www.univ-fcomte.fr/\">l\\'Université de Franche-Comté</a>.',\r\n '</p>',\r\n '<p>',\r\n 'Découvrez les hommes et les femmes qui composent l\\'équipe de choc de la Gazette de L-INFO.',\r\n '</p>',\r\n\r\n '</section>';\r\n\r\n $editorData = cpl_fetch_editor_data();\r\n if($editorData != null){\r\n foreach($editorData as $category){\r\n cpl_print_category($category);\r\n }\r\n }\r\n\r\n echo '<section class=\"type1\">',\r\n '<h2>La Gazette de L-INFO recrute !</h2>',\r\n '<p>',\r\n 'Si vous souhaitez vous aussi faire partie de notre team, rien de plus simple. Envoyez-nous un mail grâce au lien dans le menu de navigation, et rejoignez l\\'équipe.',\r\n '</p>',\r\n '</section>';\r\n\r\n cp_print_endPage();\r\n\r\n}", "title": "" }, { "docid": "53c459c5d78ac5099d789b42512e7c05", "score": "0.5992142", "text": "public function accueil() {\n $articles = $this->article->get3Articles();\n $vue = new Vue(\"vueAccueil\");\n $vue->generer(array('articles' => $articles));\n }", "title": "" }, { "docid": "2328eb365be65ba0ba165882ab23fdba", "score": "0.5982248", "text": "protected function registro_C690(){\n\n\t}", "title": "" }, { "docid": "6d3709063e868e0d42c431488c81b5e8", "score": "0.59801775", "text": "public function ccCompaniaAction(){\n\t\t$params = $this->_request->getParams();\n\t\t//echo\"<pre>\";\n\t\t//print_r($params);\n\n\t\t//Trae el nombre del asegurado\n\t\t$this->view->compania = Domain_Compania::getNameById($params['compania_id']);\n\t\t$this->view->compania_id = $params['compania_id'];\n\t\t//Seria la sumatoria de todos los pagos que hizo\n\t\t$moneda_pesos = Domain_Helper::getHelperIdByDominioAndName('moneda', 'PESOS');\n\t\t$moneda_dolar = Domain_Helper::getHelperIdByDominioAndName('moneda', 'DOLAR');\n\t\t$moneda_euro = Domain_Helper::getHelperIdByDominioAndName('moneda', 'EURO');\n\t\t \n\t\t\n\t\t\n\t\t//Trae la sumatoria de todo lo que debe segun las polizas\n\t\t$this->view->debe_pesos = Domain_Compania::getDebePremioCompaniaByCompaniaIdAndMoneda($params['compania_id'],$moneda_pesos);\n\t\t$this->view->debe_dolar = Domain_Compania::getDebePremioCompaniaByCompaniaIdAndMoneda($params['compania_id'],$moneda_dolar);\n\t\t$this->view->debe_euro = Domain_Compania::getDebePremioCompaniaByCompaniaIdAndMoneda($params['compania_id'],$moneda_euro);\n\t\t\n\t\t\n\t\t\n\t\t//Trae la sumatoria de todo lo que pago\n\t $this->view->pago_pesos = Domain_Compania::getPagoPremioCompaniaByCompaniaIdAndMoneda($params['compania_id'],$moneda_pesos);\n\t\t$this->view->pago_dolar = Domain_Compania::getPagoPremioCompaniaByCompaniaIdAndMoneda($params['compania_id'],$moneda_dolar);\n\t\t$this->view->pago_euro = Domain_Compania::getPagoPremioCompaniaByCompaniaIdAndMoneda($params['compania_id'],$moneda_euro);\n\t\n\n\t\t//Si es Compania que muestre los ultimos dos meses\n\t\t//Arreglo rapido\n\t\t$es_compania = ($this->_usuario->getTipoUsuario()->getNombre() == 'COMPANIA')? 1 : 0;\n\t\t\n\t\t\tif($params['numero_poliza']!=''){\n\n\t\t\t\t\t$rows = Domain_Compania::getMovimientosByCompaniaIdAndPoliza($params['compania_id'],$params['numero_poliza'],$es_compania);\n\n\n\t\t\t}else{\n\t\t\t\t\t$rows = Domain_Compania::getMovimientosByCompaniaId($params['compania_id'],$es_compania);\n\t\t\t}\n\n\t\t$page=$this->_getParam('page',1);\n\t\t$paginator = Zend_Paginator::factory($rows);\n\t\t$paginator->setItemCountPerPage(10);\n\t\t$paginator->setCurrentPageNumber($page);\n\t\t$this->view->rows = $paginator;\n\t\t//$this->view->rows = $rows; \n\t\t\n\t}", "title": "" }, { "docid": "f484dabd33577dc1112b90af0b9e24de", "score": "0.596571", "text": "function print_coberturas(){\n $this->permiso_administrador();\n\n $this->load->model('tpoadminv1/catalogos/Coberturas_model');\n \n $data['title'] = \"Coberturas de la campa&ntilde;a \";\n $data['registros'] = $this->Coberturas_model->dame_todas_coberturas();\n \n //lista de nombre de las columnas como se carga en el array de registros\n $data['registros_columnas'] = array(\n 'id_campana_cobertura',\n 'nombre_campana_cobertura',\n 'active'\n );\n //lista de nombre de los <th> para la tabla, debe ser el mismo numero de registros que el array de registros_columnas\n $data['nombre_columnas'] = array(\n '#',\n 'Coberturas de la campaña',\n 'Estatus'\n );\n\n $this->load->view('tpoadminv1/includes/print_template', $data);\n }", "title": "" }, { "docid": "ce927daf1acedf5a04fce48536a03175", "score": "0.5943911", "text": "function cl_mer_cardapioitem() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"mer_cardapioitem\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "2e88b9bc27e98b40447d5265aebab6d5", "score": "0.5933477", "text": "function cl_cargorhrubricas() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"cargorhrubricas\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "f72cb5b470d928941ef0bed512212349", "score": "0.5933414", "text": "function crearlibronuevo(){\n $listacategorias = $this->modeloCategorias->getAll();\n $this->vistalibro->showCrearlibro($listacategorias);\n }", "title": "" }, { "docid": "28a8a89437aca5e03df3cb18eb64f9a1", "score": "0.59060943", "text": "public function main(){\n\n $idComision = $_GET[\"comision\"];\n\n $render = $this->container->getRender(\"alumno_comision\");\n $render->setSize(0);\n $render->setCondition([\"comision\",\"=\",$idComision]);\n \n $alumnoComision_ = $this->container->getDb()->all(\"alumno_comision\",$render);\n \n\n }", "title": "" }, { "docid": "e66a763b824f548fdb242bf9183d5d33", "score": "0.5880593", "text": "function seznam_cz_new() {\n\t\t$this->layout = 'xml/zbozi_cz';\n\n\t\t$products = $this->get_products(2);\n\t\t$this->set('products', $products);\n\n\t\t// produkty zobrazovane na detailu na firmy.cz\n\t\t$this->set('firmy_cz_products', array(762, 971, 880, 363, 654));\n\t}", "title": "" }, { "docid": "44f21d966c3b00cbde756289b5c57025", "score": "0.5877672", "text": "protected function bloco_C(){\n\t\t$this->registro_C001();\n\t\t$this->registro_C990();\n\t}", "title": "" }, { "docid": "be8d135c06c635634fa94b2904300b57", "score": "0.5866791", "text": "function cl_cancdebitosreg() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"cancdebitosreg\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "79e802287ee1aa1720e434685306b74b", "score": "0.5859577", "text": "public function detailsdescopiedefacturesoriginaleseffectuerparlatechnopoleAction () {\n $this->_helper->layout()->setLayout('layoutpublicesmcadmin'); \n $db = Zend_Db_Table::getDefaultAdapter();\n $id = (int)$this->_request->getParam('id');\n $created = Zend_Date::now(); \n $request = $this->getRequest();\n $date_choix = $created->toString('yyyy-MM-dd HH:mm:ss');\n \n if($_SERVER['REQUEST_METHOD'] == 'GET'){\n $dbverifid = \" SELECT eu_factures_procedure.id_factures_procedure\n FROM eu_factures_procedure\n WHERE eu_factures_procedure.id_factures_procedure = '$id'\n AND eu_factures_procedure.copie_technopole = 'ok'\n AND eu_factures_procedure.valid_down = 1\";\n $db->setFetchMode(Zend_Db::FETCH_OBJ);\n $stmt = $db->query($dbverifid);\n $dbverificationdelavaliditedeidfacture = $stmt->fetchAll();\n $countdbverificationdelavaliditedeidfacture = count($dbverificationdelavaliditedeidfacture);\n \n if($countdbverificationdelavaliditedeidfacture === 0){\n http_response_code(403);\n die('Vous tentez d\\'effectuer une action qui n\\'est pas autorisé');\n }\n }\n $dbverifid = \" SELECT \n eu_factures_procedure.numero_facture,\n eu_factures_procedure.numero_interne,\n eu_factures_procedure.libelle,\n eu_factures_procedure.date_facture,\n eu_factures_procedure.date_paiement,\n eu_factures_procedure.date_arrivee,\n eu_factures_procedure.montant,\n eu_factures_procedure.modalite_paiement,\n eu_factures_procedure.copie_technopole,\n eu_factures_procedure.id_factures_procedure\n FROM eu_factures_procedure\n WHERE eu_factures_procedure.id_factures_procedure= '$id'\n AND eu_factures_procedure.copie_technopole = 'ok'\n AND eu_factures_procedure.valid_down = 1\";\n $db->setFetchMode(Zend_Db::FETCH_OBJ);\n $stmt = $db->query($dbverifid);\n $dbdetailcopiedelafactureavaliderparlatechnopole = $stmt->fetchAll();\n $this->view->detailcopiedelafactureavaliderparlatechnopole = $dbdetailcopiedelafactureavaliderparlatechnopole; \n }", "title": "" }, { "docid": "d1974e0ee2f656b952ec0b116a620f20", "score": "0.5856019", "text": "function showCours() {\n $datas = [];\n $cours = new Cours();\n $cours->setIdUtilisateur($_SESSION[\"id\"]);\n $datas[\"cours\"]= $cours->selectByUser();\n if(isset($_GET['id'])) {\n $cours->setIdCours($_GET['id']);\n $cours1 = $cours->select();\n $datas[\"cou\"]=$cours1;\n }\n\n foreach($datas[\"cours\"] as &$cou){\n $utilisateur = new Utilisateurs();\n $utilisateur->setIdUtilisateur($cou->getIdUtilisateur());\n $user= $utilisateur->select();\n $cou->user = $user;\n }\n\n foreach($datas[\"cours\"] as &$cou){\n\n $cou->setTitre(htmlspecialchars($cou->getTitre()));\n $cou->setImage(htmlspecialchars($cou->getImage()));\n $cou->setContenu(htmlspecialchars($cou->getContenu()));\n }\n\n $matiere = new Matiere();\n $datas[\"matiere\"]= $matiere->selectAll();\n\n\n return [\"template\" => \"cours.php\", \"datas\" => $datas];\n}", "title": "" }, { "docid": "8985977af8bfe0d4758c3f9f1083eed7", "score": "0.58549047", "text": "function __construct() {\n\n /**\n * Definicion de tipos de campos\n */\n $filter = new Filter();\n $filter->eq_(\"status_id\", 1);\n $this->addAuthFields();\n $this->assignType(\"person_id\", JText::_(\"COM_CTC_EMPLOYEE\"), BaseView::ENTITY, array(\n BaseView::ENT_VAR_NAME => \"Person\",\n BaseView::ENT_CLASS => \"Person\",\n BaseView::ENT_FIELD_DEL => \" \",\n BaseView::ENT_FIELD => array(\"name\",\n \"last_name\",\n \"identification\"),\n BaseView::ENT_FILTER => $filter));\n $this->assignType(\"area_id\", JText::_(\"COM_CTC_AREA\"), BaseView::ENTITY, array(\n BaseView::ENT_CLASS => \"Area\",\n BaseView::ENT_FIELD => \"name\",\n BaseView::ENT_FILTER => $filter,\n BaseView::CUSTOM_OPER => JText::_(\"COM_CTC_BELONG_TO\")));\n\n $this->assignType(\"cost_center_id\", JText::_(\"COM_CTC_COST_CENTER\"), BaseView::ENTITY, array(\n BaseView::ENT_CLASS => \"CostCenter\",\n BaseView::ENT_FIELD => \"name\",\n BaseView::ENT_FILTER => $filter));\n $this->assignType(\"start_date\", JText::_(\"COM_CTC_START_DATE\"), BaseView::DATE);\n $this->assignType(\"end_date\", JText::_(\"COM_CTC_END_DATE\"), BaseView::DATE);\n $this->assignType(\"noDelete\", JText::_(\"COM_CTC_REGENERATE\"), BaseView::PICKLIST, array(\n \"F\" => JText::_(\"COM_CTC_REGENERATE_ALL\"),\n \"T\" => JText::_(\"COM_CTC_REGENERATE_NP\") //\"Unicamente no procesados.\"\t\t\n ));\n\n /**\n * Definicion de vistas y sus acciones\n */\n $class = \"Reprocess\";\n $this->addViewEx(\"form\", array());\n $this->addAction(\"form\", $class . \"_form_submit\", JText::_(\"COM_CTC_REPROCESS\"), \"save.png\");\n $this->addAction(\"form\", $class . \"_form_cancel\", JText::_(\"COM_CTC_CANCEL\"), \"remove.png\");\n $this->addAuthView(\"form\");\n\n $gclass = \"generate\";\n $this->addViewEx(\"formgpr\", array());\n $this->addAction(\"formgpr\", $gclass . \"_form_submit\", JText::_(\"COM_CTC_CLASSIFY\"), \"save.png\");\n $this->addAction(\"formgpr\", $gclass . \"_form_cancel\", JText::_(\"COM_CTC_CANCEL\"), \"remove.png\");\n $this->addAuthView(\"formgpr\");\n\n $HPCclass = \"HPC\";\n $this->addViewEx(\"formHPC\", array());\n $this->addAction(\"formHPC\", $HPCclass . \"_form_submit\", JText::_(\"COM_CTC_PERIOD_CLASSIFY\"), \"save.png\");\n $this->addAction(\"formHPC\", $HPCclass . \"_form_cancel\", JText::_(\"COM_CTC_CANCEL\"), \"remove.png\");\n $this->addAuthView(\"formHPC\");\n }", "title": "" }, { "docid": "ac0d039ec0a5d889aab6ef3ecda96fde", "score": "0.5837667", "text": "public function create_constancia(){\n \n $constancias = (object) array(\n (object) array('nombre_alumno' => 'Gabriela Bonilla', 'nivel' => 'A1', 'periodo' => '13 de febrero al 14 de mayo de 2017', 'fecha' => '23 de diciembre de 2014', 'folio' => '2016-3423'),\n (object) array('nombre_alumno' => 'Nazir Nahun Ortiz Avila', 'nivel' => 'B2', 'periodo' => '20 de marzo al 14 de mayo de 2017', 'fecha' => '01 de octubre de 2017', 'folio' => '2012-3481'),\n (object) array('nombre_alumno' => 'Véronica Herrera Porras', 'nivel' => 'C4', 'periodo' => '12 de julio al 30 de septimebre de 2018', 'fecha' => '12 de julio de 2017', 'folio' => '2019-0034')\n );\n \n $generador = new Constancias_Pdf_sepaonline();\n $generador->generarConstancias($constancias);\n }", "title": "" }, { "docid": "6b335d64b92b6bb6aef8ca3b17742f05", "score": "0.5836942", "text": "function Geral() {\r\n \r\n extract($GLOBALS);\r\n global $w_Disabled;\r\n $w_chave = $_REQUEST['w_chave'];\r\n $w_sq_tipo_lancamento = $_REQUEST['w_sq_tipo_lancamento'];\r\n $w_readonly = '';\r\n $w_erro = '';\r\n // Carrega o segmento do cliente\r\n $sql = new db_getCustomerData; $RS = $sql->getInstanceOf($dbms,$w_cliente); \r\n \r\n $w_segmento = f($RS,'segmento');\r\n \r\n // Verifica se há necessidade de recarregar os dados da tela a partir\r\n // da própria tela (se for recarga da tela) ou do banco de dados (se não for inclusão)\r\n if ($w_troca>'') {\r\n // Se for recarga da página\r\n $w_sq_menu_relac = $_REQUEST['w_sq_menu_relac']; \r\n if($w_sq_menu_relac=='CLASSIF') {\r\n $w_chave_pai = '';\r\n } else {\r\n $w_chave_pai = $_REQUEST['w_chave_pai'];\r\n }\r\n\r\n $w_sq_tipo_documento = $_REQUEST['w_sq_tipo_documento'];\r\n $w_pessoa = $_REQUEST['w_pessoa'];\r\n $w_pessoa_atual = $_REQUEST['w_pessoa_atual'];\r\n $w_tipo_pessoa = $_REQUEST['w_tipo_pessoa'];\r\n $w_nm_tipo_pessoa = $_REQUEST['w_nm_tipo_pessoa'];\r\n $w_sq_acordo_parcela = $_REQUEST['w_sq_acordo_parcela'];\r\n $w_sq_forma_pagamento = $_REQUEST['w_sq_forma_pagamento'];\r\n $w_forma_atual = $_REQUEST['w_forma_atual'];\r\n $w_observacao = $_REQUEST['w_observacao'];\r\n $w_aviso = $_REQUEST['w_aviso'];\r\n $w_dias = $_REQUEST['w_dias'];\r\n $w_codigo_interno = $_REQUEST['w_codigo_interno'];\r\n $w_chave = $_REQUEST['w_chave'];\r\n $w_chave_aux = $_REQUEST['w_chave_aux'];\r\n $w_sq_menu = $_REQUEST['w_sq_menu'];\r\n $w_sq_unidade = $_REQUEST['w_sq_unidade'];\r\n $w_sq_tramite = $_REQUEST['w_sq_tramite'];\r\n $w_solicitante = $_REQUEST['w_solicitante'];\r\n $w_cadastrador = $_REQUEST['w_cadastrador'];\r\n $w_executor = $_REQUEST['w_executor'];\r\n $w_descricao = $_REQUEST['w_descricao'];\r\n $w_justificativa = $_REQUEST['w_justificativa'];\r\n $w_emissao = $_REQUEST['w_emissao'];\r\n $w_vencimento = $_REQUEST['w_vencimento'];\r\n $w_vencimento_atual = $_REQUEST['w_vencimento_atual'];\r\n $w_inclusao = $_REQUEST['w_inclusao'];\r\n $w_ultima_alteracao = $_REQUEST['w_ultima_alteracao'];\r\n $w_conclusao = $_REQUEST['w_conclusao'];\r\n $w_valor = $_REQUEST['w_valor'];\r\n $w_opiniao = $_REQUEST['w_opiniao'];\r\n $w_data_hora = $_REQUEST['w_data_hora'];\r\n $w_pais = $_REQUEST['w_pais'];\r\n $w_uf = $_REQUEST['w_uf'];\r\n $w_cidade = $_REQUEST['w_cidade'];\r\n $w_palavra_chave = $_REQUEST['w_palavra_chave'];\r\n $w_sqcc = $_REQUEST['w_sqcc'];\r\n $w_tipo_rubrica = $_REQUEST['w_tipo_rubrica'];\r\n $w_numero_processo = $_REQUEST['w_numero_processo'];\r\n $w_protocolo = $_REQUEST['w_protocolo'];\r\n $w_protocolo_nm = $_REQUEST['w_protocolo_nm'];\r\n $w_qtd_nota = $_REQUEST['w_qtd_nota'];\r\n $w_per_ini = $_REQUEST['w_per_ini'];\r\n $w_per_fim = $_REQUEST['w_per_fim'];\r\n $w_texto_pagamento = $_REQUEST['w_texto_pagamento'];\r\n $w_solic_vinculo = $_REQUEST['w_solic_vinculo']; \r\n $w_sq_projeto_rubrica = $_REQUEST['w_sq_projeto_rubrica'];\r\n $w_projeto = $_REQUEST['w_projeto'];\r\n $w_chave_doc = $_REQUEST['w_chave_doc'];\r\n $w_sq_banco = $_REQUEST['w_sq_banco'];\r\n $w_sq_agencia = $_REQUEST['w_sq_agencia'];\r\n $w_operacao = $_REQUEST['w_operacao'];\r\n $w_nr_conta = $_REQUEST['w_nr_conta'];\r\n $w_sq_pais_estrang = $_REQUEST['w_sq_pais_estrang'];\r\n $w_aba_code = $_REQUEST['w_aba_code'];\r\n $w_swift_code = $_REQUEST['w_swift_code'];\r\n $w_endereco_estrang = $_REQUEST['w_endereco_estrang'];\r\n $w_banco_estrang = $_REQUEST['w_banco_estrang'];\r\n $w_agencia_estrang = $_REQUEST['w_agencia_estrang'];\r\n $w_cidade_estrang = $_REQUEST['w_cidade_estrang'];\r\n $w_informacoes = $_REQUEST['w_informacoes'];\r\n $w_codigo_deposito = $_REQUEST['w_codigo_deposito'];\r\n $w_moeda = $_REQUEST['w_moeda'];\r\n\r\n } elseif(strpos('AEV',$O)!==false || $w_copia>'') {\r\n // Recupera os dados do lançamento\r\n\r\n if ($w_copia>'') { $sql = new db_getSolicData; $RS = $sql->getInstanceOf($dbms,$w_copia,$SG); }\r\n else { $sql = new db_getSolicData; $RS = $sql->getInstanceOf($dbms,$w_chave,$SG); }\r\n if (count($RS)>0) {\r\n\r\n $RS_Lancamento = $RS;\r\n $w_sq_unidade = f($RS,'sq_unidade');\r\n $w_observacao = f($RS,'observacao');\r\n $w_aviso = f($RS,'aviso_prox_conc');\r\n $w_dias = f($RS,'dias_aviso');\r\n $w_sq_acordo_parcela = f($RS,'sq_acordo_parcela');\r\n $w_sq_tipo_lancamento = f($RS,'sq_tipo_lancamento');\r\n $w_sq_tipo_documento = f($RS,'sq_tipo_documento');\r\n $w_chave_doc = f($RS,'sq_lancamento_doc');\r\n $w_pessoa = f($RS,'pessoa');\r\n $w_pessoa_atual = f($RS,'pessoa');\r\n $w_tipo_pessoa = f($RS,'sq_tipo_pessoa');\r\n $w_nm_tipo_pessoa = f($RS,'nm_tipo_pessoa');\r\n $w_sq_forma_pagamento = f($RS,'sq_forma_pagamento');\r\n $w_forma_atual = f($RS,'sq_forma_pagamento');\r\n $w_codigo_interno = f($RS,'codigo_interno');\r\n $w_chave_pai = f($RS,'sq_solic_pai');\r\n $w_chave_aux = null;\r\n $w_sq_menu = f($RS,'sq_menu');\r\n $w_sq_unidade = f($RS,'sq_unidade');\r\n $w_sq_tramite = f($RS,'sq_siw_tramite');\r\n $w_solicitante = f($RS,'solicitante');\r\n $w_cadastrador = f($RS,'cadastrador');\r\n $w_executor = f($RS,'executor');\r\n $w_descricao = f($RS,'descricao');\r\n $w_justificativa = f($RS,'justificativa');\r\n $w_vencimento = FormataDataEdicao(f($RS,'fim'));\r\n $w_vencimento_atual = FormataDataEdicao(f($RS,'fim'));\r\n $w_inclusao = f($RS,'inclusao');\r\n $w_ultima_alteracao = f($RS,'ultima_alteracao');\r\n $w_conclusao = f($RS,'conclusao');\r\n $w_opiniao = f($RS,'opiniao');\r\n $w_data_hora = f($RS,'data_hora');\r\n $w_sqcc = f($RS,'sq_cc');\r\n $w_pais = f($RS,'sq_pais');\r\n $w_uf = f($RS,'co_uf');\r\n $w_cidade = f($RS,'sq_cidade_origem');\r\n $w_palavra_chave = f($RS,'palavra_chave');\r\n $w_valor = formatNumber(f($RS,'valor'));\r\n $w_tipo_rubrica = f($RS,'tipo_rubrica');\r\n $w_numero_processo = f($RS,'processo');\r\n $w_protocolo = f($RS,'processo');\r\n $w_protocolo_nm = f($RS,'processo');\r\n $w_nm_tipo_rubrica = f($RS,'nm_tipo_rubrica');\r\n $w_qtd_nota = f($RS,'qtd_nota');\r\n if ($w_cliente==10135) $w_per_ini = FormataDataEdicao(f($RS,'referencia_inicio'),9);\r\n else $w_per_ini = FormataDataEdicao(f($RS,'referencia_inicio'));\r\n $w_per_fim = FormataDataEdicao(f($RS,'referencia_fim'));\r\n $w_texto_pagamento = f($RS,'condicoes_pagamento');\r\n $w_dados_pai = explode('|@|',f($RS,'dados_pai'));\r\n $w_sq_menu_relac = $w_dados_pai[3];\r\n $w_dados_avo = explode('|@|',f($RS,'dados_avo'));\r\n $w_projeto = $w_dados_avo[11];\r\n if (nvl($w_sqcc,'')!='') $w_sq_menu_relac='CLASSIF';\r\n $w_solic_vinculo = f($RS,'sq_solic_vinculo');\r\n $w_sq_projeto_rubrica = f($RS,'sq_projeto_rubrica');\r\n $w_sq_banco = f($RS,'sq_banco');\r\n $w_sq_agencia = f($RS,'sq_agencia');\r\n $w_operacao = f($RS,'operacao_conta');\r\n $w_nr_conta = f($RS,'numero_conta');\r\n $w_sq_pais_estrang = f($RS,'sq_pais_estrang');\r\n $w_aba_code = f($RS,'aba_code');\r\n $w_swift_code = f($RS,'swift_code');\r\n $w_endereco_estrang = f($RS,'endereco_estrang');\r\n $w_banco_estrang = f($RS,'banco_estrang');\r\n $w_agencia_estrang = f($RS,'agencia_estrang');\r\n $w_cidade_estrang = f($RS,'cidade_estrang');\r\n $w_informacoes = f($RS,'informacoes');\r\n $w_codigo_deposito = f($RS,'codigo_deposito');\r\n $w_moeda = f($RS,'sq_moeda');\r\n } \r\n }\r\n \r\n if ($O!='I') {\r\n // Validação\r\n $w_erro = ValidaReembolso($w_cliente,$w_chave,$SG,null,null,null,null);\r\n }\r\n \r\n if(nvl($w_sq_menu_relac,0)>0) { $sql = new db_getMenuData; $RS_Relac = $sql->getInstanceOf($dbms,$w_sq_menu_relac); }\r\n \r\n // Recupera os valores por país\r\n $sql = new db_getLancamentoPais; $RS_Pais = $sql->getInstanceOf($dbms,$w_cliente,$w_menu,nvl(nvl($w_copia,$w_chave),0),null,'EDICAO');\r\n $RS_Pais = SortArray($RS_Pais,'nome','asc');\r\n $i = 0;\r\n unset($w_valores_pais);\r\n foreach ($RS_Pais as $row) {\r\n $i++;\r\n $w_valores_pais[$i]['chave'] = f($row,'sq_lancamento_valor');\r\n $w_valores_pais[$i]['sq_pais'] = f($row,'sq_pais');\r\n $w_valores_pais[$i]['nome'] = f($row,'nome');\r\n $w_valores_pais[$i]['valor'] = nvl($_POST['w_valor_pais'][$i],formatNumber(nvl(f($row,'valor'),0)));\r\n }\r\n \r\n // Verifica as formas de pagamento possíveis. Se apenas uma, atribui direto\r\n $sql = new db_getFormaPagamento; $RS = $sql->getInstanceOf($dbms, $w_cliente, null, $SG, null,'S',null);\r\n $w_exibe_fp = true;\r\n if (count($RS)==1 || nvl($w_sq_forma_pagamento,'')!='') {\r\n foreach($RS as $row) { \r\n if (nvl($w_sq_forma_pagamento,f($row,'sq_forma_pagamento'))==f($row,'sq_forma_pagamento')) {\r\n $w_sq_forma_pagamento = f($row,'sq_forma_pagamento'); \r\n $w_forma_pagamento = f($row,'sigla'); \r\n $w_nm_forma_pagamento = f($row,'nome'); \r\n break; \r\n }\r\n }\r\n if (count($RS)==1) $w_exibe_fp = false;\r\n }\r\n\r\n // Usuário logado é o beneficiário padrão do lançamento\r\n $w_pessoa = nvl($w_pessoa,$_SESSION['SQ_PESSOA']);\r\n \r\n // Recupera os dados do beneficiário\r\n if (Nvl($w_pessoa,'')!='') {\r\n $sql = new db_getBenef; $RS_Benef = $sql->getInstanceOf($dbms,$w_cliente,$w_pessoa,null,null,null,null,null,null,null,null,null,null,null,null, null, null, null, null);\r\n if (count($RS_Benef)>0) {\r\n foreach($RS_Benef as $row) { $RS_Benef = $row; break; }\r\n $w_cpf = f($RS_Benef,'cpf');\r\n $w_cnpj = f($RS_Benef,'cnpj');\r\n $w_sq_prop = f($RS_Benef,'sq_pessoa');\r\n $w_nome = f($RS_Benef,'nm_pessoa');\r\n $w_nome_resumido = f($RS_Benef,'nome_resumido');\r\n $w_sexo = f($RS_Benef,'sexo');\r\n $w_vinculo = f($RS_Benef,'sq_tipo_vinculo');\r\n $w_tipo_pessoa = f($RS_Benef,'sq_tipo_pessoa');\r\n $w_sq_unidade = f($RS_Benef,'sq_unidade_benef');\r\n if (nvl($w_forma_pagamento,'')!='') {\r\n if (strpos('CREDITO,DEPOSITO,ORDEM',$w_forma_pagamento)!==false) {\r\n if (Nvl($w_nr_conta,'')=='' || nvl($w_troca,'-')!='w_sq_tipo_lancamento') {\r\n $w_sq_banco = nvl($_REQUEST['w_sq_banco'],nvl(f($RS_Benef,'sq_banco'),$w_sq_banco));\r\n $w_sq_agencia = nvl($_REQUEST['w_sq_agencia'],nvl(f($RS_Benef,'sq_agencia'),$w_sq_agencia));\r\n $w_operacao = nvl($_REQUEST['w_operacao'],nvl(f($RS_Benef,'operacao'),$w_operacao));\r\n $w_nr_conta = f($RS_Benef,'nr_conta');\r\n } \r\n } elseif ($w_forma_pagamento=='EXTERIOR') {\r\n if (Nvl($w_banco_estrang,'')=='' || nvl($w_troca,'-')!='w_sq_tipo_lancamento') {\r\n $w_nr_conta = f($RS_Benef,'nr_conta');\r\n $w_sq_pais_estrang = nvl($_REQUEST['w_sq_pais_estrang'],nvl(f($RS_Benef,'sq_pais_estrang'),$w_sq_pais_estrang));\r\n $w_aba_code = nvl($_REQUEST['w_aba_code'],nvl(f($RS_Benef,'aba_code'),$w_aba_code));\r\n $w_swift_code = nvl($_REQUEST['w_swift_code'],nvl(f($RS_Benef,'swift_code'),$w_swift_code));\r\n $w_endereco_estrang = nvl($_REQUEST['w_endereco_estrang'],nvl(f($RS_Benef,'endereco_estrang'),$w_endereco_estrang));\r\n $w_banco_estrang = nvl($_REQUEST['w_banco_estrang'],nvl(f($RS_Benef,'banco_estrang'),$w_banco_estrang));\r\n $w_agencia_estrang = nvl($_REQUEST['w_agencia_estrang'],nvl(f($RS_Benef,'agencia_estrang'),$w_agencia_estrang));\r\n $w_cidade_estrang = nvl($_REQUEST['w_cidade_estrang'],nvl(f($RS_Benef,'cidade_estrang'),$w_cidade_estrang));\r\n $w_informacoes = nvl($_REQUEST['w_informacoes'],nvl(f($RS_Benef,'informacoes'),$w_informacoes));\r\n } \r\n } \r\n } \r\n }\r\n }\r\n \r\n if (nvl($w_troca,'')=='' && (nvl($w_copia,'')!='' || nvl($w_chave,'')!='')) {\r\n // Recupera dados do comprovante\r\n $sql = new db_getLancamentoDoc; $RS = $sql->getInstanceOf($dbms,nvl($w_copia,$w_chave),null,null,null,null,null,null,'DOCS');\r\n $RS = SortArray($RS,'sq_tipo_documento','asc');\r\n foreach ($RS as $row) {$RS=$row; break;}\r\n $w_chave_doc = f($RS,'sq_lancamento_doc');\r\n $w_sq_tipo_documento = f($RS,'sq_tipo_documento');\r\n $w_numero = f($RS,'numero');\r\n $w_data = FormataDataEdicao(f($RS,'data'));\r\n $w_serie = f($RS,'serie');\r\n $w_valor = formatNumber(f($RS,'valor'));\r\n $w_valor_doc = formatNumber(f($RS,'valor'));\r\n $w_patrimonio = f($RS,'patrimonio');\r\n $w_tributo = f($RS,'calcula_tributo');\r\n $w_retencao = f($RS,'calcula_retencao');\r\n }\r\n \r\n // Verifica os tipos de documento possíveis. Se apenas um, atribui direto\r\n $sql = new db_getTipoDocumento; $RS = $sql->getInstanceOf($dbms,null,$w_cliente,$w_menu,null);\r\n $w_exibe_dc = true;\r\n if (count($RS)==1 || nvl($w_sq_tipo_documento,'')!='') {\r\n foreach($RS as $row) { \r\n if (nvl($w_sq_tipo_documento,f($row,'chave'))==f($row,'chave')) {\r\n $w_sq_tipo_documento = f($row,'chave'); \r\n $w_tipo_documento = f($row,'sigla'); \r\n $w_nm_tipo_documento = f($row,'nome'); \r\n break; \r\n }\r\n }\r\n if (count($RS)==1) $w_exibe_dc = false;\r\n }\r\n\r\n Cabecalho();\r\n head();\r\n Estrutura_CSS($w_cliente);\r\n ScriptOpen('JavaScript');\r\n CheckBranco();\r\n FormataData();\r\n SaltaCampo();\r\n FormataDataMA();\r\n FormataValor();\r\n\r\n if (is_array($w_valores_pais)) {\r\n toMoney();\r\n // Função para ratear o valor do lançamento entre os países\r\n ShowHTML('function rateio() {');\r\n ShowHTML(' var theForm = document.Form;');\r\n ShowHTML(' var valor = theForm.w_valor.value;');\r\n ShowHTML(' valor = valor.replace(\".\",\"\");');\r\n ShowHTML(' valor = valor.replace(\",\",\".\");');\r\n ShowHTML(' var rateio = toMoney(parseFloat(valor)/'.count($w_valores_pais).',\"BR\");');\r\n ShowHTML(' for (ind=1; ind < theForm[\"w_valor_pais[]\"].length; ind++) {');\r\n ShowHTML(' theForm[\"w_valor_pais[]\"][ind].value = rateio;');\r\n ShowHTML(' }');\r\n ShowHTML('}');\r\n }\r\n \r\n if ($w_cliente==10135) {\r\n openBox('reload');\r\n ShowHTML(' function texto() {');\r\n ShowHTML(' obj = document.Form;');\r\n ShowHTML(' var tipo_lancamento = obj.w_sq_tipo_lancamento[obj.w_sq_tipo_lancamento.selectedIndex].text;');\r\n ShowHTML(' tipo_lancamento = tipo_lancamento.substr(tipo_lancamento.indexOf(\". \")+2);');\r\n ShowHTML(' var valor = obj.w_valor.value;');\r\n ShowHTML(' var beneficiario = obj.w_pessoa[obj.w_pessoa.selectedIndex].text;');\r\n ShowHTML(' var mes = obj.w_per_ini.value;');\r\n ShowHTML(' obj.w_descricao.value = \"Pagamento de reembolso de despesas referente a \" + tipo_lancamento + \" no valor de \" + valor + \" para \" + beneficiario + \" referente ao mês \" + mes + \".\";');\r\n ShowHTML(' }');\r\n }\r\n ValidateOpen('Validacao');\r\n Validate('w_sq_menu_relac','Vincular a','SELECT',1,1,18,1,1);\r\n if(nvl($w_sq_menu_relac,'')!='') {\r\n if ($w_sq_menu_relac=='CLASSIF') {\r\n Validate('w_sqcc','Classificação','SELECT',1,1,18,1,1);\r\n } else {\r\n Validate('w_chave_pai','Vinculação','SELECT',1,1,18,1,1);\r\n }\r\n }\r\n if (f($RS_Menu,'solicita_cc')=='N') {\r\n Validate('w_chave_pai','Projeto','SELECT','1',1,18,'','0123456789');\r\n } else {\r\n Validate('w_chave_pai','Projeto','SELECT','',1,18,'','0123456789');\r\n Validate('w_sqcc','Classificação','SELECT','',1,18,'','0123456789');\r\n ShowHTML(' if (theForm.w_chave_pai.selectedIndex > 0 && theForm.w_sqcc.selectedIndex > 0) {');\r\n ShowHTML(' alert(\\'Informe um projeto ou uma classificação. Você não pode escolher ambos!\\');');\r\n ShowHTML(' theForm.w_chave_pai.focus();');\r\n ShowHTML(' return false;');\r\n ShowHTML(' }');\r\n ShowHTML(' if (theForm.w_chave_pai.selectedIndex == 0 && theForm.w_sqcc.selectedIndex == 0) {');\r\n ShowHTML(' alert(\\'Informe um projeto ou uma classificação!\\');');\r\n ShowHTML(' theForm.w_chave_pai.focus();');\r\n ShowHTML(' return false;');\r\n ShowHTML(' }');\r\n } \r\n Validate('w_pessoa','Beneficiário','SELECT',1,1,18,'','0123456789'); \r\n Validate('w_sq_tipo_lancamento','Tipo do lançamento','SELECT',1,1,18,'','0123456789');\r\n Validate('w_descricao','Discriminação das despesas','1',1,5,2000,'1','1');\r\n \r\n \r\n if ($w_cliente==10135) { \r\n Validate('w_per_ini','Mês de Referência','DATAMA',1,7,7,'','0123456789/');\r\n } else {\r\n Validate('w_per_ini','Data do comprovante de despesa','DATA','1','10','10','','0123456789/');\r\n }\r\n if ($w_exibe_fp) Validate('w_sq_forma_pagamento','Forma de pagamento','SELECT',1,1,18,'','0123456789');\r\n if ($w_exibe_dc) Validate('w_sq_tipo_documento','Comprovante de despesa','SELECT',1,1,18,'','0123456789');\r\n if (nvl(f($RS_Cliente,'sg_segmento'),'-')=='OI') Validate('w_moeda','Moeda','SELECT',1,1,18,'','0123456789');\r\n Validate('w_valor','Valor do reembolso','VALOR','1',4,18,'','0123456789.,-');\r\n if (nvl($w_forma_pagamento,'')!='') {\r\n if (!(strpos('CREDITO,DEPOSITO',$w_forma_pagamento)===false)) {\r\n Validate('w_sq_banco','Banco','SELECT',1,1,10,'1','1');\r\n Validate('w_sq_agencia','Agência','SELECT',1,1,10,'1','1');\r\n if ($w_exige_operacao=='S') Validate('w_operacao','Operação','1','1',1,6,'','0123456789');\r\n Validate('w_nr_conta','Número da conta','1','1',2,30,'ZXAzxa','0123456789-');\r\n } elseif ($w_forma_pagamento=='ORDEM') {\r\n Validate('w_sq_banco','Banco','SELECT',1,1,10,'1','1');\r\n Validate('w_sq_agencia','Agência','SELECT',1,1,10,'1','1');\r\n } elseif ($w_forma_pagamento=='EXTERIOR') {\r\n Validate('w_banco_estrang','Banco de destino','1','1',1,60,1,1);\r\n Validate('w_aba_code','Código ABA','1','',1,12,1,1);\r\n Validate('w_swift_code','Código SWIFT','1','1',1,30,1,1);\r\n Validate('w_endereco_estrang','Endereço da agência destino','1','',3,100,1,1);\r\n ShowHTML(' if (theForm.w_aba_code.value == \\'\\' && theForm.w_swift_code.value == \\'\\' && theForm.w_endereco_estrang.value == \\'\\') {');\r\n ShowHTML(' alert(\\'Informe código ABA, código SWIFT ou endereço da agência!\\');');\r\n ShowHTML(' document.Form.w_aba_code.focus();');\r\n ShowHTML(' return false;');\r\n ShowHTML(' }');\r\n Validate('w_agencia_estrang','Nome da agência destino','1','1',1,60,1,1);\r\n Validate('w_nr_conta','Número da conta','1',1,1,30,1,1);\r\n Validate('w_cidade_estrang','Cidade da agência','1','1',1,60,1,1);\r\n Validate('w_sq_pais_estrang','País da agência','SELECT','1',1,18,1,1);\r\n Validate('w_informacoes','Informações adicionais','1','',5,200,1,1);\r\n }\r\n }\r\n \r\n // Valida valores por país\r\n if (is_array($w_valores_pais)) {\r\n ShowHTML(' for (ind=1; ind < theForm[\"w_valor_pais[]\"].length; ind++) {');\r\n Validate('[\"w_valor_pais[]\"][ind]','!','VALOR','1','4','18','','0123456789.,-');\r\n ShowHTML(' }');\r\n }\r\n \r\n ShowHTML(' disAll();');\r\n ValidateClose();\r\n ScriptClose();\r\n ShowHTML('<BASE HREF=\"'.$conRootSIW.'\">');\r\n ShowHTML('</head>');\r\n if ($w_troca>'') BodyOpen('onLoad=\\'document.Form.'.$w_troca.'.focus();'.(($w_cliente==10135) ? ' texto();' : '').'\\'');\r\n elseif (strpos('EV',$O)!==false) BodyOpen('onLoad=\\'this.focus()\\';');\r\n else BodyOpen('onLoad=\\'document.Form.w_valor.focus()\\';');\r\n Estrutura_Topo_Limpo();\r\n Estrutura_Menu();\r\n Estrutura_Corpo_Abre();\r\n Estrutura_Texto_Abre();\r\n ShowHTML('<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">');\r\n if (nvl($w_qtd_nota,0)>0) {\r\n ShowHTML(' <tr><td bgcolor=\"#D0D0D0\" style=\"border: 2px solid rgb(0,0,0);\"><b><font color=\"#BC3131\">');\r\n ShowHTML(' ATENÇÃO:<ul>');\r\n ShowHTML(' <li>O valor do '.((substr(f($RS_Menu,'sigla'),2,1)=='R') ? 'recebimento': 'pagamento').' será recalculado em função das notas a ele vinculadas. Use a operação \"NE\" da listagem para alterar os valores das notas.');\r\n ShowHTML(' </ul></b></font></td>');\r\n ShowHTML(' </tr>');\r\n ShowHTML('<tr><td>&nbsp;');\r\n }\r\n if ($w_chave>'') ShowHTML(' <tr><td><font size=\"2\"><b>'.$w_codigo_interno.' ('.$w_chave.')</b></td>');\r\n if (strpos('IAEV',$O)!==false) {\r\n if (Nvl($w_pais,'')=='') {\r\n // Carrega os valores padrão para país, estado e cidade\r\n $sql = new db_getCustomerData; $RS = $sql->getInstanceOf($dbms,$w_cliente);\r\n $w_pais = f($RS,'sq_pais');\r\n $w_uf = f($RS,'co_uf');\r\n $w_cidade = Nvl(f($RS_Menu,'sq_cidade'),f($RS,'sq_cidade_padrao'));\r\n } \r\n AbreForm('Form',$w_dir.$w_pagina.'Grava','POST','return(Validacao(this));',null,$P1,$P2,$P3,$P4,$TP,$SG,$R,$O);\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_troca\" value=\"\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_copia\" value=\"'.$w_copia.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_chave\" value=\"'.$w_chave.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_data_hora\" value=\"'.f($RS_Menu,'data_hora').'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_menu\" value=\"'.f($RS_Menu,'sq_menu').'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_cidade\" value=\"'.$w_cidade.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_solicitante\" value=\"'.$_SESSION['SQ_PESSOA'].'\">');\r\n ShowHTML(MontaFiltro('POST'));\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_sq_unidade\" value=\"'.$w_sq_unidade.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_forma_atual\" value=\"'.$w_forma_atual.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_vencimento\" value=\"'.formataDataEdicao(addDays(time(),30)).'\">');\r\n if ($O!='I') ShowHTML('<INPUT type=\"hidden\" name=\"w_vencimento_atual\" value=\"'.formataDataEdicao(addDays(time(),30)).'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_aviso\" value=\"S\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_dias\" value=\"3\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_codigo_interno\" value=\"'.$w_codigo_interno.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_chave_doc\" value=\"'.$w_chave_doc.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_tramite\" value=\"'.$w_tramite.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_projeto\" value=\"'.$w_projeto.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_pessoa_atual\" value=\"'.$w_pessoa_atual.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_tipo_pessoa\" value=\"'.$w_tipo_pessoa.'\">');\r\n ShowHTML('<tr bgcolor=\"'.$conTrBgColor.'\"><td>');\r\n ShowHTML(' <table width=\"100%\" border=\"0\">');\r\n ShowHTML(' <tr><td colspan=\"3\" align=\"center\" height=\"2\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=\"3\" align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=\"3\" align=\"center\" bgcolor=\"#D0D0D0\"><b>Identificação</td></td></tr>');\r\n ShowHTML(' <tr><td colspan=\"3\" align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=\"3\">Os dados deste bloco serão utilizados para identificação do '.((substr(f($RS_Menu,'sigla'),2,1)=='R') ? 'recebimento': 'pagamento').', bem como para o controle de sua execução.</td></tr>');\r\n ShowHTML(' <tr><td colspan=\"3\" align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n\r\n ShowHTML(' <tr valign=\"top\">');\r\n selecaoServico('<U>V</U>incular a:', 'S', null, $w_sq_menu_relac, $w_menu, null, 'w_sq_menu_relac', 'MENURELAC', 'onChange=\"document.Form.action=\\''.$w_dir.$w_pagina.$par.'\\'; document.Form.O.value=\\''.$O.'\\'; document.Form.w_troca.value=\\'w_sq_menu_relac\\'; document.Form.submit();\"', $w_acordo, $w_acao, $w_viagem);\r\n if(Nvl($w_sq_menu_relac,'')!='') {\r\n ShowHTML(' <tr valign=\"top\">');\r\n if ($w_sq_menu_relac=='CLASSIF') {\r\n SelecaoSolic('Classificação:',null,null,$w_cliente,$w_sqcc,$w_sq_menu_relac,null,'w_sqcc','SIWSOLIC',null,null,'<BR />',3);\r\n } else {\r\n SelecaoSolic('Vinculação:',null,null,$w_cliente,$w_chave_pai,$w_sq_menu_relac,f($RS_Menu,'sq_menu'),'w_chave_pai',f($RS_Relac,'sigla'),null,$w_chave_pai,'<BR />',3);\r\n }\r\n }\r\n if (nvl(f($RS_Relac,'sigla'),'')!='') { $sql = new db_getSolicData; $RS_Pai = $sql->getInstanceOf($dbms,$w_chave_pai,f($RS_Relac,'sigla')); }\r\n \r\n ShowHTML(' <tr>');\r\n SelecaoPessoa('<u>B</u>eneficiário:','B','Selecione o beneficiário deste lançamento.',$w_pessoa,null,'w_pessoa','CONTRATADOS','onChange=\"'.(($w_cliente==10135) ? 'texto(); ' : '').'document.Form.action=\\''.$w_dir.$w_pagina.$par.'\\'; document.Form.O.value=\\''.$O.'\\'; document.Form.w_troca.value=\\'w_pessoa\\'; document.Form.submit();\"');\r\n ShowHTML(' <tr valign=\"top\">');\r\n SelecaoTipoLancamento('<u>T</u>ipo de '.((substr(f($RS_Menu,'sigla'),2,1)=='R') ? 'recebimento': 'pagamento').':','T','Selecione na lista o tipo de '.((substr(f($RS_Menu,'sigla'),2,1)=='R') ? 'recebimento': 'pagamento').' adequado.',$w_sq_tipo_lancamento,$w_menu,$w_cliente,'w_sq_tipo_lancamento',substr($SG,0,3).'VINC', (($w_cliente==10135) ? 'onChange=\"texto();\"' : null),1);\r\n if ($w_exibe_fp) {\r\n SelecaoFormaPagamento('<u>F</u>orma de pagamento:','F','Selecione na lista a forma desejada para este '.((substr(f($RS_Menu,'sigla'),2,1)=='R') ? 'recebimento': 'pagamento').'.',$w_sq_forma_pagamento,$SG,'w_sq_forma_pagamento',null,'onChange=\"'.(($w_cliente==10135) ? 'texto(); ' : '').'document.Form.action=\\''.$w_dir.$w_pagina.$par.'\\'; document.Form.O.value=\\''.$O.'\\'; document.Form.w_troca.value=\\'w_sq_forma_pagamento\\'; document.Form.submit();\"');\r\n } else {\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_sq_forma_pagamento\" value=\"'.$w_sq_forma_pagamento.'\">');\r\n }\r\n if ($w_exibe_dc) {\r\n SelecaoTipoDocumento('<u>C</u>omprovante de despesa:','T', 'Selecione o tipo de comprovante apresentado para este reembolso.', $w_sq_tipo_documento,$w_cliente,$w_menu,'w_sq_tipo_documento',null,null);\r\n } else {\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_sq_tipo_documento\" value=\"'.$w_sq_tipo_documento.'\">');\r\n }\r\n ShowHTML(' <tr valign=\"top\">');\r\n if (nvl(f($RS_Cliente,'sg_segmento'),'-')=='OI') {\r\n selecaoMoeda('<u>M</u>oeda:','U','Selecione a moeda na relação.',$w_moeda,null,'w_moeda','ATIVO',null);\r\n }\r\n ShowHTML(' <td><b><u>V</u>alor do reembolso:</b><br><input '.$w_Disabled.' accesskey=\"V\" type=\"text\" name=\"w_valor\" class=\"sti\" SIZE=\"18\" MAXLENGTH=\"18\" VALUE=\"'.$w_valor.'\" style=\"text-align:right;\" onKeyDown=\"FormataValor(this,18,2,event);\" title=\"Informe o valor total do documento.\"'.(($w_cliente==10135) ? ' onBlur=\"texto();' : '').'>');\r\n if (is_array($w_valores_pais)) {\r\n // Exibe opção para ratear o valor pelos países\r\n ShowHTML(' <img src=\"images/icone/coins.png\" alt=\"img\" border=0 align=top height=16 width=16 /><span onClick=\"rateio()\" style=\"cursor: pointer; color:blue;\"> <b>Ratear entre países</b></span>');\r\n }\r\n\r\n if ($w_cliente==10135) {\r\n ShowHTML(' <td><b><u>M</u>ês de referência:</b><br><input '.$w_Disabled.' accesskey=\"C\" type=\"text\" name=\"w_per_ini\" class=\"sti\" SIZE=\"7\" MAXLENGTH=\"7\" VALUE=\"'.Nvl($w_per_ini,FormataDataEdicao(time(),9)).'\" onKeyDown=\"FormataDataMA(this,event);\" onBlur=\"texto();></td>');\r\n ShowHTML(' <tr><td colspan=2><b><u>D</u>iscriminação das despesas:</b><br><textarea READONLY accesskey=\"D\" name=\"w_descricao\" class=\"sti\" ROWS=3 cols=75 title=\"Discrimine as despesas para as quais deseja ser reembolsado.\">'.$w_descricao.'</TEXTAREA></td>');\r\n } else {\r\n ShowHTML(' <td><b>Data do co<u>m</u>provante:</b><br><input '.$w_Disabled.' accesskey=\"C\" type=\"text\" name=\"w_per_ini\" class=\"sti\" SIZE=\"10\" MAXLENGTH=\"10\" VALUE=\"'.$w_per_ini.'\" onKeyDown=\"FormataData(this,event);\"></td>');\r\n ShowHTML(' <tr><td colspan=2><b><u>D</u>iscriminação das despesas:</b><br><textarea '.$w_Disabled.' accesskey=\"D\" name=\"w_descricao\" class=\"sti\" ROWS=3 cols=75 title=\"Discrimine as despesas para as quais deseja ser reembolsado.\">'.$w_descricao.'</TEXTAREA></td>');\r\n } \r\n\r\n if (nvl($w_forma_pagamento,'')!='' && strpos('CREDITO,DEPOSITO,ORDEM,EXTERIOR',$w_forma_pagamento)!==false) {\r\n ShowHTML(' <tr><td colspan=3 align=\"center\" height=\"2\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=3 align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=3 align=\"center\" bgcolor=\"#D0D0D0\"><b>DADOS PARA '.upper($w_nm_forma_pagamento).'</td></td></tr>');\r\n ShowHTML(' <tr><td colspan=3 align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n if (!(strpos('CREDITO,DEPOSITO',$w_forma_pagamento)===false)) {\r\n ShowHTML(' <tr><td colspan=\"3\"><table border=0 width=\"100%\" cellspacing=0>');\r\n ShowHTML(' <tr valign=\"top\">');\r\n SelecaoBanco('<u>B</u>anco:','B','Selecione o banco onde deverão ser feitos os pagamentos referentes ao lançamento.',$w_sq_banco,null,'w_sq_banco',null,'onChange=\"document.Form.action=\\''.$w_dir.$w_pagina.$par.'\\'; document.Form.w_troca.value=\\'w_sq_agencia\\'; document.Form.submit();\"');\r\n SelecaoAgencia('A<u>g</u>ência:','A','Selecione a agência onde deverão ser feitos os pagamentos referentes ao lançamento.',$w_sq_agencia,Nvl($w_sq_banco,-1),'w_sq_agencia',null,null);\r\n ShowHTML(' <tr valign=\"top\">');\r\n if ($w_exige_operacao=='S') ShowHTML(' <td title=\"Alguns bancos trabalham com o campo \"Operação\", além do número da conta. A Caixa Econômica Federal é um exemplo. Se for o caso,informe a operação neste campo; caso contrário, deixe-o em branco.\"><b>O<u>p</u>eração:</b><br><input '.$w_Disabled.' accesskey=\"O\" type=\"text\" name=\"w_operacao\" class=\"sti\" SIZE=\"6\" MAXLENGTH=\"6\" VALUE=\"'.$w_operacao.'\"></td>');\r\n ShowHTML(' <td title=\"Informe o número da conta bancária, colocando o dígito verificador, se existir, separado por um hífen. Exemplo: 11214-3. Se o banco não trabalhar com dígito verificador, informe apenas números. Exemplo: 10845550.\"><b>Número da con<u>t</u>a:</b><br><input '.$w_Disabled.' accesskey=\"T\" type=\"text\" name=\"w_nr_conta\" class=\"sti\" SIZE=\"30\" MAXLENGTH=\"30\" VALUE=\"'.$w_nr_conta.'\"></td>');\r\n ShowHTML(' </table>');\r\n } elseif ($w_forma_pagamento=='ORDEM') {\r\n ShowHTML(' <tr><td colspan=\"3\"><table border=0 width=\"100%\" cellspacing=0>');\r\n ShowHTML(' <tr valign=\"top\">');\r\n SelecaoBanco('<u>B</u>anco:','B','Selecione o banco onde deverão ser feitos os pagamentos referentes ao lançamento.',$w_sq_banco,null,'w_sq_banco',null,'onChange=\"document.Form.action=\\''.$w_dir.$w_pagina.$par.'\\'; document.Form.w_troca.value=\\'w_sq_agencia\\'; document.Form.submit();\"');\r\n SelecaoAgencia('A<u>g</u>ência:','A','Selecione a agência onde deverão ser feitos os pagamentos referentes ao lançamento.',$w_sq_agencia,Nvl($w_sq_banco,-1),'w_sq_agencia',null,null);\r\n } elseif ($w_forma_pagamento=='EXTERIOR') {\r\n ShowHTML(' <tr><td colspan=\"3\"><b><font color=\"#BC3131\">ATENÇÃO:</font></b> É obrigatório o preenchimento de um destes campos: Swift Code, ABA Code ou Endereço da Agência.</td></tr>');\r\n ShowHTML(' <tr><td colspan=\"3\" align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=\"3\"><table border=0 width=\"100%\" cellspacing=0>');\r\n ShowHTML(' <tr valign=\"top\">');\r\n ShowHTML(' <td title=\"Banco onde o crédito deve ser efetuado.\"><b><u>B</u>anco de crédito:</b><br><input '.$w_Disabled.' accesskey=\"B\" type=\"text\" name=\"w_banco_estrang\" class=\"sti\" SIZE=\"40\" MAXLENGTH=\"60\" VALUE=\"'.$w_banco_estrang.'\"></td>');\r\n ShowHTML(' <td title=\"Código ABA da agência destino.\"><b>A<u>B</u>A code:</b><br><input '.$w_Disabled.' accesskey=\"B\" type=\"text\" name=\"w_aba_code\" class=\"sti\" SIZE=\"12\" MAXLENGTH=\"12\" VALUE=\"'.$w_aba_code.'\"></td>');\r\n ShowHTML(' <td title=\"Código SWIFT da agência destino.\"><b>S<u>W</u>IFT code:</b><br><input '.$w_Disabled.' accesskey=\"W\" type=\"text\" name=\"w_swift_code\" class=\"sti\" SIZE=\"30\" MAXLENGTH=\"30\" VALUE=\"'.$w_swift_code.'\"></td>');\r\n ShowHTML(' <tr><td colspan=3 title=\"Endereço da agência.\"><b>E<u>n</u>dereço da agência:</b><br><input '.$w_Disabled.' accesskey=\"N\" type=\"text\" name=\"w_endereco_estrang\" class=\"sti\" SIZE=\"80\" MAXLENGTH=\"100\" VALUE=\"'.$w_endereco_estrang.'\"></td>');\r\n ShowHTML(' <tr valign=\"top\">');\r\n ShowHTML(' <td colspan=2 title=\"Nome da agência destino.\"><b>Nome da a<u>g</u>ência:</b><br><input '.$w_Disabled.' accesskey=\"C\" type=\"text\" name=\"w_agencia_estrang\" class=\"sti\" SIZE=\"40\" MAXLENGTH=\"60\" VALUE=\"'.$w_agencia_estrang.'\"></td>');\r\n ShowHTML(' <td title=\"Número da conta destino.\"><b>Número da con<u>t</u>a:</b><br><input '.$w_Disabled.' accesskey=\"C\" type=\"text\" name=\"w_nr_conta\" class=\"sti\" SIZE=\"30\" MAXLENGTH=\"30\" VALUE=\"'.$w_nr_conta.'\"></td>');\r\n ShowHTML(' <tr valign=\"top\">');\r\n ShowHTML(' <td colspan=2 title=\"Cidade da agência destino.\"><b><u>C</u>idade:</b><br><input '.$w_Disabled.' accesskey=\"C\" type=\"text\" name=\"w_cidade_estrang\" class=\"sti\" SIZE=\"40\" MAXLENGTH=\"60\" VALUE=\"'.$w_cidade_estrang.'\"></td>');\r\n SelecaoPais('<u>P</u>aís:','P','Selecione o país de destino',$w_sq_pais_estrang,null,'w_sq_pais_estrang',null,null);\r\n ShowHTML(' </table>');\r\n ShowHTML(' <tr><td colspan=3 title=\"Se necessário, escreva informações adicionais relevantes para o pagamento.\"><b>Info<u>r</u>mações adicionais:</b><br><textarea '.$w_Disabled.' accesskey=\"R\" name=\"w_informacoes\" class=\"sti\" ROWS=3 cols=75 >'.$w_informacoes.'</TEXTAREA></td>');\r\n } \r\n }\r\n \r\n // Valores por país\r\n if (is_array($w_valores_pais)){\r\n ShowHTML(' <tr><td colspan=\"5\" align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=\"5\" align=\"center\" bgcolor=\"#D0D0D0\"><b>Valores por País</td></td></tr>');\r\n ShowHTML(' <tr><td colspan=\"5\" align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=\"5\" align=\"center\"><TABLE class=\"tudo\" BORDER=\"1\" CELLSPACING=\"1\" CELLPADDING=\"3\" BorderColorDark=\"'.$conTableBorderColorDark.'\" BorderColorLight=\"'.$conTableBorderColorLight.'\">');\r\n ShowHTML(' <tr align=\"center\">');\r\n ShowHTML(' <td><b>País</b></td>');\r\n ShowHTML(' <td><b>Valor'.(($w_nm_moeda) ? ' ('.$w_nm_moeda.')' : '').'</b></td>');\r\n ShowHTML(' </tr>');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_sq_pais[]\" value=\"\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_valor_pais[]\" value=\"\">');\r\n $w_vl_total = 0.00;\r\n foreach($w_valores_pais as $row) {\r\n ShowHTML(' <tr valign=\"top\">');\r\n ShowHTML(' <INPUT type=\"hidden\" name=\"w_sq_pais[]\" value=\"'.f($row,'sq_pais').'\">');\r\n ShowHTML(' <td><b>'.f($row,'nome').'</b></td>');\r\n ShowHTML(' <td align=\"right\"><input '.$w_Disabled.' type=\"text\" name=\"w_valor_pais[]\" class=\"sti\" SIZE=\"18\" MAXLENGTH=\"18\" VALUE=\"'.f($row,'valor').'\" style=\"text-align:right;\" onKeyDown=\"FormataValor(this,18,2,event);\"></td>');\r\n ShowHTML(' </tr>');\r\n $w_vl_total += toNumberPHP(f($row,'valor'));\r\n }\r\n ShowHTML(' <tr><td align=\"right\"><b>Total</b><td align=\"right\"><b>'.FormatNumber($w_vl_total).'</b></td></tr>');\r\n if (FormatNumber($w_vl_total)!=$w_valor) {\r\n ShowHTML(' <tr><td colspan=\"2\" bgcolor=\"red\" align=\"center\"><b>ATENÇÃO: Soma dos valores difere do valor do lançamento!</b></td></tr>');\r\n }\r\n ShowHTML(' </table>');\r\n }\r\n \r\n ShowHTML(' <tr><td align=\"center\" colspan=\"3\" height=\"1\" bgcolor=\"#000000\"></TD></TR>');\r\n ShowHTML(' <tr><td align=\"center\" colspan=\"3\">');\r\n ShowHTML(' <input class=\"stb\" type=\"submit\" name=\"Botao\" value=\"Gravar\">');\r\n if ($P1==0) {\r\n ShowHTML(' <input class=\"STB\" type=\"button\" onClick=\"location.href=\\''.montaURL_JS($w_dir,'tesouraria.php?par=Inicial&O=L&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.MontaFiltro('GET')).'\\';\" name=\"Botao\" value=\"Voltar\">');\r\n } else {\r\n $sql = new db_getMenuData; $RS = $sql->getInstanceOf($dbms,$w_menu);\r\n ShowHTML(' <input class=\"stb\" type=\"button\" onClick=\"location.href=\\''.montaURL_JS($w_dir,f($RS_Menu,'link').'&w_copia='.$w_copia.'&O=L&SG='.f($RS,'sigla').'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.MontaFiltro('GET')).'\\';\" name=\"Botao\" value=\"Cancelar\">');\r\n }\r\n if (($O!='I') && (Nvl($w_erro,'')=='' || (Nvl($w_erro,'')>'' && substr($w_erro,0,1)!='0' && RetornaGestor($w_chave,$w_usuario)=='S'))) {\r\n ShowHTML(' <input class=\"stb\" type=\"button\" name=\"Botao\" value=\"Enviar\" onClick=\"location.href=\\''.montaURL_JS(null,$conRootSIW.$w_dir.$w_pagina.'envio&R='.$w_pagina.$par.'&O=V&w_chave='.$w_chave.'&w_tipo=Volta&P1='.$P1.'&P2=1&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.MontaFiltro('GET')).'\\'\">');\r\n }\r\n ShowHTML(' </td>');\r\n ShowHTML('</FORM>');\r\n ShowHTML('</table>');\r\n \r\n if ($O!='I') {\r\n if ($w_erro>'') {\r\n ShowHTML('<tr><td colspan=2><font size=2><HR>');\r\n if (substr($w_erro,0,1)=='0') {\r\n ShowHTML(' <font color=\"#BC3131\"><b>ATENÇÃO:</b> Foram identificadas as pendências listadas abaixo, não sendo possível seu encaminhamento para fases posteriores à atual, nem seu pagamento.');\r\n }elseif (substr($w_erro,0,1)=='1') {\r\n ShowHTML(' <font color=\"#BC3131\"><b>ATENÇÃO:</b> Foram identificadas as pendências listadas abaixo. Seu encaminhamento para fases posteriores à atual só pode ser feito por um gestor do sistema ou deste módulo.');\r\n } else {\r\n ShowHTML(' <font color=\"#BC3131\"><b>ATENÇÃO:</b> Foram identificados os alertas listados abaixo. Eles não impedem o encaminhamento para fases posteriores à atual, mas convém sua verificação.');\r\n } \r\n ShowHTML(' <ul>'.substr($w_erro,1,1000));\r\n ShowHTML('<tr><td colspan=2><HR>');\r\n }\r\n ShowHTML(' </table>');\r\n }\r\n ShowHTML(' </tr>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' </TD>');\r\n ShowHTML('</tr>');\r\n \r\n } else {\r\n ScriptOpen('JavaScript');\r\n ShowHTML(' alert(\"Opção não disponível\");');\r\n //ShowHTML ' history.back(1);'\r\n ScriptClose();\r\n } \r\n ShowHTML('</table>');\r\n ShowHTML('</center>');\r\n Estrutura_Texto_Fecha();\r\n Estrutura_Fecha();\r\n Estrutura_Fecha();\r\n Estrutura_Fecha();\r\n Rodape();\r\n}", "title": "" }, { "docid": "bd19b10bea4b8d7667474590fe1a3010", "score": "0.5832144", "text": "function __construct() {\n\n global $diccionario;\n\n $diccionario = array(\n 'links'=>array(\n 'MENU_PRINCIPAL'=>'index.php?action='.MENU_PRINCIPAL,\n 'INFORMACION_USUARIO'=>'index.php?action='.INFORMACION_USUARIO,\n 'CERRAR'=>'index.php?action='.CERRAR_SESION,\n 'CREAR_USUARIO'=>'index.php?action='.CREAR_USUARIO,\n 'CREAR_USUARIO_ADMIN'=>'index.php?action='.CREAR_USUARIO_ADMIN,\n 'LISTAR_USUARIOS_ADMIN'=>'index.php?action='.LISTAR_USUARIOS_ADMIN,\n 'OLVIDO_CONTRASENIA'=>'index.php?action='.OLVIDO_CONTRASENIA,\n 'CERRAR'=>'index.php?action='.CERRAR_SESION,\n\n 'CREAR_SEDE'=>'index.php?action='.OPERATION_CREAR_SEDE,\n 'CREAR_CAMPUS'=>'index.php?action='.OPERATION_CREAR_CAMPUS,\n 'CREAR_CANCHA'=>'index.php?action='.OPERATION_CREAR_CANCHA,\n 'CREAR_CORREDOR'=>'index.php?action='.OPERATION_CREAR_CORREDOR,\n 'CREAR_CUBIERTA'=>'index.php?action='.OPERATION_CREAR_CUBIERTA,\n 'CREAR_GRADAS'=>'index.php?action='.OPERATION_CREAR_GRADAS,\n 'CREAR_PARQUEADERO'=>'index.php?action='.OPERATION_CREAR_PARQUEADERO,\n 'CREAR_PISCINA'=>'index.php?action='.OPERATION_CREAR_PISCINA,\n 'CREAR_PLAZOLETA'=>'index.php?action='.OPERATION_CREAR_PLAZOLETA,\n 'CREAR_SENDERO'=>'index.php?action='.OPERATION_CREAR_SENDERO,\n 'CREAR_VIA'=>'index.php?action='.OPERATION_CREAR_VIA,\n 'CREAR_EDIFICIO'=>'index.php?action='.OPERATION_CREAR_EDIFICIO,\n 'CREAR_ESPACIO'=>'index.php?action='.OPERATION_CREAR_ESPACIO,\n 'CREAR_TIPO_MATERIAL'=>'index.php?action='.OPERATION_CREAR_TIPO_MATERIAL,\n 'CREAR_TIPO_OBJETO'=>'index.php?action='.OPERATION_CREAR_TIPO_OBJETO,\n 'CONSULTAR_SEDE'=>'index.php?action='.OPERATION_CONSULTAR_SEDE,\n 'CONSULTAR_CAMPUS'=>'index.php?action='.OPERATION_CONSULTAR_CAMPUS,\n 'CONSULTAR_CANCHA'=>'index.php?action='.OPERATION_CONSULTAR_CANCHA,\n 'CONSULTAR_CORREDOR'=>'index.php?action='.OPERATION_CONSULTAR_CORREDOR,\n 'CONSULTAR_CUBIERTA'=>'index.php?action='.OPERATION_CONSULTAR_CUBIERTA,\n 'CONSULTAR_GRADAS'=>'index.php?action='.OPERATION_CONSULTAR_GRADAS,\n 'CONSULTAR_PARQUEADERO'=>'index.php?action='.OPERATION_CONSULTAR_PARQUEADERO,\n 'CONSULTAR_PISCINA'=>'index.php?action='.OPERATION_CONSULTAR_PISCINA,\n 'CONSULTAR_PLAZOLETA'=>'index.php?action='.OPERATION_CONSULTAR_PLAZOLETA,\n 'CONSULTAR_SENDERO'=>'index.php?action='.OPERATION_CONSULTAR_SENDERO,\n 'CONSULTAR_VIA'=>'index.php?action='.OPERATION_CONSULTAR_VIA,\n 'CONSULTAR_EDIFICIO'=>'index.php?action='.OPERATION_CONSULTAR_EDIFICIO,\n 'CONSULTAR_ESPACIO'=>'index.php?action='.OPERATION_CONSULTAR_ESPACIO,\n 'CONSULTAR_TIPO_MATERIAL'=>'index.php?action='.OPERATION_CONSULTAR_TIPO_MATERIAL,\n 'CONSULTAR_TIPO_OBJETO'=>'index.php?action='.OPERATION_CONSULTAR_TIPO_OBJETO,\n 'MAPA'=>'index.php?action='.OPERATION_CONSULTAR_MAPA,\n 'CREAR_SEDE'=>'index.php?action='.OPERATION_CREAR_SEDE,\n\n 'CREAR_AIRE' =>'index.php?action='.OPERATION_CREAR_AIRE,\n 'CREAR_CAPACIDAD_AIRE' =>'index.php?action='.OPERATION_CREAR_CAPACIDAD_AIRE,\n 'CREAR_MARCA_AIRE' =>'index.php?action='.OPERATION_CREAR_MARCA_AIRE,\n 'CREAR_TIPO_AIRE' =>'index.php?action='.OPERATION_CREAR_TIPO_AIRE,\n 'CREAR_TECNOLOGIA_AIRE' =>'index.php?action='.OPERATION_CREAR_TECNOLOGIA_AIRE,\n 'REGISTRAR_MANTENIMIENTO_AIRE' =>'index.php?action='.OPERATION_REGISTRAR_MANTENIMIENTO_AIRE,\n 'CONSULTAR_INVENTARIO_AIRES' =>'index.php?action='.OPERATION_CONSULTAR_INVENTARIO_AIRES,\n 'CONSULTAR_AIRE_UBICACION' =>'index.php?action='.OPERATION_CONSULTAR_AIRE_UBICACION,\n 'CONSULTAR_AIRE_NUMERO_INVENTARIO' =>'index.php?action='.OPERATION_CONSULTAR_AIRE_NUMERO_INVENTARIO,\n 'CONSULTAR_CAPACIDAD_AIRE' =>'index.php?action='.OPERATION_CONSULTAR_CAPACIDAD_AIRE,\n 'CONSULTAR_MARCA_AIRE' =>'index.php?action='.OPERATION_CONSULTAR_MARCA_AIRE,\n 'CONSULTAR_TIPO_AIRE' =>'index.php?action='.OPERATION_CONSULTAR_TIPO_AIRE,\n 'CONSULTAR_TECNOLOGIA_AIRE' =>'index.php?action='.OPERATION_CONSULTAR_TECNOLOGIA_AIRE,\n 'CONSULTAR_MANTENIMIENTO_AIRE_ID_AIRE' =>'index.php?action='.OPERATION_CONSULTAR_MANTENIMIENTO_AIRE_ID_AIRE,\n 'CONSULTAR_MANTENIMIENTO_AIRE_NUMERO_ORDEN' =>'index.php?action='.OPERATION_CONSULTAR_MANTENIMIENTO_AIRE_NUMERO_ORDEN,\n 'MAS_MARCAS_AIRE' =>'index.php?action='.OPERATION_MAS_MARCAS_AIRE,\n 'MAS_TIPOS_AIRE' =>'index.php?action='.OPERATION_MAS_TIPOS_AIRE,\n 'MAS_TIPO_TECNOLOGIAS_AIRE' =>'index.php?action='.OPERATION_MAS_TIPO_TECNOLOGIAS_AIRE,\n 'AIRES_MAS_MANTENIMIENTOS' =>'index.php?action='.OPERATION_AIRES_MAS_MANTENIMIENTOS,\n 'MARCAS_MAS_MANTENIMIENTOS' =>'index.php?action='.OPERATION_MARCAS_MAS_MANTENIMIENTOS,\n\n 'CREAR_ARTICULO' =>'index.php?action='.OPERATION_CREAR_ARTICULO,\n 'CREAR_CATEGORIA' =>'index.php?action='.OPERATION_CREAR_CATEGORIA,\n 'CREAR_MARCA' =>'index.php?action='.OPERATION_CREAR_MARCA,\n 'CREAR_PROVEEDOR' =>'index.php?action='.OPERATION_CREAR_PROVEEDOR,\n 'CONSULTAR_ARTICULO' =>'index.php?action='.OPERATION_CONSULTAR_ARTICULO,\n 'CONSULTAR_CATEGORIA' =>'index.php?action='.OPERATION_CONSULTAR_CATEGORIA,\n 'CONSULTAR_MARCA' =>'index.php?action='.OPERATION_CONSULTAR_MARCA,\n 'CONSULTAR_PROVEEDOR' =>'index.php?action='.OPERATION_CONSULTAR_PROVEEDOR,\n 'CONSULTAR_INVENTARIO_ELECTRICO' =>'index.php?action='.OPERATION_CONSULTAR_INVENTARIO_ELECTRICO,\n 'CONSULTAR_INVENTARIO_HIDRAULICO' =>'index.php?action='.OPERATION_CONSULTAR_INVENTARIO_HIDRAULICO,\n 'CONSULTAR_INVENTARIO_SANFERNANDO' =>'index.php?action='.OPERATION_CONSULTAR_INVENTARIO_SANFERNANDO,\n 'MOVIMIENTOS_INVENTARIO_ELECTRICO' =>'index.php?action='.OPERATION_MOVIMIENTOS_INVENTARIO_ELECTRICO,\n 'MOVIMIENTOS_INVENTARIO_HIDRAULICO' =>'index.php?action='.OPERATION_MOVIMIENTOS_INVENTARIO_HIDRAULICO,\n 'MOVIMIENTOS_INVENTARIO_SANFERNANDO' =>'index.php?action='.OPERATION_MOVIMIENTOS_INVENTARIO_SANFERNANDO,\n 'ARTICULOS_MAS_USADOS' =>'index.php?action='.OPERATION_ARTICULOS_MAS_USADOS,\n 'ARTICULOS_MENOS_USADOS' =>'index.php?action='.OPERATION_ARTICULOS_MENOS_USADOS,\n\n 'MODIFICAR_INFORMACION_USUARIO'=>'index.php?action='.OPERATION_MODIFICAR_INFORMACION_USUARIO,\n 'CAMBIAR_CONTRASENIA'=>'index.php?action='.OPERATION_CAMBIAR_CONTRASENIA,\n 'FORM_INICIAR_SESION'=>'index.php?action='.INICIAR_SESION,\n 'FORM_MOD_PLANTA'=>'index.php?action='.OPERATION_MOD_PLANTA,\n 'FORM_MOD_INVENTARIO'=>'index.php?action='.OPERATION_MOD_INVENTARIO,\n 'FORM_MOD_AIRES'=>'index.php?action='.OPERATION_MOD_AIRES,\n 'FORM_MOD_USUARIO'=>'index.php?action='.OPERATION_MOD_USUARIO,\n 'FORM_MOD_PLANTA'=>'index.php?action='.OPERATION_MOD_PLANTA,\n 'FORM_MOD_INVENTARIO'=>'index.php?action='.OPERATION_MOD_INVENTARIO,\n 'FORM_MOD_AIRES'=>'index.php?action='.OPERATION_MOD_AIRES,\n 'FORM_MOD_USUARIO'=>'index.php?action='.OPERATION_MOD_USUARIO,\n ),\n );\n }", "title": "" }, { "docid": "588f5d0f9ff0114509a93c8cd6298c2c", "score": "0.5823175", "text": "public function Prontuarios()\n\t\t{\n\t\t\t\t\n\t\t}", "title": "" }, { "docid": "83473be81b6a2d1d6bd86f0bcdd68029", "score": "0.58135086", "text": "function contenidos() \n\t{\t\n\t\tglobal $__BD, $__CAT, $__LIB, $__CLI;\n\t\tglobal $CLEAN_GET, $CLEAN_POST;\n\t\t\n\t\t\n\t\t$__LIB->comprobarCliente(true);\n\t\t\n\t\t$codigo = '';\n\t\t\n\t\t$codigo .= '<h1>'._CREAR_PEDIDO.'</h1>';\n\t\t$codigo .= '<div class=\"cajaTexto\">';\n\t\n\t\t$codigo .= $__LIB->fasesPedido('pago');\n\t\t\n\t\t\n\t\tif (isset($CLEAN_POST[\"contacto\"])) {\n\t\t\t\n\t\t\t$error = $__LIB->comprobarPedido($CLEAN_POST, false);\t\n\t\t\tif ($error) {\n\t\t\t\t$codigo .= '<div class=\"msgError\">'.$error.'</div>';\n\t\t\t\t$codigo .= '<a href=\"javascript:history.go(-1)\">'._VOLVER.'</a>';\n\t\t\t\techo $codigo;\n\t\t\t\tinclude(\"../includes/right_bottom.php\");\n\t\t\t\texit;\n\t\t\t}\n\t\t\t\n\t\t\t// Nueva sesion de pedido\n\t\t\tunset($_SESSION[\"pedido\"]);\n\t\t\t\n\t\t\t// Los datos de envio vienen del post\n\t\t\t$_SESSION[\"pedido\"][\"datosEnv\"] = $CLEAN_POST;\n\t\t\t\n\t\t\t// Validado el post, cargamos la misma pagina sin el mismo (para evitar repetir el POST)\n\t\t\techo '<script type=\"text/javascript\">window.location = \"'._WEB_ROOT_SSL_L.'cesta/datos_pago.php\"</script>';\n \t\t\texit;\n\t\t}\n\t\t\n\t\t$codigo .= '<form name=\"datosDir\" id=\"datosDir\" action=\"'._WEB_ROOT_SSL_L.'cesta/confirmar_pedido.php\" method=\"post\">';\n\t\t$codigo .= '<input type=\"hidden\" name=\"ambito\" value=\"cesta_pago\">';\n\n\t\t$codigo .= '<h2>'._DIRECCION_FACT.'</h2>';\n\t\n\t\t// Datos personales (nombre, empresa)\n\t\t$datosPer = $__CLI->datosPersonales();\n\t\t\n\t\t\n\t\tif ($__LIB->esTrue($_SESSION[\"opciones\"][\"solicitarnif\"]))\n\t\t\t$codigo .= formularios::nombre($datosPer, true);\n\t\telse\n\t\t\t$codigo .= formularios::nombre($datosPer);\n\t\t\t\n\t\t// Direccion de facturacion\n\t\t$dirFact = $__CLI->direccionFact();\n\t\t$codigo .= formularios::dirFact($dirFact, 'datosDir');\n\t\t\n\t\t$codigo .= '<h2>'._FORMA_PAGO.'</h2><br/>';\n\t\t\n\t\t$codigo .= '<div id=\"datosPago\">';\n\t\t\n\t\t$datosPago = $__LIB->formasPago($dirFact[\"codpais\"], $dirFact[\"provincia\"]);\n\t\tif ($datosPago)\n\t\t\t$codigo .= $datosPago;\n\t\telse\n\t\t\t$codigo .= _NO_FORMAS_PAGO;\n\t\t\n\t\t$codigo .= '</div>';\n\t\t\n\t\t$codigo .= '<p class=\"separador\">';\n\t\t\n\t\t$codigo .= '<div id=\"divContinuar\">';\n\t\t$codigo .= '<p class=\"separador\">';\n\t\t$codigo .= '<a class=\"button\" href=\"cesta/datos_envio.php\"><span>'._VOLVER.'</span></a>';\n\t\tif ($datosPago) {\n\t\t\t$codigo .= '<button type=\"submit\" value=\"'._CONTINUAR.'\" class=\"submitBtn\"><span>'._CONTINUAR.'</span></button>';\n\t\t}\n\t\t$codigo .= '</p></div>';\n\t\t\n\t\t$codigo .= '</form>';\n\t\t\n\t\t$codigo .= '</div>';\n\t\t\n\t\techo $codigo;\n\t}", "title": "" }, { "docid": "ad15240e090e6e5c7876ffaf66c25ae8", "score": "0.58027333", "text": "function ImprimeCabecalho() {\r\n extract($GLOBALS);\r\n\r\n ShowHTML('<tr><td align=\"center\">');\r\n ShowHTML(' <TABLE class=\"tudo\" WIDTH=\"100%\" bgcolor=\"'.$conTableBgColor.'\" BORDER=\"'.$conTableBorder.'\" CELLSPACING=\"'.$conTableCellSpacing.'\" CELLPADDING=\"'.$conTableCellPadding.'\" BorderColorDark=\"'.$conTableBorderColorDark.'\" BorderColorLight=\"'.$conTableBorderColorLight.'\">');\r\n ShowHTML(' <tr bgcolor=\"#DCDCDC\" align=\"center\">');\r\n switch ($p_agrega) {\r\n case 'GRSRUNID': ShowHTML(' <td><b>Setor solicitante</td>'); break;\r\n case 'GRSRPROJ': ShowHTML(' <td><b>Projeto</td>'); break;\r\n case 'GRSRPROP': ShowHTML(' <td><b>Proponente</td>'); break;\r\n case 'GRSRRESP': ShowHTML(' <td><b>Solicitante</td>'); break;\r\n case 'GRSRRESPATU': ShowHTML(' <td><b>Opinião</td>'); break;\r\n case 'GRSRCC': ShowHTML(' <td><b>Classificação</td>'); break;\r\n case 'GRSRSETOR': ShowHTML(' <td><b>Setor executor</td>'); break;\r\n case 'GRSRPRIO': ShowHTML(' <td><b>Serviço</td>'); break;\r\n case 'GRSRLOCAL': ShowHTML(' <td><b>UF</td>'); break;\r\n case 'GRSREXEC': ShowHTML(' <td><b>Executor</td>'); break;\r\n } \r\n ShowHTML(' <td><b>Total</td>');\r\n ShowHTML(' <td><b>Cad.</td>');\r\n ShowHTML(' <td><b>Exec.</td>');\r\n ShowHTML(' <td><b>Conc.</td>');\r\n ShowHTML(' <td><b>Atraso</td>');\r\n ShowHTML(' <td><b>Aviso</td>');\r\n if ($_SESSION['INTERNO']=='S') {\r\n ShowHTML(' <td><b>Valor</td>');\r\n //ShowHTML(' <td><b>$ Real</td>');\r\n //ShowHTML(' <td><b>Real > Previsto</td>');\r\n } \r\n ShowHTML(' </tr>');\r\n}", "title": "" }, { "docid": "61766f042a35beaedf44548ff9acf9ec", "score": "0.5801573", "text": "function cl_contlotv() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"contlotv\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "3608f24da6047335d6b449e65d69de0d", "score": "0.5791322", "text": "public function actionIndexCreate()\r\n\t\t{\r\n\r\n\t\t\tif ( isset($_SESSION['idContribuyente']) && isset($_SESSION['begin']) ) {\r\n\r\n\t\t\t\t$idContribuyente = $_SESSION['idContribuyente'];\r\n\t\t\t\tif ( ContribuyenteBase::getTipoNaturalezaDescripcionSegunID($idContribuyente) == 'JURIDICO' ) {\r\n\r\n\t\t\t\t\t$request = Yii::$app->request;\r\n\t\t\t\t\t$postData = $request->post();\r\n\r\n\t\t\t\t\tif ( isset($postData['btn-quit']) ) {\r\n\t\t\t\t\t\tif ( $postData['btn-quit'] == 1 ) {\r\n\t\t\t\t\t\t\treturn $this->redirect(['quit']);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} elseif ( isset($postData['data-ano-impositivo']) && isset($postData['data-periodo'])\r\n\t\t\t\t\t\t && isset($postData['data-key']) ) {\r\n\t\t\t\t\t\t// Vista previa.\r\n\t\t\t\t\t\t// Lo siguiente recibe un segun parametro, \"tipo liquidacion\", este parametro es\r\n\t\t\t\t\t\t// opcional y por defecto se setea a \"ESTIMADA\".\r\n\t\t\t\t\t\t$liquidar = New Liquidar($idContribuyente);\r\n\t\t\t\t\t\t$ultimoLapsoLiquidado = $liquidar->getUltimoLapsoLiquidado();\r\n\r\n\t\t\t\t\t\t// Lapsos liquidados.\r\n\t\t\t\t\t\t$detalles = $liquidar->iniciarProcesoLiquidacion();\r\n\r\n\t\t\t\t\t\t$dataKey = 0;\r\n\t\t\t\t\t\t$dataKey = (int)$postData['data-key'];\r\n\r\n\t\t\t\t\t\t// data provider de lo seleccionado.\r\n\t\t\t\t\t\tforeach ( $detalles as $key => $value ) {\r\n\t\t\t\t\t\t\tif ( $key <= $dataKey ) {\r\n\t\t\t\t\t\t\t\t$detalleSeleccion[$key] = $detalles[$key];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif ( count($detalleSeleccion) > 0 ) {\r\n\r\n\t\t\t\t\t\t\t$provider = New ArrayDataProvider([\r\n\t\t\t\t\t\t\t\t\t\t\t'allModels' => $detalleSeleccion,\r\n\t\t\t\t\t\t\t\t\t\t\t'pagination' => false,\r\n\t\t\t\t\t\t\t\t]);\r\n\r\n\t\t\t\t\t\t\t$caption = Yii::t('frontend', 'Confirme seleccion de lapsos');\r\n\t\t\t\t\t\t\t$subCaption = Yii::t('frontend', 'Confirmar. Detalle de la liquidacion');\r\n\t\t\t\t\t\t\treturn $this->render('/aaee/liquidar/pre-view-liquidacion',[\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'caption' => $caption,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'subCaption' => $subCaption,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'dataProvider' => $provider,\r\n\t\t\t\t\t\t\t\t\t]);\r\n\t\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\t} elseif ( isset($postData['btn-confirm-create']) ) {\r\n\t\t\t\t\t\tif ( $postData['btn-confirm-create'] == 3 ) {\r\n\r\n\t\t\t\t\t\t\t$chkSeleccion = $postData['chkLapso'];\r\n\t\t\t\t\t\t\t$liquidar = New Liquidar($idContribuyente);\r\n\r\n\t\t\t\t\t\t\t// Lapsos liquidados.\r\n\t\t\t\t\t\t\t$detalles = $liquidar->iniciarProcesoLiquidacion();\r\n\r\n\t\t\t\t\t\t\tforeach ( $chkSeleccion as $key => $value ) {\r\n\t\t\t\t\t\t\t\t$models[$key] = New PagoDetalle();\r\n\t\t\t\t\t\t\t\tforeach ( $models[$key]->attributes as $i => $valor ) {\r\n\t\t\t\t\t\t\t\t\tif ( isset($detalles[$key][$i]) ) {\r\n\t\t\t\t\t\t\t\t\t\t$models[$key]->$i = $detalles[$key][$i];\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tif ( count($models) > 0 ) {\r\n\t\t\t\t\t\t\t\t$result = self::actionBeginSave($models, $idContribuyente);\r\n\t\t\t\t\t\t\t\tself::actionAnularSession(['begin']);\r\n\t\t\t\t\t\t\t\tif ( $result ) {\r\n\t\t\t\t\t\t\t\t\t$this->_transaccion->commit();\r\n\t\t\t\t\t\t\t\t\t$this->_conn->close();\r\n\t\t\t\t\t\t\t\t\t// Mostrar resultado.\r\n\t\t\t\t\t\t\t\t\treturn self::actionMostrarLiquidacionGuardada($models);\r\n\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t$this->_transaccion->rollBack();\r\n\t\t\t\t\t\t\t\t\t$this->_conn->close();\r\n\t\t\t\t\t\t\t\t\t$this->redirect(['error-operacion', 'id' => 920]);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\t// Lo siguiente recibe un segun parametro, \"tipo liquidacion\", este parametro es\r\n\t\t\t\t\t// opcional y por defecto se setea a \"ESTIMADA\".\r\n\t\t\t\t\t$liquidar = New Liquidar($idContribuyente);\r\n\r\n\t\t\t\t\t$mensajes = $liquidar->validarEvento();\r\n\t\t\t\t\tif ( count($mensajes) == 0 ) {\r\n\r\n\t\t\t\t\t\t$ultimoLapsoLiquidado = $liquidar->getUltimoLapsoLiquidado();\r\n\r\n\t\t\t\t\t\t// Lapsos liquidados.\r\n\t\t\t\t\t\t$detalles = $liquidar->iniciarProcesoLiquidacion();\r\n\r\n\t\t\t\t\t\tif ( count($detalles) > 0 ) {\r\n\t\t\t\t\t\t\t$provider = $liquidar->getDataProviderDetalle();\r\n\t\t\t\t\t\t\t$fechaInicio = $liquidar->getFechaInicioActividad();\r\n\r\n\t\t\t\t\t\t\t// Vista inicial.\r\n\t\t\t\t\t\t\tif ( count($detalles) > 0 ) {\r\n\t\t\t\t\t\t\t\t$caption = Yii::t('frontend', 'Detalle de la Liquidacion');\r\n\t\t\t\t\t\t\t\t$subCaption = Yii::t('frontend', 'Informacion relevante');\r\n\r\n\t\t\t\t\t\t\t\treturn $this->render('/aaee/liquidar/_view-detalle',[\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'dataProvider' => $provider,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'caption' => $caption,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'subCaption' => $subCaption,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'fechaInicio' => $fechaInicio,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'ultimoLapsoLiquidado' => $ultimoLapsoLiquidado,\r\n\r\n\t\t\t\t\t\t\t\t\t]);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// No se encontraron detalles pendientes.\r\n\t\t\t\t\t\t\t$r = $liquidar->getErrors();\r\n\t\t\t\t\t\t\treturn $this->render('/aaee/liquidar/warning',['mensajes' => $r]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\treturn $this->render('/aaee/liquidar/warning',['mensajes' => $mensajes]);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn $this->redirect(['error-operacion', 'cod' => 934]);\r\n\t\t\t\t}\r\n\r\n\t\t\t} else {\r\n\t\t\t\t// No esta definida la session del contribuyente.\r\n\t\t\t\treturn $this->redirect(['quit']);\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "1d495aec97a9d45068e6a4e4e998ec54", "score": "0.57793826", "text": "function cl_empempenhofinalidadepagamentofundeb() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"empempenhofinalidadepagamentofundeb\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "47cc74b59d9a87c1867a00bc17ada417", "score": "0.5777081", "text": "public function accueil()\n {\n $this->indexVisiteur('templates/vueAccueilPrincipal');\n }", "title": "" }, { "docid": "6984146ae384dfb4447a465843d5cf82", "score": "0.5764277", "text": "public function createParametrosCursos()\n {\n \treturn view('parametros.cursos.create_cursos');\n }", "title": "" }, { "docid": "55d497b65afa3872a216a883c6a19dfc", "score": "0.5758132", "text": "public function afficheIndex(){\r\n \r\n //include de l'index de jcDecaux pour pointer dessus\r\n include 'templateDebut.php';\r\n include 'pIndexAvecAjax.php';\r\n include 'templateFin.php';\r\n /*\r\n ?> \r\n <a href=\"do.php?action=visualiserAliments\"> Visualiser aliments </a><BR/>\r\n <a href=\"do.php?action=visualiserComposants\"> Visualiser composants</a><BR/>\r\n <a href=\"do.php?action=visualiserSources\"> Visualiser sources </a><BR/>\r\n <a href=\"do.php?action=insereFormGenre\">Insérer un genre</a><BR/>\r\n <a href=\"do.php?action=insereFormAliment\"> Insérer un aliment</a><BR/>\r\n <a href=\"do.php?action=visualiseFormConstAlim\"> Visualiser les constituants d'un aliment</a><BR/>\r\n <a href=\"do.php?action=visualiseAlimGenre\"> Visualiser les aliments triés par genre</a><BR/>\r\n <a href=\"do.php?action=visualiseFormRechAlim\"> Rechercher un aliment</a><BR/><BR/>\r\n \r\n <a href=\"do.php?action=testModele\"> Test</a><BR/>\r\n <?php*/\r\n // $this->getRetourAccueil();\r\n //$this->getFinPage();\r\n }", "title": "" }, { "docid": "148782378a04c700d2bbf9f9daa53bc3", "score": "0.5752292", "text": "public function init()\n\t{\n\t\t$cadi=$this->controlador;\n\t\t//ECHO $cadi.\" \";\n\t\t$cadi=strtoupper(trim($cadi[0]));\n\t\t//ECHO \" LA PRIMER ALETRA \".$cadi;\n\t\t$cadi=$cadi.substr($this->controlador,1);\n\t\t//echo \" el resto \".substr($this->controlador,1);\n\t\t$this->controlador=$cadi;\n\t\t\n\t\t//$this->controlador=ucwords(strtolower(trim($this->controlador)));\n\t\t//$this->nombreclase=Yii::app()->explorador->nombreclase($this->nombrecampo,$this->relaciones);\n\t\t\n\t\t\t\t\t \n\t\t\t\t\t\t\t\t \n\t\t\n\t\t\n\t\t\n\t\t\tforeach ($this->relaciones as $clave => $valor) {\n\t\t\t\t\t\t\tforeach ( $this->relaciones[$clave] as $clave2=>$valor2 ) {\n\t\t\t\t\t\t\t\t\t\t\t\t//echo $valor2.\"=???\".$campito.\"<br>\";\n\t\t\t\t\t\t\t\t\t\t\t\t// echo $relaciones[$clave][1];\n\t\t\t\t\t\t\t\t\t\t\tif ($valor2==$this->nombrecampo) {\n\t\t\t\t\t\t\t\t\t\t\t //echo \"salio\";\n\t\t\t\t\t\t\t\t\t\t\t\t$mitabla= $this->relaciones[$clave][1];\n\t\t\t\t\t\t\t\t\t\t\t\t$aliastabla=$clave;\n\t\t\t\t\t\t\t\t\t\t\t\t//echo $mitabla;\n\t\t\t\t\t\t\t\t\t\t\t break;\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}\n\t\t\n\t\t\t\t\t\t}\n\t\t\t\t$this->nombreclase= $mitabla;\n\t \n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t}", "title": "" }, { "docid": "d3d53210c778dd273661ae8fa5808a7f", "score": "0.57477474", "text": "private function definePages()\n\t{\n\t\t//<CRUDKIT-PAGES-START> !!! Do not remove this line. Otherwise /auto-generate wont work !!!\n\t\t//### Example code - works with the demo database ###\n\n\t\t//Custom action\n\t\t$seachCallback = function($record, PageDescriptor $pageDescriptor, Action $action)\n\t\t{\n\t\t\t$authorName = urlencode($record['name']);\n\t\t\theader('Location: ' . 'https://wikipedia.org/wiki/Special:Search?search=' . $authorName);\n\t\t\tdie();\n\t\t};\n\n\t\t//Show prices only to the admin\n\t\t$onOpenAuthorListCallback = function(PageDescriptor &$pageDescriptor, TableDescriptor &$tableDescriptor, &$records)\n\t\t{\n\t\t\tif(session('crudkit-userid') !== 'admin')\n\t\t\t{\n\t\t\t\t$cols = $pageDescriptor->getSummaryColumns(true); //get columns\n\t\t\t\tunset($cols['price']); //remove price column\n\t\t\t\t$pageDescriptor->setSummaryColumns($cols); //set columns\n\t\t\t}\n\t\t};\n\n\t\t//Defining a Lookup column: As the name suggests it looks someting up: in this case the name of the author. It uses relation from book.author_id to author.id\n\t\t$authorLookup = new Lookup($this->tables['author'], 'name', [new FilterDefinition('id', '=', 'field', 'author_id')], 'lookup', 'Author Name', 'after-field', 'author_id', 'author', true);\n\t\t//Main code\n\t\treturn \n\t\t[\n\t\t\t'author' => (new PageDescriptor('Authors', 'author', $this->tables['author']))\n\t\t\t\t->setCardLinkColumns(['name'])\n\t\t\t\t->addAction('search-on-wikipedia', 'Search on Wikipedia', 'Search', $seachCallback)\n\t\t\t\t,\n\t\t\t'book' => (new PageDescriptor('Books', 'book', $this->tables['book']))\n\t\t\t\t->setCardLinkColumns(['name'])\n\t\t\t\t->addSection('Additional Data', 'cover', 'price')\n\t\t\t\t->addLookupColumn('author_name', $authorLookup)\n\t\t\t\t->setTitleText('(New Book)', ['create'])\n\t\t\t\t->onOpenList($onOpenAuthorListCallback)\n\t\t\t\t,\n\t\t\t'sale' => (new PageDescriptor('Sales', 'sale', $this->tables['sale']))\n\t\t\t\t->setCardLinkColumns([])\n\t\t];\n\t\t//<CRUDKIT-PAGES-END> !!! Do not remove this line. Otherwise /auto-generate wont work !!!\n\t}", "title": "" }, { "docid": "7145cef729fbaf6e994adf5ff49da4bc", "score": "0.5745344", "text": "public function decouvertsAction()\r\n {\r\n $this->_helper->layout->disableLayout();\r\n $aParams = $this->getRequest()->getParams();\r\n\r\n $this->view->decouverts = OperationDecouvertsQuery::create()->findByOpId($aParams['op_id']);\r\n }", "title": "" }, { "docid": "1248d62db1d40fc9d856bd38940ec953", "score": "0.57440805", "text": "function cl_classificacaorisco() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"classificacaorisco\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "10f51fa539136c731072427a7cd5d1cc", "score": "0.5728373", "text": "function cl_contrinot() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"contrinot\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "4756b853ba46f259e22ea9cb160b19cb", "score": "0.5726187", "text": "public function cobrarcuota(){\r\n\r\n $convenios_obj = new conveniosModel();\r\n $convenios = $convenios_obj->_pago_cuota($_POST);\r\n $datos = $_POST;\r\n $datos['id_concepto'] = 3;\r\n $datos['id_caso'] = $datos['id'];\r\n unset($datos['convenios']);\r\n unset($datos['id']);\r\n $datos['fecha'] = mostrar_fecha_esp($datos['fecha']);\r\n $contabilidad_obj = new contabilidadModel();\r\n $convenios = $contabilidad_obj->_insert($datos);\r\n header(\"location:\".__SITIO.\"index.php/casosAdmin/edit/\".$datos['id_caso'].\"/\");\r\n }", "title": "" }, { "docid": "de0af310c4b7a3379644ef8d87625da3", "score": "0.57261205", "text": "function listarTipoCcArbRep(){\n $node=$this->objParam->getParametro('node');\n\n $id_cuenta=$this->objParam->getParametro('id_tipo_cc');\n $tipo_nodo=$this->objParam->getParametro('tipo_nodo');\n \n \n if($node=='id'){\n $this->objParam->addParametro('id_padre','%');\n }\n else {\n $this->objParam->addParametro('id_padre',$id_tipo_cc);\n }\n \n\t\t$this->objFunc=$this->create('sis_contabilidad/MODRango');\n $this->res=$this->objFunc->listarTipoCcArbRep();\n \n $this->res->setTipoRespuestaArbol();\n \n $arreglo=array();\n \n array_push($arreglo,array('nombre'=>'id','valor'=>'id_tipo_cc'));\n array_push($arreglo,array('nombre'=>'id_p','valor'=>'id_tipo_cc_fk'));\n \n \n array_push($arreglo,array('nombre'=>'text','valores'=>'<b> #codigo# - #balance_mb#</b>'));\n array_push($arreglo,array('nombre'=>'cls','valor'=>'nombre_cuenta'));\n array_push($arreglo,array('nombre'=>'qtip','valores'=>'<b> #codigo#</b><br/><br> #descripcion#'));\n \n \n $this->res->addNivelArbol('tipo_nodo','raiz',array('leaf'=>false,\n 'allowDelete'=>true,\n 'allowEdit'=>true,\n 'cls'=>'folder',\n 'tipo_nodo'=>'raiz',\n 'icon'=>'../../../lib/imagenes/a_form.png'),\n $arreglo);\n \n /*se ande un nivel al arbol incluyendo con tido de nivel carpeta con su arreglo de equivalencias\n es importante que entre los resultados devueltos por la base exista la variable\\\n tipo_dato que tenga el valor en texto = 'hoja' */\n \n\n $this->res->addNivelArbol('tipo_nodo','hijo',array(\n 'leaf'=>false,\n 'allowDelete'=>true,\n 'allowEdit'=>true,\n 'tipo_nodo'=>'hijo',\n 'icon'=>'../../../lib/imagenes/a_form.png'),\n $arreglo);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\n\t\t$this->res->addNivelArbol('tipo_nodo','hoja',array(\n 'leaf'=>true,\n 'allowDelete'=>true,\n 'allowEdit'=>true,\n 'tipo_nodo'=>'hoja',\n 'icon'=>'../../../lib/imagenes/a_table_gear.png'),\n $arreglo);\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\n\n $this->res->imprimirRespuesta($this->res->generarJson()); \n\n }", "title": "" }, { "docid": "e9b75c6a74c9fcfeba1e4bcab40b34a0", "score": "0.5719698", "text": "private function _preparePage ()\n {\n if (!count ($this->_data->page)) {\n throw new \\Exception('É necessário pelo menos um adicionar item para montagem do Wizard.');\n }\n\n $this->_data->html .= \"<div id=\\\"{$this->_idContainer}\\\" class=\\\"marginTop20\\\">\".PHP_EOL;\n //$this->_data->html .= '<div class=\"span2 ball-line-pointers\"></div>'.PHP_EOL;\n\n $count = count($this->_data->page);\n foreach ($this->_data->page as $key => $value):\n if (0 == $key) {\n $this->_data->html .= '<div class=\"span2 alignCenter ball-wizard marginLeft0 fontBold\">'.PHP_EOL;\n } else {\n if ($count == ($key + 1)) {\n $this->_data->html .= '<div class=\"span2 alignCenter ball-wizard marginLeft0\">'.PHP_EOL;\n } else {\n $this->_data->html .= '<div class=\"span2 alignCenter ball-wizard marginLeft0\">'.PHP_EOL;\n }\n }\n $page = $key+1;\n $this->_data->html .= \"<a class=\\\"link-wizard {$value['route']} \\\" rel=\\\"{$value['route']}\\\">{$page}\n .{$value['title-translate']}</a>\".PHP_EOL;\n $this->_data->html .= '</div>'.PHP_EOL;\n endforeach;\n\n $this->_data->html .= '<div class=\"span1 ball-line-pointers\"></div>'.PHP_EOL;\n $this->_data->html .= '</div>'.PHP_EOL;\n $this->_data->html .= '<br/>'.PHP_EOL;\n $this->_data->html .= '<div id=\"wizard-container\" class=\"container marginTop20 nav-container\">'.PHP_EOL;\n $this->_data->html .= '</div>'.PHP_EOL;\n }", "title": "" }, { "docid": "413039689e6cd575d89a347fa4a60cf6", "score": "0.5718672", "text": "function cp() {\n\t\t$cp = array();\n\t\tarray_push($cp, array('$H4', 'id_nw', 'id_nw', False, False, ''));\n\t\tarray_push($cp, array('$HV', 'nw_journal', 1, True, True, ''));\n\t\tarray_push($cp, array('$S20', 'nw_ref', msg('page_ref'), True, True, ''));\n\t\tarray_push($cp, array('$S200', 'nw_titulo', msg('title'), True, True, ''));\n\t\tarray_push($cp, array('$T60:8', 'nw_descricao', msg('content'), False, True, ''));\n\t\t//dd5\n\t\tarray_push($cp, array('$HV', 'nw_dt_de', 19000101, True, True, ''));\n\t\tarray_push($cp, array('$HV', 'nw_dt_ate', 19000101, True, True, ''));\n\t\tarray_push($cp, array('$HV', 'nw_fonte', '', False, True, ''));\n\t\tarray_push($cp, array('$HV', 'nw_link', '', False, True, ''));\n\t\tarray_push($cp, array('$HV', 'nw_secao', 1, False, True, ''));\n\t\t//dd10\n\t\tarray_push($cp, array('$O pt_BR:Portugues&en_US:English&es:Español&fr:Français', 'nw_idioma', 'Idioma', True, True, ''));\n\t\tarray_push($cp, array('$U8', 'nw_dt_cadastro', 'data', False, True, ''));\n\t\treturn ($cp);\n\t}", "title": "" }, { "docid": "8827d0bd7c30f9286a067f8902fb37a5", "score": "0.5708809", "text": "public function crescer(){\n $this->comer();\n echo '<br/>' .'estou crescendo';\n }", "title": "" }, { "docid": "fc1aa856be367476f622e57eaa3efaa0", "score": "0.57077795", "text": "public function _load_constroctor_details(){\r\n\t\t\r\n\t}", "title": "" }, { "docid": "ca7f6c3ffc1fbf0dc7b7ef8f3950ce81", "score": "0.570325", "text": "function __construct() {\n\n /**\n * Definicion de tipos de campos\n */\n $this->assignType(\"id\", \"ID\", BaseView::HIDDEN);\n $this->assignType(\"target\", \"Auditoría\", BaseView::STRING);\n $this->assignType(\"creation_date\", JText::_(\"COM_SORCORE_DATE\"), BaseView::DATE_TIME, array( \"dateFormatPHP\" => \"Y-m-d H:i\" ));\n $this->assignType(\"operation\", \"Operación\", BaseView::PICKLIST, array(\n \"C\" => \"Creación\",\n \"R\" => \"Consulta\",\n \"U\" => \"Actualización\",\n \"D\" => \"Borrado\",\n ));\n \n $this->assignType(\"user_id\", JText::_(\"COM_CTC_USER\"), BaseView::ENTITY, array(\n BaseView::ENT_CLASS => \"UserJ\",\n BaseView::ENT_FIELD => \"username\",\n BaseView::ENT_FILTER => null));\n\t\t\n\t\t$this->assignType(\"extra\", \"Extra\", BaseView::STRING);\n\t\t$this->assignType(\"before\", \"Antes\", BaseView::STRING);\n\t\t$this->assignType(\"after\", \"Después\", BaseView::STRING);\n \n /**\n * Definicion de vistas y sus acciones\n */\n $this->addView(\"form\", array(\n \"target\",\n \"creation_date\",\n \"user_id\",\n \"operation\",\n\t\t\t\"extra\",\n\t\t\t\"before\",\n\t\t\t\"after\"\n ));\n \n $this->addAction(\"form\", \"filter\", JText::_(\"COM_CTC_FILTER\"), \"search.png\");\n\n $this->addView(\"table\", array(\n \"target\",\n \"creation_date\",\n \"user_id\",\n \"operation\",\n\t\t\t\"extra\",\n\t\t\t\"before\",\n\t\t\t\"after\",\n\t\t\t\n ));\n $this->addAction(\"table\", \"table_detail\", \"Ver detalles\", \"zoom-in\");\n $rule = function($obj) {\n if($obj->before || $obj->after || $obj->extra) {\n return true;\n }\n return false;\n };\n $this->addActionDisplayRule(\"table\", \"table_detail\", $rule);\n\n $this->addView(\"dialog\", array());\n $this->addAction(\"dialog\", \"dialog_ok\", JText::_(\"COM_CTC_OK\"), \"accept.png\");\n }", "title": "" }, { "docid": "34b8f07570afae72c3463b9f4ea78eed", "score": "0.5696736", "text": "public function ocsObjectsPage()\n {\n global $index_includes, $g_comp_template, $g_comp_database;\n\n $g_comp_template->assign(\"content_title\", \"OCS Inventory\")\n ->smarty_tom_add_rule(\"tom.content.bottom.buttons.*.p_bInvisible=1\");\n\n $l_dao = new isys_component_dao_ocs($g_comp_database);\n $l_settings_res = $l_dao->getOCSDBs();\n $l_ocs_db_list = [];\n\n $l_default_ocs_db = isys_tenantsettings::get('ocs.default.db', null);\n\n if ($l_settings_res->num_rows() > 0)\n {\n if ($l_dao->getOCSDB($l_default_ocs_db) == null)\n {\n $l_default_ocs_db = null;\n isys_tenantsettings::set('ocs.default.db', '');\n }\n\n while ($l_settings = $l_settings_res->get_row())\n {\n if ($l_default_ocs_db == null)\n {\n $l_default_ocs_db = $l_settings['isys_ocs_db__id'];\n }\n\n $l_ocs_db_list[$l_settings['isys_ocs_db__id']] = $l_settings[\"isys_ocs_db__host\"] . ' - ' . $l_settings[\"isys_ocs_db__schema\"];\n }\n }\n\n $l_sql = 'SELECT isys_obj_type__id, isys_obj_type__title, isys_obj_type_group__title FROM isys_obj_type ' . 'INNER JOIN isys_obj_type_group ON isys_obj_type_group__id = isys_obj_type__isys_obj_type_group__id ' . 'WHERE isys_obj_type__show_in_tree = 1 AND isys_obj_type_group__const != \\'C__OBJTYPE_GROUP__CONTACT\\' AND isys_obj_type__status = ' . C__RECORD_STATUS__NORMAL;\n $l_res = $l_dao->retrieve($l_sql);\n $l_obj_type_groups = [];\n while ($l_row = $l_res->get_row())\n {\n $l_obj_type_groups[_L($l_row['isys_obj_type_group__title'])][$l_row['isys_obj_type__id']] = _L($l_row['isys_obj_type__title']);\n } // while\n\n foreach ($l_obj_type_groups AS $l_key => $l_obj_types)\n {\n asort($l_obj_type_groups[$l_key]);\n } // foreach\n\n $l_rules['templaet_objtype_arr']['p_arData'] = serialize($l_obj_type_groups);\n $l_rules['all_objtypes']['p_arData'] = serialize($l_obj_type_groups);\n $l_rules['selected_ocsdb']['p_arData'] = serialize($l_ocs_db_list);\n $l_rules['ocs_overwrite_hostaddress_port']['p_arData'] = serialize(get_smarty_arr_YES_NO());\n $l_rules['selected_ocsdb']['p_strSelectedID'] = $l_default_ocs_db;\n\n $g_comp_template->smarty_tom_add_rules(\"tom.content.bottom.content\", $l_rules);\n $g_comp_template->assign('js_script', 'show_ocs_objects(' . $l_default_ocs_db . ')');\n\n $index_includes['contentbottomcontent'] = \"modules/import/ocs_objects.tpl\";\n }", "title": "" }, { "docid": "2ae4c1ebc381bd8576ed1be45130836d", "score": "0.5691397", "text": "function affichage_boutonpages()\n\t{\n\n\tglobal $refpage,$nbpage,$categorie,$lg,$ressourcepagedeb,$ressourcepagefin,$idprofil;\n\n\techo '<table><tr>';\n\t\tfor ($i = 1; $i <= $nbpage; $i++) {\n\t\t\t\t\t$ressourcepagedeb=$ressourcepagedeb+5;\n\t\t\t\t\t$ressourcepagefin=$ressourcepagefin+5;\n\t\t\techo '<td width=\"20\">';\n\t\t\t\tif ($i==$refpage) {\n\t\t\t\t\techo '<table border=\"0\" cellpadding=\"4\" cellspacing=\"2\" width=\"30\">'; // couleur fonc�e\n\t\t\t\t\t\techo '<td align=\"center\"><span class=\"texte_default\">'.$i.'</span></td>';\n\t\t\t\t\techo '</table>';\n\t\t\t\t} else {\n\n\t\t\t\t\techo '<table border=\"0\" cellpadding=\"4\" cellspacing=\"2\" bgcolor=\"'.couleur(1).'\" width=\"30\">'; // couleur fonc�e\n\t\t\t\t\t\techo '<td align=\"center\"><a href=\"?lg='.$lg.'&categorie='.$categorie.'&refpage='.$i.'\"><span class=\"texte_info12\">'.$i.'</span></a></td>';\n\t\t\t\t\techo '</table>';\n\t\t\t\t}\n\n\t\t\techo '</td>';\n\n\t\t}\n\techo '</tr></table>';\n\n\n\t}", "title": "" }, { "docid": "1383e456f1506d92f212f93b10cf8bee", "score": "0.56892115", "text": "public function loadCouleurs()\n\t{\n\t\t$couleurs = [];\n\n\t\t//Default\n\t\tarray_push($couleurs, ['nom' => 'Aucune', 'code_hexa' => '']);\n\n\t\t//NUANCES ROUGE\n\t\tarray_push($couleurs, ['nom' => 'Blanc', 'code_hexa' => '#ffffff']);\n\t\tarray_push($couleurs, ['nom' => 'Lonestar', 'code_hexa' => '#660000']);\n\t\tarray_push($couleurs, ['nom' => 'Baie rouge', 'code_hexa' => '#990000']);\n\t\tarray_push($couleurs, ['nom' => 'Garde rouge', 'code_hexa' => '#CC0000']);\n\t\tarray_push($couleurs, ['nom' => 'Rouge', 'code_hexa' => '#FF0000']);\n\t\tarray_push($couleurs, ['nom' => 'Doux-amer', 'code_hexa' => '#FF6666']);\n\t\tarray_push($couleurs, ['nom' => 'Mona Lisa', 'code_hexa' => '#FF9999']);\n\t\tarray_push($couleurs, ['nom' => 'Your Pink', 'code_hexa' => '#FFCCCC']);\n\n\t\t//NUANCES ORANGE\n\t\tarray_push($couleurs, ['nom' => 'Noir', 'code_hexa' => '#000000']);\n\t\tarray_push($couleurs, ['nom' => 'Bois de noix de muscade', 'code_hexa' => '#663300']);\n\t\tarray_push($couleurs, ['nom' => 'Oregon', 'code_hexa' => '#993300']);\n\t\tarray_push($couleurs, ['nom' => 'Blaze Orange', 'code_hexa' => '#FF6600']);\n\t\tarray_push($couleurs, ['nom' => 'Orange outrancière', 'code_hexa' => '#FF6633']);\n\t\tarray_push($couleurs, ['nom' => 'Mandarine atomique', 'code_hexa' => '#FF9966']);\n\t\tarray_push($couleurs, ['nom' => 'Orange pêche', 'code_hexa' => '#FFCC99']);\n\n\t\t//NUANCES JAUNE\n\t\tarray_push($couleurs, ['nom' => 'Mine Shaft', 'code_hexa' => '#333333']);\n\t\tarray_push($couleurs, ['nom' => 'Potters Clay', 'code_hexa' => '#996633']);\n\t\tarray_push($couleurs, ['nom' => 'Bouddha Or', 'code_hexa' => '#CC9900']);\n\t\tarray_push($couleurs, ['nom' => 'Supernova', 'code_hexa' => '#FFCC00']);\n\t\tarray_push($couleurs, ['nom' => 'Jaune', 'code_hexa' => '#FFFF00']);\n\t\tarray_push($couleurs, ['nom' => 'Pâle Canaries', 'code_hexa' => '#FFFF99']);\n\t\tarray_push($couleurs, ['nom' => 'Crème', 'code_hexa' => '#FFFFCC']);\n\n\t\t//NUANCES VERT\n\t\tarray_push($couleurs, ['nom' => 'Dove Gray', 'code_hexa' => '#666666']);\n\t\tarray_push($couleurs, ['nom' => 'Sapin profond', 'code_hexa' => '#003300']);\n\t\tarray_push($couleurs, ['nom' => 'Camarone', 'code_hexa' => '#006600']);\n\t\tarray_push($couleurs, ['nom' => 'Laurel japonais', 'code_hexa' => '#009900']);\n\t\tarray_push($couleurs, ['nom' => 'Vert', 'code_hexa' => '#00FF00']);\n\t\tarray_push($couleurs, ['nom' => 'Menthe verte', 'code_hexa' => '#99FF99']);\n\t\tarray_push($couleurs, ['nom' => 'Menthe enneigée', 'code_hexa' => '#CCFFCC']);\n\n\t\t//NUANCES BLEU-VERT\n\t\tarray_push($couleurs, ['nom' => 'Gris poussiéreux', 'code_hexa' => '#999999']);\n\t\tarray_push($couleurs, ['nom' => 'Sarcelle profonde', 'code_hexa' => '#003333']);\n\t\tarray_push($couleurs, ['nom' => 'Pierre bleue', 'code_hexa' => '#006666']);\n\t\tarray_push($couleurs, ['nom' => 'Vert persan', 'code_hexa' => '#009999']);\n\t\tarray_push($couleurs, ['nom' => 'Downy', 'code_hexa' => '#66CCCC']);\n\t\tarray_push($couleurs, ['nom' => 'Bleu vert', 'code_hexa' => '#66FFCC']);\n\n\t\t//NUANCES BLEU-CLAIR\n\t\tarray_push($couleurs, ['nom' => 'Gris', 'code_hexa' => '#CCCCCC']);\n\t\tarray_push($couleurs, ['nom' => 'Ruban bleu', 'code_hexa' => '#0066FF']);\n\t\tarray_push($couleurs, ['nom' => 'Azure Radiance', 'code_hexa' => '#0099FF']);\n\t\tarray_push($couleurs, ['nom' => 'Cyan / Aqua', 'code_hexa' => '#00FFFF']);\n\t\tarray_push($couleurs, ['nom' => 'Anakiwa', 'code_hexa' => '#99FFFF']);\n\n\t\t//NUANCES BLEU-FONCE\n\t\tarray_push($couleurs, ['nom' => 'Bleu marin', 'code_hexa' => '#000066']);\n\t\tarray_push($couleurs, ['nom' => 'Bleu foncé', 'code_hexa' => '#0000CC']);\n\t\tarray_push($couleurs, ['nom' => 'Bleu', 'code_hexa' => '#0000FF']);\n\t\tarray_push($couleurs, ['nom' => 'Malibu', 'code_hexa' => '#66CCFF']);\n\t\tarray_push($couleurs, ['nom' => 'Anakiwa', 'code_hexa' => '#99CCFF']);\n\n\t\t//NUANCES VIOLET\n\t\tarray_push($couleurs, ['nom' => 'Christalle', 'code_hexa' => '#330066']);\n\t\tarray_push($couleurs, ['nom' => 'Violet électrique', 'code_hexa' => '#9900CC']);\n\t\tarray_push($couleurs, ['nom' => 'Violet foncé', 'code_hexa' => '#9933FF']);\n\t\tarray_push($couleurs, ['nom' => 'Melrose', 'code_hexa' => '#9999FF']);\n\t\tarray_push($couleurs, ['nom' => 'Pervenche', 'code_hexa' => '#CCCCFF']);\n\n\t\t//NUANCES ROSE\n\t\tarray_push($couleurs, ['nom' => 'Kimberly', 'code_hexa' => '#666699']);\n\t\tarray_push($couleurs, ['nom' => 'Pompadour', 'code_hexa' => '#660066']);\n\t\tarray_push($couleurs, ['nom' => 'Fresh Eggplant', 'code_hexa' => '#990066']);\n\t\tarray_push($couleurs, ['nom' => 'Hollywood Cerise', 'code_hexa' => '#CC0099']);\n\t\tarray_push($couleurs, ['nom' => 'Hollywood Cerise Clair', 'code_hexa' => '#FF0099']);\n\t\tarray_push($couleurs, ['nom' => 'Magenta / Fuchsia', 'code_hexa' => '#FF00FF']);\n\t\tarray_push($couleurs, ['nom' => 'Lavande Rose', 'code_hexa' => '#FF99FF']);\n\t\tarray_push($couleurs, ['nom' => 'Dentelle rose', 'code_hexa' => '#FFCCFF']);\n\n\t\treturn $couleurs;\n\t}", "title": "" }, { "docid": "1383e456f1506d92f212f93b10cf8bee", "score": "0.56892115", "text": "public function loadCouleurs()\n\t{\n\t\t$couleurs = [];\n\n\t\t//Default\n\t\tarray_push($couleurs, ['nom' => 'Aucune', 'code_hexa' => '']);\n\n\t\t//NUANCES ROUGE\n\t\tarray_push($couleurs, ['nom' => 'Blanc', 'code_hexa' => '#ffffff']);\n\t\tarray_push($couleurs, ['nom' => 'Lonestar', 'code_hexa' => '#660000']);\n\t\tarray_push($couleurs, ['nom' => 'Baie rouge', 'code_hexa' => '#990000']);\n\t\tarray_push($couleurs, ['nom' => 'Garde rouge', 'code_hexa' => '#CC0000']);\n\t\tarray_push($couleurs, ['nom' => 'Rouge', 'code_hexa' => '#FF0000']);\n\t\tarray_push($couleurs, ['nom' => 'Doux-amer', 'code_hexa' => '#FF6666']);\n\t\tarray_push($couleurs, ['nom' => 'Mona Lisa', 'code_hexa' => '#FF9999']);\n\t\tarray_push($couleurs, ['nom' => 'Your Pink', 'code_hexa' => '#FFCCCC']);\n\n\t\t//NUANCES ORANGE\n\t\tarray_push($couleurs, ['nom' => 'Noir', 'code_hexa' => '#000000']);\n\t\tarray_push($couleurs, ['nom' => 'Bois de noix de muscade', 'code_hexa' => '#663300']);\n\t\tarray_push($couleurs, ['nom' => 'Oregon', 'code_hexa' => '#993300']);\n\t\tarray_push($couleurs, ['nom' => 'Blaze Orange', 'code_hexa' => '#FF6600']);\n\t\tarray_push($couleurs, ['nom' => 'Orange outrancière', 'code_hexa' => '#FF6633']);\n\t\tarray_push($couleurs, ['nom' => 'Mandarine atomique', 'code_hexa' => '#FF9966']);\n\t\tarray_push($couleurs, ['nom' => 'Orange pêche', 'code_hexa' => '#FFCC99']);\n\n\t\t//NUANCES JAUNE\n\t\tarray_push($couleurs, ['nom' => 'Mine Shaft', 'code_hexa' => '#333333']);\n\t\tarray_push($couleurs, ['nom' => 'Potters Clay', 'code_hexa' => '#996633']);\n\t\tarray_push($couleurs, ['nom' => 'Bouddha Or', 'code_hexa' => '#CC9900']);\n\t\tarray_push($couleurs, ['nom' => 'Supernova', 'code_hexa' => '#FFCC00']);\n\t\tarray_push($couleurs, ['nom' => 'Jaune', 'code_hexa' => '#FFFF00']);\n\t\tarray_push($couleurs, ['nom' => 'Pâle Canaries', 'code_hexa' => '#FFFF99']);\n\t\tarray_push($couleurs, ['nom' => 'Crème', 'code_hexa' => '#FFFFCC']);\n\n\t\t//NUANCES VERT\n\t\tarray_push($couleurs, ['nom' => 'Dove Gray', 'code_hexa' => '#666666']);\n\t\tarray_push($couleurs, ['nom' => 'Sapin profond', 'code_hexa' => '#003300']);\n\t\tarray_push($couleurs, ['nom' => 'Camarone', 'code_hexa' => '#006600']);\n\t\tarray_push($couleurs, ['nom' => 'Laurel japonais', 'code_hexa' => '#009900']);\n\t\tarray_push($couleurs, ['nom' => 'Vert', 'code_hexa' => '#00FF00']);\n\t\tarray_push($couleurs, ['nom' => 'Menthe verte', 'code_hexa' => '#99FF99']);\n\t\tarray_push($couleurs, ['nom' => 'Menthe enneigée', 'code_hexa' => '#CCFFCC']);\n\n\t\t//NUANCES BLEU-VERT\n\t\tarray_push($couleurs, ['nom' => 'Gris poussiéreux', 'code_hexa' => '#999999']);\n\t\tarray_push($couleurs, ['nom' => 'Sarcelle profonde', 'code_hexa' => '#003333']);\n\t\tarray_push($couleurs, ['nom' => 'Pierre bleue', 'code_hexa' => '#006666']);\n\t\tarray_push($couleurs, ['nom' => 'Vert persan', 'code_hexa' => '#009999']);\n\t\tarray_push($couleurs, ['nom' => 'Downy', 'code_hexa' => '#66CCCC']);\n\t\tarray_push($couleurs, ['nom' => 'Bleu vert', 'code_hexa' => '#66FFCC']);\n\n\t\t//NUANCES BLEU-CLAIR\n\t\tarray_push($couleurs, ['nom' => 'Gris', 'code_hexa' => '#CCCCCC']);\n\t\tarray_push($couleurs, ['nom' => 'Ruban bleu', 'code_hexa' => '#0066FF']);\n\t\tarray_push($couleurs, ['nom' => 'Azure Radiance', 'code_hexa' => '#0099FF']);\n\t\tarray_push($couleurs, ['nom' => 'Cyan / Aqua', 'code_hexa' => '#00FFFF']);\n\t\tarray_push($couleurs, ['nom' => 'Anakiwa', 'code_hexa' => '#99FFFF']);\n\n\t\t//NUANCES BLEU-FONCE\n\t\tarray_push($couleurs, ['nom' => 'Bleu marin', 'code_hexa' => '#000066']);\n\t\tarray_push($couleurs, ['nom' => 'Bleu foncé', 'code_hexa' => '#0000CC']);\n\t\tarray_push($couleurs, ['nom' => 'Bleu', 'code_hexa' => '#0000FF']);\n\t\tarray_push($couleurs, ['nom' => 'Malibu', 'code_hexa' => '#66CCFF']);\n\t\tarray_push($couleurs, ['nom' => 'Anakiwa', 'code_hexa' => '#99CCFF']);\n\n\t\t//NUANCES VIOLET\n\t\tarray_push($couleurs, ['nom' => 'Christalle', 'code_hexa' => '#330066']);\n\t\tarray_push($couleurs, ['nom' => 'Violet électrique', 'code_hexa' => '#9900CC']);\n\t\tarray_push($couleurs, ['nom' => 'Violet foncé', 'code_hexa' => '#9933FF']);\n\t\tarray_push($couleurs, ['nom' => 'Melrose', 'code_hexa' => '#9999FF']);\n\t\tarray_push($couleurs, ['nom' => 'Pervenche', 'code_hexa' => '#CCCCFF']);\n\n\t\t//NUANCES ROSE\n\t\tarray_push($couleurs, ['nom' => 'Kimberly', 'code_hexa' => '#666699']);\n\t\tarray_push($couleurs, ['nom' => 'Pompadour', 'code_hexa' => '#660066']);\n\t\tarray_push($couleurs, ['nom' => 'Fresh Eggplant', 'code_hexa' => '#990066']);\n\t\tarray_push($couleurs, ['nom' => 'Hollywood Cerise', 'code_hexa' => '#CC0099']);\n\t\tarray_push($couleurs, ['nom' => 'Hollywood Cerise Clair', 'code_hexa' => '#FF0099']);\n\t\tarray_push($couleurs, ['nom' => 'Magenta / Fuchsia', 'code_hexa' => '#FF00FF']);\n\t\tarray_push($couleurs, ['nom' => 'Lavande Rose', 'code_hexa' => '#FF99FF']);\n\t\tarray_push($couleurs, ['nom' => 'Dentelle rose', 'code_hexa' => '#FFCCFF']);\n\n\t\treturn $couleurs;\n\t}", "title": "" }, { "docid": "66ef8901bff4843f8696b08186d4d77a", "score": "0.5683706", "text": "function Contenido(){\n \n $sql = 'SELECT id_mecanismos codigo, descripcion from mecanismos WHERE activo = 1';\n $arrMecanismos = $this->Consulta($sql);\n \n $sql = 'SELECT id_metodos codigo, descripcion from metodos WHERE activo = 1';\n $arrMetodos = $this->Consulta($sql);\n \n $sql = 'SELECT id_lubricantes codigo, descripcion from lubricantes WHERE activo = 1';\n $arrLubricantes = $this->Consulta($sql);\n \n $sql = 'SELECT id_aplicacion codigo, aplicacion descripcion from aplicaciones_lub';\n $arrAplicacion = $this->Consulta($sql);\n \n \n \n $sql = 'SELECT id_frecuencias codigo, descripcion from frecuencias WHERE activo = 1';\n $arrFrecuencias = $this->Consulta($sql);\n \n $sql = 'SELECT id_tareas codigo, descripcion from tareas WHERE activo = 1';\n $arrTareas = $this->Consulta($sql); \n \n $sql = 'SELECT `id_unidades` codigo, `descripcion` FROM `unidades` WHERE `activo` =1';\n $arrUnidades = $this->Consulta($sql); \n $input = '';\n if( isset( $_REQUEST['id'] ) ){\n $input = $this->create_input('hidden','id_mecanismos','id_mecanismos',false,$_REQUEST['id']); \n }else if( isset( $_REQUEST['idE'] ) ){\n $input = $this->create_input('hidden','id_equipos_e','id_equipos_e',false,$_REQUEST['idE']);\n }\n \n \n \n \n $html = '<section class=\"main-content-wrapper\">\n <div class=\"pageheader\">\n <h1>'.$this->_titulo.'</h1>\n <p class=\"description\">'.$this->_subTitulo.'</p>\n <div class=\"breadcrumb-wrapper hidden-xs\">\n <span class=\"label\">Estas Aquí:</span>\n <ol class=\"breadcrumb\">\n <li class=\"active\">Carta Lubricaci&oacute;n</li>\n </ol>\n </div>\n </div>\n \n <div class=\"col-md-8\">\n <div class=\"panel panel-default panelCrear\">\n <div class=\"panel-heading\">\n \n <div class=\"actions pull-right\">\n <i class=\"fa fa-expand\"></i>\n <i class=\"fa fa-chevron-down\"></i>\n <i class=\"fa fa-times\"></i>\n </div>\n </div>\n <div class=\"panel-body\">\n <form class=\"form-horizontal\" id=\"formCrear\" role=\"form\">\n \n\n \n <div class=\"form-group\">\n <label class=\"col-sm-2 control-label\" for=\"nombre\" class=\"col-sm-2 control-label\">Metodos:</label>\n <div class=\"col-sm-10\">'.\n $this->crearSelect('id_metodos','id_metodos',$arrMetodos,false,false,false,'class=\"form-control requirido limpiar\" onchange=\"metodoSellando($(this).text())\"').\n $this->create_input('hidden',$this->PrimaryKey,$this->PrimaryKey,false,'0',$this->PrimaryKey).\n $input.\n $this->create_input('hidden','id_usuario','id_usuario',false,$_SESSION['id_usuario']).\n '</div>\n \n </div>\n \n <div class=\"form-group\">\n <label class=\"col-sm-2 control-label\" for=\"id_cursos\">Tarea:</label>\n <div class=\"col-sm-10\">\n '.$this->crearSelect('id_tareas','id_tareas',$arrTareas,false,'0','Ninguno','class=\"form-control limpiar noSellado\"').'\n </div>\n </div>\n \n <div class=\"form-group\">\n <label class=\"col-sm-2 control-label\" for=\"id_cursos\">Lubricante:</label>\n <div class=\"col-sm-10\">\n '.$this->crearSelect('cod_lubricante','cod_lubricante',$arrLubricantes,false,'0','Ninguno','class=\"form-control noSellado\" ').'\n </div>\n </div> \n \n <div class=\"form-group\">\n <label class=\"col-sm-2 control-label\" for=\"id_cursos\">Aplicacion:</label>\n <div class=\"col-sm-10\">\n '.$this->crearSelect('id_aplicacion','id_aplicacion',$arrAplicacion,false,'0','Ninguno','class=\"form-control noSellado\"').'\n </div>\n </div> \n \n \n <div class=\"form-group\">\n <label class=\"col-sm-2 control-label\" for=\"id_cursos\">Puntos:</label>\n <div class=\"col-sm-10\">\n '.$this->create_input('text','puntos','puntos','Puntos a lubricar',false,'form-control limpiar noSellado').'\n </div>\n </div>\n \n <div class=\"form-group\">\n <label class=\"col-sm-2 control-label\" for=\"id_cursos\">Frecuencias:</label>\n <div class=\"col-sm-10\">\n '.$this->crearSelect('id_frecuencias','id_frecuencias',$arrFrecuencias,false,'0','Ninguno','class=\"form-control noSellado\"').'\n </div>\n </div>\n \n <div class=\"form-group\">\n <label class=\"col-sm-2 control-label\" for=\"id_cursos\">Minuto Ejecuci&oacute;n:</label>\n <div class=\"col-sm-10\">\n '.$this->create_input('text','minutos_ejecucion','minutos_ejecucion','Minutos de ejecuci&oacute;n',false,'form-control limpiar noSellado').'\n </div>\n </div> \n \n <div class=\"form-group\">\n <label class=\"col-sm-2 control-label\" for=\"id_cursos\">Cantidad:</label>\n <div class=\"col-sm-10\">\n '.$this->create_input('text','cantidad','cantidad','Cantidad de lubricante',false,'form-control limpiar noSellado').'\n </div>\n </div>\n \n <div class=\"form-group\">\n <label class=\"col-sm-2 control-label\" for=\"id_cursos\">Unidad</label>\n <div class=\"col-sm-10\">\n '.$this->crearSelect('id_unidad_cant','id_unidad_cant',$arrUnidades,false,'0','Ninguno','class=\"form-control noSellado\"').'\n </div>\n </div> \n <button type=\"button\" id=\"guardaMecMet\" class=\"btn btn-primary\">Guardar Programaci&oacute;n</button> \n <div class=\"panel\" id=\"Resultado\" style=\"display:none\">RESULTADO</div>\n </form>\n </div>\n </div>\n </div> '.$this->tablaDatos().'\n \n </div>\n </div>\n </div> \n\n </section> '; \n \n return $html; \n \n }", "title": "" }, { "docid": "7f159349d771dbd0458f98a158a2ecc8", "score": "0.5681336", "text": "function _AddEditPage()\n {\n global $CNK;\n\n //\n $mRidOpts = $CNK->__oDisplay->LoadTpl('sections/idx_pgfld_opts');\n $mRidPgGen = $CNK->__oDisplay->LoadTpl('sections/idx_page_opts');\n\n $aTplOpts = $CNK->__aWords;\n $aTplPgGen = $CNK->__aWords;\n\n // Init\n $sColId ='';\n\n $sPageId = SetDefault( $CNK->__aIn['pg_id'] );\n if ( $sPageId=='' ) $sPageId = SetDefault( $CNK->__aIn['pf_id'] );\n\n if ( $sPageId!='' )\n {\n $CNK->__oDb->ExecQuery( \"SELECT pg_id, pg_title, pg_color, pg_top_text, pg_bottom_text, pg_width, pg_btn_prev, pg_btn_next FROM pf_pages WHERE pg_id='{$sPageId}'\" );\n if ( $aRes = $CNK->__oDb->Fetch() )\n {\n $aTplPgGen['page_title'] = $aRes['pg_title'];\n $aTplPgGen['page_top_text'] = $CNK->__oStd->TxtSafeOutput( $aRes['pg_top_text'] );\n $aTplPgGen['page_bottom_text'] = $CNK->__oStd->TxtSafeOutput( $aRes['pg_bottom_text'] );\n $sColId = $aRes['pg_color'];\n $aTplPgGen['page_width'] = $aRes['pg_width'];\n $aTplPgGen['btn_prev'] = $aRes['pg_btn_prev'];\n $aTplPgGen['btn_next'] = $aRes['pg_btn_next'];\n }\n }\n\n if ( $sPageId=='' ) $sPageId = ShortUniqueId();\n\n $this->__aTplData['onload_section'] .= 'ChangeDemoColor();';\n $aTplPgGen['color_select'] = BuildColorsSelect( $sColId );\n\n $aTplOpts['form_id'] = $CNK->__aIn['fid'];\n $aTplOpts['pf_id'] = $sPageId;\n $aTplOpts['action_name'] = $this->__aVarNames['PG_ACTION'];\n $aTplOpts['pf_action'] = $this->__aActions['SAVE_PAGE'];\n\n $aTplOpts['T_field_opt_sections'] = $CNK->__oDisplay->EvalTpl( $aTplPgGen, '', $mRidPgGen );\n\n $aTplOpts['L_pgfld_opts_header'] = $CNK->__aWords['L_head_pgopts'];\n\n return $CNK->__oDisplay->EvalTpl( $aTplOpts, '', $mRidOpts );\n }", "title": "" }, { "docid": "12a1813ca497bc61f3cd917c77d5aa78", "score": "0.567285", "text": "function formPrincipal(){\n $template = new template; //crea un objeto de un template\n $query=new query; //crea un objeto de coneccion\n $template->SetTemplate('../html/view/vista/ActivoFijo/formActivo.html');\n //hacemos la consulta a la base de datos a la tabla categoria\n $resCategoria=$query->getRows(\"select idcategoria, nomcategoria from categoria\");\n foreach($resCategoria as $key=>$valor){\n $categoria .= '<option value=\"'.$valor['idcategoria'].'\">'.$valor['nomcategoria'].'</option>';\n }\n //enviamos al html la lista de categoria\n $template->SetParameter('categoria', $categoria);\n \n $i=0;\n $ListActivo=$query->getRows(\"select d.iddetactivo,d.nomdetactivo,d.stock,d.desdetactivo,c.nomcategoria\n from detalle_activo_fijo d join categoria c on d.idcategoria=c.idcategoria\");\n foreach($ListActivo as $k=>$v){\n $i++;\n $list .= '<tr class=\"info\">\n <td>'.$i.'</td>\n <td>'.utf8_decode($v['nomdetactivo']).'</td>\n <td>'.$v['nomcategoria'].'</td>\n <td>'.$v['stock'].'</td>\n <td>'.utf8_decode($v['desdetactivo']).'</td>\n <td><a href=\"#\" class=\"cForGen\" title=\"Modificar\" onclick=\"popupCssShow(\\'../php/activo.php?var=editDetAct&id='.$v[\"iddetactivo\"].'\\',\\'\\'); return false;\"><i class=\"icon-edit\"></i></a></td>\n <td><a href=\"#\" title=\"Eliminar\" onclick=\"eliminarActivo('.$v[\"iddetactivo\"].');\"><i class=\"icon-trash\"></i></a></td>\n </tr>';\n }\n \n $template->SetParameter('listaActivo', $list);\n return $template->Display();\n }", "title": "" }, { "docid": "330e4b71e52ea0740584813aaa8f4823", "score": "0.5669184", "text": "function UI_composed_creator ($componentes, $parametros, $cads, $flag, $excluirComp, $cat){\n\t\n\t\n\t$i=0;\n\t$co=0;\n\t$tab=1;\t\n\t$ClavesCoin = array();\n\t$flagRepetido = false;\n\t$k=0;\n\t// para validar existencia en los componenetes o usos terapeuticos\n\t$sumCant= 0;\n\t\n\t$cadComp = $cads;\n\t$tempComponentes = $parametros;\n\t$aux1 = 6; $aux2 = 11;\n\tif ($flag == 1) { $aux1 = 11; $aux2= 6; }\n\n\t//buscar repetidos\n\tif ($componentes != NULL){\n\t\t\n\t\twhile (isset($componentes[$k])) {\n\t\t\t$ite=0;\t\n\t\t\t$ClavesCoin = array_keys(array_column($componentes, 0 ), $componentes[$k][0] );\n\t\t\t\t\n\t\t\twhile (isset($ClavesCoin[$ite])) {\t\n\t\t\t\tif($ite == 0){\n\t\t\t\t\t$precio=$componentes[$ClavesCoin[$ite]][5];\n\t\t\t\t}\n\t\t\t\telse if($precio == $componentes[$ClavesCoin[$ite]][5] ){\t\t\t\n\t\t\t\t\tif (stristr($componentes[$ClavesCoin[0]][$aux1],$componentes[$ClavesCoin[$ite]][$aux1]) === false) {\n\t\t\t\t\t\t$componentes[$ClavesCoin[0]][$aux1]=$componentes[$ClavesCoin[0]][$aux1].\"+\".$componentes[$ClavesCoin[$ite]][$aux1];\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (stristr($componentes[$ClavesCoin[0]][$aux2],$componentes[$ClavesCoin[$ite]][$aux2]) === false) {\n\t\t\t\t\t\t\t$componentes[$ClavesCoin[0]][$aux2]=$componentes[$ClavesCoin[0]][$aux2].\"+\".$componentes[$ClavesCoin[$ite]][$aux2];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$componentes[$ClavesCoin[0]][4]=$componentes[$ClavesCoin[0]][4]+$componentes[$ClavesCoin[$ite]][4];\n\t\t\t\t\t$precio = $componentes[$ClavesCoin[$ite]][5];\n\t\t\t\t\t\n\t\t\t\t}\t\t\n\t\t\t\t$ite++;\n\t\t\t}\n\t\t\t\n\t\t\t$ite = count($ClavesCoin);\n\t\t\t\n\t\t\twhile ($ite > 1) {\n\t\t\t\tarray_splice($componentes, $ClavesCoin[$ite-1], 1);\n\t\t\t\t$ite--;\n\t\t\t}\n\t\t\t$k++;\n\t}\n\t\n\t\n\t// ordenar arreglo\n\t$final = array();\n\t$ClavesCopiar = array();\n\n\t//Poner en formato utf8 tanto los componentes como los uso terapeuticos para evitar que en conteo y eliminacion de dupilcados...\n\t// los caracteres especiales (ejemplo: 'ñ') causen que cometa errores.\n\t$var_aux = 0;\n\tforeach($componentes as $corregir){\n\t\t$temporal_01 = utf8_encode($corregir[$aux1]);\n\t\t$temporal_02 = utf8_encode($corregir[$aux2]);\n\t\t\n\t\t$componentes[$var_aux][$aux1] = $temporal_01;\n\t\t$componentes[$var_aux][$aux2] = $temporal_02; \n\t\t$var_aux++;\n\t}\n\n\tif (count($tempComponentes) == 1 ){ //revisa si solo tiene un componente la busqueda\n\t\t//buscar medicinas que coincidan todos los componenetes buscados\n\t\t$ClavesCoin = array_keys(array_column($componentes, $aux1 ), $cadComp );\n\t\t//validar si la existencia del componenete es 0 para guardarlo en fallas\n\t\t$sumCant = 0;\n\t\tforeach($ClavesCoin as $clave)\n\t\t{\n\t\t\t$sumCant = $sumCant + $componentes[$clave][4];\n\t\t}\n\t\t\n\t\tif ($sumCant == 0) {\n\t\t\tif (in_array($cadComp, $excluirComp) == false ) {\n\t\t\t\t$insertar = \"INSERT INTO dbo.faltantes VALUES ('\".$cadComp.\"', GETDATE() , '\".gethostbyaddr($_SERVER['REMOTE_ADDR']).\"', '\".$cat.\"' )\";\n\t\t\t\tInsertarDB($insertar);\n\t\t\t}\n\t\t}\t\n\t\t\n\t\t//guarda los campos a copiar\n\t\t$ClavesCopiar = array_merge($ClavesCopiar, $ClavesCoin);\n\n\t} else \n\t\tif ( count($tempComponentes) == 2 ) { // revisa si tiene dos componentes la busqueda\n\t\t\t//buscar medicinas que coincidan todos los componenetes buscados\n\t\t\t$ClavesCoin = array_keys(array_column($componentes, $aux1 ), $cadComp );\n\t\t\t\n\t\t\t//validar si la existencia del componenete es 0 para guardarlo en fallas\n\t\t\t$sumCant = 0;\n\t\t\tforeach($ClavesCoin as $clave)\n\t\t\t{\n\t\t\t\t$sumCant = $sumCant + $componentes[$clave][4];\n\t\t\t}\n\t\t\tif ($sumCant == 0) {\n\t\t\t\tif (in_array($cadComp, $excluirComp) == false ) {\n\t\t\t\t\t$insertar = \"INSERT INTO dbo.faltantes VALUES ('\".$cadComp.\"', GETDATE() , '\".gethostbyaddr($_SERVER['REMOTE_ADDR']).\"', '\".$cat.\"' )\";\n\t\t\t\t\tInsertarDB($insertar);\n\t\t\t\t}\n\t\t\t}\t\n\t\t\n\t\t\t//guarda los campos a copiar\n\t\t\t$ClavesCopiar = array_merge($ClavesCopiar, $ClavesCoin);\n\t\t\t\n\t\t\t//buscar medicinas que tenga uno de los componentes buscados\n\t\t\tforeach($tempComponentes as $compo ) {\n\t\t\t\t$ClavesCoin = array_keys(array_column($componentes, $aux1 ), $compo );\n\t\t\t\t\n\t\t\t\t//validar si la existencia del componenete es 0 para guardarlo en fallas\n\t\t\t\t$sumCant = 0;\n\t\t\t\tforeach($ClavesCoin as $clave)\n\t\t\t\t{\n\t\t\t\t\t$sumCant = $sumCant + $componentes[$clave][4];\n\t\t\t\t}\n\t\t\t\tif ($sumCant == 0) {\n\t\t\t\t\tif (in_array($compo, $excluirComp) == false ) {\n\t\t\t\t\t\t$insertar = \"INSERT INTO dbo.faltantes VALUES ('\".$compo.\"', GETDATE() , '\".gethostbyaddr($_SERVER['REMOTE_ADDR']).\"', '\".$cat.\"' )\";\n\t\t\t\t\t\tInsertarDB($insertar);\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t\n\t\t\t\t//guarda los campos a copiar\t\t\t\t\t\n\t\t\t\t$ClavesCopiar = array_merge($ClavesCopiar, $ClavesCoin);\n\t\t\t\t\n\t\t\t}\t\t\n\t\t} else { //busca si tiene mas de 2 componente \n\t\t\t//buscar medicinas que coincidan todos los componenetes buscados\n\t\t\t$ClavesCoin = array_keys(array_column($componentes, $aux1 ), $cadComp );\n\t\t\t\n\t\t\t//validar si la existencia del componenete es 0 para guardarlo en fallas\n\t\t\t$sumCant = 0;\n\t\t\tforeach($ClavesCoin as $clave)\n\t\t\t{\n\t\t\t\t$sumCant = $sumCant + $componentes[$clave][4];\n\t\t\t}\n\t\t\tif ($sumCant == 0) {\n\t\t\t\tif (in_array($cadComp, $excluirComp) == false ) {\n\t\t\t\t\t$insertar = \"INSERT INTO dbo.faltantes VALUES ('\".$cadComp.\"', GETDATE() , '\".gethostbyaddr($_SERVER['REMOTE_ADDR']).\"', '\".$cat.\"' )\";\n\t\t\t\t\tInsertarDB($insertar);\n\t\t\t\t}\n\t\t\t}\t\n\t\t\n\t\t\t//guarda los campos a copiar\n\t\t\t$ClavesCopiar = array_merge($ClavesCopiar, $ClavesCoin);\n\t\t\t\n\t\t\t// buscar medicinas que tengan mas de un componente de los buscados pero no todos los buscados\t\n\t\t\tfor($x=0;$x<count($tempComponentes);$x++){\n\t\t\t\t$cadComp2 = $tempComponentes[$x];\n\t\t\t\tfor($y=$x+1;$y<count($tempComponentes);$y++){\t\n\t\t\t\t\t$cadComp2 = $cadComp2.\"+\".$tempComponentes[$y];\n\t\t\t\t\tif ($cadComp2 != $cadComp){\n\t\t\t\t\t\t$ClavesCoin = array_keys(array_column($componentes, $aux1 ), $cadComp2 );\n\t\t\t\t\t\t//validar si la existencia del componenete es 0 para guardarlo en fallas\n\t\t\t\t\t\t$sumCant = 0;\n\t\t\t\t\t\tforeach($ClavesCoin as $clave)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$sumCant = $sumCant + $componentes[$clave][4];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($sumCant == 0) {\n\t\t\t\t\t\t\tif (in_array($cadComp, $excluirComp) == false ) {\n\t\t\t\t\t\t\t\t$insertar = \"INSERT INTO dbo.faltantes VALUES ('\".$cadComp2.\"', GETDATE() , '\".gethostbyaddr($_SERVER['REMOTE_ADDR']).\"', '\".$cat.\"' )\";\n\t\t\t\t\t\t\t\tInsertarDB($insertar);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\n\t\t\t\t\t\t//guarda los campos a copiar\n\t\t\t\t\t\t$ClavesCopiar = array_merge($ClavesCopiar, $ClavesCoin);\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t}\n\t\t\t\n\t\t\t//buscar medicinas que tenga uno de los componentes buscados\n\t\t\tforeach($tempComponentes as $compo ) {\n\t\t\t\t$ClavesCoin = array_keys(array_column($componentes, $aux1 ), $compo );\n\t\t\t\t\n\t\t\t\t//validar si la existencia del componenete es 0 para guardarlo en fallas\n\t\t\t\t$sumCant = 0;\n\t\t\t\tforeach($ClavesCoin as $clave)\n\t\t\t\t{\n\t\t\t\t\t$sumCant = $sumCant + $componentes[$clave][4];\n\t\t\t\t}\n\t\t\t\tif ($sumCant == 0) {\n\t\t\t\t\tif (in_array($compo, $excluirComp) == false ) {\n\t\t\t\t\t\t$insertar = \"INSERT INTO dbo.faltantes VALUES ('\".$compo.\"', GETDATE() , '\".gethostbyaddr($_SERVER['REMOTE_ADDR']).\"', '\".$cat.\"' )\";\n\t\t\t\t\t\tInsertarDB($insertar);\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t\n\t\t\t\t//guarda los campos a copiar\t\n\t\t\t\t$ClavesCopiar = array_merge($ClavesCopiar, $ClavesCoin);\n\t\t\t}\n\t\t\t\n\t\t}\n\t//copia los resultados al nuevo arreglo a imprimir \n\tforeach($ClavesCopiar as $claves ) {\n\t\t$final[]= $componentes[$claves];\n\t}\n\t//ordena las claves en orden descendente para que al borrar no perder referencia \n\trsort($ClavesCopiar);\n\n\t//borras los copiados\n\tforeach($ClavesCopiar as $claves ) {\n\t\tarray_splice($componentes, $claves, 1);\n\t}\n\t\n\t// final ordenar arreglo\n\t\n\techo \"<table cellspacing='0' cellpadding='0' id='tablaResultado' >\";\n\t\techo \"<thead>\";\n\t\t\techo\"<tr class='TituloTabla'> <th style='width:8%' class='primero'>Código</th> <th style='width:24%' class=''>Descripción</th> <th style='width:8%' class=''>Precio</th> <th style='width:8%' class=''>Cant.</th> <th style='width:10%' class=''>Ult. Lote</th> <th style='width:15%' class=''>Componente</th> <th style='width:15%' class=''>Aplicación</th> <th style='width:4%' class=''>Recp.</th> <th style='width:4%' class=''>Ubic.</th> <th style='width:4%' class=' ultimo'><img src='css/images/carrito.jpg' height='20px' width='20px'/></th> </tr>\";\n\t\techo \"</thead> <tbody>\";\n\t\t\n\t\t//muestra arreglo ordenado de medicinas\n\t\tforeach ($final as list($a, $b, $c , $d, $e, $f, $g, $h, $r, $s, $w, $y)) \n\t\t{\n\t\t\t$comps = explode( '+', $g );\n\t\t\t$patos = explode( '+', $y );\n\t\t\t\n\t\t\t//colores alternos vista\n\t\t\t/*\n\t\t\tif ( is_int($co/2) ) {\n\t\t\t\t$color = \"Color1\";\n\t\t\t}else {\n\t\t\t\t$color = \"Color2\";\n\t\t\t}\n\t\t\n\t\t\t$co++;\n\t\t\t*/\n\t\t\t\n\t\t\t//echo \"<tr class=' \".$color.\" opMe'>\";\n\t\t\techo \"<tr >\";\n\t\t\t\n\t\t\t\n\t\t\techo \"<td style='width:8%' class='infoNu'>\".utf8_encode($a).\"</td>\n\t\t\t\t\t<td style='width:24%' class='Descr'>\".utf8_encode($c).\"</td>\";\n\t\t\t// si el cantidad es 0 lo pone como \"-\"\n\t\t\tif (utf8_encode($e) == 0) {\n\t\t\t\techo\"<td style='width:8%' class='infoFe'>-</td>\";\n\t\t\t}else {\n\t\t\t\tswitch ($w) {\n\t\t\t\t\tcase 0:\n\t\t\t\t\t\techo\"<td style='width:8%' class='infoNu'> BsS. \".utf8_encode(number_format($f,2,',','.')).\"</td>\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\techo\"<td style='width:8%' class='infoNu'> BsS. \".utf8_encode(number_format($f*imp1,2,',','.')).\"</td>\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\techo \"<td style='width:8%' class='infoNu Cantdip'>\".utf8_encode(intval($e)).\"</td>\";\n\t\t\t// si la ultimo lote es 0 lo pone como \"N/D\" \n\t\t\tif ($h == NULL) {\n\t\t\t\t\n\t\t\t\techo\"<td style='width:10%' class='infoFe'>LIBERAR</td>\";\n\t\t\t}\n\t\t\telse \n\t\t\t\tif ( date_format($h, 'd-m-Y') == '01-01-0001' ) {\n\t\t\t\t\techo\"<td style='width:10%' class='infoFe'> - </td>\";\n\t\t\t\t} else {\n\t\t\t\t\techo \"<td style='width:10%' class='infoFe'>\".date_format($h, 'Y-m-d').\"</td>\";\n\t\t\t\t}\n\t\t\t\n\t\t\techo \"<td style='width:15%' class='paCompo' tabindex='\".$tab.\"'><table cellspacing='0' cellpadding='0' >\";\t\n\t\t\t\tforeach ($comps as $temp) {\n\t\t\t\t\techo \"<tr class='compo' >\";\n\t\t\t\t\t\t$temp = trim($temp, \" \\t\\n\\r\\0\\x0B\");\n\t\t\t\t\t\techo \"<td >\".$temp.\"</td>\";\t\n\t\t\t\t\techo \"</tr>\";\n\t\t\t\t}\t\t\n\t\t\techo \"</table></td>\";\n\n\t\t\techo \"<td style='width:15%' class='paPato' tabindex='\".$tab.\"'><table cellspacing='0' cellpadding='0' >\";\t\n\t\t\t\tforeach ($patos as $temp) {\n\t\t\t\t\techo \"<tr class='patos'>\";\n\t\t\t\t\t\t$temp = trim($temp, \" \\t\\n\\r\\0\\x0B\");\n\t\t\t\t\t\techo \"<td >\".$temp.\"</td>\";\t\n\t\t\t\t\techo \"</tr>\";\n\t\t\t\t}\t\t\n\t\t\t//$tab++;\n\t\t\techo \"</table></td>\";\n\t\t\t\n\t\t\techo \"<td style='width:4%' class='infoFe'>\".utf8_encode($r).\"</td>\";\n\t\t\techo \"<td style='width:4%' class='infoFe'>\".utf8_encode($s).\"</td>\";\n\t\t\t\n\t\t\t\n\t\t\techo \"<td style='width:4%' class='infoFe botonMas'>\";\n\t\t\t\techo \"<img src='css/images/mas.png' height='15px' width='15px'/>\";\n\t\t\techo \"</td>\";\n\t\t}\n\t\techo \"</tr> </tbody>\";\n\t\techo \"</table>\";\n\t\t\n\tif (count($componentes) > 0){\n\t\techo \"<div class='advertenciaM alpha omega grid_24'>¡CUIDADO! los siguientes articulos tienen mas componentes de los solicitados </div>\";\n\n\t\techo \"<table cellspacing='0' cellpadding='0' id='tablaResultadoExtras' >\";\n\t\techo \"<thead>\";\n\t\t\techo\"<tr class='TituloTabla'> <th style='width:8%' class='primero'>Código</th> <th style='width:24%' class=''>Descripción</th> <th style='width:8%' class=''>Precio</th> <th style='width:8%' class=''>Cant.</th> <th style='width:10%' class=''>Ult. Lote</th> <th style='width:15%' class=''>Componente</th> <th style='width:15%' class=''>Aplicación</th> <th style='width:4%' class=''>Recp.</th> <th style='width:4%' class=''>Ubic.</th> <th style='width:4%' class=' ultimo'><img src='css/images/carrito.jpg' height='20px' width='20px'/></th> </tr>\";\n\t\techo \"</thead> <tbody>\";\n\t\t\n\t\t//muestra el resto del arreglo\n\t\tforeach ($componentes as list($a, $b, $c , $d, $e, $f, $g, $h, $r, $s, $w, $y)) {\n\t\t\t$comps = explode( '+', $g );\n\t\t\t$patos = explode( '+', $y );\n\t\t\t/*\n\t\t\t//colores alternos vista\n\t\t\tif ( is_int($co/2) ) {\n\t\t\t\t$color = \"Color1\";\n\t\t\t}else {\n\t\t\t\t$color = \"Color2\";\n\t\t\t}\n\t\t\t$co++;\n\t\t\t*/\n\t\t\t//echo \"<tr class=' \".$color.\" '>\";\n\t\t\techo \"<tr >\";\n\t\t\techo \"<td style='width:8%' class='infoNu'>\".utf8_encode($a).\"</td>\n\t\t\t\t\t<td style='width:24%' class='Descr'>\".utf8_encode($c).\"</td>\";\n\t\t\t// si el precio es 0 lo pone como \"-\"\n\t\t\t\n\t\t\tif (utf8_encode($e) == 0) {\n\t\t\t\t//echo\"<td style='width:8%' class='opMe'>-</td>\";\n\t\t\t\techo\"<td style='width:8%' >-</td>\";\n\t\t\t}else {\n\t\t\t\tswitch ($w) {\n\t\t\t\t\tcase 0:\n\t\t\t\t\t\techo\"<td style='width:8%' class='infoNu'> BsS. \".utf8_encode(number_format($f,2,',','.')).\"</td>\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\techo\"<td style='width:8%' class='infoNu'> BsS. \".utf8_encode(number_format($f*imp1,2,',','.')).\"</td>\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\techo \"<td style='width:8%' class='infoNu Cantdip'>\".utf8_encode(intval($e)).\"</td>\";\n\t\t\t// si la ultimo lote es 0 lo pone como \"N/D\" \n\t\t\tif ($h == NULL) {\n\t\t\t\t\n\t\t\t\techo\"<td style='width:10%' class='infoFe'>LIBERAR</td>\";\n\t\t\t}\n\t\t\telse \n\t\t\t\tif ( date_format($h, 'd-m-Y') == '01-01-0001' ) {\n\t\t\t\t\techo\"<td style='width:10%' class='infoFe'> - </td>\";\n\t\t\t\t} else {\n\t\t\t\t\techo \"<td style='width:10%' class='infoFe'>\".date_format($h, 'Y-m-d').\"</td>\";\n\t\t\t\t}\n\t\t\t\n\t\t\techo \"<td style='width:15%' class='paCompo' tabindex='\".$tab.\"'><table cellspacing='0' cellpadding='0' >\";\t\n\t\t\t\tforeach ($comps as $temp) {\n\t\t\t\t\techo \"<tr class='compo'>\";\n\t\t\t\t\t\t$temp = trim($temp, \" \\t\\n\\r\\0\\x0B\");\n\t\t\t\t\t\techo \"<td >\".$temp.\"</td>\";\t\n\t\t\t\t\techo \"</tr>\";\n\t\t\t\t}\t\t\n\t\t\techo \"</table></td>\";\n\n\t\t\techo \"<td style='width:15%' class='paPato' tabindex='\".$tab.\"'><table cellspacing='0' cellpadding='0' >\";\t\n\t\t\t\tforeach ($patos as $temp) {\n\t\t\t\t\techo \"<tr class='patos'>\";\n\t\t\t\t\t\t$temp = trim($temp, \" \\t\\n\\r\\0\\x0B\");\n\t\t\t\t\t\techo \"<td >\".$temp.\"</td>\";\t\n\t\t\t\t\techo \"</tr>\";\n\t\t\t\t}\t\t\n\t\t\t//$tab++;\n\t\t\techo \"</table></td>\";\n\t\t\t\n\t\t\t//echo \"<td style='width:4%' class='opMe'>\".utf8_encode($r).\"</td>\";\n\t\t\t//echo \"<td style='width:4%' class='opMe'>\".utf8_encode($s).\"</td>\";\n\t\t\techo \"<td style='width:4%' >\".utf8_encode($r).\"</td>\";\n\t\t\techo \"<td style='width:4%' >\".utf8_encode($s).\"</td>\";\n\t\t\t\n\t\t\t// echo \"<td style='width:4%' class='opMe'>\";\n\t\t\techo \"<td style='width:4%' class='infoFe botonMas'>\";\n\t\t\t\techo \"<img src='css/images/mas.png' height='15px' width='15px'/>\";\n\t\t\techo \"</td>\";\n\t\t}\n\t\techo \"</tr> </tbody>\";\n\t\techo \"</table>\";\n\t}\t\n\t\t\n\t} ELSE {\n\t\techo \"<div class='menuMe'>NO SE ENCONTRARON RESULTADOS DISPONIBLES A LA VENTA</div>\";\n\t\t\n\t}\n\n}", "title": "" }, { "docid": "545fbc7c16c1ceb981ca205f35ee2bf0", "score": "0.56669873", "text": "public function initContent()\n {\n // $this->context->link->getModuleLink('vaf', 'test')\n parent::initContent();\n\n $db = VF_Singleton::getInstance()->getReadAdapter();\n $subQuery = 'select DISTINCT(id_category) FROM ps_category_product WHERE id_product IN ('.implode(',',$this->vafProductIds()).')';\n $query = 'select * from ps_category_lang where id_category IN (' . $subQuery . ') group by id_category';\n $result = $db->query($query);\n\n $categories = array();\n while($row = $result->fetch()) {\n array_push($categories, array(\n 'id' => $row['id_category'],\n 'name' => $row['name'],\n 'description' => $row['description'],\n ));\n }\n\n ob_start();\n include('results.phtml');\n $html = ob_get_clean();\n\n $this->prestashopRender($html);\n }", "title": "" }, { "docid": "2846b5696f517da66fa2df590630f11a", "score": "0.56634253", "text": "function cargoAction()\n\t{\n\t\t$cargo = new Application_Model_DbTable_Cargo();\n\t\t$this->view->cargo = $cargo->fetchAll();\n\t}", "title": "" }, { "docid": "2cef741e36db428771865c180d3cc023", "score": "0.565959", "text": "public function constancias()\n {\n $data['pdf'] = $this->Moderador_model->get_salas();\n $this->load->view(\"theme/header\");\n $this->load->view(\"theme/menu\");\n $this->load->view(\"moderador/constancias\",$data);\n $this->load->view(\"theme/footer\");\n }", "title": "" }, { "docid": "8ecd33eba202cf1b1547f170929dcf23", "score": "0.5658876", "text": "function mostraPagina()\n\t\t{\n\t\t// prepara la pagina, ossia il contenitore della tabella\n\t\t$this->aggiungiElemento($this->dammiMenu());\n\t\t$this->aggiungiElemento(\"Moduli\", \"titolo\");\n\t\t$this->aggiungiElemento($this->creaTabella());\n\t\t\n\t\t// manda in output l'intera pagina\n\t\t$this->mostra();\n\t\t}", "title": "" }, { "docid": "fce84f3a043bf435b7724db98148ef6e", "score": "0.5651234", "text": "public function cmspage()\n {\n echo \"//Création et mise à jour contenu nouvelle boutique ////\\n\\n\";\n\n $modelid = intval(Mage::getConfig()->getNode('stores')->{$this->_codemodel}->{'system'}->{'store'}->{'id'});\n $newstoreid = intval(Mage::getConfig()->getNode('stores')->{$this->_codeboutique}->{'system'}->{'store'}->{'id'});\n\n //DUPLICATE HOMEPAGE\n echo \"//DUPLICATE HOMEPAGE//\\n\";\n $page = Mage::getModel('cms/page')->setStoreId($modelid)->load('home');\n $check = sizeof(Mage::getModel('cms/page')->setStoreId($newstoreid)->load('home')->getPageId());\n if ($check == 0) {\n $cmsPageData = [\n 'title' => $this->_titlehomepage,\n 'root_template' => $page->getRootTemplate(),\n 'meta_description' => $this->_metadescription,\n 'identifier' => $page->getIdentifier(),\n 'content_heading' => $this->_content_heading,\n //'content'=>$page->getContent(),\n 'store_id' => [$newstoreid],\n ];\n Mage::getModel('cms/page')->setData($cmsPageData)->save();\n\n echo 'Homepage for '.$this->_nameboutique.\" created!\\n\";\n } else {\n echo 'Homepage for '.$this->_nameboutique.\" already exists. Next!\\n\";\n }\n\n Mage::getConfig()->saveConfig('design/head/default_description', $this->_metadescription, 'stores', $newstoreid);\n\n //DUPLICATE CAROUSSEL\n echo \"//DUPLICATE CARROUSSEL//\\n\";\n $b = Mage::getModel('cms/block');\n $check = $b->getCollection()->addStoreFilter($newstoreid)->addFieldToFilter('identifier', 'carroussel-home-page');\n if (sizeof($check->getData()) == 0) {\n $data = $b->load('carroussel-home-page')->setStoreId($modelid)->getData();\n unset($data['block_id']);\n unset($data['creation_time']);\n $data['title'] = 'Caroussel Home Page '.$this->_nameboutique;\n $data['store_id'] = $newstoreid;\n $data['stores'] = array($newstoreid);\n $b->setData($data);\n $b->save();\n echo \"Carroussel has been duplicated\\n\";\n } else {\n echo \"Carroussel already exist. Next!\\n\";\n }\n\n //UPDATE FOOTER BLOCKS\n echo \"//UPDATE FOOTER BLOCKS//\\n\";\n $blocks = $this->_blocktoupdate;\n foreach ($blocks as $block) {\n $b = Mage::getModel('cms/block')->setStoreId($modelid)->load($block);\n $arraystore = $b->getStoreId();\n if (!in_array($newstoreid, $arraystore)) {\n array_push($arraystore, $newstoreid);\n $b->setStores($arraystore);\n $b->setStoreId($arraystore);\n $b->save();\n echo 'Block '.$block.\" updated!\\n\";\n }\n echo 'Block '.$block.\" already OK.Next!\\n\";\n }\n\n //UPDATE EXISTING PAGES\n echo \"//UPDATE EXISTING PAGES//\\n\";\n $pages = $this->_pagetoupdate;\n foreach ($pages as $page) {\n $b = Mage::getModel('cms/page')->setStoreId($modelid)->load($page);\n $arraystore = $b->getStoreId();\n if (!in_array($newstoreid, $arraystore)) {\n array_push($arraystore, $newstoreid);\n $b->setStoreId($arraystore);\n $b->save();\n echo 'Page '.$page.\" updated!\\n\";\n } else {\n echo 'Page '.$page.\" already OK.Next!\\n\";\n }\n }\n }", "title": "" }, { "docid": "52b49dcee2874532e7bab5d8b0d94686", "score": "0.5651202", "text": "public function private_area_crea_contenuti() {\n\t\t$labels = array(\n\t\t\t'name' => __( 'Area Riservata' ),\n\t\t\t'singular_name' => __( 'Contenuto' ),\n\t\t\t'add_new' => __( 'Aggiungi Contenuto' ),\n\t\t\t'add_new_item' => __( 'Nuovo Contenuto' ),\n\t\t\t'edit_item' => __( 'Modifica Contenuto' ),\n\t\t\t'new_item' => __( 'Nuovo Contenuto' ),\n\t\t\t'all_items' => __( 'Elenco Contenuti' ),\n\t\t\t'view_item' => __( 'Visualizza Contenuti' ),\n\t\t\t'search_items' => __( 'Cerca Contenuto' ),\n\t\t\t'not_found' => __( 'Contenuto non trovato' ),\n\t\t\t'not_found_in_trash' => __( 'Contenuto non trovato nel cestino' ),\n\t\t);\n\n\t\t$args = array(\n\t\t\t'labels' => $labels,\n\t\t\t'public' => true,\n\t\t\t'rewrite' => array( 'slug' => 'contenuti' ),\n\t\t\t'has_archive' => true,\n\t\t\t'hierarchical' => false,\n\t\t\t'menu_position' => 5,\n\t\t\t'supports' => array(\n\t\t\t\t'title',\n\t\t\t\t'editor',\n\t\t\t\t'thumbnail',\n\t\t\t\t'comments',\n\t\t\t),\n\n\t\t);\n\t\tregister_post_type( 'area-riservata', $args );\n\t\tflush_rewrite_rules();\n\t}", "title": "" }, { "docid": "ee50db39de507a8cffa6c987a19f606a", "score": "0.5644374", "text": "public function carteAction(){\n\n $Param = null;\n \n if( $this->app->HTTPRequest->getExists('criteres') ):\n $Param = $this->getParamSearch( $this->app->HTTPRequest->getData('criteres') ); \n endif;\n\n $Param['b.delete ='] = 0;\n $Param['b.visible ='] = 1;\n\n $this->load_manager('bien'); \n\n # Recuperation des villes/cp et du nombres d'annonces\n $Result = $this->app->db\n ->select('ville, code_postal, COUNT(id)')\n ->from(PREFIX . 'bien b')\n ->where($Param)\n ->group_by('ville')\n ->get(); \n \n \n // Generation de la carte\n $Carte = $this->generateCarte($Result);\n\n $this->app->smarty->assign(array(\n 'Carte' => $Carte->getGoogleMap(),\n 'Agences' => $this->app->db->get(PREFIX . 'agence',null,'nom'),\n 'Categories' => $this->app->db->get(PREFIX . 'bien_categorie', array('level =' => 0), 'name')\n ));\n\n return $this->app->smarty->fetch( VIEW_PATH . 'annonce' . DS . 'carte.tpl');\n }", "title": "" }, { "docid": "87e87d06d717ab6256c4c7deace2122a", "score": "0.5640576", "text": "function showAllCours() {\n $datas = [];\n $cours = new Cours();\n $cours->setIdUtilisateur($_SESSION[\"id\"]);\n $datas = [];\n $datas[\"cours\"]= $cours->selectAll();\n if(isset($_GET['id'])) {\n $cours->setIdCours($_GET['id']);\n $cours1 = $cours->select();\n $datas[\"cou\"]=$cours1;\n }\n\n foreach($datas[\"cours\"] as &$cou){\n $utilisateur = new Utilisateurs();\n $utilisateur->setIdUtilisateur($cou->getIdUtilisateur());\n $user= $utilisateur->select();\n $cou->user = $user;\n }\n\n foreach($datas[\"cours\"] as &$cou){\n\n $cou->setTitre(htmlspecialchars($cou->getTitre()));\n $cou->setImage(htmlspecialchars($cou->getImage()));\n $cou->setContenu(htmlspecialchars($cou->getContenu()));\n }\n\n $comment = new Commentaire();\n $comment->setIdUtilisateur($_SESSION[\"id\"]);\n $datas[\"comment\"]= $comment->selectAll();\n\n if(isset($_GET['idComment'])) {\n $comment->setIdComment($_GET['idComment']);\n $commentaire = $comment->select();\n $datas[\"com\"]=$commentaire;\n \n }\n\n foreach($datas[\"comment\"] as &$com){\n $utilisateur = new Utilisateurs();\n $utilisateur->setIdUtilisateur($com->getIdUtilisateur());\n $user= $utilisateur->select();\n $com->user = $user;\n }\n\n foreach($datas[\"comment\"] as &$com){\n $com->setdescription(htmlspecialchars($com->getdescription()));\n }\n\n $matiere = new Matiere();\n $datas[\"matiere\"]= $matiere->selectAll();\n\n\n return [\"template\" => \"allcours.php\", \"datas\" => $datas];\n}", "title": "" }, { "docid": "55df54fc037b08c2abf37e9b6707581f", "score": "0.56403756", "text": "public function indexAction() {\n $data = $this->data;\n $this->setMeta('Компетенции');\n $data['menu'] = $this->menu;\n $data['meta'] = $this->meta;\n $data['comps'] = \\R::getAll('select * from complist');\n\n $napr_list = ['1' => \"Бизнес-информатика\", '2' => \"Гостиничное дело\", '3' => \"Государственное и муниципальное управление\", '4' => \"Землеустройство и кадастры\", '5' => \"Информатика и вычислительная техника\", '6' => \"Менеджмент\", '7' => \"Прикладная информатика\", '8' => \"Продукты питания из растительного сырья\", '9' => \"Технология продукции и организация общественного питания\", '10' => \"Товароведение\", '11' => \"Торговое дело\", '12' => \"Туризм\", '13' => \"Управление качеством\", '14' => \"Управление персоналом\", '15' => \"Экономика\", '16' => \"Юриспруденция\",];\n\n foreach ($data['comps'] as $k=>$item) {\n $napr = \\R::getAssoc(\"select id,napr_id from compnapr where comp_id=? order by napr_id\",[$item['id']]);\n// dd($data);\n foreach ($napr as &$value) $value = '<span style=\"cursor: pointer\" title=\"'.$napr_list[$value].'\" class=\"label label-success\">'.$napr_list[$value].'</span>';//$napr_list[$value];\n $data['comps'][$k]['napr'] = (!empty($napr)) ? implode(' ',$napr) : 'Не выбрано';\n }\n if (isset($_GET['dd'])) dd($data['comps']);\n $this->set($data);\n }", "title": "" }, { "docid": "3722fc1c9799148621af656b205d7704", "score": "0.5635547", "text": "public function panier()\n { \n $DonneesProduit['lesProduits'] = $this->mProd->getRows(); \n $DonneesProduit['prodPanier']=$this->cart->contents();\n $this->indexVisiteur('visiteur/vuePanier', $DonneesProduit);\n }", "title": "" }, { "docid": "0df6692d6320f453d2f60413c73969f2", "score": "0.5631203", "text": "public function __construct(){\n\t\tparent::__construct();\n\t\tif(isWE()){\n\t\t\t//if(defined('SHOP_TABLE')){not needed for global variants\n\t\t\t$this->EditPageNrs[] = we_base_constants::WE_EDITPAGE_VARIANTS;\n\t\t\t//}\n\n\t\t\tif(defined('CUSTOMER_TABLE') && (permissionhandler::hasPerm('CAN_EDIT_CUSTOMERFILTER') || permissionhandler::hasPerm('CAN_CHANGE_DOCS_CUSTOMER'))){\n\t\t\t\t$this->EditPageNrs[] = we_base_constants::WE_EDITPAGE_WEBUSER;\n\t\t\t}\n\t\t}\n\t\tif(isset($_SESSION['prefs']['DefaultTemplateID'])){\n\t\t\t$this->TemplateID = $_SESSION['prefs']['DefaultTemplateID'];\n\t\t}\n\t\tarray_push($this->persistent_slots, 'TemplateID', 'TemplatePath', 'hidePages', 'controlElement', 'temp_template_id', 'temp_category', 'usedElementNames');\n\t\t$this->ContentType = we_base_ContentTypes::WEDOCUMENT;\n\t}", "title": "" }, { "docid": "6a696a43ec244a959c706d6bb3d14fae", "score": "0.5630983", "text": "function ImpressionInfosStatistiques()\n\t{\n\t\t$this->AddPage();\n\t\t$this->EnTetePage();\n\t\t$this->CorpsDocument();\n\t}", "title": "" }, { "docid": "cda095b3a7c1c30e14a4107e1aab7e87", "score": "0.5624836", "text": "function boutiquetabacAction()\n\t{\n\t\t$this->view->retour = Bral_Batchs_Factory::calculBatch(\"BoutiqueTabac\");\n\t\techo $this->view->render(\"batchs/resultat.phtml\");\n\t}", "title": "" }, { "docid": "c47883ef93002e94339efcd4f5fb699e", "score": "0.5624784", "text": "function print_ordenes_compra(){\n $this->permiso_capturista();\n\n $this->load->model('tpoadminv1/capturista/Ordenes_compra_model');\n \n $data['title'] = \"&Oacute;rdenes de compra\";\n $data['registros'] = $this->Ordenes_compra_model->dame_todos_ordenes_compra(false);\n \n //lista de nombre de las columnas como se carga en el array de registros\n $data['registros_columnas'] = array(\n 'id',\n 'ejercicio',\n 'trimestre',\n 'proveedor',\n 'campana',\n 'numero_orden_compra',\n 'active'\n );\n //lista de nombre de los <th> para la tabla, debe ser el mismo numero de registros que el array de registros_columnas\n $data['nombre_columnas'] = array(\n '#',\n 'Ejercicio',\n 'Trimestre',\n 'Nombre a raz&oacute;n social del proveedor',\n 'Campa&ntilde;a o aviso institucional',\n 'Orden de compra', \n 'Estatus'\n );\n\n $this->load->view('tpoadminv1/includes/print_template', $data);\n }", "title": "" }, { "docid": "f07b34f3d1dfcbd45b89fa624bc7d7d2", "score": "0.56230503", "text": "function Unidade() {\r\n extract($GLOBALS);\r\n global $w_Disabled;\r\n\r\n $w_chave = $_REQUEST['w_chave'];\r\n\r\n if ($w_troca>'') {\r\n // Se for recarga da página\r\n $w_nome = $_REQUEST['w_nome'];\r\n $w_sigla = $_REQUEST['w_sigla'];\r\n $w_ativo = $_REQUEST['w_ativo'];\r\n } elseif ($O=='L') {\r\n // Recupera os parâmetros do módulo\r\n $sql = new db_getPDParametro; $RS = $sql->getInstanceOf($dbms,$w_cliente,null,null);\r\n if (count($RS)>0) {\r\n foreach($RS as $row) { $RS = $row; break; }\r\n $w_limite_unidade = f($RS,'limite_unidade');\r\n } \r\n\r\n // Recupera todos os registros para a listagem\r\n $sql = new db_getUorgList; $RS = $sql->getInstanceOf($dbms,$w_cliente,null,'VIAGEM',null,null,null);\r\n if (nvl($p_ordena,'')>'') {\r\n $lista = explode(',',str_replace(' ',',',$p_ordena));\r\n $RS = SortArray($RS,$lista[0],$lista[1],'nome','asc');\r\n } else {\r\n $RS = SortArray($RS,'nome','asc');\r\n }\r\n } elseif (!(strpos('AE',$O)===false) && $w_troca=='') {\r\n // Recupera os dados do endereço informado\r\n $sql = new db_getUorgList; $RS = $sql->getInstanceOf($dbms,$w_cliente,$w_chave,'VIAGEM',null,null,$w_ano);\r\n foreach($RS as $row) { $RS = $row; break; }\r\n $w_nome = f($RS,'nome');\r\n $w_sigla = f($RS,'sigla');\r\n $w_ativo = f($RS,'ativo');\r\n } \r\n\r\n Cabecalho();\r\n head();\r\n if (!(strpos('IAEP',$O)===false)) {\r\n ScriptOpen('JavaScript');\r\n CheckBranco();\r\n FormataValor();\r\n ValidateOpen('Validacao');\r\n if (!(strpos('IA',$O)===false)) {\r\n if ($O=='I') {\r\n Validate('w_chave','Unidade','SELECT','1','1','50','1','1');\r\n }\r\n Validate('w_assinatura',$_SESSION['LABEL_ALERTA'],'1','1','3','30','1','1');\r\n } elseif ($O=='E') {\r\n Validate('w_assinatura',$_SESSION['LABEL_ALERTA'],'1','1','3','30','1','1');\r\n ShowHTML(' if (confirm(\\'Confirma a exclusão deste registro?\\')) ');\r\n ShowHTML(' { return (true); }; ');\r\n ShowHTML(' { return (false); }; ');\r\n } \r\n ShowHTML(' theForm.Botao[0].disabled=true;');\r\n ShowHTML(' theForm.Botao[1].disabled=true;');\r\n ValidateClose();\r\n ScriptClose();\r\n } \r\n\r\n ShowHTML('</HEAD>');\r\n ShowHTML('<BASE HREF=\"'.$conRootSIW.'\">');\r\n if ($w_troca>'') {\r\n BodyOpen('onLoad=\\'document.Form.'.$w_troca.'.focus()\\';');\r\n } elseif (!(strpos('A',$O)===false)) {\r\n BodyOpen('onLoad=\\'this.focus()\\';');\r\n } elseif ($O=='E') {\r\n BodyOpen('onLoad=\\'document.Form.w_assinatura.focus()\\';');\r\n } else {\r\n BodyOpen('onLoad=\\'this.focus()\\';');\r\n } \r\n\r\n ShowHTML('<B><FONT COLOR=\"#000000\">'.$w_TP.'</FONT></B>');\r\n ShowHTML('<HR>');\r\n ShowHTML('<div align=center><center>');\r\n ShowHTML('<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">');\r\n if ($O=='L') {\r\n // Exibe a quantidade de registros apresentados na listagem e o cabeçalho da tabela de listagem\r\n ShowHTML('<tr>');\r\n if ($w_libera_edicao=='S') {\r\n ShowHTML(' <td><a accesskey=\"I\" class=\"SS\" href=\"'.$w_dir.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=I&w_chave='.$w_chave.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.'\"><u>I</u>ncluir</a>&nbsp;');\r\n }\r\n ShowHTML(' <td align=\"right\">'.exportaOffice().'<b>Registros: '.count($RS));\r\n ShowHTML('<tr><td align=\"center\" colspan=3>');\r\n ShowHTML(' <TABLE class=\"tudo\" WIDTH=\"100%\" bgcolor=\"'.$conTableBgColor.'\" BORDER=\"'.$conTableBorder.'\" CELLSPACING=\"'.$conTableCellSpacing.'\" CELLPADDING=\"'.$conTableCellPadding.'\" BorderColorDark=\"'.$conTableBorderColorDark.'\" BorderColorLight=\"'.$conTableBorderColorLight.'\">');\r\n ShowHTML(' <tr bgcolor=\"'.$conTrBgColor.'\" align=\"center\">');\r\n ShowHTML(' <td><b>'.LinkOrdena('Unidade','nome').'</font></td>');\r\n ShowHTML(' <td><b>'.LinkOrdena('Ativo','ativo').'</font></td>');\r\n if ($w_libera_edicao=='S') {\r\n ShowHTML(' <td class=\"remover\"><b>Operações</font></td>');\r\n }\r\n ShowHTML(' </tr>');\r\n if (count($RS)<=0) {\r\n // Se não foram selecionados registros, exibe mensagem\r\n ShowHTML(' <tr bgcolor=\"'.$conTrBgColor.'\"><td colspan=5 align=\"center\"><b>Não foram encontrados registros.</b></td></tr>');\r\n } else {\r\n // Lista os registros selecionados para listagem\r\n foreach($RS as $row) {\r\n $w_cor = ($w_cor==$conTrBgColor || $w_cor=='') ? $w_cor=$conTrAlternateBgColor : $w_cor=$conTrBgColor;\r\n ShowHTML(' <tr bgcolor=\"'.$w_cor.'\" valign=\"top\">');\r\n ShowHTML(' <td>'.f($row,'nome').' ('.f($row,'sigla').')</td>');\r\n if (f($row,'ativo')=='S') {\r\n ShowHTML(' <td align=\"center\">'.f($row,'nm_ativo').'</td>');\r\n } else {\r\n ShowHTML(' <td align=\"center\"><font size=\"1\" color=\"red\">'.f($row,'nm_ativo').'</td>');\r\n } \r\n if ($w_libera_edicao=='S') {\r\n ShowHTML(' <td class=\"remover\" align=\"top\" nowrap>');\r\n ShowHTML(' <A class=\"HL\" HREF=\"'.$w_dir.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=A&w_chave='.f($row,'sq_unidade').'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.'\">AL</A>&nbsp');\r\n ShowHTML(' <A class=\"HL\" HREF=\"'.$w_dir.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=E&w_chave='.f($row,'sq_unidade').'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.'\">EX</A>&nbsp');\r\n if ($w_limite_unidade=='S') {\r\n ShowHTML(' <a class=\"HL\" href=\"javascript:this.status.value;\" onclick=\"window.open(\\''.montaURL_JS(null,$conRootSIW.$w_dir.$w_pagina.'LIMUNIDADE&R='.$w_pagina.$par.'&O=L&w_chave='.f($row,'sq_unidade').'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG=PDUNIDLIM').'\\',\\'Limites\\',\\'toolbar=no,width=780,height=350,top=30,left=10,scrollbars=yes,resizable=yes\\');\">Limites</a>');\r\n }\r\n ShowHTML(' </td>');\r\n }\r\n ShowHTML(' </tr>');\r\n } \r\n } \r\n ShowHTML(' </center>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' </td>');\r\n ShowHTML('</tr>');\r\n } elseif (!(strpos('IAEV',$O)===false)) {\r\n if (!(strpos('EV',$O)===false)) $w_Disabled=' DISABLED ';\r\n AbreForm('Form',$w_dir.$w_pagina.'Grava','POST','return(Validacao(this));',null,$P1,$P2,$P3,$P4,$TP,$SG,$R,$O);\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_troca\" value=\"\">');\r\n if ($O!='I') {\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_chave\" value=\"'.$w_chave.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_ano\" value=\"'.$w_ano.'\">');\r\n } \r\n ShowHTML('<tr bgcolor=\"'.$conTrBgColor.'\"><td align=\"center\">');\r\n ShowHTML(' <table width=\"97%\" border=\"0\">');\r\n ShowHTML(' <tr><td><table border=\"0\" width=\"100%\" cellspacing=0 cellpadding=0><tr valign=\"top\">');\r\n if ($O=='I') {\r\n SelecaoUnidade('<U>U</U>nidade:','S',null,$w_chave,null,'w_chave',null,null);\r\n } else {\r\n ShowHTML(' <tr><td><font size=1><b>Unidade:<br>'.$w_nome.' ('.$w_sigla.')</b>');\r\n } \r\n MontaRadioSN('<b>Ativo?</b>',$w_ativo,'w_ativo');\r\n ShowHTML(' </table>');\r\n ShowHTML(' <tr><td align=\"LEFT\"><b>'.$_SESSION['LABEL_CAMPO'].':<BR> <INPUT ACCESSKEY=\"A\" class=\"sti\" type=\"PASSWORD\" name=\"w_assinatura\" size=\"30\" maxlength=\"30\" value=\"\"></td></tr>');\r\n ShowHTML(' <tr><td align=\"center\"><hr>');\r\n if ($O=='E') {\r\n ShowHTML(' <input class=\"STB\" type=\"submit\" name=\"Botao\" value=\"Excluir\">');\r\n } else {\r\n if ($O=='I') {\r\n ShowHTML(' <input class=\"STB\" type=\"submit\" name=\"Botao\" value=\"Incluir\">');\r\n } else {\r\n ShowHTML(' <input class=\"STB\" type=\"submit\" name=\"Botao\" value=\"Atualizar\">');\r\n } \r\n } \r\n ShowHTML(' <input class=\"STB\" type=\"button\" onClick=\"history.back(1);\" name=\"Botao\" value=\"Cancelar\">');\r\n ShowHTML(' </td>');\r\n ShowHTML(' </tr>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' </TD>');\r\n ShowHTML('</tr>');\r\n ShowHTML('</FORM>');\r\n } else {\r\n ScriptOpen('JavaScript');\r\n ShowHTML(' alert(\"Opção não disponível\");');\r\n ShowHTML(' history.back(1);');\r\n ScriptClose();\r\n } \r\n ShowHTML('</table>');\r\n ShowHTML('</center>');\r\n Rodape();\r\n}", "title": "" }, { "docid": "ea81c67e03910cd9eec73ef7a39b4f01", "score": "0.56167847", "text": "function cl_veiculos() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"veiculos\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "ca0f1134e1a15cb597ec236157e7b498", "score": "0.5614154", "text": "public function init() {\n\n $ccycleResource = new Default_Resource_Chargecycles();\n $cycleList = array();\n $cycleList[\"\"] = \"Select\";\n foreach ($ccycleResource->getChargecycles() as $cycle) {\n $cycleList[$cycle->charge_cycle_id] = $cycle->charge_cycle_title;\n } \n \n //$this->cycleList = new Default_Model_ChargeList();\n \n \n //Charge entity\n $this->addElement('select', 'charge_entity', array(\n 'label' => 'Charge Entity',\n 'required' => true,\n 'multiOptions' => array('' => \"Select\", \"individual\" => \"Indivdual\", 'vehicle' => \"Vehicle\", \"corporate\" => \"Corporate\")\n ));\n \n \n //Charge cycle\n $this->addElement('select', 'charge_cycle', array(\n 'label' => 'Charge cycle',\n 'required' => true,\n 'multiOptions' => $cycleList\n ));\n\n //charge title\n $this->addElement('text', 'charge_title', array(\n 'label' => 'Charge title',\n 'required' => true\n ));\n\n //charge id\n $this->addElement('hidden', 'charge_id');\n \n //save btn\n $this->addElement('submit', 'sub', array(\n 'class' => 'fan-sub btn btn-primary ',\n 'required' => false,\n 'ignore' => true,\n 'label' => 'Submit',\n 'decorators' => array(\"ViewHelper\"\n )));\n }", "title": "" }, { "docid": "31e71f8db142359c1749a2f459163c9e", "score": "0.5612441", "text": "public function piccreaproyectos()//funcion que precarga los datos de los indicadores veredales y las categorias\n\t{\n\t\t\t$DEPARTAMENTOS = DB::table('DEPARTAMENTOS')\n\t\t\t->select('COD_DPTO','NOM_DPTO')\n\t\t\t->orderby('NOM_DPTO','asc')\n\t\t\t->get();\n\t\t\t$arraydepto['']='Seleccione uno';\n\t\t\tforeach($DEPARTAMENTOS as $pro)\n\t\t\t{\n\t\t\t\t$arraydepto[$pro->COD_DPTO] = $pro->NOM_DPTO;\n\t\t\t}\n\n\t\t\t$TIPOTERR = DB::table('MODART_PIC_TIPOTERR')\n\t\t\t->select('id','nombre')\n\t\t\t->orderby('nombre','asc')\n\t\t\t->get();\n\t\t\tforeach($TIPOTERR as $pro)\n\t\t\t{\n\t\t\t\t$arraytipoterr[$pro->id] = $pro->nombre;\n\t\t\t}\n\n $CATEGORIA = DB::table('MODART_PIC_CATEGORIA')\n\t\t\t->select('id','nombre')\n\t\t\t->orderby('nombre','asc')\n\t\t\t->get();\n\t\t\t$result_cate = array();\n\t\t\tforeach($CATEGORIA as $pro)\n\t\t\t{\n\t\t\t\t $result_cate[$pro->id][] = $pro->nombre;\n\t\t\t}\n\n\t\t\t$SUBCATEGORIA = DB::table('MODART_PIC_SUBCATEGORIA')\n\t\t\t->select('id','id_categ','nombre')\n\t\t\t->orderby('nombre','asc')\n\t\t\t->get();\n\n\t\t\t$MUNICIPIOS = DB::table('MUNICIPIOS')\n\t\t\t->select('COD_DPTO','COD_DANE','NOM_MPIO_1')\n\t\t\t->orderby('NOM_MPIO_1','asc')\n\t\t\t->get();\n\t\t\t$arraymuni['']='Seleccione uno';\n\t\t\tforeach($MUNICIPIOS as $pro)\n\t\t\t{\n\t\t\t\t$arraymuni[$pro->COD_DANE] = $pro->NOM_MPIO_1;\n\t\t\t}\n\n\t\t\t$NUCLEOS = DB::table('MODART_PIC_NUCLEOS')\n\t\t\t->select('id_nucleo','nombre')\n\t\t\t->orderby('nombre','asc')\n\t\t\t->get();\n\t\t\t$arraynucleos['']='Seleccione uno';\n\t\t\tforeach($NUCLEOS as $pro)\n\t\t\t{\n\t\t\t\t $arraynucleos[$pro->id_nucleo] = $pro->nombre;\n\t\t\t}\t\t\t\t\n\n\t\t\t$FOCALIZACION = DB::table('MODART_PIC_FOCALIZACION')\n\t\t\t->select('id','nombre')\n\t\t\t->orderby('nombre','asc')\n\t\t\t->get();\n\t\t\tforeach($FOCALIZACION as $pro)\n\t\t\t{\n\t\t\t\t$arrayfocali[$pro->id] = $pro->nombre;\n\t\t\t}\n\n\t\t\t$ESTADOPROY = DB::table('MODART_PIC_ESTADOPROY')\n\t\t\t->select('id','nombre')\n\t\t\t->orderby('nombre','asc')\n\t\t\t->get();\n\t\t\t$arrayestado['']='Seleccione uno';\n\t\t\tforeach($ESTADOPROY as $pro)\n\t\t\t{\n\t\t\t\t$arrayestado[$pro->id] = $pro->nombre;\n\t\t\t}\n\n\n\n\t\t\t$subsubcate = DB::table('MODART_PIC_SUBSUBCATEGORIA')\n\t\t\t->select('id','nombre')\n\t\t\t->orderby('nombre','asc')\n\t\t\t->get();\n\t\t\t$arraysubsubcate['']='Seleccione uno';\n\t\t\tforeach($subsubcate as $pro)\n\t\t\t{\n\t\t\t\t$arraysubsubcate[$pro->id] = $pro->nombre;\n\t\t\t}\n\n\t\t\t$socio = DB::table('MODART_PIC_SOCIOS')\n\t\t\t->select('id','nombre')\n\t\t\t->orderby('nombre','asc')\n\t\t\t->where('id','!=',1)\n\t\t\t->get();\n\t\t\tforeach($socio as $pro)\n\t\t\t{\n\t\t\t\t$arraysocio[$pro->id] = $pro->nombre;\n\t\t\t}\n\n\n\t\t\t$arrayindipic = DB::table('MODART_PIC_PROYPRIORIZ')\t\n\t\t\t->select(DB::raw(\"concat('PIC_',cod_nucleo,id_proy) as ID, id_proy,cod_depto,cod_mpio,id_usuario,cod_nucleo,id_subcat,nom_proy,alcance,estado_proy,prec_estim,cofinanc,fecha_ingreso\"))\n\t\t\t->where('id_usuario','=',Auth::user()->id)\n\t\t\t->orderby('id_proy','desc')\n\t\t\t->get();\t\n\n\n\t\t\t\n\n\t\treturn View::make('moduloart.ivsocifichapriorizadaproy', array('arraydepto' => $arraydepto,'arraytipoterr' => $arraytipoterr,'arraynucleos' => $arraynucleos,'arraycate' => $result_cate,'arraymuni' => $arraymuni,'arraysubcate' => $SUBCATEGORIA,'arrayfocali'=>$arrayfocali,'arrayestado' => $arrayestado,'arrayindipic' => $arrayindipic,'arraysubsubcate' => $arraysubsubcate,'arraysocio'=>$arraysocio));\t\t\n\t}", "title": "" }, { "docid": "5b103ae3e6dadd92339d7f7697047992", "score": "0.5607061", "text": "public function initContent()\n\t{\n $this->display_column_left = false;\n $this->display_column_right = false;\n\t\t\n\t\tparent::initContent();\n\t\t//var_dump(deposit::getDataDeposit());\n\t\t//var_dump($DataDeposit);\n\t\t//Db::getInstance()->executeS('SELECT id_pembeli FROM '._DB_PREFIX_.'pembayaran_deposit WHERE id_pembeli = '.$this->context->customer->id.'');\n\t\t$id_pembelinya = $this->context->customer->id;\n\t\t$datadeposit = deposit::getDataDeposit($id_pembelinya);\n\t\t$nama_banknya = $datadeposit[0]['nama_bank'];\n\t\t$referensinya = Db::getInstance()->executeS('SELECT reference FROM '._DB_PREFIX_.'orders WHERE id_customer = '.$id_pembelinya.' and id_order = (SELECT max(id_order) FROM '._DB_PREFIX_.'orders)');\n\t\t$info_pembayaran = deposit::getInfoBayar($id_pembelinya, $nama_banknya);\n\t\t$this->context->smarty->assign(array(\n 'info_pembayaran' => $info_pembayaran,\n 'datadeposit' => $datadeposit,\n 'referensinya' => $referensinya,\n ));\n\t\t$this->setTemplate('infobayar.tpl');\n }", "title": "" }, { "docid": "30c39258b15fd47564b22765c814a126", "score": "0.5596596", "text": "function cl_db_cadattdinamicoatributosvalor() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"db_cadattdinamicoatributosvalor\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "4ea029979ba3abc7d74bc2a0187085d9", "score": "0.5594928", "text": "function seznam_cz() {\n\t\t$this->layout = 'xml/zbozi_cz';\n\t\t\n\t\t$products = $this->get_products(2);\n\t\t$this->set('products', $products);\n\t\t\n\t\t// produkty zobrazovane na detailu na firmy.cz\n\t\t$this->set('firmy_cz_products', array(762, 971, 880, 363, 654));\n\t}", "title": "" }, { "docid": "039f729b00892bd4f22cc1ae4040442c", "score": "0.5593139", "text": "function htm_abo_comptes($num)\r\n{\r\n\tglobal $language_adm, $cache_packs_comptes, $param_gen; \r\n\r\n?>\r\n\r\n<div id=\"menu_right\">\r\n\r\n\t<div class=\"menus_r_haut\">\r\n\t\r\n\t\t<ul class=\"ul_barre_adm\">\r\n\t\t\t<li class=\"li_barre_adm\">\r\n\t\t\t<?php \r\n\t\t\t\r\n\t\t\tif($num == 1) echo $language_adm['page_abo_comptes_info1'];\r\n\t\t\tif($num == 2) echo $language_adm['page_abo_comptes_info2']; \r\n\t\t\t\r\n\t\t\t?>\r\n\t\t\t</li>\r\n\t\t</ul>\r\n\t\r\n\t</div>\r\n\t\r\n\t<div class=\"menus_r_fond\">\r\n\t \r\n\t\t<p class=\"p_center\">\r\n\t\t\t<?php \r\n\t\t\t\r\n\t\t\tif($num == 1) echo '<a href=\"packs_comptes_crea.php?num='. $num .'&amp;menu=14\">'. $language_adm['page_abo_comptes_crea1'] .'</a>';\r\n\t\t\tif($num == 2) echo '<a href=\"packs_comptes_crea.php?num='. $num .'&amp;menu=14\">'. $language_adm['page_abo_comptes_crea2'] .'</a>'; \t\t\r\n\t\t\t\r\n\t\t\t?>\r\n\t\t</p>\r\n\t\t\r\n\t\t<?php\r\n\t \r\n\t\t\t$aff = '';\r\n\t\t\t\r\n\t\t\tforeach($cache_packs_comptes as $v)\r\n\t\t\tif($v['type'] == $num) $aff = 1;\r\n\t\t\t\r\n\t\t\tif($aff == 1) echo '<ul class=\"ul_center\">';\r\n\t\t\t\r\n\t\t\t$i = 1;\r\n\t\t\t\r\n\t\t\tforeach($cache_packs_comptes as $v)\r\n\t\t\t{\r\n\t\t\t\t$id_pack = (int) $v['id_pack'];\r\n\t\t\t\t$nb_annonce = (int) $v['nb_annonce'];\r\n\t\t\t\t$nb_jour = (int) $v['nb_jour'];\r\n\t\t\t\t$prix = number_format($v['prix'], 2, ',', ' ');\r\n\t\t\t\t$type = (int) $v['type'];\r\n\t\t\t\t\r\n\t\t\t\tif($nb_annonce == 0)\r\n\t\t\t\t$nb_annonce = $language_adm['page_abo_comptes_zero'];\r\n\t\t\t\t\r\n\t\t\t\tif($nb_jour == 0)\r\n\t\t\t\t$nb_jour = $language_adm['page_abo_comptes_zero'];\r\n\t\t\t\t\r\n\t\t\t\tif($num == $type)\r\n\t\t\t\t{\r\n\t\t\t\t\techo '<li class=\"li_center\">'. $i .' - '. $language_adm['page_abo_comptes_crea_ann'] .' : '. $nb_annonce .' &nbsp;'. $language_adm['page_abo_comptes_crea_jour'] .' : '. $nb_jour .' &nbsp;'. $language_adm['page_abo_comptes_crea_prix'] .' : '. $prix .' '. $param_gen['devise'] .'\r\n\t\t\t\t\t&nbsp;<a class=\"lien_g\" href=\"packs_comptes_mod.php?id='. $id_pack .'&amp;num='. $type .'&amp;menu=14\">'. $language_adm['page_abo_comptes_mod'] .'</a> /\r\n\t\t\t\t\t<a class=\"lien_sup\" href=\"packs_comptes_sup.php?id='. $id_pack .'&amp;num='. $type .'&amp;menu=14\" OnClick=\" return confirm(\\''. $language_adm['page_abo_comptes_sup'] .' ?\\');\">'. $language_adm['page_abo_comptes_sup'] .'</a>\r\n\t\t\t\t\t</li>';\r\n\t\t\t\t\t$i++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif($aff == 1) echo '</ul>';\r\n\t\t\t\r\n\t\t?>\r\n\t\t\r\n\t</div>\r\n\r\n</div>\r\n\r\n<?php\r\n}", "title": "" }, { "docid": "eb034f689d361eb915ff652c30a592c2", "score": "0.55922586", "text": "public static function build() {\n $tab_page = ModelChambre::getAll();\n if (isset($_SESSION['login'])){\n require File::build_path(array('view','head.html'));\n require File::build_path(array('view','menuConnecte.php'));\n require File::build_path(array('view','menuAdmin.php'));\n require File::build_path(array('view','footer.html'));\n }\n else{\n $description = ModelAccueil::getDescription();\n $image1 = ModelAccueil::getImage1();\n $image2 = ModelAccueil::getImage2();\n $image3 = ModelAccueil::getImage3();\n require File::build_path(array('view','head.html'));\n require File::build_path(array('view','menu.php'));\n require File::build_path(array('view','carrousel.php'));\n require File::build_path(array('view','description.php'));\n require File::build_path(array('view','localisation.html'));\n require File::build_path(array('view','footer.html'));\n }\n }", "title": "" }, { "docid": "b82c2b3dc16f8400cee4b9eb434fd9eb", "score": "0.55885816", "text": "function SetupDetailPages() {\n\t\t$pages = new cSubPages();\n\t\t$pages->Add('t_conyugue');\n\t\t$pages->Add('t_pa_consanguinidad');\n\t\t$pages->Add('t_pa_afinidad');\n\t\t$pages->Add('t_re_adopcion');\n\t\t$pages->Add('t_mp_si_no');\n\t\t$pages->Add('t_parientes_mp');\n\t\t$pages->Add('t_actiividades_remuneradas');\n\t\t$pages->Add('t_salario');\n\t\t$this->DetailPages = $pages;\n\t}", "title": "" }, { "docid": "da72247c23eb7b5445ae83347111fe88", "score": "0.5585102", "text": "public function metodoCurso($idCurso,$pagina) {\n $this->getVista()->armarHtml();\n $this->getVista()->modificarCuerpo('{sectorDerecha}','');\n $this->getVista()->modificarCuerpo('{sectorIzquierda}',file_get_contents(DIR_RAIZ.DIR_VISTA.DIR_HTMLS.'/cuerpoUnCurso'));\n $this->getVista()->modificarCuerpo('{colIzq}','12');\n $curso=Modelo::buscarUnCurso($idCurso);\n $this->getVista()->modificarCuerpo('{curso}',$this->getVista()->crearTituloTemaCurso($curso['nombreMateria'],$curso['nombreCatedra'],\n $curso['sede'],$curso['horario'],$curso['codigo'],$curso['dias']));\n $vecComentarios = Modelo::buscarComentsCurso($idCurso);\n $cantComents=count($vecComentarios);\n $listaComents=null;\n $vecComents=array_slice($vecComentarios, ($pagina-1)*CANT_COMENTS,CANT_COMENTS,true);\n \n $unHref='<li class=\"page-item\"><a class=\"page-link\" href=\"/Seccion/Curso/'.$idCurso.'/';\n $botones = new Paginacion($pagina,$cantComents,$unHref);\n // listando los comentarios\n foreach ($vecComents as $comentario){\n $usuario = Modelo::buscarUsuario($comentario[\"idUsuario\"]);\n $vecFecha=date_parse($comentario[\"fechaHora\"]);\n $face=NULL;\n $redSoc2=NULL;\n $face = (($usuario[\"redSocial1\"]==NULL)||(empty($usuario[\"redSocial1\"])))? ''\n :'<div class=\"\"><a href=\"'.$usuario[\"redSocial1\"].'\"> <img src=\"/Vistas/imagenes/face.png\" class=\"icono3\" ></a></div>';\n $redSoc2 = (($usuario[\"redSocial2\"]==NULL)||(empty($usuario[\"redSocial2\"])))? ''\n :'<div clas=\"\"><a href=\"'.$usuario[\"redSocial2\"].'\"> <img src=\"/Vistas/imagenes/redSocial2.png\" class=\"icono3\"></a></div>';\n ($this->getUsuario()->getRol()=='ADMI')?\n // Solo mostrar la opcion de borrar el comentario (el borrado efectivo se hace en ControladorAdministrar->metodoEliminarComentario)\n $borrado = $this->getVista()->crearMenuBorrarMsj($comentario[\"idComentario\"],$idCurso,$pagina) \n :$borrado='';\n $listaComents .= $this->getVista()->crearListaComentarios($usuario[\"apodo\"],$usuario[\"dirImg\"],$face,$redSoc2,$vecFecha,$comentario[\"contenido\"],$borrado);\n }\n $this->getVista()->modificarCuerpo('{scriptJs}','/Vistas/js/cursos.js');\n $this->getVista()->modificarCuerpo('{archCss}','/Vistas/css/index.css');\n $this->getVista()->modificarCuerpo('{pieIzq}','comentarios de usuarios');\n $this->getVista()->modificarCuerpo('{listaComentarios}',$listaComents);\n $this->getVista()->modificarCuerpo('{paginacion}',$botones->getBotonera());\n $this->getVista()->modificarCuerpo('{tieneSesion}',($this->getUsuario()->tieneSesion())?$this->getVista()->CrearAreaComentaje($_SESSION[\"img\"]):'');\n $this->getVista()->modificarCuerpo('{action}','action=\"/Seccion/ComentarCurso/'.$idCurso.'\"');\n return $this->getVista();\n }", "title": "" }, { "docid": "63003930578e4c5a5c4640533899ef33", "score": "0.55746424", "text": "protected function registro_E113(){\n\n\t}", "title": "" }, { "docid": "825f17ca81438a602067150223287d73", "score": "0.5571257", "text": "function association_maj_48466() {\n\tinclude_spip('inc/association_comptabilite');\n\tif ($GLOBALS['association_metas']['comptes'] && !comptabilite_verifier_plan()) { // on verifie la validite du plan comptable existant\n\t\tecrire_meta('comptes', '', 'oui', 'association_metas');\n\t\techo '<p>'._T('asso:maj_desactive_gestion_comptable').'</p>';\n\t}\n\t$desactivation = FALSE;\n\tif (!$GLOBALS['association_metas']['comptes']) {\n\t\tif ($GLOBALS['association_metas']['dons']) {\n\t\t\tecrire_meta('dons', '', 'oui', 'association_metas');\n\t\t\t$desactivation = TRUE;\n\t\t}\n\t\tif ($GLOBALS['association_metas']['ventes']) {\n\t\t\tecrire_meta('ventes', '', 'oui', 'association_metas');\n\t\t\t$desactivation = TRUE;\n\t\t}\n\t\tif ($GLOBALS['association_metas']['prets']) {\n\t\t\tecrire_meta('prets', '', 'oui', 'association_metas');\n\t\t\t$desactivation = TRUE;\n\t\t}\n\t\tif ($GLOBALS['association_metas']['activites']) {\n\t\t\tecrire_meta('activites', '', 'oui', 'association_metas');\n\t\t\t$desactivation = TRUE;\n\t\t}\n\t}\n\tif ($desactivation) // si on a desactive des modules...\n\t\techo '<p>'._T('asso:maj_desactive_modules').'</p>'; // on le signale\n\n\t// on en profite pour effacer des metas qui ne servent plus\n\teffacer_meta('comptes_stricts', 'association_metas');\n\teffacer_meta('indexation', 'association_metas');\n}", "title": "" }, { "docid": "a4b667fc235e79890d5a782a1cbc599a", "score": "0.55703634", "text": "protected function registro_C791(){\n\n\t}", "title": "" }, { "docid": "a86588f66400e002e21bf8a63dd7adc8", "score": "0.55699056", "text": "function cobros_factura(){\n\t\t$id=$_POST['enviarvalor'];\n\t\t$pagos=$this->cobro->get_cobros_by_factura_id($id);\n\t\tif ($pagos==false){\n\t\t\techo \"No existen abonos a la factura indicada.\";\n\t\t} else {\n\t\t\t$factura=$this->cl_factura->get_cl_factura($id);\n\t\t\techo \"<table width='900' align='center'><tr><th>Id Pago</th><th>Fecha</th><th>Referencia</th><th>Monto</th></tr> \\n\";\n\t\t $total=0;\n\t\t foreach($pagos->all as $row){\n\t\t \techo \"<tr><td align='center'>$row->id</td><td align='center'>$row->fecha</td><td align='center'>$row->numero_referencia</td><td align='right'>$row->monto_pagado</td></tr> \\n\";\n\t\t \t$total+=$row->monto_pagado;\n\t\t }\n\t\t echo \"<tr><th></th><th></th><th align='right'>Adeudo</th><th align='right'>\" .($factura->monto_total-$total). \"</th></tr> \\n\";\n\t\t echo \"</table>\";\n\t\t}\n\t}", "title": "" }, { "docid": "58f083e3096167946f06650b84b1cc25", "score": "0.55679315", "text": "protected function registro_C495(){\n\n\t}", "title": "" }, { "docid": "c5218e641aca5e9346667b335324566d", "score": "0.55668986", "text": "function cl_historicos() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"historicos\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "423e3b3febae1a318f454bf36cc65a0d", "score": "0.5566348", "text": "static public function ctrCrearitems(){\n\n\t\tif(isset($_POST[\"editarCategoria\"])){\n\t\t\t\n\t\t\tif(preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/', $_POST[\"editarCategoria\"]) \n\n\t\t\t\t){\n\n\t\t\t \t\t$tabla = \"programacion_compras_move\";\n\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t $datos = array(\"id_programacion_anual\"=>$_POST[\"editarCatego\"],\n\t\t\t\t\t\t\t\t\t\"id_proyecto\"=>$_POST[\"idCategoria\"],\n\t\t\t\t\t\t\t\t\t\"id_accion_centra\"=>$_POST[\"c\"],\n\t\t\t\t\t\t\t\t\t\"id_entes\"=>$_POST[\"id_entes\"],\n\t\t\t\t\t\t\t\t\t\"id_partida_presupuestaria\"=>$_POST[\"id_partida_presupuestaria\"],\n\t\t\t\t\t\t\t\t\t\"id_fuente_financiamiento\"=>$_POST[\"id_fuente_financiamiento\"],\n\t\t\t\t\t\t\t\t\t\"id_actvcomercial\"=>$_POST[\"id_actvcomercial\"],\n\t\t\t\t\t\t\t\t\t\"id_municipio\"=>$_POST[\"id_municipio\"],\n\t\t\t\t\t\t\t\t\t\"id_estado\"=>$_POST[\"id_estado\"],\n\t\t\t\t\t\t\t\t\t\"id_ccnu\"=>$_POST[\"id_ccnu\"],\n\t\t\t\t\t\t\t\t\t\"especificacion\"=>$_POST[\"especificacion\"],\n\t\t\t\t\t\t\t\t\t\"cantidad\"=>$_POST[\"cantidad\"],\n\t\t\t\t\t\t\t\t\t\"i\"=>$_POST[\"i\"],\n\t\t\t\t\t\t\t\t\t\"ii\"=>$_POST[\"ii\"],\n\t\t\t\t\t\t\t\t\t\"iii\"=>$_POST[\"iii\"],\n\t\t\t\t\t\t\t\t\t\"iv\"=>$_POST[\"iv\"],\n\t\t\t\t\t\t\t\t\t\"und\"=>$_POST[\"und\"],\n\t\t\t\t\t\t\t\t\t\"costo_unitario\"=>$_POST[\"costounitarioestimado\"],\n\t\t\t\t\t\t\t\t\t\"precio_total\"=>$_POST[\"preciounitarioestimado\"],\n\t\t\t\t\t\t\t\t\t\"alicuota_iva\"=>$_POST[\"alicuotaivaestimada\"],\n\t\t\t\t\t\t\t\t\t\"monto_iva\"=>$_POST[\"montoivaestimado\"],\n\t\t\t\t\t\t\t\t\t\"monto_total\"=>$_POST[\"montototalestimado\"],\n\t\t\t\t\t\t\t\t\t\"ano\"=>$_POST[\"fecha\"],\n\t\t\t\t\t\t\t\t\t\"tipo\"=>$_POST[\"tipo\"],\n\t\t\t\t\t\t\t\t\t\"id_usuario\"=>$_POST[\"id_usuario\"],\n\t\t\t\t\t\t\t\t\t\"fecha\"=>$_POST[\"fecha\"],\n\t\t\t\t\t\t\t\t\t\"codigo\"=>$_POST[\"codigo\"]\n\t\t\t\t\t\t\t\t);\n \t\t//var_dump($datos); \n //exit($datos);\n\t\t\t \t$respuesta = Modeloproyecto::mdlIngresaritems($tabla, $datos);\n\n\t\t\t \tif($respuesta == \"ok\"){\n\n\t\t\t\t\techo'<script>\n\n\t\t\t\t\tswal({\n\t\t\t\t\t\t type: \"success\",\n\t\t\t\t\t\t title: \"el PROYECTO ha sido guardado correctamente\",\n\t\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t\t confirmButtonText: \"Cerrar\"\n\t\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\t\t\twindow.location = \"index.php?ruta=editar-cotizacion&idVenta=\"+idVenta;\n\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</script>';\n\n\t\t\t\t}\n\n\t\t\t}else{\n\n\t\t\t\techo'<script>\n\n\t\t\t\t\tswal({\n\t\t\t\t\t\t type: \"error\",\n\t\t\t\t\t\t title: \"¡'.$respuesta[2].' no puede ir vacío o llevar caracteres especiales!\",\n\t\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t\t confirmButtonText: \"Cerrar\"\n\t\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\twindow.location = \"index.php?ruta=editar-cotizacion&idVenta=\"+idVenta;\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\n\t\t\t \t</script>';\n\n\n\n\t\t\t}\n\n\t\t}else{\n\t\t\treturn \"error\";\n\t\t}\n\n\t}", "title": "" }, { "docid": "35b9f12ab7f68902b1850e113e6517ad", "score": "0.5561937", "text": "function create_collection()\r\n {\r\n // DEFINES PAGE TITLE\r\n $data['title'] = 'Collection';\r\n \r\n // DEFINES WHICH PAGE TO RENDER\r\n $data['main_view'] = 'collection';\r\n \r\n $this->load->model('Crud_model');\r\n \r\n //USED TO FETCH BANKS\r\n $data['bank_list'] = $this->Crud_model->fetch_record('mp_banks', NULL);\r\n \r\n //USED TO FETCH PAYEE\r\n $data['customer_list'] = $this->Crud_model->fetch_attr_record_by_id('mp_payee', 'cus_status', '0');\r\n \r\n //USED TO FETCH ACCOUNT HEADS\r\n $data['head_list'] = $this->Crud_model->fetch_account_heads('yes','yes','yes','','');\r\n \r\n // DEFINES GO TO MAIN FOLDER FOND INDEX.PHP AND PASS THE ARRAY OF DATA TO THIS PAGE\r\n $this->load->view('main/index.php', $data);\r\n }", "title": "" }, { "docid": "ad9ae70cfa8a8bce32619a959075ef85", "score": "0.5560123", "text": "function cl_veicutilizacaobem() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"veicutilizacaobem\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "5f7fe5339b7a8b829decf48f9638dbac", "score": "0.5560123", "text": "protected function createObjects() {\n\t\t$this->lblId = $this->mctCountry->lblId_Create();\n\t\t$this->txtIsoCode = $this->mctCountry->txtIsoCode_Create();\n\t\t$this->txtTelCode = $this->mctCountry->txtTelCode_Create();\n\t\t$this->chkEuropeanUnion = $this->mctCountry->chkEuropeanUnion_Create();\n\t\t$this->txtNameEn = $this->mctCountry->txtNameEn_Create();\n\t\t$this->txtNameNl = $this->mctCountry->txtNameNl_Create();\n\t\t$this->txtNameFr = $this->mctCountry->txtNameFr_Create();\n\t\t$this->txtNameEs = $this->mctCountry->txtNameEs_Create();\n\t\t$this->txtNameIt = $this->mctCountry->txtNameIt_Create();\n\t\t$this->txtNameDe = $this->mctCountry->txtNameDe_Create();\n\t\t$this->txtNamePl = $this->mctCountry->txtNamePl_Create();\n\t}", "title": "" }, { "docid": "78b3c59910739a6d9e3cb0eed873369e", "score": "0.555996", "text": "function pagi_cours($tables,$id){\n $table=(int)$tables;\n $id=(int)$id;\n if($id<1){\n $id=1;\n }\n $tables=(int)$tables;\n //on a mis les tables dans un tableau pour bien se reperer \n $tab=[\"html\",\"php\",\"javascript\",\"vuejs\",\"csharp\",\"langage_c\",\"algorithme\",\"python\"];\n if(isset($id)and !empty($id)and is_numeric($id)and isset($tables)and !empty($tables)){\n $tables=$tables-1;\n if( $tables>=count($tab)){\n $tables=count($tab)-1;\n }\n $rec=$tab[$tables];\n $compter=$this->_con->query(\"SELECT * FROM $rec\");\n $last=$compter->rowCount();\n if($id>$last){\n $id=$last;\n }\n if($id<=0){\n $id=1;\n }\n self::$pagi=\"\";\n if($last>=2){\n if($id>1){\n $precedent=$id;\n $precedent=(int)$precedent-1;\n $req=$this->_con->prepare(\"SELECT * FROM $rec WHERE id=?\");\n $req->execute(array($precedent));\n $re=$req->fetchAll();\n //remplace les espace par des tirets \n $ur=str_replace(\"?\",\" \", trim($re[0][\"titre\"]));\n $url=str_replace(\" \",\"-\",trim($ur)) .'-'.$table.'-'.$precedent;\n self::$pagi.='<a href=\"'.$url.'\"><span class=\"pa-precedent\">Precedent</span></a>';\n }\n if($id==1){\n self::$pagi.='<a href=\"../coding.php\"><span class=\"pa-precedent\">Home</span></a>';\n }\n // verification du suivant ou de boutton suivant \n if($id<$last){\n $suivant=$id;\n $suivant=(int)$suivant+1;\n $req1=$this->_con->prepare(\"SELECT * FROM $rec WHERE id=?\");\n $req1->execute(array($suivant));\n $re1=$req1->fetchAll();\n //remplace les espace par des tirets \n $ur1=str_replace(\"?\",\" \", trim($re1[0][\"titre\"]));\n $url1=(str_replace(\" \",\"-\", $ur1)).'-'.$table.'-'.$suivant;\n self::$pagi.='<a href=\"'.$url1.'\"><span class=\"pa-suivant\">Suivant</span></a>'; \n }\n }\n }\n return self::$pagi;\n }", "title": "" }, { "docid": "7a8dae07d71981b4506d1619b7720a47", "score": "0.5559952", "text": "function main()\t{\n\t\tglobal $BE_USER,$LANG,$TYPO3_CONF_VARS,$BACK_PATH,$CLIENT;\n\n\t\t\t// Produce browse-tree:\n\t\t$tree = $this->positionmap->getBrowsableTree();\n\n\t\t\t// Output only the tree if this is an AJAX call:\n\t\tif ($this->ajax) {\n\t\t\t$this->content = $LANG->csConvObj->utf8_encode($tree, $LANG->charSet);\n\t\t\treturn;\n\t\t}\n\t\t\t// Start page:\n\t\t$this->content = $this->doc->startPage('newrecordtitle');\n\t\t$this->content .= $this->doc->header($LANG->getLL('newrecordincategory'));\n\t\t//debug($this->positionmap);\n\t\t$this->content .= '<p><strong>'.$LANG->getLL('insertnewrecordin').'</strong></p><br />';\n\n\t\t\t// Outputting page tree:\n\t\t$this->content.= $tree;\n\t\t\n\t\t\t// Create go-back link.\n\t\tif ($this->R_URI)\t{\n\t\t\t$this->content .= '<br />\n\t\t\t\t<a href=\"'.htmlspecialchars($this->R_URI).'\" class=\"typo3-goBack\">'.\n\t\t\t\t'<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/goback.gif','width=\"14\" height=\"14\"').' alt=\"\" />'.\n\t\t\t\t$LANG->getLL('goBack',1).\n\t\t\t\t'</a>';\n\t\t}\t\t\n\t\t\n\t}", "title": "" }, { "docid": "7bef1d278f103563c71ee51d105b129c", "score": "0.55566627", "text": "public function cabecera(){\r\n \techo \"<html><head>\";\r\n \techo \"<link rel=stylesheet type=text/css href=estilos.css media=screen />\";\r\n \techo \"</head><body>\";\r\n \techo \"<h1>MANTENIMIENTO DE LA TABLA AMIGOS</h1>\";\r\n \t// El menu superior\r\n \techo \"<ul>\";\r\n \techo \"<li><a href=controlador.php>Listar</a></li>\";\r\n \techo \"<li><a href=controlador.php?accion=Insertar>Insertar</a></li>\";\r\n \techo \"</ul>\";\r\n }", "title": "" }, { "docid": "a08efe86ce79a6a41b4cc21ac11bba55", "score": "0.55565673", "text": "public function ContentNoticia() {\n\n\n\n\n //RELLENAR TODAS LAS VARIABLES CON LLAMADAS A LA BASE DE DATOS\n $this->idNoticia = 0; //COMO SABER QUE INDEX TIENE LA NOTICIA, A CUAL ESTAMOS LLAMANDO??\n $this->titularExtendido = 0;\n $this->titularCorto = 0;\n $this->entradilla = 0;\n $this->cuerpo = 0;\n $this->autor = 0;\n $this->lugar = 0;\n $this->genero = 0;\n $this->tipo = 0;\n $this->fechaSubida = 0;\n $this->horaActualizacion = 0;\n\n $this->etiquetas = array();\n $this->imagenes = array();\n\n\n }", "title": "" }, { "docid": "4fc9a2b2f5219ab80652ca9656204dc3", "score": "0.5555862", "text": "function Como () {\r\n $this->view->partial(\"como.php\");\r\n }", "title": "" }, { "docid": "5cd5dfa70631a583d659b90724ed9ca9", "score": "0.55545235", "text": "function generarCabecera($tipo){\r\n\t\t$this->SetFontSize(9);\r\n $this->SetFont('', 'B');\t\t\t\t\r\n\t\t///////////////////////////////////////\r\n\t\tif($tipo=='baja'){\r\n \r\n\t $this->tablewidthsHD=array(10,35,100,70,50,20,20);\t\t\t \r\n\t $this->tablealignsHD=array('C','C','C','C','C','C','C');\r\n\t\t $this->tablenumbersHD=array(0,0,0,0,0,0,0);\r\n\t\t $this->tablebordersHD=array('TB','TB','TB','TB','TB','TB','TB');\r\n\t $this->tabletextcolorHD=array();\r\n\t\t\t $RowArray = array(\r\n\t \t\t\t's0' => 'Nro',\r\n\t \t\t\t's1' => 'Código', \r\n\t 's2' => 'Descripcion', \r\n\t 's3' => 'Marca',\r\n\t 's4' => 'Nro. Serie', \r\n\t 's5' => 'Estado Fun.',\r\n\t 's6' => 'Motivo');\r\n\t\t\t\r\n\r\n } else if($tipo=='reval'){\r\n \t\r\n\t\t\t $this->tablewidthsHD=array(8,35,90,35,25,20,20,20);\r\n\t $this->tablealignsHD=array('C','C','C','C','C','C','C');\r\n\t\t $this->tablenumbersHD=array(0,0,0,0,0,0,0,0);\r\n\t\t $this->tablebordersHD=array('TB','TB','TB','TB','TB','TB','TB','TB');\r\n\t $this->tabletextcolorHD=array();\r\n\t\t\t $RowArray = array(\r\n\t \t\t\t's0' => 'Nro',\r\n\t \t\t\t's1' => 'Código', \r\n\t 's2' => 'Descripcion', \r\n\t 's3' => 'Marca',\r\n\t 's4' => 'Nro. Serie', \r\n\t 's5' => 'Estado Fun.',\r\n\t 's6' => 'Inc.Vida Util',\r\n\t 's7' => 'Inc.Valor') ;\r\n\r\n } else if($tipo=='deprec'){\r\n \t\r\n\t\t\t $this->tablewidthsHD=array(8,35,90,35,25,20,20,20);\r\n\t $this->tablealignsHD=array('C','C','C','C','C','C','C');\r\n\t\t $this->tablenumbersHD=array(0,0,0,0,0,0,0,0);\r\n\t\t $this->tablebordersHD=array('TB','TB','TB','TB','TB','TB','TB','TB');\r\n\t $this->tabletextcolorHD=array();\r\n\t\t\t $RowArray = array(\r\n\t \t\t\t's0' => 'Nro',\r\n\t \t\t\t's1' => 'Código', \r\n\t 's2' => 'Descripcion', \r\n\t 's3' => 'Marca',\r\n\t 's4' => 'Nro. Serie', \r\n\t 's5' => 'Estado Fun.',\r\n\t 's6' => 'Imp. Compral',\r\n\t 's7' => 'Imp. Vigente');\r\n\t\t\t\t\r\n } else if($tipo=='asig'||$tipo=='devol'){\r\n \t\r\n $this->tablewidthsHD=array(8,35,75,32,26,20,60);\r\n\t\t\t //$this->tablewidths=array(8,31,84.5,34,32.5,26.5,18,20.5);\r\n\t $this->tablealignsHD=array('C','C','C','C','C','C','C','C');\r\n\t\t $this->tablenumbersHD=array(0,0,0,0,0,0,0,0);\r\n\t\t $this->tablebordersHD=array('TB','TB','TB','TB','TB','TB','TB','TB');\r\n\t $this->tabletextcolorHD=array();\r\n\t\t\t $RowArray = array(\r\n\t \t\t\t's0' => 'Nro',\r\n\t \t\t\t's1' => 'Código', \r\n\t 's2' => 'Descripcion', \r\n\t 's3' => 'Marca',\r\n\t 's4' => 'Nro. Serie', \r\n\t 's5' => 'Estado Fun.', \r\n\t 's8' => 'Observaciones');\r\n\t\t\t\r\n\t\t\t\r\n \r\n } else {\r\n //Alta, transf\r\n \r\n $this->tablewidthsHD=array(8,31,84.5,34,32.5,26.5,18,20.5);\r\n $this->tablealignsHD=array('C','C','C','C','C','C','C','C');\r\n\t $this->tablenumbersHD=array(0,0,0,0,0,0,0,0);\r\n\t $this->tablebordersHD=array('TB','TB','TB','TB','TB','TB','TB','TB');\r\n $this->tabletextcolorHD=array();\r\n\t\t \r\n\t\t $RowArray = array(\r\n \t\t\t's0' => 'Nro',\r\n \t\t\t's1' => 'Código', \r\n 's2' => 'Descripcion', \r\n 's3' => 'Tipo de Activo',\r\n 's4' => 'Marca', \r\n 's5' => 'Nro. Serie',\r\n 's6' => 'Fecha Compra',\r\n 's7' => 'Estado Fun.');\r\n\r\n $this->Ln(); \r\n }\r\n\t\t\r\n\t\t/////////////////////////////////\t \r\n $this-> MultiRowHeader($RowArray,false,1);\r\n\t\t$this->tablewidths = $this->tablewidthsHD;\r\n\t\t\r\n\t\t\r\n }", "title": "" }, { "docid": "68173a943c6a569bf70d567b4c7f3f5a", "score": "0.55532944", "text": "public function gerenciarContatosEquipamentos(){\n\n // Verifica o login\n $this->check_login();\n\n // Verifica as permissoes necessarias\n if ($_SESSION['userdata']['per_pe'] != 1 )\n {\n // Se nao possuir\n // Redireciona para index\n $this->moveHome();\n }else{\n // Define o titulo da pagina\n $this->title = \"equipamento\";\n\n // Carrega o modelo para este view\n $modeloEquip = $this->load_model('equipamento/equipamento-model');\n $modeloClie = $this->load_model('cliente/cliente-model');\n\n // Carrega view\n require_once EFIPATH . \"/views/_includes/header.php\";\n require_once EFIPATH . \"/views/_includes/menu.php\";\n require_once EFIPATH . \"/views/equipamento/equipamentoGerenciarContatos-view.php\";\n require_once EFIPATH . \"/views/_includes/footer.php\";\n }\n }", "title": "" }, { "docid": "e3c791a4ea8b706cc869320ab90b7a80", "score": "0.55519336", "text": "public function tincturesAction()\n {\n $vars = [\n// 'pagination' => $pagination->get(),\n 'list' => $this->model->tincturesList($this->route),\n ];\n $this->view->render('Настойки', $vars);\n }", "title": "" } ]
563be695243438f087d449a26ad79f97
get either "async" or empty string, to enable/disable async js mode
[ { "docid": "b82d3f97c1145ebb004bf413d060e7dc", "score": "0.82580465", "text": "public function getShoptimallyAsyncMode()\n {\n \ttry\n \t{\n\t if (Mage::helper('shoptimally_core/config')->shouldLoadJsAsync()) {\n\t return \"async\";\n\t }\n\t return \"\";\n \t}\n \tcatch (Exception $e)\n \t{\n \t\treturn \"async data-sh-error=''\";\n \t}\n }", "title": "" } ]
[ { "docid": "0f24eed4f9fb130efeeecbcecd3d8832", "score": "0.69461966", "text": "function js_async_attr($tag, $handle){\n\n\t\t//exclude Thrive Themes from async\n\t\tglobal $post;\n\t\t$current_post_type = get_post_type( $post );\n\n\t\tif ( 'tve_form_type' == $current_post_type )\n\t\t\treturn $tag;\n\t\t\n\t\t// do not async if admin or jquery || 'jquery-migrate' == $handle\n\t\t// TODO: async jQuery and test with ViDA_Script_Loader || 'jquery-migrate' == $handle || 'mr_tracking' == $handle\n\t\tif ( is_admin() || 'jquery' == $handle || 'jquery-core' == $handle )\n\t\t\treturn $tag;\n\t\t\n\t\t# Add async to all remaining scripts\n\t\treturn str_replace( \" src\", \" async='async' src\", $tag );\n\t\t\n\t}", "title": "" }, { "docid": "b5fd6ef3dc97914f7da69534f4fe0ce5", "score": "0.68370533", "text": "function add_async_forscript($url)\r\n{\r\n if (strpos($url, '#asyncload')===false)\r\n return $url;\r\n else if (is_admin())\r\n return str_replace('#asyncload', '', $url);\r\n else\r\n return str_replace('#asyncload', '', $url).\"' async='async\";\r\n}", "title": "" }, { "docid": "20979d5f73fbf61145a11c202022d925", "score": "0.6632474", "text": "function async_scripts($url){\n if ( strpos( $url, '#asyncload') === false )\n return $url;\n else if ( is_admin() )\n return str_replace( '#asyncload', '', $url );\n else\n return str_replace( '#asyncload', '', $url ).\"' async='async\";\n }", "title": "" }, { "docid": "93d36445ebe193ce636920fa05dff1b8", "score": "0.6601715", "text": "public function testDefaultAsyncMode()\n {\n $httpClient = $this->_getHttpClientMock(null);\n\n $client = new Client($httpClient, '4pik3y');\n\n $this->assertEquals(false, $client->getAsyncMode());\n }", "title": "" }, { "docid": "fd2cf17f496715209478e85c1499e5bc", "score": "0.6458224", "text": "public function isAllowAsync();", "title": "" }, { "docid": "81eae5b6413e3a8e2831ebbcd26d2740", "score": "0.6426558", "text": "function usine_script_add_async_attribute( $tag, $handle ) {\n\t\tif ( 'core' !== $handle ) {\n\t\t\treturn $tag;\n\t\t}\n\t\treturn str_replace( ' src', ' async defer src', $tag );\n\t}", "title": "" }, { "docid": "df22c2c8ae28eb4a7c11f349277a80fa", "score": "0.6379442", "text": "public function setAsyncYes()\n\t{\n\t\t$this->setAttribute( \"async\");\n\t}", "title": "" }, { "docid": "e50cc6d4064476e35612894a12deaad7", "score": "0.6289812", "text": "public function isAsynchronous ( ) {\n\n if(!isset($_SERVER['HTTP_X_REQUESTED_WITH']))\n return false;\n\n return 'xmlhttprequest' == strtolower($_SERVER['HTTP_X_REQUESTED_WITH']);\n }", "title": "" }, { "docid": "04b2a95b49a6f4a98dff08930e1b2787", "score": "0.61256456", "text": "function rocket_lazyload_async_script( $tag, $handle ) {\n\tif ( 'rocket-lazyload' === $handle ) {\n\t\treturn str_replace( '<script', '<script async data-minify=\"1\"', $tag );\n\t}\n\n\treturn $tag;\n}", "title": "" }, { "docid": "668d7f23941dc03627365fea3ee07709", "score": "0.6093037", "text": "function add_async_attribute($tag, $handle) {\n $scripts_to_async = array( 'ssh_js_app' );\n\n foreach($scripts_to_async as $async_script) {\n if ($async_script === $handle) {\n return str_replace(' src', ' async=\"async\" src', $tag);\n }\n }\n return $tag;\n}", "title": "" }, { "docid": "f429d94d23d4b018c451f38797dfb5a2", "score": "0.6056719", "text": "public function isAsyncRequest()\n {\n return $this->isAsyncRequest;\n }", "title": "" }, { "docid": "12d53acf5f3cfa8c70e74bcebb130bd4", "score": "0.60301244", "text": "public function type()\n {\n return static::ASYNC;\n }", "title": "" }, { "docid": "013025d78a97ee1443138288505f6307", "score": "0.6009336", "text": "public function getAsync()\n {\n return $this->async;\n }", "title": "" }, { "docid": "d3fa9db55a2da93ba16901fcae24ae81", "score": "0.6000006", "text": "public function testUseAsync()\n\t{\n\t\t$this->object->useAsync();\n\t\t$async = $this->object->getOption('async');\n\t\t$this->assertTrue($async);\n\t}", "title": "" }, { "docid": "c3946a048d858d8e388a52549416f623", "score": "0.5995244", "text": "function make_script_async( $tag, $handle, $src ){\n\t if ( !is_admin() ) {\n\t return str_replace( ' src', 'defer=\"defer\" src', $tag );\n\t }else{\n\t return $tag;\n\t }\n\t}", "title": "" }, { "docid": "a8aed0b5a5626205b38f27b5cfa119f5", "score": "0.5980421", "text": "function ng_async_scripts( $url ) {\n\t$is_async_script = strpos( $url, '#async' ) !== false;\n\t$is_async_style = strpos( $url, '#loadcss' ) !== false;\n\n\tif ( ! $is_async_script && ! $is_async_style ) {\n\t\treturn $url;\n\t} else if ( is_admin() && $is_async_script ) {\n\t\treturn str_replace( '#async', '', $url );\n\t} else if ( is_admin() && $is_async_style ) {\n\t\treturn str_replace( '#loadcss', '', $url );\n\t} else if ( $is_async_script ) {\n\t\treturn str_replace( '#async', '', $url ) . \"' async='async\";\n\t} else {\n\t\treturn str_replace( '#loadcss', '', $url ) . \"' as=\\\"style\\\" onload=\\\"this.rel='stylesheet'\\\" rel='preload\";\n\t}\n}", "title": "" }, { "docid": "3925c32f6881064e133bb78ea36a21a9", "score": "0.58761054", "text": "public function asyncScript()\n {\n return $this->renderer->renderAsyncScript();\n }", "title": "" }, { "docid": "3addf1e7f1df17073dba9f9d4ee14312", "score": "0.58190453", "text": "function add_async_attribute($tag, $handle) {\n\t // add script handles to the array below\n\t $scripts_to_async = array();// pass in the script's handlers as arguments\n\t \n\t foreach($scripts_to_async as $async_script) {\n\t\t if ($async_script === $handle) {\n\t\t return str_replace(' src', ' async=\"async\" src', $tag);\n\t\t }\n\t\t }\n\t\t return $tag;\n\t\t}", "title": "" }, { "docid": "131eea43cff3a29771cd9f15abf595c5", "score": "0.5779591", "text": "public function testIsAsync()\n\t{\n\t\t$async = $this->object->isAsync();\n\t\t$this->assertTrue($async);\n\n\t\t$this->object->setOption('async', false);\n\t\t$async = $this->object->isAsync();\n\t\t$this->assertFalse($async);\n\n\t\t$this->object->setOption('async', true);\n\t\t$async = $this->object->isAsync();\n\t\t$this->assertTrue($async);\n\t}", "title": "" }, { "docid": "a20bde5ef4832cc34a1ed8ed78d316ca", "score": "0.57715017", "text": "function add_async_attribute( $tag, $handle ) {\n\t if ( 'jquery' !== $handle )\n\t \t//echo $handle.'<br>';\n\t return $tag;\n\t return str_replace( ' src', ' defer src', $tag );\n\t}", "title": "" }, { "docid": "95db3cd1b5c5799d6a1f3265c72c107d", "score": "0.5696625", "text": "function add_async_attribute( $tag, $handle ) {\r\n if ( 'geo_data_google_api' !== $handle ) {\r\n return $tag;\r\n }\r\n return str_replace( ' src', ' async=\"async\" src', $tag );\r\n}", "title": "" }, { "docid": "36a0d28c7dfa3156fa49a0c759a69afc", "score": "0.56329286", "text": "public function testPreventAsyncRedirect()\n {\n $Frontend = new Frontend();\n \n $value = 'TRUE';\n $Frontend->set('prevent_async_redirect', $value);\n \n $this->assertEquals($value, $Frontend->getPreventAsyncRedirect());\n }", "title": "" }, { "docid": "acbc384ffc636fb541f49112b892fc28", "score": "0.5617023", "text": "function agregar_async_defer($tag,$handle){\n if('maps' !== $handle)\n return $tag;\n return str_replace(' src', ' async=\"async\" defer=\"defer\" src',$tag);\n }", "title": "" }, { "docid": "d3902c530b9ada79f3da680c23f19a3a", "score": "0.5585992", "text": "public function is_async_printed() {\n\t\t\treturn self::$spw_add_script['async_printed'];\n\t\t}", "title": "" }, { "docid": "6c6b4c7dd5c74f91737bf2ef7d26247f", "score": "0.5563836", "text": "public function isAsync(): bool {\n return method_exists($this->transport, 'wait');\n }", "title": "" }, { "docid": "f3361f474cb75946ce6c4d7d53161918", "score": "0.5501026", "text": "public static function add_async_attribute( $tag, $handle ) {\n\n\t\tif ( 'bs-booster' !== $handle ) {\n\t\t\treturn $tag;\n\t\t}\n\n\t\treturn str_replace( ' src', ' async=\"async\" src', $tag );\n\t}", "title": "" }, { "docid": "34160cdf5adfede7e2f0aa5f90853cd5", "score": "0.5440392", "text": "public function testUseSync()\n\t{\n\t\t$this->object->useSync();\n\t\t$async = $this->object->getOption('async');\n\t\t$this->assertFalse($async);\n\t}", "title": "" }, { "docid": "851fc3f860670b158067ffdc3ce521ee", "score": "0.54249567", "text": "public function testSettingValidAsnycMode()\n {\n $httpClient = $this->_getHttpClientMock(null);\n\n $client = new Client($httpClient, '4pik3y');\n\n $this->assertEquals(false, $client->getAsyncMode());\n\n $client->setAsyncMode(true);\n\n $this->assertEquals(true, $client->getAsyncMode());\n }", "title": "" }, { "docid": "b5030c14bf9ae4335203ccdf45b31c15", "score": "0.5326172", "text": "public function ajaxEnabled();", "title": "" }, { "docid": "b29cbe30be649aef2e9ac2b797bfad56", "score": "0.531072", "text": "function asyncJs($absolutePath)\n{\n echo '<script>' . \n 'var node = document.createElement(\\'script\\');' . \n 'node.type = \\'text/javascript\\';' . \n 'node.async = true;' . \n 'node.src = \\'' . $absolutePath . '\\';' . \n 'var s = document.getElementsByTagName(\\'script\\')[0]; ' . \n 's.parentNode.insertBefore(node, s);' . \n '</script>';\n}", "title": "" }, { "docid": "a7ef325532165112a394145b3beb2dc1", "score": "0.5308288", "text": "public static function getAsyncLoadScripts(): array {\n return apply_filters(Plugin::L10N . '/async_load_scripts', static::ASYNC_LOAD_SCRIPTS);\n }", "title": "" }, { "docid": "79bf18e6d3ffc32c344934cf2aae9189", "score": "0.5292501", "text": "public function isAjaxEnabled()\n {\n if (!$this->isEnabled()) {\n return false;\n }\n return Mage::getStoreConfigFlag('ado_seo/catalog/ajax_enabled');\n }", "title": "" }, { "docid": "417598820266019848b50b4296e10b8f", "score": "0.5286956", "text": "protected function _getAjax(): bool\n {\n return 'XMLHttpRequest' === ($this->hive['SERVER']['HTTP_X_REQUESTED_WITH'] ?? null);\n }", "title": "" }, { "docid": "19ace0693ec8e480023dc87da8553c0a", "score": "0.52861345", "text": "public function isSync() {\n return false;\n }", "title": "" }, { "docid": "5500a10c151ceb5516dbd860dcf79b3b", "score": "0.5253134", "text": "public function test_loading_strategy_with_valid_async_registration() {\n\t\t// No dependents, No dependencies then async.\n\t\twp_enqueue_script( 'main-script-a1', '/main-script-a1.js', array(), null, array( 'strategy' => 'async' ) );\n\t\t$output = get_echo( 'wp_print_scripts' );\n\t\t$expected = \"<script type='text/javascript' src='/main-script-a1.js' id='main-script-a1-js' async data-wp-strategy='async'></script>\\n\";\n\t\t$this->assertSame( $expected, $output, 'Scripts enqueued with an async loading strategy are failing to have the async attribute applied to the script handle when being printed.' );\n\t}", "title": "" }, { "docid": "9e9c2a8c7524cc67e0c7426a54c13d7a", "score": "0.520767", "text": "public function vp_script_loader_tag( $tag, $handle )\r\n\t{\r\n\t\tif ( 'viralpress-core-js' !== $handle && 'jquery-core' !== $handle && 'jquery-migrate' !== $handle )return $tag;\r\n \treturn str_replace( ' src', ' data-cfasync=\"false\" src', $tag ); //false to disable\r\n\t}", "title": "" }, { "docid": "e53b670c6e9eb54130d9a87b52c0a400", "score": "0.51875496", "text": "public function supportsAsyncSignals()\n {\n return version_compare(PHP_VERSION, '7.1.0') >= 0 &&\n extension_loaded('pcntl');\n }", "title": "" }, { "docid": "c7219dfda51c7fd0d3f0a9e6832404bd", "score": "0.5163714", "text": "protected function setAsync()\n {\n $this->payMethod->getRequest()->async(\n $this->getLanguage(), // Language code for the Frame\n $this->getResponseUrl()\n );\n }", "title": "" }, { "docid": "183a99b438bd2497c970c1af41f179ab", "score": "0.5151921", "text": "protected function _getTrackerAsynchronous()\n\t{\n\n\t\tob_start();\n\n?>\n<!-- googleAnalytics begin -->\n<script type=\"text/javascript\">\n\tvar _gaq = _gaq || [];\n\t_gaq.push(['_setAccount', '<?php echo $this->getCode(); ?>']);\n\t_gaq.push(['_trackPageview']);\n\n\t(function() {\n\t\tvar ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;\n\t\tga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';\n\t\t(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);\n\t})();\n</script>\n<!-- googleAnalytics end -->\n<?php\n\n\t\treturn ob_get_clean();\n\n\t}", "title": "" }, { "docid": "e97baa24fc23e1e65f663fb2ec63636b", "score": "0.5143533", "text": "public function isAjaxHandlerAutoShow()\n {\n return $this->ajaxHandlerAutoShow;\n }", "title": "" }, { "docid": "221ca49b21450fd7da56663386ce864f", "score": "0.5072943", "text": "public function ShouldCompressJavascript(){\n\t\treturn MagratheaConfig::Instance()->GetConfigFromDefault(\"compress_js\");\n\t}", "title": "" }, { "docid": "08a8dca00f9f1e075cf11d9a15cf800f", "score": "0.50240576", "text": "public function getSimultaneousMultiThreading()\n {\n if (array_key_exists(\"simultaneousMultiThreading\", $this->_propDict)) {\n if (is_a($this->_propDict[\"simultaneousMultiThreading\"], \"\\Beta\\Microsoft\\Graph\\Model\\Enablement\") || is_null($this->_propDict[\"simultaneousMultiThreading\"])) {\n return $this->_propDict[\"simultaneousMultiThreading\"];\n } else {\n $this->_propDict[\"simultaneousMultiThreading\"] = new Enablement($this->_propDict[\"simultaneousMultiThreading\"]);\n return $this->_propDict[\"simultaneousMultiThreading\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "eed5bb6cade77f9ca5fd1d5f5cdbd8c2", "score": "0.50094646", "text": "function sienna_mikado_is_ajax_enabled()\n {\n\n return sienna_mikado_options()->getOptionValue('smooth_page_transitions') === 'yes' && sienna_mikado_options()->getOptionValue('smooth_pt_true_ajax') != 'no';\n\n }", "title": "" }, { "docid": "a196de790bbc5d04e36ab37f3bfc9c32", "score": "0.49751276", "text": "public function isRequireJsUsed()\n {\n return $this->useRequireJs;\n }", "title": "" }, { "docid": "e21926873f1307a8c2947d7584a31d98", "score": "0.49702102", "text": "public function isRenderJS() {\r\n return $this->renderJS;\r\n }", "title": "" }, { "docid": "190385ab837670efc1beccb1607b2830", "score": "0.49541318", "text": "function rt_javascript_detection() {\n\techo \"<script>(function(html){html.className = html.className.replace(/\\bno-js\\b/,'js')})(document.documentElement);</script>\\n\";\n}", "title": "" }, { "docid": "e39614fb3c85c3283fa4196d6e33c28a", "score": "0.49495634", "text": "function minimal2017_javascript_detection(){\n \n\techo \"<script>(function(html){html.className = html.className.replace(/\\bno-js\\b/,'js')})(document.documentElement);</script>\\n\";\n \n}", "title": "" }, { "docid": "6db66a70113c9052d12720ed1bc08cce", "score": "0.49449605", "text": "public function setAsync($value)\n {\n return $this->set('Async', $value);\n }", "title": "" }, { "docid": "461e45d5317da9fdfa64b4a72ca3c57b", "score": "0.49307683", "text": "public function getMinifier() {\n\n if ($this->minifier !== FALSE) {\n return $this->minifier;\n }\n\n $this->minifier = NULL;\n\n if (!($this->hasComSupport() === TRUE && $this->hasNetPhpSupport() === TRUE)) {\n $this->ajaxminSupport = 'NetPhp runtime missing.';\n return NULL;\n }\n\n $path = \\Drupal::service('file_system')->realpath($this->ajaxMinPath());\n\n // The file must be in libraries/_bin/ajaxmin.\n if ($path == FALSE) {\n $this->ajaxminSupport = \"File not found: {$this->ajaxMinPath()}\";\n return NULL;\n }\n\n try {\n $this->runtime->RegisterAssemblyFromFile($path, 'AjaxMin');\n $this->minifier = $this->runtime->TypeFromName(\"Microsoft.Ajax.Utilities.Minifier\")->Instantiate();\n }\n catch (\\Exception $e) {\n $this->ajaxminSupport = $e->getMessage();\n return NULL;\n }\n\n $this->ajaxminSupport = TRUE;\n return $this->minifier;\n }", "title": "" }, { "docid": "7cc337edeb5c02c3c50667d1eae01a66", "score": "0.49141437", "text": "abstract public function getJavascriptStatusUpdate():string;", "title": "" }, { "docid": "19721d9d59df6d68f25ea67a5a66d5db", "score": "0.48712224", "text": "public function getSyncSafe()\n\t{\n\t\treturn $this->sync_safe;\n\t}", "title": "" }, { "docid": "f8b248fde3ccb20a04164ab9b8bf09c8", "score": "0.48461166", "text": "public function isAjaxLoaded() {\r\n return false;\r\n }", "title": "" }, { "docid": "fbd2673c8e3dffed6e9de72960a39ffc", "score": "0.48260003", "text": "public function isAjaxLoaded()\n {\n return false;\n }", "title": "" }, { "docid": "fbd2673c8e3dffed6e9de72960a39ffc", "score": "0.48260003", "text": "public function isAjaxLoaded()\n {\n return false;\n }", "title": "" }, { "docid": "fbd2673c8e3dffed6e9de72960a39ffc", "score": "0.48260003", "text": "public function isAjaxLoaded()\n {\n return false;\n }", "title": "" }, { "docid": "0866bb7c0f43afc55a32324a9a0d4ecc", "score": "0.48165217", "text": "public function allowMultithreading()\n {\n return $this->_allow_multithreading;\n }", "title": "" }, { "docid": "7df61bcfe6f064454b35b7510dfdc32e", "score": "0.48141995", "text": "function mkd_burst_is_ajax() {\n return !empty( $_SERVER[ 'HTTP_X_REQUESTED_WITH' ]) && strtolower( $_SERVER[ 'HTTP_X_REQUESTED_WITH' ]) == 'xmlhttprequest';\n }", "title": "" }, { "docid": "4e2b056083413ba33acf18046c33305d", "score": "0.47910812", "text": "public function getMode(): string\n {\n\n return GlobalConfig::get('configuration.mode') ?: DevelopmentMode::MODE;\n\n }", "title": "" }, { "docid": "77cc6bf1be628dae53a3893ad19b9ce1", "score": "0.47714862", "text": "#[TentativeType]\n public function reap_async_query(): mysqli_result|bool {}", "title": "" }, { "docid": "c5ebab3e3b88f691bb4802e5452f778a", "score": "0.47634602", "text": "public static function isAjaxUsed()\r\n {\r\n if (!empty($_GET['useajax']) and $_GET['useajax'] == 'true')\r\n return true;\r\n\r\n return false;\r\n }", "title": "" }, { "docid": "a5e9906fd75739889969d86de97929be", "score": "0.4757681", "text": "public function hasAdditionalJS() {\n return false;\n }", "title": "" }, { "docid": "052a6f96adb88566574869fcf9780499", "score": "0.475336", "text": "function isAjax()\n {\n \treturn $this->isAjax;\n }", "title": "" }, { "docid": "15b1d8f41429b2192124503fbc82d29d", "score": "0.4747382", "text": "function disabled() {\n return \"\";\n }", "title": "" }, { "docid": "0178bf6d099fd88bd4537232666e6131", "score": "0.47427717", "text": "public function test_concatenate_with_async_strategy() {\n\t\tglobal $wp_scripts, $concatenate_scripts, $wp_version;\n\n\t\t$old_value = $concatenate_scripts;\n\t\t$concatenate_scripts = true;\n\n\t\t$wp_scripts->do_concat = true;\n\t\t$wp_scripts->default_dirs = array( $this->default_scripts_dir );\n\n\t\twp_enqueue_script( 'one-concat-dep-1', $this->default_scripts_dir . 'script.js' );\n\t\twp_enqueue_script( 'two-concat-dep-1', $this->default_scripts_dir . 'script.js' );\n\t\twp_enqueue_script( 'three-concat-dep-1', $this->default_scripts_dir . 'script.js' );\n\t\twp_enqueue_script( 'main-async-script-1', '/main-script.js', array(), null, array( 'strategy' => 'async' ) );\n\n\t\twp_print_scripts();\n\t\t$print_scripts = get_echo( '_print_scripts' );\n\n\t\t// Reset global before asserting.\n\t\t$concatenate_scripts = $old_value;\n\n\t\t$expected = \"<script type='text/javascript' src='/wp-admin/load-scripts.php?c=0&amp;load%5Bchunk_0%5D=one-concat-dep-1,two-concat-dep-1,three-concat-dep-1&amp;ver={$wp_version}'></script>\\n\";\n\t\t$expected .= \"<script type='text/javascript' src='/main-script.js' id='main-async-script-1-js' async data-wp-strategy='async'></script>\\n\";\n\n\t\t$this->assertSame( $expected, $print_scripts, 'Scripts are being incorrectly concatenated when a main script is registered with an \"async\" loading strategy. Async scripts should not be part of the script concat loading query.' );\n\t}", "title": "" }, { "docid": "67f0b4263eed1a6dea50b52543072aa9", "score": "0.47290647", "text": "public function getUseCacheSynchronization();", "title": "" }, { "docid": "7d17964e9a52a620cc6b44d961ff80de", "score": "0.47253197", "text": "final public static function isAjaxRequest()\n {\n return get_is_ajax_request();\n }", "title": "" }, { "docid": "99d0b74cef32529735708738c1c5ce6c", "score": "0.47233856", "text": "public function getShoptimallyJsUrl()\n {\n \ttry\n \t{\n \treturn Mage::helper('shoptimally_core/config')->getJsUrl();\n \t}\n \tcatch (Exception $e)\n \t{\n \t\treturn \"error\";\n \t}\n }", "title": "" }, { "docid": "4847c837b4383c3479ba49747af67d72", "score": "0.47214076", "text": "public function isAjax() {\n return true;\n }", "title": "" }, { "docid": "9448f5b0b92947b44737706e182ed51d", "score": "0.47208872", "text": "public function isAjax()\n {\n return $this->ajax;\n }", "title": "" }, { "docid": "38a794744202c5dd99f313625c318c22", "score": "0.47203454", "text": "public function isStrictMode();", "title": "" }, { "docid": "9d14528ea8d813070edbea23c867c90a", "score": "0.4715538", "text": "public function hasAjaxMinSupport() {\n $this->getMinifier();\n return $this->ajaxminSupport;\n }", "title": "" }, { "docid": "6f02a8c5367d4d976a94a6d897bca5eb", "score": "0.47092828", "text": "public function isAjax(): bool {\n\t\treturn ($this->serverParams['HTTP_X_REQUESTED_WITH'] ?? '') == 'XMLHttpRequest';\n\t}", "title": "" }, { "docid": "29e05397b0e4d52021378f6727ffe4b3", "score": "0.47041592", "text": "public function async(string $url): AsyncJs\n {\n $source = new AsyncJs($url);\n $this->sources[$source->duplicationHash()] = $source;\n return $source;\n }", "title": "" }, { "docid": "f86f8442f5f659c7724a21f6e246330e", "score": "0.46784347", "text": "public function isAjax()\n {\n return $this->app->isAjax();\n }", "title": "" }, { "docid": "f60cfae8c2a5003595fc0647cfb90a57", "score": "0.46766582", "text": "private function _isAjax() {\n if ( $this->currActionDefs['outf'] == 'ajax'\n || $this->currActionDefs['outf'] == 'json') {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "1f65cfb908a3f90167bde68ca6aea6f2", "score": "0.4675958", "text": "public function init()\n {\n $render = $this->asyncScript();\n $render .= $this->load($this->client->getWriteKey());\n\n return $render;\n }", "title": "" }, { "docid": "f248b630b96ce50bfb1892f231eb4992", "score": "0.46734744", "text": "public function getQueue()\n {\n return 'sync';\n }", "title": "" }, { "docid": "87c1215825d809c661b2d2b74c5cf80e", "score": "0.46733797", "text": "#[TentativeType]\n public function thread_safe(): bool {}", "title": "" }, { "docid": "3741cad971c33310058cd4d511bf91a8", "score": "0.46549043", "text": "public function ajax()\n {\n return $this->isXmlHttpRequest();\n }", "title": "" }, { "docid": "b526e07945a8da83ec3e1f291a9b7fa5", "score": "0.46535382", "text": "public static function isStrictModeEnabled();", "title": "" }, { "docid": "b67bd340595786ed869c10455307a73c", "score": "0.46468902", "text": "public function usesAJAX();", "title": "" }, { "docid": "c8c7b78b27d1126f77c5cb971eefa5bb", "score": "0.46437544", "text": "function boiler_javascript_detection() {\n echo \"<script>(function(html){html.className = html.className.replace(/\\bno-js\\b/,'js')})(document.documentElement);</script>\\n\";\n}", "title": "" }, { "docid": "55d33dc1e41925d38415099e581176e4", "score": "0.46432614", "text": "protected function isDisabled() : bool\n {\n return env(\"MKCDN\", Configure::read('debug') !== TRUE) !== TRUE; \n }", "title": "" }, { "docid": "7a9860232646f8497a704cf867bfd929", "score": "0.46273378", "text": "public function isAjax()\n {\n return $this->ajax();\n }", "title": "" }, { "docid": "4142fcadce0f056e4eb75ff1b953ea38", "score": "0.46253097", "text": "protected function customJavascript(): string {\n }", "title": "" }, { "docid": "245eacb86a6c3d61d20e152df2de523c", "score": "0.46251956", "text": "public function isAjax()\n {\n return $this->_isAjax;\n }", "title": "" }, { "docid": "e1a2af2341e88cfa558b41996cd7e79f", "score": "0.4623258", "text": "protected function readjsOnReadyStateChange () { return $this->_jsonreadystatechange; }", "title": "" }, { "docid": "1628896729e115371793896b59f6adf7", "score": "0.46099526", "text": "function mipress_javascript_detection() {\n\techo \"<script>(function(html){html.className = html.className.replace(/\\bno-js\\b/,'js')})(document.documentElement);</script>\\n\";\n}", "title": "" }, { "docid": "85adce3b96de6df2752a7c1adaacf6eb", "score": "0.46082252", "text": "public function getAdditionalJS() {\n return \"\";\n }", "title": "" }, { "docid": "75a0d5b019d7bc5ea4bff3d3c81a611d", "score": "0.46011597", "text": "public function getSafeMode()\n {\n return $this->container->get('kernel')->isSafeMode();\n }", "title": "" }, { "docid": "2280b31af38c5f466a35f28fbb29b1d7", "score": "0.46001706", "text": "private function isConcurrencyEnabled()\n {\n $input = $this->getInput();\n if (! $input->getOption('concurrent')) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "1d3ade8741b0086f29fc63e73da44357", "score": "0.45983735", "text": "function defer_parsing_of_js ( $url ) {\n if ( FALSE === strpos( $url, '.js' ) ) return $url;\n if ( strpos( $url, 'jquery.js' ) ) return $url;\n // return \"$url' defer \";\n return \"$url' defer onload='\";\n }", "title": "" }, { "docid": "c4c2ceb6c6ec019827348380f71a7c9b", "score": "0.45983347", "text": "public function getConditionMode(): string;", "title": "" }, { "docid": "06a7e5a1a4e1fc8626c2ef760ad354d6", "score": "0.4594184", "text": "function mkd_burst_is_ajax_enabled() {\n global $mkd_burst_options;\n\n $has_ajax = false;\n\n if(isset($mkd_burst_options['page_transitions']) && $mkd_burst_options['page_transitions'] !== '0') {\n $has_ajax = true;\n }\n\n return $has_ajax;\n }", "title": "" }, { "docid": "1744697e7b32cc4e14585741515ba191", "score": "0.45931202", "text": "public function getIsAjax()\n {\n return isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] === 'XMLHttpRequest';\n }", "title": "" }, { "docid": "3a8505a1b9d61e7136b0979694efcbdf", "score": "0.45864883", "text": "function sheru_javascript_detection() {\n echo \"<script>(function(html){html.className = html.className.replace(/\\bno-js\\b/,'js')})(document.documentElement);</script>\\n\";\n}", "title": "" }, { "docid": "ca7cc7353ad4844fe6ee5584bb2850b4", "score": "0.4586269", "text": "public function applicationScript() {\n $use_require = '<script data-main=\"' . Assets::get('js', 'main') . '\" src=\"' . Assets::get('js', 'libs/require') . '\"></script>';\n $use_concat = '<script src=\"' . Assets::get('js', 'main') . '\"></script>';\n return ENV === 'development' ? $use_require : $use_concat;\n }", "title": "" }, { "docid": "bcabb319f50744ba8d9892530038ad65", "score": "0.458521", "text": "abstract public function getMode(): string;", "title": "" }, { "docid": "ca360cc51ad1c7d6db0d38c979118579", "score": "0.45819208", "text": "public function isProductionModeEnabled(): bool;", "title": "" }, { "docid": "d239e71c2a9516737f27628d845cd617", "score": "0.45808443", "text": "public static function ajax()\n {\n return static::foundation()->isXmlHttpRequest();\n }", "title": "" } ]
b2e15cf32f993dcf9d7d789fc5f3cfe5
Get the notification's delivery channels.
[ { "docid": "d263908746aa88c0547e8422772663ca", "score": "0.0", "text": "public function via() {\n return ['mail'];\n }", "title": "" } ]
[ { "docid": "61f83897cebfd965269709c4463e0bda", "score": "0.80202055", "text": "public function getDeliveryChannels()\n {\n if (!$this->isPropertyAvailable(\"DeliveryChannels\")) {\n return null;\n }\n return $this->getProperty(\"DeliveryChannels\");\n }", "title": "" }, { "docid": "33d41f3d7087465f5203fd08c026f52e", "score": "0.7114047", "text": "public function getChannels()\n {\n return $this->channels ?? [];\n }", "title": "" }, { "docid": "ba51029342585b4063b5472c883d4870", "score": "0.7089724", "text": "public function getChannels()\n {\n return $this->channels;\n }", "title": "" }, { "docid": "4809f7d51d9dfb977e8ccf709ccdaa70", "score": "0.7087921", "text": "public function getChannels();", "title": "" }, { "docid": "576246eb43da4a29db183dbea344fcfc", "score": "0.70558536", "text": "public function getChannels()\n\t{\n\n\t\treturn $this->channels;\n\t}", "title": "" }, { "docid": "c9d6dd952b63a0b18f07d7fcddfdfff1", "score": "0.69995517", "text": "public function getChannels() {\n\t\treturn array_values($this->channels);\n\t}", "title": "" }, { "docid": "a40ddea13857137e15968a09dc1f7af4", "score": "0.69764173", "text": "protected function getChannels()\n {\n $channels = $this->channels;\n $this->channels = array();\n return $channels;\n }", "title": "" }, { "docid": "6a0c4bba9860870f967b9ceb7c0f2d93", "score": "0.69648826", "text": "public function getNotificationChannel()\n {\n return $this->notification_channel;\n }", "title": "" }, { "docid": "1773382bd70784ee52e6ba3adeac873d", "score": "0.6814418", "text": "public function getChannels ()\n {\n return $this -> m_aChannels;\n }", "title": "" }, { "docid": "dd33335c3f5b0a0d775f7a019cf90e73", "score": "0.6798322", "text": "public function channels()\n {\n return $this->hasMany(UserNotificationChannel::class, 'user_id', 'user_id');\n }", "title": "" }, { "docid": "1104e04402a698a644a18c8da6bf3049", "score": "0.67839724", "text": "public function via($notifiable)\n {\n return $this->getChannels($notifiable);\n }", "title": "" }, { "docid": "c5c6ed9f4aa8abd103725c30ea14e0d1", "score": "0.6761172", "text": "public function getChannels(){\n return self::getManager()->getChannels($this->getLevel());\n }", "title": "" }, { "docid": "e05c148517e6c52319c1c7e9deb1c242", "score": "0.67181706", "text": "public function broadcastOn()\n {\n $channels = $this->notification->broadcastOn();\n\n if (!empty($channels)) {\n return $channels;\n }\n\n return ['notification'];\n }", "title": "" }, { "docid": "16ad648652dcd09f0a23ee752f6b4811", "score": "0.67052203", "text": "public function notificationChannels($service) {\n return $this->notificationChannels[$service];\n }", "title": "" }, { "docid": "69c31647bb1276beea38632187423f28", "score": "0.6533336", "text": "public function getDistributionChannels()\n {\n if (is_null($this->distributionChannels)) {\n /** @psalm-var ?list<stdClass> $data */\n $data = $this->raw(self::FIELD_DISTRIBUTION_CHANNELS);\n if (is_null($data)) {\n return null;\n }\n $this->distributionChannels = ChannelReferenceCollection::fromArray($data);\n }\n\n return $this->distributionChannels;\n }", "title": "" }, { "docid": "a92fc762d6f85d6e0b2dec2c1b19ba40", "score": "0.6464078", "text": "protected function getChannels()\n {\n if (empty($this->channels)) {\n $allowed_channel_ids = ($this->is_admin) ? null : $this->allowed_channels;\n $this->channels = ee('Model')->get('Channel', $allowed_channel_ids)\n ->fields('channel_id', 'channel_title')\n ->filter('site_id', ee()->config->item('site_id'))\n ->order('channel_title', 'asc')\n ->all();\n }\n\n return $this->channels;\n }", "title": "" }, { "docid": "aa30cf040f51ac714089052351ce009b", "score": "0.6460807", "text": "public function channel_list()\n {\n return $this->request('get', 'channels.list');\n }", "title": "" }, { "docid": "c38e262fd8d0f99f01aa1c95b7a4e134", "score": "0.63863", "text": "public static function deliversVia()\n {\n return \\Illuminate\\Notifications\\ChannelManager::deliversVia();\n }", "title": "" }, { "docid": "cda2437df699820f30f2fd7550d485fc", "score": "0.6379094", "text": "public function via($notifiable)\n {\n return $this->defaultChannels;\n }", "title": "" }, { "docid": "fa57fa925380b2d6f61c035feb825d4b", "score": "0.63706607", "text": "public function via($notifiable)\n {\n $channels = ['database'];\n\n if ( $notifiable->wantsMailForHis('bids') ) $channels[] = 'mail';\n\n return $channels;\n }", "title": "" }, { "docid": "212cadc164f78e1592cf2271c3deed57", "score": "0.62882507", "text": "public static function getDeliveredMessages(): array\n {\n return self::$deliveredMessages;\n }", "title": "" }, { "docid": "fc995578c4a1ed137af25df315efec11", "score": "0.6283934", "text": "public function via($notifiable)\n {\n return [\n DatabaseChannel::class,\n MailChannel::class,\n WebPushChannel::class,\n ];\n }", "title": "" }, { "docid": "fc995578c4a1ed137af25df315efec11", "score": "0.6283934", "text": "public function via($notifiable)\n {\n return [\n DatabaseChannel::class,\n MailChannel::class,\n WebPushChannel::class,\n ];\n }", "title": "" }, { "docid": "069a33f46088132a8c472b88e7f309ec", "score": "0.6262661", "text": "public function broadcastOn()\n {\n return [$this->package->getChannel()];\n }", "title": "" }, { "docid": "fe6eeebb587219a2572a36364ea6a2df", "score": "0.6234182", "text": "public function channelTypes() {\n return $this->channelTypes;\n }", "title": "" }, { "docid": "aacbede3a2e9cac621819cbdb66792f1", "score": "0.6212151", "text": "public function broadcastOn()\n {\n return [$this->channel];\n }", "title": "" }, { "docid": "9d825254c9f3b0251a72f31ea125af4c", "score": "0.61715066", "text": "public function getPendingClosingChannels()\n {\n return $this->pending_closing_channels;\n }", "title": "" }, { "docid": "f8828545ee58808dad8b01a50528d2f9", "score": "0.6135624", "text": "public function getChannels(): int\n {\n return $this->channels;\n }", "title": "" }, { "docid": "c0f750ee62476e99cc93470715829939", "score": "0.6126901", "text": "public function getAddedSupplyChannels();", "title": "" }, { "docid": "1e742fff140047fa763f18f77a7bb335", "score": "0.60746396", "text": "public function via($notifiable)\n {\n return [RocketChatNotificationChannel::class];\n }", "title": "" }, { "docid": "a6378012d91cacdf8e2d019c17ae0b11", "score": "0.6062474", "text": "public function getUsedChannels() {}", "title": "" }, { "docid": "36ece28a28a5a355b2ae3ce5aa1b2cbd", "score": "0.603515", "text": "public function getPendingOpenChannels()\n {\n return $this->pending_open_channels;\n }", "title": "" }, { "docid": "0ecf95e7356138c10f4fe06264154e1d", "score": "0.60267717", "text": "public function getChannelsList()\n {\n \t$result = array();\n \t$pamiClient = new PamiClient($this->options);\n \t$pamiClient->open();\n \t$result = $pamiClient->send(new CoreShowChannelsAction())->getEvents();\n \t\treturn $result;\n }", "title": "" }, { "docid": "98e0e62855df508334774ecc733d3648", "score": "0.60226095", "text": "public function getNotificationChannelUrl()\n {\n if (array_key_exists(\"notificationChannelUrl\", $this->_propDict)) {\n return $this->_propDict[\"notificationChannelUrl\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "d8d149594b289afe81ddd2573009c40b", "score": "0.6017953", "text": "public function broadcastOn()\n {\n $subscribers = Arr::pull($this->data, 'subscribers');\n\n foreach ($subscribers as $subscriber) {\n $channels[] = new PrivateChannel('user.' . $subscriber->id);\n }\n\n return $channels ?? [];\n }", "title": "" }, { "docid": "f18dcc63195b03e38de4a7eff3e384d5", "score": "0.6013163", "text": "public function getChannel()\n {\n return $this->getWithCaching('channel', function() {\n $channel = $this->getEvents(['Consolidate\\Ticket\\Event\\SetChannel'])->reduce(function($channel, $event) {\n return $event->getData();\n }, null);\n\n return !empty($channel) ? $channel : new Channel(Channel::UNKNOWN);\n });\n }", "title": "" }, { "docid": "ad50984019acefffcce1a1c153cd6dca", "score": "0.6005073", "text": "public function via(object $notifiable): array\n {\n return [WebPushChannel::class];\n }", "title": "" }, { "docid": "dc89f68a7712b482e7925adf1a54591c", "score": "0.5995534", "text": "public function via($notifiable)\n {\n return [WhatsappChannel::class, SmsChannel::class];\n }", "title": "" }, { "docid": "9b19ef9429323eeaed2b214a7ca1660b", "score": "0.596769", "text": "public function getChannel() {}", "title": "" }, { "docid": "9b19ef9429323eeaed2b214a7ca1660b", "score": "0.596769", "text": "public function getChannel() {}", "title": "" }, { "docid": "339b7133d90461aaed1f61d9e9ddba0c", "score": "0.5965364", "text": "public function via($notifiable)\n {\n return [FirebaseChannel::class];\n }", "title": "" }, { "docid": "339b7133d90461aaed1f61d9e9ddba0c", "score": "0.5965364", "text": "public function via($notifiable)\n {\n return [FirebaseChannel::class];\n }", "title": "" }, { "docid": "cc56d7fb70ab25b18dea85cda1434404", "score": "0.5948588", "text": "public function getChannelList()\n {\n $entityList = $this->_getEntityList('Channels');\n $result = [];\n\n foreach ($entityList as $channel) {\n $result[] = Channel::createFromOptions($channel);\n }\n\n return $result;\n }", "title": "" }, { "docid": "38f1cea354d28a237fa400311b14d006", "score": "0.5942484", "text": "public function getRemovedSupplyChannels();", "title": "" }, { "docid": "e96a5338809da2b2a6f345df92ca1e49", "score": "0.593941", "text": "public function getPendingForceClosingChannels()\n {\n return $this->pending_force_closing_channels;\n }", "title": "" }, { "docid": "ee649ee402c9875ee62ad4099ae6f024", "score": "0.59301424", "text": "public function getChannel();", "title": "" }, { "docid": "ee649ee402c9875ee62ad4099ae6f024", "score": "0.59301424", "text": "public function getChannel();", "title": "" }, { "docid": "9e8592c275a3790d90ef05d4911d7397", "score": "0.592772", "text": "public function broadcastOn()\n {\n $channels = ['User.'.$this->User->id];\n\n return $channels;\n }", "title": "" }, { "docid": "ee70c7bb3badf3774a059b4197d9bcf0", "score": "0.5896299", "text": "public function getDelivery()\n {\n return $this->delivery;\n }", "title": "" }, { "docid": "ee70c7bb3badf3774a059b4197d9bcf0", "score": "0.5896299", "text": "public function getDelivery()\n {\n return $this->delivery;\n }", "title": "" }, { "docid": "83166f0f1d3c9cc6dd4e8c5eb10dd121", "score": "0.5889783", "text": "public function findChannels(): array;", "title": "" }, { "docid": "dcd03ea9cd03b587fe2c425cf898269d", "score": "0.5876184", "text": "public function broadcastWith(): array\n {\n return $this->notification;\n }", "title": "" }, { "docid": "4d26190d63a40a01dd4227d27c87e994", "score": "0.5848735", "text": "public function getChannel()\n {\n return $this->_channel;\n }", "title": "" }, { "docid": "0a1b2f81f28f700af81250f020740ab0", "score": "0.58480245", "text": "public function via($notifiable)\n {\n return [\n $this->verification->canISendMail() ? SendGridChannel::class: null,\n ];\n }", "title": "" }, { "docid": "3351d89c365cfa925a707f1927ac5eb8", "score": "0.5837918", "text": "public function via($notifiable)\n {\n return [FcmChannel::class, ApnChannel::class,'mail'];\n }", "title": "" }, { "docid": "3351d89c365cfa925a707f1927ac5eb8", "score": "0.5837918", "text": "public function via($notifiable)\n {\n return [FcmChannel::class, ApnChannel::class,'mail'];\n }", "title": "" }, { "docid": "fdb77d466406f15f6b0115527d5d6c16", "score": "0.5818558", "text": "private function _getAllDealerChannel()\n {\n $result = $this->channel->getAll();\n $data = [\n '0' => '(none)',\n ];\n \n foreach ($result as $item)\n {\n $data[$item->ID] = $item->name;\n }\n \n return $data;\n }", "title": "" }, { "docid": "8281cc641e097bc13314a62370c0432a", "score": "0.5818459", "text": "public function via($notifiable)\n {\n if (isset($this->project->team_channel)) {\n return $this->project->getChannelArray(1);\n } else {\n return ['database'];\n }\n }", "title": "" }, { "docid": "f9a795a362a67e5d283c3b7aa171d69c", "score": "0.58170897", "text": "public function via($notifiable)\n {\n return [GovukNotifyChannel::class];\n }", "title": "" }, { "docid": "1d60fd243d0bbd41e82f69dc5c194f1d", "score": "0.58124703", "text": "function getSmsChannel()\n {\n $provider = config('notifications.defaults.sms');\n return config(\"notifications.drivers.sms.$provider.channel\", 'nexmo');\n }", "title": "" }, { "docid": "212feb40551c0f23f084dd412682044b", "score": "0.5791", "text": "public function getDeliveries()\n {\n if (is_null($this->deliveries)) {\n /** @psalm-var ?list<stdClass> $data */\n $data = $this->raw(self::FIELD_DELIVERIES);\n if (is_null($data)) {\n return null;\n }\n $this->deliveries = DeliveryDraftCollection::fromArray($data);\n }\n\n return $this->deliveries;\n }", "title": "" }, { "docid": "cc431c5d762decfebd0feb848325f5c6", "score": "0.57889146", "text": "public function getChannel() {\n return $this->_channel;\n }", "title": "" }, { "docid": "d4ec8d56e9b5a2046e4aaf2c865dba22", "score": "0.57879245", "text": "public function getConfigChannels() {\n $path = 'payment/hypercharge_mobile/channels';\n $channels = explode(\"\\n\", Mage::getStoreConfig($path));\n if (count($channels) < 1)\n return;\n\n $hypercharge_channels = array();\n foreach ($channels as $ch) {\n $pieces = explode('|', $ch);\n if (count($pieces) != 4)\n continue;\n $hypercharge_channels[trim($pieces[0])] = array(\n 'login' => trim($pieces[1]),\n 'pass' => trim($pieces[2]),\n 'channel' => trim($pieces[3])\n );\n }\n unset($pieces, $channels);\n\n return $hypercharge_channels;\n }", "title": "" }, { "docid": "dfc603480118b2bd6ba57e47432029c8", "score": "0.5786768", "text": "public function getChannel()\n {\n return $this->channel;\n }", "title": "" }, { "docid": "dfc603480118b2bd6ba57e47432029c8", "score": "0.5786768", "text": "public function getChannel()\n {\n return $this->channel;\n }", "title": "" }, { "docid": "7307282a63c01e6f2a34cdc371564edb", "score": "0.57847327", "text": "public function via($notifiable)\n {\n return [ChatworkChannel::class];\n }", "title": "" }, { "docid": "e64f0f5af4ed462ec0bb79c10f9583b9", "score": "0.5773768", "text": "public function getDeliveryDays(): array\n {\n $deliveryDays = Arr::where($this->toArray(), function ($value, $key) {\n return in_array($key, WeekDays::getConstants()) && $value == 1;\n });\n return array_keys($deliveryDays);\n }", "title": "" }, { "docid": "19ceb63134cb0c17fb6088622db6e584", "score": "0.57701296", "text": "public function via($notifiable)\n {\n return [\n HubtelChannel::class,\n ];\n }", "title": "" }, { "docid": "8f812525b7290cd4824893a1a4633b6b", "score": "0.57561386", "text": "public function getDeliveryCharges() {\n return $this->_get('delivery_charges');\n }", "title": "" }, { "docid": "8f5e1d7372a88ed65b415599d75f0114", "score": "0.57547504", "text": "public function broadcastOn()\n {\n $channel = 'update-status-' . md5($this->email);\n return [$channel];\n }", "title": "" }, { "docid": "93f00851ae7a29bbc626b7022654cd2b", "score": "0.5745656", "text": "public function broadcastOn(): array\n {\n return [\n new PrivateChannel('channel-name'),\n ];\n }", "title": "" }, { "docid": "69fe349b59fd05330c04c29ef2095d7e", "score": "0.5736432", "text": "public function via($notifiable) : array\n {\n return [PayServiceChannel::class];\n }", "title": "" }, { "docid": "1c618b2d4124788f38cab2e399c7c72d", "score": "0.5733513", "text": "public function getAllConfigChannels() {\n $path = 'payment/hypercharge_mobile/channels';\n $channels = explode(\"\\n\", Mage::getStoreConfig($path));\n if (count($channels) < 1)\n return;\n\n $hypercharge_channels = array();\n foreach ($channels as $ch) {\n $pieces = explode('|', $ch);\n if (count($pieces) != 4)\n continue;\n $hypercharge_channels[] = array(\n 'login' => trim($pieces[1]),\n 'pass' => trim($pieces[2]),\n 'channel' => trim($pieces[3]),\n 'currency' => trim($pieces[0])\n );\n }\n unset($pieces, $channels);\n\n return $hypercharge_channels;\n }", "title": "" }, { "docid": "f04e4a71338a791e0a6ee4feb9f6475c", "score": "0.57291096", "text": "public function setDeliveryChannels($value)\n {\n $this->setProperty(\"DeliveryChannels\", $value, true);\n }", "title": "" }, { "docid": "a970df8348e2734806a0efffcdb4141a", "score": "0.5728877", "text": "public function getChannel()\n\t{\n\t\treturn $this->channel;\n\t}", "title": "" }, { "docid": "f97da683068a00bf3b4ac47f33429b10", "score": "0.56769675", "text": "public function getChannel() {\n\t\treturn $this->channel;\n\t}", "title": "" }, { "docid": "d2d7e55a119594103f9ddeda1f487601", "score": "0.5675858", "text": "public function getChannel()\n {\n \treturn Mage::registry(Faett_Channel_Model_Channel::REGISTRY);\n }", "title": "" }, { "docid": "81e8c34e69b767769b477f17f0c4d8f8", "score": "0.56670713", "text": "public function broadcastOn()\n {\n return new Channel('notification.'.$this->id);\n }", "title": "" }, { "docid": "ac314369e27bb3a0f8462983fffa6bcd", "score": "0.5650161", "text": "public static function getChannels($config = []): array\n {\n $channels = [];\n if (empty($config['channels'])) {\n $channels[] = static::getChannel();\n return $channels;\n }\n\n foreach ($config['channels'] as $channel) {\n $channels[] = ($channel instanceof Channel) ? $channel : static::getChannel($channel);\n }\n\n return $channels;\n }", "title": "" }, { "docid": "dfbd342a6cd8b7395ddf635e64419ed1", "score": "0.5646019", "text": "public function getNotifications()\n {\n return $this->notifications;\n }", "title": "" }, { "docid": "dfbd342a6cd8b7395ddf635e64419ed1", "score": "0.5646019", "text": "public function getNotifications()\n {\n return $this->notifications;\n }", "title": "" }, { "docid": "b79d5bf778888f4be9b737bc78e83c2c", "score": "0.5625398", "text": "public function getChannel()\n {\n return $this->getKey('Channel');\n }", "title": "" }, { "docid": "b870ff9d47efde62a8c6703e631618a8", "score": "0.56067467", "text": "public function getNotifications() {\n return $this->_notifications;\n }", "title": "" }, { "docid": "3b7afcda8cf2fccb9d6ea3a452bd60d6", "score": "0.55982435", "text": "public function via($notifiable)\n {\n return [\n TwilioChannel::class,\n ];\n }", "title": "" }, { "docid": "90a2d9aa7a931b0e026429801d756f28", "score": "0.5589112", "text": "public function containsDeliveryKey()\n\t{\n\t\t$keys = $this->getEntryItems()\n\t\t->pluck('messaging')\n\t\t->first()\n\t\t->first()\n\t\t->keys()\n\t\t->contains('delivery'); \n\n\t\treturn $keys;\n\t}", "title": "" }, { "docid": "1f38c4438243900a2b573a696976cad9", "score": "0.5588662", "text": "public function via($notifiable)\n {\n return [SocketChannel::class];\n }", "title": "" }, { "docid": "7a317db00bdff452cbabdfe4461b35a7", "score": "0.55881107", "text": "public function createdChannels()\n {\n return $this->hasMany(Channel::class, 'created_by')\n ->withoutGlobalScope(ChannelScope::class);\n }", "title": "" }, { "docid": "99d48aa7a6052c9e5bf429f66f192fae", "score": "0.5577889", "text": "public function channel()\n {\n return $this->channel;\n }", "title": "" }, { "docid": "2dffc0838916cd31163e1027dabac0c8", "score": "0.5544159", "text": "public function via($notifiable)\n {\n return [OneSignalChannel::class];\n }", "title": "" }, { "docid": "2dffc0838916cd31163e1027dabac0c8", "score": "0.5544159", "text": "public function via($notifiable)\n {\n return [OneSignalChannel::class];\n }", "title": "" }, { "docid": "aa874541b095ce6841f409f50ff60a26", "score": "0.5539378", "text": "public static function getDrivers()\n {\n //Method inherited from \\Illuminate\\Support\\Manager \n return \\Illuminate\\Notifications\\ChannelManager::getDrivers();\n }", "title": "" }, { "docid": "727517c962c6914970b03bab39da15f1", "score": "0.5536907", "text": "public function getRemovedSupplyChannels()\n {\n return $this->removedSupplyChannels;\n }", "title": "" }, { "docid": "33248c3801c711081eb35cc41b524d60", "score": "0.5536224", "text": "public function getChannel(): string\n {\n return $this->channel;\n }", "title": "" }, { "docid": "74f6f78ed0c330d5e0739e0c17afbe3e", "score": "0.55345166", "text": "public function via($notifiable)\n {\n return [TwilioChannel::class];\n }", "title": "" }, { "docid": "210aab1bfeb01b862d242732c20cec63", "score": "0.55332834", "text": "public function channel()\n\t{\n\t\treturn $this->_channel;\n\t}", "title": "" }, { "docid": "b15e5077fdae1439ea04f018686d4fe1", "score": "0.55235016", "text": "public function channel()\n\t{\n\t\treturn $this->channel;\n\t}", "title": "" }, { "docid": "1a2e99a629c76b3780740c360fa67da4", "score": "0.5518658", "text": "public function broadcastOn()\n {\n // return new PrivateChannel(\"task.{$this->task->id}\");\n return ['my-channel'];\n }", "title": "" }, { "docid": "4c2b212b9e1cff255d5f7088d01a6b79", "score": "0.5510395", "text": "public function getSupplyChannels()\n {\n if (is_null($this->supplyChannels)) {\n /** @psalm-var ?list<stdClass> $data */\n $data = $this->raw(self::FIELD_SUPPLY_CHANNELS);\n if (is_null($data)) {\n return null;\n }\n $this->supplyChannels = ChannelReferenceCollection::fromArray($data);\n }\n\n return $this->supplyChannels;\n }", "title": "" }, { "docid": "0d775523136d1c544936e4db36c5b173", "score": "0.5508395", "text": "public function routeNotificationForDiscord()\n {\n return config('discord.channels.notices');\n }", "title": "" }, { "docid": "9b67773c10512165371541a97d78a415", "score": "0.55056584", "text": "function get_all_channels() {\n $db = Database::instance()->db();\n\n $stmt = $db->prepare('SELECT channel.id, channel.name, channel.image\n FROM channel\n ORDER BY channel.name');\n\n $stmt->execute();\n\n $subscribed_channels = $stmt->fetchAll(PDO::FETCH_OBJ);\n return $subscribed_channels;\n }", "title": "" }, { "docid": "0fa341e4b5cebc5453bc3f5c043ad356", "score": "0.55025744", "text": "public function via($notifiable)\n {\n return [TelegramChannel::class];\n }", "title": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "212553644a38484bcd1130c3666a4df3", "score": "0.0", "text": "public function destroy($id)\n {\n $instruction = SmInstruction::destroy($id);\n if($instruction){\n return redirect('assign-vehicle')->with('message-success-delete', 'Instruction has been deleted successfully');\n }else{\n return redirect()->back()->with('message-danger-delete', 'Something went wrong, please try again');\n }\n }", "title": "" } ]
[ { "docid": "f1aaf41a7156fa1ddfcdb965f9ec5b59", "score": "0.77682966", "text": "public function remove($resource)\n {\n if($this->exist($resource)){\n unset($this->resources[$resource]);\n }\n }", "title": "" }, { "docid": "8b628383b34d63dd0eb00f58ca93193b", "score": "0.703237", "text": "public static function deleteResource($resource)\n {\n $resourceKey = self::getResourceKey($resource);\n unset(self::$resource_registry[$resourceKey]);\n }", "title": "" }, { "docid": "4227c47fa6415b99ac7ad79261ad7226", "score": "0.6690498", "text": "public function removeResource(AbstractResourceFile $resource) {\n if (parent::offsetExists($resource->getMemberId())) {\n parent::offsetUnset($resource->getMemberId());\n }\n }", "title": "" }, { "docid": "cba9c3b5928674c49645b80c060a27ee", "score": "0.66900694", "text": "public function deleted(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "d9f10892d48fdfd7debb2a97681f0912", "score": "0.6659381", "text": "public function destroy(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "503409da4f5b9a20ee18f568cabc837e", "score": "0.6578654", "text": "protected function deleteResource($resource) {\n $translator = $this->i18n->getTranslator($resource['locale']);\n $translator->setTranslation($resource['key'], null);\n }", "title": "" }, { "docid": "104d6984e581161b647cdf9206aaa4be", "score": "0.65266734", "text": "public function delete($storage_name);", "title": "" }, { "docid": "e8e36bc4035715e1553386a49c3dd64a", "score": "0.64323646", "text": "final protected function remove($resource)\n {\n // Initilize the request as post\n $this->init('delete', $resource);\n\n // Make the request using guzzle\n return $this->call();\n }", "title": "" }, { "docid": "fa011b24954b422bb6ebfc09cdafce74", "score": "0.64162064", "text": "public function unpublishResource(PersistentResource $resource)\n {\n try {\n $objectName = $this->keyPrefix . $this->getRelativePublicationPathAndFilename($resource);\n $this->getCurrentBucket()->object($objectName)->delete();\n $this->systemLogger->log(sprintf('Successfully unpublished resource as object \"%s\" (MD5: %s) from bucket \"%s\"', $objectName, $resource->getMd5() ?: 'unknown', $this->bucketName), LOG_DEBUG);\n } catch (NotFoundException $e) {\n }\n }", "title": "" }, { "docid": "628a4d244227d2089465337bd866ab72", "score": "0.634412", "text": "public function delete() {\n\n // Does the Resource object have an ID?\n if ( is_null( $this->id ) ) trigger_error ( \"Resource::delete(): Attempt to delete an Resource object that does not have its ID property set.\", E_USER_ERROR );\n\n // Delete the Resource\n $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\n $st = $conn->prepare ( \"DELETE FROM resource WHERE id = :id LIMIT 1\" );\n $st->bindValue( \":id\", $this->id, PDO::PARAM_INT );\n $st->execute();\n $conn = null;\n }", "title": "" }, { "docid": "2e3daccb9b7f61db1ba5db127ae75245", "score": "0.63187486", "text": "private static function deleteResourceAndUsage( $resource ) {\n $dbw = wfGetDB( DB_PRIMARY );\n $dbw -> delete('edusharing_resource', array( 'EDUSHARING_RESOURCE_ID = ' . $resource->EDUSHARING_RESOURCE_ID ), $fname = 'Database::delete');\n\n $postData = new stdClass ();\n $postData->nodeId = str_replace(\"ccrep://local/\",\"\",$resource->EDUSHARING_RESOURCE_OBJECT_URL);\n $postData->usageId = $resource->EDUSHARING_RESOURCE_USAGE;\n\n // delete usage from repo\n $eduService = new EduSharingService();\n $eduService -> deleteUsage( $postData );\n }", "title": "" }, { "docid": "7c8424d31eaa624067dc5241abfb9372", "score": "0.6257354", "text": "public function deleteStorage($storageId);", "title": "" }, { "docid": "4266f43d7f511bcf14d6ed4a63e0608f", "score": "0.6230025", "text": "public function delete($resource) {\n\t\t\t\n\t\t$url = $this->_path . '/api/v2' . $resource;\n\t\t\n\t\t$curl = curl_init();\n\t\tcurl_setopt($curl, CURLOPT_URL, $url);\n\t\tcurl_setopt($curl, CURLOPT_HTTPHEADER, $this->_headers);\n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($curl, CURLOPT_VERBOSE, 1);\n\t\tcurl_setopt($curl, CURLOPT_HEADER, 1);\n\t\tcurl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n\t\tcurl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n\t\t$response = curl_exec($curl);\n\t\t$http_status = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n\t\t$header_size = curl_getinfo($curl, CURLINFO_HEADER_SIZE);\n\t\t$headers = substr($response, 0, $header_size);\n\t\t$body = substr($response, $header_size);\n\t\tself::http_parse_headers($headers);\t \n\t\tcurl_close ($curl);\n\t\tif ($http_status == 204) {\n\t \treturn $http_status . ' DELETED';\n\t\t } else {\n\t\t \t$this->error($body, $url, null, 'DELETE');\n\t\t }\n\t}", "title": "" }, { "docid": "71cdf2c8771b0884ed0346cbff1672a0", "score": "0.62021154", "text": "abstract protected function destroyResource(): void;", "title": "" }, { "docid": "174b3cc2502c8f8c88a91296ed95d437", "score": "0.61883366", "text": "public function delete($resource) {\n\t\t\t\n\t\t$url = 'https://api.bigcommerce.com/stores/' . $this->_hash . '/v2/' . $resource;\n\t\t\n\t\tcurl_setopt($this->_curl, CURLOPT_URL, $url);\n\t\tcurl_setopt($this->_curl, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n\t\t$response = curl_exec($curl);\n\t\t$http_status = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n\t\t$header_size = curl_getinfo($curl, CURLINFO_HEADER_SIZE);\n\t\t$headers = substr($response, 0, $header_size);\n\t\t$body = substr($response, $header_size);\n\t\t$headersArray = self::http_parse_headers($headers);\n\t\tif (! $this->rate_limit($headersArray) && $this->retries < self::RETRY_ATTEMPTS) {\n\t\t\t$this->retries = $this->retries + 1;\n\t\t\treturn $this->delete($resource);\n\t\t}\t \n\t\tcurl_close ($curl);\n\t\tif ($http_status == 204) {\n\t \treturn $http_status . ' DELETED';\n\t\t } else {\n\t\t \t$this->error($body, $url, null, 'DELETE');\n\t\t }\n\t}", "title": "" }, { "docid": "04ec0c72a529ea888ebec978b8312735", "score": "0.6156356", "text": "public function deleteFromStorage()\n {\n //Original\n if(file_exists(public_path($this->url))){\n File::delete(public_path($this->url));\n }\n\n //Thumbnail\n if(file_exists(public_path($this->thumb_url))){\n File::delete(public_path($this->thumb_url));\n }\n }", "title": "" }, { "docid": "2f47947186448448aa034e3f635016f3", "score": "0.61315197", "text": "public function removeApiResource($resource)\n {\n $index = array_search($resource, $this->apiResources);\n if ($index !== false) {\n unset($this->apiResources[$index]);\n // reindex this array to be sequential zero-based.\n $this->apiResources = array_values($this->apiResources);\n }\n }", "title": "" }, { "docid": "e0c513c82c944008d275fc6f457afb42", "score": "0.6123187", "text": "public function forceDeleted(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "347ab67e3e18ac392ded1095e453fdae", "score": "0.61123997", "text": "public function removeResource(string $resource): ?bool {\r\n\r\n //Check if resource exists\r\n if(true === isset($this -> resources[$resource])) {\r\n\r\n unset($this -> resources[$resource]);\r\n return true;\r\n }\r\n\r\n return null;\r\n }", "title": "" }, { "docid": "f1df46e2c5dfa855b0aae2241e47a742", "score": "0.60987437", "text": "public function destroy($id)\n {\n $entry = Storage::findOrFail($id);\n\n $entry->delete();\n\n return redirect('/storages');\n }", "title": "" }, { "docid": "7caa54c56a26f9c25867bf3b317a8b05", "score": "0.6078726", "text": "public function removeResource($key) {\r\n\t\tif (isset($this->resources[$key]))\r\n\t\t\tunset($this->resources[$key]);\r\n\t}", "title": "" }, { "docid": "4ee6a6c61b47a02140107fbd844ed2bb", "score": "0.6063936", "text": "public function removeResource($resource)\n\t{\n\t\t$this->needResource($resource);\n\n\t\t$parent = $this->resources[$resource]['parent'];\n\t\tif ($parent !== NULL) {\n\t\t\tunset($this->resources[$parent]['children'][$resource]);\n\t\t}\n\n\t\t$removed = array($resource);\n\t\tforeach ($this->resources[$resource]['children'] as $child => $foo) {\n\t\t\t$this->removeResource($child);\n\t\t\t$removed[] = $child;\n\t\t}\n\n\t\tforeach ($removed as $resourceRemoved) {\n\t\t\tforeach ($this->rules['byResource'] as $resourceCurrent => $rules) {\n\t\t\t\tif ($resourceRemoved === $resourceCurrent) {\n\t\t\t\t\tunset($this->rules['byResource'][$resourceCurrent]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tunset($this->resources[$resource]);\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "1a7799a3edae94b9a12c008d1d703c57", "score": "0.59831214", "text": "public function deleteStorageService($name);", "title": "" }, { "docid": "1a7799a3edae94b9a12c008d1d703c57", "score": "0.59831214", "text": "public function deleteStorageService($name);", "title": "" }, { "docid": "6916dd8c1d60603bcf3ae4bd18d41a83", "score": "0.5977718", "text": "public function removeResource($resource)\n {\n $acl = $this->_getAcl();\n $acl->remove($resource);\n $this->_setAcl($acl);\n\n return $this;\n }", "title": "" }, { "docid": "f23ad90184663348cc9db3cf44d0b0a5", "score": "0.595982", "text": "public function destroy(Resource $resource)\n {\n //\n\t\t\t\treturn response()->json([\n\t\t\t\t\t'destroyed'=>$resource->delete()\n\t\t\t\t]);\n }", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.59337646", "text": "public function remove($path);", "title": "" }, { "docid": "ef4a1685667d21fcb638df892463f9c8", "score": "0.59317005", "text": "public function destroy($id)\n {\n $supplier = Supplier::where('id',$id)->first();\n $photo = $supplier->image;\n if($photo){\n unlink($photo);\n $supplier->delete();\n }else{\n $supplier->delete();\n }\n }", "title": "" }, { "docid": "78f3fcb6a4df88ba8ea45797087a7e8d", "score": "0.59121597", "text": "public function remove($entity);", "title": "" }, { "docid": "78f3fcb6a4df88ba8ea45797087a7e8d", "score": "0.59121597", "text": "public function remove($entity);", "title": "" }, { "docid": "d9a8a2179bed321de0122e8cff40c63a", "score": "0.5906186", "text": "public function remove($storageKey)\n {\n $path = $this->getImagePath((string) $storageKey);\n @unlink($path);\n }", "title": "" }, { "docid": "39b14dd177c56742d793fa231de87204", "score": "0.5899593", "text": "public function remove()\n {\n unlink($this->uploadDir . $this->nomenovo);\n\n parent::remove();\n }", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "e03265a289855852afd2372dcb1d8daa", "score": "0.58933157", "text": "public function remove($path, $hard = false);", "title": "" }, { "docid": "aad5350294ac8f905383132f720b1be8", "score": "0.588305", "text": "public function delete($resource, $arOptions);", "title": "" }, { "docid": "d6fae5ff4be2ba960f6582fc42fd3676", "score": "0.5868486", "text": "public function remove() {\n if (file_exists($this->location))\n unlink($this->location);\n parent::remove();\n }", "title": "" }, { "docid": "77eb36c589be56f3f633dc84debdce8a", "score": "0.5864072", "text": "public function clearStorage(): void;", "title": "" }, { "docid": "7e7b93a0bfbbefcf0448e892241c5a20", "score": "0.585261", "text": "public function remove($name)\n {\n if (isset($this->storage[$name])) {\n unset($this->storage[$name]);\n }\n }", "title": "" }, { "docid": "3ca22b7764fa3b3a6a94edbeb0b0d64f", "score": "0.585028", "text": "public function clear()\n {\n if (file_exists($this->storageFile)) {\n unlink($this->storageFile);\n }\n }", "title": "" }, { "docid": "41603163cf71ae1b28de95896f8297c6", "score": "0.58502716", "text": "public function destroy($id)\n {\n $this->authorize('delete', $this->resource->getModel()->find($id));\n\n if (in_array($this->module->getName(), config('resource_lock'))) {\n\t $this->unlock($id);\n\t }\n\n $this->resource->delete($id);\n }", "title": "" }, { "docid": "1486c0df76f6bc31a817da2f80eb3546", "score": "0.5835488", "text": "public function deleteResourceById($id)\n {\n $resource = $this->getRecordById($id);\n\n if (isset($resource->id)) {\n //Delete record from id\n $this->delete(array('id = ?' => $id));\n\n //Delete files\n if (!empty($this->uploadedFiles)) {\n foreach ($this->uploadedFiles as $colName => $location) {\n if (!empty($resource->$colName)) {\n $fileName = $location . $resource->$colName;\n\n if (is_file($fileName)) {\n unlink($fileName);\n }\n }\n }\n }\n }\n }", "title": "" }, { "docid": "83da6d00e9ec003d7115d52e8eaed9e7", "score": "0.5812055", "text": "public function del($path);", "title": "" }, { "docid": "bbd4fbeb169cce49dbdee4fcf4da3308", "score": "0.576368", "text": "public function destroy(Storage $storage)\n {\n //\n }", "title": "" }, { "docid": "5446b650450a069ded319874becfacf8", "score": "0.5749654", "text": "public function destroy($id)\n {\n $prestamo = Prestamo::where('id', $id)->first();\n $photo = $prestamo->image;\n if ($photo) {\n unlink($photo);\n $prestamo->delete();\n } else {\n $prestamo->delete();\n }\n }", "title": "" }, { "docid": "80dea14a08ed690bb6c0e40f9adf7b93", "score": "0.5730856", "text": "public function destroy($id)\n {\n $item=Item::find($id);\n //delete related file from storage\n $item->delete();\n return redirect()->route('items.index');\n }", "title": "" }, { "docid": "223830251a63efdf7921b31d2cb714b9", "score": "0.57265943", "text": "public function remove(string $path): void;", "title": "" }, { "docid": "afcc6695c26fa480351516ff52f20881", "score": "0.5723434", "text": "public function destroy($id)\n {\n $photo = Photo::find($id);\n if(file_exists(basename($photo->thumpnail_url))){\n unlink(\"storage/thumbnail/\". basename($photo->thumbnail_url));\n }\n if(file_exists(basename($photo->photo_url))){\n unlink(\"storage/slider/\". basename($photo->photo_url));\n } \n $photo->delete(); \n\n return redirect('/admin/photo/show');\n }", "title": "" }, { "docid": "e1196ae52794e4b5c86db7a7fa85b63b", "score": "0.5721902", "text": "public function destroy($id)\n {\n $image = Image::where('name','like','%'.$id.'%')->first();\n Storage::disk('spaces')->delete($image->location);\n $image->delete();\n }", "title": "" }, { "docid": "7b06ca498cebb34097bee47d0def61eb", "score": "0.5718601", "text": "public function delete() {\n if (unlink($this->fullPath)) {\n $this->fullPath = '';\n $this->mimeType = '';\n $this->simpleName = '';\n $this->size = 0;\n } else {\n throw new Exception('Check write Access to delete file!');\n }\n }", "title": "" }, { "docid": "e8717e0d91da860445a846b6f0ff4c6e", "score": "0.5717918", "text": "public function delete($uri) {\n return $this->filesystem->unlink($uri);\n }", "title": "" }, { "docid": "b86ae32c63f3ca7d52497df28e9fc6c7", "score": "0.5715146", "text": "public function remove(string $path): self;", "title": "" }, { "docid": "d88570650ee0cd02f602031e7809a9e1", "score": "0.569391", "text": "public function destroy(ResourceCreator $listener, $resourceId);", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "e5d47a80a17edd9d97460e8002cc40a1", "score": "0.56822425", "text": "public function destroy($id)\n {\n try {\n $req = Req::find($id);\n\n foreach (json_decode($req->images) as $img){\n @unlink('storage/' . $img);\n }\n\n $req->delete();\n return response()->json([\n 'success' => 'Record deleted successfully!'\n ]);\n } catch (\\Exception $e) {\n return redirect()->back()->with('error', 'Error Try Again !!');\n }\n }", "title": "" }, { "docid": "69eb53cf8ca11222913b106ef117d68e", "score": "0.5679363", "text": "public function delete() {\n\t\t$this->checkWritePermission(true);\n\t\t$file = \\GO\\Files\\Model\\File::model()->findByPath($this->relpath);\n\t\t$file->delete();\n\t}", "title": "" }, { "docid": "c4f845a8d7bbb2425211bda284218817", "score": "0.56762695", "text": "function destroy() {\n\t\tunlink($this->get_file_name());\n\t\tself::remove_from_cache($this);\n\t}", "title": "" }, { "docid": "f62dc86d2fbee3e234695c789eabb485", "score": "0.5661866", "text": "public function destroy($id)\n {\n $student = Student::find($id);\n\n/* if($student->avatar)\n {\n unlink($student->avatar);\n }*/\n $student->delete();\n\n return redirect('students/')->with('success' , 'Data has been deleted');\n }", "title": "" }, { "docid": "c063d4508937e69e31d325da727fad68", "score": "0.56615514", "text": "public function unlink($filename) {\n $filename = $this->normalizePath($filename, NULL, FALSE);\n $filename_write = $this->toWritePath($filename);\n $this->writeOps->unlink($filename_write);\n if ($this->readOps instanceof ClearStatCacheInterface) {\n $this->readOps->clearstatcache($filename);\n }\n }", "title": "" }, { "docid": "7603d1c91a07e1809908a024215c7ff9", "score": "0.5659815", "text": "public function destroy($id)\n {\n $model= Model::findOrFail($id);\n $model->delete();\n\n $name = $model->image;\n File::delete(public_path().'/storage/'.$name);\n File::delete(public_path().'/storage/'.'thumb_'.$name);\n\n Alert::success('Model ' . $model->name . ' fue eliminada');\n return redirect()->route('models.index');\n }", "title": "" }, { "docid": "16edf2c6b79eca832eb0c092ab2f3f24", "score": "0.5649448", "text": "public function removeUpload()\r\n{\r\n if ($file = $this->getAbsolutePath()) {\r\n unlink($file); \r\n }\r\n}", "title": "" }, { "docid": "ca16d50e4d4e2ae00c79d72d63ee1f86", "score": "0.56463283", "text": "public function destroy($id)\n {\n\n $product = Product::findOrFail($id);\n if($product->photo){\n unlink( public_path() . $product->photo->path);\n }\n $product->delete();\n return redirect('productmodule/product')->with('message' ,\"Product Deleted Successfully\");\n\n// if ($product->delete()){\n// return new ProductResource($product);\n// }\n }", "title": "" }, { "docid": "a3a38b27322f5033d7e5049f50adbc03", "score": "0.5645099", "text": "public function unlink($uri, $context = NULL);", "title": "" }, { "docid": "0bc5c9101341c52f6ddc40571b9f9b66", "score": "0.5642073", "text": "public static function delete($image){\n if(!empty($image)){\n $image = str_replace('storage/', 'public/', $image);\n Storage::delete($image);\n }\n }", "title": "" }, { "docid": "be8b1d58278cafac500d99e1d8bf4e7c", "score": "0.56408733", "text": "public function delete()\n {\n self::getPersistenceDriver()->deleteOne($this->data);\n }", "title": "" }, { "docid": "2827a1d4696a95ab9b5d963d5f620b35", "score": "0.56362814", "text": "public function delete() {\n if (!isset($this->currentUser)) {\n throw new Exception(\"Not in session. Editing users requires login\");\n }\n if ($this->currentUser->getUser_type()!=usertype::Administrator){\n throw new Exception(\"Not valid user. Editing resource requires Administrator\");\n }\n\n // Get the user object from the database\n $idresource = $_REQUEST[\"idresource\"];\n $resource = $this->resourceMapper->findById($idresource);\n\n // Does the user exist?\n if ($resource == NULL) {\n throw new Exception(\"no such resource with id: \".$idresource);\n }\n\n // Delete the user object from the database\n $this->resourceMapper->delete($resource);\n\n\n $this->view->setFlash(sprintf(i18n(\"Resource successfully deleted.\"),$resource->getIdresource()));\n\n $this->view->redirect(\"resources\", \"index\");\n\n }", "title": "" }, { "docid": "5109ebc26960086f990edb39768f4e00", "score": "0.5635025", "text": "public function destroy($id)\n {\n unlink('.'.item::find($id)->img);\n item::destroy($id);\n Session::flash('warning','Item Removido!');\n return redirect()->route('home');\n }", "title": "" }, { "docid": "e56ffdb12b7e8ce9ce9b709dd82f37f7", "score": "0.56325144", "text": "public function removeById($id);", "title": "" }, { "docid": "d29811d1577ed7443199fc1b4276bdd0", "score": "0.56324077", "text": "public function remove($id) {\r\n if ($this->has($id, $this->namespace, self::SCOPE_MEMORY)) {\r\n unset($this->$cache[$this->generateAccessKey($id)]);\r\n }\r\n elseif ($this->has($id, $namespace, self::SCOPE_FILE)) {\r\n \t$filepath = $this->getFilename($this->generateAccessKey($id));\r\n \t@unlink($filepath);\r\n }\r\n }", "title": "" }, { "docid": "62ec0dff73832f5d98bdecee5d10241e", "score": "0.5628287", "text": "public function destroy($ourResource)\n {\n $ourResource= OurResource::Find($ourResource)->firstOrFail();\n $ourResource->delete();\n return redirect(route('ourresource.index'));\n\n }", "title": "" }, { "docid": "e69195d4a9a40721a876716ff49334cc", "score": "0.5625231", "text": "public function destroy($id)\n {\n\n $post = $this->globalvar['model']::find($id);\n $resourceimage = $this->imageresource;\n File::delete($this->globalvar['uploadpath'].'/'.$post->$resourceimage);\n $post->delete();\n\n Session::flash('Success', $this->globalvar['deletionsuccess']);\n return redirect()->route($this->globalvar['routeindex']);\n }", "title": "" }, { "docid": "81b2a149b82ad070a8fc5640c23cb4c5", "score": "0.56235874", "text": "public function deleteResource($resourceId)\n {\n $req = new RESTRequest();\n $data = $req->adminGet('LearningObject/delete/' . $resourceId)->getData();\n return $data;\n }", "title": "" }, { "docid": "3662a98e9c39b3ce43a9446f372faaea", "score": "0.56112725", "text": "public function destroyById($id);", "title": "" }, { "docid": "d19f0dd6eed7e8a8da6c207b4e430532", "score": "0.560789", "text": "public function serverDeleteVideo($resource, $email)\n {\n $resource2 = $resource;\n $path = base_path() . \"\\\\resources\\\\videos\\\\\";\n $path = $path . $email . \"\\\\\";\n\n $dir = @dir($path) or die(\"getFileList: Error abriendo el directorio $path para leerlo\");\n while(($archivo = $dir->read()) !== false) {\n // Obviamos los archivos ocultos\n if($archivo[0] == \".\") continue;\n /*if(is_dir($path . $archivo)) {\n // var_dump($archivo[0]);\n }*/ else if (is_readable($path . $archivo)) {\n \n $file = basename($path . $archivo); \n //echo $file;\n if($file == $resource2){\n unlink($path . $archivo);\n //echo $file;\n $contents = \"Deleted\";\n $response = Response::make($contents, 204);\n $response->header('Content-Type', 'application/json');\n return var_dump($response);\n }\n }\n }\n \n }", "title": "" }, { "docid": "be1aaccbcdec9ba85c660767bd3c39d7", "score": "0.5604081", "text": "public function destroy($id)\n {\n Resource::deleteResource($id);\n }", "title": "" }, { "docid": "b51f394c05cd4f2c03b66fb420214bf9", "score": "0.5596357", "text": "private function removeStoragePath($image)\n {\n $path_attr = $this->path_attr;\n\n Storage::delete($image->$path_attr);\n }", "title": "" }, { "docid": "6fbcf9a59c7f34ed85fd172cdf3d3c38", "score": "0.5595493", "text": "public function remove(){}", "title": "" }, { "docid": "635fc9f7a4a2830c651a29b140289b35", "score": "0.5590984", "text": "public function delete(string $path): void;", "title": "" }, { "docid": "61fba936475c878e54c2ccdf6070fb37", "score": "0.5589317", "text": "public function destroy($id)\n {\n //\n $record = Record::findOrFail($id);\n if($record->photo_id){ \n unlink(public_path() . $record->photo->file);\n }\n $record->delete();\n Session::flash('deleted_record','The record has been deleted');\n return redirect('admin/records');\n }", "title": "" }, { "docid": "e8dc5b1c3960ebd872e6313cb6c5d0a3", "score": "0.55856156", "text": "public function destroy($id)\n\t{\n $modelname = $this->modelname;\n $resource = $modelname::find($id);\n if($resource)\n {\n $resource->delete();\n }\n\t}", "title": "" }, { "docid": "727ad3584e68e2fbd7f4240087aca6cc", "score": "0.5571009", "text": "public function destroy($id)\n {\n $data = Supplier::findOrFail($id);\n $file_path = public_path() . $data->photo;\n if (file_exists($file_path)) {\n try {\n unlink($file_path);\n } catch (Exception $e) {\n // Do Nothing on Exception\n }\n }\n if ($data->delete()) {\n return back()->with([\"success\" => \"Data deleted successfully\"]);\n } else {\n return back()->with([\"error\" => \"Delete process failed\"]);\n }\n }", "title": "" }, { "docid": "5ee1747f20cb5d4c363843da3cc571d2", "score": "0.55688524", "text": "public function destroy($id)\n {\n try {\n \n $photo=Supplier::find($id);\n $location=base_path().'/public/img/supplier/' .$photo->Picture;\n $cc = unlink($location);\n \n Supplier::find($id)->delete(); \n return redirect('/supplier')->with('Data supplier successfully removed .');\n }\n catch(Exception $e) {\n return redirect('/supplier')->with('pesan_gagal', $e->getMessage());\n }\n }", "title": "" }, { "docid": "c70b89412cfa3204082621e98738cb27", "score": "0.5562218", "text": "public function delete()\n\t{\n\t\t$resource_contents = $this->client->query('DELETE', $this->url);\n\t\t$this->initialize_from_resource_contents($resource_contents);\n\t}", "title": "" }, { "docid": "21b9068d98d337440a28121b19231757", "score": "0.5560739", "text": "public function destroy($id)\n {\n $pic = Pic::find($id);\n $path = public_path('/storage/').$pic['name'];\n if(file_exists($path)){\n unlink($path);\n $pic->delete();\n return redirect('pics')->with('success', 'Picture has been successfully deleted');\n }\n else{\n return redirect('pics')->with('failure', 'Picture was not deleted');\n }\n }", "title": "" }, { "docid": "16a6c0a8baa71c1d7233b60b2b1c76f7", "score": "0.5559715", "text": "public function destroy($id)\n {\n $product = Product::find($id);\n $product->delete();\n// Storage::disk('uploads')->delete($product->image_path);\n\n// unlink(public_path('uploads/' . $product->image_path)); //Native php\n return redirect()->route('products.index')->with([\n 'success' => 'product ' . $product->name . ' deleted to trash Successfully'\n ]);\n }", "title": "" }, { "docid": "944f0f53f717617ff54aba9fd9e47542", "score": "0.5556541", "text": "public function destroy($id){\n\n $image = Slider::find($id);\n\n if(unlink(public_path('/images/slider/'.$image->image))){\n $image->delete();\n return back()->with('success', 'Slider Image Deleted');\n }\n }", "title": "" }, { "docid": "120960a561ec9e0438e25d9279c7d899", "score": "0.55498356", "text": "public function destroy($id)\n {\n $deleteSingle = Menu::find($id);\n \nunlink(public_path() . '/menu/' . $deleteSingle->image);\n \n $deleteSingle->delete();\n return redirect('/admin/menu');\n }", "title": "" }, { "docid": "640b23a5dcf07677851e9c4a1dcdabf1", "score": "0.55474347", "text": "public function remove($assetFile);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "2f14aec89d53e310ca8947cee2091f8e", "score": "0.5540011", "text": "public function deleteFromResourceIndices(&$resource) {\n\n if ($this->connector != null) {\n $params = [\n 'index' => \\snac\\Config::$ELASTIC_SEARCH_RESOURCE_INDEX,\n 'id' => $resource->getID()\n ];\n\n $this->logger->addDebug(\"Updated elastic search to remove resource\");\n }\n\n }", "title": "" }, { "docid": "b5b688091a31c75ff8615389051972dc", "score": "0.5539336", "text": "public function delete()\n {\n $this->removeImage();\n parent::delete();\n }", "title": "" }, { "docid": "d0252df7b40416387e377fa297935229", "score": "0.5537589", "text": "public function persistRemove()\n {\n $old = $this->determineName(false);\n if (!isset($old)) return;\n \n $old = new File($this->getPath() . '/' .$old);\n if (file_exists($old)) {\n if ((string)$old != (string)$this->replacement) unlink($old);\n foreach (glob($old->getPath() . '/*.' . $old->getBasename()) as $file) unlink($file);\n }\n }", "title": "" }, { "docid": "d74232efdaa63e7c24cc94cdb786b212", "score": "0.55310154", "text": "public function removeImage(){\r\n\t\t$id = Input::get('id');\r\n\t\t$image = ProductImage::where('id', $id)->pluck('image');\r\n @unlink(PRODUCTS_IMAGE_ROOT_PATH . $image);\r\n\t\tDB::table('product_images')->where('id', '=', $id)->delete();\r\n\t\tdie;\r\n\t}", "title": "" }, { "docid": "05455e5116f6ce487eddc1f096db4ea6", "score": "0.55273694", "text": "public function delete() : Resource {\n try{\n \n $this->method = 'DELETE';\n return $this;\n \n } catch (\\Throwable $t){\n new ErrorTracer($t);\n }\n }", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" } ]
27e4009711348c9295ef10183db92772
retrieve map's objects of map from database
[ { "docid": "f7088fba032e4bcd2b0be522f12566cf", "score": "0.77727234", "text": "public function getMapObjects() {\n\t\t\tglobal $main_db;\n\n\t\t\t$sql = \"SELECT * FROM map_objects WHERE map_id=$this->id\";\n $result = $main_db->get_rows($sql);\n\n\n\t\t\treturn $result;\n\t\t}", "title": "" } ]
[ { "docid": "8935f6c38bf522c93531d83d441f897a", "score": "0.6503848", "text": "function getAllMaps($pdo){\n $sql = 'SELECT name FROM maps';\n return $pdo->query($sql);\n }", "title": "" }, { "docid": "cf96be9531170a9c24348aa66b25b42c", "score": "0.63801634", "text": "public function getResultSetMapping();", "title": "" }, { "docid": "336bdafeec3c9161dc004f6ee3c46e82", "score": "0.63336617", "text": "private function getAllDbObjects() \n\t{\n\t\t\n\t\t$query = \"SELECT * FROM \" . $this->event_table;\n\t\t$result = $this->mysqli->query($query);\n\t\t\n\t\t$objects = array();\n\t\t\n\t\twhile($row = $result->fetch_object()) {\t\t\n\t\t\t$objects[$row->id] = $row;\n\t\t}\n\t\t\n\t\treturn $objects;\n\t}", "title": "" }, { "docid": "9b5e24a9029d3b83e211d32d165b6db4", "score": "0.61968213", "text": "public function getMapList(){\n return $this->_get(2);\n }", "title": "" }, { "docid": "3066bb107db4b331f2b9ceaf6906d52e", "score": "0.61895746", "text": "public function loadMaps(Map $map)\n {\n return DB::table('maps')\n ->join('cities', 'cities.id', '=', 'maps.municipality')\n ->join('barangays', 'barangays.id', '=', 'maps.barangay')\n ->select([\n 'maps.*',\n 'cities.text AS municipality_name',\n 'barangays.text AS barangay_name'\n ])->get();\n }", "title": "" }, { "docid": "d4c63ba902b084febbfaa7a231ba5fe3", "score": "0.61650395", "text": "public static function fetchAll() {\n\n global $db;\n\n $mapper_db = db_unit($db, __CLASS__);\n\n $objects = $mapper_db->fetchAll();\n\n return $objects;\n }", "title": "" }, { "docid": "0b318f71257a534684c6ff55274afa6d", "score": "0.6161157", "text": "public static function getMap()\n {\n return [\n new Entity\\IntegerField(\n 'ID',\n [\n 'primary' => true,\n 'autocomplete' => true,\n 'column_name' => 'ID'\n ]\n ),\n new Entity\\IntegerField(\n 'AUTHOR_ID',\n [\n 'column_name' => 'AUTHOR_ID'\n ]\n ),\n new Entity\\IntegerField(\n 'BOOK_ID',\n [\n 'column_name' => 'BOOK_ID'\n ]\n ),\n ];\n }", "title": "" }, { "docid": "4bd25b76258b56a622d0947d2b78517c", "score": "0.6147698", "text": "public function findByBasesForMap()\n\t{\n\t\t$query = $this->getEntityManager()->createQuery(\"SELECT b.guid, b.name, b.points, b.posx, b.posy, b.archived, u.pseudo\n\t\t\tFROM App:Base b\n\t\t\tJOIN App:User u WITH b.user = u\n\t\t\");\n\t\t\n\t\treturn $query->getResult();\n\t}", "title": "" }, { "docid": "d9b038e4875d32ab96442f7de68307fc", "score": "0.60405755", "text": "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\tnew Main\\Entity\\IntegerField('ID', array(\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t)),\n\t\t\tnew Main\\Entity\\IntegerField('FILE_ID'),\n\t\t\tnew Main\\Entity\\IntegerField('FACE_ID'),\n\t\t\tnew Main\\Entity\\IntegerField('CRM_ID'),\n\t\t\tnew Main\\Entity\\StringField('VK_ID'),\n\t\t\tnew Main\\Entity\\DatetimeField('FIRST_VISIT'),\n\t\t\tnew Main\\Entity\\DatetimeField('PRELAST_VISIT'),\n\t\t\tnew Main\\Entity\\DatetimeField('LAST_VISIT'),\n\t\t\tnew Main\\Entity\\IntegerField('LAST_VISIT_ID'),\n\t\t\tnew Main\\Entity\\IntegerField('VISITS_COUNT'),\n\t\t);\n\t}", "title": "" }, { "docid": "953dad76f8de8b187cced3ce994cbf60", "score": "0.59877163", "text": "function getAllMosquesForMap()\n {\n return $this->createQueryBuilder(\"m\")\n ->leftJoin(\"m.configuration\", \"c\", \"m.id = c.mosque_id\")\n ->select(\"m.slug, m.name, m.address, m.city, m.zipcode, m.country, c.longitude as lng, c.latitude as lat\")\n ->where(\"m.addOnMap = 1\")\n ->andWhere(\"m.type = 'mosque'\")\n ->andWhere(\"c.latitude is not null\")\n ->andWhere(\"c.longitude is not null\")\n ->getQuery()\n ->getArrayResult();\n }", "title": "" }, { "docid": "aaa1155858a44d8ba430f1f205cedff6", "score": "0.5975285", "text": "public function getAllWorldMaps() {\n\t\t\t// Database Connection\n\t\t\t$db\t\t= $GLOBALS['db'];\n\t\t\t// Query\n\t\t\t$return\t= $db->getAllRows_Arr('tb_areamap', 'id, vc_name', \"id_areatype = 4\");\n\t\t\t// Return\n\t\t\treturn $return;\n\t\t}", "title": "" }, { "docid": "cc80c9ce8c3473791986fdab79d36f41", "score": "0.59738153", "text": "private function getMappedSfObjects() {\n // @TODO this probably belongs in a service\n return $this\n ->entityTypeManager()\n ->getStorage('salesforce_mapped_object')\n ->loadByEntity($this->account);\n }", "title": "" }, { "docid": "f3bddf5f86d6f70ee3fccb9290658084", "score": "0.59021866", "text": "public static function getMap()\r\n\t{\r\n\t\treturn array(\r\n\t\t\t'id' => array(\r\n\t\t\t\t'data_type' => 'integer',\r\n\t\t\t\t'primary' => true,\r\n\t\t\t\t'autocomplete' => true,\r\n\t\t\t\t'title' => Loc::getMessage('TABLE_ENTITY_ID_FIELD'),\r\n\t\t\t),\r\n\t\t\t'name' => array(\r\n\t\t\t\t'data_type' => 'text',\r\n\t\t\t\t'required' => true,\r\n\t\t\t\t'title' => Loc::getMessage('TABLE_ENTITY_NAME_FIELD'),\r\n\t\t\t),\r\n\t\t\t'income' => array(\r\n\t\t\t\t'data_type' => 'integer',\r\n\t\t\t\t'required' => true,\r\n\t\t\t\t'title' => Loc::getMessage('TABLE_ENTITY_INCOME_FIELD'),\r\n\t\t\t),\r\n\t\t\t'cost' => array(\r\n\t\t\t\t'data_type' => 'integer',\r\n\t\t\t\t'required' => true,\r\n\t\t\t\t'title' => Loc::getMessage('TABLE_ENTITY_COST_FIELD'),\r\n\t\t\t),\r\n\t\t\t'total_residents' => array(\r\n\t\t\t\t'data_type' => 'integer',\r\n\t\t\t\t'required' => true,\r\n\t\t\t\t'title' => Loc::getMessage('TABLE_ENTITY_TOTAL_RESIDENTS_FIELD'),\r\n\t\t\t),\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "65b72c3d3655e8e6df8fdc57192a30a3", "score": "0.5882622", "text": "public function maps()\n {\n return $this->hasMany('Map');\n }", "title": "" }, { "docid": "8f53f92510a96ec244e8f26e28c44073", "score": "0.5874757", "text": "function jeo_get_map_data($map_id = false) {\r\n\tglobal $jeo;\r\n\treturn $jeo->get_map_data($map_id);\r\n}", "title": "" }, { "docid": "1624ecf8a755e21d601eb8537b527246", "score": "0.5873748", "text": "public function getMapping();", "title": "" }, { "docid": "1624ecf8a755e21d601eb8537b527246", "score": "0.5873748", "text": "public function getMapping();", "title": "" }, { "docid": "949eb62343f10a410dd85c924d25c02f", "score": "0.58330196", "text": "public function getObjects();", "title": "" }, { "docid": "949eb62343f10a410dd85c924d25c02f", "score": "0.58330196", "text": "public function getObjects();", "title": "" }, { "docid": "46e8344ab115c02f4a827678c0abaae4", "score": "0.58160985", "text": "public function getAll()\n {\n return array_values( $this->mapById );\n }", "title": "" }, { "docid": "f5f6921e1d4829fd0d55a1d85399e42a", "score": "0.58134", "text": "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t),\n\t\t\t'USER_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'required' => true\n\t\t\t),\n\t\t\t'USER' => array(\n\t\t\t\t'data_type' => 'Bitrix\\Main\\UserTable',\n\t\t\t\t'reference' => array(\n\t\t\t\t\t'=this.USER_ID' => 'ref.ID'\n\t\t\t\t)\n\t\t\t),\n\t\t\t'DESCRIPTION' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t),\n\t\t\t'AVATAR' => array(\n\t\t\t\t'data_type' => 'integer'\n\t\t\t),\n\t\t\t'POINTS' => array(\n\t\t\t\t'data_type' => 'integer'\n\t\t\t),\n\t\t\t'RANK_ID' => array(\n\t\t\t\t'data_type' => 'integer'\n\t\t\t),\n\t\t\t'NUM_POSTS' => array(\n\t\t\t\t'data_type' => 'integer'\n\t\t\t),\n\t\t\t'INTERESTS' => array(\n\t\t\t\t'data_type' => 'text'\n\t\t\t),\n\t\t\t'LAST_POST' => array(\n\t\t\t\t'data_type' => 'integer'\n\t\t\t),\n\t\t\t'SIGNATURE' => array(\n\t\t\t\t'data_type' => 'string'\n\t\t\t),\n\t\t\t'IP_ADDRESS' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'size' => 255\n\t\t\t),\n\t\t\t'REAL_IP_ADDRESS' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'size' => 255\n\t\t\t),\n\t\t\t'DATE_REG' => array(\n\t\t\t\t'data_type' => 'datetime',\n\t\t\t\t'required' => true,\n\t\t\t\t'default_value' => function(){return new DateTime();}\n\t\t\t),\n\t\t\t'LAST_VISIT' => array(\n\t\t\t\t'data_type' => 'datetime',\n\t\t\t\t'required' => true,\n\t\t\t\t'default_value' => function(){return new DateTime();}\n\t\t\t),\n\t\t\t'ALLOW_POST' => array(\n\t\t\t\t'data_type' => \"boolean\",\n\t\t\t\t'values' => array(\"N\", \"Y\"),\n\t\t\t\t'default_value' => \"Y\"\n\t\t\t),\n\t\t\t'SHOW_NAME' => array(\n\t\t\t\t'data_type' => \"boolean\",\n\t\t\t\t'values' => array(\"N\", \"Y\"),\n\t\t\t\t'default_value' => \"Y\"\n\t\t\t),\n\t\t\t'HIDE_FROM_ONLINE' => array(\n\t\t\t\t'data_type' => \"boolean\",\n\t\t\t\t'values' => array(\"N\", \"Y\"),\n\t\t\t\t'default_value' => \"N\"\n\t\t\t),\n\t\t\t'SUBSC_GROUP_MESSAGE' => array(\n\t\t\t\t'data_type' => \"boolean\",\n\t\t\t\t'values' => array(\"N\", \"Y\"),\n\t\t\t\t'default_value' => \"N\"\n\t\t\t),\n\t\t\t'SUBSC_GET_MY_MESSAGE' => array(\n\t\t\t\t'data_type' => \"boolean\",\n\t\t\t\t'values' => array(\"N\", \"Y\"),\n\t\t\t\t'default_value' => \"Y\"\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "ca0ca12ee16d26a47851470f27633109", "score": "0.5812621", "text": "private function mapObject() {\n\n\n\t\t$this->db = new mysqli('localhost', \"root\", 'mysql', \"salys\");\n\n\t\t// Nustatome koduote\n\t\t$this->db->set_charset(\"utf8\");\n\n\t\t$query = \"SELECT * FROM city\";\n\n\t\t$result = $this->db->query($query);\n\t\tif($result) {\n\t\t\twhile ($row = $result->fetch_assoc()) {\n\t\t\t\t$this->id = $row['id'];\n\t\t\t\t$this->name = $row['name'];\n $this->countryCode = $row['countryCode'];\n $this->istrict = $row['istrict'];\n $this->population = $row['population'];\n\t\t\t}\n\t\t}\n\t\t$Vilnius = new City(\"Vilnius\");\n\n\t\t$Kaunas = new City(\"Kaunas\");\n\n\t}", "title": "" }, { "docid": "edc2b3cdaaec0e47d671fd5dafb6fc9d", "score": "0.58044976", "text": "public function get_map_data()\n {\n // FIXME Does not account for business units!!!\n $out = array();\n $filter = get_machine_group_filter();\n $sql = \"SELECT location.serial_number AS serial_number, latitude, longitude, long_username,\n\t\t\t\t\tcomputer_name\n\t\t\t\tFROM location\n\t\t\t\tLEFT JOIN reportdata USING (serial_number)\n\t\t\t\tLEFT JOIN machine USING (serial_number)\n\t\t\t\t$filter\n\t\t\t\tAND currentstatus = 'Successful'\";\n \n foreach ($this->query($sql) as $obj) {\n $out[] = $obj;\n }\n return $out;\n }", "title": "" }, { "docid": "5d84ac5a58ed6e93defbd2468401b0ce", "score": "0.5803484", "text": "public function getObjectFromTable($object_id) {\n return $this->getGoogleMaps($object_id);\n }", "title": "" }, { "docid": "c6fa8af01c884dc00c69dba973129a4c", "score": "0.5795388", "text": "public function mapMuseums(){\n $museums = $this->getAdapter();\n $select = $museums->select()\n ->from($this->_name, array('museumName', 'lat', 'lon',\n 'id', 'accreditedNumber'));\n return $museums->fetchAll($select);\n }", "title": "" }, { "docid": "e25405253ce5a6e18d486df417da6ca2", "score": "0.57926095", "text": "function find_all(){\n\t\t// and ids set to the value from the id column for teh table defined by the table name\n\t\t//variable\n\t\t// global $db_obj;\n\t\t$db_obj = new DB();\n\t\t\n\t\t$all_objs = array();\n\t\t$sql=\"select \".$this->get_id_colname().\", \";\n\t\t$sql=$sql.$this->get_name_colname();\n\t\t$sql=$sql.\" from \".$this->get_table_name();\n\t\t$db_rows=$db_obj->query($sql);\n\t\tfor ($i=0;$i<sizeof($db_rows);$i=$i+1){\n\t\t\t$next_item= $db_rows[$i];\n\t\t\t$next_obj=new Location();\n\t\t\t$next_obj->set_id($next_item[$this->get_id_colname()]);\n\t\t\t$next_obj->set_name($next_item[$this->get_name_colname()]);\n\t\t\tarray_unshift($all_objs, $next_obj);\n\t\t}\n\t\treturn $all_objs;\n\t}", "title": "" }, { "docid": "2783d41a95bc9d9002253e2ce6501d28", "score": "0.57871515", "text": "function getAllCoordsForMap($pdo, $map_name){\n $sql = 'SELECT mappedx, mappedy FROM ' . $map_name . ' ORDER BY id';\n return $pdo->query($sql);\n }", "title": "" }, { "docid": "276985febd6981d4ff85695e7d279c3f", "score": "0.57796746", "text": "public function get() : array {\n $query = $this->buildQuery('select');\n $res = $this->db->run($query[0], $query[1])->result;\n\n if (empty($this->class)) return $res;\n\n return arr($res)->map(function($item) {\n $cl = $this->class;\n $obj = new $cl($item);\n $this->_addSerializationProperties($obj, $item);\n return $obj;\n });\n }", "title": "" }, { "docid": "eefe52aa7f2bc4b8a20ad831e5519730", "score": "0.5775708", "text": "public static function getMap()\n {\n return array(\n 'ID' => array(\n 'data_type' => 'integer',\n 'primary' => true,\n 'autocomplete' => true,\n ),\n 'USER_ID' => array(\n 'data_type' => 'integer',\n ),\n 'USER' => array(\n 'data_type' => 'Bitrix\\Main\\UserTable',\n 'reference' => array('=this.USER_ID' => 'ref.ID'),\n ),\n 'DATE_SIGNED' => array(\n 'data_type' => 'datetime'\n ),\n );\n }", "title": "" }, { "docid": "cfc48155cd7d68da5b2d66ca1db37162", "score": "0.5765318", "text": "protected function retrieveEntities() {}", "title": "" }, { "docid": "d630e0842feef6edc7b5c937c81b815a", "score": "0.5761017", "text": "public function getAllWiderAreaMapEntries() {\n $widerAreaMapDataClass = new WiderAreaMapData();\n $allWiderAreaMapDataObjects = $widerAreaMapDataClass -> readWiderAreaMap();\n $allWiderAreaMapData = array();\n\n foreach ($allWiderAreaMapDataObjects as $widerAreaMapArray) {\n $widerAreaMapObject = new WiderAreaMap($widerAreaMapArray['idWiderAreaMap'], stripcslashes($widerAreaMapArray['name']), stripcslashes($widerAreaMapArray['description']), $widerAreaMapArray['url'], $widerAreaMapArray['longitude'], $widerAreaMapArray['latitude'], $widerAreaMapArray['address'], $widerAreaMapArray['city'], $widerAreaMapArray['state'], $widerAreaMapArray['zipcode'], $widerAreaMapArray['imageDescription'], $widerAreaMapArray['imageLocation']);\n\n array_push($allWiderAreaMapData, $widerAreaMapObject);\n }\n return $allWiderAreaMapData;\n }", "title": "" }, { "docid": "3a10be7cdb154d1ee9af6949cc514773", "score": "0.5729454", "text": "public function selectMap($sql, $cacheTimeInSeconds = false) {\r\n\t\t$map = array();\r\n\t\t$results = $this->select($sql, $cacheTimeInSeconds, false);\r\n\t\tforeach ($results as $result) {\r\n\t\t\tlist($key, $value) = $result;\r\n\t\t\t$map[$key] = $value;\r\n\t\t}\r\n\t\treturn $map;\r\n\t}", "title": "" }, { "docid": "4f1dccd36fb7cf3bb5481a3f3201d672", "score": "0.5726684", "text": "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t),\n\t\t\t'GUEST_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'required' => true,\n\t\t\t),\n\t\t\t'DATE_CREATE' => array(\n\t\t\t\t'data_type' => 'datetime',\n\t\t\t\t'default_value' => new DateTime(),\n\t\t\t),\n\t\t\t'ENTITY_TYPE_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'required' => true,\n\t\t\t),\n\t\t\t'ENTITY_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'required' => true,\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "68fdd734f14bf11500ef1833847c4898", "score": "0.5702077", "text": "public function get_object_rows() {\n\t\t$sub_classes = $this->get_sub_classes();\n\t\t$sql = \"\n\t\t\tSELECT\n\t\t\t\t{$this->tableName}.*,\n\t\t\t\t{$this->tableName}.gehoertzubereich AS bereiche_gml_ids,\n\t\t\t\tST_AsGML(\n\t\t\t\t\t3,\n\t\t\t\t\tST_Reverse(\n\t\t\t\t\t\tST_Transform(\n\t\t\t\t\t\t\tCASE WHEN ST_NumGeometries({$this->tableName}.position) = 1 THEN ST_GeometryN({$this->tableName}.position, 1) ELSE {$this->tableName}.position END,\n\t\t\t\t\t\t\t{$this->konvertierung->get('output_epsg')}\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\t{$this->konvertierung->get('geom_precision')},\n\t\t\t\t\t0,\n\t\t\t\t\tnull,\n\t\t\t\t\t'GML_' || {$this->tableName}.gml_id::text || '_geom'\n\t\t\t\t) AS gml_position,\n\t\t\t\tST_AsGML(\n\t\t\t\t\t3,\n\t\t\t\t\tST_Transform(\n\t\t\t\t\t\t{$this->tableName}.position,\n\t\t\t\t\t\t{$this->konvertierung->get('output_epsg')}\n\t\t\t\t\t),\n\t\t\t\t\t{$this->konvertierung->get('geom_precision')},\n\t\t\t\t\t32,\n\t\t\t\t\tnull,\n\t\t\t\t\t'GML_' || {$this->tableName}.gml_id::text || '_envelope'\n\t\t\t\t) AS envelope\n\t\t\tFROM\n\t\t\t\t{$this->schema}.{$this->tableName}\" .\n\t\t\t\timplode(\n\t\t\t\t\t'',\n\t\t\t\t\tarray_map(\n\t\t\t\t\t\tfunction($sub_class) {\n\t\t\t\t\t\t\t$sub_class_table_name = strtolower($sub_class);\n\t\t\t\t\t\t\t$table_sql = \" LEFT JOIN\n\t\t\t\t{$this->schema}.{$sub_class_table_name} ON {$this->tableName}.gml_id = {$sub_class_table_name}.gml_id\";\n\t\t\t\t\t\t\treturn $table_sql;\n\t\t\t\t\t\t},\n\t\t\t\t\t\t$sub_classes\n\t\t\t\t\t)\n\t\t\t\t) . \"\n\t\t\tWHERE\n\t\t\t\t{$this->tableName}.konvertierung_id = {$this->konvertierung->get('id')}\" .\n\t\t\t\timplode(\n\t\t\t\t\t'',\n\t\t\t\t\tarray_map(\n\t\t\t\t\t\tfunction($sub_class) {\n\t\t\t\t\t\t\t$sub_class_table_name = strtolower($sub_class);\n\t\t\t\t\t\t\t$where_sql = \" AND\n\t\t\t\t{$sub_class_table_name}.gml_id IS NULL\";\n\t\t\t\t\t\t\treturn $where_sql;\n\t\t\t\t\t\t},\n\t\t\t\t\t\t$sub_classes\n\t\t\t\t\t)\n\t\t\t\t) . \"\n\t\t\tORDER BY\n\t\t\t\tgml_id\n\t\t\";\n\n\t\t$this->debug->show('sql to find objects for class ' . $this->tableName . ': ' . $sql, false);\n\n\t\t$query = pg_query($this->database->dbConn, $sql);\n\n\t\treturn pg_fetch_all($query);\n\t}", "title": "" }, { "docid": "91ad16dd232e2009f62354a2676f8f16", "score": "0.5678187", "text": "public static function getMap()\n {\n return array(\n 'KEY' => new Main\\Entity\\StringField('KEY',array(\n 'primary' => true)),\n 'VALUE' => new Main\\Entity\\StringField('VALUE'),\n );\n }", "title": "" }, { "docid": "3e9bf5fb2624198ceb219ebd3688b5cc", "score": "0.56752133", "text": "static public function getDataMap()\n {\n return array(\n 'fields' => array(\n 'email' => array(\n 'type' => 'string',\n ),\n 'username' => array(\n 'type' => 'string',\n ),\n 'password' => array(\n 'type' => 'string',\n ),\n 'updated_at' => array(\n 'type' => 'date',\n ),\n 'tags' => array(\n 'type' => 'raw',\n ),\n 'textpass' => array(\n 'type' => 'string',\n ),\n 'avatar' => array(\n 'type' => 'string',\n ),\n 'original_avatar' => array(\n 'type' => 'string',\n ),\n 'nickname' => array(\n 'type' => 'string',\n ),\n 'desc' => array(\n 'type' => 'string',\n ),\n 'province' => array(\n 'type' => 'string',\n ),\n 'city' => array(\n 'type' => 'string',\n ),\n 'dtvsp' => array(\n 'type' => 'string',\n ),\n 'device_id' => array(\n 'type' => 'string',\n ),\n 'referer' => array(\n 'type' => 'string',\n ),\n 'type' => array(\n 'type' => 'integer',\n ),\n 'created_at' => array(\n 'type' => 'date',\n ),\n ),\n 'references' => array(\n\n ),\n 'embeddeds' => array(\n\n ),\n 'relations' => array(\n\n ),\n );\n }", "title": "" }, { "docid": "58fc1f3941beffd48d108800682b2310", "score": "0.56558454", "text": "public function getMap();", "title": "" }, { "docid": "93149be1792bdbe83278f0a1c4a0422b", "score": "0.5655783", "text": "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t),\n\t\t\t'CREATED_DATE' => array(\n\t\t\t\t'data_type' => 'datetime',\n\t\t\t\t'required' => true,\n\t\t\t),\n\t\t\t'DATE_START' => array(\n\t\t\t\t'data_type' => 'datetime',\n\t\t\t),\n\t\t\t'DATE_STOP' => array(\n\t\t\t\t'data_type' => 'datetime',\n\t\t\t),\n\t\t\t'USER_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'required' => true,\n\t\t\t),\n\t\t\t'TASK_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'required' => true,\n\t\t\t),\n\t\t\t'MINUTES' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'required' => true,\n\t\t\t),\n\t\t\t'SECONDS' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'required' => true,\n\t\t\t),\n\t\t\t'SOURCE' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t),\n\t\t\t'COMMENT_TEXT' => array(\n\t\t\t\t'data_type' => 'text',\n\t\t\t),\n\n\t\t\t// references\n\t\t\t'USER' => array(\n\t\t\t\t'data_type' => 'Bitrix\\Main\\UserTable',\n\t\t\t\t'reference' => array('=this.USER_ID' => 'ref.ID')\n\t\t\t),\n\t\t\t'TASK' => array(\n\t\t\t\t'data_type' => 'Bitrix\\Tasks\\Internals\\TaskTable',\n\t\t\t\t'reference' => array('=this.TASK_ID' => 'ref.ID')\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "e8b1af7322e55f29a893711591c3e619", "score": "0.56332606", "text": "public static function getMap()\n\t{\n\t\t/*\n\t\t\tboolean (наследует ScalarField)\n\t\t\tdate (наследует ScalarField)\n\t\t\tdatetime (наследует DateField)\n\t\t\tenum (наследует ScalarField)\n\t\t\tfloat (наследует ScalarField)\n\t\t\tinteger (наследует ScalarField)\n\t\t\tstring (наследует ScalarField)\n\t\t\ttext (наследует StringField)\n\t\t */\n\t\treturn array(\n\t\t\t new Main\\Entity\\IntegerField('ID', array(\n\t\t\t\t\t'primary' => true,\n\t\t\t\t\t'autocomplete' => true,\n\t\t\t\t\t'title' => Loc::getMessage('ID'),\n\t\t\t )),\n\t\t\t new Main\\Entity\\DatetimeField('DATE_INSERT', array(\n\t\t\t\t\t'default_value' => new Type\\DateTime(),\n\t\t\t\t\t'title' => Loc::getMessage('DATE_INSERT'),\n\t\t\t\t\t'required' => true,\n\t\t\t )),\n\t\t\t new Main\\Entity\\DatetimeField('DATE_EXEC', array(\n\t\t\t\t\t'title' => Loc::getMessage('DATE_EXEC'),\n\t\t\t )),\n\t\t\t new Main\\Entity\\IntegerField('REVIEW_ID', array(\n\t\t\t\t\t'format' => '/^[0-9]{1,18}$/',\n\t\t\t\t\t'title' => Loc::getMessage('REVIEW_ID'),\n\t\t\t )),\n\t\t\t new Main\\Entity\\IntegerField('SUBSCRIBERS_CNT', array(\n\t\t\t\t\t'format' => '/^[0-9]{1,18}$/',\n\t\t\t\t\t'title' => Loc::getMessage('SUBSCRIBERS_CNT'),\n\t\t\t )),\n\t\t\t new Main\\Entity\\IntegerField('SENDMAIL_CNT', array(\n\t\t\t\t\t'format' => '/^[0-9]{1,18}$/',\n\t\t\t\t\t'title' => Loc::getMessage('SENDMAIL_CNT'),\n\t\t\t )),\n\t\t\t new Main\\Entity\\StringField('SITE_ID', array(\n\t\t\t\t\t'validation' => array(__CLASS__, 'validateSiteId'),\n\t\t\t\t\t'title' => Loc::getMessage('SITE_ID'),\n\t\t\t\t\t'required' => true,\n\t\t\t )),\n\t\t);\n\t}", "title": "" }, { "docid": "fc14d14cf4836b14da914eade9e0c2d1", "score": "0.56283987", "text": "function map_select_data(){\n $table = 'saimap';\n\t$osmap_true = 1;\n\t$query = ('SELECT * FROM '. $table. ' WHERE ' . $osmap_true);\n\t\n\ttry {\n $result = db_query($query);\n\t }\n\tcatch(Exception $e)\t{\n\t drupal_set_message(t('Issue in retrieving the location data. Message = %message, query=%query', \n\t array('%message' =>$e->getMessage(),'%query' => $e->query_string)), 'error');\n\t }\n\t return $result->fetchAll();\n}", "title": "" }, { "docid": "024202ca9eae20807e85a58f2573b06a", "score": "0.5627443", "text": "public function loadMap($map_id) {\n\t\t\tglobal $main_db;\n\t\t\t$sql = \"SELECT * FROM maps WHERE id=$map_id\";\n\t\t\t$result = $main_db->get_rows($sql);\n\n\t\t\treturn $result;\n\t\t}", "title": "" }, { "docid": "ade5a9205f43e8e69d0a2c27421eb747", "score": "0.5621619", "text": "public static function loadAllDatas()\n {\n $result = array();\n $className = get_called_class();\n /** @var ShaDao $className */\n $allDaos = $className::loadByWhereClause(\"\");\n $primaryKeyName = null;\n /** @var ShaDao $dao */\n foreach ($allDaos as $dao) {\n \t//TODO, what that\n if (!isset($sPrimaryKeyName)) {\n $primaryKeyName = key($dao->getPrimaryFields());\n }\n $result[$dao->getValue($primaryKeyName)] = $dao;\n }\n return $result;\n }", "title": "" }, { "docid": "cb7b91c9fd954666c3b616c615a8972a", "score": "0.5613872", "text": "public function loadFromMap($data);", "title": "" }, { "docid": "4d0661ab79b03f015d699c18ca4c29ef", "score": "0.55976886", "text": "public function getMappings();", "title": "" }, { "docid": "a70a857b42f2cb0751498f1c69416cd6", "score": "0.5592041", "text": "function loadObjectList( $key='' ) {\n\t\tif (!($cur = $this->query())) {\n\t\t\treturn null;\n\t\t}\n\t\t$array = array();\n\t\twhile ($row = mysqli_fetch_object( $cur )) {\n\t\t\tif ($key) {\n\t\t\t\t$array[$row->$key] = $row;\n\t\t\t} else {\n\t\t\t\t$array[] = $row;\n\t\t\t}\n\t\t}\n\t\tmysqli_free_result( $cur );\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "5e107b5541c0b5f18c92ec70952120b6", "score": "0.5565842", "text": "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => new Entity\\IntegerField('ID', array(\n\t\t\t\t'title' => 'ID',\n\t\t\t\t'primary' => true\n\t\t\t)),\n\t\t\t'TITLE' => new Entity\\StringField('TITLE', array(\n\t\t\t\t'title' => Loc::getMessage('LANDING_TABLE_FIELD_ROLE_TITLE')\n\t\t\t)),\n\t\t\t'XML_ID' => new Entity\\StringField('XML_ID', array(\n\t\t\t\t'title' => Loc::getMessage('LANDING_TABLE_FIELD_ROLE_XML_ID')\n\t\t\t)),\n\t\t\t'TYPE' => new Entity\\StringField('TYPE', array(\n\t\t\t\t'title' => Loc::getMessage('LANDING_TABLE_FIELD_ROLE_TYPE')\n\t\t\t)),\n\t\t\t'ACCESS_CODES' => new Entity\\StringField('ACCESS_CODES', array(\n\t\t\t\t'title' => Loc::getMessage('LANDING_TABLE_FIELD_ROLE_ACCESS_CODES'),\n\t\t\t\t'serialized' => true\n\t\t\t)),\n\t\t\t'ADDITIONAL_RIGHTS' => new Entity\\StringField('ADDITIONAL_RIGHTS', array(\n\t\t\t\t'title' => Loc::getMessage('LANDING_TABLE_FIELD_ROLE_ADDITIONAL_RIGHTS'),\n\t\t\t\t'serialized' => true\n\t\t\t)),\n\t\t\t'CREATED_BY_ID' => new Entity\\IntegerField('CREATED_BY_ID', array(\n\t\t\t\t'title' => Loc::getMessage('LANDING_TABLE_FIELD_CREATED_BY_ID'),\n\t\t\t\t'required' => true\n\t\t\t)),\n\t\t\t'CREATED_BY' => new Entity\\ReferenceField(\n\t\t\t\t'CREATED_BY',\n\t\t\t\t'Bitrix\\Main\\UserTable',\n\t\t\t\tarray('=this.CREATED_BY_ID' => 'ref.ID')\n\t\t\t),\n\t\t\t'MODIFIED_BY_ID' => new Entity\\IntegerField('MODIFIED_BY_ID', array(\n\t\t\t\t'title' => Loc::getMessage('LANDING_TABLE_FIELD_MODIFIED_BY_ID'),\n\t\t\t\t'required' => true\n\t\t\t)),\n\t\t\t'MODIFIED_BY' => new Entity\\ReferenceField(\n\t\t\t\t'MODIFIED_BY',\n\t\t\t\t'Bitrix\\Main\\UserTable',\n\t\t\t\tarray('=this.MODIFIED_BY_ID' => 'ref.ID')\n\t\t\t),\n\t\t\t'DATE_CREATE' => new Entity\\DatetimeField('DATE_CREATE', array(\n\t\t\t\t'title' => Loc::getMessage('LANDING_TABLE_FIELD_DATE_CREATE'),\n\t\t\t\t'required' => true\n\t\t\t)),\n\t\t\t'DATE_MODIFY' => new Entity\\DatetimeField('DATE_MODIFY', array(\n\t\t\t\t'title' => Loc::getMessage('LANDING_TABLE_FIELD_DATE_MODIFY'),\n\t\t\t\t'required' => true\n\t\t\t))\n\t\t);\n\t}", "title": "" }, { "docid": "bc337f1aa739ebf83c13e910ccb409c3", "score": "0.5559545", "text": "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t),\n\t\t\t'CLIENT_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'required' => true,\n\t\t\t),\n\t\t\t'REFRESH_TOKEN' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'required' => true,\n\t\t\t\t'validation' => array(__CLASS__, 'validateRefreshToken'),\n\t\t\t),\n\t\t\t'EXPIRES' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'required' => true,\n\t\t\t),\n\t\t\t'USER_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'required' => true,\n\t\t\t),\n\t\t\t'OAUTH_TOKEN_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'required' => true,\n\t\t\t),\n\t\t\t'USER' => array(\n\t\t\t\t'data_type' => 'Bitrix\\Main\\UserTable',\n\t\t\t\t'reference' => array('=this.USER_ID' => 'ref.ID'),\n\t\t\t),\n\t\t\t'CLIENT' => array(\n\t\t\t\t'data_type' => 'Bitrix\\OAuth\\ClientTable',\n\t\t\t\t'reference' => array('=this.CLIENT_ID' => 'ref.ID'),\n\t\t\t),\n\t\t\t'TOKEN' => array(\n\t\t\t\t'data_type' => 'Bitrix\\OAuth\\TokenTable',\n\t\t\t\t'reference' => array('=this.OAUTH_TOKEN_ID' => 'ref.ID'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "2d00843a214780c0ca32efb4f6a20620", "score": "0.5553451", "text": "public function getDatabaseMap()\n\t{\n\t\treturn $this->dbMap;\n\t}", "title": "" }, { "docid": "2d00843a214780c0ca32efb4f6a20620", "score": "0.5553451", "text": "public function getDatabaseMap()\n\t{\n\t\treturn $this->dbMap;\n\t}", "title": "" }, { "docid": "2d00843a214780c0ca32efb4f6a20620", "score": "0.5553451", "text": "public function getDatabaseMap()\n\t{\n\t\treturn $this->dbMap;\n\t}", "title": "" }, { "docid": "2d00843a214780c0ca32efb4f6a20620", "score": "0.5553451", "text": "public function getDatabaseMap()\n\t{\n\t\treturn $this->dbMap;\n\t}", "title": "" }, { "docid": "2d00843a214780c0ca32efb4f6a20620", "score": "0.5553451", "text": "public function getDatabaseMap()\n\t{\n\t\treturn $this->dbMap;\n\t}", "title": "" }, { "docid": "2d00843a214780c0ca32efb4f6a20620", "score": "0.5553451", "text": "public function getDatabaseMap()\n\t{\n\t\treturn $this->dbMap;\n\t}", "title": "" }, { "docid": "00f73c2e41d84b7589ec739e9cc01fba", "score": "0.55529684", "text": "function getObjects ( $sql_query ) {\n\t\t$this->_cursor = mysql_query ( $sql_query, $this->_ressource );\n\t\t$objects = array();\n\t\tif ( $this->_cursor ) {\n\t\t\twhile ( $object = mysql_fetch_object ( $this->_cursor ) )\n\t\t\t\tarray_push ( $objects, $object );\n\t\t\tmysql_free_result ( $this->_cursor );\n\t\t}\n\t\treturn $objects;\n\t}", "title": "" }, { "docid": "aed42150a9a9740fd452147200d3325b", "score": "0.55395967", "text": "function asObjects()\n\t\t{\n\t\t\t$returnObjects = array();\n\t\t\t$className = get_class($this);\n\n\t\t\twhile($row = $this->dbResult->fetch_assoc())\n\t\t\t{\n\t\t\t\t$object = new $className();\n\n\t\t\t\tforeach ($this->properties as $property)\n\t\t\t\t{\n\t\t\t\t\t$object->{$property} = $row[$property];\n\t\t\t\t}\n\n\t\t\t\tif (isset($this->activeRelations))\n\t\t\t\t{\n\t\t\t\t\tforeach ($this->activeRelations as $relation)\n\t\t\t\t\t{\n\t\t\t\t\t\t$object->{$relation[\"title\"]} = new stdClass();\n\t\t\t\t\t\t\n\t\t\t\t\t\tforeach ($relation[\"model\"]->properties as $property)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (isset($row[$property])) $object->{$relation[\"title\"]}->{$property} = $row[$property];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$returnObjects[] = $object;\n\t\t\t}\n\n\t\t\treturn $returnObjects;\n\t\t}", "title": "" }, { "docid": "44eb47d9439eda4e15527ae72d9cb3fa", "score": "0.55320597", "text": "public function attributeMap()\n {\n if ($this->dataMap === null) {\n if ($this->contentObject === null) {\n throw new ObjectDoesNotExist(\"No content object has been set, cannot load attribute map\");\n }\n if ($this->contentVersion !== null) {\n $this->dataMap = $this->contentVersion->dataMap();\n } else {\n $languageCode = $this->languageCode ? $this->languageCode : false;\n $this->dataMap = $this->contentObject->fetchDataMap(/*version*/false, $languageCode);\n }\n }\n return $this->dataMap;\n }", "title": "" }, { "docid": "fcf1ef838326b592860ef4f35166f547", "score": "0.55315405", "text": "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t\t'title' => Loc::getMessage('KIT_IX_DP_ENTITY_ID_FIELD'),\n\t\t\t),\n\t\t\t'DISCOUNT_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => Loc::getMessage('KIT_IX_DP_ENTITY_DISCOUNT_ID_FIELD'),\n\t\t\t),\n\t\t\t'PRODUCT_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => Loc::getMessage('KIT_IX_DP_ENTITY_PRODUCT_ID_FIELD'),\n\t\t\t),\n\t\t\t'SITE_ID' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => Loc::getMessage('KIT_IX_DP_ENTITY_SITE_ID_FIELD'),\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "5305c3a6dbdbd130493a884447cd3e45", "score": "0.55242205", "text": "public function getMapping() : array;", "title": "" }, { "docid": "e00c8c87fc10a9fd8c9174dfe5e0b9e1", "score": "0.55095625", "text": "public static function getMap()\n\t{\n\t\t$fieldsMap = array(\n\t\t\t'ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true\n\t\t\t),\n\t\t\t'TITLE' => array(\n\t\t\t\t'data_type' => 'string'\n\t\t\t),\n\t\t\t'ACTIVE' => array(\n\t\t\t\t'data_type' => 'boolean',\n\t\t\t\t'values' => array('N', 'Y')\n\t\t\t),\n\t\t\t'ADDRESS' => array(\n\t\t\t\t'data_type' => 'string'\n\t\t\t),\n\t\t\t'DESCRIPTION' => array(\n\t\t\t\t'data_type' => 'string'\n\t\t\t),\n\t\t\t'GPS_N' => array(\n\t\t\t\t'data_type' => 'string'\n\t\t\t),\n\t\t\t'GPS_S' => array(\n\t\t\t\t'data_type' => 'string'\n\t\t\t),\n\t\t\t'IMAGE_ID' => array(\n\t\t\t\t'data_type' => 'string'\n\t\t\t),\n\t\t\t'LOCATION_ID' => array(\n\t\t\t\t'data_type' => 'integer'\n\t\t\t),\n\t\t\t'DATE_MODIFY' => array(\n\t\t\t\t'data_type' => 'datetime'\n\t\t\t),\n\t\t\t'DATE_CREATE' => array(\n\t\t\t\t'data_type' => 'datetime'\n\t\t\t),\n\t\t\t'USER_ID' => array(\n\t\t\t\t'data_type' => 'integer'\n\t\t\t),\n\t\t\t'MODIFIED_BY' => array(\n\t\t\t\t'data_type' => 'integer'\n\t\t\t),\n\t\t\t'PHONE' => array(\n\t\t\t\t'data_type' => 'string'\n\t\t\t),\n\t\t\t'SCHEDULE' => array(\n\t\t\t\t'data_type' => 'string'\n\t\t\t),\n\t\t\t'XML_ID' => array(\n\t\t\t\t'data_type' => 'string'\n\t\t\t)\n\t\t);\n\n\t\treturn $fieldsMap;\n\t}", "title": "" }, { "docid": "962b68cb670fc9a92fb1a9105626930b", "score": "0.5483823", "text": "public static function getMap()\n {\n return array(\n 'id' => array(\n 'data_type' => 'integer',\n 'primary' => true,\n 'autocomplete' => true,\n 'title' => Loc::getMessage('STAT_ENTITY_ID_FIELD'),\n ),\n 'query_id' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('STAT_ENTITY_QUERY_ID_FIELD'),\n ),\n 'status_id' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('STAT_ENTITY_STATUS_ID_FIELD'),\n ),\n 'status_title' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateStatusTitle'),\n 'title' => Loc::getMessage('STAT_ENTITY_STATUS_TITLE_FIELD'),\n ),\n 'type_id' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('STAT_ENTITY_TYPE_ID_FIELD'),\n ),\n 'domen' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateDomen'),\n 'title' => Loc::getMessage('STAT_ENTITY_DOMEN_FIELD'),\n ),\n 'type_title' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateTypeTitle'),\n 'title' => Loc::getMessage('STAT_ENTITY_TYPE_TITLE_FIELD'),\n ),\n 'phone' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validatePhone'),\n 'title' => Loc::getMessage('STAT_ENTITY_PHONE_FIELD'),\n ),\n 'date_create' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateDateCreate'),\n 'title' => Loc::getMessage('STAT_ENTITY_DATE_CREATE_FIELD'),\n ),\n 'utm_source' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateUtmSource'),\n 'title' => Loc::getMessage('STAT_ENTITY_UTM_SOURCE_FIELD'),\n ),\n 'utm_medium' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateUtmMedium'),\n 'title' => Loc::getMessage('STAT_ENTITY_UTM_MEDIUM_FIELD'),\n ),\n 'utm_campaign' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateUtmCampaign'),\n 'title' => Loc::getMessage('STAT_ENTITY_UTM_CAMPAIGN_FIELD'),\n ),\n 'utm_term' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateUtmTerm'),\n 'title' => Loc::getMessage('STAT_ENTITY_UTM_TERM_FIELD'),\n ),\n 'utm_content' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateUtmContent'),\n 'title' => Loc::getMessage('STAT_ENTITY_UTM_CONTENT_FIELD'),\n ),\n 'utm_updated' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateUtmUpdated'),\n 'title' => Loc::getMessage('STAT_ENTITY_UTM_UPDATED_FIELD'),\n ),\n 'record_url' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateRecordUrl'),\n 'title' => Loc::getMessage('STAT_ENTITY_RECORD_URL_FIELD'),\n ),\n 'duration' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('STAT_ENTITY_DURATION_FIELD'),\n ),\n 'record_written' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('STAT_ENTITY_RECORD_WRITTEN_FIELD'),\n ),\n 'lead' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('STAT_ENTITY_LEAD_FIELD'),\n ),\n 'deal' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('STAT_ENTITY_DEAL_FIELD'),\n ),\n 'id_record_bx' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('STAT_ENTITY_ID_RECORD_BX_FIELD'),\n ),\n );\n }", "title": "" }, { "docid": "cd0db58bdcd1989b1f24653102ca2ec2", "score": "0.54733413", "text": "public function mapping(){\n // $get = $this->db->query(\"SELECT a.* FROM article a ORDER BY a.thedate DESC;\");\n\n # aaa060 - replace a38 recup all articles with JOIN author\n $get = $this->db->query(\"SELECT * FROM \taccueil_image where id BETWEEN 21 and 25\");\n\n # aaa039 => one or more result\n if($get->rowCount()){\n\n # aaa041 - return array assoc's in array index\n\n return $get->fetchAll(PDO::FETCH_ASSOC);\n\n }else{\n # aaa040 => no result => return false\n return false;\n }\n }", "title": "" }, { "docid": "28ca04890cfd9d8d2570cffb961ddc95", "score": "0.5467994", "text": "public static function getAll(){\n $sql = \"SELECT \".self::getTableAlias().\".* \".\"FROM [\".$GLOBALS[\"app\"]->DB->dbname.\"].[dbo].[\".self::getTable().\"] as \".self::getTableAlias();\n $sql_res = $GLOBALS[\"app\"]->DB->query($sql);\n $array_result = array();\n if(!empty($sql_res)){\n $model_class = get_called_class();\n foreach($sql_res as $row){\n $row[\"_id\"] = $row[self::getPrimaryKey()];\n $Model = new $model_class($row);\n array_push($array_result,$Model);\n }\n return $array_result;\n }else{\n return $sql_res;\n }\n }", "title": "" }, { "docid": "848faa79c28db950bbb3f4d5f507fd9f", "score": "0.5439374", "text": "public function loadByMapId($map_id = null)\n\t{\n\t\t// Initialise the query.\n\t\t$query = $this->_db->getQuery(true);\n\t\t$query->select('t.id, t.alias, ct.params');\n\t\t$query->from($this->_tbl.' AS t ');\n\t\t$query->join('LEFT', '#__sdi_map_tool AS ct ON ct.tool_id=t.id');\n\t\t$query->where('ct.map_id = ' . (int) $map_id);\n\t\t$query->where('t.state = 1' );\n $query->where('ct.activated = 1');\n\t\t$query->order('t.ordering ASC' );\n\t\t$this->_db->setQuery($query);\n\t\n\t\ttry\n\t\t{\n\t\t\t$rows = $this->_db->loadObjectList();\n\t\n\t\t}\n\t\tcatch (JDatabaseException $e)\n\t\t{\n\t\t\t$je = new JException($e->getMessage());\n\t\t\t$this->setError($je);\n\t\t\treturn false;\n\t\t}\n\t\n\t\t// Legacy error handling switch based on the JError::$legacy switch.\n\t\t// @deprecated 12.1\n\t\tif (JError::$legacy && $this->_db->getErrorNum())\n\t\t{\n\t\t\t$e = new JException($this->_db->getErrorMsg());\n\t\t\t$this->setError($e);\n\t\t\treturn false;\n\t\t}\n\t\n\t\t// Check that we have a result.\n\t\tif (empty($rows))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn $rows;\n\t}", "title": "" }, { "docid": "77f788e0efc1316f838b0bc8a35b5717", "score": "0.5435861", "text": "public static function retrieveAllInfo();", "title": "" }, { "docid": "b5deba1052b6f959a2d8df03790f964f", "score": "0.54306", "text": "public function FetchAllAssoc();", "title": "" }, { "docid": "421c16942af88da3fb307ee75e240ca6", "score": "0.5422466", "text": "public static function getMap()\n\t{\n\t\treturn [\n\t\t\t(new Fields\\IntegerField('ID'))\n\t\t\t\t->configurePrimary(true)\n\t\t\t\t->configureAutocomplete(true)\n\t\t\t,\n\t\t\t(new Fields\\IntegerField('SHIFT_ID'))\n\t\t\t,\n\t\t\t(new Fields\\IntegerField('USER_ID'))\n\t\t\t,\n\t\t\t// pretend like we store date in utc\n\t\t\t(new Fields\\DateField('DATE_ASSIGNED'))\n\t\t\t,\n\t\t\t(new Fields\\BooleanField('DELETED'))\n\t\t\t\t->configureValues(static::DELETED_NO, static::DELETED_YES)\n\t\t\t,\n\t\t\t(new Fields\\IntegerField('CREATED_AT'))\n\t\t\t,\n\t\t\t(new Fields\\IntegerField('DELETED_AT'))\n\t\t\t,\n\t\t\t(new Fields\\IntegerField('MISSED_SHIFT_AGENT_ID'))\n\t\t\t\t->configureDefaultValue(0)\n\t\t\t,\n\n\t\t\t# relations\n\t\t\t(new Fields\\Relations\\Reference('SHIFT', ShiftTable::class, Main\\ORM\\Query\\Join::on('this.SHIFT_ID', 'ref.ID')))\n\t\t\t,\n\t\t];\n\t}", "title": "" }, { "docid": "28167df2fb0d84b9ac6fd527bfb1e1c6", "score": "0.54188454", "text": "function GetMapEntryList($database)\r\n\t{\r\n\t\t$map_entry_reader = new MapEntryReader($database, \"SELECT {0} FROM `map_list`\");\r\n\t\t$map_entry_reader->ExecuteQuery(NULL);\r\n\r\n\t\t$map_entry_list = array();\r\n\t\twhile($map_entry_reader->MoveNext())\r\n\t\t{\r\n\t\t\t$map_entry = new MapListEntry();\r\n\t\t\t\r\n\t\t\t// determine whether an error occured when adding the map entry\r\n\t\t\t$map_entry->map_processed = \"No\";\r\n\t\t\tif($map_entry_reader->map_compression_stage == 1)\r\n\t\t\t\t$map_entry->map_processed = \"Yes\";\r\n\r\n\t\t\t$map_entry->map_name = $map_entry_reader->map_name;\r\n\t\t\t$map_entry->map_extension = $map_entry_reader->map_extension;\r\n\t\t\t$map_entry->map_file_id = $map_entry_reader->file_id;\r\n\t\t\t\r\n\t\t\t$map_entry_list[] = $map_entry;\r\n\t\t}\r\n\t\treturn $map_entry_list;\r\n\t}", "title": "" }, { "docid": "f74109fbb40bbc3cc535622c96e1b71c", "score": "0.54110193", "text": "public function getMap()\n {\n return $this->entityMap;\n }", "title": "" }, { "docid": "5e824bfffe783bc47d59dd92aa7523bc", "score": "0.54108196", "text": "public function getMatchingMappings($aCoid) {\n if(isset($_SESSION['AAT']['debug']) && $_SESSION['AAT']['debug'] === 1) { \n\t\t$this->oDebugLog->addLog('input','MusaFunctions','getMatchingMappings', str_replace(\" \", \"\", str_replace(\"\\n\", \"\", print_r($aCoid,true))));\n }\n $sCoid = join(\",\",$aCoid);\n $aSelect = array('concept_mapping.mp_query');\n $aFrom = array('concept_mapping');\n $aWhere = array('mp_coid1 in (' . $sCoid . ') and mp_coid2 in (' . $sCoid . ')');\n return $this->oMusa->fetchData($aSelect,$aFrom,$aWhere); \n }", "title": "" }, { "docid": "3c6736dae8ec8b5afb9595485cc63e73", "score": "0.5410333", "text": "public static function GetAll()\n {\n $query = MyPDO::GetPDO()->ReturnQuery(\"select * from \".self::$tableName);\n $query->execute();\n $objects = array();\n try\n {\n $objects = $query->fetchAll(PDO::FETCH_CLASS, self::$entity);\n }\n catch(Exception $e)\n {\n\n }\n return $objects;\n }", "title": "" }, { "docid": "156b96ff93c225bcb6ebb9d3a1723bf0", "score": "0.53843784", "text": "public function fetch(){\n\t\t// Get data\n\t\t$this->_initCursor();\n\t\t$results=$this->_formatResults(iterator_to_array($this->cursor));\n\t\t// Resolve aliases\n\t\t$results=$this->_resolveAliases($this->database->getNamespace().$this->name,$results);\n\t\t// Join collections\n\t\t$results=$this->_joinCollectionsTo($results);\n\t\t// Format IDs\n\t\tforeach($results as &$result){\n\t\t\t$result['_id']=(string)$result['_id'];\n\t\t}\n\t\treturn $results;\n\t}", "title": "" }, { "docid": "311722a0d2c213e194ac10a8ac9513c7", "score": "0.53809106", "text": "public function getResponsibleDataFromDb()\n {\n // Like BG said, it's not a bug it's a feature : you can restore an object without the need of model\n return array(array(array('hello'), array(array(MapObject::FQCN_KEY => 'hello'))));\n }", "title": "" }, { "docid": "b75cd97ea5b9f9a62b24b6a24cca5063", "score": "0.5379014", "text": "public function getAllRows(){\n $values = array(); \n $db = $this->getDB(); \n $stmt = $db->prepare(\"SELECT final_carrental.Car ID, final_carrental.Car Make, final_carrental.Car Name, FROM final_carrental \");\n \n if ( $stmt->execute() && $stmt->rowCount() > 0 ) {\n $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n foreach ($results as $value) {\n $model = new Car();\n $model->reset()->map($value);\n $values[] = $model;\n }\n \n } else { \n \n } \n \n $stmt->closeCursor(); \n return $values;\n \n }", "title": "" }, { "docid": "8fa7229e6517801f2688ba10b44424ea", "score": "0.53740215", "text": "static public function getDataMap()\n {\n return array(\n 'fields' => array(\n 'signal' => array(\n 'type' => 'string',\n ),\n 'name' => array(\n 'type' => 'string',\n ),\n 'remark' => array(\n 'type' => 'string',\n ),\n 'logo' => array(\n 'type' => 'string',\n ),\n 'type' => array(\n 'type' => 'string',\n ),\n 'channels' => array(\n 'type' => 'raw',\n ),\n 'created_at' => array(\n 'type' => 'date',\n ),\n 'updated_at' => array(\n 'type' => 'date',\n ),\n ),\n 'references' => array(\n\n ),\n 'embeddeds' => array(\n\n ),\n 'relations' => array(\n\n ),\n );\n }", "title": "" }, { "docid": "947057d49bdf8f38620b9c57ae8ac868", "score": "0.53730464", "text": "public static function getMap(): array\n\t{\n\t\treturn [\n\t\t\tnew Entity\\IntegerField('LINE_ID', [\n\t\t\t\t'primary' => true\n\t\t\t]),\n\t\t\tnew Entity\\TextField('DATA', [\n\t\t\t\t'serialized' => true,\n\t\t\t]),\n\t\t\tnew Entity\\DatetimeField('EXPIRES', [\n\t\t\t\t'default_value' => new Type\\DateTime,\n\t\t\t]),\n\t\t\tnew Entity\\StringField('DATA_HASH', [\n\t\t\t\t'size' => 32\n\t\t\t]),\n\t\t];\n\t}", "title": "" }, { "docid": "efd3b8e49574b6f839ca88cb5e4a0e39", "score": "0.5371443", "text": "public function getMap(): array;", "title": "" }, { "docid": "e6b4f09f6a0afc38247a25296d456cbb", "score": "0.5368019", "text": "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t),\n\t\t\t'DATE_CREATE' => array(\n\t\t\t\t'data_type' => 'datetime',\n\t\t\t\t'default_value' => new DateTime(),\n\t\t\t),\n\t\t\t'GID' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'required' => true,\n\t\t\t\t'unique' => true,\n\t\t\t\t'default_value' => function(){\n\t\t\t\t\treturn GuestTable::generateGuestId();\n\t\t\t\t}\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "65321aee01ceaa7a106cda6f0539dc79", "score": "0.5367935", "text": "function getAllPlacesFromDb(){\n\t\t$query = \"SELECT placeid, name, division FROM places\"; \n\t\t$result = executeQuery($query);\t\n\t\t$placeList = array();\n\t\tif($result){\n\t\t\tfor($i=0; $row = mysqli_fetch_assoc($result); ++$i) {\n\t\t\t\t$placeList[$i] = $row;\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn $placeList;\n\t}", "title": "" }, { "docid": "aa00f75f6a28b6b201a230d5108583f1", "score": "0.5353251", "text": "public static function getMap()\n\t{\n\t\treturn [\n\t\t\tnew IntegerField(\n\t\t\t\t'ID',\n\t\t\t\t[\n\t\t\t\t\t'primary' => true,\n\t\t\t\t\t'autocomplete' => true,\n\t\t\t\t\t'title' => Loc::getMessage('_ENTITY_ID_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew TextField(\n\t\t\t\t'UF_NAME',\n\t\t\t\t[\n\t\t\t\t\t'title' => Loc::getMessage('_ENTITY_UF_NAME_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew TextField(\n\t\t\t\t'UF_ARTICLE',\n\t\t\t\t[\n\t\t\t\t\t'title' => Loc::getMessage('_ENTITY_UF_ARTICLE_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew FloatField(\n\t\t\t\t'UF_PRICE',\n\t\t\t\t[\n\t\t\t\t\t'title' => Loc::getMessage('_ENTITY_UF_PRICE_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew IntegerField(\n\t\t\t\t'UF_TOVAR_QUANTITY',\n\t\t\t\t[\n\t\t\t\t\t'title' => Loc::getMessage('_ENTITY_UF_TOVAR_QUANTITY_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew TextField(\n\t\t\t\t'UF_ID_WAREHOUSE',\n\t\t\t\t[\n\t\t\t\t\t'title' => Loc::getMessage('_ENTITY_UF_ID_WAREHOUSE_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew TextField(\n\t\t\t\t'UF_PREW_TEXT',\n\t\t\t\t[\n\t\t\t\t\t'title' => Loc::getMessage('_ENTITY_UF_PREW_TEXT_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew TextField(\n\t\t\t\t'UF_DETAIL_TEXT',\n\t\t\t\t[\n\t\t\t\t\t'title' => Loc::getMessage('_ENTITY_UF_DETAIL_TEXT_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew TextField(\n\t\t\t\t'UF_TYPE',\n\t\t\t\t[\n\t\t\t\t\t'title' => Loc::getMessage('_ENTITY_UF_TYPE_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew TextField(\n\t\t\t\t'UF_BRAND',\n\t\t\t\t[\n\t\t\t\t\t'title' => Loc::getMessage('_ENTITY_UF_BRAND_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew TextField(\n\t\t\t\t'UF_MANUFACT',\n\t\t\t\t[\n\t\t\t\t\t'title' => Loc::getMessage('_ENTITY_UF_MANUFACT_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew TextField(\n\t\t\t\t'UF_MATERIAL',\n\t\t\t\t[\n\t\t\t\t\t'title' => Loc::getMessage('_ENTITY_UF_MATERIAL_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t];\n\t}", "title": "" }, { "docid": "3b860ee00bfb9efd6f93a32409cd6354", "score": "0.5349928", "text": "public function retrieveAll(): array\n {\n return $this->loadAllObjects();\n }", "title": "" }, { "docid": "4774ddad95b15ded7e1cb43934d2b56a", "score": "0.53460556", "text": "public static function getMap() {\n return array(\n 'ID' => array(\n 'data_type' => 'integer',\n 'primary' => true,\n 'autocomplete' => true,\n 'title' => Loc::getMessage('KIT_OPENGRAPH_PAGE_META_ENTITY_ID_FIELD'),\n ),\n 'PARENT_ID' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('KIT_OPENGRAPH_PAGE_META_ENTITY_PARENT_ID_FIELD'),\n ),\n 'NAME' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'title' => Loc::getMessage('KIT_OPENGRAPH_PAGE_META_ENTITY_NAME_FIELD'),\n ),\n 'PARENT' => array(\n 'data_type' => 'Kit\\Opengraph\\OpengraphCategory',\n 'reference' => array('=this.PARENT_ID' => 'ref.ID'),\n ),\n 'TIMESTAMP_X' => array(\n 'data_type' => 'datetime',\n 'title' => Loc::getMessage('KIT_OPENGRAPH_ENTITY_TIMESTAMP_X_FIELD'),\n ),\n 'DATE_CREATE' => array(\n 'data_type' => 'datetime',\n 'title' => Loc::getMessage('KIT_OPENGRAPH_ENTITY_DATE_CREATE_FIELD'),\n ),\n 'SITE_ID' => array(\n 'data_type' => 'string',\n 'title' => Loc::getMessage('KIT_OPENGRAPH_PAGE_META_ENTITY_SITE_ID_FIELD'),\n ),\n 'SORT' => array(\n 'data_type' => 'string',\n 'title' => Loc::getMessage('KIT_OPENGRAPH_PAGE_META_ENTITY_SORT_FIELD'),\n ),\n );\n }", "title": "" }, { "docid": "dcb9019050d68ca1160f602d62134bcc", "score": "0.5345392", "text": "public static function getMap()\n {\n return array(\n 'ID' => new Entity\\IntegerField(\n 'ID', array(\n 'primary' => true,\n 'autocomplete' => true,\n 'title' => 'ID'\n )\n ),\n 'CODE' => new Entity\\StringField(\n 'CODE', array(\n 'title' => Loc::getMessage('LANDING_TABLE_FIELD_BLOCK_CODE'),\n 'required' => true\n )\n ),\n 'LAST_BLOCK_ID' => new Entity\\IntegerField(\n 'LAST_BLOCK_ID', array(\n 'title' => Loc::getMessage('LANDING_TABLE_FIELD_LAST_BLOCK_ID'),\n 'required' => true,\n 'default_value' => 0\n )\n ),\n 'PARAMS' => new Entity\\StringField(\n 'PARAMS', array(\n 'title' => Loc::getMessage('LANDING_TABLE_FIELD_BLOCK_PARAMS'),\n 'serialized' => true\n )\n ),\n 'CREATED_BY_ID' => new Entity\\IntegerField(\n 'CREATED_BY_ID', array(\n 'title' => Loc::getMessage('LANDING_TABLE_FIELD_CREATED_BY_ID'),\n 'required' => true\n )\n ),\n 'MODIFIED_BY_ID' => new Entity\\IntegerField(\n 'MODIFIED_BY_ID', array(\n 'title' => Loc::getMessage('LANDING_TABLE_FIELD_MODIFIED_BY_ID'),\n 'required' => true\n )\n ),\n 'DATE_CREATE' => new Entity\\DatetimeField(\n 'DATE_CREATE', array(\n 'title' => Loc::getMessage('LANDING_TABLE_FIELD_DATE_CREATE'),\n 'required' => true\n )\n ),\n 'DATE_MODIFY' => new Entity\\DatetimeField(\n 'DATE_MODIFY', array(\n 'title' => Loc::getMessage('LANDING_TABLE_FIELD_DATE_MODIFY'),\n 'required' => true\n )\n )\n );\n }", "title": "" }, { "docid": "a512cb9587995fdbf9a0bf81dbd8ff8e", "score": "0.5340739", "text": "public function getAllChildMaps($id = false) {\n\t\t\t// Database Connection\n\t\t\t$db\t\t\t\t= $GLOBALS['db'];\n\t\t\t// Query \n\t\t\t$return\t\t\t= ($id) ? $db->getAllRows_Arr('tb_map_link_icon', 'id_map_target AS id', 'id_map_orign = '.$id) : false;\n\t\t\t// Return\n\t\t\treturn $return;\n\t\t}", "title": "" }, { "docid": "c5f0dae2999188dc198b4987b22feb15", "score": "0.5321508", "text": "public function get() : Object\n {\n $this->statement->execute();\n\n $registers = $this->statement->fetchAll(\\PDO::FETCH_ASSOC);\n\n $this->setCollection($registers);\n\n return $this->collection;\n }", "title": "" }, { "docid": "451b69fdcd7cdf49072cdb587820c49e", "score": "0.53106815", "text": "public static function getMap()\n\t{\n\t\treturn [\n\t\t\t'ID' => [\n\t\t\t\t'primary' => true,\n\t\t\t\t'data_type' => 'integer'\n\t\t\t],\n\t\t\t'ORDER_ID' => [\n\t\t\t\t'data_type' => 'integer'\n\t\t\t],\n\t\t\t'ORDER' => [\n\t\t\t\t'data_type' => '\\Bitrix\\Sale\\Order',\n\t\t\t\t'reference' => [\n\t\t\t\t\t'=this.ORDER_ID' => 'ref.ID'\n\t\t\t\t]\n\t\t\t],\n\t\t\t'ENTITY_ID' => [\n\t\t\t\t'data_type' => 'integer'\n\t\t\t],\n\t\t\t'ENTITY_TYPE_ID' => [\n\t\t\t\t'data_type' => 'integer'\n\t\t\t],\n\t\t\t'SORT' => [\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'default_value' => 0\n\t\t\t],\n\t\t\t'ROLE_ID' => [\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'default_value' => 0\n\t\t\t],\n\t\t\t'IS_PRIMARY' => [\n\t\t\t\t'data_type' => 'boolean',\n\t\t\t\t'values' => ['N', 'Y'],\n\t\t\t\t'default_value' => 'N'\n\t\t\t]\n\t\t];\n\t}", "title": "" }, { "docid": "fc3393c657af981af576256f52bc88fb", "score": "0.5303325", "text": "function getMapped($key) {\n $array = $this->getAll(ANYDB_RES_ASSOC);\n if ($array) {\n $size = sizeof($array[0]);\n // are results there?\n if (($size > 1) && isset($array[0][$key])) {\n $res = array();\n foreach ($array as $entry) {\n // get the key value\n $k = $entry[$key];\n // if result has only two fields, return 1-dim array\n if ($size == 2) {\n unset($entry[$key]);\n $res[$k] = array_pop($entry);\n // else 2-dim\n } else {\n $res[$k] = $entry;\n unset($res[$k][$key]);\n }\n }\n return $res;\n }\n }\n return false;\n}", "title": "" }, { "docid": "04cfddfaf5fdfe4a6994537c50f6092a", "score": "0.52977544", "text": "function db_get_mapped_student_ids() {\n\t\tif(!$this->db) {\n\t\t\tdb_connect();\n\t\t}\n\t\t\n\t\t$students = array();\n\t\t\n\t\t$sql = \"select subject_id_pre, student_id_post from student_pre_post_mapping\";\n\t\t\n\t\t$result = mysql_query($sql);\n\t\twhile($row = mysql_fetch_assoc($result)) {\n\t\t $students[$row['subject_id_pre']] = $row['student_id_post']; \n\t\t} \n\t\t\n\t\treturn $students;\t\t\n\t}", "title": "" }, { "docid": "7b9b094f563ccbcc251100dbe284078d", "score": "0.5297197", "text": "function getObjetivos() {\n\t\tglobal $mdb2;\n\t\tglobal $log;\n\t\tglobal $current_usuario_id;\n\t\t\t\n\t\t$sql = \"SELECT * FROM public.cliente_subcliente_lista_objetivos(\".\n\t\t\t\tpg_escape_string($current_usuario_id).\",\".\n\t\t\t\tpg_escape_string($this->subcliente_id).\")\";\n\t\t$res =& $mdb2->query($sql);\n\t\tif (MDB2::isError($res)) {\n\t\t\t$log->setError($sql, $res->userinfo);\n\t\t\texit();\n\t\t}\n\n\t\t$this->__objetivos = array();\n\t\twhile ($row = $res->fetchRow()) {\n\t\t\t$objetivo = new Objetivo($row[\"objetivo_id\"]);\n\t\t\t$objetivo->nombre = $row[\"objetivo_nombre\"];\n\t\t\t$objetivo->descripcion = $row[\"objetivo_descripcion\"];\n\t\t\t$this->__objetivos[$row[\"objetivo_id\"]] = $objetivo;\n\t\t}\n\t\treturn $this->__objetivos;\n\t}", "title": "" }, { "docid": "ceedeb5b2f12838315decf86e09bf318", "score": "0.5293664", "text": "public function getMap(){\n $result = array();\n foreach($this->places as $place){\n $result[$place->getNumber()] = $place;\n }\n return $result;\n }", "title": "" }, { "docid": "496aec0f3da1386787c4ea4c302cc743", "score": "0.52897847", "text": "function get_data(){\n\t\t\tglobal $db;\n\t\t\t$query = $this->setQuery();\n\t\t\t$sql = $db->query_limit($query,$this->limit, $this->page );\n\t\t\t\n\t\t\t$list = $db->getObjectList();\n\t\t\tforeach ($list as $item) {\n\t\t\t\t$item->created_table = $db-> checkExistTable($item->table_name);\n\t\t\t}\n\t\t\treturn $list;\n\t\t}", "title": "" }, { "docid": "f11e7d6f6931632ae9baefca4845b38d", "score": "0.52857834", "text": "public function getCategoryListMaps()\n {\n return $this->hasMany(CategoryListMap::class, ['category_id' => 'id']);\n }", "title": "" }, { "docid": "e447f6fb872e4e77bd9bed89b0615397", "score": "0.5270772", "text": "public static function getMap()\n {\n return array(\n 'ID' => array(\n 'data_type' => 'integer',\n 'primary' => true,\n 'autocomplete' => true,\n 'title' => Loc::getMessage('EVENT_ENTITY_ID_FIELD'),\n ),\n 'ACTIVE' => array(\n 'data_type' => 'boolean',\n 'values' => array('N', 'Y'),\n 'title' => Loc::getMessage('EVENT_ENTITY_ACTIVE_FIELD'),\n ),\n 'NAME' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateName'),\n 'title' => Loc::getMessage('EVENT_ENTITY_NAME_FIELD'),\n ),\n 'EVENT_ID' => array(\n 'data_type' => 'integer',\n 'required' => true,\n 'title' => Loc::getMessage('EVENT_ENTITY_EVENT_ID_FIELD'),\n ),\n new Main\\Entity\\ReferenceField(\n 'EVENT',\n 'Bp\\Template\\Tools\\Services\\Eventlist',\n array('=this.EVENT_ID' => 'ref.ID'),\n array('join_type' => 'LEFT')\n ),\n 'SERVICE_ID' => array(\n 'data_type' => 'integer',\n 'required' => true,\n 'title' => Loc::getMessage('EVENT_ENTITY_SERVICE_ID_FIELD'),\n ),\n new Main\\Entity\\ReferenceField(\n 'SERVICE',\n 'Bp\\Template\\Tools\\Services\\System',\n array('=this.SERVICE_ID' => 'ref.ID'),\n array('join_type' => 'LEFT')\n ),\n 'FUNCTION' => array(\n 'data_type' => 'text',\n 'title' => Loc::getMessage('EVENT_ENTITY_DESCRIPTION_FIELD'),\n ),\n 'DESCRIPTION' => array(\n 'data_type' => 'text',\n 'title' => Loc::getMessage('EVENT_ENTITY_DESCRIPTION_FIELD'),\n ),\n );\n }", "title": "" }, { "docid": "ab9441ae15f17db1c02531907c12251d", "score": "0.52661914", "text": "static function fetchMapBy($criteria, $keyFid = null, $limit = 0) {\n if ($keyFid == null)\n $keyFid = $criteria->getPkFid();\n return self::fetchAllBy($criteria, null, $limit, $keyFid);\n }", "title": "" }, { "docid": "27f36e5f70f33131235dcb0e169cf544", "score": "0.5263746", "text": "function jeo_the_map() {\r\n\tglobal $jeo;\r\n\treturn $jeo->map;\r\n}", "title": "" }, { "docid": "03a0b2d8b0668554488ab2600950885b", "score": "0.5255094", "text": "public static function retrieveAll () {\n return self::retrieve()\n ->setRowClass('Model_Entity')\n ->fetchAll();\n }", "title": "" }, { "docid": "8697304921e889d18db041fb7b3491bf", "score": "0.5252642", "text": "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => new Main\\Entity\\IntegerField('ID', array(\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t\t'title' => Loc::getMessage('PRICE_ENTITY_ID_FIELD')\n\t\t\t)),\n\t\t\t'PRODUCT_ID' => new Main\\Entity\\IntegerField('PRODUCT_ID', array(\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => Loc::getMessage('PRICE_ENTITY_PRODUCT_ID_FIELD')\n\t\t\t)),\n\t\t\t'EXTRA_ID' => new Main\\Entity\\IntegerField('EXTRA_ID', array(\n\t\t\t\t'title' => Loc::getMessage('PRICE_ENTITY_EXTRA_ID_FIELD')\n\t\t\t)),\n\t\t\t'CATALOG_GROUP_ID' => new Main\\Entity\\IntegerField('CATALOG_GROUP_ID', array(\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => Loc::getMessage('PRICE_ENTITY_CATALOG_GROUP_ID_FIELD')\n\t\t\t)),\n\t\t\t'PRICE' => new Main\\Entity\\FloatField('PRICE', array(\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => Loc::getMessage('PRICE_ENTITY_PRICE_FIELD')\n\t\t\t)),\n\t\t\t'CURRENCY' => new Main\\Entity\\StringField('CURRENCY', array(\n\t\t\t\t'required' => true,\n\t\t\t\t'validation' => array(__CLASS__, 'validateCurrency'),\n\t\t\t\t'title' => Loc::getMessage('PRICE_ENTITY_CURRENCY_FIELD')\n\t\t\t)),\n\t\t\t'TIMESTAMP_X' => new Main\\Entity\\DatetimeField('TIMESTAMP_X', array(\n\t\t\t\t'default_value' => function(){ return new Main\\Type\\DateTime(); },\n\t\t\t\t'title' => Loc::getMessage('PRICE_ENTITY_TIMESTAMP_X_FIELD')\n\t\t\t)),\n\t\t\t'QUANTITY_FROM' => new Main\\Entity\\IntegerField('QUANTITY_FROM', array(\n\t\t\t\t'title' => Loc::getMessage('PRICE_ENTITY_QUANTITY_FROM_FIELD')\n\t\t\t)),\n\t\t\t'QUANTITY_TO' => new Main\\Entity\\IntegerField('QUANTITY_TO', array(\n\t\t\t\t'title' => Loc::getMessage('PRICE_ENTITY_QUANTITY_TO_FIELD')\n\t\t\t)),\n\t\t\t'TMP_ID' => new Main\\Entity\\StringField('TMP_ID', array(\n\t\t\t\t'validation' => array(__CLASS__, 'validateTmpId'),\n\t\t\t\t'title' => Loc::getMessage('PRICE_ENTITY_TMP_ID_FIELD')\n\t\t\t)),\n\t\t\t'PRICE_SCALE' => new Main\\Entity\\FloatField('PRICE_SCALE', array(\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => Loc::getMessage('PRICE_ENTITY_PRICE_SCALE_FIELD')\n\t\t\t)),\n\t\t\t'CATALOG_GROUP' => new Main\\Entity\\ReferenceField(\n\t\t\t\t'CATALOG_GROUP',\n\t\t\t\t'\\Bitrix\\Catalog\\Group',\n\t\t\t\tarray('=this.CATALOG_GROUP_ID' => 'ref.ID')\n\t\t\t),\n\t\t\t'ELEMENT' => new Main\\Entity\\ReferenceField(\n\t\t\t\t'ELEMENT',\n\t\t\t\t'\\Bitrix\\Iblock\\Element',\n\t\t\t\tarray('=this.PRODUCT_ID' => 'ref.ID'),\n\t\t\t\tarray('join_type' => 'LEFT')\n\t\t\t),\n\t\t\t'PRODUCT' => new Main\\Entity\\ReferenceField(\n\t\t\t\t'PRODUCT',\n\t\t\t\t'\\Bitrix\\Catalog\\Product',\n\t\t\t\tarray('=this.PRODUCT_ID' => 'ref.ID'),\n\t\t\t\tarray('join_type' => 'LEFT')\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "b0017d21ebab508ed255b87b737921d8", "score": "0.5250658", "text": "public static function populateObjects(PDOStatement $stmt)\n\t{\n\t\t$results = array();\n\t\n\t\t// set the class once to avoid overhead in the loop\n\t\t$cls = IgrejaPeer::getOMClass(false);\n\t\t// populate the object(s)\n\t\twhile ($row = $stmt->fetch(PDO::FETCH_NUM)) {\n\t\t\t$key = IgrejaPeer::getPrimaryKeyHashFromRow($row, 0);\n\t\t\tif (null !== ($obj = IgrejaPeer::getInstanceFromPool($key))) {\n\t\t\t\t// We no longer rehydrate the object, since this can cause data loss.\n\t\t\t\t// See http://www.propelorm.org/ticket/509\n\t\t\t\t// $obj->hydrate($row, 0, true); // rehydrate\n\t\t\t\t$results[] = $obj;\n\t\t\t} else {\n\t\t\t\t$obj = new $cls();\n\t\t\t\t$obj->hydrate($row);\n\t\t\t\t$results[] = $obj;\n\t\t\t\tIgrejaPeer::addInstanceToPool($obj, $key);\n\t\t\t} // if key exists\n\t\t}\n\t\t$stmt->closeCursor();\n\t\treturn $results;\n\t}", "title": "" }, { "docid": "a23b012aa85ba341fa9d6e74382ead87", "score": "0.5243646", "text": "public static function getMap()\n\t{\n\t\treturn [\n\t\t\t'ID' => [\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t],\n\t\t\t'TRACE_ID' => [\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'required' => true,\n\t\t\t],\n\t\t\t'LEVEL' => [\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'required' => true,\n\t\t\t\t'default_value' => 0,\n\t\t\t],\n\t\t\t'CODE' => [\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'required' => true,\n\t\t\t],\n\t\t\t'SOURCE_CHILD_ID' => [\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'required' => true,\n\t\t\t\t'default_value' => 0,\n\t\t\t],\n\t\t\t'PROCESSED' => [\n\t\t\t\t'data_type' => 'boolean',\n\t\t\t\t'required' => true,\n\t\t\t\t'default_value' => 0,\n\t\t\t\t'values' => [0, 1]\n\t\t\t],\n\t\t\t'TRACE' => [\n\t\t\t\t'data_type' => TraceTable::class,\n\t\t\t\t'reference' => ['=this.TRACE_ID' => 'ref.ID'],\n\t\t\t],\n\t\t\t'SOURCE_CHILD' => [\n\t\t\t\t'data_type' => SourceChildTable::class,\n\t\t\t\t'reference' => ['=this.SOURCE_CHILD_ID' => 'ref.ID'],\n\t\t\t],\n\t\t];\n\t}", "title": "" }, { "docid": "ec5e7d4a0394d211fc8b0bc32ee669e8", "score": "0.5235855", "text": "public static function getMap(): array\r\n {\r\n return [\r\n new IntegerField(\r\n 'ID',\r\n [\r\n 'primary' => true,\r\n 'autocomplete' => true,\r\n 'title' => Loc::getMessage('_ENTITY_ID_FIELD')\r\n ]\r\n ),\r\n new StringField(\r\n 'TITLE',\r\n [\r\n 'required' => true,\r\n 'validation' => [__CLASS__, 'validateTitle'],\r\n 'title' => Loc::getMessage('_ENTITY_TITLE_FIELD')\r\n ]\r\n ),\r\n new StringField(\r\n 'DESCRIPTION',\r\n [\r\n 'validation' => [__CLASS__, 'validateDescription'],\r\n 'title' => Loc::getMessage('_ENTITY_DESCRIPTION_FIELD')\r\n ]\r\n ),\r\n new StringField(\r\n 'FILES',\r\n [\r\n 'title' => Loc::getMessage('_ENTITY_FILES_FIELD')\r\n ]\r\n ),\r\n new IntegerField(\r\n 'YEAR',\r\n [\r\n 'validation' => [__CLASS__, 'validateYear'],\r\n 'title' => Loc::getMessage('_ENTITY_YEAR_FIELD')\r\n ]\r\n ),\r\n new IntegerField(\r\n 'PRICE',\r\n [\r\n 'validation' => [__CLASS__, 'validatePrice'],\r\n 'title' => Loc::getMessage('_ENTITY_PRICE_FIELD')\r\n ]\r\n ),\r\n new IntegerField(\r\n 'AUTHOR_ID',\r\n [\r\n 'required' => true,\r\n 'title' => Loc::getMessage('_ENTITY_AUTHOR_ID_FIELD')\r\n ]\r\n ),\r\n new DatetimeField(\r\n 'CREATED',\r\n [\r\n 'default' => function () {\r\n return new DateTime();\r\n },\r\n 'title' => Loc::getMessage('_ENTITY_CREATED_FIELD')\r\n ]\r\n ),\r\n (new Reference(\r\n 'AUTHOR',\r\n AuthorTable::class,\r\n Join::on('this.AUTHOR_ID', 'ref.ID')\r\n ))->configureJoinType('inner'),\r\n ];\r\n }", "title": "" }, { "docid": "c8f9e3bcc7e8d86e55774a07cb0089ec", "score": "0.5225242", "text": "public function get_all() {\n $results = array();\n $query = $this->db->get($this->table);\n foreach ($query->result() as $row) {\n $results[$row->id] = $this->get_by($row->id);\n }\n return $results;\n }", "title": "" } ]
e2048fbf89ce0ed27fefc38c50e65dbb
Fetches the current row as object and move the cursor to the next.
[ { "docid": "07d2f78c328b59fe3d605bec0a3bf9a8", "score": "0.0", "text": "public function fetch(string $class = null, mixed ...$constructor) : object | null\n {\n $this->checkIsFree();\n $class ??= $this->fetchClass;\n $constructor = $constructor ?: $this->fetchConstructor;\n if ($constructor) {\n return $this->result->fetch_object($class, $constructor);\n }\n return $this->result->fetch_object($class);\n }", "title": "" } ]
[ { "docid": "1a3ad1d8997d87a731cde97b81f61f0f", "score": "0.7434889", "text": "public function current()\n\t{\n\t\t$this->seek($this->row);\n\t\treturn $this->result->fetch_object();\n\t}", "title": "" }, { "docid": "acf7e80d4be3d241833125e90ac3bd18", "score": "0.73383737", "text": "public function fetchRow(){\n $this->_debugBacktrace();\n $this->fetchType = \"row\";\n return $this;\n }", "title": "" }, { "docid": "2129c0d388c5fc2b8cb6dd3efbe11297", "score": "0.72673345", "text": "public function fetchRow()\n {\n return $this->fetch();\n }", "title": "" }, { "docid": "24045a6588553e0da314f2095bbb0434", "score": "0.70704556", "text": "function fetch() {\n\t\t$this->i++;\n\t\treturn $this->result->fetch_object($this->class_name);\n\t}", "title": "" }, { "docid": "3afba0f8064110898d8a0a7bd5a76c7a", "score": "0.7037044", "text": "public function fetchObject() {\n $row = @pg_fetch_object($this->result);\n return $row;\n }", "title": "" }, { "docid": "49e6a8826ad59bf437c6b750faf4ac71", "score": "0.69381464", "text": "public function next() {\n if (!empty($this->query)) {\n $this->_row = $this->query->fetch_object();\n $this->_index++;\n }\n }", "title": "" }, { "docid": "4afabaf6b7e76c0b68819072105006c3", "score": "0.6857959", "text": "public function next() {\r\n\t\t\t++$this->curPos;\r\n\t\t\t$this->curRow = $this->res->fetchArray(SQLITE3_ASSOC);\r\n\t\t}", "title": "" }, { "docid": "d5e21120a2a82bb99745ccf21e2c0802", "score": "0.6857113", "text": "public function current() {\n return $this->_row;\n }", "title": "" }, { "docid": "ab8c3d204bf5c0640f0f4300735a4c05", "score": "0.6830153", "text": "function getCurrentRow() {}", "title": "" }, { "docid": "d08fe9edc5d74b8233b917385665f3d8", "score": "0.6826135", "text": "public function fetch()\r\n\t{\r\n\t if( $this->pointer < 0 || $this->pointer > $this->num_rows() - 1 )\r\n\t {\r\n\t Lumine_Log::debug( 'Nenhum resultado para o cursor '.$this->pointer);\r\n\t $this->moveFirst();\r\n\t return false;\r\n\t }\r\n\t \r\n\t \r\n\t\tLumine_Log::debug( 'Retornando linha: '.$this->pointer);\r\n\t\t\r\n\t\t$row = pg_fetch_assoc($this->result_set, $this->pointer);\r\n\t\t$this->pointer++;\r\n\r\n\t\treturn $row;\r\n\t}", "title": "" }, { "docid": "8b372fb9a353c245c083effa5470dad5", "score": "0.68247736", "text": "public function current() { return the_row($this->format); }", "title": "" }, { "docid": "e953af514e11eadb18bffa7ffc27ed39", "score": "0.67613107", "text": "function moveNext( )\n {\n \n $returnValue = true;\n \n if ( $row = $this->db->retrieveRow() ) {\n \n $this->currentRow = $row;\n \n } else {\n \n $returnValue = false;\n $this->currentRow = array();\n }\n \n return $returnValue;\n }", "title": "" }, { "docid": "760018e48fa6cb59328145e9ccb79a50", "score": "0.6751421", "text": "public function fetchObject()\r\n\r\n \t{\r\n\r\n\r\n\r\n \treturn $this->QUERY->fetch(PDO::FETCH_OBJ);\r\n\r\n \t}", "title": "" }, { "docid": "342bc8f755181e0f4a933d05cb3c7c49", "score": "0.67081875", "text": "public function current()\n {\n return $this->row;\n }", "title": "" }, { "docid": "ba25667a0c7f96d8945da1286db58621", "score": "0.6706829", "text": "function fetch_object() { \r\n\t\t\t$row=@mysql_fetch_object($this->es_resultset); \r\n\t\t\treturn $row; \r\n\t\t}", "title": "" }, { "docid": "4c763aa0d2eaaa6ab4861033369ea80e", "score": "0.6686857", "text": "public function next()\n {\n if (! $this->_statement instanceof \\Zend_Db_Statement_Interface) {\n $this->_initStatement();\n }\n $this->_row = $this->_statement->fetch();\n $this->_i = $this->_i + 1;\n }", "title": "" }, { "docid": "ebad6fca793bcc4fa62a8a25c4c3603e", "score": "0.6680071", "text": "public function current()\n {\n if (! $this->_statement instanceof \\Zend_Db_Statement_Interface) {\n $this->_initStatement();\n }\n return $this->_row;\n }", "title": "" }, { "docid": "9f5daa2264a4d02d2bae9abe2db114a2", "score": "0.66735506", "text": "function currentrow(){\n\t\treturn $this->row;\n\t}", "title": "" }, { "docid": "519fb9ca068be76f60d3c511945794c4", "score": "0.6673232", "text": "public function fetchObject()\n\t{\n\t\treturn pg_fetch_object($this->result);\n\t}", "title": "" }, { "docid": "866ab39edc35f4598876b68826981a8f", "score": "0.6667131", "text": "public function current()\n {\n if( $this->valid() === false )\n {\n return null;\n }\n \n return $this->_getRow($this->_pointer);\n }", "title": "" }, { "docid": "d2c6c03f9fe56a12d5ee5e8139eb8eb8", "score": "0.6660058", "text": "public function fetchRow() {\n $row = @pg_fetch_row($this->result);\n return $row;\n }", "title": "" }, { "docid": "b0b6b629bcc00608ff6228afa9216610", "score": "0.66502815", "text": "public function fetch() {\n\t\t\n\t\t$aRes = $this->wpdb->last_result;\n\t\t\n\t\tif ( is_array( $aRes ) ) {\n\t\t\t\n\t\t\tif ( $aRow = $aRes[ $this->_iCurRow ] ) {\n\t\t\t\t$this->_iCurRow++;\n\t\t\t\treturn $aRow;\n\t\t\t}\n\t\t\t\n\t\t\t$this->resetCurRow();\n\t\t}\n\t\t\n\t\treturn NULL;\n\t}", "title": "" }, { "docid": "825a677261803010eb5a683764e29937", "score": "0.66467226", "text": "protected function next_row()\n\t\t{\n\t\t\tif ($this->statement === null)\n\t\t\t\tthrow new Exception(\"No rows available!\");\n\n\t\t\t$this->current = $this->statement->fetch(PDO::FETCH_ASSOC, PDO::FETCH_ORI_NEXT);\n\n\t\t\treturn $this->current === false ? null : $this->current;\n\t\t}", "title": "" }, { "docid": "ef398dba48037fc5394174a1c405a409", "score": "0.664097", "text": "public function singleRow()\n {\n $this->execute();\n return $this->stmt->fetch(\\PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "68ebd8ef47ddfd022c6e18f1186a9eaa", "score": "0.66226333", "text": "private function nextRow() {\n\t\tif ($this->rows === null) return; // we're after the end (or before the start)\n\t\t$row = $this->row($this->rows);\n\t\tif ($row === false) {\n\t\t\t$this->end();\n\t\t} else {\n\t\t\t$this->count++;\n\t\t\t$this->value = $this->value($row);\n\t\t}\n\t}", "title": "" }, { "docid": "5fd16c2226d6dabfc8e49e5f123f2f64", "score": "0.66210735", "text": "public function rewind() {\n $this->_row = $this->query->fetch_object();\n $this->_index = 0;\n }", "title": "" }, { "docid": "8648a230594d6c9a43c6da3c4a4b43f0", "score": "0.66070884", "text": "function resultObject()\n {\n if( count($this->resultObject) > 0 ) {\n return $this->resultObject;\n }\n\n $this->_dataSeek(0);\n while( $row = $this->_fetchObject() ) {\n $this->resultObject[] = $row;\n }\n\n return $this->resultObject;\n }", "title": "" }, { "docid": "fd7c461daeb6aea3b9bc7d051ec677e8", "score": "0.66002905", "text": "function getCurrentRow()\n {\n return $this->currentRow;\n }", "title": "" }, { "docid": "323a023181c663888ada0560c132b50a", "score": "0.6598161", "text": "public function getCurrentRow() {\n return $this->current_row;\n }", "title": "" }, { "docid": "c182c2823a863c35dfcc538df9b468c7", "score": "0.65840524", "text": "public function fetchRow() {\n\t\tif ($this->hasResult()) {\n\t\t\t$this->resultSet($this->_result);\n\t\t\t$resultRow = $this->fetchResult();\n\t\t\treturn $resultRow;\n\t\t}\n\t\treturn null;\n\t}", "title": "" }, { "docid": "6cb7bd64a7a801027ee379a65b9d02dd", "score": "0.6558449", "text": "function _fetchObject()\n {\n return $this->resultId->fetch_object();\n }", "title": "" }, { "docid": "4c7d73c9861da1696303ab99edec9d5a", "score": "0.6555896", "text": "function fetchObject()\n {\n return (@mysql_fetch_object($this->result, MYSQL_ASSOC));\n }", "title": "" }, { "docid": "fc92a144e8753542638e12520dc4f157", "score": "0.6554089", "text": "public function next()\n {\n $this->row = $this->st->fetch();\n $this->index++;\n }", "title": "" }, { "docid": "0364a82fd3189c7fe1071303c7c1c35b", "score": "0.65385175", "text": "public function next()\n {\n $row = $this->getRow($this->pointer);\n if (!is_null($row)) {\n $this->pointer++;\n }\n }", "title": "" }, { "docid": "4da9fdc121f06f037b5d06d4e755e1be", "score": "0.65370196", "text": "public function _seek($row) {\n\t\tif (!$this->result) return;\n\t\t@sqlsrv_fetch($this->result, SQLSRV_SCROLL_ABSOLUTE, $row);\n\t}", "title": "" }, { "docid": "9b077c1441c0eadc4b396397188df574", "score": "0.65220165", "text": "abstract protected function fetchRowInternal();", "title": "" }, { "docid": "837faa8cd77c4550c09e3359df12fe13", "score": "0.65217584", "text": "public function current()\n {\n return $this->getRow($this->pointer);\n }", "title": "" }, { "docid": "4e1adbe741f0821ec57e9b2676874b7d", "score": "0.65084916", "text": "function row() {\n\treturn $this->row;\n}", "title": "" }, { "docid": "7e0e1019877c724d7440f6b0191ac4b8", "score": "0.64811164", "text": "public function fetchRow()\n {\n global $wpdb;\n\n return $wpdb->get_row( $this->composeQuery( false ), ARRAY_A );\n }", "title": "" }, { "docid": "d42f9b30247a6ba7475f352acdc0705b", "score": "0.6480127", "text": "protected function setCurrentRow($row) {\n switch($this->return_mode) {\n \n // Set object based on class name that we got in constructor\n case DB::RETURN_OBJECT_BY_CLASS:\n $class_name = $this->return_class_or_field;\n \n $this->current_row = new $class_name();\n $this->current_row->loadFromRow($row);\n break;\n \n // Set object based on class name from field\n case DB::RETURN_OBJECT_BY_FIELD:\n $class_name = $row[$this->return_class_or_field];\n \n $this->current_row = new $class_name();\n $this->current_row->loadFromRow($row);\n break;\n \n // Just return array\n default:\n $this->current_row = $row;\n \n if(!empty($this->casting)) {\n foreach($this->current_row as $k => $v) {\n $this->current_row[$k] = $this->cast($k, $v);\n } // foreach\n } // if\n } // if\n }", "title": "" }, { "docid": "30146fced071e1bb30f104a8b82734bb", "score": "0.64708596", "text": "public function fetchObj() {\n\t\treturn pg_fetch_object($this->query);\n\t}", "title": "" }, { "docid": "fc0d5c1dcb267ac1bda1345bb5de66f0", "score": "0.6449891", "text": "public function fetchObj() {\n return $this->resultado->fetch(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "400bc91ada52f644d35ea3adcbb7512c", "score": "0.64474237", "text": "public function firstObject()\n\t{\n\t\t$record = mysql_fetch_object($this->queryResult);\n\t\tif (!is_object($record))\n\t\t{\n\t\t\t$this->throwError(\"\\$record is not an object.\");\n\t\t}\n\t\t\n\t\t$this->resetPointer();\n\t\treturn $record;\n\t}", "title": "" }, { "docid": "a34fbc96664cd7ced065255c44e9777c", "score": "0.6424631", "text": "public function fetchObject() {\n return $this->resultId !== false ? mysqli_fetch_object($this->resultId) : false;\n }", "title": "" }, { "docid": "0972bc28e292c0f54035483241ce83ef", "score": "0.6414161", "text": "public function current()\n {\n if ($this->iterating == 1)\n { // iterating through row\n $row = current($this->row);\n } // iterating through row\n else\n if ($this->iterating == 2)\n { // iterating through extras\n $row = current($this->extras);\n } // iterating through extras\n else\n { // iteration not initialized\n reset($this->row);\n $this->iterating = 1; // iterating through row\n $row = current($this->row);\n } // iteration not initialized\n return $row;\n }", "title": "" }, { "docid": "11a0f277b4f3d40b59098ebfdfba0b4d", "score": "0.6392724", "text": "protected function current_row()\n\t\t{\n\t\t\tif ($this->statement === null)\n\t\t\t\tthrow new Exception(\"No rows available!\");\n\n\t\t\treturn $this->current === false ? null : $this->current;\n\t\t}", "title": "" }, { "docid": "85fc28858d875682ac18d51f05436e6f", "score": "0.63686395", "text": "function loadRow() {\r\n\t\tif (!($cur = $this->query())) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t$ret = null;\r\n\t\tif ($row = mysql_fetch_array( $cur )) {\r\n\t\t\t$ret = $row;\r\n\t\t}\r\n\t\tmysql_free_result( $cur );\r\n\t\treturn $ret;\r\n\t}", "title": "" }, { "docid": "c4adc746426ad5c182d17607c9732817", "score": "0.6358472", "text": "public function next()\n {\n $this->data = $this->statement->fetch();\n $this->current++;\n }", "title": "" }, { "docid": "d6e40ca5f8582e7fad46f153dbd76cf4", "score": "0.6356341", "text": "function getRow()\n {\n return $this->_row;\n }", "title": "" }, { "docid": "b93ef9beae52f4eaacec50ec9e44f543", "score": "0.63273776", "text": "public function current()\n {\n return new RowHandle($this, $this->worksheet, $this->currentRow, $this->only);\n }", "title": "" }, { "docid": "6b1ae070ddb6270d77205e1fc2f45b19", "score": "0.6309071", "text": "function getNextRow()\n {\n $arr_res = mysql_fetch_array($this->current_res, $this->current_arr_type);\n if($arr_res)\n return $arr_res;\n else {\n mysql_free_result($this->current_res);\n $this->current_arr_type = MYSQL_ASSOC;\n return array();\n }\n }", "title": "" }, { "docid": "2c348dcc6a52e5fbc047fd300fbe687b", "score": "0.6284323", "text": "public function loadNextRow()\n\t{\n\t\t// Execute the query and get the result set cursor.\n\t\tif (!$this->cursor)\n\t\t{\n\t\t\tif (!($this->execute()))\n\t\t\t{\n\t\t\t\treturn $this->errorNum ? null : false;\n\t\t\t}\n\t\t}\n\n\t\t// Get the next row from the result set as an object of type $class.\n\t\tif ($row = $this->fetchArray())\n\t\t{\n\t\t\treturn $row;\n\t\t}\n\n\t\t// Free up system resources and return.\n\t\t$this->freeResult();\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "19eff2859cf346660874fbd3eab2d3b0", "score": "0.6282443", "text": "public function loadNextObject($class = 'stdClass')\n\t{\n\t\t// Execute the query and get the result set cursor.\n\t\tif (!$this->cursor)\n\t\t{\n\t\t\tif (!($this->execute()))\n\t\t\t{\n\t\t\t\treturn $this->errorNum ? null : false;\n\t\t\t}\n\t\t}\n\n\t\t// Get the next row from the result set as an object of type $class.\n\t\tif ($row = $this->fetchObject(null, $class))\n\t\t{\n\t\t\treturn $row;\n\t\t}\n\n\t\t// Free up system resources and return.\n\t\t$this->freeResult();\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "e7645a1d5968ca188fd81ed0886f1191", "score": "0.62785333", "text": "public function object ()\n {\n return mysqli_fetch_object($this->query);\n }", "title": "" }, { "docid": "0625bbee6a6352782e078604f592bf14", "score": "0.6277492", "text": "public function next()\n {\n if ($this->iterating == 1)\n { // iterating through row\n $row = next($this->row);\n if ($row === false)\n {\n $this->iterating = 2; // iterating through extras\n $row = reset($this->extras);\n }\n } // iterating through row\n else\n if ($this->iterating == 2)\n { // iterating through extras\n $row = next($this->extras);\n } // iterating through extras\n else\n { // iteration not initialized\n reset($this->row);\n $this->iterating = 1; // iterating through row\n $row = current($this->row);\n } // iteration not initialized\n return $row;\n }", "title": "" }, { "docid": "1397fc14b710c0c4dbe46777fcece9e8", "score": "0.62753296", "text": "public function getInternalRow() : \\Nette\\Database\\Table\\ActiveRow\n {\n return $this->row;\n }", "title": "" }, { "docid": "43fdccffce2321eb05ba50e459b2d0fe", "score": "0.6270814", "text": "public function getRow()\r\n {\r\n $row = $this->statement->fetch(\\PDO::FETCH_ASSOC, \\PDO::FETCH_ORI_NEXT);\r\n if( ! is_array($row) ) return false;\r\n switch($this->returnAs){\r\n case ResultSet::AS_ARRAY:\r\n return $row;\r\n case ResultSet::AS_OBJECT:\r\n return (object) $row;\r\n case ResultSet::AS_ORM:\r\n if( $this->tableName!==null ){\r\n $table = $this->db->Table($this->tableName);\r\n return new Orm($table, $row, true);\r\n }\r\n return false;\r\n default: //custom object\r\n if( !is_string($this->returnAs) ){\r\n throw new \\Exeption(\"Invalid return type ({$this->returnAs})\");\r\n }\r\n return new $this->returnAs($row);\r\n }\r\n }", "title": "" }, { "docid": "7e73f651f0b4d2c5f2cd9ad31badf1bb", "score": "0.62699294", "text": "private function fetch () {\n try {\n $result = Connect\\ROQL::query($this->query)->next();\n }\n catch (\\Exception $e) {\n $this->error = $e->getMessage();\n }\n\n return $result;\n }", "title": "" }, { "docid": "bf8abb075090e0838f6f6f7fb31cd0f0", "score": "0.6265325", "text": "public function getNextRow($mode = \"object\")\n {\n if (!$this->hasResult()) {\n throw new \\Exception(\"DB Error: There is no result\");\n }\n\n $row = ($mode == \"array\" ? $this->result->fetch_array() : $this->result->fetch_object());\n return (is_null($row) ? false : $row);\n }", "title": "" }, { "docid": "3d0213358d55ae05a3ef0ad079c55890", "score": "0.62650913", "text": "function next($format = SQL_INDEX)\n\t{\n\t\tif($format == SQL_INDEX)\n\t\t{\n\t\t\t$this->record = mysql_fetch_row($this->result);\n\t\t}\n\t\telse if($format == SQL_ASSOC)\n\t\t{\n\t\t\t$this->record = mysql_fetch_assoc($this->result);\n\t\t}\n\t}", "title": "" }, { "docid": "b2c87e3e907a921aebd294824387896d", "score": "0.6256471", "text": "public function next()\n {\n next($this->rows);\n }", "title": "" }, { "docid": "f74c21e7a1943a73f4fe35bb2caa80eb", "score": "0.623126", "text": "public function fetch_row()\n\t{\n\t\tif (!$this->get_opt('mysqlnd') && $this->get_opt('prepared_query')) {\n\t\t\t$fetch_status = $this->resource->fetch();\n\t\t\tif ($fetch_status) {\n\t\t\t\t$new_row = array();\n\t\t\t foreach ($this->row as $key => $value) { $new_row[$key] = $value; }\n\t\t\t return $new_row;\n\t\t\t}\n\t\t\treturn $fetch_status;\n\t\t}\n\t\telse {\n\t\t\treturn $this->resource->fetch_assoc();\n\t\t}\n\t}", "title": "" }, { "docid": "29d7ca7e77ffc283f4823fe78cf75cbe", "score": "0.6223591", "text": "function GetRow($row)\n\t{\n\t\t@mysqli_data_seek($this->result,$row) or\n\t\t\t$this->mysql_ErrorMsg(\"Unable to seek data row: $row for this query $this->query\");\n\t\t$this->data=@mysqli_fetch_array($this->result) or\n\t\t\t$this->mysql_ErrorMsg(\"Unable to fetch row: $row\",$this->show);\n\t}", "title": "" }, { "docid": "e892c51504bfcb9abc68d92b3883b847", "score": "0.6213564", "text": "public function row()\n\t{\n\t\treturn getRow($this->sql());\n\t}", "title": "" }, { "docid": "091aa0bc7c33276ec0cf0dbc46c2e399", "score": "0.6211087", "text": "public function current()\n {\n $data = $this->_cursor->current();\n $this->check_iterate_profiling();\n\n if( ! $this->_model)\n {\n return $data;\n }\n $model = clone $this->get_model();\n return $model->load_values($data,TRUE);\n }", "title": "" }, { "docid": "1750047b2089b74c5abc06dc65c298dd", "score": "0.6210982", "text": "public function getRow()\n {\n return $this->_row;\n }", "title": "" }, { "docid": "89ebccedd899381b9a131833689f85f1", "score": "0.6203913", "text": "function GetRow($row){\n\t\t@mysqli_data_seek($this->result,$row) or\n\t\t\tmysql_ErrorMsg(\"Unable to seek data row: $row. \" . mysqli_error($this->id));\n\t\t$this->data=@mysqli_fetch_array($this->result) or\n\t\t\tmysql_ErrorMsg(\"Unable to fetch row: $row. \" . mysqli_error($this->id));\n\t\t$this->StripRowSlashes();\n\t}", "title": "" }, { "docid": "a15e301f78ac05931480890ea0bd155b", "score": "0.6184755", "text": "function rowObject($n = 0)\n {\n $result = $this->resultObject();\n\n if( count($result) == 0) {\n return $result;\n }\n\n if( $n != $this->currentRow && isset($result[$n]) ) {\n $this->currentRow = $n;\n }\n\n return $result[$this->currentRow];\n }", "title": "" }, { "docid": "4a27cd3124e947a11ba57cd006addd77", "score": "0.6179507", "text": "public function _seek($row) {\n\t\tif ($this->result) $this->row = (int) $row;\n\t}", "title": "" }, { "docid": "c570f504b2697437a8b7674adb0a9741", "score": "0.6178893", "text": "public function fetchRow($row)\n {\n $this->computeDelimiter();\n return $this->reader->fetchOne($row);\n }", "title": "" }, { "docid": "f0ef9d3c7faf3ffe6fc0995a16ce1d90", "score": "0.61697984", "text": "public abstract function nextRow($query_result);", "title": "" }, { "docid": "4e995541383044bfb39e12f9601b3fb0", "score": "0.61607295", "text": "public function fetchRow($result);", "title": "" }, { "docid": "9d6fffce795442e083689441140ad854", "score": "0.61521894", "text": "public function current() {\n\t\t$row = $this->result->current ();\n\t\tif (is_array ( $row )) {\n\t\t\t$return = $row;\n\t\t} elseif (method_exists ( $row, 'toArray' )) {\n\t\t\t$return = $row->toArray ();\n\t\t} elseif ($row instanceof ArrayObject) {\n\t\t\t$return = $row->getArrayCopy ();\n\t\t} else {\n\t\t\tthrow new Exception\\RuntimeException ( 'Rows as part of this DataSource, with type ' . gettype ( $row ) . ' cannot be cast to an array' );\n\t\t}\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "83526caf45c453f48d208a2c4dc91f0f", "score": "0.61462736", "text": "function get_row() { }", "title": "" }, { "docid": "03149d3ee86a42b7c816b78a29f97cbd", "score": "0.61335", "text": "public function fetchObject(){\n $this->_debugBacktrace();\n $this->fetchType = \"object\";\n return $this;\n }", "title": "" }, { "docid": "76492f71b012148ffa1262e90a970de2", "score": "0.61307", "text": "public function row()\n {\n $this->_buildQuery();\n $this->_execute();\n\n return $this->_pdoSt->fetch(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "3ebe4b171c76aeaf30983fa3b8310deb", "score": "0.6126191", "text": "public function fetchRow() {\n return mysql_fetch_array($this->resultId, MYSQL_ASSOC);\n }", "title": "" }, { "docid": "3e3bdca3acccbfeefd5979d7d49d0eaf", "score": "0.6123392", "text": "public function getRow()\n {\n return $this->row;\n }", "title": "" }, { "docid": "30f268c47792a3185147433c7b07623d", "score": "0.6118145", "text": "public function current()\n\t{\n\t\t/* @var $c NoSqlModel */\n\t\t$c = new $this->_className;\n\t\t$c->setData($this->_cursor->current(), false);\n\t\treturn $c;\n\t}", "title": "" }, { "docid": "aacfd05d2cc3d4b71f1140db36ba57bd", "score": "0.6111968", "text": "abstract public function fetchRow($res);", "title": "" }, { "docid": "639fa2136301cb12ec228a6fe82a97a3", "score": "0.61092436", "text": "function fetch_row() { \r\n\t\t\t$row=@mysql_fetch_row($this->es_resultset); \r\n\t\t\treturn $row; \r\n\t\t}", "title": "" }, { "docid": "d641f6b7b6a33451daa8629a058a549b", "score": "0.60941696", "text": "public function rewind() \n {\n if ($this->index !== null) $this->st->execute();\n $this->row = $this->st->fetch();\n $this->index = 0;\n }", "title": "" }, { "docid": "e34e68304d6191f7f1bd5f60a0fe8870", "score": "0.60940427", "text": "protected function getRow()\r\n\t{\r\n\t\tif ($this->resultType == 'mysqli') {\r\n\t\t\treturn $this->dbResult->fetch_assoc();\r\n\t\t} else {\r\n\t\t\treturn $this->dbResult->fetch(\\PDO::FETCH_ASSOC);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "0c5967edc49c105cdd875341fcc963c3", "score": "0.60896945", "text": "public function current() {\r\n if (is_null($this->result)) {\r\n $this->fetchData();\r\n }\r\n $var = current($this->result);\r\n return $var;\r\n }", "title": "" }, { "docid": "dd478ab401986266ff706ad7a4f0cade", "score": "0.6083743", "text": "public function getRow(): Row\n {\n return $this->row;\n }", "title": "" }, { "docid": "b315841152cbbfc2dd881dd26e1ffe4c", "score": "0.608177", "text": "public function getRow()\n\t{\n\t\treturn $this->row;\n\t}", "title": "" }, { "docid": "eb3f119936c89127d968650488cb8586", "score": "0.6068322", "text": "public function nextRowset () {}", "title": "" }, { "docid": "1f8b208464723b5726a3b9ee83a83a4d", "score": "0.60653263", "text": "public final function next() {\n\t\tif ($this->value === null) return; // we're after the end (or before the start)\n\n\t\t// try next row from current batch\n\t\t$this->nextRow();\n\t\tif ($this->value !== null) return;\n\n\t\t// reached end of current batch - try next one \n\t\t$this->nextBatch();\n\t\t$this->nextRow();\n\t}", "title": "" }, { "docid": "ff2a5525397cadfc2fad368e4c5cfe2b", "score": "0.60571367", "text": "abstract public function fetchRow($result);", "title": "" }, { "docid": "c7f003066fbdfd4fcbbd280ae6d7f49a", "score": "0.6054475", "text": "abstract public function seek($row);", "title": "" }, { "docid": "38d3187e12238a0290f6fb76962fce2a", "score": "0.60385156", "text": "public function next() {\n if (!$this->record) throw new NoSuchElementException('No more elements');\n do {\n $this->jp->joinpart->extract($this, $this->record, JoinProcessor::FIRST);\n if (!is_null($this->resultObj)) {\n $r= $this->resultObj;\n $this->resultObj= NULL;\n return $r;\n }\n } while ($this->record= $this->rs->next());\n return $this->obj;\n }", "title": "" }, { "docid": "46a596817ca33f1b6dd4ae7e4081a3ac", "score": "0.603074", "text": "public function row()\n\t{\n\t\t$arguments = func_get_args();\n\t\t$sth = call_user_func_array(array($this, 'query'), $arguments);\n\t\treturn $sth->fetch(\\PDO::FETCH_OBJ);\n\t}", "title": "" }, { "docid": "006fc597bbecffefd76d636f4408bffe", "score": "0.6027289", "text": "public function fetch()\n {\n $this->execute();\n\n return isset($this->rows[0]) ? $this->rows[0] : null;\n }", "title": "" }, { "docid": "57a3aff81b1e64bf2cc4ddd5dbb9c484", "score": "0.60109055", "text": "public function fetch() {\n\t\treturn $this->queryResult->getFirst ();\n\t}", "title": "" }, { "docid": "f3fe54506ce6755a8e357d248f3d4bb2", "score": "0.6010453", "text": "public function _fetchObject() {\r\n try {\r\n $ii = 0;\r\n $_sqlStoreValues = array();\r\n while ($this->_sqlRows = $this->_sqlExec->fetch_object()) {\r\n $_sqlStoreValues[] = $this->_sqlRows;\r\n $ii++;\r\n }\r\n $this->_sqlExec->free();\r\n if($ii>1){\r\n $this->_sqlLink->next_result();\r\n } else {\r\n \r\n }\r\n return $_sqlStoreValues;\r\n } catch (DatabaseException $e) {\r\n Errors::launch($e);\r\n } catch (Exception $e) {\r\n Errors::launch($e);\r\n }\r\n }", "title": "" }, { "docid": "1960e9d93fc25276f42cc72d2685ab03", "score": "0.60060704", "text": "public function getRow()\n {\n return isset($this->Row) ? $this->Row : null;\n }", "title": "" }, { "docid": "aa19ff6a7f4caaeb6683166f3f0e8b17", "score": "0.5998538", "text": "public function next() {\n if ($this->_batch === null || next($this->_batch) === false) {\n $this->_batch = $this->fetchData();\n reset($this->_batch);\n $this->_value = $this->_batch;\n $this->_key = null;\n }\n\n $this->_key = $this->_key === null ? 0 : $this->_key + 1;\n }", "title": "" }, { "docid": "40e8af8ba14d37bb701541f7f7556104", "score": "0.5993293", "text": "abstract protected function _resultNextRow($result);", "title": "" }, { "docid": "62241f340ea8dccc467f7967a36af76a", "score": "0.5992192", "text": "public function fetch_data()\n\t{\n\t\tglobal $Mysql;\n\t\t\n\t\t// Don't bother if we know there is no row for this object.\n\t\tif ( !$this->exists() )\n\t\t\treturn 0;\n\t\t\n\t\t$table_qry = $Mysql->query(\"SELECT * FROM `\". $this->db_table_name .\"` \n\t\t\tWHERE `id` = '\". $this->id .\"'\");\n\t\tif ( $table_qry->num_rows == 0 )\n\t\t\t$this->id = false;\n\t\telse\n\t\t{\n\t\t\t$table_qry->data_seek(0);\n\t\t\t$table_row = $table_qry->fetch_assoc();\n\t\t\t\n\t\t\tforeach ( $table_row as $field => $value )\n\t\t\t{\n\t\t\t\t// Skip over any of the non-database fields.\n\t\t\t\tif ( in_array($field, $this->extra_fields) )\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\t$this->$field = $value;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "3bf66786b361af9fc7490dae2b40ca7b", "score": "0.5989918", "text": "abstract function fetchRow($result);", "title": "" }, { "docid": "9a433e6c2f0c53d20c0986951ac1e322", "score": "0.59882325", "text": "public function getRow()\n {\n return ($this->valid() ? $this->current() : false);\n }", "title": "" } ]
ba0adfa4c07d4ef2e49e49198cf39d4f
Delete a Group Parmeters example: $parameters = array ( "groupType" => array ( // array mandatory "groupId" => 123456 // int mandatory ) );
[ { "docid": "b2e5b9bccfb18b4011a01fd0d70da54d", "score": "0.7960877", "text": "public function delete($parameters) {\r\n $request = FlexmailAPI::parseArray($parameters);\r\n\r\n $response = $this->execute(\"DeleteGroup\", $request);\r\n return FlexmailAPI::stripHeader($response, $this->config->get('debug_mode'));\r\n\r\n }", "title": "" } ]
[ { "docid": "0480804ac504d98bfda7e260a277d81e", "score": "0.68532425", "text": "public function delete() {\r\n\t\tif (isset($_POST['id'])) {\r\n\t\t\t$id = (int)$_POST['id'];\r\n\t\t\tif ($id == 1) {\r\n\t\t\t\t$response['success'] = false;\r\n\t\t\t\t$response['msg'] = Yii::t(\"app\",'Cannot delete Group ID = 1');\r\n\t\t\t} else {\r\n\t\t\t\t$sql = sprintf('DELETE FROM %s WHERE %s = %s', MENUGROUP_TABLE, MENUGROUP_ID, $id);\r\n\t\t\t\t$delete = $this->db->Execute($sql);\r\n\t\t\t\tif ($delete) {\r\n\t\t\t\t\t$sql = sprintf('DELETE FROM %s WHERE %s IN (%s)', MENU_TABLE, MENU_GROUP, $id);\r\n\t\t\t\t\t$this->db->Execute($sql);\r\n\t\t\t\t\t$response['success'] = true;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$response['success'] = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\theader('Content-type: application/json');\r\n\t\t\techo json_encode($response);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "3137e3fecee789374f08506c3b8fdc0c", "score": "0.6841195", "text": "public static function deleteObjectGroupEntitlements($param = array()){\n\n /** @var bool $access */\n $access = self::$UserEntitlementService->userHasEntitlement(CoreUser::getUser(), self::$UserEntitlementService->getEntitlement(UserModule::ENTITLEMENT_FULL_SYSTEM_ADMIN));\n\n if($access) {\n\n if(empty($_POST)) CoreLog::error('Need POST for method ' . __FUNCTION__);\n\n $groupid = isset($_POST['group_id']) ? $_POST['group_id'] : false;\n $groupurn = isset($_POST['group_urn']) ? $_POST['group_urn'] : false;\n $objecturn = isset($_POST['object_urn']) ? $_POST['object_urn'] : false;\n\n $result = self::$UserEntitlementService->removeGroupObjectEntitlements($groupid, $groupurn, $objecturn);\n\n CoreApi::setData('response', $result);\n\n }else{\n\n CoreNotification::set('You are not authorized to delete object group entitlements', CoreNotification::ERROR);\n\n }\n }", "title": "" }, { "docid": "2d8c1286ee2932e74fb2f4c2c68ec2b3", "score": "0.68102807", "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": "2324f2245c06b2e6291155fbb36a1185", "score": "0.67717403", "text": "function DeleteGroup ($id, $deleteapplications = 'True') {\n $path = REST_PATH . 'groups/' . $id . '.xml';\n\n // Setup the POST NAME/VALUE pairs\n $postdata = http_build_query(\n array(\n 'DeleteApplications' => $deleteapplications\n )\n );\n\n // Call Rest API\n $result = CallRestApi($path, $postdata, 'DELETE');\n \n // Read the returned XML\n $xml = simplexml_load_string($result) or die(\"Error: Cannot create object\");\n\n // Success?\n $msg = $xml->Info->Message;\n if ('Group was deleted' == $msg) {\n \treturn 1;\n }\n \n return 0;\n}", "title": "" }, { "docid": "e9d083ae2ec49f11e120bda93043a70c", "score": "0.6730998", "text": "public function deleteAdGroups(array $params = [])\n {\n return $this->httpPost('/sp/adGroups/delete', $params,[],false,$this->header);\n }", "title": "" }, { "docid": "be20c5a67d6b13268b59b0aa39084a0b", "score": "0.66764593", "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": "54ea2cf8243f8df09c5059495f0dcbba", "score": "0.66757643", "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": "9ddbd9efae506439d42255e85459c942", "score": "0.6595506", "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": "" }, { "docid": "698e4b249d0453cec486a212a6e5a142", "score": "0.657516", "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": "a8b9e2823020afe8893abf495f4cec8b", "score": "0.6528994", "text": "public function deletegroupAction($mode=null,$ids=null)\n {\n /** \n * Set layout to empty to\n * avoid unnecessary data. \n */\n $this->layout = 'empty';\n $this->check_admin_login();\n \n $ids = App::Module('Cryptography')->jsonDecode($this->post['ids']);\n\t\t\n\t\tif(strstr($mode,'informationset')){\n\t\t\t$type = substr($mode,15,strlen($mode));\n\t\t\t$mode = substr($mode,0,14);\n\t\t}\n if (!empty($ids)) { \n switch($mode) {\n case \"informationset\": \n /* Information Set Batch Delete */\t\t\t\t\t\n foreach ($ids as $id) {\n App::informationset($type)->DeleteById($id);\n }\n break;\n \n case \"categoryset\" :\n /* Category Set Batch Delete */\n foreach ($ids as $id) {\n App::Categoryset()\n ->setDeletedRow($id)\n ->Delete($id);\n }\n break;\n \n default :\n /* Category Set Batch Delete */\n foreach ($ids as $id) {\n App::Model($mode)\n ->setDeletedRow($id)\n ->deleteById($id);\n }\n break;\n\n }\n }\n\n // Register a message notification\n App::Module('Notification')->Push(\"Deleted successfully.\");\n }", "title": "" }, { "docid": "ff2d1c79b4df1077fa8e17d365c554aa", "score": "0.6526862", "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": "6d4dfd81dbf776361361ba3b38ec9c5d", "score": "0.6504314", "text": "public function _delete($url = null, array $parameters = []);", "title": "" }, { "docid": "c0ad68ed7ecc6928d0ea007c2555c74c", "score": "0.6465598", "text": "function delete() {\n if($this->active_project_group->isNew()) {\n $this->httpError(HTTP_ERR_NOT_FOUND);\n } // if\n \n if(!$this->active_project_group->canDelete($this->logged_user)) {\n $this->httpError(HTTP_ERR_FORBIDDEN);\n } // if\n \n if($this->request->isSubmitted()) {\n $delete = $this->active_project_group->delete();\n if($delete && !is_error($delete)) {\n if($this->request->getFormat() == FORMAT_HTML) {\n flash_success(\"Project group ':name' has been deleted\", array('name' => $this->active_project_group->getName()));\n $this->redirectTo('project_groups');\n } else {\n $this->httpOk();\n } // if\n } else {\n if($this->request->getFormat() == FORMAT_HTML) {\n flash_error(\"Failed to delete ':name' group. Reason: :reason\", array('name' => $this->active_project_group->getName(), 'reason' => $delete->getMessage()));\n $this->redirectTo('project_groups');\n } else {\n $this->serveData($delete);\n } // if\n } // if\n } else {\n $this->httpError(HTTP_ERR_BAD_REQUEST);\n } // if\n }", "title": "" }, { "docid": "434359041024cc6e22eab77d0f646ff8", "score": "0.6456278", "text": "protected function adgroupsDeleteRequest($data)\n {\n // verify the required parameter 'data' is set\n if ($data === null || (is_array($data) && count($data) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $data when calling adgroupsDelete'\n );\n }\n\n $resourcePath = '/adgroups/delete';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($data)) {\n $_tempBody = $data;\n }\n\n if (in_array('multipart/form-data', ['application/json', 'application/xml'])) {\n $multipart = true;\n }\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json', 'application/xml']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\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 if (class_exists('\\GuzzleHttp\\Psr7\\Query')) {\n $httpBody = \\GuzzleHttp\\Psr7\\Query::build($formParams);\n } else {\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('access_token');\n if ($apiKey !== null) {\n $queryParams['access_token'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('nonce');\n if ($apiKey !== null) {\n $queryParams['nonce'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('timestamp');\n if ($apiKey !== null) {\n $queryParams['timestamp'] = $apiKey;\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 if (class_exists('\\GuzzleHttp\\Psr7\\Query')) {\n $query = \\GuzzleHttp\\Psr7\\Query::build($queryParams);\n } else {\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n }\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "67ae5439d132204e71baf465523fe530", "score": "0.64557743", "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": "86f0e2760482372d656cda9d08ae5ca8", "score": "0.6449656", "text": "function _deleteGroup()\n\t{\n\t\t// Get the informations\n\t\t$group = kform::getInput('group');\n\t\tlist($drawId, $groupname) = explode(';', $group);\n\n\t\t// Delete the draws\n\t\t$oGroup = new objgroup();\n\t\t$oGroup->deleteGroup($drawId, $groupname);\n\t\t$page = new utPage('none');\n\t\t$page->close(true, 'draws', DRAW_DISPLAY , $drawId);\n\t\texit();\n\t}", "title": "" }, { "docid": "f7b97c979fb8d29365f6844827124ff7", "score": "0.639496", "text": "public function deleteGroup($groupId)\n {\n return $this->start()->uri(\"/api/group\")\n ->urlSegment($groupId)\n ->delete()\n ->go();\n }", "title": "" }, { "docid": "6acba2f586bbfc0e57795cec5903d7c2", "score": "0.6376731", "text": "public function delete_group()\n\t{\n\t\t$sql\t= array();\n\n\t\tif ( ! isset($_POST['delete']) OR ! is_array($_POST['delete']))\n\t\t{\n\t\t\treturn $this->home();\n\t\t}\n\n\t\t$ids = array();\n\n\t\tforeach ($_POST['delete'] as $key => $val)\n\t\t{\n\t\t\tif ( is_numeric($val) )\n\t\t\t{\n\t\t\t\t$ids[] = $val;\n\t\t\t}\n\t\t}\n\n\t\t$query\t= ee()->db->query(\n\t\t\t\"SELECT group_id\n\t\t\t FROM \texp_friends_groups\n\t\t\t WHERE \tgroup_id\n\t\t\t IN \t('\" . implode(\"','\", ee()->db->escape_str($ids)) . \"')\"\n\t\t);\n\n\t\t//\t----------------------------------------\n\t\t//\tDelete groups\n\t\t//\t----------------------------------------\n\n\t\tforeach ( $query->result_array() as $row )\n\t\t{\n\t\t\t$sql[]\t= \"DELETE FROM \texp_friends_groups\n\t\t\t\t\t WHERE \t\tgroup_id = '\" . ee()->db->escape_str($row['group_id']) . \"'\";\n\n\t\t\t$sql[]\t= \"DELETE FROM \texp_friends_group_posts\n\t\t\t\t\t WHERE \t\tgroup_id = '\" . ee()->db->escape_str($row['group_id']) . \"'\";\n\n\t\t\t$sql[]\t= \"DELETE FROM \texp_friends_group_entry_posts\n\t\t\t\t\t WHERE \t\tgroup_id = '\" . ee()->db->escape_str($row['group_id']) . \"'\";\n\t\t}\n\n\t\tforeach ( $sql as $q )\n\t\t{\n\t\t\tee()->db->query($q);\n\t\t}\n\n\t\t$message = ($query->num_rows() == 1) ?\n\t\t\t\t\t\tstr_replace(\n\t\t\t\t\t\t\t'%i%',\n\t\t\t\t\t\t\t$query->num_rows(),\n\t\t\t\t\t\t\tlang('group_deleted')\n\t\t\t\t\t\t) : str_replace(\n\t\t\t\t\t\t\t'%i%',\n\t\t\t\t\t\t\t$query->num_rows(),\n\t\t\t\t\t\t\tlang('groups_deleted')\n\t\t\t\t\t\t);\n\n\t\t//\t----------------------------------------\n\t\t//\tReturn\n\t\t//\t----------------------------------------\n\n\t\treturn $this->groups($message);\n\t}", "title": "" }, { "docid": "8f5f04abf29823c614f0b279ad496c8b", "score": "0.63691914", "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": "0826c26a1aa0e58f224ee34d6551df9f", "score": "0.6361671", "text": "public function testGroupDelete()\n {\n $response = $this->route->delete('/group/' . $this->groups[0]->id);\n\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "7dc647b363c3971be43a8155defc7c88", "score": "0.63404536", "text": "public function delGroupA($values){\n\t\tif(!empty($values)){\n\t\t\t$LoginID = $values['LoginID'];\n\t\t\tinclude($_SERVER['DOCUMENT_ROOT'].'/_php/config.php');\n\t\t\t// -- Check that user is faculty\n\t\t\t$checkrole = \"SELECT Role From login WHERE LoginID = '$LoginID'\";\t\t\t\n\t\t\t$getRole = mysqli_query($con, $checkrole);\n\t\t\tif (mysqli_num_rows($getRole) > 0){\n\t\t\t\twhile($row = mysqli_fetch_array($getRole)){\n\t\t\t\t\t$myRole = $row['Role'];\n\t\t\t\t\tif ($myRole == 'Faculty'){\n\t\t\t\t\t\t// -- Delete Class\n\t\t\t\t\t\t$sql = \"DELETE FROM group_assign WHERE GroupID = ? && LoginID = ?;\";\n\t\t\t\t\t\t\t$stmt = $con->prepare($sql);\n\t\t\t\t\t\t\t$stmt->bind_param(\"ii\", $values['GroupID'], $values['Subj']);\n\t\t\t\t\t\t\t$stmt->execute();\n\t\t\t\t\t\t\t$stmt->close();\n\t\t\t\t\t}\n\t\t\t\t\telse{ \n\t\t\t\t\t\techo \"There was an error.\";\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse{ \n\t\t\techo \"Only faculty can delete people from groups. <br/> Please Login.\"; \n\t\t}\n\t}", "title": "" }, { "docid": "ead2e0aa6c23d221e68859f2e30dbe0f", "score": "0.6318283", "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": "6fcfeb799971592e2cf40e018f9305a3", "score": "0.63128495", "text": "public function delete($group = NULL, $element = NULL, $parameters = NULL) {\n if ($this->verify()) {\n $this->getApcObject()->clearCache('user');\n return TRUE;\n }\n return 0;\n }", "title": "" }, { "docid": "d03dd92db022e431ba357d8700d7cb11", "score": "0.6291644", "text": "abstract public function delete(array $prm = array());", "title": "" }, { "docid": "434d8e084bbdc54e96009b916fd2b8b4", "score": "0.6283443", "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": "82a6429b76a7cd7a4a053ff100581e42", "score": "0.6279862", "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": "546cefea80f4bc47c88684d45fc02010", "score": "0.62744236", "text": "function delete_group($group_id)\n {\n // Delete the group\n $query_string = \"DELETE FROM groups WHERE id = ?\";\n $query = $this->db->query($query_string, array($group_id));\n\n // Delete the followers\n $query_string = \"DELETE FROM group_relationships WHERE group_id = ?\";\n $query = $this->db->query($query_string, array($group_id));\n\n // Delete corresponding notifications\n $query_string = \"DELETE FROM notifications WHERE (type = ? OR type = ?) AND subject_id = ?\";\n $query = $this->db->query($query_string, array(\n 'group_invite',\n 'join_group_request',\n $group_id));\n }", "title": "" }, { "docid": "a93a61b0a534ff0d6c2465e61cc75fd9", "score": "0.6265534", "text": "public function DeleteAgentGroup(){\n\t \t$id = $this->input->post('id');\n\t \t$id = url_value_decode($id);\n\t \t$this->agent_model->delete_agent_group($id);\n\t }", "title": "" }, { "docid": "9ad343bd2b4dd2b0bd5a9974d993ccc7", "score": "0.62305343", "text": "public function remove($group)\n {\n }", "title": "" }, { "docid": "0a04de00922982c7b1ea229f58bd2755", "score": "0.6202565", "text": "public function deleteSubscription($parameters) {\r\n $request = FlexmailAPI::parseArray($parameters);\r\n\r\n $response = $this->execute(\"DeleteGroupSubscription\", $request);\r\n return FlexmailAPI::stripHeader($response, $this->config->get('debug_mode'));\r\n\r\n }", "title": "" }, { "docid": "e17e5af8d36c956c2d15ec43718562a2", "score": "0.62009764", "text": "public function admin_delete(){\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 // Delete the group\n $delete_attempt = $this->Group->delete($this->params->id);\n if ($delete_attempt){\n $this->Session->setFlash('Group \\''.$group['Group']['name'].'\\' successfully deleted.', 'default', array('class' => 'alert alert-success'));\n CakeLog::write('admin', '[success] Group \\''.$group['Group']['name'].'\\' deleted.');\n $this->redirect(array('controller' => 'group', 'action' => 'index', 'admin' => true));\n } else {\n $this->Session->setFlash('There was an error deleting the \\''.$group['Group']['name'].'\\' group.', 'default', array('class' => 'alert alert-error'));\n CakeLog::write('admin', '[error] Group \\''.$group['Group']['name'].'\\' could not be deleted.');\n $this->redirect(array('controller' => 'group', 'action' => 'index', 'admin' => true));\n }\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": "77429a73dec9879601a8c6c689add1c2", "score": "0.6188073", "text": "public function delete($params = [])\n {\n }", "title": "" }, { "docid": "c905c28f0bbb558f6dabffe0234526b8", "score": "0.6184529", "text": "function delete_list($group_ids)\n {\n $this->db->where_in('group_id', $group_ids);\n $success = $this->db->update('groups', array('deleted' => 1));\n return $success;\n }", "title": "" }, { "docid": "43e92c3603ddb4e82eb14e03331ef1c7", "score": "0.6173103", "text": "public function phrase_delete_group()\n {\n $group_id = ee()->input->get('phrase_group_id', TRUE);\n $groups = array('' => '- Select -');\n\n foreach (ee()->publisher_phrase->get_groups() as $id => $group)\n {\n if ($group_id != $id)\n {\n $groups[$id] = $group->group_label;\n }\n }\n\n $vars = array(\n 'group_name' => ee()->publisher_phrase->get_group($group_id)->group_label,\n 'groups' => $groups,\n 'hidden' => array('group_id' => $group_id),\n 'delete_url' => ee()->publisher_helper_cp->mod_link('phrase_delete_group_execute', array(), TRUE),\n );\n\n return ee()->load->view('phrase/delete_group', $vars, TRUE);\n }", "title": "" }, { "docid": "9c2df08b9ba112ba008bb90a29765f8c", "score": "0.61602736", "text": "public function delete()\n {\n $update_data = $this->insert_global_model->globalinsert($this->tbl_exam_users_activity,array('user_id'=>$this->logged_in_user->id,\n 'activity_time'=>date('Y-m-d H:i:s'),'activity'=>'Delete Admin Group'));\n $group_id = (int)$this->uri->segment(4);\n $res = $this->admin_group_model->delete_admin_group($group_id);\n\n if ($res > 0) {\n $this->session->set_flashdata('message_success', 'Delete is successful.');\n } else {\n $this->session->set_flashdata('message_error', $this->admin_group_model->error_message .' Delete is unsuccessful.');\n }\n \n redirect('administrator/admingroup');\n }", "title": "" }, { "docid": "4a30a333f92c2b0e0535a7fa2197dab9", "score": "0.6157578", "text": "function delGroupHandler() {\n global $inputs;\n\n $sql = \"delete from `group` where id = \" . $inputs['id'];\n execSql($sql);\n\n formatOutput(true, 'delete success');\n}", "title": "" }, { "docid": "c0a40f8edcb088f35b11b3111717cddc", "score": "0.6153737", "text": "public function delete($parameters = array())\n {\n $this->callDeleteItemEndpoint(__METHOD__, $parameters);\n }", "title": "" }, { "docid": "2ddfa724e5e04c10c6491875db3a0841", "score": "0.61512804", "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": "080a16a22931c0d461c66db368b0f9e2", "score": "0.61340994", "text": "public function mass_remove_group()\n {\n $ids = json_decode($this->input->post('ids'), true); //convert json into array\n foreach ($ids as $id) {\n $resultat = $this->m_feuille_controle->remove_group($id);\n }\n }", "title": "" }, { "docid": "12533e353eae417cf5aa913b9cd0184e", "score": "0.6113426", "text": "function delete_group($group_id)\n {\n return $this->db->delete('groups',array('group_id'=>$group_id));\n }", "title": "" }, { "docid": "2a40e39a40a82b1fdccbfa3488710232", "score": "0.60604936", "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": "c2d9ac1c7a43ddae2299f2856bfbfde6", "score": "0.6056727", "text": "public function groupDelete(Request $request){\n try{\n $id = Crypt::decryptString($request->group_id);\n } catch (DecryptException $e) {\n return 'DD-E0001';\n }\n\n $logs = New LogsGroupUpdate;\n $logs->action = 1;\n $logs->user_id = auth()->user()->id;\n $logs->group_id = $id;\n $logs->save();\n\n $group = Group::find($id);\n $group->status = Carbon::now();\n $group->update();\n \n return redirect()->route('welcome');\n }", "title": "" }, { "docid": "09de593b673e1a3ee260e01003cfd49c", "score": "0.60502285", "text": "function deleteGroup($db, $session, $adminfunctions) {\n\n if (isset($_GET['stop'])) {\n $stop = $_GET['stop'];\n } else {\n $stop = '';\n }\n\n if ($adminfunctions->verifyStop($session->username, 'delete-group', $stop) == '2') {\n\n $group_id = $_GET['delete'];\n\n $sql = $db->prepare(\"DELETE FROM groups WHERE group_id = :group_id\");\n $done = $sql->execute(array(':group_id' => $group_id));\n if ($done) {\n $delete_users_from_group = $db->prepare(\"DELETE FROM users_groups WHERE group_id = :group_id\");\n $delete_users_from_group->execute(array(':group_id' => $group_id));\n }\n header(\"Location: ../usergroups.php\");\n } else {\n header(\"Location: process.php\");\n }\n}", "title": "" }, { "docid": "86d252b8d1d10a4c6dd9212633e8db35", "score": "0.60135883", "text": "public function delete(array $parameters)\n {\n return $this->client->delete($parameters);\n }", "title": "" }, { "docid": "4fef24ecf903a797959a9ff775b39801", "score": "0.60118926", "text": "public function deleteGroups(array $group_ids) {\n return $this->get('delete_groups', ['group_ids' => $group_ids]);\n }", "title": "" }, { "docid": "46f8a2257625076fc20bf8a81f4b69e2", "score": "0.60055864", "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": "3b63498d96955931b5fd98ce6436be8d", "score": "0.59850466", "text": "public function deleteAction(Request $request, $id)\n {\n \t$eManager = $this->getDoctrine()->getManager();\n \t$projectGroup = $eManager->getRepository('ProjectBundle:ProjectGroup')->find($id);\n \t \n \tif (!$projectGroup) {\n \t\tthrow $this->createNotFoundException('Unable to find ProjectGroup entity.');\n \t}\n \t \n \t$form = $this->createDeleteForm($id);\n \t$form->handleRequest($request);\n \n \n \tif ($form->isValid()) {\n \t\t \n \t\t$eManager->remove($projectGroup);\n \t\t$eManager->flush();\n \n \n \t\t$this->get('session')->getFlashBag()->set(\n \t\t\t\t'success',\n \t\t\t\tarray(\n \t\t\t\t\t\t'alert' => 'success',\n \t\t\t\t\t\t'title' => 'ProjectGroup Deleted!',\n \t\t\t\t\t\t'message' => 'The project '.$projectGroup->getName().' has been deleted'\n \t\t\t\t)\n \t\t);\n \t}\n \telse {\n \t\t \n \t\t$this->get('session')->getFlashBag()->set(\n \t\t\t\t'error',\n \t\t\t\tarray(\n \t\t\t\t\t\t'alert' => 'error',\n \t\t\t\t\t\t'title' => 'Error!',\n \t\t\t\t\t\t'message' => 'The project '.$projectGroup->getName().' has NOT been deleted'\n \t\t\t\t)\n \t\t);\n \t}\n \n \t$result = array();\n \t$response = new Response(json_encode($result));\n \t$response->headers->set('Content-Type', 'application/json');\n \t \n \treturn $response;\n }", "title": "" }, { "docid": "57bdf82d7ea803d27e8d97e5feb06008", "score": "0.59766454", "text": "public function deleteGroup( $groupName )\n {\n $this->service->deleteGroup($groupName);\n }", "title": "" }, { "docid": "5efefeff2030b661f9a21c6270cf20cd", "score": "0.5967872", "text": "public function deleteGroup($group)\n {\n // TODO: Implement deleteGroup() method.\n }", "title": "" }, { "docid": "aaee49ea3e1097f9fd91a2f349b62eb3", "score": "0.59656864", "text": "public function service_deleteGroup($request, $response)\n {\n\n // load request parameters an interpret as flags\n $params = new ContextListing($request);\n $domainNode = $this->getDomainNode($request);\n\n /* @var $model AclMgmt_Model */\n $model = $this->loadModel('AclMgmt');\n $model->domainNode = $domainNode;\n $model->checkAccess($domainNode, $params);\n\n // fetch the user parameters\n $objid = $request->param('objid', Validator::EID);\n\n $model->deleteGroup($objid);\n\n /* @var $view AclMgmt_Ajax_View */\n $view = $response->loadView(\n $domainNode->domainName.'-acl-mgmt',\n 'AclMgmt',\n 'displayDeleteGroup'\n );\n $view->domainNode = $domainNode;\n\n $view->setModel($model);\n $view->displayDeleteGroup($objid);\n\n }", "title": "" }, { "docid": "d51db8233ba10220da767a40b9ae2077", "score": "0.5962738", "text": "public function delete_multiple(array $keys, $group = '')\n {\n }", "title": "" }, { "docid": "11b58421bcf86f38fb043bc9307366b6", "score": "0.59496975", "text": "public function live_groups_delete(Request $request) {\n\n try {\n\n $validator = Validator::make($request->all(),\n array(\n 'live_group_id' => 'required|integer|exists:live_groups,id,user_id,'.$request->id,\n ),\n array(\n 'exists' => Helper::error_message(908)\n )\n );\n\n if ($validator->fails()) {\n\n $error = implode(',', $validator->messages()->all());\n\n throw new Exception($error, 101);\n \n } else { \n\n $group_details = LiveGroup::where('id',$request->live_group_id)->first();\n\n if(!$group_details) {\n\n throw new Exception(Helper::error_message(908), 908);\n \n }\n\n if($group_details->user_id != $request->id) {\n throw new Exception(Helper::error_message(909), 909);\n }\n\n if($group_details->delete()) {\n\n $response_array = ['success' => true , 'message' => Helper::get_message(132) , 'code' => 132];\n\n } else {\n\n throw new Exception(Helper::error_message(907), 907);\n }\n\n }\n\n return response()->json($response_array,200);\n\n } catch(Exception $e) {\n\n $error_message = $e->getMessage();\n\n $error_code = $e->getCode();\n\n $response_array = ['success'=>false, 'error'=> $error_message , 'error_messages' => $error_message, 'error_code' => $error_code];\n\n return response()->json($response_array);\n\n }\n\n }", "title": "" }, { "docid": "b3ec0e6c42cb58112bc63af9f014a062", "score": "0.59393466", "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": "57db87c1610abf30daf42c85a9240fb3", "score": "0.59325916", "text": "function DeleteGroup($groupid) {\n $proc = $this->Delete($this->grptable, \"WHERE groupid = '$groupid'\");\n return $proc;\n }", "title": "" }, { "docid": "b8d2a46ef51c5d5e1296232468b2ff12", "score": "0.5929396", "text": "public function delete_group($id){\n $this->db->where('group_id', $id);\n $this->db->delete('member_group');\n }", "title": "" }, { "docid": "a1a57c45c039cb38cd920e66cd00a205", "score": "0.589697", "text": "function deleteGroup($id = '')\n {\n\n //profiling::\n $this->debug_methods_trail[] = __function__;\n\n //declare\n $conditional_sql = '';\n\n //if no valie client id, return false\n if (! is_numeric($id)) {\n $this->__debugging(__line__, __function__, 0, \"Invalid Data [id=$id]\", '');\n //ajax-log error to file\n log_message('error', '[FILE: ' . __file__ . '] [FUNCTION: ' . __function__ . '] [LINE: ' . __line__ . \"] [MESSAGE: deleting group failed (group_id: $id is invalid)]\");\n return false;\n }\n\n //escape params items\n $id = $this->db->escape($id);\n\n //----------sql & benchmarking start----------\n $this->benchmark->mark('code_start');\n\n //----------monitor transaction start----------\n $this->db->trans_start();\n\n //_____SQL QUERY_______\n $query = $this->db->query(\"DELETE FROM groups\n WHERE groups_id = $id\");\n\n $results = $this->db->affected_rows(); //affected rows\n\n //----------monitor transaction end----------\n $this->db->trans_complete();\n $transaction_result = $this->db->trans_status();\n if ($transaction_result === false) {\n\n //log this error\n $db_error = $this->db->_error_message();\n log_message('error', '[FILE: ' . __file__ . '] [FUNCTION: ' . __function__ . '] [LINE: ' . __line__ . \"] [MESSAGE: Database Error - $db_error]\");\n\n return false;\n }\n\n //benchmark/debug\n $this->benchmark->mark('code_end');\n $execution_time = $this->benchmark->elapsed_time('code_start', 'code_end');\n\n //debugging data\n $this->__debugging(__line__, __function__, $execution_time, __class__, $results);\n //----------sql & benchmarking end----------\n\n //return results\n if ($results === 1) {\n return true;\n } else {\n return false;\n }\n\n }", "title": "" }, { "docid": "54bf26236ce90f1890362d4c354d2b38", "score": "0.5891165", "text": "protected function deleteGroupRequest($groupname)\n {\n // verify the required parameter 'groupname' is set\n if ($groupname === null || (is_array($groupname) && count($groupname) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $groupname when calling deleteGroup'\n );\n }\n\n $resourcePath = '/group';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($groupname !== null) {\n $queryParams['groupname'] = ObjectSerializer::toQueryValue($groupname);\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 $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 (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) {\n $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . \":\" . $this->config->getPassword());\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $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": "c3fd9cd30f29714fe346b49f5c4ba682", "score": "0.5886066", "text": "function deleteGroup($id){\n global $link;\n\n $group = getAdminService($id);\n $q = \"DELETE FROM services WHERE id={$id}\";\n $result = mysqli_query($link,$q);\n if(!$result){\n return false;\n }\n\n $images = array(\n 'image' => $group['image'],\n 'image_hover' => $group['image_hover'],\n );\n\n return $images;\n}", "title": "" }, { "docid": "7aea33d1b60aa1521184767fb5f31553", "score": "0.58671", "text": "public function delete($parameters = [])\n {\n return $this->get('delete', $parameters);\n }", "title": "" }, { "docid": "2531f4405783fc5e81d0c0490ef9d89f", "score": "0.5843452", "text": "public function delete($data){\n\t\tif(empty($data['adgroup_id'])){\n\t\t\tthrow new \\Exception('adgroup id is required.');\n\t\t}\n\t\tif(empty($data['ad_id'])){\n\t\t\tthrow new \\Exception('ad_id is required.');\n\t\t}\n\t\t$operations = array();\n\t\t$textAd = new \\TextAd();\n\t\t$textAd->id = $data['ad_id'];\n\t\t\n\t\t// Create ad group ad.\n\t\t$adGroupAd = new \\AdGroupAd();\n\t\t$adGroupAd->adGroupId = $adGroupId;\n\t\t$adGroupAd->ad = $textAd;\n\t\t\n\t\t// Create operation.\n\t\t$operation = new \\AdGroupAdOperation();\n\t\t$operation->operand = $adGroupAd;\n\t\t$operation->operator = 'REMOVE';\t\t\n\t\t$operations = array($operation);\n\n\t\t// Make the mutate request.\n\t\t$result = $this->adGroupAdService->mutate($operations);\n\t\t$adGroupAd = $result->value[0];\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "5bdf68221b22443d1187b675da3a30f9", "score": "0.5834412", "text": "function delete( $group_id ) {\n\n\t // start the transaction\n\t $this->db->trans_start();\n\n\t // check access\n\t $this->check_access( DEL );\n\n\t // enable trigger to delete all products related data\n\t $enable_trigger = true;\n\n\t if ( ! $this->ps_delete->delete_module_group( $group_id, $enable_trigger )) {\n\t // if there is an error in deleting products,\n\n\t // rollback\n\t $this->trans_rollback();\n\n\t // error message\n\t $this->set_flash_msg( 'error', get_msg( 'err_model' ));\n\t redirect( $this->module_site_url());\n\t }\n\t /**\n\t * Check Transcation Status\n\t */\n\t \tif ( !$this->check_trans()) {\n\n\t $this->set_flash_msg( 'error', get_msg( 'err_model' )); \n\t } else {\n\t \n\t $this->set_flash_msg( 'success', get_msg( 'success_group_delete' ));\n\t }\n\n\t redirect( $this->module_site_url());\n\t}", "title": "" }, { "docid": "dead7000b8ad24b75ab8ea7a6288f7d7", "score": "0.5831931", "text": "function usergroups_delete($pkid){\r\n\t\t\t// You could do some checkups here and return '0' or other error consts.\r\n\t\t\t// Make a single query to delete all of the usergroupss at the same time :\r\n\t\t\tif(sizeof($pkid)<1){\r\n\t\t\t\treturn '0';\r\n\t\t\t} else if (sizeof($pkid) == 1){\r\n\t\t\t\t$query = \"DELETE FROM usergroups WHERE group_id = \".$pkid[0];\r\n\t\t\t\t$this->db->query($query);\r\n\t\t\t} else {\r\n\t\t\t\t$query = \"DELETE FROM usergroups WHERE \";\r\n\t\t\t\tfor($i = 0; $i < sizeof($pkid); $i++){\r\n\t\t\t\t\t$query = $query . \"group_id= \".$pkid[$i];\r\n\t\t\t\t\tif($i<sizeof($pkid)-1){\r\n\t\t\t\t\t\t$query = $query . \" OR \";\r\n\t\t\t\t\t} \r\n\t\t\t\t}\r\n\t\t\t\t$this->db->query($query);\r\n\t\t\t}\r\n\t\t\tif($this->db->affected_rows()>0)\r\n\t\t\t\treturn '1';\r\n\t\t\telse\r\n\t\t\t\treturn '0';\r\n\t\t}", "title": "" }, { "docid": "2b811dfc79bd3061914f45a748a4df4a", "score": "0.5826984", "text": "public function deleted(GroupProject $groupProject)\n {\n //\n }", "title": "" }, { "docid": "91519d254a3eec480db27b7400ea497b", "score": "0.5823473", "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": "cee418234daad21070721ba209fe5adc", "score": "0.57920665", "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": "1d1285cf99f302532fb5d19e8eafaf6b", "score": "0.5788064", "text": "public function delete_group($id = 0)\n\t{\n\t\t$params = is_array($id) ? $id : array('id'=>$id);\n\t\t \n\t\t$this->db->delete('navigation_groups', $params);\n return $this->db->affected_rows();\n\t}", "title": "" }, { "docid": "fbd666f8f157a50f0b87699f04c41365", "score": "0.5786069", "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": "886595ff6d769a85155a2fba678b0ff5", "score": "0.5781376", "text": "public function deleteAction()\n {\n $itemGroupRowId = $this->getRequest()->getParam('containerRowId');\n \n //get eventId of the event to be deleted\n $itemGroupId = $this->getRequest()->getParam('containerId');\n\n // get form\n $form = $this->_model->getForm('delete');\n \n //set form action\n //define form action\n $form->setAction($this->view->url(\n array(\n 'controller' => 'itemgrouprow',\n 'action' => 'delete',\n 'containerId' => $itemGroupId,\n 'containerRowId' => $itemGroupRowId,\n ),\n \n 'event'\n ));\n \n $this->processDelete(\n $form, \n 'msg_itemgrouprow_deleted',\n $this->view->url(\n array(\n 'controller' => 'itemgrouprow',\n 'action' => 'index',\n 'containerId' => $itemGroupId),\n 'event'\n ),\n $itemGroupRowId\n );\n }", "title": "" }, { "docid": "c15b9a880c1a8a2b668c97d235893ac9", "score": "0.57800937", "text": "public function delete_group($content_type_id, $group_id)\r\n {\r\n $message = 'Function delete_group not optimized and should not be called directly in ' .\r\n vB_Types::instance()->getContentTypeTitle($fields['contenttypeid']) .\r\n ' index controller. See vBSphinxSearch_Search_IndexController_Post for example.';\r\n vBSphinxSearch_Core::log_errors($message);\r\n\r\n $this->_content_type_id = $content_type_id;\r\n if ($this->_fetch_object_id_list($group_id))\r\n {\r\n return $this->_write_to_queue();\r\n }\r\n return false;\r\n }", "title": "" }, { "docid": "44ff6e379c1c7a15881705114446836b", "score": "0.57751673", "text": "function delete($url, $parameters = array()) {\r\n $response = $this->oAuthRequest($url, 'DELETE', $parameters);\r\n if ($this->format === 'json' && $this->decode_json) {\r\n return json_decode($response, true);\r\n }\r\n return $response;\r\n }", "title": "" }, { "docid": "5d80c18d8b34ce36a69f0ea65160c9c6", "score": "0.57737035", "text": "public function deleteGroupMembers($request)\n {\n return $this->start()->uri(\"/api/group/member\")\n ->bodyHandler(new JSONBodyHandler($request))\n ->delete()\n ->go();\n }", "title": "" }, { "docid": "58411047fc5eb210538c4e22975e975c", "score": "0.5766725", "text": "public function remove()\n {\n $arg = func_get_args();\n\n foreach ($this->group as $form) {\n if (! is_object($form)) {\n $form = new $form();\n }\n\n if (method_exists($form, 'delete')) {\n $form->delete(...$arg);\n }\n }\n }", "title": "" }, { "docid": "43919b54ad366ec80c544b4608076c9e", "score": "0.57533157", "text": "public function deleteGroup(GroupInterface $group, bool $soft = true): bool;", "title": "" }, { "docid": "c2c5526caa6a5c71d5d54f47784c95f7", "score": "0.5750346", "text": "public function delete($request, $parameters = [], $json = true)\n {\n return $this->request($request, $parameters, 'DELETE', $json);\n }", "title": "" }, { "docid": "1a431a969fd824ef1ccd2e7cd40ea8dd", "score": "0.57469445", "text": "public function update($parameters) {\r\n $request = FlexmailAPI::parseArray($parameters);\r\n\r\n $response = $this->execute(\"UpdateGroup\", $request);\r\n return FlexmailAPI::stripHeader($response, $this->config->get('debug_mode'));\r\n\r\n }", "title": "" }, { "docid": "e3710e88ce8026aae366037780952685", "score": "0.5740113", "text": "public function delete_group_member()\n\t{\n\t\tif ( ee()->input->get_post('item_id') === FALSE OR ee()->input->get_post('item_id') == '' )\n\t\t{\n\t\t\treturn $this->groups();\n\t\t}\n\n\t\tif ( ! isset($_POST['delete']) OR ! is_array($_POST['delete']))\n\t\t{\n\t\t\treturn $this->groups();\n\t\t}\n\n\t\t$ids = array();\n\n\t\tforeach ($_POST['delete'] as $key => $val)\n\t\t{\n\t\t\tif ( is_numeric($val) )\n\t\t\t{\n\t\t\t\t$ids[] = $val;\n\t\t\t}\n\t\t}\n\n\t\t$sql\t= \"SELECT \tfgp.member_id\n\t\t\t\t FROM \texp_friends_group_posts fgp\n\t\t\t\t WHERE \tfgp.site_id = '\".ee()->db->escape_str( ee()->config->item('site_id') ).\"'\n\t\t\t\t AND \t\tfgp.group_id = '\".ee()->db->escape_str( ee()->input->get_post('item_id') ).\"'\n\t\t\t\t AND \t\tfgp.member_id\n\t\t\t\t NOT IN \t( \tSELECT \tmember_id\n\t\t\t\t\t\t\t\tFROM \texp_friends_groups\n\t\t\t\t\t\t\t\tWHERE \tgroup_id = '\" . ee()->db->escape_str( ee()->input->get_post('item_id') ) . \"'\n\t\t\t\t\t\t\t)\n\t\t\t\t AND \t\tfgp.member_id\n\t\t\t\t IN \t\t('\" . implode(\"','\", ee()->db->escape_str($ids)) . \"')\";\n\n\t\t$query\t= ee()->db->query( $sql );\n\n\t\t//\t----------------------------------------\n\t\t//\tDelete members\n\t\t//\t----------------------------------------\n\n\t\t$sql\t= array();\n\n\t\tforeach ( $query->result_array() as $row )\n\t\t{\n\t\t\t$sql[]\t= \"DELETE FROM \texp_friends_group_posts\n\t\t\t\t\t WHERE \t\tmember_id = '\" . ee()->db->escape_str($row['member_id']) . \"'\n\t\t\t\t\t AND \t\t\tgroup_id = '\" . ee()->db->escape_str( ee()->input->get_post('item_id') ) . \"'\";\n\t\t}\n\n\t\tforeach ( $sql as $q )\n\t\t{\n\t\t\tee()->db->query($q);\n\t\t}\n\n\t\t$message = ($query->num_rows() == 1) ?\n\t\t\t\t\tstr_replace(\n\t\t\t\t\t\t'%i%',\n\t\t\t\t\t\t$query->num_rows(),\n\t\t\t\t\t\tlang('group_member_deleted')\n\t\t\t\t\t) : str_replace(\n\t\t\t\t\t\t'%i%',\n\t\t\t\t\t\t$query->num_rows(),\n\t\t\t\t\t\tlang('group_members_deleted')\n\t\t\t\t\t);\n\n\t\t//\t----------------------------------------\n\t\t//\tRecount members\n\t\t//\t----------------------------------------\n\n\t\tee()->load->library('friends_groups');\n\t\tee()->friends_groups->_update_group_stats(\n\t\t\tee()->input->get_post('item_id')\n\t\t);\n\n\t\t//\t----------------------------------------\n\t\t//\tReturn\n\t\t//\t----------------------------------------\n\n\t\treturn $this->groups($message);\n\t}", "title": "" }, { "docid": "0f507d69afdefa97b452f3c48444c93f", "score": "0.57392806", "text": "public function mass_unremove_group()\n {\n $ids = json_decode($this->input->post('ids'), true); //convert json into array\n foreach ($ids as $id) {\n $resultat = $this->m_feuille_controle->unremove_group($id);\n }\n }", "title": "" }, { "docid": "4b9e74afd55fc1f58f0e07baf598aa32", "score": "0.57361704", "text": "public function delete($params) {\n\t\t$request_url = \"{$this->url}&api_action=campaign_delete&api_output={$this->output}&{$params}\";\n\t\t$response = parent::curl($request_url);\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "0ef6b3917c4370a0eeaafb5f4c47bf1f", "score": "0.5734944", "text": "public function executeBatchDelete(sfWebRequest $request)\n {\n $q = Doctrine::getTable('Group')->createQuery('g')\n ->andWhereIn('g.id', $request->getParameter('ids'))\n ;\n $ids = array();\n foreach ( $q->execute() as $group )\n $ids[] = $group->id;\n $request->setParameter('ids', $ids);\n \n parent::executeBatchDelete($request);\n }", "title": "" }, { "docid": "1e0df65b639e575fa2b138f1b9ad1cdc", "score": "0.57275444", "text": "function delete($url, $parameters = array()) {\n\t\t$response = $this->oAuthRequest($url, 'DELETE', $parameters);\n\t\tif ($this->decode_json) {\n\t\t\treturn json_decode($response, true);\n\t\t}\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "b81c623773115811f5681ff62876fdef", "score": "0.57228696", "text": "function delMemberGroupHandle() {\n global $inputs;\n\n $sql = \"DELETE FROM `member_group` WHERE id = \" . $inputs['id'];\n execSql($sql);\n\n formatOutput(true, 'delete success');\n}", "title": "" }, { "docid": "19a96d8a48ef61c7d538e800a1bd5c7a", "score": "0.57193315", "text": "public function deleteGroup($in)\n {\n $em = $this->doctrine->getEntityManager();\n $group = $em->getRepository('CmarMeetingBundle:Group')->findOneBy(array('key' => $in->{'key'}));\n $meeting = $em->getRepository('CmarMeetingBundle:Meeting')->findOneByStatesAndTitle(array(Meeting::STATE_NOW, Meeting::STATE_NEW, Meeting::STATE_LOCKED), $in->{'name'});\n\n\n if ($group == NULL) {\n $this->logger->info(\"Group does not exist\"); \n throw new \\LogicException(\"Group does not exist\");\n } else {\n //$this->mapGroup($group, $in);\n $id_group = $this->adoAdmin->principalFindByName($group->getName());\n $xml = $this->adoAdmin->principalDelete($id_group);\n \n if ($group->getType() != 'personal'){//Es necesario que el grupo enviado por D+ contenga el Tipo de grupo en la acción borrar\n $xml = $this->meetingService->stop($meeting);\n $em->remove($meeting);\n }\n $em->remove($group);\n\n try {\n $em->flush();\n } catch (\\Exception $e) {\n $this->logger->info(\"DDBB Exception\"); \n throw new \\LogicException(\"DDBB Exception\", -1);\n }\n }\n }", "title": "" }, { "docid": "8d30fee1743cddb8e69b82efaa64b9b5", "score": "0.5708755", "text": "public function deleteData($sql, $params=[]){\n $this->create($sql,$params);\n\n }", "title": "" }, { "docid": "e831715d4fee4642718b94aae394b5fc", "score": "0.57030547", "text": "public function delete( $group_id = 0 )\n\t{\n\t\tif ( $this->input->post('delete') )\n\t\t{\n\t\t\tif ( $this->Group->remove() )\n\t\t\t{\n\t\t\t\t// TODO\n\t\t\t\tredirect('groups/roll');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// TODO\n\t\t\t}\n\t\t}\n\t\t\n\t\t$data = array (\n\t\t\t'group_id' => array('id' => $group_id )\n\t\t);\n\t\n\t\t$header = array(\n\t\t\t'title' => 'Delete group'\n\t\t);\n\t\n\t\t$this->load->view('header', $header);\n\t\t$this->load->view('menu');\n\t\t$this->load->view('groups/delete', $data);\n\t\t$this->load->view('footer');\n\t}", "title": "" }, { "docid": "2ccde541485a057f2a4801263cf43467", "score": "0.5699659", "text": "public static function delete($url, $parameters = null, $json_post = false, $header = array('Content-Type:application/json'), $object = true)\n {\n return self::restClient($url, 'DELETE', $parameters, $json_post, $header, $object);\n }", "title": "" }, { "docid": "499c7635019d348bf0bc659d3e589e22", "score": "0.5699218", "text": "function delete($id = null) \n {\n $this->Access->checkAccess('UserGroup', 'd');\n if (!$id) {\n $this->Session->setFlash('Invalid id for Group', 'flash_error');\n return $this->redirect('/groups');\n }\n if ($this->Group->del($id)) {\n $this->Status->deleteAll(array('group_id' => $id), false, true);\n return $this->redirect('/groups');\n }\n }", "title": "" }, { "docid": "10f8cd396b4a9c040cf59cef6c4007b0", "score": "0.5698644", "text": "function delete($url, $parameters = array()) {\n\t\t\t$response = $this->oAuthRequest($url, 'DELETE', $parameters);\n\t\t\tif ($this->format === 'json' && $this->decode_json) {\n\t\t\t\treturn json_decode($response, true);\n\t\t\t}\n\t\t\treturn $response;\n\t\t}", "title": "" }, { "docid": "ceec624e951494da198124b06a56fc72", "score": "0.5695515", "text": "public function deleteAudienceGroupRequest($audienceGroupId, string $contentType = self::contentTypes['deleteAudienceGroup'][0])\n {\n\n // verify the required parameter 'audienceGroupId' is set\n if ($audienceGroupId === null || (is_array($audienceGroupId) && count($audienceGroupId) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $audienceGroupId when calling deleteAudienceGroup'\n );\n }\n\n\n $resourcePath = '/v2/bot/audienceGroup/{audienceGroupId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($audienceGroupId !== null) {\n $resourcePath = str_replace(\n '{' . 'audienceGroupId' . '}',\n ObjectSerializer::toPathValue($audienceGroupId),\n $resourcePath\n );\n }\n\n\n $headers = $this->headerSelector->selectHeaders(\n [],\n $contentType,\n $multipart\n );\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the form parameters\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n // this endpoint requires Bearer authentication (access token)\n if (!empty($this->config->getAccessToken())) {\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 $operationHost = $this->config->getHost();\n $query = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'DELETE',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "ba57e68edadc73141ee3a53dc9b5f508", "score": "0.56929845", "text": "function delete($url, $parameters = array()) {\n $response = $this->oAuthRequest($url, 'DELETE', $parameters);\n if ($this->format === 'json' && $this->decode_json) {\n return json_decode($response, true);\n }\n return $response;\n }", "title": "" }, { "docid": "b2ebf1ce5ecf56981491f70e469beb1a", "score": "0.5680263", "text": "public function actionDeleteWithGroup($id)\n\t{\n $model = $this->loadModel($id);\n foreach($model->ExercisesGroups as $group)\n {\n $usersExerciseGroups = UserAndExerciseGroups::model()->findAllByAttributes(array('id_exercise_group'=>$group->id));\n\n if($group->type == 1) {\n GroupAndExercises::model()->deleteAllByAttributes(array('id_group'=>$group->id));\n foreach($usersExerciseGroups as $usersExerciseGroup)\n {\n UserAndExercises::model()->deleteAllByAttributes(array('id_relation'=>$usersExerciseGroup->id));\n $usersExerciseGroup->delete();\n }\n\n } elseif ($group->type == 2) {\n foreach($group->TestCriteria as $testCriteria)\n {\n LessonGroupCriteriaAndSkills::model()->deleteAllByAttributes(array('id_lesson_criteria'=>$testCriteria->id));\n $testCriteria->delete();\n }\n\n foreach($usersExerciseGroups as $usersExerciseGroup)\n {\n UserExerciseGroupSkills::model()->deleteAllByAttributes(array('id_test_group'=>$usersExerciseGroup->id));\n $usersExerciseGroup->delete();\n }\n }\n CoursesAndGroupExercise::model()->deleteAllByAttributes(array('id_group'=>$group->id));\n GroupExerciseAndSkills::model()->deleteAllByAttributes(array('id_group'=>$group->id));\n $group->delete();\n }\n LessonAndExerciseGroup::model()->deleteAllByAttributes(array('id_lesson'=>$model->id));\n if($model->delete())\n echo 1;\n\t}", "title": "" }, { "docid": "bf77cb9bbf18085f50b95832b52220ea", "score": "0.5678211", "text": "public function deleteEmail(){\n\t\textract($_POST);\n\t\t$this->db->where('id',$id);\n\t\tif($this->db->delete('mail_groups'))\n\t\t$_SESSION['mailMsg']=\"maildelete\";\n\t\telse $_SESSION['mailMsg']=\"error\";\n\n\t}", "title": "" }, { "docid": "d61c04cafee41fad85d3b713ef6b03ba", "score": "0.56753606", "text": "function delete_userGroup($idList, $number){\n if($number == 1){\n if(is_admin($idList)){\n return 0;\n }else{\n deleteRecord(TAB_USR_ROLE, \"userId = $idList\");\n deleteRecord(TAB_USERS, \"id = $idList\");\n }\n }else{\n $flag = false;\n for($i = 0; $i < count($idList); $i++){\n $id = $idList[$i];\n if(is_admin($id)){\n $flag = true;\n break;\n }\n }\n if(!$flag){\n for($j = 0; $j < count($idList); $j++){\n $id = $idList[$j];\n deleteRecord(TAB_USR_ROLE, \"userId = $id\");\n deleteRecord(TAB_USERS, \"id = $id\");\n }\n }else{\n return 0;\n }\n }\n return 1;\n}", "title": "" }, { "docid": "c848566509709962e0f477f5a71e06ad", "score": "0.5668781", "text": "public function delete($params)\n\t{\n\t\treturn $this->entity->delete($params);\n\t}", "title": "" }, { "docid": "c848566509709962e0f477f5a71e06ad", "score": "0.5668781", "text": "public function delete($params)\n\t{\n\t\treturn $this->entity->delete($params);\n\t}", "title": "" }, { "docid": "1f88d1f9df34ae9649372120e145d44b", "score": "0.56637067", "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": "2a4d8902a486f432f54569305551639d", "score": "0.5660622", "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": "1a75e8f6c157112e45582aa3155f7287", "score": "0.5658244", "text": "public function fakeDel($parameters)\n {\n return count($parameters[0]);\n }", "title": "" }, { "docid": "af71a556d67cc816507b3b1fc0c3b8c5", "score": "0.56578255", "text": "public function testDeleteActionNoGroupId()\n {\n $this->getRequest()->setMethod(\\Magento\\Framework\\App\\Request\\Http::METHOD_POST);\n $this->dispatch('backend/customer/group/delete');\n $this->assertRedirect($this->stringStartsWith(self::BASE_CONTROLLER_URL));\n }", "title": "" }, { "docid": "91863bd948b9b1a90206b178cce729a1", "score": "0.56496143", "text": "public function destroy(employees_groups $employees_groups)\n {\n //\n }", "title": "" }, { "docid": "0eb44a57ea2c936eb70814c3b4ccca4d", "score": "0.56495035", "text": "public function delete_list($params) {\n\t\t$request_url = \"{$this->url}&api_action=campaign_delete_list&api_output={$this->output}&{$params}\";\n\t\t$response = parent::curl($request_url);\n\t\treturn $response;\n\t}", "title": "" } ]
31d49af847f7a3fe23d716fbb0b526c9
Method to set the value of field inscrito
[ { "docid": "5d70e32a82cc910d55d0deec0f58fbee", "score": "0.0", "text": "public function setInscrito($inscrito)\n {\n $this->inscrito = $inscrito;\n\n return $this;\n }", "title": "" } ]
[ { "docid": "e4d3b0b3fa62ff7d8e2dad32611f76c9", "score": "0.71341085", "text": "public function setValueIn($value)\n\t{\n\t\t$this->value = $value;\n\t}", "title": "" }, { "docid": "24bf6ae9f79332f766c95b1c1912f7f0", "score": "0.6863327", "text": "public function setValue( $value );", "title": "" }, { "docid": "799e0a0a5f853d84a3f2dac4dacb15f9", "score": "0.6812153", "text": "public function setField($value) {\n\t\t$this->_field = $value;\n\t}", "title": "" }, { "docid": "4566dbb7ddb7b6071a21ed8dc63f093a", "score": "0.6763802", "text": "public function set($field, $value);", "title": "" }, { "docid": "e3ba33b4ae183e8ad604136c483172d2", "score": "0.67332035", "text": "public function setValue($fieldname, $value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.67009735", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.67009735", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.67009735", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.67009735", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.67009735", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.67009735", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.67009735", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.67009735", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.67009735", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.67009735", "text": "public function setValue($value);", "title": "" }, { "docid": "0b6f406b9d4b9f31772ecdb1515fc5d6", "score": "0.6678412", "text": "public function setField($field, $value);", "title": "" }, { "docid": "3238cad3b56631771f4527680f128426", "score": "0.6662889", "text": "abstract protected function set_metafield();", "title": "" }, { "docid": "ec85c65040d7ab7c5913733cb70f07a6", "score": "0.66107386", "text": "protected function setFieldValue ($field) {\n if ($this->$field instanceof Newforms_File)\n $this->$field->setValue('');\n if (!$this->__bound) return;\n if (is_array($this->__Data)) {\n if (isset($this->__Data[$field])) {\n $this->$field->setValue ($this->__Data[$field]);\n return;\n }\n return;\n }\n if (is_object ($this->__Data)) {\n if (isset($this->__Data->$field)) {\n $this->$field->setValue ($this->__Data->$field);\n return;\n }\n return;\n }\n }", "title": "" }, { "docid": "5aaa1cc4d60f40b4cb2e35dcc5b9bfdb", "score": "0.6598219", "text": "function setValue($value) {\n $this->value = $value;\n }", "title": "" }, { "docid": "7c5f098b1c15380e5224215c4098394c", "score": "0.65884626", "text": "public function setField($field);", "title": "" }, { "docid": "d6a71fff1ac709db56ec34e7d41d79f7", "score": "0.6579568", "text": "public function set($input, $value);", "title": "" }, { "docid": "4265995028f860ae16ff1047e93f2273", "score": "0.6577715", "text": "function setValue( $value ) {\n\t\t$this->value = $value;\n\t}", "title": "" }, { "docid": "d6c493a852bf7d8416b2484f40361279", "score": "0.65640676", "text": "function setValue(int $field, $value) : void;", "title": "" }, { "docid": "d73dd8fdc5e7ad8b6eaaa900c237804e", "score": "0.65519685", "text": "public function setValue($value){\n $this->_value = $value;\n }", "title": "" }, { "docid": "2e1fdb712a48fb9f4c12e21c8a7efa39", "score": "0.65441847", "text": "function setValue($value)\n\t{\n\t\t$this->value=$value;\n\t}", "title": "" }, { "docid": "735632e1b32c79bff2b0f81a4caec147", "score": "0.64832777", "text": "public function __set($field, $value) {\r\n $this->entity->$field = $value;\r\n }", "title": "" }, { "docid": "ff4410b30a3db88743196465ed8a32f0", "score": "0.6480142", "text": "public function setData($field, $object, $value);", "title": "" }, { "docid": "b63d709eecda9110802965df017f356a", "score": "0.6474287", "text": "function set_value($input)\n {\n\n $this->value = $input;\n return true;\n }", "title": "" }, { "docid": "5ebeaf17df708aaf0b62f733ce98058e", "score": "0.64424205", "text": "function value( $value )\n\t{\n\t\t$this->value = $value;\n\t}", "title": "" }, { "docid": "118a07dfa450e3456cfd8563cbca8089", "score": "0.6438007", "text": "public function setField(string $name, $value);", "title": "" }, { "docid": "75eb014fd8bb4cc9ea8193dde9a0db21", "score": "0.6360739", "text": "public function setValue($value) {\r\n\r\n $this->value = $value;\r\n\r\n }", "title": "" }, { "docid": "b8013e4c028b1e150ece2927fe2c279e", "score": "0.63359076", "text": "public function setField($key, $value);", "title": "" }, { "docid": "4832029f1c85a774955da258ecbf1b00", "score": "0.6309668", "text": "public function setValue($value) {\n $this->value = $value->value;\n }", "title": "" }, { "docid": "39b08c076f1b941e8bcb136852eb686d", "score": "0.63021463", "text": "public function __SET($atributo,$valor)\n {\n return $this->$atributo = $valor;\n }", "title": "" }, { "docid": "eabf1fb6646277a30d3b2c5f2fb235f3", "score": "0.630193", "text": "public function __SET($atributo,$valor)\r\n {\r\n return $this->$atributo = $valor;\r\n }", "title": "" }, { "docid": "0a6cd5420440c8f0a009851e87ba695c", "score": "0.62753856", "text": "public function setField($field) {\n\t\t$this->_field = $field;\n\t}", "title": "" }, { "docid": "ff88a3fed6d2ba7a8362544bacba8540", "score": "0.6273841", "text": "function set_value($new_value)\r\n {\r\n $this->value=$new_value;\r\n $this->form_element_value=$this->htmlencode($new_value);\r\n if(count($this->enum)>0) $this->form_element_options=$this->draw_options($this->value,$this->enum);\r\n }", "title": "" }, { "docid": "51fe429546c7d61e316b184a638060ba", "score": "0.6267534", "text": "abstract public function setData($field, $data);", "title": "" }, { "docid": "238a45b4a02e5b6bbdb491fe9c2ca69d", "score": "0.62312305", "text": "public function set($field, $value){\n\t\t\t$this->_fields[trim($field)] = trim($value);\n\t\t}", "title": "" }, { "docid": "b8a7b87fcf40d8e223fe7b18c41f471f", "score": "0.62191474", "text": "public function cb_field_set_value( &$value, $field )\n\t{\t\t\n\t\tif( $this->getFieldAttr( $field, 'ignore' ) )\n\t\t\treturn;\t\t\t\t\t\n\t\t\t\n\t\t$value = $this->getCookieData( $field->getSlug(), $value );\n\t}", "title": "" }, { "docid": "99131cc2a582bebabde41b1bb0f4e78e", "score": "0.6215813", "text": "public function __set($atributo, $valor){\n $this->$atributo = $valor;\n }", "title": "" }, { "docid": "5d4f8b9196d99e2b0d9f7d2160346485", "score": "0.62128043", "text": "public function setValor($valor){\r\n $this->Valor = $valor;\r\n }", "title": "" }, { "docid": "66be651c4c085a91b502c52610c5070c", "score": "0.6210565", "text": "public function set($atributo, $valor) {\r\n\t\t\t $this->$atributo = $valor;\r\n\t\t}", "title": "" }, { "docid": "43a2c7d5efd7792bc02ecaff23bbbbc9", "score": "0.61979574", "text": "private function setFieldValue() {\n $fieldValue = null;\n $field = $this->field;\n $isArray = is_array($field) || Connect::isArray($field);\n $defaults = $this->getDefaultValues($this->data['attrs']['name']);\n\n // Custom attributes and custom fields can have default values specified for them.\n // So if there's a default value for the field but there's also a dynamic default value\n // coming in, that dynamic value should take precedence.\n if (!$isArray && $defaults['meta'] !== '' && $defaults['dynamic'] && !is_null($field) && (string) $field === (string) $defaults['meta']) {\n $this->field = $field = null;\n }\n\n if ($this->dataType === 'Menu') {\n // fieldValue is preserved as the actual Connect menu option object\n $fieldValue = $this->getMenuFieldValue($field, $defaults);\n }\n // If the field has a value (including '') sent in through POST, we should use that.\n // Generally only the case in the basic pageset.\n else if ($defaults['post'] !== false) {\n $fieldValue = $defaults['post'];\n }\n // Check if the field has an existing value.\n else if($field !== null && !$isArray) {\n if (is_bool($field) || is_int($field)) {\n $fieldValue = $field;\n }\n else if (is_string($field)) {\n $fieldValue = htmlspecialchars($field, ENT_QUOTES, 'UTF-8', false);\n }\n }\n // If the field has a value from the URL or widget attributes\n else if($defaults['dynamic']) {\n $fieldValue = $defaults[$defaults['dynamic']];\n }\n else if ($isArray) {\n //Keep an existing array value as an array. It isn't up to this base class to determine what to do\n //with the data so it shouldn't be destroying data. The child widget is responsible for displaying the data to how it sees fit.\n $fieldValue = $field;\n }\n else {\n // Entity-ize any characters in the existing value in non-array types.\n $fieldValue = htmlspecialchars($field, ENT_QUOTES, 'UTF-8', false);\n }\n return $this->modifyDateValue($fieldValue);\n }", "title": "" }, { "docid": "1a7c46caa411732d218b3c0cddc1451b", "score": "0.61911255", "text": "public function setInputValue($inputValue);", "title": "" }, { "docid": "ff3468bacbbdc47edfff14879cbb4c50", "score": "0.6187635", "text": "public function __set($field, $value) {\r\n\t\t\r\n\t\t$this->touched = true;\r\n\t\t\r\n\t\t// First check if it's setting the primary_key...\r\n\t\tif($field == 'primary_key') $this->fields[static::getPrimaryKey()] = $value;\r\n\t\t\r\n\t\t// Check fields first...\r\n\t\telseif(array_key_exists($field, $this->fields)) $this->fields[$field] = $value;\r\n\t\t\r\n\t\t// Check the related models...\r\n\t\telseif(array_key_exists($field, $this->related)) $this->related[$field] = $value;\r\n\t\t\r\n\t\t// Undo 'touching' and set it normally.\r\n\t\telse {\r\n\t\t\t$this->touched = false;\r\n\t\t\t$this->$field = $value;\r\n\t\t}\r\n\t\t\r\n\t}", "title": "" }, { "docid": "4f1d185c54a0bf2b178fb0fcf89d2ad8", "score": "0.6185475", "text": "public function setValueField($valueField) {\n\t\t$this->valueField = $valueField;\n\t}", "title": "" }, { "docid": "b7fd3e4cd4f2a2a3cab94a5beefe6eba", "score": "0.61840576", "text": "function setField($field, $value) {\n if(strtolower(substr($field,0,5)) == 'iptc.'){\n return $this->setIPTCField(substr($field,5),$value);\n }elseif(strtolower(substr($field,0,5)) == 'exif.'){\n return $this->setExifField(substr($field,5),$value);\n }else{\n return $this->setExifField($field,$value);\n }\n }", "title": "" }, { "docid": "a758f1f45bbe3718e881f321d44e49e6", "score": "0.6172157", "text": "public function __set($field, $value){\n\t\tif(array_key_exists($field, $this->fields)){\n\t\t\t$this->fields[$field]=$value;\n\t\t}\n\t}", "title": "" }, { "docid": "d99e95ddd95538a2a6e2fcc974fe0578", "score": "0.6164818", "text": "public function __set($atributo, $valor) {\n\t\t\t// $this->modelo = $valor;\n\t\t\t$this->$atributo = $valor;\n\t\t}", "title": "" }, { "docid": "d1cb627a8af431451e8f9eeba9cfc8a7", "score": "0.61645997", "text": "public function set($data);", "title": "" }, { "docid": "d1cb627a8af431451e8f9eeba9cfc8a7", "score": "0.61645997", "text": "public function set($data);", "title": "" }, { "docid": "03ce7f25e7f9e42a32b065fab02babc9", "score": "0.6161892", "text": "public function __SET($attr, $value){ //Establece valor y atributo\n\n\t\t\t$this->$attr=$value;\n\t\t}", "title": "" }, { "docid": "7a99c53b1c95f0e1d970563e7df67e20", "score": "0.61490047", "text": "public function __SET($atributo,$valor)\r\n {\r\n return $this->$atributo = $valor;\r\n }", "title": "" }, { "docid": "138a4a54ef394ab1f398e5b6ff9ee116", "score": "0.6124207", "text": "public function setValue($value) {\n\t\tparent::setValue(stripslashes($value));\n\t}", "title": "" }, { "docid": "b8ba1c5c059a2123f3b26cc11d6d62a7", "score": "0.61123383", "text": "public function __set(string $field, $value): void\n\t{\n\t\t$this->setValue($field, $value);\n\t}", "title": "" }, { "docid": "ac4a73aa25a8166ad82827b8af4ff37e", "score": "0.61053944", "text": "public function set($value)// : void\n {\n $this->value = $value;\n }", "title": "" }, { "docid": "593bdf4e5ab0e34bcfaaa2fbfb49d2e8", "score": "0.6097482", "text": "public function addValueReplacement($field,$form);", "title": "" }, { "docid": "731fddc48d36e04d9915986c2d3fdbf8", "score": "0.60944295", "text": "public function setValue($value) {\n return parent::setAttr('value', $value);\n }", "title": "" }, { "docid": "310e9946ff631e353d63f4fb09166433", "score": "0.6079506", "text": "public function setValue($value, $load = false);", "title": "" }, { "docid": "8dcef303e9c201e936839c15b9efeb06", "score": "0.6072471", "text": "abstract public function set();", "title": "" }, { "docid": "558fe8b5d5a5643c874c20988fa2e6a7", "score": "0.6069961", "text": "function setField($field, $value)\n {\n $this->_data[$field] = $value;\n }", "title": "" }, { "docid": "0a400260f94c671086418e56642ee70c", "score": "0.60657465", "text": "public function setValue($v){\n $this->value = $v;\n }", "title": "" }, { "docid": "8f1f577d002f6a3b3bacb96e605cb3b4", "score": "0.6062483", "text": "public function __set($_name,$_value) {\n\t\tif (array_key_exists($_name,$this->fields)) {\n\t\t\t$this->fields[$_name]=is_string($_value)?\n\t\t\t\tF3::resolve($_value):$_value;\n\t\t\tif (!is_null($_value))\n\t\t\t\t// Axon is now hydrated\n\t\t\t\t$this->empty=FALSE;\n\t\t\treturn;\n\t\t}\n\t\tif (array_key_exists($_name,$this->virtual)) {\n\t\t\ttrigger_error(self::TEXT_AxonReadOnly);\n\t\t\treturn;\n\t\t}\n\t\tF3::$global['CONTEXT']=$_name;\n\t\ttrigger_error(self::TEXT_AxonNotMapped);\n\t}", "title": "" }, { "docid": "118bcb95bed7e0ebfdb30acc34d0a612", "score": "0.6026882", "text": "public function setValue($value) {\n $this->value = $value;\n }", "title": "" }, { "docid": "118bcb95bed7e0ebfdb30acc34d0a612", "score": "0.6026882", "text": "public function setValue($value) {\n $this->value = $value;\n }", "title": "" }, { "docid": "118bcb95bed7e0ebfdb30acc34d0a612", "score": "0.6026882", "text": "public function setValue($value) {\n $this->value = $value;\n }", "title": "" }, { "docid": "592019674244e0bfad98f9bd640319cf", "score": "0.6019168", "text": "function setValue($m)\n\t{\n\t\t$this->value = $m;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "d98109f392c6790d64d2543c01ee616f", "score": "0.60191613", "text": "abstract function setCustomFields();", "title": "" }, { "docid": "8acd463cdda962ef89d027822f718ef6", "score": "0.5994158", "text": "public function set($value = null);", "title": "" }, { "docid": "be95204827586b48fc0d1644324ceeca", "score": "0.599094", "text": "function setFieldValue($name, $value) {\n $real_name = $this->realFieldName($name);\n \n $set = $value;\n switch($real_name) {\n case 'id':\n $set = intval($value);\n break;\n case 'parent_id':\n $set = intval($value);\n break;\n case 'project_id':\n $set = intval($value);\n break;\n case 'incoming_mailbox_id':\n $set = intval($value);\n break;\n case 'subject':\n $set = strval($value);\n break;\n case 'body':\n $set = strval($value);\n break;\n case 'headers':\n $set = strval($value);\n break;\n case 'object_type':\n $set = strval($value);\n break;\n case 'state':\n $set = intval($value);\n break;\n case 'created_by_id':\n $set = intval($value);\n break;\n case 'created_by_name':\n $set = strval($value);\n break;\n case 'created_by_email':\n $set = strval($value);\n break;\n case 'created_on':\n $set = datetimeval($value);\n break;\n } // switch\n return parent::setFieldValue($real_name, $set);\n }", "title": "" }, { "docid": "4e3c86deb26d7c18e88c034d48a36e73", "score": "0.59909", "text": "protected function setFieldOriginalValue()\n {\n// static::doNotSnakeAttributes($this->model);\n\n $values = $this->model->toArray();\n\n $this->builder->fields()->each(function (Field $field) use ($values) {\n $field->setOriginal($values);\n });\n }", "title": "" }, { "docid": "7508626ee9d6657dd5d6733899d266ee", "score": "0.5984456", "text": "public function setValue($value)\n\t{\n\t\t$this->value = $value;\n\t}", "title": "" }, { "docid": "7508626ee9d6657dd5d6733899d266ee", "score": "0.5984456", "text": "public function setValue($value)\n\t{\n\t\t$this->value = $value;\n\t}", "title": "" }, { "docid": "7508626ee9d6657dd5d6733899d266ee", "score": "0.5984456", "text": "public function setValue($value)\n\t{\n\t\t$this->value = $value;\n\t}", "title": "" }, { "docid": "e98f4119d688d05083fdbb0486639f7c", "score": "0.59799653", "text": "public function __set ($field, $val) {\n if (isset($this->__fields[$field]['set'])) {\n $this->__fields[$field]['data'] = $this->__fields[$field]['set']($val);\n } else {\n $this->__fields[$field]['data'] = $val;\n }\n }", "title": "" }, { "docid": "593663ed7eb0dac435b0f9de1faf01fb", "score": "0.59666085", "text": "public function setValue($value)\n {\n $value = arr::get($value, 'value', NULL);\n\n if ($value !== NULL)\n {\n //pokud prisla prazdna hodnota, tak do modelu ukladam NULL\n if (empty($value))\n {\n $value = NULL;\n }\n\n parent::setValue($value);\n }\n }", "title": "" }, { "docid": "058c7f0a4525102a72ec58362b1d8014", "score": "0.594724", "text": "function setVal($val)//value yg ada dalam table(termasuk nilai variabel identifier), urutkan sesuai dengan variabel field (urutan pertama adalah nilai dari variabel identifier),pisahkan masing masing value dengan karakter +#+ * value inside table (including identifier's value),arrange the value according to the field (first sequence is the value of identifier),divide each value with +#+\r\n\t{\r\n\t\t$this->Value=$val;\r\n\t}", "title": "" }, { "docid": "f89b216e7842df9315f9993cd20fb0c0", "score": "0.594605", "text": "public function setValuesFromFormulier() {\n\t\t//object Boek vullen\n\t\tforeach ($this->getFormulier()->getFields() as $field) {\n\t\t\tif ($field instanceof InputField) {\n\t\t\t\t$this->setValue($field->getName(), $field->getValue());\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "b0f2be7582f74143ede4ce3d5a2e0ba5", "score": "0.5940346", "text": "public function set_field( string $field, $data ) {\n\t\t$this->data[ $field ] = $data;\n\t}", "title": "" }, { "docid": "ced46f22e9d3cbf77c0fb149fb73389d", "score": "0.5924563", "text": "public function setValue($value) {\n // Nevim jestli ma smysl definovat ty defaultni hodnoty jako atributy, pripadne v configu nebo vys\n $this->model->watermark_pos = arr::get($value, 'x', 0);\n// $this->model->watermark_y = arr::get($value, 'y', 0);\n $this->model->watermark_width = arr::get($value, 'width', 20);\n $this->model->watermark_opacity = arr::get($value, 'opacity', 50);\n \n // Nevolame parent::setValue($val), protoze tento prvek je virtuani (nevaze se primo na jeden atribut modelu)\n }", "title": "" }, { "docid": "2010edac3d37928575545bf639724273", "score": "0.59218144", "text": "public function __set($atrib, $value){\n\t\t$this->$atrib = $value;\n\t}", "title": "" }, { "docid": "2010edac3d37928575545bf639724273", "score": "0.59218144", "text": "public function __set($atrib, $value){\n\t\t$this->$atrib = $value;\n\t}", "title": "" }, { "docid": "2010edac3d37928575545bf639724273", "score": "0.59218144", "text": "public function __set($atrib, $value){\n\t\t$this->$atrib = $value;\n\t}", "title": "" }, { "docid": "db3d568b89f3b55cfb89bf132319838c", "score": "0.59183824", "text": "public function setValue($data){\n\t\t$this->_data = $data;\n\t\t\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "7a55368bf780d1ab4cc9ed9dac86aec8", "score": "0.5918121", "text": "public function __set($name,$value)\n\t{\n\t\tif (isset($this->searchFields[$name]))\n\t\t\t$this->searchFields[$name]['value'] = $value;\n\t\telse\n\t\t\tparent::__set($name,$value);\n\t}", "title": "" }, { "docid": "a7313796d01f473391ef1145e10db1a6", "score": "0.59084", "text": "public function set($value)\n\t{\n\t\tparent::setValue($this->instance, $value);\n\t\t\n\t\treturn;\n\t}", "title": "" }, { "docid": "1d394304d37a9024a019572454d9448f", "score": "0.58877885", "text": "public function set($atributo, $contenido){\n\t$this->$atributo = $contenido;\n\t}", "title": "" }, { "docid": "a9c4d256bf9a41963c1abe0a204ad1e5", "score": "0.588638", "text": "public function setValue($field, $value){\n $this->values[$field] = $value;\n }", "title": "" }, { "docid": "562c102a6fcadf3ebb49a059d7481485", "score": "0.5874439", "text": "public function setValue($value)\n {\n $this->value = $value;\n }", "title": "" }, { "docid": "562c102a6fcadf3ebb49a059d7481485", "score": "0.5874439", "text": "public function setValue($value)\n {\n $this->value = $value;\n }", "title": "" }, { "docid": "562c102a6fcadf3ebb49a059d7481485", "score": "0.5874439", "text": "public function setValue($value)\n {\n $this->value = $value;\n }", "title": "" }, { "docid": "7c895f6c9487cfcf5877f22aacd06a98", "score": "0.5874186", "text": "public function __set($field, $value)\n {\n if (array_key_exists($field, $this->fields))\n {\n $this->fields[$field] = $value;\n }\n }", "title": "" }, { "docid": "7c895f6c9487cfcf5877f22aacd06a98", "score": "0.5874186", "text": "public function __set($field, $value)\n {\n if (array_key_exists($field, $this->fields))\n {\n $this->fields[$field] = $value;\n }\n }", "title": "" }, { "docid": "c1b16322eb89cd862e8fd35fe2ba5361", "score": "0.5873006", "text": "public function __set($name, $value) {\n\t\tif ($name=='text') {\n\t\t\t$this->text = $value;\n\t\t\t$this->setText($value);\n\t\t}\n\t}", "title": "" }, { "docid": "40f89a8dbd81c4cab23ee45c3b6eb949", "score": "0.58643806", "text": "public function setFromInputfield(Inputfield $inputfield) {\n\n\t\tforeach($this->wire('languages') as $language) {\n\t\t\tif($language->isDefault) {\n\t\t\t\t$key = 'value';\n\t\t\t} else {\n\t\t\t\t$key = 'value' . $language->id; \n\t\t\t}\n\t\t\t$this->setLanguageValue($language->id, $inputfield->$key); \n\t\t}\n\t}", "title": "" }, { "docid": "f7fa7b09354652785693405205a5a24d", "score": "0.5863011", "text": "public function set_existing( $value ): void {\n\t\t// If this input has a single value.\n\t\tif ( Utils::class_uses_trait( $this, Single_Value::class ) ) {\n\t\t\t$this->value( $value );\n\t\t}\n\t}", "title": "" }, { "docid": "52021cd796cfb8158d8db07e77fbdce0", "score": "0.5861634", "text": "public function setField(string $field): void\n {\n $this->field = $field;\n }", "title": "" }, { "docid": "c834ff284614161f9a9e7c7f63b8d779", "score": "0.5849168", "text": "public function setValues(){\n if($this->getType() == \"var\"){\n $this->setValue($this->getArg());\n }else if($this->getType() == \"int\"){\n $pos = strpos($this->getArg(), \"@\");\n $this->setValue(substr($this->getArg(), $pos+1));\n }else if($this->getType() == \"bool\"){\n $pos = strpos($this->getArg(), \"@\");\n $this->setValue(substr($this->getArg(), $pos+1));\n }else if($this->getType() == \"string\"){\n $pos = strpos($this->getArg(), \"@\");\n $this->setValue(substr($this->getArg(), $pos+1));\n }else if($this->getType() == \"nil\"){\n $pos = strpos($this->getArg(), \"@\");\n $this->setValue(substr($this->getArg(), $pos+1));\n }else if($this->getType() == \"label\"){\n $this->setValue($this->getArg());\n }else if($this->getType() == \"type\"){\n $this->setValue($this->getArg());\n }else{\n $this->setValue(\"CHYBA\");\n }\n }", "title": "" }, { "docid": "ea7aa9110bf98a29044e2af94fbcd951", "score": "0.5844332", "text": "public function setValue($value): self;", "title": "" }, { "docid": "ea7aa9110bf98a29044e2af94fbcd951", "score": "0.5844332", "text": "public function setValue($value): self;", "title": "" } ]
f476e8deead2f967ea291903d329c630
Relationship with the district the listing belonged
[ { "docid": "1d5a1441f42835a380be74bdbd72429b", "score": "0.6332833", "text": "public function district(){\n return $this->belongsTo('App\\Models\\District', 'district_id');\n }", "title": "" } ]
[ { "docid": "cdeae72e98c00ee3ebed57024c106bcf", "score": "0.638992", "text": "public function assemblydistrict() {\n return $this->belongs_to('Assemblydistrict');\n }", "title": "" }, { "docid": "92e6678a0a7586d5053fb24184318d93", "score": "0.63085663", "text": "public function district()\n {\n return $this->belongsTo('App\\Models\\District');\n }", "title": "" }, { "docid": "52153ab8d3a4d69a56bf9b21091c13bc", "score": "0.6276254", "text": "public function district()\n {\n return $this->belongsTo(District::class);\n }", "title": "" }, { "docid": "a3a8b62df56749400fab8b1a6cbc2f6a", "score": "0.6264269", "text": "public function electiondistrict() {\n return $this->belongs_to('Electiondistrict');\n }", "title": "" }, { "docid": "a35fe8699e7de69206fae5098ce877ed", "score": "0.620639", "text": "public function district()\n {\n return $this->belongsTo('App\\Models\\Districts');\n }", "title": "" }, { "docid": "6d99323fd1da33cecae00118af1608af", "score": "0.6164899", "text": "function districtlist()\n\t{\n\t\t$Allcity = $this->base_model->run_query(\"select * from mlm_city_master\");\n\t\t$this->data['Allcity'] \t\t= $Allcity;\t\t\n\t\t$this->data['title'] \t\t= 'district';\n\t\t$this->data['active_menu'] \t= 'district';\n\t\t$this->data['content'] \t\t= 'admin/districtlist';\n\t\t$this->view('admin/districtlist',$this->data); \n\t}", "title": "" }, { "docid": "c141b6b6e763109bf32af50932368c9c", "score": "0.6133433", "text": "public function district()\n {\n return $this->belongsTo('App\\District\\District','district_id');\n }", "title": "" }, { "docid": "02079c9b99a99391477b844ba474bfb4", "score": "0.60737145", "text": "public function getDistrict()\n {\n return $this->hasOne(Districts::className(), ['id' => 'district_id']);\n }", "title": "" }, { "docid": "9e79772d551d68c6c5f5ffac02ebf59c", "score": "0.60352755", "text": "public function getDistrict()\n {\n return $this->hasOne(District::className(), ['id' => 'district_id']);\n }", "title": "" }, { "docid": "3ddbe0db7568f94e05f75f276a963a57", "score": "0.5989679", "text": "public function districts(){\n return $this->hasMany(District::class);\n\n }", "title": "" }, { "docid": "e3480c9eb794cc8a106ff62e245b409e", "score": "0.58629906", "text": "public function districts(){\n return $this->hasMany('App\\Models\\District','city_id','id');\n }", "title": "" }, { "docid": "4fac58bde8a385c01e1c6c67d81b7b39", "score": "0.5838964", "text": "public function districts() {\n return $this->hasMany(District::class);\n }", "title": "" }, { "docid": "a770ae5e655bd709644b05c723020083", "score": "0.5814259", "text": "public function show(District $bairro)\n {\n\n }", "title": "" }, { "docid": "189e038b64a2652389fede3a51b44655", "score": "0.57689875", "text": "public function getDistrict(){\n $this->autoRender = false;\n if(isset($this->data['country_id']) && (int)$this->data['country_id'] != 0){\n $districtList = $this->District->find('list', array(\n 'recursive' => -1,\n 'joins' => array(\n array(\n 'table' => 'states',\n 'alias' => 'State',\n 'type' => 'inner',\n 'conditions'=> array('District.state_id = State.id')\n ),\n array(\n 'table' => 'countries',\n 'alias' => 'Country',\n 'type' => 'inner',\n 'conditions'=> array('State.country_id = Country.id')\n ),\n ), \n 'fields' => array(\n 'District.id',\n 'District.name',\n ),\n 'conditions' => array(\n 'Country.id' => $this->data['country_id'],\n 'District.is_enable' => 1,\n 'District.is_trash' => 0\n ),\n 'order' => array(\n 'District.name'\n ),\n ));\n if(is_array($districtList) && count($districtList)>0){\n echo '<option value=\"\">-- Select District --</option>';\n foreach($districtList as $distKey=>$distVal){\n echo '<option value=\"'.$distKey.'\">'.$distVal.'</option>';\n }\n }else{\n echo '<option value=\"\">-- Select District --</option>';\n }\n }else{\n echo '<option value=\"\">-- Select District --</option>';\n }\n }", "title": "" }, { "docid": "d2ebcac32a7eef3939b400660c3cf0fa", "score": "0.57255274", "text": "public function show(District $district)\r\n {\r\n return $district;\r\n }", "title": "" }, { "docid": "d8ce4e5eeee81544132eb16d0f30c261", "score": "0.5709313", "text": "public function viewdistricto(){\r\n\t\t//sql query\r\n\t\t$sql = \"SELECT * FROM districts,district_operations where districts.DistrictID = district_operations.DistrictID\";\r\n\t\t//return executed query\r\n\t\treturn $this->db_query($sql);\r\n\t}", "title": "" }, { "docid": "a3fe7deba0028277e941cd2e87a82baa", "score": "0.57080716", "text": "public function listDistrict(){\r\n\t\t\t$dbo = db::getInstance();\r\n\t\t\t$stm = $dbo->prepare('SELECT * FROM \"District\"');\r\n\t\t\t$stm->execute();\r\n\t\t\treturn $stm->fetchAll(PDO::FETCH_ASSOC); \r\n\t\t}", "title": "" }, { "docid": "aa5c612a1c1a8ae317f166566bc8b130", "score": "0.565181", "text": "public function show(District $district)\n {\n //\n }", "title": "" }, { "docid": "f0f40546d3b3965288e88130cb440f41", "score": "0.55922127", "text": "function displayDistrictsOfOperation() {\n $orgdistricts = $this->getOrganisationDistricts();\n if ($orgdistricts->count() == 0) {\n return \"\";\n }\n $data_array = array(); \n foreach($orgdistricts as $theorgdistrict) {\n $data_array[] = $theorgdistrict->getDistrict()->getName(); \n }\n return createHTMLListFromArray($data_array); \n }", "title": "" }, { "docid": "2099a364be1be0c166bd6eea3ae40398", "score": "0.5588049", "text": "public function getDistricts()\n {\n return $this->hasMany(Districts::className(), ['region_id' => 'id']);\n }", "title": "" }, { "docid": "ff79c5e7237c8e410d333654e799bc69", "score": "0.55378217", "text": "public function getFedDistrict()\n {\n return $this->hasOne(FederalDistrict::className(), ['federal_district_id' => 'fed_district']);\n }", "title": "" }, { "docid": "eb569943b9caf5439fb0e19802f7e064", "score": "0.55123544", "text": "public function getAds()\n {\n return $this->hasMany(Ads::className(), ['district_id' => 'id']);\n }", "title": "" }, { "docid": "881f59905a652c46f14649c7ba083e03", "score": "0.5491047", "text": "public function getDestinationDistrict()\n {\n return $this->destination_district;\n }", "title": "" }, { "docid": "d324c5f25d8157d8fb6b20390d6e6251", "score": "0.54384494", "text": "function devtrac7_actionitem_districtset($node) {\n if (!empty($node->taxonomy_vocabulary_6) && isset($node->taxonomy_vocabulary_6[$node->language])) {\n return (count($node->taxonomy_vocabulary_6[$node->language]) > 0);\n }\n return FALSE;\n}", "title": "" }, { "docid": "30703fe38cbb5734c5e619b7c5da3961", "score": "0.54224706", "text": "public function getCdistrictid()\n {\n return $this->cdistrictid;\n }", "title": "" }, { "docid": "0dc4f16eff78d1fe7c0934b0f51ad6a9", "score": "0.54086447", "text": "function fetch_district($district_id){\n $district_data=\"\";\n $q=\"select tbl_region_id,dist_name from tbl_districts where id='\".$district_id.\"'\";\n $result=@mysql_query($q);\n if(@mysql_num_rows($result)>0){\n $dist=@mysql_fetch_array($result);\n $district_data=array($dist['tbl_region_id'],$dist['dist_name']);\n }\n return $district_data;\n }", "title": "" }, { "docid": "3aa2b4a3e3e1d592802ee3e4c002c56c", "score": "0.54044265", "text": "public function get_lic_districts()\n {\n if (!isset($_SESSION['admin_id'])) {\n redirect('admin/login');\n }\n $data['title'] = 'Traffic Police | License Verification';\n $data['heading'] = 'License Verification';\n $data['page_name'] = 'admin/license_verification/license-districts-list';\n $data['data']\t =\t$this->Admin_model->districts_list('license_districts');\n //echo '<pre>';print_r($data['data']);\n $this->load->view('template', $data);\n }", "title": "" }, { "docid": "b04460c02cd12a9af0f65562e9412e62", "score": "0.5367434", "text": "public function getAllDistrictList()\n {\n $locationDb = $this->sm->get('LocationDetailsTable');\n return $locationDb->fetchAllDistrictsList();\n }", "title": "" }, { "docid": "a66bc4979f1cc9d9242ea53c50bbcb3e", "score": "0.53160346", "text": "public function district($id)\n {\n $districts = Province::select('am_id', 'amphoe_t')\n ->where('ch_id', $id)\n ->orderBy('amphoe_t', 'asc')\n ->distinct()\n ->get();\n \n return DistrictResource::collection($districts);\n }", "title": "" }, { "docid": "3920383d3abd8f93137e626e544b42e9", "score": "0.5276704", "text": "function location(){\n\n\t\t$this->db->select('workey_key, name');\n\t\t$result = $this->db->get('district');\n\t\t$districts = $result->result_array();\n\t\treturn $districts;\n\t}", "title": "" }, { "docid": "10798ff21950cbc2da680eb4d9c03f5a", "score": "0.52587605", "text": "public function getGeoDistrictSlug()\n {\n return $this->geo_district_slug;\n }", "title": "" }, { "docid": "eed46ea17974128b670338941651cdb9", "score": "0.52582115", "text": "public function distresses(){\n return Distress::with('volunteers','location')->get();\n }", "title": "" }, { "docid": "7aee704c5957eff3f85dbc99aa5f0d5f", "score": "0.5148732", "text": "public function branch_details(){\n return $this->hasOne(Branches::class, 'id', 'branch_id')\n ->with('address_details');\n }", "title": "" }, { "docid": "f203575a91c6d993086a997e902d2378", "score": "0.5145251", "text": "public function actionFindDistricts() {\r\n\t\t// city\r\n\t\t$city_id = $_REQUEST ['city_id'];\r\n\t\t$districts = District::find ()->where ( 'city_id=:city_id', [ \r\n\t\t\t\t':city_id' => $city_id \r\n\t\t] )->orderBy ( [ \r\n\t\t\t\t'name' => SORT_ASC \r\n\t\t] )->all ();\r\n\t\t$json = new JsonObj ( 1, null, $districts );\r\n\t\techo (Json::encode ( $json ));\r\n\t}", "title": "" }, { "docid": "336246ea2a2424046598cb8f1217b03f", "score": "0.5130444", "text": "public function index() {\n $user = \\App\\User::where('idUser', '=', Auth::guard('authority')->User()->idUser)->first();\n $user_district = $user->userdesig()\n ->with('district')\n ->where('idDistrict', '=', Session::get('idDistrict'))\n ->get()\n ->pluck('district.districtName', 'district.idDistrict')->toArray();\n // dd($user_district);\n $sections = ['' => '---Select Section---'] + $user->userdesig()->with('designation.section')\n ->where('idDistrict', '=', Session::get('idDistrict'))\n ->whereNull('idSubdivision')\n ->whereNull('idBlock')\n ->whereNull('idVillage')\n ->get()\n ->pluck('designation.section.sectionName', 'designation.section.idSection')\n ->toArray();\n $user_section = $user->userdesig()->with('designation.section')\n ->where('idDistrict', '=', Session::get('idDistrict'))\n ->whereNull('idSubdivision')\n ->whereNull('idBlock')\n ->whereNull('idVillage')\n ->get()\n ->pluck('designation.section.idSection')->toArray();\n $user_list = DB::table('users')\n ->join('user_designation_district_mapping', 'user_designation_district_mapping.idUser', '=', 'users.idUser')\n ->join('designation', 'user_designation_district_mapping.idDesignation', '=', 'designation.idDesignation')\n ->join('section', 'designation.idSection', '=', 'section.idSection')\n ->where('user_designation_district_mapping.idDistrict', '=', Session::get('idDistrict'))\n ->whereNotNull('user_designation_district_mapping.idSubdivision')\n ->whereNull('user_designation_district_mapping.idBlock')\n ->whereNull('user_designation_district_mapping.idVillage')\n ->whereIn('section.idSection', $user_section)\n ->select('users.idUser', 'userName', 'designation.idSection')\n ->groupBy('idUser')\n ->get();\n // dd($user_list);\n $subdivisions = \\App\\Subdivision::where(\"idDistrict\", Session::get('idDistrict'))->get()\n ->pluck(\"subDivisionName\", \"idSubdivision\")->toArray();\n return view('authority.districts.user_subdivision', compact('subdivisions', 'sections', 'user_district', 'user_list'));\n }", "title": "" }, { "docid": "7761632b366773e871a860ef163b6b81", "score": "0.5127146", "text": "public function getGeoDistrictId()\n {\n return $this->geo_district_id;\n }", "title": "" }, { "docid": "1e1b649c370f32aaafc46b73213f5a44", "score": "0.5120915", "text": "public function add_lic_district()\n {\n if (!isset($_SESSION['admin_id'])) {\n redirect('admin/login');\n }\n $data['title'] = 'Traffic Police | License Verification';\n $data['heading'] = 'License Verification';\n $data['page_name'] = 'admin/license_verification/add-license-district';\n $data['action']\t =\tbase_url('admin/add_district_process');\n //echo '<pre>';print_r($data['data']);\n $this->load->view('template', $data);\n }", "title": "" }, { "docid": "1bb7ba93d57711000956738e7908bbd3", "score": "0.5108673", "text": "public function getGeoDistrictName()\n {\n return $this->geo_district_name;\n }", "title": "" }, { "docid": "3b39ceddcd70d992aa345304c76f549b", "score": "0.5104983", "text": "function infoDistrict($id){\n //validate \n $this->_validateId('id', $id, 'district');\n \n $data = AddressDistrictModel::find($id);\n return response()->json($data);\n }", "title": "" }, { "docid": "9bbd33f05c73bbb6d14576c441dc85bd", "score": "0.5099071", "text": "public function getFKingdom()\n {\n return $this->f_kingdom;\n }", "title": "" }, { "docid": "34902495dbc7f3fed431847093ceb26b", "score": "0.5096658", "text": "public function get_district($province_id) {\n $query = $this->district_model->get_selected_district($province_id);\n foreach ($query->result() as $district) {\n $data[] = array($district->id, $district->name_en); //load id and name to a array\n }\n echo json_encode($data);\n }", "title": "" }, { "docid": "455ad98ae40aabb6a76d3ecbad56dd52", "score": "0.5096414", "text": "public function district_create()\n {\n \n return view('Backend.pages.district.createdistrict');\n }", "title": "" }, { "docid": "4825f0f4370b0efbe9f4caa898b97c25", "score": "0.5057366", "text": "public function getDistricts() {\n\t\treturn District::join('abilities', 'districts.id', '=', 'abilities.entity_id')\n\t\t\t->join('permissions', 'permissions.ability_id', '=', 'abilities.id')\n\t\t\t->where('permissions.entity_type', 'App\\User')\n\t\t\t->where('permissions.entity_id', $this->id)\n\t\t\t->where('abilities.name', 'access')\n\t\t\t->where('abilities.entity_type', 'App\\District')\n\t\t\t->select('districts.*')\n\t\t\t->get();\n\t}", "title": "" }, { "docid": "5c7baba05e0c9d97112dbd63f23bb762", "score": "0.5041061", "text": "public function departamento(){\n return $this -> belongsto('App\\Departamentos');\n }", "title": "" }, { "docid": "fd0190c6c602a8d2b9b417b2a1c65dfb", "score": "0.5029051", "text": "public function initilaize()\n {\n $this->hasMany(\"id\", \"Hotelsfacility\", \"facility_id\");\n }", "title": "" }, { "docid": "d974488b8b51142033438d67d6e9747b", "score": "0.5027579", "text": "public function ciudad(){\n return $this -> belongsto('App\\Ciudades');\n }", "title": "" }, { "docid": "0891534d1aecbfc9f33df542cf23defe", "score": "0.4994866", "text": "public function village()\n {\n return $this->belongsTo('\\App\\Modules\\Territory\\Models\\Eloquent\\Village');\n }", "title": "" }, { "docid": "51f0694eae011d2776269ad8ab8f836a", "score": "0.49944952", "text": "public function show_add_district_officer()\n {\n $districts = district::where('division', session('user')->Division)->get();\n return view('home.divisionalOfficer.add_district_officer', ['districts' => $districts]);\n }", "title": "" }, { "docid": "33142ad56052d564416eee275cdc0ab8", "score": "0.49936113", "text": "function getLandlordProperties($id, $group_id)\n\t\t{\n\t\t\t$this->db->select('address, city, stateAbv, zipCode, id');\n\t\t\tif(!empty($group_id)) {\n\t\t\t\t$results = $this->db->get_where('listings', array('contact_id'=>$group_id));\n\t\t\t\tif($results->num_rows()>0) {\n\t\t\t\t\treturn $results->result();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$results = $this->db->get_where('listings', array('owner'=>$id));\n\t\t\t\tif($results->num_rows()>0) {\n\t\t\t\t\treturn $results->result();\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "3a77c01c3f7ac80e7748cbaf4773987e", "score": "0.4977779", "text": "public function show(Subdistrict $subdistrict)\n {\n //\n }", "title": "" }, { "docid": "fa0c83956343161cd4a38c14c9f63055", "score": "0.49743518", "text": "public function getDisziplin()\n {\n return $this->hasOne(Disziplinen::className(), ['DispId' => 'Disziplin']);\n }", "title": "" }, { "docid": "437c8a9e2244d9f31d223020fae457b6", "score": "0.49709538", "text": "public function governments()\n\t{\n\t\treturn $this->hasMany('Politik\\Entities\\Government');\n\t}", "title": "" }, { "docid": "948c8ab2669d313caf888445474e4660", "score": "0.49695483", "text": "public function subdivision()\n {\n return $this->belongsTo('App\\Models\\Cities\\Subdivision');\n }", "title": "" }, { "docid": "7cb8586217a8b9ed27e93a9d4c14fc50", "score": "0.49653402", "text": "public function governorate()\n {\n return $this->belongsTo(Governorate::class, 'governorate_id', 'id');\n }", "title": "" }, { "docid": "ffad3c70f684c7cdad2ba5583f692d7f", "score": "0.49604928", "text": "public function distribuidora(){\n\t\treturn $this->belongsTo('vapj\\Distribuidora', 'idDistribuidora');\n\t}", "title": "" }, { "docid": "8968cce4d39fc8b7c9056ef409ef1471", "score": "0.49585348", "text": "public function district_state() {\n\t\t$data = '';\n\t\tif($this->input->post('value')) {\n\t\t\t$data = $this->admin_model->get_district_by_state($this->input->post('value'));\n\t\t}\n\t\techo json_encode($data);\n\t}", "title": "" }, { "docid": "19f5d3d9bb6839eda39ed9d22db226f9", "score": "0.4957888", "text": "public function diaplay_warroadname()\n {\n $sql_query = \"SELECT ward_roadname.*,ward.ward_name FROM ward_roadname LEFT JOIN ward on ward_roadname.ward_no = ward.ward_no\";\n $query = $this->db->query($sql_query);\n $result = $query->result_array(); \n return $result;\n }", "title": "" }, { "docid": "5a6d6570af83ae280ad5205a4106e4c2", "score": "0.49468088", "text": "function listDistrict(Request $request, AddressDistrictModel $addressDistrictModel){\n $tmpModel = $addressDistrictModel;\n $addressDistrictModel->filterFreeText($tmpModel, $request->freeText);\n $tmpModel = $tmpModel->with('city')->orderBy('name');\n \n if((int)$request->page > 0)\n {\n $data = $tmpModel->paginate();\n }\n else\n {\n $data = $tmpModel->get();\n }\n return response()->json($data);\n }", "title": "" }, { "docid": "578bd9c16a5d135636ac2c406033d7f8", "score": "0.49349597", "text": "public function getChildInCircle($id,$distance){\n $current = Listing::where('agency_id',$id)->get();\n echo $id,$distance;\n // echo $current->latitude;\n // echo $current->longitude;\n dd($current);\n return $current;\n }", "title": "" }, { "docid": "02594d0314d094de913813f37531c099", "score": "0.49250942", "text": "public function departamentos()\n {\n //Tabla a referenciar Clave foranea del y clave local\n return $this->hasMany('App\\Departamentos','id_oficina','id_oficina');\n }", "title": "" }, { "docid": "5ed259a7c48c9b1272e2435affb1b965", "score": "0.49222654", "text": "public function related();", "title": "" }, { "docid": "187682448345b56f7197e4d2c0e54a91", "score": "0.49218878", "text": "public function get_districts($regency_id)\n\t{\n\t\t$query = $this->db->get_where('districts', array('regency_id' => $regency_id));\n\t\t$data = \"<option value=''>Kecamatan</option>\";\n\t\tforeach ($query->result() as $value) {\n\t\t\t$data .= \"<option value='\" . $value->id . \"'>\" . $value->name . \"</option>\";\n\t\t}\n\t\techo $data;\n\t}", "title": "" }, { "docid": "d8f2d66ab8ade49601428cf4377bfcb2", "score": "0.49206787", "text": "public function neighbors()\n {\n return $this->hasMany('App\\Centre', 'sponsor_id', 'sponsor_id');\n }", "title": "" }, { "docid": "216a2105d29e793e0f7804916f7e12cb", "score": "0.49122936", "text": "function getExtrachreges(){\n\t\t$db = $this->getDbo();\n\t\t$query = $db->getQuery(true);\n\n\t\t// Select the required fields from the table.\n\t\t$query->select(\n\t\t\t$this->getState(\n\t\t\t\t'list.select', 'DISTINCT a.*'\n\t\t\t)\n\t\t);\n\t\t$query->from('`#__event_manage_term` AS a');\n\n\t\t// Join over the users for the checked out user\n\t\t$query->select(\"uc.name AS editor\");\n\t\t$query->join(\"LEFT\", \"#__users AS uc ON uc.id=a.checked_out\");\n\n\t\t// Join over the user field 'created_by'\n\t\t$query->select('`created_by`.name AS `created_by`');\n\t\t$query->join('LEFT', '#__users AS `created_by` ON `created_by`.id = a.`created_by`');\n\n\t\t$query->where(\"a.activity = 'EXCHARGE'\");\n\n\t\t// Filter by published state\n\t\t$published = 1; //$this->getState('filter.state');\n\n\t\tif (is_numeric($published))\n\t\t{\n\t\t\t$query->where('a.state = ' . (int) $published);\n\t\t}\n\t\telseif ($published === '')\n\t\t{\n\t\t\t$query->where('(a.state IN (0, 1))');\n\t\t}\n\n\t\t// Filter by search in title\n\t\t$search = $this->getState('filter.search');\n\n\t\tif (!empty($search))\n\t\t{\n\t\t\tif (stripos($search, 'id:') === 0)\n\t\t\t{\n\t\t\t\t$query->where('a.id = ' . (int) substr($search, 3));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$search = $db->Quote('%' . $db->escape($search, true) . '%');\n\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t\t// Add the list ordering clause.\n\t\t$orderCol = $this->state->get('list.ordering');\n\t\t$orderDirn = $this->state->get('list.direction');\n\n\t\tif ($orderCol && $orderDirn)\n\t\t{\n\t\t\t$query->order($db->escape($orderCol . ' ' . $orderDirn));\n\t\t}\n\n\t\t$db->setQuery($query);\n\t\t$result = $db->loadObjectList();\n\t\n\t\treturn $result;\n\n\t}", "title": "" }, { "docid": "37be9f0b98d98f153a9c1fc7be0bd64c", "score": "0.49088156", "text": "function insertDistricts($districts) {\n $district_map = $this->getDistrictMap(); \n\n $addCount = 0;\n $updateCount = 0;\n $district_results['info'] = array();\n\n foreach ($districts as $district) {\n // Convert to our column struct\n $d = array(); // our clean district \n $d['store_code'] = $_SESSION['store_code'];\n $d['customer_group_id'] = 67; // Bender specific hack.\n foreach($district as $key => $value) {\n if (array_key_exists($key, $district_map)) {\n if (strstr($key, 'date')) {\n if (empty($value)) {\n $d[$district_map[$key]] = date(ISO_DATETIME_FORMAT);\n } else {\n $d[$district_map[$key]] = date(ISO_DATETIME_FORMAT, strtotime($value));\n }\n } elseif ($key == $this->reverseLookupKey($district_map,'name')) {\n// var_dump($value);\n if (strpos($value,\",\") == 2) { // This is for picking off the NC, SC, VA, in the import ClientName.\n $state = substr($value, 0, 2);\n// var_dump($state);\n $state_id = $this->db->get_column(\"sps_state\", \"id\", \"name='{$state}'\");\n $d['state_id'] = $state_id;\n } \n $d[$district_map[$key]] = $value;\n } else {\n $d[$district_map[$key]] = $value;\n }\n }\n }\n//var_dump($d);\n $exists_q = \"SELECT id FROM sps_district WHERE id='{$district[$this->reverseLookupKey($district_map,'id')]}'\";\n $results = $this->db->query($exists_q);\n if ($results->num_rows) {\n // id exists, update details\n $this->db->update('sps_district', $d, \"id='{$results->row['id']}'\");\n $updateCount++;\n } else { \n // id does not exist, insert\n $this->db->add('sps_district', $d);\n $addCount++;\n }\n }\n $district_results['info']['updates'] = $updateCount;\n $district_results['info']['adds'] = $addCount;\n\n return $district_results;\n//exit;\n }", "title": "" }, { "docid": "f4198a4af2dd3efb8bf9fd660811f199", "score": "0.4906913", "text": "public function get_attendance_schoolreport_districtwise($date)\n {\n \n\n $date = date('Y-m-d');\n \n $school_type = array('Government','Fully Aided','Partially Aided');\n $this->db->select(\"b.district_name,count(distinct b.school_id) as total_school\",false)\n ->select('sum(IF(a.section = b.section_nos,1,0)) as \"Fully_Marked_school\"',false)\n ->select('sum(IF(a.section != b.section_nos,1,0)) as \"Partially_Marked_school\"',false)\n ->from('students_school_child_count b')\n ->join(' (select count(st_section) as section,school_id from students_attend_daily where date = \"'.$date.'\" group by school_id) as a','b.school_id = a.school_id','left')\n ->where('b.management','Corporation School')\n ->where_in('school_type',$school_type)\n ->group_by('b.district_name');\n $result = $this->db->get()->result();\n // print_r($this->db->last_query());\n return $result;\n \n }", "title": "" }, { "docid": "787e696a63d4bc5f0737b88712fcb4fa", "score": "0.489471", "text": "public function healthdept_url(){\n\t\treturn $this->hasMany('App\\healthdept_url','healthdept_id','id');\n\t}", "title": "" }, { "docid": "5be56534ad7e1b1e37ad3b096344fe66", "score": "0.48875403", "text": "function getAllDistrictIDs() {\n $orgdistricts = $this->getOrganisationDistricts();\n if ($orgdistricts->count() == 0) {\n return \"\";\n }\n $districtid_array = array(); \n foreach($orgdistricts as $theorgdistrict) {\n $districtid_array[] = $theorgdistrict->getDistrict()->getID(); \n }\n return $districtid_array; \n }", "title": "" }, { "docid": "ea0af6eaafc39702aa22bc5894631b90", "score": "0.48835284", "text": "public function view_districto($pa){\r\n\t\t//sql query\r\n\t\t$sql = \"SELECT * FROM district_operations WHERE OperationID=$pa\";\r\n\t\t//return executed query\r\n\t\treturn $this->db_query($sql);\r\n\t}", "title": "" }, { "docid": "5a8a1240d8230ce493190055ee76608b", "score": "0.4873277", "text": "public function getRegion(){\n\treturn $this->hasMany('dstrRegion', 'id_taxa', 'id')->where('type',4);\n}", "title": "" }, { "docid": "3d8f303375aff5f16a101363484140fe", "score": "0.4871047", "text": "public function show_district_officers()\n {\n $officers = User_district_officer::where('Division', session('user')->Division)->get();\n return view('home.divisionalOfficer.district_officer_list', ['dis_officers' => $officers]);\n }", "title": "" }, { "docid": "5beed8f645790c1684a02f9d23edf380", "score": "0.48603836", "text": "public function run()\n {\n $counties = [\n ['id' => '1', 'name' => 'Rubabo', 'district_id' => '1'],\n ['id' => '2', 'name' => 'Rujumbura', 'district_id' => '1'],\n ['id' => '3', 'name' => 'Rukungiri Municipality', 'district_id' => '1'],\n ['id' => '4', 'name' => 'Kajara', 'district_id' => '6'],\n ['id' => '5', 'name' => 'Ruhaama', 'district_id' => '6'],\n ['id' => '6', 'name' => 'Rushenyi', 'district_id' => '6'],\n ['id' => '7', 'name' => 'Ntungamo Municipality', 'district_id' => '6'],\n ['id' => '8', 'name' => 'Rukiga', 'district_id' => '3'],\n ['id' => '9', 'name' => 'Kabale Municipality', 'district_id' => '3'],\n ['id' => '10', 'name' => 'Rubanda', 'district_id' => '3'],\n ['id' => '11', 'name' => 'Ndorwa', 'district_id' => '3'],\n ['id' => '12', 'name' => 'Kinkiizi', 'district_id' => '2'],\n ['id' => '13', 'name' => 'RUSHENYI', 'district_id' => '6'],\n ['id' => '14', 'name' => 'Rutenga', 'district_id' => '2'],\n ['id' => '15', 'name' => 'kinkizi', 'district_id' => '8'],\n ['id' => '16', 'name' => 'kayungwe', 'district_id' => '8'],\n ['id' => '17', 'name' => 'Rub abo', 'district_id' => '5'],\n ['id' => '18', 'name' => 'IBALE', 'district_id' => '5'],\n ['id' => '19', 'name' => 'Bushenyi Municipality', 'district_id' => '5'],\n ['id' => '20', 'name' => 'Bukanga', 'district_id' => '9'],\n ['id' => '21', 'name' => 'RUHINDA', 'district_id' => '10'],\n ['id' => '22', 'name' => 'KASHAMBYA', 'district_id' => '3'],\n ['id' => '23', 'name' => 'kabira', 'district_id' => '10'],\n ['id' => '24', 'name' => 'Rugarama', 'district_id' => '6'],\n ['id' => '25', 'name' => 'RUREHE', 'district_id' => '10'],\n ['id' => '26', 'name' => 'Kibale South', 'district_id' => '11'],\n ['id' => '27', 'name' => 'Test Sub County', 'district_id' => '12'],\n ['id' => '28', 'name' => 'RUJUMBURA', 'district_id' => '14'],\n ['id' => '29', 'name' => 'Rukinga', 'district_id' => '3'],\n ['id' => '30', 'name' => 'Kibale East', 'district_id' => '11'],\n ['id' => '31', 'name' => 'Rwampara', 'district_id' => '4'],\n ['id' => '32', 'name' => 'Isingiro', 'district_id' => '9'],\n ['id' => '33', 'name' => 'Kabura', 'district_id' => '15'],\n ['id' => '34', 'name' => 'Entebbe', 'district_id' => '16'],\n ['id' => '35', 'name' => 'Ruhama', 'district_id' => '18'],\n ['id' => '36', 'name' => 'Kitwe', 'district_id' => '18'],\n ['id' => '37', 'name' => 'Nsiika', 'district_id' => '19'],\n ['id' => '38', 'name' => 'Migamba', 'district_id' => '20'],\n ['id' => '39', 'name' => 'Kyaka', 'district_id' => '20'],\n ['id' => '40', 'name' => 'Kashongi', 'district_id' => '13'],\n ['id' => '41', 'name' => 'Kazo', 'district_id' => '13'],\n ['id' => '42', 'name' => 'BUFUMBIRA SOUTH', 'district_id' => '21'],\n ['id' => '43', 'name' => 'kanshagama', 'district_id' => '15'],\n ['id' => '44', 'name' => 'kabula', 'district_id' => '15'],\n ['id' => '45', 'name' => 'Kashari', 'district_id' => '4'],\n ['id' => '46', 'name' => 'Buwekura', 'district_id' => '23'],\n ['id' => '47', 'name' => 'Mahogola', 'district_id' => '25'],\n ['id' => '48', 'name' => 'Rubanda', 'district_id' => '26'],\n ['id' => '49', 'name' => 'Ibanda', 'district_id' => '27'],\n ['id' => '50', 'name' => 'Sheema', 'district_id' => '14'],\n ['id' => '51', 'name' => 'Bunyaruguru', 'district_id' => '5'],\n ['id' => '52', 'name' => 'Buyaga West', 'district_id' => '29'],\n ['id' => '53', 'name' => 'Buyaruguru', 'district_id' => '12'],\n ['id' => '54', 'name' => 'Buyaruguru', 'district_id' => '12'],\n ['id' => '55', 'name' => 'Buyaruguru', 'district_id' => '12'],\n ['id' => '56', 'name' => 'Buyaruguru', 'district_id' => '12'],\n ['id' => '57', 'name' => 'Bunyaruguru', 'district_id' => '12'],\n ['id' => '58', 'name' => 'Bukinda', 'district_id' => '3'],\n ['id' => '59', 'name' => 'Rwamucucu', 'district_id' => '3'],\n ['id' => '60', 'name' => 'Rwasamere', 'district_id' => '6'],\n ['id' => '61', 'name' => 'Rwashamere', 'district_id' => '6'],\n ['id' => '62', 'name' => 'Buyaga west', 'district_id' => '8'],\n ['id' => '63', 'name' => 'Byeru', 'district_id' => '12'],\n ['id' => '64', 'name' => 'Ryeru', 'district_id' => '12'],\n ['id' => '65', 'name' => 'Mbarara Municipality', 'district_id' => '4'],\n ['id' => '66', 'name' => 'Kooki', 'district_id' => '31'],\n ['id' => '67', 'name' => 'Mushunga', 'district_id' => '10'],\n ['id' => '68', 'name' => 'Sheema North', 'district_id' => '14'],\n ['id' => '69', 'name' => 'Rwemiyaga', 'district_id' => '25'],\n ['id' => '70', 'name' => 'rubanda', 'district_id' => '8'],\n ['id' => '71', 'name' => 'Kakabara', 'district_id' => '20'],\n ['id' => '72', 'name' => 'Igaara', 'district_id' => '5'],\n ['id' => '73', 'name' => 'Ruheija', 'district_id' => '26'],\n ['id' => '74', 'name' => 'Mahogora', 'district_id' => '25'],\n ['id' => '75', 'name' => 'Northern Division', 'district_id' => '21'],\n ['id' => '76', 'name' => 'Eitah', 'district_id' => '11'],\n ['id' => '77', 'name' => 'Eitaha', 'district_id' => '11'],\n ['id' => '78', 'name' => 'kitagwenda', 'district_id' => '11'],\n ['id' => '79', 'name' => 'Mwenge', 'district_id' => '33'],\n ['id' => '80', 'name' => 'Ruabaga', 'district_id' => '34'],\n ['id' => '81', 'name' => 'Erute South', 'district_id' => '35'],\n ['id' => '82', 'name' => 'Bufimbira North', 'district_id' => '21'],\n ['id' => '83', 'name' => 'Lyantonde', 'district_id' => '15'],\n ['id' => '84', 'name' => 'Kasambya', 'district_id' => '23'],\n ['id' => '85', 'name' => 'Katerera', 'district_id' => '12'],\n ['id' => '86', 'name' => 'Bufumbira East', 'district_id' => '21'],\n ['id' => '87', 'name' => 'Burahya', 'district_id' => '32'],\n ['id' => '88', 'name' => 'Nakyenyi', 'district_id' => '37'],\n ['id' => '89', 'name' => 'kazo', 'district_id' => '39'],\n ['id' => '90', 'name' => 'Busiro', 'district_id' => '16'],\n ['id' => '91', 'name' => 'Bugangeizi West', 'district_id' => '40'],\n ['id' => '92', 'name' => 'Kibale', 'district_id' => '11'],\n ['id' => '93', 'name' => 'Buhweju', 'district_id' => '19'],\n ['id' => '94', 'name' => 'Bunyangaro', 'district_id' => '32'],\n ['id' => '95', 'name' => 'Nyabushozi', 'district_id' => '39'],\n ['id' => '96', 'name' => 'Nyabushozi', 'district_id' => '13'],\n ['id' => '97', 'name' => 'Buyanja', 'district_id' => '1'],\n ['id' => '98', 'name' => 'Bufumbira', 'district_id' => '21'],\n ['id' => '99', 'name' => 'Kawempe', 'district_id' => '34'],\n ['id' => '100', 'name' => 'Rutete', 'district_id' => '29'],\n ['id' => '101', 'name' => 'Mirongo', 'district_id' => '4'],\n ['id' => '102', 'name' => 'Mutara', 'district_id' => '10'],\n ['id' => '103', 'name' => 'kyamuhunga', 'district_id' => '5']\n ];\n\n foreach ($counties as $county):\n\n county::firstOrCreate([\n \"id\" => $county['id'],\n \"name\" => $county['name'],\n \"district_id\" => $county['district_id']\n ]);\n\n endforeach;\n }", "title": "" }, { "docid": "982fe24e3ca0b2c27fa159561d626fc6", "score": "0.4857995", "text": "public function getAddress(){\n\t\t\n\t\techo json_encode($this->getProvinceDistrict());\n\n\t}", "title": "" }, { "docid": "3ae9bac19c68d00f4eb9c13b6aa21227", "score": "0.4857508", "text": "public function getWebsiteDistrict(): string\n {\n $country = $this->getWebsiteCountry();\n $regionId = $this->scopeConfig->getValue(\n 'shipping/origin/region_id',\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_WEBSITE\n );\n $region = $this->regionFactory->create()->load($regionId)->getCode();\n $zip = $this->scopeConfig->getValue(\n 'shipping/origin/postcode',\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_WEBSITE\n );\n $r = $country . '-' . $region;\n if ($country === \"US\") {\n $r .= '-' . $zip;\n }\n return $r;\n }", "title": "" }, { "docid": "10b4222d757350a2b522b7876d578357", "score": "0.4851244", "text": "public function getVendedor()\n{\nreturn $this->vendedor;\n}", "title": "" }, { "docid": "1cae1c7a4bd81f54bfb585cef92ab3bd", "score": "0.48480442", "text": "public function changeDistrict($division_id) {\n $districts = District::select(\"id\",\"name\")->where(\"division_id\",$division_id)->get();\n\n $dataList = array(\n 'districts' => $districts,\n );\n $appendDistrict = view('abasvumi.ajax_html.district', $dataList)->render();\n\n return response()->json([\n 'districts' => $appendDistrict\n ]);\n }", "title": "" }, { "docid": "e989dc82b0735536c38d94695d3db220", "score": "0.48429304", "text": "public function direccion(){\n return $this->hasOne('App\\Direccion','educacion_id');\n }", "title": "" }, { "docid": "19241055556fe606a3f8f14c9d95acf6", "score": "0.484278", "text": "public function show(DistrictOffice $districtOffice, DistrictReport $districtReport)\n {\n //\n }", "title": "" }, { "docid": "e9a919980e944635c01bacc69b7ba065", "score": "0.48333398", "text": "public function getBillingDistrict()\n {\n return $this->getParameter('billingDistrict');\n }", "title": "" }, { "docid": "0ae69586e0cdd0f6b2713e7560842527", "score": "0.48222953", "text": "protected abstract function getRelation();", "title": "" }, { "docid": "a2de8f77b4be29d2bad7cd7a29aaef38", "score": "0.48202085", "text": "public function edit(District $district)\r\n {\r\n //\r\n }", "title": "" }, { "docid": "7a0b0eab11450c8f15da6335f2a8274d", "score": "0.48143128", "text": "public function edificio(){\n return $this->belongsTo('App\\Building', 'building_id');\n }", "title": "" }, { "docid": "d7e07de0dd8f06549cf2c220652cad5f", "score": "0.48038223", "text": "public function getPeopleDetail($id) {\r\n $select = \"SELECT a.f_id, a.m_id, a.partner_id, b.id, b.partner_id, c.f_id, c.m_id, s.spouse_id , br.brother_id, sis.sister_id \"\r\n . \"FROM `people` a \"\r\n . \"LEFT JOIN `people` b ON (a.f_id = b.f_id || a.m_id = b.m_id) \"\r\n . \"LEFT JOIN `people` c ON (a.partner_id = c.id) \"\r\n . \"LEFT JOIN `spouses` s ON (a.id = s.spouse_id) \"\r\n . \"LEFT JOIN `brothers` br ON (a.id = br.people_id) \"\r\n . \"LEFT JOIN `sisters` sis ON (a.id = sis.people_id) \"\r\n . \"WHERE a.id='\" . $id . \"'\";\r\n $rResult = $this->query($select);\r\n \r\n $sibling = $siblingPartner = array();\r\n\r\n $this->arrIds[] = $id;\r\n\r\n $father = $rResult[0]['a']['f_id'];\r\n $mother = $rResult[0]['a']['m_id'];\r\n\r\n if ($rResult[0]['a']['partner_id']) {\r\n $this->arrIds[] = $partner = $rResult[0]['a']['partner_id'];\r\n }\r\n if ($rResult[0]['c']['m_id']) {\r\n $this->arrIds[] = $partner_mother = $rResult[0]['c']['m_id'];\r\n }\r\n if ($rResult[0]['c']['f_id']) {\r\n $this->arrIds[] = $partner_father = $rResult[0]['c']['f_id'];\r\n }\r\n if ($rResult[0]['s']['spouse_id']) {\r\n $this->arrIds[] = $exspouse = $rResult[0]['s']['spouse_id'];\r\n }\r\n//if ($rResult[0]['sis']['sister_id']) {\r\n// $this->arrIds[] = $sisters = $rResult[0]['sis']['sister_id'];\r\n// echo '<pre>';\r\n// print_r($sisters);\r\n// }\r\n\r\n foreach ($rResult as $k => $v) {\r\n $this->arrIds[] = $sibling[] = $v['b']['id'];\r\n $this->arrIds[] = $siblingPartner[] = $v['b']['partner_id'];\r\n }\r\n\r\n //get siblings children\r\n foreach ($sibling as $sid) {\r\n if ($sid) {\r\n $this->getChildHierarchy($sid, false);\r\n }\r\n }\r\n\r\n //get self children hierarchy\r\n $this->getChildHierarchy($id, true);\r\n\r\n //get father's, mother's ancestors and siblings\r\n if ($father || $mother) {\r\n $arrParent = array();\r\n\r\n if ($father) {\r\n $this->arrIds[] = $arrParent[] = $father;\r\n }\r\n if ($mother) {\r\n $this->arrIds[] = $arrParent[] = $mother;\r\n }\r\n $this->getParentHierarchy($arrParent, true);\r\n }\r\n\r\n\r\n //fetch detail of all ids\r\n $family = $this->getIdsDetail();\r\n\r\n return $family;\r\n }", "title": "" }, { "docid": "6ac13ed91e89ee815bdf313c39649a6d", "score": "0.48035845", "text": "public function departemen(){\n return $this->belongsTo('App\\Departemen', 'id_departemen', 'id_dept');\n }", "title": "" }, { "docid": "311158a04e7f1e86226dea0266143fc8", "score": "0.4799886", "text": "public function Foodlist()\n {\n return $this->hasMany('App\\Model\\Foodlist','restaurant_id','id');\n }", "title": "" }, { "docid": "15cb263e7dd6e70438e336baad626817", "score": "0.47868684", "text": "function aadhar_school_distic_based_count_details($districtid){\n $sql=\"SELECT students_aadhaar_child_count.school_id,students_school_child_count.district_id,district_name,sum(students_aadhaar_child_count.total_b+students_aadhaar_child_count.total_g+students_aadhaar_child_count.total_t)as aadharin, \nsum(students_school_child_count.total_b+students_school_child_count.total_g+students_school_child_count.total_t)as totalstudent,district_name,district_id,udise_code,students_school_child_count.school_name,students_school_child_count.school_type,students_school_child_count.school_id,students_school_child_count.block_name,students_school_child_count.edu_dist_name FROM students_aadhaar_child_count \n join students_school_child_count on students_school_child_count.school_id \n =students_aadhaar_child_count.school_id where district_id = \".$districtid.\" and students_school_child_count.management='Corporation School' \n group by students_school_child_count.school_id \";\n \n $query = $this->db->query($sql);\n return $query->result();\n }", "title": "" }, { "docid": "9bc35073ac0e13128dbf3332c0650b71", "score": "0.4784542", "text": "function get_sub_district_ajax(){\r\n // Get province id\r\n $district_id = $this->input->get('district_id');\r\n $province_id = $this->input->get('province_id');\r\n \r\n // Get sub-districts\r\n $where_assoc = array();\r\n $where_assoc['sub_district_district_id'] = $district_id;\r\n //$where_assoc['sub_district_province_id'] = $province_id;\r\n $sub_district_arr = $this->Sub_district->get_filter('*', $where_assoc, null, 'sub_district_name ASC', 0, null, 'array');\r\n \r\n // Encode to JSON\r\n $sub_district_json = json_encode($sub_district_arr, JSON_UNESCAPED_UNICODE );\r\n \r\n $this->output->set_output($sub_district_json);\r\n }", "title": "" }, { "docid": "06f9fb72c1278fbc5f79f01bfa7cf6a6", "score": "0.4781102", "text": "public function enderecos()\n {\n return $this->hasMany(LSEnderecos::class, 'ls_clientes_id')->whereNull('ls_pedidos_id')->where('ls_fontes_id','!=',3)->orderBy('ls_fontes_id','asc')->limit(1);\n }", "title": "" }, { "docid": "fa9a6e1f242f306e47911363c6a222e6", "score": "0.47805372", "text": "public function get_all_Districts() {\n $query = $this->db->get('tbldistricts');\n return $query->result_array();\n }", "title": "" }, { "docid": "42f4ccdc5a42e42fc7b5d9cf48ea5462", "score": "0.47778997", "text": "public function bodega()\n {\n return $this->belongsTo(Bodega::class);\n }", "title": "" }, { "docid": "4d0a49c5e9d6826339b532f64df8ad60", "score": "0.4777591", "text": "public function destination_detail()\n {\n return $this->hasMany(ModelDestinationDetails::class, 'id_objek_wisata', 'id');\n }", "title": "" }, { "docid": "3ff37158a6b257c46efb7d283a9a419f", "score": "0.47772735", "text": "public function getDistricts(Request $request)\n { \n $state_id = $request->state_id;\n $get_stocode = State::find($state_id); \n\n $get_districts = District::select('id', 'name')\n ->where('STOCode', $get_stocode->STOCode)\n ->orderBy('name', 'ASC')\n ->get(); \n\n return response()->json($get_districts);\n\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.4775935", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.4775935", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.4775935", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.4775935", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.4775935", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.4775935", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.4775935", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.4775935", "text": "public function buildRelations()\n {\n }", "title": "" } ]
b10c2fff83e4b0ef48be2307ea30f4eb
Set the value of [pro_uid] column.
[ { "docid": "cc5d20181aa187b3f85fa6f2f330e7f3", "score": "0.7942308", "text": "public function setProUid ($v)\n {\n\n // Since the native PHP type for this column is string,\n // we will cast the input to a string (if it is not).\n if ( $v !== null && !is_string ($v) )\n {\n $v = (string) $v;\n }\n\n if ( $this->pro_uid !== $v || $v === '' )\n {\n $this->pro_uid = $v;\n }\n }", "title": "" } ]
[ { "docid": "7113f9e14e6ef7a895e2eb2e749b57b9", "score": "0.67771", "text": "public function getProUid ()\n {\n\n return $this->pro_uid;\n }", "title": "" }, { "docid": "c77d9ac2d13724527847c5a0865fa175", "score": "0.575991", "text": "protected function setPostUid() {\n\t\tif (isset($this->localPiVars['showUid'])) {\n\t\t\t$this->uid = intval($this->localPiVars['showUid']);\n\t\t}\n\t\telse if (isset($this->localPiVars['showUidPerma'])) {\n\t\t\t// showUidPerma is deprecated!\n\t\t\t$this->uid = intval($this->localPiVars['showUidPerma']);\n\t\t}\n\t}", "title": "" }, { "docid": "238332e29d3faa6f9c62e6981f44701d", "score": "0.5618316", "text": "public function setTasUid ($v)\n {\n // Since the native PHP type for this column is string,\n // we will cast the input to a string (if it is not).\n if ( $v !== null && !is_string ($v) )\n {\n $v = (string) $v;\n }\n\n if ( $this->tas_uid !== $v || $v === '' )\n {\n $this->tas_uid = $v;\n }\n }", "title": "" }, { "docid": "b9feea98bd697c375573c434f7b669a5", "score": "0.56142247", "text": "function setProdotti($listProd) \n {\n parent::setProdotti($listProd);\n // SET qta for ALL USERS\n if(count($this->_arProdOriginal) > 0) \n {\n foreach ($this->_arProdOriginal AS $value) \n {\n $this->getProdotto($value->idprodotto)->addQtaReale($value->qta);\n }\n }\n }", "title": "" }, { "docid": "4bc1d1d58ee7d6a92c9a7970372587af", "score": "0.55952436", "text": "public function setUser_id($value){\n\t\t$this->_orm->user_id = $value;\n\t}", "title": "" }, { "docid": "5106c1937f2fae331657902250bf189d", "score": "0.5490156", "text": "public function setIdproductos_prov($idproductos_prov){\n $this->idproductos_prov = $idproductos_prov;\n }", "title": "" }, { "docid": "12839cbb45491727a2546ee11e8c9fb5", "score": "0.5483831", "text": "function setUid($uid) {\n $this->uid = is_string($uid) ? trim($uid) : NULL;\n }", "title": "" }, { "docid": "444d53b1e8a0754e4e899527c71c1243", "score": "0.54056704", "text": "function setUserID( $value )\n {\n $this->UserID = $value;\n }", "title": "" }, { "docid": "9d8727f6e28b2d9016958c711e24a95c", "score": "0.539883", "text": "function setUID($uid) {\n\t\t$this->set(self::FLD_UID, $uid);\n\t}", "title": "" }, { "docid": "d26b42b3f22d3bab347404d37b141c61", "score": "0.5338497", "text": "function setProduct( $value )\r\n {\r\n if ( get_class ( $value ) )\r\n {\r\n $this->ProductID = $value->id();\r\n }\r\n else if ( is_numeric ( $value ) )\r\n {\r\n $this->ProductID = $value;\r\n }\r\n }", "title": "" }, { "docid": "51df68073f8e8cbb5735fc6766548f19", "score": "0.5309059", "text": "public function set_id($atr){\n $this->u_id = $atr;\n }", "title": "" }, { "docid": "2f1b7ec28706d685f5ef52354990542c", "score": "0.528548", "text": "function setId_pau($sid_pau = '')\n {\n $this->sid_pau = $sid_pau;\n }", "title": "" }, { "docid": "37a9e3df8f66eb5fbf1a5366fe4cf287", "score": "0.52706635", "text": "function setUID($uid) { \n\t\t$this->_uid = $uid; \n\t}", "title": "" }, { "docid": "26cf268f475e1299b140b0bc44a8fb8b", "score": "0.5234695", "text": "public function setUid($uid)\n {\n $this->uid = $uid;\n }", "title": "" }, { "docid": "ae5d543d48a932ec41bc0a29f318862c", "score": "0.5234066", "text": "public function setUid($uid)\n {\n $this->uid = $uid;\n }", "title": "" }, { "docid": "b0ab3709674686cb7d8197e1573d38b4", "score": "0.52253145", "text": "public function setProyectoOid($oid){\n\t\t$proyecto = UIServiceFactory::getUIProyectoService()->get($oid);\n\t\t\n\t\t$this->setProyecto($proyecto);\n\t\t\n\t}", "title": "" }, { "docid": "5ccd64a9f9a64e64f99685990b83005b", "score": "0.5206157", "text": "public function setIdproveedor($v)\n {\n if ($v !== null && is_numeric($v)) {\n $v = (int) $v;\n }\n\n if ($this->idproveedor !== $v) {\n $this->idproveedor = $v;\n $this->modifiedColumns[] = ProductoPeer::IDPROVEEDOR;\n }\n\n if ($this->aProveedor !== null && $this->aProveedor->getIdproveedor() !== $v) {\n $this->aProveedor = null;\n }\n\n\n return $this;\n }", "title": "" }, { "docid": "9d12f5980439ddc5dc54fa8637809388", "score": "0.5186426", "text": "function setId_pau($sid_pau)\n {\n $this->sid_pau = $sid_pau;\n }", "title": "" }, { "docid": "3a4831ac4d231704cb3ad9f9a61214ff", "score": "0.5181893", "text": "public function setOwnerId($uid);", "title": "" }, { "docid": "d82c0cda259b0ac68c08de106a46dbcf", "score": "0.51606184", "text": "private function setTheMetaUser()\r\n {\r\n $oldLevels = get_user_meta($this->uid, 'ihc_user_levels', true);\r\n if ($oldLevels){\r\n $oldLevelsArray = explode(',', $oldLevels);\r\n if (!in_array($this->lid, $oldLevelsArray)){\r\n $oldLevelsArray[] = $this->lid;\r\n }\r\n $levels = implode(',', $oldLevelsArray);\r\n } else {\r\n $levels = $lid;\r\n }\r\n update_user_meta( $this->uid, 'ihc_user_levels', $levels );\r\n }", "title": "" }, { "docid": "768dd2600bb183f84c798ba8636c8692", "score": "0.51485664", "text": "public function setUid(?string $uid): void\n {\n $this->uid = $uid;\n }", "title": "" }, { "docid": "20d8d41b70d8ae986707f519d037986e", "score": "0.51195467", "text": "function setProyecto($proy)\n {\n $this->proyecto = $proy;\n $this->estudianteDAO->setProyecto($proy);\n }", "title": "" }, { "docid": "e1277959f72d4f6dfddf18a661d479f1", "score": "0.51150805", "text": "function setUserId($value) {\n return $this->setFieldValue('user_id', $value);\n }", "title": "" }, { "docid": "0e241573c3461893b8fa859d6b99a92b", "score": "0.5111376", "text": "public function Dot_ProSystemMode($uid, $ProSystemMode) {\n\t\t$uid = mysqli_real_escape_string($this->db, $uid);\n\t\t$ProSystemMode = mysqli_real_escape_string($this->db, $ProSystemMode);\n\t\t$checkUserisAdmin = mysqli_query($this->db, \"SELECT user_id FROM dot_users WHERE user_id = '$uid' AND user_type= '1'\") or die(mysqli_error($this->db));\n\t\tif (mysqli_num_rows($checkUserisAdmin) > 0) {\n\t\t\t$UpdateMode = mysqli_query($this->db, \"UPDATE dot_configuration SET pro_system = '$ProSystemMode' WHERE configuration_id = '1'\") or die(mysqli_error($this->db));\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "9f8bfdbfa53c25721a6c25a2760ae0c2", "score": "0.50873727", "text": "public function setUserId($value)\n {\n $this->setProperty(\"UserId\", $value, true);\n }", "title": "" }, { "docid": "fb0b2241669c6a82ead97b1a7f53a839", "score": "0.5084179", "text": "public function setCr_uid($cr_uid)\n {\n $this->cr_uid = $cr_uid;\n }", "title": "" }, { "docid": "b403709db03d8a5eca6b461541482351", "score": "0.5075444", "text": "protected function setProduct_id($value)\n\t{\n\t\tif (isCeleKladneCislo($value) || is_null($value)) {\n\t\t\t$this->product_id = $value;\n\t\t}\n\t\tif (isCeleKladneCislo($value) && $this->lazyLoad) {\n\t\t\t$this->productProductEntity = new ProductEntity($value,false);\n\t\t} else {\n\t\t\t$this->productProductEntity = null;\n\t\t}\n\t}", "title": "" }, { "docid": "5a1f3aaf88766ae59c74a654e773e015", "score": "0.5065047", "text": "public function setIdProduto($param) {\n\t\t$this->idProduto = $param;\n\t}", "title": "" }, { "docid": "84ddd6446fc5705f3d04d08f208ba5c7", "score": "0.5056371", "text": "public function setUid($value) {\n return $this->set(self::UID, $value);\n }", "title": "" }, { "docid": "84ddd6446fc5705f3d04d08f208ba5c7", "score": "0.5056371", "text": "public function setUid($value) {\n return $this->set(self::UID, $value);\n }", "title": "" }, { "docid": "84ddd6446fc5705f3d04d08f208ba5c7", "score": "0.5056371", "text": "public function setUid($value) {\n return $this->set(self::UID, $value);\n }", "title": "" }, { "docid": "84ddd6446fc5705f3d04d08f208ba5c7", "score": "0.5056371", "text": "public function setUid($value) {\n return $this->set(self::UID, $value);\n }", "title": "" }, { "docid": "eec689a4f23a174cef9c71a5738f1314", "score": "0.50225186", "text": "public function setUserIdAttribute($input)\n {\n $this->attributes['user_id'] = $input ? $input : null;\n }", "title": "" }, { "docid": "eec689a4f23a174cef9c71a5738f1314", "score": "0.50225186", "text": "public function setUserIdAttribute($input)\n {\n $this->attributes['user_id'] = $input ? $input : null;\n }", "title": "" }, { "docid": "eec689a4f23a174cef9c71a5738f1314", "score": "0.50225186", "text": "public function setUserIdAttribute($input)\n {\n $this->attributes['user_id'] = $input ? $input : null;\n }", "title": "" }, { "docid": "eec689a4f23a174cef9c71a5738f1314", "score": "0.50225186", "text": "public function setUserIdAttribute($input)\n {\n $this->attributes['user_id'] = $input ? $input : null;\n }", "title": "" }, { "docid": "eec689a4f23a174cef9c71a5738f1314", "score": "0.50225186", "text": "public function setUserIdAttribute($input)\n {\n $this->attributes['user_id'] = $input ? $input : null;\n }", "title": "" }, { "docid": "17055b23616ccdd2dfa263e8d9811ee3", "score": "0.50194377", "text": "function set_product_sequence($coupon_id, $prod_id, $seq)\n\t{\n\t\t$this->db->where(array('coupon_id'=>$coupon_id, 'product_id'=>$prod_id));\n\t\t$this->db->update('coupons_products', array('sequence'=>$seq));\n\t}", "title": "" }, { "docid": "b25d74166a41ca0228349d9781bc4040", "score": "0.5012961", "text": "public function setData($id_proceso,$nom_proceso,$uc_proceso,$fc_proceso,$um_proceso,$fm_proceso)\n {\n $this->id_proceso=$id_proceso;\n $this->nom_proceso=$nom_proceso;\n $this->uc_proceso=$uc_proceso;\n $this->fc_proceso=$fc_proceso;\n $this->um_proceso=$um_proceso;\n $this->fm_proceso=$fm_proceso;\n }", "title": "" }, { "docid": "1a4d85b093dcf00872384d4abb4c8f95", "score": "0.49870145", "text": "function setId_tipo_proceso_sv($iid_tipo_proceso_sv = '')\n {\n $this->iid_tipo_proceso_sv = $iid_tipo_proceso_sv;\n }", "title": "" }, { "docid": "29bf5f401eba317fae4736f61a5db287", "score": "0.49786103", "text": "function setUserID( $newUserID )\r\n {\r\n $this->UserID = $newUserID;\r\n }", "title": "" }, { "docid": "36c36d2a7cab9c86da3c833910ff2632", "score": "0.49692535", "text": "private function setUserId()\n {\n\n $user = User::where(\"email\", \"=\", User::ADMIN_EMAIL)->first();\n $this->userId = (!$user) ? 0 : $user->id;\n }", "title": "" }, { "docid": "dd905f4a102a2058a9e45207c94c32f5", "score": "0.49532622", "text": "public function setMPP($mpp)\n {\n $this->_mpp = intval($mpp);\n $this->_tabMPP = array_unique(array_merge($this->_tabMPP, array(\n $this->_mpp\n )));\n sort($this->_tabMPP);\n $this->_nbPage = ($this->_mpp > 0) ? ceil($this->_nbResult / $this->_mpp) : 1;\n }", "title": "" }, { "docid": "5991b313a0c18c3028692c1430f1351a", "score": "0.49420148", "text": "public function overrideUid($uid)\n\t{\n\t\t$this->uid = $uid;\n\t}", "title": "" }, { "docid": "3b46b56e968cdc7e09231c2a37587bb7", "score": "0.49385482", "text": "public function setProtein($protein);", "title": "" }, { "docid": "c7847807c04421a612dcb85811dedc22", "score": "0.49382454", "text": "public function setUid($uid) {\n $this->_uid = (int) $uid;\n return $this;\n }", "title": "" }, { "docid": "66e2307e809b58767e6bef1677aebc5d", "score": "0.49373987", "text": "public function setProTipAttribute($value)\n {\n $this->attributes['pro_tip'] = ! empty($value) ? $value : null;\n }", "title": "" }, { "docid": "03d52b99e073e63bd749398b88d94c64", "score": "0.49346724", "text": "function user_extended_setvalue($uid, $field_name, $newvalue, $fieldType = 'todb')\n\t{\n\t\t$sql = e107::getDb();\n\t\t$tp = e107::getParser();\n\n\t\t$uid = (int)$uid;\n\t\tswitch($fieldType)\n\t\t{\n\t\t\tcase 'int':\n\t\t\t\t$newvalue = (int)$newvalue;\n\t\t\t\tbreak;\n\n\t\t\tcase 'escape':\n\t\t\t\t$newvalue = \"'\".mysql_real_escape_string($newvalue).\"'\";\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t$newvalue = \"'\".$tp->toDB($newvalue).\"'\";\n\t\t\t\tbreak;\n\t\t}\n\t\tif(substr($field_name, 0, 5) != 'user_')\n\t\t{\n\t\t\t$field_name = 'user_'.$field_name;\n\t\t}\n\t\t$qry = \"\n\t\tINSERT INTO `#user_extended` (user_extended_id, {$field_name})\n\t\tVALUES ({$uid}, {$newvalue})\n\t\tON DUPLICATE KEY UPDATE {$field_name} = {$newvalue}\n\t\t\";\n\t\treturn $sql->db_Select_gen($qry);\n\t}", "title": "" }, { "docid": "ccc759a5992b9fa2732c271fd2d8e21c", "score": "0.49138382", "text": "public function setIsPro($isPro)\n {\n $this->_isPro = $isPro;\n }", "title": "" }, { "docid": "8d74e3597f863e902beab3be3b566850", "score": "0.49069715", "text": "function set($uid, $field_name, $newvalue, $fieldType = 'todb')\n\t{\n\t\treturn $this->user_extended_setvalue($uid, $field_name, $newvalue, $fieldType);\n\t}", "title": "" }, { "docid": "3415dc79f75dc7fb563daf0bbfac6ff8", "score": "0.4901842", "text": "public function __set($attr_pseudoU, $attr_val) {\n if (property_exists(__CLASS__, $attr_pseudoU)) {\n $this->$attr_pseudoU = $attr_val;\n }\n }", "title": "" }, { "docid": "0ad5dd4680207057d40492a25fad9dfc", "score": "0.49017423", "text": "function setuju_produk($id_produk)\n\t\t{\n\t\t\t$data = array(\n\t\t\t\t'status' => 1\t\n\t\t\t);\n\t\t\t$this->db->where('id_produk',$id_produk);\n\t\t\t$this->db->update('shopping',$data);\n\t\t}", "title": "" }, { "docid": "df0fdb0a1a5a1e7e97d634a665dcc764", "score": "0.49012336", "text": "function set_user_id($user_id)\n\t{\n\t\t$this->set_default_property(self :: PROPERTY_USER_ID, $user_id);\n\t}", "title": "" }, { "docid": "bfaaf8683fd1f9072370a497a9471ed4", "score": "0.48896784", "text": "public function setUserRightsProfileSingleProcess($val)\n {\n $this->_propDict[\"userRightsProfileSingleProcess\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "1a714f0b5fa4f02e8a0c0b86142eeeb5", "score": "0.48895577", "text": "public function setTasSelfserviceTriggerUid ($v)\n {\n\n // Since the native PHP type for this column is string,\n // we will cast the input to a string (if it is not).\n if ( $v !== null && !is_string ($v) )\n {\n $v = (string) $v;\n }\n\n if ( $this->tas_selfservice_trigger_uid !== $v || $v === '' )\n {\n $this->tas_selfservice_trigger_uid = $v;\n }\n }", "title": "" }, { "docid": "b25c8cd638e0ff4edebd1fa3431f781e", "score": "0.4879096", "text": "public function setUid($var)\n {\n GPBUtil::checkString($var, True);\n $this->uid = $var;\n\n return $this;\n }", "title": "" }, { "docid": "b25c8cd638e0ff4edebd1fa3431f781e", "score": "0.4879096", "text": "public function setUid($var)\n {\n GPBUtil::checkString($var, True);\n $this->uid = $var;\n\n return $this;\n }", "title": "" }, { "docid": "c276b551e48f47888051ea614f0ae065", "score": "0.48777366", "text": "public function setProdutoraelencoIdAttribute($input)\n {\n $this->attributes['produtoraelenco_id'] = $input ? $input : null;\n }", "title": "" }, { "docid": "67e48fb83c10b07ffdb440d7c9b49621", "score": "0.486991", "text": "protected function setCurrentSelectionUid($uid){\r\n\t\tglobal $BE_USER;\r\n\t\t$BE_USER->setAndSaveSessionData(\"selection_uid\",$uid);\r\n\t}", "title": "" }, { "docid": "09f564591b78cf5541891dd7c72230e2", "score": "0.48320812", "text": "function set_user_id($user_id)\r\n {\r\n $this->set_default_property(self :: PROPERTY_USER_ID, $user_id);\r\n }", "title": "" }, { "docid": "3ce70c07a277e70fdf547f181c04a694", "score": "0.4824543", "text": "public function set_uid($unid){\r\n\t\t$this->unid = $unid;\r\n\t\treturn $this;\r\n\t}", "title": "" }, { "docid": "33f4fa993ebfb542e122257e7eab1cdc", "score": "0.48155463", "text": "public function setUid($var)\n {\n GPBUtil::checkInt64($var);\n $this->uid = $var;\n\n return $this;\n }", "title": "" }, { "docid": "a5719d312ce122e0fba80fafdd329091", "score": "0.48079365", "text": "public function setTasUser ($v)\n {\n\n // Since the native PHP type for this column is string,\n // we will cast the input to a string (if it is not).\n if ( $v !== null && !is_string ($v) )\n {\n $v = (string) $v;\n }\n\n if ( $this->tas_user !== $v || $v === '0' )\n {\n $this->tas_user = $v;\n }\n }", "title": "" }, { "docid": "61f824c7e73eb044a3b1bd3a0aa8bc53", "score": "0.47946915", "text": "public function setUserIdAttribute($value)\n {\n // dd('user', Auth::id());\n return $this->attributes['user_id'] = Auth::id();\n }", "title": "" }, { "docid": "666788abe066b68fcb74dfc42d87e465", "score": "0.47901487", "text": "private function setPrimaryKeyVal($value){\n\t\t$className = get_called_class();\n\t\n\t\t$reflectionClass = new \\ReflectionClass($className);\n\t\t$property = $reflectionClass->getProperty(static::PRIMARY_KEY);\n\t\t$property->setAccessible(true);\n\t\t$property->setValue($this, $value);\n\t\n\t}", "title": "" }, { "docid": "dce780cf62839c5bb66b09566535474e", "score": "0.47756034", "text": "function setPID($pid) { \n\t\t$this->_pid = $pid; \n\t}", "title": "" }, { "docid": "04a75fc30e4623b50145082656654bcb", "score": "0.47633308", "text": "public function setUserID($id)\n {\n $this->uID = $id;\n }", "title": "" }, { "docid": "1a02533a47af36fb78c838af4bc4e06b", "score": "0.47559112", "text": "public function setPropertyID($value){\n\t\t\t$this->property_id = $value;\n\t\t}", "title": "" }, { "docid": "c479a72086a6d92615a7f57be0da66cc", "score": "0.47511682", "text": "public function setPid($pid) {\n $this->pid = $pid;\n }", "title": "" }, { "docid": "d78fb5e9670cd4c7911aab9d577cf0f1", "score": "0.4746735", "text": "function assign_role_to_user($rid,$uid){\n\t\t\t$this->update_data($this->tbl[0],\"rid='\".$rid.\"'\",\"uid='\".$uid.\"'\");\n\t\t}", "title": "" }, { "docid": "9dc37fd4125f734019203dbd61652960", "score": "0.47282144", "text": "protected function set_identifiers()\n\t{\n\t\tif (is_string(self::$arguments['uid']))\n\t\t{\n\t\t\tif (!posix_setuid(self::$arguments['uid']))\n\t\t\t{\n\t\t\t\tthrow new RuntimeException('Can\\'t change UID for process');\n\t\t\t}\n\t\t}\n\n\t\tif (is_string(self::$arguments['gid']))\n\t\t{\n\t\t\tif (!posix_setuid(self::$arguments['gid']))\n\t\t\t{\n\t\t\t\tthrow new RuntimeException('Can\\'t change GID for process');\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "5cccc473b2f35060003aa57a347cd0fe", "score": "0.4727737", "text": "public function setPrecoAttribute($value)\n {\n $this->attributes['preco'] = str_replace(',', '.', $value);\n }", "title": "" }, { "docid": "c60fed787bb5a57b8f0209449c2aaa5b", "score": "0.47187817", "text": "function setUserMeta($uid,$key,$val)\n\t{\n\t\tglobal $potodb;\n\t\t$arr = array(\n\t\t\t\t\"user_id\"=>$uid,\n\t\t\t\t\"meta_key\"=>$key,\n\t\t\t\t\"meta_value\"=>$val\n\t\t\t);\n\t\treturn $potodb->insertValue(\"user_meta\",$arr);\n\t}", "title": "" }, { "docid": "a3de58a8e932bec26218489e67fb92ea", "score": "0.4709025", "text": "public function setSequenceId($uid, int $msglist = null): void {\n if ($this->getSequence() === IMAP::ST_UID) {\n $this->setUid($uid);\n $this->setMsglist($msglist);\n } else {\n $this->setMsgn($uid, $msglist);\n }\n }", "title": "" }, { "docid": "fcbf41eb4cc840e6e005b96ed87d776b", "score": "0.4704892", "text": "public function update(User $user, Pro $pro)\n {\n //\n }", "title": "" }, { "docid": "ca6f30da5e3e1ed6f93e05ff79e4669d", "score": "0.4703966", "text": "public function setProductId($productId) {\n $this->$productId = $productId;\n }", "title": "" }, { "docid": "3ea09f559b2122fc22d3a731ba676d39", "score": "0.4702746", "text": "public function setIdProyecto($idProyecto){$this->idProyecto = $idProyecto;}", "title": "" }, { "docid": "de81db0ef6b9df215185a985fcd6b72d", "score": "0.4699921", "text": "public function setRevisionUserId($uid);", "title": "" }, { "docid": "de81db0ef6b9df215185a985fcd6b72d", "score": "0.4699921", "text": "public function setRevisionUserId($uid);", "title": "" }, { "docid": "de81db0ef6b9df215185a985fcd6b72d", "score": "0.4699921", "text": "public function setRevisionUserId($uid);", "title": "" }, { "docid": "de81db0ef6b9df215185a985fcd6b72d", "score": "0.4699921", "text": "public function setRevisionUserId($uid);", "title": "" }, { "docid": "de81db0ef6b9df215185a985fcd6b72d", "score": "0.4699921", "text": "public function setRevisionUserId($uid);", "title": "" }, { "docid": "de81db0ef6b9df215185a985fcd6b72d", "score": "0.4699921", "text": "public function setRevisionUserId($uid);", "title": "" }, { "docid": "de81db0ef6b9df215185a985fcd6b72d", "score": "0.4699921", "text": "public function setRevisionUserId($uid);", "title": "" }, { "docid": "de81db0ef6b9df215185a985fcd6b72d", "score": "0.4699921", "text": "public function setRevisionUserId($uid);", "title": "" }, { "docid": "c1156e6162bb839ffaa58ff2b84f3c6e", "score": "0.46937433", "text": "public function setProvinciaIdAttribute($input)\n {\n $this->attributes['provincia_id'] = $input ? $input : null;\n }", "title": "" }, { "docid": "acf092f6388c93e2cb60d0c99838e83d", "score": "0.46894938", "text": "public function testSetUniqId() {\n\n $obj = new RgProfils();\n\n $obj->setUniqId(\"uniqId\");\n $this->assertEquals(\"uniqId\", $obj->getUniqId());\n }", "title": "" }, { "docid": "c829594b105f03eee72e8c59232e953b", "score": "0.4683766", "text": "public function setCdProdutoIdAttribute($input)\n {\n $this->attributes['cd_produto_id'] = $input ? $input : null;\n }", "title": "" }, { "docid": "b1c262b3901fece8d44599987d2830ec", "score": "0.46723923", "text": "public function set_userData(string $val): int\n {\n $this->_udata = $val;\n $this->_npdu = 0;\n return YAPI::SUCCESS;\n }", "title": "" }, { "docid": "5dde274f762a03a1b018dbe2ae0ea074", "score": "0.46673885", "text": "function mangager_set_user($dn, $data)\n {\n //TODO\n }", "title": "" }, { "docid": "ab5d9d2b21c52791808793245ae34a06", "score": "0.46650678", "text": "public function setOldPrimaryKey($value)\n {\n $this->_pk=$value;\n }", "title": "" }, { "docid": "6abb98e6ebb2737154f74df57171c121", "score": "0.4660897", "text": "protected function assignUserId()\n\t{\n\t\tif( isset($_SESSION[\"UserID\"]) && $_SESSION[\"UserID\"] != \"Guest\" )\t\n\t\t\t$this->userID = $_SESSION[\"UserID\"];\n\t}", "title": "" }, { "docid": "e5cf786057575e967b78c41f7bf33553", "score": "0.4652056", "text": "function _makeProdid() {\n $this->prodid = '-//' . $this->unique_id . '//NONSGML kigkonsult.se ' . ICalendarFactory::$ICALCREATOR_VERSION . '//' . strtoupper($this->language);\n }", "title": "" }, { "docid": "4f7a32c5bbb1a14c5efdb3e201b588f5", "score": "0.46515286", "text": "public function setPrimaryTrxPcid( string $primaryTrxPcid ): void\n {\n $this -> response [ 'primaryTrxPcid' ] = $primaryTrxPcid;\n }", "title": "" }, { "docid": "118b419fd0526290984bf53571ffde8d", "score": "0.46437672", "text": "function posix_setuid($uid) {}", "title": "" }, { "docid": "28972a1509ad6928ab761cc32c3ac41e", "score": "0.46365273", "text": "function set_products_id($p_products_id)\n\t{\n\t\t$this->v_products_id = (int)$p_products_id;\n\t\treturn true;\n\t}", "title": "" }, { "docid": "ff0e573cbb7b7caeace5c3c7cec4573f", "score": "0.46253237", "text": "public function setValueId($vi){\n\t\t$this->valueId = $vi;\n\t}", "title": "" }, { "docid": "6cb492059ba05b1aab981db5cca663a3", "score": "0.46223596", "text": "public function setUserId($val)\n {\n $this->_propDict[\"userId\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "6cb492059ba05b1aab981db5cca663a3", "score": "0.46223596", "text": "public function setUserId($val)\n {\n $this->_propDict[\"userId\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "6cb492059ba05b1aab981db5cca663a3", "score": "0.46223596", "text": "public function setUserId($val)\n {\n $this->_propDict[\"userId\"] = $val;\n return $this;\n }", "title": "" } ]
4d9bbbf3cba6fa1bb4cdc7717913bd37
Determine if the user is authorized to make this request.
[ { "docid": "e37b97b96d2851b0704d18d14e8c6f89", "score": "0.0", "text": "public function authorize()\n {\n return auth()->user()->hasPermission('group-create') || auth()->user()->root;\n }", "title": "" } ]
[ { "docid": "61b6850924368e14814b635e85110c7f", "score": "0.8344406", "text": "public function authorize()\n {\n return $this->user() != null;\n }", "title": "" }, { "docid": "61b6850924368e14814b635e85110c7f", "score": "0.8344406", "text": "public function authorize()\n {\n return $this->user() != null;\n }", "title": "" }, { "docid": "f276ece97c00c47c50fdc4f0e62769d0", "score": "0.8333313", "text": "public function authorize(): bool\n {\n return $this->getUser() !== null;\n }", "title": "" }, { "docid": "972861a0767f1651ba9390269d0bed4c", "score": "0.8298197", "text": "public function authorize()\n {\n return $this->user() ? true : false;\n }", "title": "" }, { "docid": "c81b0d3d0e9a2e4326824c7234cebc66", "score": "0.8265931", "text": "function isAuthorized()\n {\n\n $controller = $this->request->controller;\n $action = $this->request->action;\n \n return $this->checkAccess($controller, $action);\n \n }", "title": "" }, { "docid": "6376534de447322dc42273a919390fb2", "score": "0.8263114", "text": "public function authorize()\n {\n if ($this->isUserAdmin()) {\n return true;\n }\n\n return $this->isUserOwner($this->resourcesData);\n }", "title": "" }, { "docid": "1d9d94d60f24f4ee69318fc43d74c4c6", "score": "0.8141564", "text": "public function authorize()\n {\n return (bool) $this->user();\n }", "title": "" }, { "docid": "ca32f713c379fc0a7b4a09b4800cb61f", "score": "0.81225735", "text": "public function authorize()\n {\n return auth()->check() && $this->route('user_id') == auth()->user()->id;\n }", "title": "" }, { "docid": "d6ac25c880181d2c548e111a3ac86671", "score": "0.8105579", "text": "public function authorize()\n {\n return (bool)$this->user();\n }", "title": "" }, { "docid": "05590fc9a3eaa9395069921dc992b629", "score": "0.8101211", "text": "public function authorize()\n {\n //Todo check is admin\n return $this->user() != null;\n }", "title": "" }, { "docid": "575d626a3b099bc592cf09b78f1b57ae", "score": "0.80821574", "text": "public function isAuth()\n {\n return $this->userObj->IsAuthorized();\n }", "title": "" }, { "docid": "2e33f59696016a92dfe5d1d195f98b1e", "score": "0.8079626", "text": "public function authorize()\n {\n $accessor = $this->user();\n $user = $this->route('user');\n\n return $accessor->isAdmin() || $accessor->hasKey('post-users-alerts') ||\n $accessor->id === $user->id;\n }", "title": "" }, { "docid": "37f7f199e7353737d1005bcaa49ae905", "score": "0.8077801", "text": "public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || (\n strpos($this->url(), 'keys/') === false &&\n $accessor->hasKey('get-users')\n );\n }", "title": "" }, { "docid": "28fa91a0b628ffc0a5cb95f7d5fa9d14", "score": "0.8066191", "text": "protected function authorize()\n {\n $request = $this->getRequest();\n try {\n if ($request->getHeaders()->has('X-AUTH-TOKEN')) {\n $encodedToken = $request->getHeader('X-AUTH-TOKEN')->getFieldValue();\n $key = \"secret\";\n $token = \\JWT::decode($encodedToken, $key);\n $uid = $token->uid;\n if ($uid == self::AUTHORIZED_USER) { // TODO: Hard coded for now, but should be used to look-up user\n return true;\n }\n }\n } catch (\\Exception $e) {\n }\n return false;\n }", "title": "" }, { "docid": "9848174a7f01e602f5b2cca10182994a", "score": "0.80624217", "text": "public function authorize()\n {\n return ($this->ownableUser())? true: false;\n }", "title": "" }, { "docid": "09254afa403915a120b0d408a5b2fbcd", "score": "0.80462295", "text": "public function authorize()\n {\n if(!auth()->check() || !$this->user_id) return false;\n\n return true;\n }", "title": "" }, { "docid": "3d95a428c1cdd0297797015f69cd4f5a", "score": "0.7950307", "text": "public function authorize()\n {\n if ($this->user()->can('user-edit')) {\n return true;\n } elseif ($this->user()->can('user-self-edit')) {\n return $this->user()->id === User::find($this->route('user'))->id;\n } else return false;\n }", "title": "" }, { "docid": "f25f6e02a3368b29327adf7c8b177885", "score": "0.7935591", "text": "public function authorize()\n {\n return $this->authorizable() && $this->recipient->user_id === $this->user()->id;\n }", "title": "" }, { "docid": "607e2aa99c9a40e92cce23b8d35a8f9e", "score": "0.79354715", "text": "public function authorize()\n {\n return !!request()->user();\n }", "title": "" }, { "docid": "68cbbf2a944e943c11bb4d48842aef74", "score": "0.7932432", "text": "public function authorize()\r\n {\r\n if (! isset(Auth::user()->id)) {\r\n return false;\r\n }\r\n return true;\r\n }", "title": "" }, { "docid": "30f42faca9c3470b19994d64c14c4c63", "score": "0.792551", "text": "public function authorize()\n {\n return (int)$this->input('user_id') === Auth::user()->id;\n }", "title": "" }, { "docid": "8f5796b47b92d878d279cc7ad0c1b777", "score": "0.7916447", "text": "public function authorize()\n {\n return $this->cashFlow->user_id === auth()->id();\n }", "title": "" }, { "docid": "35329a1c71e8cc8e016e8b5cf27c6b0d", "score": "0.79120225", "text": "public function authorize()\n {\n if (Auth::user()) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "57a82e0219fd61ee5fc8c70b2bab3f6b", "score": "0.78996134", "text": "public function authorize()\n {\n $id = $this->route('user');\n\n return User::where('id', $id)->exists();\n }", "title": "" }, { "docid": "c83975f213bfce526e079a1f2d254850", "score": "0.78867626", "text": "public function authorize(): bool\n {\n return $this->user()->can('user.read', $this->route()->parameter('server'));\n }", "title": "" }, { "docid": "e38720f6cb5bf28a801028cc3bbe85ae", "score": "0.7871712", "text": "public function authorize()\n {\n if ( $this->getMethod() === 'POST' && Sentinel::hasAccess( 'listprofile.add' ) ) {\n return true;\n } else if ( $this->getMethod() === 'PUT' && Sentinel::hasAccess( 'listprofile.edit' ) ) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "20970467e823cfff4065d1dc431760b1", "score": "0.78493035", "text": "public function authorize()\n {\n if (Auth::user()) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "525cb396f8ffd2d15c44bb7435f630e3", "score": "0.784714", "text": "public function authorize()\n\t{\n\t\treturn true; //no user checking\n\t\t//TODO: must be logged in, but doesnt need an org\n\t}", "title": "" }, { "docid": "1ebc37971dea284c629977ed977a7251", "score": "0.78441024", "text": "public function isAuthorized()\n {\n return boolval($this->getToken());\n }", "title": "" }, { "docid": "340d335aaf485d507323dbdd50bd4d12", "score": "0.78414804", "text": "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "title": "" }, { "docid": "f9745674758397cae802c3c19d4b5663", "score": "0.7804006", "text": "public function isAuthorized() {\n\t\t$currentUser = $this->_refreshUser(true);\n\t\tif (!$currentUser) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$roles = Hash::extract((array) $currentUser, 'Role.{n}.name');\n\t\t$check = \"{$this->params['controller']}::{$this->params['action']}\";\n\t\t$user = $this->_refreshUser();\n\t\treturn in_array($check, $roles);\n\t}", "title": "" }, { "docid": "0c5acd04242b11ada42962c187851765", "score": "0.77815884", "text": "public function authorize()\n {\n $user = request()->user('api');\n return $user->isSenior();\n }", "title": "" }, { "docid": "ed6efd25e10c164ee912eacbb3b7408f", "score": "0.77801406", "text": "public function authorize()\n {\n return ! $this->container['auth']->check();\n }", "title": "" }, { "docid": "60cab0f6dbeb086261240fd352acb09f", "score": "0.7776033", "text": "public function authorize()\n {\n if ($this->user()->user_type == 'admin') return true;\n return false;\n }", "title": "" }, { "docid": "7f108c712ca0becaf542bec5196e4acb", "score": "0.77728003", "text": "public function isAuthorized()\r\n {\r\n return true;\r\n }", "title": "" }, { "docid": "66ddf82416ba034c74a597cd64ac1d3a", "score": "0.77704453", "text": "public function isAuthorized()\n {\n $hasSession = Yii::$app->session->has($this->sessionParam);\n $sessionVal = Yii::$app->session->get($this->sessionParam);\n return ($hasSession && !empty($sessionVal));\n }", "title": "" }, { "docid": "b78960d42c8d923d1a2aaa61725af1e7", "score": "0.7765466", "text": "public function authorize()\n {\n $action = $this->route()->getAction();\n\n $is_edit = Auth::user()->can($action['as'], 'edit');\n $own_edit = Auth::user()->can($action['as'], 'own_edit');\n\n if ($is_edit == 1 || (!empty($own_edit) && ($this->user->created_by == Auth::user()->id))) {\n return true;\n } else {\n abort(403);\n }\n }", "title": "" }, { "docid": "d2aff1e96cd748e725cb68cf14dbfc45", "score": "0.7765185", "text": "public function authorize()\n {\n if (auth()->quest) {\n return false;\n }\n if (!auth()->user()->is_admin) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "d6d1211a3aa6c3cfb70419246f369e2a", "score": "0.7763308", "text": "public function authorize()\n {\n return is_client_or_staff();\n }", "title": "" }, { "docid": "155700df53771c7310f4186fc2f2e777", "score": "0.7761699", "text": "public function authorize() {\n\t\t// Check if the user is an admin\n\t\tif (!auth()->user()->is_admin) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "f4095d67de1b50bdbc6c577880ab6522", "score": "0.7758042", "text": "public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->isCommittee() || \n ($accessor->isEntrant() && $accessor->entry_id == $this->input('entry', null));\n }", "title": "" }, { "docid": "b944c706849f30f8074ab3c052baae9f", "score": "0.774445", "text": "public function authorize()\n {\n return $this->container['auth']->check() and ! $this->container['auth']->user()->isRegistered() and \n $this->get('_token') or $this->container['session.store']->getOldInput('_token');\n }", "title": "" }, { "docid": "d50c0193c5251a5f83978acf28ceb3d0", "score": "0.7740751", "text": "public function authorize()\n {\n $service = \\App::make('\\App\\Services\\UserService');\n if ($service->getUserById(\\Auth::user()->id)->user_flag == 1) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "b4352ac854d3de57135d1fb8b59e6ac9", "score": "0.7739782", "text": "public function authorize()\n {\n $idFromRoute = $this->route()->parameter('id');\n\n if (\\Auth::id() == $idFromRoute) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "ff8257362abf926bd0668a8e742b32df", "score": "0.7739511", "text": "public function authorize()\n {\n $metadata_id =$this->route('metadata');\n $metadata = Metadata::find($metadata_id);\n\n if (auth()->user()->isAdmin() || auth()->user()->can('user-edit') || $metadata->id == auth()->user()->id) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "5b4c01003b40c31053fde7580331e0fc", "score": "0.77388614", "text": "public function authorize()\n {\n if (Auth::user()) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "39b253a44ced92a3cc4ef7d6d3b3d357", "score": "0.77280486", "text": "public function authorize()\n {\n $id = (int) $this->route('livro');\n if($id == 0) {\n return false;\n }\n\n $livro = $this->repository->find($id);\n\n return $livro->author_id == \\Auth::user()->id;\n }", "title": "" }, { "docid": "a400c4ad3b40a246ede87970badd78de", "score": "0.77205354", "text": "public function authorize()\n {\n $user = User::find($this->route('user'));\n if (isset($contact)) {\n if (Auth::id() !== $user->user_id) {\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "977c162efbb9ce6cf5f45729c4416c11", "score": "0.7717961", "text": "public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }", "title": "" }, { "docid": "898712fbcecfc0d2dbede07c285ed664", "score": "0.7717889", "text": "public function authorize()\n {\n $comment = $this->route('comment');\n\n return $comment->user_id == auth()->id();\n }", "title": "" }, { "docid": "37e3a663086b468f101b243035cc75b0", "score": "0.7715398", "text": "public function authorize()\n {\n switch (FormRequest::get('method')) {\n case 'updateUser':\n return $this->user()->can('Update User');\n case 'restoreUser':\n return $this->user()->can('Restore User');\n case 'revokeUserAccess':\n return $this->user()->can('Revoke User');\n default:\n return false;\n }\n }", "title": "" }, { "docid": "7572c857607dd6bf2eba3e6802950835", "score": "0.7703274", "text": "public function isAuthorized() : bool;", "title": "" }, { "docid": "7572c857607dd6bf2eba3e6802950835", "score": "0.7703274", "text": "public function isAuthorized() : bool;", "title": "" }, { "docid": "7572c857607dd6bf2eba3e6802950835", "score": "0.7703274", "text": "public function isAuthorized() : bool;", "title": "" }, { "docid": "532c6c1036e7cfad132d50317ea265f2", "score": "0.76932836", "text": "function isAuthorized() {\n\t\treturn true;\n\t}", "title": "" }, { "docid": "c6aea3b396636e4503ce1626b53d82ba", "score": "0.7693082", "text": "public function authorize()\n {\n return session('storefront_key') || request()->session()->has('api_credential');\n }", "title": "" }, { "docid": "fb8e9aa8c9212aa2d6d9e94b9b66d2b9", "score": "0.76920545", "text": "public function authorize()\n {\n if ($this->pad && ! $this->padBelongsToUser()) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "e3bf4e1d584bb0846b61a01f2d94a302", "score": "0.76857436", "text": "public function authorize()\n\t{\n\t\tif ( $this->sensor != null ) {\n\t\t\treturn Auth::user()->isMySensor( $this->sensor );\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "5de7e533dd92526defeffa6a387298a2", "score": "0.76810336", "text": "public function authorize()\n {\n $user = $this->user();\n\n $entry = strpos($this->url(), 'entries/') !== false ?\n $this->route('entry')->id :\n $this->input('entry', null);\n\n return $user->isAdmin() || $user->hasKey('get-attempts') || \n ($user->isEntrant() && $user->entry->id == $entry);\n }", "title": "" }, { "docid": "f9167c54311f5a4e6dc10099b24e923e", "score": "0.76759565", "text": "public function isAuthorised()\r\n {\r\n return $this->access_token_expire && $this->access_token && $this->refresh_token;\r\n }", "title": "" }, { "docid": "d37445a87bbd20583e6134ae835f4e64", "score": "0.7673736", "text": "public function authorize()\n {\n if ($this->user && $this->user->hasPermission('manage_providers') ) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "3dd89f2a3c871f7e46d9829f5a99f7cb", "score": "0.7664139", "text": "public function isAuthorizedVisitor()\n {\n\n return $this->session->has('auth');\n }", "title": "" }, { "docid": "253207c500333409209d27c34b250540", "score": "0.7663029", "text": "public function authorize()\n {\n return ($this->user()->id == $this->route('battle')->user_id);\n }", "title": "" }, { "docid": "425ebe2bc8bb5e740ead4713694cf790", "score": "0.7655906", "text": "public function authorize()\n {\n return $this->user()->userType == 1? true : false;\n }", "title": "" }, { "docid": "893fefcaa8f0bbabe2639b6e2fc59c84", "score": "0.76401085", "text": "public function authorize()\n {\n if (Auth::check()) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "5ace9b025739d57e0a049734e5fc68db", "score": "0.76382744", "text": "public function authorize()\n {\n $article = $this->route('article');\n\n if ($article->viewable){\n return true;\n }\n \n try {\n if (! $user = JWTAuth::parseToken()->authenticate()) {\n return false;\n }\n }\n catch (\\Exception $e) {\n return false;\n }\n return $article->user->id == $user->id || $user->isAnAdmin();\n \n }", "title": "" }, { "docid": "b7a2c9ad92964ba77cc60e3b5e1786e6", "score": "0.7630591", "text": "public function authorize()\n {\n if ($this->guardName() !== '') {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "92ddf6452647b088c25aca867d3e6d7a", "score": "0.76302904", "text": "public function authorize()\n {\n // Authorization parameters.\n $isTeamOwner = $this->team->owner_id === Auth::user()->id;\n $isResourceOwner = $this->resource->author_id === Auth::user()->id;\n $resourceBelongsToTeam = $this->resource->team_id === $this->team->id;\n // We also need to check for the resource status but this will be done in the controller\n // in order to return the proper error message there.\n return $resourceBelongsToTeam && ($isResourceOwner || $isTeamOwner);\n }", "title": "" }, { "docid": "c7ce4d12e5eee0ca4049234179731162", "score": "0.7612592", "text": "public function authorize(): bool\n {\n return $this->user()->can('authentication settings');\n }", "title": "" }, { "docid": "dac595333da84dfb8ae02f841a4b3dea", "score": "0.7612475", "text": "public function authorize()\n {\n return auth()->check() == true;\n }", "title": "" }, { "docid": "c78e31ee952b9abb7f96de3c25225186", "score": "0.7609951", "text": "public function authorize()\n {\n if (Auth::check()) {\n if (Auth::user()->role_id == 1) {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "b798c2efb4a2a8ccb7262f70bc26c3aa", "score": "0.76091945", "text": "public function authorize()\n {\n // if(request()->is('api/*')){\n // return $this->user->id === auth()->user()->id;\n // }\n\n return true;\n }", "title": "" }, { "docid": "5263af9679eb1474d420b4a980521ae9", "score": "0.76088023", "text": "public function authorize()\n\t{\n\t\treturn true; //TODO: user checking (EG admin or admin of the org)\n\t}", "title": "" }, { "docid": "f771a1d50ce486a5c4823424102f9c57", "score": "0.76026106", "text": "public function authorize()\n {\n return $this->user()->role_id === RoleEnums::ADMIN;\n }", "title": "" }, { "docid": "7721e9deb876b374da55f4c6b2acd97a", "score": "0.76007926", "text": "public function authorize()\n {\n if (!\\Auth::guest()) {\n $user = \\Auth::getUser();\n if ($user->type == User::USER_TYPE_ADMIN) {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "c4a627017a1dba672171a1026addae07", "score": "0.75989425", "text": "public function authorize()\n {\n if (auth()->user()->admin === 1) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "ba17bbe327e3c9ae9bf4edf2881667b4", "score": "0.7592575", "text": "public function authorize()\n {\n\t\t//在这里可以校验是否有权限等\n return true;\n }", "title": "" }, { "docid": "a46b0a139ee6646088a7b14a71906fc2", "score": "0.758732", "text": "public function authorize()\n {\n // Covered by Admin user auth\n return true;\n }", "title": "" }, { "docid": "d67c2280a23ce79bed8ef6132f1c6cfb", "score": "0.75849605", "text": "public function authorize() : bool\n {\n return $this->encodePrimaryKey(auth()->user()->id) === request()->segment(3);\n }", "title": "" }, { "docid": "aa4e4595eeb521827bc14f0edf670c1b", "score": "0.75810015", "text": "public function authorize()\n {\n // Authorization is handled with the Authorization Policy, if we wanted to handle it here, commented code below would be the way\n // $todoUserId = $this->route('todo')->user_id;\n // $currentUserId = $this->user()->id;\n // return ($todoUserId === $currentUserId);\n\n return true;\n }", "title": "" }, { "docid": "4a4f0083ebf8a39536ac8ea3d76ee822", "score": "0.75782967", "text": "public function authorize()\n {\n /* if ($this->user_id == auth()->user()->id)\n {\n return true;\n } else {\n return false;\n } */\n\n return true;\n }", "title": "" }, { "docid": "87d1c597738cd059f848ede801414455", "score": "0.7569895", "text": "public function authorize(){\n\t\t// Make mongodb the presence verifier (check for duplicate names)\n\t\t$this->getValidatorInstance()->getPresenceVerifier()->setConnection('app');\n\n\t\treturn $this->user()->is('admin');\n\t}", "title": "" }, { "docid": "313d94e8acea8646cc8150a6ab69f739", "score": "0.7565273", "text": "public function authorize()\n {\n return !user();\n }", "title": "" }, { "docid": "f5ae0de655336a2b70af177e89a38a8d", "score": "0.75584877", "text": "public function authorize()\n {\n if ( !Auth::check() )\n {\n return false;\n }\n\n $theUser = User::find($this->segment(2));\n // 如果是编辑操作, 或者当前用户不是对象创建者\n if ( !$theUser || $theUser->id != Auth::id()) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "d23761969a1cc53cc7da18f0d5ec27f8", "score": "0.7545736", "text": "function isAuthorized() {\n $roles = $this->Role->calculateCMRoles();\n \n // Construct the permission set for this user, which will also be passed to the view.\n $p = array();\n \n // Determine what operations this user can perform\n \n // Reply to an invitation?\n $p['reply'] = true;\n \n $this->set('permissions', $p);\n return($p[$this->action]);\n }", "title": "" }, { "docid": "1e5bc4bbb7e375fd2e6207c90646128b", "score": "0.75436807", "text": "public function authorize()\n {\n return Auth::user() ? true : false;\n }", "title": "" }, { "docid": "a3e5e19a77bffb5d50f3339e6f87e3d3", "score": "0.7540883", "text": "public function authorize()\n {\n if ($this->request->get('roles')) {\n if (in_array('admin',array_values($this->request->get('roles')) ))\n {\n return (auth()->user()->hasRole('admin')) ? true: false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "4fc2ec7163e002c1ff9ce94bbf54c10e", "score": "0.7535914", "text": "public function authorize()\n {\n return User::where('id', \\Auth::id())->exists();\n }", "title": "" }, { "docid": "6bfd1731ff920472c83db5e90bee1819", "score": "0.75247914", "text": "public function authorize()\n {\n return $this->user()->can('view-permission');\n }", "title": "" }, { "docid": "df76ffddcb026f417ccf56b596ccefb5", "score": "0.75205433", "text": "public function authorize()\n {\n $data = $this->validationData();\n return (!is_null($data['username']) && $this->user()->username == $data['username']);\n }", "title": "" }, { "docid": "6f0c79da624bfa4177e2c2224acb6af7", "score": "0.7517829", "text": "public function authorize()\n {\n return $this->user()->userRole->add_clients == 1 ? true : false;\n }", "title": "" }, { "docid": "63b722e3507fccc9ed6815168a337646", "score": "0.7516394", "text": "public function authorize()\n {\n return $this->can('edit-resident')\n || (!empty($this->resident_id) && $this->user()->resident && $this->resident_id == $this->user()->resident->id);\n }", "title": "" }, { "docid": "d90be9edb33d6193d01dddcbd025baf8", "score": "0.7515625", "text": "public function authorize()\n {\n return auth()->check() && auth()->user()->hasAnyRole(permitRolesByUri('opsi'));\n }", "title": "" }, { "docid": "c62eea1d429f7cce19f0ce1ef4d3ea1d", "score": "0.7515129", "text": "public function authorize()\n {\n $data = $this->validationData();\n $story = $this->writerService->GetStoryByID($data['story_id']);\n return (!is_null($story) && $this->user()->username == $story['username']);\n }", "title": "" }, { "docid": "29a9da87bc44bd91bda5d32aae974c98", "score": "0.75099707", "text": "private function _isAuthorized()\n {\n $app = JFactory::getApplication();\n return ( $app->isAdmin() && JFactory::getSession()->checkToken());\n }", "title": "" }, { "docid": "79f8ed22ed7dab55b2030c1d6037d5df", "score": "0.75035185", "text": "public function authorize()\n {\n $parameters = $this->route()->parameters;\n\n $post = Models::post()->with('discussion')->findOrFail($parameters['post']);\n\n return (! is_null($this->user())) && $this->user()->id === (int) $post->user_id;\n }", "title": "" }, { "docid": "9cf7062eba5e301eed991dbfc61484f2", "score": "0.7502618", "text": "public function authorize()\n {\n\t\t// only allow updates if the user is logged in\n\t\treturn backpack_auth()->check();\n }", "title": "" }, { "docid": "c56e00592b535ca39627eac396d04b4b", "score": "0.7501333", "text": "public function authorize()\n {\n $user = $this->user('api');\n return $user->user_type === 'Restaurant';\n }", "title": "" }, { "docid": "b528e0bbb08c396e9c12fb17074b4e78", "score": "0.7492997", "text": "public function authorize()\n {\n if (!Auth::check()) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "4b8ec1bb175769ef85dce4064d3ae134", "score": "0.7490855", "text": "public function authorize(Request $request)\n {\n return false == is_null(Auth::user())\n && Auth::user()->id == $request->route('user_id');\n }", "title": "" }, { "docid": "72914acb0198bc54c343122b30392285", "score": "0.74898624", "text": "public function authorize()\n {\n return $this->user()->can(\n 'update',\n $this->route('professional') ? $this->route('professional') : $this->user()\n );\n }", "title": "" } ]
4551d52b0118e6d98de70facc2ad2962
Write using a stream.
[ { "docid": "0a7e6126179df79e73a1ea2960c33697", "score": "0.55414957", "text": "public function writeStream(string $path, $contents, Config $config): void\n {\n $auth = $this->getAuth();\n\n $token = $this->uploadToken ?: $auth->uploadToken($this->bucket, $path);\n $this->withUploadToken(null);\n\n $params = $config->get('params', null);\n $mime = $config->get('mime', 'application/octet-stream');\n $checkCrc = $config->get('checkCrc', false);\n\n [$ret, $error] = $this->qiniuPutFile($token, $path, $contents, $params, $mime, $checkCrc);\n\n if ($error !== null) {\n $this->logQiniuError($error);\n } else {\n $this->lastReturn = $ret;\n }\n }", "title": "" } ]
[ { "docid": "363cf8f455cbf00cfcb3624a92ac3097", "score": "0.7546545", "text": "public function writeStream($resource);", "title": "" }, { "docid": "2e3add11ee161b387fdad52c5587334f", "score": "0.7141751", "text": "public function stream_write($data);", "title": "" }, { "docid": "f88900cfc0732ee41e664588ee7394c5", "score": "0.7040073", "text": "public function writeStream($path, $resource, Config $config){}", "title": "" }, { "docid": "8366377d6c7535da8fa102a5105bea7b", "score": "0.7023845", "text": "public function writeStream($path, $resource, array $config = []);", "title": "" }, { "docid": "b17404b328da816f0b8c076bb6740110", "score": "0.70133036", "text": "public function writeStream($path, $resource, $config = []);", "title": "" }, { "docid": "97d2991a8a7793d52e7476789a56e6b7", "score": "0.68337727", "text": "public function send($stream);", "title": "" }, { "docid": "91df0c08374065f8ba34ffc3c8df5fa3", "score": "0.6702054", "text": "public function toStream($stream, $offset = 0, $maxlen = 0)\n {\n\n }", "title": "" }, { "docid": "dfea6be9db0ce515359e67eec4805f3f", "score": "0.6642303", "text": "public function write(string $string): StreamInterface;", "title": "" }, { "docid": "b0a08b9e8e06ac97ea49f309e0aafbe1", "score": "0.664006", "text": "public function write();", "title": "" }, { "docid": "b0a08b9e8e06ac97ea49f309e0aafbe1", "score": "0.664006", "text": "public function write();", "title": "" }, { "docid": "3e213b53d2a311b00b03eccb8adfebd6", "score": "0.6633788", "text": "public function __invoke($stream = null)\n {\n if (! is_resource($stream)) {\n echo $this->message;\n return;\n }\n\n fwrite($stream, $this->message);\n }", "title": "" }, { "docid": "da483c275ac9157ec3af9268f9e8556e", "score": "0.6585413", "text": "public function stream_write($data) {\n return fwrite($this->handle, $data);\n }", "title": "" }, { "docid": "026bf301aae721fb93251636d3a2dcfd", "score": "0.65766275", "text": "public function writeByteStream(Stream $stream, Stream $value)\n {\n $length = $value->getSize();\n\n $value->seek(0);\n $this->writeVarint($stream, $length);\n $stream->writeStream($value, $length);\n }", "title": "" }, { "docid": "450791cd4317d5387dda9b1ae1a556ce", "score": "0.64449185", "text": "public function writeStream(string $path, $stream, int $size = null): int {\n\t\t$target = $this->fopen($path, 'w');\n\t\t[$count, $result] = \\OC_Helper::streamCopy($stream, $target);\n\t\tfclose($target);\n\t\treturn $count;\n\t}", "title": "" }, { "docid": "c8cfc09f393219dca339ad89d530539a", "score": "0.64368224", "text": "public function putStream($resource);", "title": "" }, { "docid": "709abe2a275c5c36d2523035e2bf0b1d", "score": "0.63628364", "text": "function writeBinaryStream(){\r\n\t\tdie('Not implemented');\r\n\t}", "title": "" }, { "docid": "64e03b25b5755df007e35514f7f24fb7", "score": "0.6361972", "text": "public function write(string $content);", "title": "" }, { "docid": "8180bc875d602cb0f74e7eefe27f3ee6", "score": "0.6306326", "text": "public function testStreamIsWritableViaStreamFunctions()\n {\n $newContent = 'Write me. Now!';\n file_put_contents($this->stream, $newContent);\n $this->assertEquals($newContent, $this->stream->getContent());\n }", "title": "" }, { "docid": "c32c364510bf29a5bc0dbf1112c00ab5", "score": "0.6294958", "text": "public function writeStream(Stream $stream, Stream $value, $length = null)\n {\n if ($length === null) {\n $length = $value->getSize();\n }\n\n $stream->writeStream($value, $length);\n }", "title": "" }, { "docid": "33fbf33f7daf431fff0751ccb89e9d40", "score": "0.6287381", "text": "public function write ($data);", "title": "" }, { "docid": "aeac636e5590965a916c2693d764f2ad", "score": "0.62591344", "text": "private function _write($content) {\n fwrite($this->_output_stream, $content . \"\\n\");\n }", "title": "" }, { "docid": "28d5dd930a7c8cbbb3c4261ba9a76b6c", "score": "0.62488365", "text": "public function io($stream)\n {\n return $this->in($stream)->out($stream);\n }", "title": "" }, { "docid": "4de81972d61390a9aa210c8858562449", "score": "0.62387943", "text": "abstract public function write($buffer);", "title": "" }, { "docid": "868ba489ca875aeaa66e2d4e5fa90425", "score": "0.6235803", "text": "public function stream_write( $data ) { // @codingStandardsIgnoreLine\n\t\treturn fwrite( $this->fp, $data );\n\t}", "title": "" }, { "docid": "c62e84763e3272e721245a62e1502dcd", "score": "0.62272006", "text": "public function write($data);", "title": "" }, { "docid": "c62e84763e3272e721245a62e1502dcd", "score": "0.62272006", "text": "public function write($data);", "title": "" }, { "docid": "c62e84763e3272e721245a62e1502dcd", "score": "0.62272006", "text": "public function write($data);", "title": "" }, { "docid": "c62e84763e3272e721245a62e1502dcd", "score": "0.62272006", "text": "public function write($data);", "title": "" }, { "docid": "c62e84763e3272e721245a62e1502dcd", "score": "0.62272006", "text": "public function write($data);", "title": "" }, { "docid": "c62e84763e3272e721245a62e1502dcd", "score": "0.62272006", "text": "public function write($data);", "title": "" }, { "docid": "e2b719426d597a8629535794fc1587fc", "score": "0.6190518", "text": "public function stream_flush();", "title": "" }, { "docid": "7c31c7e6dc31e8473799685007f1b422", "score": "0.6162128", "text": "public function write($buf);", "title": "" }, { "docid": "42fafe73903ea1cdead40ba15db18970", "score": "0.61388075", "text": "public function write($content);", "title": "" }, { "docid": "6690d63afac1196ee8e325fe99336c37", "score": "0.61141306", "text": "function write($data);", "title": "" }, { "docid": "6690d63afac1196ee8e325fe99336c37", "score": "0.61141306", "text": "function write($data);", "title": "" }, { "docid": "7866059d59e3ac76fe1a71f510712109", "score": "0.6113505", "text": "public function putStream($path, $resource, array $config = []);", "title": "" }, { "docid": "5cc47f03ee30731e1bac90b373bbca8a", "score": "0.6111341", "text": "abstract public function write();", "title": "" }, { "docid": "b9af7c526ae175d789169e3aef86904a", "score": "0.6074587", "text": "public function writeStream($path, $resource, Config $config)\n\t{\n $return = parent::writeStream($path, $resource, $config);\n\n $this->commit('created ' . basename($path));\n\n return $return;\n }", "title": "" }, { "docid": "83841016541655cd702721a2ae4a6782", "score": "0.607085", "text": "public function putStream($path, $resource, $config = []);", "title": "" }, { "docid": "99b3b364b4999d7d57764a0fedbb60e0", "score": "0.60690755", "text": "public function write($contents);", "title": "" }, { "docid": "99b3b364b4999d7d57764a0fedbb60e0", "score": "0.60690755", "text": "public function write($contents);", "title": "" }, { "docid": "b0f104ea3b6c6bf6bc0ed4e25d0ffb57", "score": "0.6061733", "text": "public function stream();", "title": "" }, { "docid": "1a4a71f66c9d2f05e75967f8068cd095", "score": "0.6048646", "text": "protected function _write() {}", "title": "" }, { "docid": "d0705f0961b7373d2b52944ef02471b3", "score": "0.6020247", "text": "public function writeStream($path, $resource, $config = [])\n {\n return $this->upload($path, $resource, $config);\n }", "title": "" }, { "docid": "66d93fc311af14fb18fe5c8adf16bb1a", "score": "0.5995141", "text": "public function testWritingData()\n {\n $resource = fopen('php://temp', 'w');\n\n $streamMock = $this->getMockBuilder('GravityMedia\\Stream\\Stream')\n ->disableOriginalConstructor()\n ->setMethods(array('isWritable', 'isAccessible', 'getResource'))\n ->getMock();\n\n $streamMock->expects($this->once())\n ->method('isWritable')\n ->will($this->returnValue(true));\n\n $streamMock->expects($this->once())\n ->method('isAccessible')\n ->will($this->returnValue(true));\n\n $streamMock->expects($this->once())\n ->method('getResource')\n ->will($this->returnValue($resource));\n\n $writer = new StreamWriter($streamMock);\n\n $this->assertEquals(8, $writer->write('contents'));\n\n fclose($resource);\n }", "title": "" }, { "docid": "5ebad2d861f13010269d2c52b33574bc", "score": "0.5974024", "text": "public function setOutputStream($stream, bool $new = false): bool {\n if (is_resource($stream)) {\n $this->outputStream = $stream;\n $meat = stream_get_meta_data($this->outputStream);\n $this->outputStreamPath = $meat['uri'];\n file_put_contents($this->getOutputStreamPath(),'');\n\n return true;\n } \n\n $trimmed = trim((string)$stream);\n\n if (strlen($trimmed) > 0) {\n $create = $new === true;\n\n if (is_file($stream)) {\n return $this->setOutputStreamHelper($trimmed, 'r+');\n } else if ($create) {\n return $this->setOutputStreamHelper($trimmed, 'w');\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "7f6e204bc7a369a5d81d655ba9059c4e", "score": "0.5971946", "text": "private function fwrite($stream, string $bytes)\n {\n if (!strlen($bytes)) {\n return 0;\n }\n $result = @fwrite($stream, $bytes);\n if (0 !== $result) {\n // In cases where some bytes are witten (`$result > 0`) or\n // an error occurs (`$result === false`), the behavior of fwrite() is\n // correct. We can return the value as-is.\n return $result;\n }\n // If we make it here, we performed a 0-length write. Try to distinguish\n // between EAGAIN and EPIPE. To do this, we're going to `stream_select()`\n // the stream, write to it again if PHP claims that it's writable, and\n // consider the pipe broken if the write fails.\n $read = [];\n $write = [$stream];\n $except = [];\n @stream_select($read, $write, $except, 0);\n if (!$write) {\n // The stream isn't writable, so we conclude that it probably really is\n // blocked and the underlying error was EAGAIN. Return 0 to indicate that\n // no data could be written yet.\n return 0;\n }\n // If we make it here, PHP **just** claimed that this stream is writable, so\n // perform a write. If the write also fails, conclude that these failures are\n // EPIPE or some other permanent failure.\n $result = @fwrite($stream, $bytes);\n if (0 !== $result) {\n // The write worked or failed explicitly. This value is fine to return.\n return $result;\n }\n // We performed a 0-length write, were told that the stream was writable, and\n // then immediately performed another 0-length write. Conclude that the pipe\n // is broken and return `false`.\n return false;\n }", "title": "" }, { "docid": "29f86d5e31b1d681520a378a22dec39a", "score": "0.5965438", "text": "public function writeStream($path, $resource, Config $config)\n\t{\n\t\t$options = $this->getOptionsFromConfig($this->options, $config);\n\t\t$contents = stream_get_contents($resource);\n\n\t\treturn $this->write($path, $contents, $config);\n\t}", "title": "" }, { "docid": "eadd4fe3a9c6d9942ccb8d7c77033e9a", "score": "0.59531623", "text": "abstract protected function write();", "title": "" }, { "docid": "037bc7991ab92b8ad608b937c8ef7a22", "score": "0.5951888", "text": "public static function saveStream($stream, $filePath) {\n $defer = new Deferred;\n $bytes = 0;\n if($stream instanceof ReadableStreamInterface) {\n $fh = fopen($filePath, 'w');\n $stream->on('error', function($e) use ($fh, $defer) {\n fclose($fh);\n $defer->reject( $e );\n });\n $stream->on('data', function($chunk) use ($fh, &$bytes, $defer, $stream) {\n $written = fwrite($fh, $chunk);\n if($written === false) {\n $defer->reject( new \\Exception('FWRITE FAILED', 500) );\n $stream->close();\n }\n $bytes += $written;\n });\n $stream->on('close', function() use ($defer, $fh, &$bytes) {\n fclose($fh);\n $defer->resolve($bytes);\n });\n } else {\n $fh = fopen($filePath, 'w');\n $written = fwrite($fh, $stream);\n fclose($fh);\n $defer->resolve($written);\n }\n return $defer->promise();\n }", "title": "" }, { "docid": "6cb8e01509f7acf67512fd09208ee920", "score": "0.59321123", "text": "function addWriteStream($stream, callable $cb) {\n\n instance()->addWriteStream($stream, $cb);\n\n}", "title": "" }, { "docid": "7a4fbdd8b83e96f7ea3029dbd4a1df15", "score": "0.59230185", "text": "public function write(Writable $content);", "title": "" }, { "docid": "cfb1589bb214b372f4c2a6beea2e6c55", "score": "0.5915441", "text": "public function setStream(StreamInterface $stream);", "title": "" }, { "docid": "cfb1589bb214b372f4c2a6beea2e6c55", "score": "0.5915441", "text": "public function setStream(StreamInterface $stream);", "title": "" }, { "docid": "6e12dde999b8eeb1a88e9dd3e15b1131", "score": "0.58868265", "text": "public function writeStream($path, $resource, Config $config)\n {\n return $this->updateStream($path, $resource, $config);\n }", "title": "" }, { "docid": "c2bf0cb8d579aa91fc05893e21e08534", "score": "0.58839244", "text": "public function testWritingIntoTheStreamWorksCorrectly()\n {\n $handle = fopen($this->stream, 'ab');\n fseek($handle, strlen('Hello '));\n fwrite($handle, 'Europe');\n fclose($handle);\n $this->assertEquals('Hello Europe', $this->stream->getContent());\n }", "title": "" }, { "docid": "3f4e35e03db418812fc7917223c0a96a", "score": "0.58724064", "text": "function addWriteStream($stream, callable $cb) {\n\n $this->writeStreams[(int)$stream] = $stream;\n $this->writeCallbacks[(int)$stream] = $cb;\n\n }", "title": "" }, { "docid": "4509c5cc9718e9b330c2a6fa33f601e9", "score": "0.58713746", "text": "public function stream_write($data){\n $l = strlen($data);\n $this->_stream = substr($this->_stream, 0, $this->_pos) .\n $data .\n substr($this->_stream, $this->_pos += $l);\n\n return $l;\n }", "title": "" }, { "docid": "0754f073567db12cdd692d39794a7fcf", "score": "0.58712405", "text": "function write($data) {\n if (!$this->handle) {\n $this->handle = $this->open(TRUE);\n }\n if ($this->handle) {\n fwrite($this->handle, $data);\n }\n }", "title": "" }, { "docid": "c9d04387dd86406fe161cec8e6ed1a7c", "score": "0.5868876", "text": "public function writeStream($path, $resource, Config $config)\n {\n return false;\n }", "title": "" }, { "docid": "71eb98f9534390f5aeebf164fd4ebd03", "score": "0.58581895", "text": "public function writeStream($path, $resource, Config $config)\n {\n return $this->destination->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "a9fc56002aff822db69e038da00d08eb", "score": "0.5855198", "text": "public function writeStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "title": "" }, { "docid": "39b88a1d1b84dcdbebde3dee0c931c9a", "score": "0.5833796", "text": "public function createStream($content = '');", "title": "" }, { "docid": "dafc5003c91baf92701dc846240f1af0", "score": "0.5824613", "text": "public function write($string);", "title": "" }, { "docid": "2af41d9272dc0a13dd5f809aeeb939db", "score": "0.5820281", "text": "public function writeByte(Stream $stream, $value)\n {\n $stream->write(chr($value), 1);\n }", "title": "" }, { "docid": "0cc3fd7d50b23a96261439c6796c7c54", "score": "0.58123803", "text": "function makeBodyStream ($content = '', $stream = 'php://memory');", "title": "" }, { "docid": "871b9e1abb544938572d39adb7377428", "score": "0.5803864", "text": "public function withStream($stream);", "title": "" }, { "docid": "e2e7b135712011a34e50071d2a160fb5", "score": "0.5802023", "text": "public function write($input);", "title": "" }, { "docid": "de15d4cf4356f3d2ff907b734a5dad7a", "score": "0.57985896", "text": "public function createStream()\n {\n $authURL = $scheme.$username.\":\".$password.\"@\".$url;\n\n $opts = array(\n 'http' => array(\n 'method' => 'POST',\n 'content' => $data,\n 'header' => 'Content-type: application/x-www-form-urlencoded'\n )\n );\n\n $context = \\stream_context_create($opts);\n\n $stream = fopen($authURL, 'r', false, $context);\n\n if($stream)\n {\n $this->stream = $stream;\n }\n }", "title": "" }, { "docid": "3cef89650af74c584ffbccdd622bafa2", "score": "0.5790123", "text": "public function stream_write($data)\n {\n if (self::$logger instanceof Zend_Log) {\n self::$logger->log(\"stream_write($data)\", Zend_Log::DEBUG);\n }\n\n if (!$this->_objectName) {\n return 0;\n }\n $len = strlen($data);\n $this->_objectBuffer .= $data;\n $this->_objectSize += $len;\n return $len;\n }", "title": "" }, { "docid": "1bcba5a2c1196406596dd8d43277634c", "score": "0.5775169", "text": "public function setStream(OutputStream $stream)\n {\n $this->stream = $stream;\n $this->formatOutput = $stream->supportsAnsi() || !($this->formatter instanceof AnsiFormatter);\n }", "title": "" }, { "docid": "dad3f65934a5390e8e9aee3d6071830c", "score": "0.5759393", "text": "public function stream_write($data)\n {\n return is_resource($this->fileResource) ? fwrite($this->fileResource, $data) : false;\n }", "title": "" }, { "docid": "56c7e28700eeed626bcb2fa439d968dd", "score": "0.57557124", "text": "public function write($value)\n {\n $this->buffer .= $value;\n }", "title": "" }, { "docid": "7330915408bb72fe2b813cfd4e192dce", "score": "0.5734724", "text": "public function write($message) {\n\t\tfwrite($this->resource, $message);\n\t}", "title": "" }, { "docid": "f9275c69952e33ab82326d03ac68dd28", "score": "0.5708267", "text": "function writeAsciiStream(){\r\n\t\tdie('Not implemented');\r\n\t}", "title": "" }, { "docid": "3c6df18d57cc48c9dcba025148673596", "score": "0.5697262", "text": "public function stream(&$stream)\n\t{\t\t\n\t\t$length = strlen($stream);\n\t\t$offset = 0;\n\t\t\t\t\n\t\twhile ($length >= 0) {\n\n\t\t\t// Get a new chunk\n\t\t\t$len = ($length + 8) > MFCGI::MAX_LENGTH ? (MFCGI::MAX_LENGTH - 8) : $length;\n\t\t\t$this->content = substr($stream, $offset, $len);\n\t\t\t\n\t\t\t// Send the record\n\t\t\tif (!$this->write()) {return false;}\n\t\t\t\n\t\t\t// Next chunk values\n\t\t\t$length -= $len;\n\t\t\tif ($length <= 0) {break;}\n\t\t\t$offset += $len;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "6ddf3fa054582e92cf9c50e22d111100", "score": "0.56874925", "text": "public function writeStream($path, $resource, \\League\\Flysystem\\Config $config)\n {\n $meta = $this->write($path, $resource, $config);\n \n if($meta === false) {\n return false;\n }\n \n $meta['stream'] = $resource;\n return $meta;\n }", "title": "" }, { "docid": "a47db386feeca6a4186118d0dcf8314f", "score": "0.5675946", "text": "public function write(string $string);", "title": "" }, { "docid": "a47db386feeca6a4186118d0dcf8314f", "score": "0.5675946", "text": "public function write(string $string);", "title": "" }, { "docid": "a510eda0e1a53672645521326c03110b", "score": "0.56759137", "text": "public function testWritingData()\n {\n $resourceHelper = new ResourceHelper();\n $resource = $resourceHelper->getResource();\n\n $stream = Stream::fromResource($resource);\n\n $this->assertEquals(8, $stream->write('contents'));\n }", "title": "" }, { "docid": "b0fcd1c27c4e5815af2c206182ca1f2c", "score": "0.5666523", "text": "public function streams();", "title": "" }, { "docid": "203ca3f7e1f1274e9dabb5c06ae184cf", "score": "0.56644", "text": "public function write($line);", "title": "" }, { "docid": "203ca3f7e1f1274e9dabb5c06ae184cf", "score": "0.56644", "text": "public function write($line);", "title": "" }, { "docid": "80816681235943249bdd30bd33d09435", "score": "0.5659848", "text": "public function write($filename, $content);", "title": "" }, { "docid": "01e1b3a33fe0885bb79fbe47f928059e", "score": "0.5646277", "text": "public function writeStream($path, $resource, Config $config)\n {\n $contents = stream_get_contents($resource);\n\n try {\n $this->aliyunClient->uploadContent($path, $contents);\n } catch (OSSException $e) {\n $this->errors->add($e->getCode(), $e->getMessage());\n return false;\n }\n\n if (is_resource($resource)) {\n fclose($resource);\n }\n\n return true;\n }", "title": "" }, { "docid": "db07812cf0fe83e849aac29215606af4", "score": "0.5646181", "text": "public function stream_write($data) \r\n {\r\n $left = substr($this->_data, 0, $this->_pos);\r\n $right = substr($this->_data, $this->_pos + strlen($data));\r\n $this->_data = $left . $data . $right;\r\n $this->_pos += strlen($data);\r\n return strlen($data);\r\n\r\n return $ret;\r\n }", "title": "" }, { "docid": "db2a2d461963fc463d1a169606741e1c", "score": "0.5621365", "text": "function write($str) { return fputs($this->handle, $str); }", "title": "" }, { "docid": "64141ab468cf691ac341537b76914234", "score": "0.5608694", "text": "public function updateStream($resource);", "title": "" }, { "docid": "2a0cc35276f59519da4befdc4871b5f0", "score": "0.55831444", "text": "public function writeBytes(Stream $stream, $bytes, $length = null)\n {\n if ($length === null) {\n $length = mb_strlen($bytes, '8bit');\n }\n\n $stream->write($bytes, $length);\n }", "title": "" }, { "docid": "93db0bb048f4f1788da4a253949888b2", "score": "0.5579488", "text": "public function getWriteStream()\n {\n return $this->writeStream;\n }", "title": "" }, { "docid": "62b0ea09349d38133388754ad275c313", "score": "0.5570713", "text": "public function writeTo($path);", "title": "" }, { "docid": "7330d30c447edd82bcd54f0f8fdeea61", "score": "0.5569152", "text": "abstract protected function writeBytes($bytes);", "title": "" }, { "docid": "87fdc9fd985df47927db974dd7cc9c4f", "score": "0.5567898", "text": "public function registerStreamWrapper();", "title": "" }, { "docid": "e33735e30878369bb3c789ddfab84bdf", "score": "0.55589885", "text": "public function setStream(string $stream): void\n {\n $this->stream = $stream;\n $this->length = \\mb_strlen($stream);\n $this->pos = 0;\n }", "title": "" }, { "docid": "0b97d7cc21ecd1719b4f7c60e3036c55", "score": "0.55502313", "text": "public function addWriteStream($stream, $listener)\n\t{\n\t}", "title": "" }, { "docid": "6166759aa29bdb4ef4bbe450c7ef436d", "score": "0.5544964", "text": "public function addWriteStream($stream, $listener)\n {\n $key = (int) $stream;\n\n $this->streamsWrite[$key] = $stream;\n $this->streamsDuplex[$key] = $stream;\n\n GlobalState::set('eventloop.streams.write.current', count($this->streamsWrite));\n GlobalState::set('eventloop.streams.total.current', count($this->streamsDuplex));\n GlobalState::incr('eventloop.streams.write.total');\n\n if (!isset($this->streamsRead[$key])) {\n GlobalState::incr('eventloop.streams.total.total');\n }\n\n $this->loop->addWriteStream($stream, function ($stream) use ($listener) {\n GlobalState::incr('eventloop.streams.write.ticks');\n GlobalState::incr('eventloop.streams.total.ticks');\n\n $listener($stream, $this);\n });\n }", "title": "" }, { "docid": "99b365c4be781943d3ea6cce25379dbb", "score": "0.5539853", "text": "public function write($content)\n {\n $this->contents .= $content;\n }", "title": "" }, { "docid": "bc12c441ccec126e144fea59339571a6", "score": "0.55343217", "text": "public function write($content)\n {\n fwrite(\\STDOUT, $content);\n }", "title": "" }, { "docid": "683fc08e0cccddaa96b901611fd1aa50", "score": "0.55317765", "text": "private function streamWrite($url, $response)\n {\n $stream = fopen($url, 'a');\n if (!is_resource($stream))\n {\n throw new \\UnexpectedValueException(sprintf('The stream or file \"%s\" could not be opened.', $url));\n }\n fwrite($stream, '['.$response['datetime']->format('Y-m-d H:i:s').'] '.\n $response['code'].': '.$response['message'].PHP_EOL);\n fclose($stream);\n }", "title": "" }, { "docid": "82f24e0d0ea94a6c181a8cf023eb8f9e", "score": "0.55291027", "text": "abstract public function stream($name);", "title": "" } ]
75385fbe39a0f48b96b912e2c32b3ffc
PHP is inconsistent with its type names. This function returns the most popular names for data types instead of those that gettype() usually returns.
[ { "docid": "80c5ee03b9f6f17662d1c4efad436799", "score": "0.5909471", "text": "function type($value): string\n{\n static $map = [\n \"boolean\" => \"bool\",\n \"integer\" => \"int\",\n \"double\" => \"float\",\n \"string\" => \"string\",\n \"array\" => \"array\",\n \"object\" => \"object\",\n \"resource\" => \"resource\",\n \"NULL\" => \"null\",\n \"unknown type\" => \"unknown type\"\n ];\n\n return $map[\\gettype($value)];\n}", "title": "" } ]
[ { "docid": "ae551bc17d846598352c9c637b8be898", "score": "0.6976066", "text": "static public function guess_data_type($name)\n\t\t{\n\t\tif ($name == 'id') return array('primary_key', '');\n\t\telse if (strpos($name, 'is_') !== false) return array('bool', '');\n\t\telse if (strpos($name, '_id')) return array('int', '');\n\t\telse if (strpos($name, '_at')) return array('datetime', '');\n\t\telse if (strpos($name, '_on')) return array('date', '');\n\t\telse if (strpos($name, '_by')) return array('int', 100000);\n\t\telse if (strpos($name, '_name')) return array('str', 140);\n\t\telse if (strpos($name, '_per_')) return array('int', 1000000);\n\t\telse if (strpos($name, '_count')) return array('int', 1000000);\n\t\telse if (strpos($name, '_blob')) return array('blob', '');\n\t\telse if (is(self::$data_defs, $name)) return self::$data_defs[$name];\n\t\telse return array('str', 250);\n\t\t}", "title": "" }, { "docid": "5a98842efe0d3c03f0d26ca35a5b0c31", "score": "0.66691136", "text": "public function getTypeNames()\n\t{\n\t\t$types = array();\n\t\t$data = $this->query('SELECT CT_ID, CT_NAME FROM '.$this->table);\n\t\tforeach ($data as $row) {\n\t\t\tif (preg_match('/^[a-z\\s-]+$/ui', $row['CT_NAME'])) {\n\t\t\t\t$types[$row['CT_ID']] = $row['CT_NAME'];\n\t\t\t} else {\n\t\t\t\t$types[$row['CT_ID']] = json_decode($row['CT_NAME'], true);\n\t\t\t}\n\t\t}\n\t\treturn $types;\n\t}", "title": "" }, { "docid": "9279f507e21c4842f86c9f231a24481c", "score": "0.6642369", "text": "public function types()\n {\n return array_keys($this->type_data);\n }", "title": "" }, { "docid": "65828aa5029e1d9a6c2ee6dee074d2d7", "score": "0.6509219", "text": "public function getfieldTypes()\n {\n $arrFieldTypes = [\n 'Rand value' => 'Rand value',\n 'percentage' => 'percentage',\n 'integer' => 'integer',\n 'selection' => 'selection'\n ];\n\n return $arrFieldTypes;\n }", "title": "" }, { "docid": "de6f90b5276b51ea6acccd27db5a029e", "score": "0.64722633", "text": "public function getPhpType() {\n\t\t\tif (($this->type == 'float') || ($this->type == 'double')) \n\t\t\t{\n\t\t\t\treturn 'float';\t\t\t\t\t\n\t\t\t}\n\n\t\t\tif (strpos($this->type, 'int') !== FALSE) \n\t\t\t{\n\t\t\t\treturn 'int';\n\t\t\t}\n\t\t\t\n\t\t\treturn 'string';\n\t\t}", "title": "" }, { "docid": "6abef2778bbeadf47428b61d16ef4390", "score": "0.6429023", "text": "public static function getTypes()\n {\n $types = array(\n 'name' => array('id' => 'name', 'name' => 'name'),\n 'http-equiv' => array('id' => 'http-equiv', 'name' => 'http-equiv'),\n );\n return $types;\n }", "title": "" }, { "docid": "232d8b1f432fb25433db5fc0c6b93c86", "score": "0.63958246", "text": "function getHumanType($sDataType)\n{\n\t// This array is NOT EXHAUSTIVE; if you need more, please\n\t// see the link give here above and add yours.\n\t$arr = array(\n\t\t\"4\" => \"float [DT_R4]\",\n\t\t\"19\" => \"four-byte unsigned integer [DT_UI4]\",\n\t\t\"129\" => \"string [DT_STR]\",\n\t\t\"130\" => \"Unicode string [DT_WSTR]\"\n\t);\n\n\t// Because we need a default value\n\t$sReturn = 'undefined';\n\n\tforeach ($arr as $key=>$value) {\n\t\tif ($sDataType == $key) {\n\t\t\t$sReturn = $value;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn $sReturn;\n}", "title": "" }, { "docid": "d5107347dfc913360370dfd4e6cb3517", "score": "0.6395451", "text": "public static function get_lookup_field_data_types() {\n\t\t$data_types = array(\n\t\t\t'select' => __( 'Dropdown', 'formidable-pro' ),\n\t\t\t'radio' => __( 'Radio Buttons', 'formidable-pro' ),\n\t\t\t'checkbox' => __( 'Checkboxes', 'formidable-pro' ),\n\t\t\t'text' => __( 'Single Line Text', 'formidable-pro' ),\n\t\t\t'data' => __( 'List', 'formidable-pro' ),\n\t\t);\n\t\treturn $data_types;\n\t}", "title": "" }, { "docid": "5e89de292be04751f4bcb33ecf9422ef", "score": "0.6394066", "text": "function sc_get_data_types() {\n\treturn array(\n\t\t'question_short' => __( 'Short Answer Question', 'sc' ),\n\t\t'question_long' => __( 'Long Answer Question', 'sc' ),\n\t\t'content' => __( 'Content', 'sc' ),\n\t\t'assignment' => __( 'Assignment', 'sc' ),\n\t);\n}", "title": "" }, { "docid": "76d29c9f84d4b7cb0992a0b3917e5b7a", "score": "0.6357872", "text": "public function getDataTypes();", "title": "" }, { "docid": "592e36fe5f2cabebafaa806ba8ba0c2d", "score": "0.63210243", "text": "public static function data_type() {\n\n\t\treturn '';\n\t}", "title": "" }, { "docid": "19f3d28b92bdce8eee1a284f00e8521d", "score": "0.6258987", "text": "function getTypes();", "title": "" }, { "docid": "28131414b8e21641fa205288c6f7ebdc", "score": "0.6256489", "text": "public static function getTypes()\r\n {\r\n return array(\r\n \"...\"=>\"\",\r\n \"Townhouse Apartment\"=>\"Townhouse Apartment\",\r\n \"Townhouse Condo\"=>\"Townhouse Condo\",\r\n \"High Rise Apartment\"=>\"High Rise Apartment\",\r\n \"Low Rise Apartment\"=>\"Low Rise Apartment\",\r\n \"High Rise Condo\"=>\"High Rise Condo\",\r\n \"Low Rise Condo\"=>\"Low Rise Condo\",\r\n \"Mixed Use Condo Apartment\"=>\"Mixed Use Condo Apartment\",\r\n \"Mixed Use Apartment Commercial\"=>\"Mixed Use Apartment Commercial\"\r\n );\r\n }", "title": "" }, { "docid": "5fb356887fe4beccea6087878a109720", "score": "0.6255913", "text": "function magrathea_getTypesArr(){\n\t$types = array(\"int\", \"boolean\", \"string\", \"text\", \"float\", \"datetime\");\n\treturn $types;\n}", "title": "" }, { "docid": "3a78ab2dc0c90cc51aaee7047dedda4b", "score": "0.62376344", "text": "public function getTypes()\n {\n return array_keys($this->types);\n }", "title": "" }, { "docid": "c717cabca4fc95576950a3b2f02eb4b2", "score": "0.62252146", "text": "public function allTypes() {\n $types = [];\n foreach (array_keys($this->info) as $type) {\n $types[$type] = $this->type($type);\n }\n return $types;\n }", "title": "" }, { "docid": "0a1624fc2610133a27fbd7ee1b9eec1d", "score": "0.62105006", "text": "public static function fastlyTypes()\n {\n return self::$fastlyTypes;\n }", "title": "" }, { "docid": "0a1624fc2610133a27fbd7ee1b9eec1d", "score": "0.62105006", "text": "public static function fastlyTypes()\n {\n return self::$fastlyTypes;\n }", "title": "" }, { "docid": "0a1624fc2610133a27fbd7ee1b9eec1d", "score": "0.62105006", "text": "public static function fastlyTypes()\n {\n return self::$fastlyTypes;\n }", "title": "" }, { "docid": "0656be428441b9adde7c96a09f8bde40", "score": "0.61719626", "text": "public function getTypeDescription() {\n\n\t\tif ($this->type == self::TYPE_NULL) {\n\t\t\treturn 'null';\n\t\t}\n\t\tif ($this->type == self::TYPE_STRING) {\n\t\t\treturn 'string';\n\t\t}\n\t\tif ($this->type == self::TYPE_NUMERIC) {\n\t\t\treturn 'numeric';\n\t\t}\n\t\tif ($this->type == self::TYPE_BOOLEAN) {\n\t\t\treturn 'boolean';\n\t\t}\n\t\tif ($this->type == self::TYPE_ASSOCIATIVE_ARRAY) {\n\t\t\treturn 'array';\n\t\t}\n\t\tif ($this->type == self::TYPE_INDEX_ARRAY) {\n\t\t\treturn 'array';\n\t\t}\n\t\tif ($this->type == self::TYPE_OBJECT) {\n\t\t\treturn 'object';\n\t\t}\n\t\tif ($this->type == self::TYPE_JAVASCRIPT_CODE) {\n\t\t\treturn 'code';\n\t\t}\n\n\t\treturn 'unknown';\n\t}", "title": "" }, { "docid": "bd410ee9071bb5155dab27c9e7063d79", "score": "0.6161517", "text": "function column_type($name)\r\n {\r\n $cols = $this->columns();\r\n foreach ($cols as $v)\r\n if ($v['Field'] == $name)\r\n return $v['Type'];\r\n return '';\r\n }", "title": "" }, { "docid": "c7ab12c54a7fe203d28708fd856fff76", "score": "0.610758", "text": "public static function getUsedTypes(): array\n {\n $types = [];\n $usedTypes = Server::perform('get-used-types');\n array_walk($usedTypes, static function ($row) use (&$types): void {\n $types[] = $row['type'];\n });\n\n return $types;\n }", "title": "" }, { "docid": "c8febfab72d20f0d43694ea4de187b38", "score": "0.61017287", "text": "public function listTypes() {\n if(is_null($this->pdo)) {\n $this->msg = 'Connection did not work out!';\n return [];\n } else {\n $sql = 'SELECT typ_id,\n typ_name\n FROM hlp_mchn_typeof \n ORDER BY typ_name';\n $pdo = $this->pdo;\n $stmt = $pdo->prepare($sql);\n $stmt->execute();\n $result = $stmt->fetchAll(); \n return $result; \n }\n }", "title": "" }, { "docid": "7267620514de2f09cef9c9bc325e16f1", "score": "0.6082732", "text": "public function types(): array;", "title": "" }, { "docid": "22240108f43f7fe6c6c7a88dada345dd", "score": "0.60826993", "text": "abstract public function getTypesDefined();", "title": "" }, { "docid": "7e8990f06fb5bf9966956f89f98f626d", "score": "0.6058509", "text": "public function get_types()\n\t{\n\t\t$list = $this->_get_list_provider();\n\t\t\n\t\treturn array_keys($list);\n\t}", "title": "" }, { "docid": "49d74072f806828c85e6049428a89847", "score": "0.605726", "text": "function myGetType($var)\n{\n\tif (is_array($var)) return \"array\";\n\tif (is_bool($var)) return \"boolean\";\n\tif (is_float($var)) return \"float\";\n\tif (is_int($var)) return \"integer\";\n\tif (is_null($var)) return \"NULL\";\n\tif (is_numeric($var)) return \"numeric\";\n\tif (is_object($var)) return \"object\";\n\tif (is_resource($var)) return \"resource\";\n\tif (is_string($var)) return \"string\";\n\treturn \"unknown type\";\n}", "title": "" }, { "docid": "31eea2fa59c42fea345196a0b4407e8e", "score": "0.6042899", "text": "public static function getTypeDefinitions()\n {\n return [['string', ReflectionPrimitive::$STRING],\n ['int', ReflectionPrimitive::$INT],\n ['integer', ReflectionPrimitive::$INTEGER],\n ['float', ReflectionPrimitive::$FLOAT],\n ['double', ReflectionPrimitive::$DOUBLE],\n ['bool', ReflectionPrimitive::$BOOL],\n ['boolean', ReflectionPrimitive::$BOOLEAN],\n ['array', ReflectionPrimitive::$ARRAY],\n ['mixed', MixedType::$MIXED],\n ['object', MixedType::$OBJECT]\n ];\n }", "title": "" }, { "docid": "c503e3ca320e533bc08a4ddfb22fd03b", "score": "0.60348666", "text": "function getDataTypes() {\r\n\t$query = \"SELECT * FROM feature_var_types ORDER BY type_id ASC\";\r\n\t$result = sqlRead($query);\r\n\r\n\treturn $result;\r\n}", "title": "" }, { "docid": "c11a42e9e74eb9f7bb845525c5f33429", "score": "0.60241973", "text": "public function __getTypes(){}", "title": "" }, { "docid": "428f8c83a92bbd34ee5cc63efd814e6e", "score": "0.6002604", "text": "public static function getFieldTypes() {\n\t\treturn self::$FIELD_TYPES;\n\t}", "title": "" }, { "docid": "428f8c83a92bbd34ee5cc63efd814e6e", "score": "0.6002604", "text": "public static function getFieldTypes() {\n\t\treturn self::$FIELD_TYPES;\n\t}", "title": "" }, { "docid": "3d22da463b0cc7badd15a3cd495ee937", "score": "0.5981742", "text": "function get_vat_type_names()\n\t{\n\t\treturn array(\n\t\t\t'standard'\t\t=> 'Standard',\n\t\t\t'reduced'\t\t=> 'Reduced',\n\t\t\t'superreduced'\t=> 'Super reduced',\n\t\t\t'parking'\t\t=> 'Parking',\n\t\t\t'increased'\t\t=> 'Increased',\n\t\t\t'enhanced'\t\t=> 'Enhanced'\n\t\t);\r\n\t}", "title": "" }, { "docid": "7658de37f90d0956e17e3d94627dfc26", "score": "0.5980557", "text": "static function getTypeDesc(){\n return array(\n self::$_type_cellphone =>'手机号',\n self::$_type_email =>'邮箱',\n self::$_type_name =>'用户名',\n\n self::$_type_wechat =>'微信',\n self::$_type_weibo =>'微博',\n self::$_type_facebook =>'脸书',\n self::$_type_google =>'谷歌',\n self::$_type_twitter =>'推特',\n self::$_type_qq =>'QQ',\n self::$_type_guest =>'游客',\n// self::$_type_cellphone_ps =>'手机密码登陆',\n// self::$_type_pc_cellphone_ps =>'pc端手机密码登陆',\n// self::$_type_pc_cellphone_sms =>'pc端手机验证码登陆',\n// self::$_type_sdk_share_app =>'SDK内分享',\n );\n }", "title": "" }, { "docid": "99e09dbf95510c620b702bfd7d865e49", "score": "0.59794164", "text": "public function getDotNetObjectType()\n {\n if (mb_strpos($this->type, \"int\") === 0) {\n return \"Int32\";\n }\n if (mb_strpos($this->type, \"longtext\") === 0) {\n return \"String\";\n }\n if (mb_strpos($this->type, \"long\") === 0) {\n return \"Long\";\n }\n if (mb_strpos($this->type, \"char\") === 0) {\n return \"String\";\n }\n if (mb_strpos($this->type, \"varchar\") === 0) {\n return \"String\";\n }\n if (mb_strpos($this->type, \"text\") === 0) {\n return \"String\";\n }\n if (mb_strpos($this->type, \"tinyint\") === 0) {\n return \"Boolean\";\n }\n if (mb_strpos($this->type, \"datetime\") === 0) {\n return \"DateTime\";\n }\n return \"Unknown\";\n }", "title": "" }, { "docid": "252988910a16e237398dec2ae4b6b1bf", "score": "0.59722245", "text": "public function typeProvider() {\n\t\treturn array(\n\t\t\tarray('w', 'w'),\n\t\t\tarray('word', 'w'),\n\t\t\tarray('words', 'w'),\n\t\t\tarray('p', 'p'),\n\t\t\tarray('para', 'p'),\n\t\t\tarray('paras', 'p'),\n\t\t\tarray('paragraph', 'p'),\n\t\t\tarray('paragraphs', 'p'),\n\t\t\tarray('b', 'b'),\n\t\t\tarray('byte', 'b'),\n\t\t\tarray('bytes', 'b'),\n\t\t\tarray('l', 'l'),\n\t\t\tarray('list', 'l'),\n\t\t\tarray('lists', 'l'),\n\t\t\tarray('ul', 'l'),\n\t\t\tarray('ol', 'l'),\n\t\t\tarray('default', 'l'),\n\t\t);\n\t}", "title": "" }, { "docid": "feaafe65e1b8534eadc6c7d9b8ad17a0", "score": "0.5970778", "text": "public function dataTypeList()\n {\n return implode(',', $this->dataTypesArray());\n }", "title": "" }, { "docid": "3ebd9c5d2668792089d0f458193c0aa4", "score": "0.5956444", "text": "function W3GetPHPVarType($var) {\n if (is_array($var)) {\n $keys = array_keys($var);\n foreach ($keys as $value) {\n if (gettype($value) == \"string\") {\n return \"dict\";\n }\n }\n\n return \"array\";\n }\n\n return gettype($var);\n}", "title": "" }, { "docid": "e378c35133ea4415e52660cfb2246ed6", "score": "0.59471345", "text": "public function defendTypes()\n\t{\n\t\t$defend_types_arr = array(\n\t\t\tarray('Counter attack'=>190), \n\t\t\tarray('Minefields'=>190),\n\t\t\tarray('Booby traps'=>100),\n\t\t\tarray('Rapid reaction force'=>130),\n\t\t\tarray('Hedgehog defence'=>220),\n\t\t\tarray('Nuclear assault'=>700),\n\t\t);\n\t\t\n\t\treturn $defend_types_arr;\n\t}", "title": "" }, { "docid": "2b8dc321e00cb69c49d1b00786ab0a27", "score": "0.5911675", "text": "public function getOGtypes()\n {\n return [\n 'website' => 'Website',\n 'article' => 'Article',\n 'book' => 'Book',\n 'profile' => 'Profile',\n 'music' => 'Music',\n 'video' => 'Video'\n ];\n }", "title": "" }, { "docid": "dd1275a004acbaf9d1d3509da6584506", "score": "0.5906538", "text": "public static function get_autopopulate_field_types() {\n\t\t$autopopulate_field_types = array(\n\t\t\t'text',\n\t\t\t'email',\n\t\t\t'url',\n\t\t\t'time',\n\t\t\t'user_id',\n\t\t\t'number',\n\t\t\t'phone',\n\t\t\t'date',\n\t\t\t'select',\n\t\t\t'hidden',\n\t\t\t'textarea',\n\t\t);\n\n\t\treturn $autopopulate_field_types;\n\t}", "title": "" }, { "docid": "02ebe60997c79820cb19d52b1c30a65b", "score": "0.5898444", "text": "public function nameTypeData()\n {\n return Class_Object::DATA_DATE;\n }", "title": "" }, { "docid": "aa9dd0cdde95b075b26111fac4132020", "score": "0.5894521", "text": "public function getTypes() {\n $key = md5('jettonTypes');\n if (!$data = $this->_cache->load($key)) {\n $select = $this->select()\n ->from($this->_name, array('id', 'typeName'));\n $data = $this->getAdapter()->fetchPairs($select);\n $this->_cache->save($data, $key);\n }\n return $data;\n }", "title": "" }, { "docid": "f31ee5c9f740723d2f39884b4638c074", "score": "0.5886796", "text": "public function getTypes();", "title": "" }, { "docid": "f31ee5c9f740723d2f39884b4638c074", "score": "0.5886796", "text": "public function getTypes();", "title": "" }, { "docid": "f31ee5c9f740723d2f39884b4638c074", "score": "0.5886796", "text": "public function getTypes();", "title": "" }, { "docid": "f31ee5c9f740723d2f39884b4638c074", "score": "0.5886796", "text": "public function getTypes();", "title": "" }, { "docid": "f31ee5c9f740723d2f39884b4638c074", "score": "0.5886796", "text": "public function getTypes();", "title": "" }, { "docid": "bcd965013a326489edf0327f36d80ccf", "score": "0.5882957", "text": "protected function getTypes($info = 'name') {\n switch ($info) {\n case 'name':\n return array(\n 'union' => t('Union'),\n 'concat' => t('Concatenation'),\n 'sum' => t('Sum'),\n 'count' => t('Count'),\n 'max' => t('Maximum'),\n 'min' => t('Minimum'),\n 'first' => t('First'),\n );\n case 'type':\n return array(\n 'union' => 'string',\n 'concat' => 'string',\n 'sum' => 'integer',\n 'count' => 'integer',\n 'max' => 'integer',\n 'min' => 'integer',\n 'first' => 'string',\n );\n case 'description':\n return array(\n 'union' => t('The Union aggregation does an union operation of all the values of the field. 2 items with 2 fields become 1 item with 4 fields.'),\n 'concat' => t('The Concatenation aggregation concatenates the text data of all contained fields.'),\n 'sum' => t('The Sum aggregation adds the values of all contained fields numerically.'),\n 'count' => t('The Count aggregation takes the total number of contained field values as the aggregated field value.'),\n 'max' => t('The Maximum aggregation computes the numerically largest contained field value.'),\n 'min' => t('The Minimum aggregation computes the numerically smallest contained field value.'),\n 'first' => t('The First aggregation will simply keep the first encountered field value. This is helpful foremost when you know that a list field will only have a single value.'),\n );\n }\n return array();\n }", "title": "" }, { "docid": "def928af035d3771c1864dbbfeb1bcec", "score": "0.5869423", "text": "public static function dataTypeMap()\n {\n $default = [\n 'char' => 'char',\n 'date' => 'date',\n 'datetime' => 'dateTime',\n 'datetimetz' => 'dateTimeTz',\n 'biginteger' => 'bigIncrements',\n 'bigint' => 'bigIncrements',\n 'tinyblob' => 'binary',\n 'mediumblob' => 'binary',\n 'blob' => 'binary',\n 'longblob' => 'binary',\n 'binary' => 'binary',\n 'bool' => 'boolean',\n 'bit' => 'boolean',\n 'boolean' => 'boolean',\n 'decimal' => 'decimal',\n 'double' => 'double',\n 'enum' => 'enum',\n 'list' => 'enum',\n 'float' => 'float',\n 'int' => 'integer',\n 'integer' => 'integer',\n 'ipaddress' => 'ipAddress',\n 'json' => 'json',\n 'jsonb' => 'jsonb',\n 'longtext' => 'longText',\n 'macaddress' => 'macAddress',\n 'mediuminteger' => 'mediumInteger',\n 'mediumint' => 'mediumInteger',\n 'mediumtext' => 'mediumText',\n 'smallInteger' => 'smallInteger',\n 'smallint' => 'smallInteger',\n 'morphs' => 'morphs',\n 'string' => 'string',\n 'varchar' => 'string',\n 'nvarchar' => 'string',\n 'text' => 'text',\n 'time' => 'time',\n 'timetz' => 'timeTz',\n 'tinyinteger' => 'tinyInteger',\n 'tinyint' => 'tinyInteger',\n 'timestamp' => 'timestamp',\n 'timestamptz' => 'timestampTz',\n 'unsignedbiginteger' => 'unsignedBigInteger',\n 'unsignedbigint' => 'unsignedBigInteger',\n 'unsignedInteger' => 'unsignedInteger',\n 'unsignedint' => 'unsignedInteger',\n 'unsignedmediuminteger' => 'unsignedMediumInteger',\n 'unsignedmediumint' => 'unsignedMediumInteger',\n 'unsignedsmallinteger' => 'unsignedSmallInteger',\n 'unsignedsmallint' => 'unsignedSmallInteger',\n 'unsignedtinyinteger' => 'unsignedTinyInteger',\n 'uuid' => 'uuid',\n ];\n\n return self::getArrayBaseValue('eloquent_type_to_method', $default);\n }", "title": "" }, { "docid": "565ce1d5b5ec603e5c7fdc71b2891628", "score": "0.5863466", "text": "public static function getTypes()\n {\n return [\n self::TYPE_BACKUPCODE => 'Printable Codes',\n self::TYPE_MANAGER => 'Manager Backup Code',\n self::TYPE_TOTP => 'Smartphone App',\n self::TYPE_WEBAUTHN => 'Security Key',\n ];\n }", "title": "" }, { "docid": "030400aaf5c6ea51600835a9a75de5e8", "score": "0.5863381", "text": "public function getTypeNames()\n {\n $result = array();\n /** @var AddressType $type */\n foreach ($this->getTypes() as $type) {\n $result[] = $type->getName();\n }\n return $result;\n }", "title": "" }, { "docid": "082ba2e524dd3e5fb8b72679d078f635", "score": "0.585131", "text": "private function getDataTypesArray() {\n\t\t$firstDataRow = $this->csv[0]; //get first data row for detecting data types\n\t\t$types = array();\n\t\tforeach($firstDataRow as $data) {\n\t\t\tif ((string)(int)$data == $data) {\n\t\t\t\tarray_push($types, \"int(20)\");\n\t\t\t}\n\t\t\telse if ((string)(float)$data == $data) {\n\t\t\t\tarray_push($types, \"decimal(20, 6)\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tarray_push($types, \"varchar(250)\");\n\t\t\t}\n\t\t}\n\n\t\t$this->dataTypes = $types;\n\t}", "title": "" }, { "docid": "8cef2fa352b044780e5303cd93ee98e8", "score": "0.5843742", "text": "public static function getType(): string;", "title": "" }, { "docid": "8cef2fa352b044780e5303cd93ee98e8", "score": "0.5843742", "text": "public static function getType(): string;", "title": "" }, { "docid": "8cef2fa352b044780e5303cd93ee98e8", "score": "0.5843742", "text": "public static function getType(): string;", "title": "" }, { "docid": "8cef2fa352b044780e5303cd93ee98e8", "score": "0.5843742", "text": "public static function getType(): string;", "title": "" }, { "docid": "1e9ab5879d7913b3c5d45dc2ba88b005", "score": "0.58332425", "text": "public function getType($name);", "title": "" }, { "docid": "54341e664a3dee65256480c52b9cacca", "score": "0.5826139", "text": "abstract public function getTypeName();", "title": "" }, { "docid": "3376fb90f31f435df145508821ae3dd9", "score": "0.58106154", "text": "function getFieldTypes( $table )\r\n {\r\n $t = strtolower($table);\r\n // return the data from the cache if it exists\r\n if( isset( $this->_cache['fieldtypes'][$t] ) )\r\n {\r\n return $this->_cache['fieldtypes'][$t];\r\n }\r\n // get the meta data\r\n $sql = $this->query(\"\r\n SELECT\r\n c.name fld,\r\n t.name type,\r\n c.length\r\n FROM syscolumns c\r\n JOIN systypes t ON t.xusertype = c.xusertype\r\n JOIN sysobjects o ON o.id = c.id\r\n WHERE o.name='\".$table.\"'\"\r\n );\r\n // query failed ?\r\n if( !$sql )\r\n {\r\n trigger_error(\r\n \t\t \"Could not fetch the meta data of the columns for table '\".$table.\"'.\\n\".\r\n \t\t \"Query: \".$this->getLastQuery().\"\\n\".\r\n \t\t \"Error: \".$this->getError(),\r\n \t\t E_USER_WARNING\r\n \t\t);\r\n \t\treturn false;\r\n }\r\n // save the result in an array\r\n // TODO: load the default values in the 3rd place in the array\r\n $result = array();\r\n while( $row = $this->getRecord( $sql ) )\r\n {\r\n $result[ $row['fld'] ] = array(\r\n $row['type'],\r\n $row['length'],\r\n null // default value\r\n );\r\n }\r\n // save the result in the cache\r\n \t$this->_cache['fieldtypes'][$t] = $result;\r\n\t\treturn $result;\r\n }", "title": "" }, { "docid": "09c646cd24946e0e41a8f64d3c52d3eb", "score": "0.5810192", "text": "function getTypeName(){}", "title": "" }, { "docid": "e43258bd83001d77e0856211d237ac2c", "score": "0.5806414", "text": "public function getAllType()\n {\n return [\n self::BELIER,\n self::TAUREAU,\n self::GEMEAU,\n self::CANCER,\n self::LION,\n self::VIERGE,\n self::BALANCE,\n self::SCORPION,\n self::SAGITTAIRE,\n self::CAPRICORNE,\n self::VERSEAU,\n self::POISSONS,\n ];\n }", "title": "" }, { "docid": "9576f5dd05192ff27874824d651a3f0a", "score": "0.57938415", "text": "public function getAllTypes()\n {\n return [\n 'I' => 'Entrada',\n 'II' => 'Saída para o intervalo',\n 'OI' => 'Retorno do intervalo',\n 'O' => 'Saída',\n ];\n }", "title": "" }, { "docid": "dcaf06c42e77b5cbcc9ab3a5f9d29101", "score": "0.5791444", "text": "protected function getDataTypeName()\n {\n return '';\n }", "title": "" }, { "docid": "98ae5d885d7adbdeb3fdcc253523976a", "score": "0.5786966", "text": "function kpmg_generateFieldTypes($dataArr)\n{\n\t$fieldTypesArr = array();\n\n\tforeach( $dataArr as $key => $value )\n\t{\n\t\tif ( is_int($value) )\n\t\t{\n\t\t\t// Integer Whole Number\n\t\t\t$fieldTypesArr[] = '%d';\n\t\t}\n\t\telseif ( is_float($value) )\n\t\t{\n\t\t\t// Float\n\t\t\t$fieldTypesArr[] = '%f';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Assume String\n\t\t\t$fieldTypesArr[] = '%s';\n\t\t}\n\t}\n\n\treturn $fieldTypesArr;\n}", "title": "" }, { "docid": "992180e873dc64bd16a1b17abf736788", "score": "0.57818365", "text": "private function get_type( $name ) {\n\t\t// Split the name.\n\t\treturn explode( ':', $name );\n\t}", "title": "" }, { "docid": "bd31d5c87c986b0649e048932c4079fa", "score": "0.5772454", "text": "public function getTypeSystem();", "title": "" }, { "docid": "9d19c51734e4c84f949147441a5d8ad6", "score": "0.577099", "text": "public function getTypeName();", "title": "" }, { "docid": "9d19c51734e4c84f949147441a5d8ad6", "score": "0.577099", "text": "public function getTypeName();", "title": "" }, { "docid": "30dfb6466979a510be05c33ea90d67f2", "score": "0.5768823", "text": "public function get_types() {\n\t\t$query = $this->db->query('SELECT * FROM forums_types');\n\t\treturn $query->result_array();\n\t}", "title": "" }, { "docid": "1b54be815eaa8ccd55fc7c36d9cc53d1", "score": "0.57615274", "text": "public function getAllTypes ()\r\n\t{\r\n\t\treturn $this->types;\r\n\t}", "title": "" }, { "docid": "16e734e785b1215a3d3b814af13ae971", "score": "0.5754675", "text": "public function getDatatypes() {\n\t\treturn $this->_datatypes;\n\t}", "title": "" }, { "docid": "c0ceae13713617ca90d11c1e2bc9e8a5", "score": "0.5748719", "text": "public static function listNativeTypes()\n\t{\n\t\treturn array(\n\t\t\t'array',\n\t\t\t'boolean',\n\t\t\t'callable',\n\t\t\t'callback',\n\t\t\t'double',\n\t\t\t'integer',\n\t\t\t'float',\n\t\t\t'mixed',\n\t\t\t'null',\n\t\t\t'NULL',\n\t\t\t'number',\n\t\t\t'object',\n\t\t\t'resource',\n\t\t\t'stdClass',\n\t\t\t'string',\n\t\t\t'void',\n\t\t);\n\t}", "title": "" }, { "docid": "3a048d351dfb8fa31541178b61032a6a", "score": "0.5735223", "text": "public function getTypeLabels()\n {\n $result = array();\n\n foreach ($this->getTypes() as $type) {\n $result[] = $type->getLabel();\n }\n\n return $result;\n }", "title": "" }, { "docid": "dd4d7eeeda9127db216f9b1cd99246ae", "score": "0.57324684", "text": "public static function getResultTypes() {\n return [\n 'BA DEGREE',\n 'BEd DEGREE',\n 'BSc DEGREE',\n 'MSc DEGREE',\n 'NABTEB',\n 'NECO GCE',\n 'NECO',\n 'WAEC GCE',\n 'WAEC'\n ];\n }", "title": "" }, { "docid": "722a788b0962c598c6abc3cbc88e4bce", "score": "0.5728466", "text": "protected function getTypes()\n {\n return [\n new TextType(),\n ];\n }", "title": "" }, { "docid": "2294de405a4c0e796a8f64f08b726008", "score": "0.57213646", "text": "static public function getNiceTypeName()\n {\n $type = aMediaTools::getAttribute('type', 'media item');\n // The names of types are meant to be user friendly (in English), except for\n // the metatypes like _downloadable which can't be user friendly and unique at the same time.\n // I can't think of a nicer phrase for \"all embeddable things\" than \"media item\"\n $niceNames = array('_downloadable' => 'file', '_embeddable' => 'media item', 'audio' => 'audio file');\n if (sfConfig::get('app_aMedia_video_and_embed'))\n {\n $niceNames['video'] = 'video or embed code';\n }\n if (isset($niceNames[$type]))\n {\n return $niceNames[$type];\n }\n return $type;\n }", "title": "" }, { "docid": "cf353e5e881fd24540908f33a1069124", "score": "0.5712776", "text": "function getTypeString($obj) {\n // because I have not implemented a way to query the database\n // for field types. This method accesses a static array which\n // maps property name to property type.\n $type_str = \"\";\n foreach($obj as $key => $value) {\n $type_str .= Agent::$fieldTypes[$key]; \n }\n return $type_str;\n }", "title": "" }, { "docid": "9a0a51e3acd773203bb5e9163a87ae87", "score": "0.5704779", "text": "public function getTypes(): array;", "title": "" }, { "docid": "9a0a51e3acd773203bb5e9163a87ae87", "score": "0.5704779", "text": "public function getTypes(): array;", "title": "" }, { "docid": "658eb357ea06195de948d906d9bb029c", "score": "0.5698481", "text": "public function getTypeText()\n {\n $types = $this->getTypesArray();\n return $types[$this->type];\n }", "title": "" }, { "docid": "5447e72c3e0554aa7e3296cd0cb52cc5", "score": "0.5694892", "text": "public function getDataType();", "title": "" }, { "docid": "5447e72c3e0554aa7e3296cd0cb52cc5", "score": "0.5694892", "text": "public function getDataType();", "title": "" }, { "docid": "74a73b6b39705e2160e63013e0159da8", "score": "0.5691971", "text": "public static function get_all_types() {\n global $DB;\n return $DB->get_fieldset_sql('SELECT DISTINCT type FROM {' . self::TEMP_SEARCHTABLE . '}');\n }", "title": "" }, { "docid": "acb2a72afac2968c9d0e186218f408b1", "score": "0.5682394", "text": "protected function getTypes(){\n $types = array();\n $owner = $this->getOwner();\n if($owner->asa('aro'))\n $types[] = 'aro';\n if($owner->asa('aco'))\n $types[] = 'aco';\n \n return $types;\n }", "title": "" }, { "docid": "7e1fcbe905a28fabee260bd90bb80af7", "score": "0.56730014", "text": "public function type($name) {\r\n\t\tif ($this->pudl instanceof pudl) {\r\n\t\t\tif (!is_array(self::$types) || empty(self::$types)) {\r\n\t\t\t\tself::$types = $this->pudl->cache(AF_MINUTE*5)->collection('object_type');\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (!is_array(self::$types)) return false;\r\n\r\n\t\tif (is_int($name) || ctype_digit($name)) {\r\n\t\t\t$name = (int) $name;\r\n\t\t\treturn !empty(self::$types[$name]) ? self::$types[$name] : false;\r\n\t\t}\r\n\r\n\t\treturn array_search($name, self::$types);\r\n\t}", "title": "" }, { "docid": "19b8a2b4ccd82df02b80b054b3ff4955", "score": "0.56641406", "text": "public static function getType();", "title": "" }, { "docid": "19b8a2b4ccd82df02b80b054b3ff4955", "score": "0.56641406", "text": "public static function getType();", "title": "" }, { "docid": "19b8a2b4ccd82df02b80b054b3ff4955", "score": "0.56641406", "text": "public static function getType();", "title": "" }, { "docid": "92c3b680e48c7228ca843a59db1ab942", "score": "0.56636727", "text": "private function get_supported_field_types() {\n\t\t$fields = $this->flexible_checkout_fields_plugin->get_fields();\n\n\t\tunset( $fields['file'] );\n\t\tunset( $fields['heading'] );\n\t\tunset( $fields['info'] );\n\n\t\t$supported_field_types = array_keys( $fields );\n\t\treturn $supported_field_types;\n\t}", "title": "" }, { "docid": "493beb831cfed395370924889254a359", "score": "0.56482214", "text": "function __getNodeTypeName($node_type_key) {\n\t//key (machine) => value (human readable) array\n\t$node_types = node_get_types('names');\n\n\t//gets value, the human readable form\n $node_type = $node_types[$node_type_key];\n\n return $node_type;\n}", "title": "" }, { "docid": "05221bf366bb96bb30169a6dce9eebd1", "score": "0.56428957", "text": "public function getType()\n {\n if (!$this->isStored) {\n // only UnStored meets this criteria\n return 'UnStored';\n }\n\n if ($this->isBinary) {\n // only Binary isBinary :)\n return 'Binary';\n }\n\n if ($this->isIndexed) {\n // Keyword or Text\n if( $this->isTokenized ) {\n // only text is tokenized\n return 'Text';\n } else {\n return 'Keyword';\n }\n }\n\n // only unIndexed is left\n return 'UnIndexed';\n }", "title": "" }, { "docid": "9980ce4840f11cd5f7aed7f2ab931003", "score": "0.5638648", "text": "public function getAlltype()\n\t{\n\t\treturn $this->alltype;\n\t}", "title": "" }, { "docid": "8b5672fa6df8c7ca42bd257f738e0fc5", "score": "0.5637344", "text": "public static function getFieldTypes()\n {\n return array(\n 'ProfileFieldTypeNumber' => Yii::t('UserModule.models_ProfileFieldType', 'Number'),\n 'ProfileFieldTypeText' => Yii::t('UserModule.models_ProfileFieldType', 'Text'),\n 'ProfileFieldTypeTextArea' => Yii::t('UserModule.models_ProfileFieldType', 'Text Area'),\n 'ProfileFieldTypeSelect' => Yii::t('UserModule.models_ProfileFieldType', 'Select List'),\n 'ProfileFieldTypeDateTime' => Yii::t('UserModule.models_ProfileFieldType', 'Datetime'),\n 'ProfileFieldTypeBirthday' => Yii::t('UserModule.models_ProfileFieldType', 'Birthday'),\n );\n }", "title": "" }, { "docid": "352493c5dec46ab96c61b169ab6eeefd", "score": "0.5627462", "text": "public function getType() : string {\n return $this->datatype;\n }", "title": "" }, { "docid": "f4cc64a90bb6cdbd50fb5dac379e697a", "score": "0.56174266", "text": "public function get_supported_datatypes() {\n return array(\n 'activity', 'text'\n );\n }", "title": "" }, { "docid": "1d2cde75a1fe07374e213aff90888435", "score": "0.561499", "text": "public function getBaseType()\n {\n $type = $this->getDataType();\n $type = strtolower($type);\n $type = str_replace('unsigned', '', $type);\n $type = str_replace('signed', '', $type);\n if (strpos($type, '(')) {\n $parts = explode('(', $type);\n $type = $parts[0];\n }\n return trim($type);\n }", "title": "" }, { "docid": "809d860eb20484e38d8072c798ed73f5", "score": "0.5613642", "text": "private function get_drum_types() {\n $sql = \"SELECT * FROM \" . $this->tblDrumType;\n\n //execute the query\n $query = $this->dbConnection->query($sql);\n\n if (!$query) {\n return false;\n }\n\n //loop through all rows\n $types = array();\n while ($obj = $query->fetch_object()) {\n $types[$obj->type] = $obj->type_id;\n }\n return $types;\n }", "title": "" }, { "docid": "3bf0a15d29c7e998e13c189dd9aee9bd", "score": "0.5612899", "text": "public function take_dataType($name_tbl){\r\n\t\t$sql = \"SELECT DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = '$name_tbl'\";\r\n\t\t$result= $this->bd->conn->prepare($sql);\r\n\t\t$result->execute();\r\n\t\tif($result != false){\r\n\t\t\treturn $result->fetchAll(FETCH_COLUMN);\t\r\n\t\t}else{\r\n\t\t\tprint(\"erro!!\");\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "66add85e64f0b24d4d88abde47d411dd", "score": "0.5611596", "text": "static function get_supported_types() {\n $result = array();\n $result[] = Link::get_type_name();\n return $result;\n }", "title": "" } ]
3a9eab15e63a5ca3c9f8f5a669121633
UI to export quiz CSV
[ { "docid": "f894e1d9bcfa5d6a493402423003659f", "score": "0.7508463", "text": "public function export_quiz()\n {\n $fields = new Tempcode();\n $quiz_list = $this->create_selection_list_entries();\n if ($quiz_list->is_empty()) {\n warn_exit(do_lang_tempcode('NO_ENTRIES', 'quiz'));\n }\n\n $fields->attach(form_input_list(do_lang_tempcode('QUIZ'), do_lang_tempcode('DESCRIPTION_QUIZZES_EXPORT'), 'quiz_id', $quiz_list));\n\n $post_url = build_url(array('page' => '_SELF', 'type' => '_export'), '_SELF');\n $submit_name = do_lang_tempcode('EXPORT_QUIZ');\n\n return do_template('FORM_SCREEN', array('_GUID' => '3110ee0e917e2e0f83a41ab27ec7eafe', 'TITLE' => $this->title, 'TEXT' => do_lang_tempcode('EXPORT_QUIZ_TEXT'), 'HIDDEN' => '', 'FIELDS' => $fields, 'SUBMIT_ICON' => 'menu___generic_admin__export', 'SUBMIT_NAME' => $submit_name, 'URL' => $post_url, 'POST' => true));\n }", "title": "" } ]
[ { "docid": "287326f4ea67498e30a7e8b9f449d96d", "score": "0.84389395", "text": "public function _export_quiz()\n {\n require_code('files2');\n $quiz_id = post_param_integer('quiz_id');\n $data = get_quiz_data_for_csv($quiz_id);\n make_csv($data, 'quiz.csv');\n }", "title": "" }, { "docid": "dc0edac65dcab63931304a9633039890", "score": "0.73260766", "text": "public function exportCsvAction()\n {\n $fileName = 'answer.csv';\n $content = $this->getLayout()->createBlock('bs_exam/adminhtml_answer_grid')\n ->getCsv();\n $this->_prepareDownloadResponse($fileName, $content);\n }", "title": "" }, { "docid": "f68792c19076a4e36fbac766e90636fe", "score": "0.6956223", "text": "function quiz_write_csv($id){\n\n$data = array();\n$i = 0;\n\n\t$args = array(\n\t\t'post_type' => 'quiz-results',\n\t\t'posts_per_page' => -1,\n\t\t'tax_query' => array(\n\t\t array(\n\t\t\t'taxonomy' => 'quiz-category',\n\t\t\t'field' => 'slug',\n\t\t\t'terms' => $id\n\t\t ),\n\t\t),\t\t\n\t);\n\t$results = get_posts($args);\n\t\n\tforeach($results as $result){\n\t\n\t$data[$i] = array();\n\t\n\t\t$meta = get_post_meta( $result->ID);\n\t\t\n\t\tforeach ($meta as $key => $value){\n\t\t\n\t\t\tif(substr($key, 0, 5) == 'prtq_'){\n\t\t\t\t\n\t\t\t\t$key = str_replace('prtq_', \"\", $key);\n\t\t\t\t\n\t\t\t\t$label = $key;\n\t\t\t\t$input = $value[0];\n\t\n\t\t\t\tif($key == 'quiz_start_time'){\n\t\t\t\t$input = date('d/m/y - H:i:s', $value[0]);\n\t\t\t\t}\n\t\n\t\t\t\tif($key == 'test_taken'){\n\t\t\t\t$input = get_the_title($value[0]);\n\t\t\t\t}\t\n\t\n\t\t\t\tif($key == 'test_score'){\n\t\t\t\t$input = round($value[0], 2) .'%';\n\t\t\t\t}\t\t\n\t\n\t\t\t\tif(is_numeric($key)){\n\t\t\t\t/*question and answer*/\n\t\t\t\t$label = get_the_title($key);\n\t\t\n\t\t\t\t$data[$i][] = $label;\n\t\t\t\t$data[$i][] = $input;\n\t\t\n\t\t\t\t/*check if correct*/\n\t\t\t\t$data[$i][] = quiz_question_correct($key, $input);\n\t\t\n\t\t\t\t}else{\n\t\t\t\t$data[$i][] = $input;\n\t\t\t\t}\n\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n \t\t$i++;\n\t\n\t}\n\n\nob_end_clean();\n// output headers so that the file is downloaded rather than displayed\nheader('Content-type: text/csv');\nheader('Content-Disposition: attachment; filename=\"results.csv\"');\n \n// do not cache the file\nheader('Pragma: no-cache');\nheader('Expires: 0');\n \n// create a file pointer connected to the output stream\n$file = fopen('php://output', 'w');\n \n// send the column headers\nfputcsv($file, array('Candidate user id', 'Candidate user login', 'Test taken', 'Test score', 'Test passed', 'Quizid', 'Quiz start time', 'Quiz total qs'));\n \n// output each row of the data\nforeach ($data as $row)\n{\nfputcsv($file, $row);\n}\n\nfclose($file);\n\nexit();\n\n}", "title": "" }, { "docid": "23e6e5b1e00a643ad94d887298942586", "score": "0.66924995", "text": "public function exportAction()\n {\n $triviaId = $this->params()->fromRoute('id', 0);\n // Buscamos la trivia en la DB\n $trivia = $this->getTable()->fetchById($triviaId);\n // Verificamos que se haya encontrado la trivia\n if($trivia === null){\n return $this->redirect()->toRoute('backend');\n }\n // Buscar la opcion correcta\n $option = $this->getOptionTable()->fetchCorrect($triviaId);\n // obtener los usuarios que respondieron correctamente\n $votes = $this->getVoteTable()->fetchAllForExportByTrivia($triviaId, $option->id);\n // Generar CSV\n $service = new \\MIABase\\Helper\\CSVHelper($this);\n $service->render('trivia-' . $triviaId . '.csv', $votes);\n exit();\n }", "title": "" }, { "docid": "3721d9d7cee702dce50b2d1b53b8568a", "score": "0.6525736", "text": "public function exportCsvAction(){\n\t\t$fileName = 'vishaltestimonial.csv';\n\t\t$grid = $this->getLayout()->createBlock('testimonial/adminhtml_vishaltestimonial_grid');\n\t\t$this->_prepareDownloadResponse($fileName, $grid->getCsvFile());\n\t}", "title": "" }, { "docid": "5e023b39340c710dc6f919a2826560e8", "score": "0.64370304", "text": "public function exportCsvAction()\n {\n $fileName = 'scores.csv';\n $content = $this->getLayout()->createBlock('bs_docwise/adminhtml_scores_grid')\n ->getCsv();\n $this->_prepareDownloadResponse($fileName, $content);\n }", "title": "" }, { "docid": "daf1b46c7b04292c133d0baea55cf780", "score": "0.63749963", "text": "public function exportquiz_action() {\n\n\t\t$response = array();\n\t\t$status = 400;\n\t\t$quiz_id = ! empty( $_POST['quiz_id'] ) ? absint( $_POST['quiz_id'] ) : 0;\n\n\t\t$step_name = sanitize_text_field( ! empty( $_POST['step'] ) ? $_POST['step'] : '' );\n\t\t$last_step = (int) sanitize_text_field( ! empty( $_POST['last_step'] ) ? $_POST['last_step'] : 0 ) === 1;\n\n\t\ttry {\n\t\t\t$step = TQB_Export_Manager::make_step( $step_name );\n\t\t\t$step->set_quiz( $quiz_id );\n\t\t\t$success = $step->execute();\n\n\t\t\tif ( $last_step ) {\n\t\t\t\t$response['zip'] = TQB_Export_Manager::prepare_zip( $quiz_id );\n\t\t\t}\n\n\t\t\tif ( $success ) {\n\t\t\t\t$response['message'] = __( 'Step executed with success', 'thrive-quiz-builder' );\n\t\t\t\t$status = 200;\n\t\t\t}\n\t\t} catch ( Exception $e ) {\n\t\t\t$response['message'] = $e->getMessage();\n\t\t}\n\n\t\twp_send_json( array_merge( array(\n\t\t\t'message' => __( 'Something went wrong', 'thrive-quiz-builder' ),\n\t\t), $response ), $status );\n\t\tdie;\n\t}", "title": "" }, { "docid": "e857ee5dc7c7c764a9ad409d765989d2", "score": "0.6353879", "text": "public function exportCsvAction()\n {\n $fileName = 'menu.csv';\n $content = $this->getLayout()->createBlock('hubco_menuextended/adminhtml_menu_grid')\n ->getCsv();\n $this->_prepareDownloadResponse($fileName, $content);\n }", "title": "" }, { "docid": "4d862153fc9a151a343404cc52cbf221", "score": "0.6316895", "text": "function exportFile()\n{\n if (strpos($_GET[\"exportFilename\"],'.csv') !== false) {\n $saveFileName = $_GET[\"exportFilename\"];\n }\n else {\n $saveFileName = $_GET[\"exportFilename\"].'.csv';\n }\n $features = checkmarkValues();\n\n $file = fopen($saveFileName,\"w\");\n\n foreach ($features as $feature)\n {\n fputcsv($file,explode(',',$feature));\n }\n\n fclose($file);\n\n echo \"\n <h4>\n Your Test Suite '$saveFileName' has been saved\n </h4>\n \";\n\n}", "title": "" }, { "docid": "57ee451c4abe30a166829d689b219ddf", "score": "0.62457037", "text": "function download_results(){\n\n?>\n<form action=\"\" method=\"post\">\n\n<?php\n\nif($_POST['submitted'] == '1'){\n\n\t$id = $_POST['id'];\n\n\tquiz_write_csv($id);\n\necho 'sent';\n\n}else{\necho '<h1>Download results</h1><select name=\"id\">';\necho '<option value=\"\">- select a quiz -</option>';\n\t$args = array(\n\t\t'post_type' => 'random-timed-quiz',\n\t\t'posts_per_page' => -1,\n\t);\n\t$posts = get_posts($args);\n\t\n\tforeach($posts as $post){\n\techo '<option value=\"'.$post->ID.'\">'.$post->post_title.'</option>';\n\t}\necho '</select><br/>';\necho '<input type=\"hidden\" value=\"1\" name=\"submitted\"><input type=\"submit\" value=\"Download\" class=\"button button-primary button-large\">';\n\n}\n?>\n\n</form>\n<?php\n\n}", "title": "" }, { "docid": "d0e33e57289da6c20714f6979c1d5692", "score": "0.6244575", "text": "public function exportCsvAction()\n {\n $fileName = 'slider.csv';\n $content = $this->getLayout()->createBlock('slick_slider/adminhtml_slider_grid')\n ->getCsv();\n $this->_prepareDownloadResponse($fileName, $content);\n }", "title": "" }, { "docid": "e316a4be9646ab21ba489917b24e3d3e", "score": "0.61527365", "text": "function export_questions()\n\t{\n\t\t$js = $html = \"\";\n\t\t$js_id = 0;\n\t\tforeach ($this->exercise->selectQuestionList() as $q) {\n\t\t\tlist($jstmp, $htmltmp)= ScormQuestion::export_question($q, false, $js_id);\n\t\t\t$js .= $jstmp.\"\\n\";\n\t\t\t$html .= $htmltmp.\"\\n\";\n\t\t\t++$js_id;\n\t\t}\n\n\t\treturn array($js, $html);\n\t}", "title": "" }, { "docid": "01150a1e5a39695fb18fc30a78543ddf", "score": "0.6125668", "text": "public function exportCsvAction(){\r\n\t\t$fileName = 'enrollment.csv';\r\n\t\t$content\t= $this->getLayout()->createBlock('enrollments/adminhtml_enrollment_grid')->getCsv();\r\n\t\t$this->_prepareDownloadResponse($fileName, $content);\r\n\t}", "title": "" }, { "docid": "c49515b7c7d5697c2cb416b5a1bcb304", "score": "0.6123788", "text": "public function csv() {\n $i = 1;\n echo \"CODE\\tAUTEU\\tDATE\\tTITRE\\tGENRE\\tVERS\\tACTES\\tÉDITION\\n\";\n foreach ($this->pdo->query(\"SELECT * FROM play ORDER BY creator, date\") as $play) {\n $set = self::$sets[$play['setcode']];\n echo $play['code'];\n echo \"\\t\";\n echo $play['creator'];\n echo \"\\t\";\n echo $play['date'];\n echo \"\\t\";\n echo $play['title'];\n echo \"\\t\";\n if ($play['genrecode'] == 'tragedy') echo 'Tragédie';\n else if ($play['genrecode'] == 'comedy') echo 'Comédie';\n else echo $play['genre'];\n echo \"\\t\";\n echo $play['verse']?\"vers\":\"prose\";\n echo \"\\t\";\n echo $play['acts'];\n echo \"\\t\";\n echo $play['identifier'];\n echo \"\\n\";\n $i++;\n }\n }", "title": "" }, { "docid": "c3a6d7fc2f902670fee2c7cae223b72c", "score": "0.61116683", "text": "public function exportFile()\n {\n //Check the method post or delte\n $this->request->allowMethod(['post']);\n $this->loadModel('TblStaff');\n $arrayUsers = $this->TblStaff->find('all');\n $this->FunctionLb->writeCsv($arrayUsers);\n exit();\n }", "title": "" }, { "docid": "24267a1d29d9a6e2a4359c31174fedc2", "score": "0.6106014", "text": "public function download_csv()\n {\n require_code('form_templates');\n\n $hidden = new Tempcode();\n $fields = new Tempcode();\n\n $javascript = '';\n\n // Contents (preset / detailed specification)...\n\n //$fields->attach(do_template('FORM_SCREEN_FIELD_SPACER', array('_GUID' => '64766722d13457f593b60d0c9ca9aab5', 'SECTION_HIDDEN' => false, 'TITLE' => do_lang_tempcode('CONTENTS'))));\n\n $presets = method_exists($this, '_get_export_presets') ? $this->_get_export_presets() : array();\n if ($presets != array()) {\n $preset_radios = new Tempcode();\n $preset_radios->attach(form_input_radio_entry('preset', '', true, do_lang_tempcode('NA_EM')));\n foreach (array_keys($presets) as $preset) {\n $preset_radios->attach(form_input_radio_entry('preset', $preset, false));\n }\n $fields->attach(form_input_radio(do_lang_tempcode('PRESET'), '', 'preset', $preset_radios, false));\n\n $javascript .= \"\n\t\t\t\t\tvar form=document.getElementById('filename').form;\n\n\t\t\t\t\tvar crf=function(event) {\n\t\t\t\t\t\tvar preset=radio_value(form.elements['preset']);\n\t\t\t\t\t\tif (preset=='')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tform.elements['fields_to_use'].disabled=false;\n\t\t\t\t\t\t\tform.elements['order_by'].disabled=false;\n\t\t\t\t\t\t\tform.elements['usergroups'].disabled=false;\n\n\t\t\t\t\t\t\tform.elements['filename'].value=form.elements['filename'].defaultValue;\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tform.elements['fields_to_use'].disabled=true;\n\t\t\t\t\t\t\tform.elements['order_by'].disabled=true;\n\t\t\t\t\t\t\tform.elements['usergroups'].disabled=true;\n\n\t\t\t\t\t\t\tform.elements['filename'].value=form.elements['filename'].defaultValue.replace(/^\" . strtolower(do_lang('MEMBERS')) . \"-/,preset+'-');\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\tcrf();\n\t\t\t\t\tfor (var i=0;i<form.elements['preset'].length;i++) form.elements['preset'][i].onclick=crf;\n\t\t\t\t\";\n }\n\n // Option to filter by whether members allow e-mails\n $fields->attach(form_input_tick(do_lang_tempcode('FILTER_BY_ALLOW'), do_lang_tempcode('DESCRIPTION_FILTER_BY_ALLOW'), 'filter_by_allow', get_param_integer('filter_by_allow', 0) == 1));\n\n // Select fields\n $fields_to_use = new Tempcode();\n require_code('cns_members_action2');\n list($headings) = member_get_csv_headings_extended();\n foreach ($headings as $field_label => $field_name) {\n $fields_to_use->attach(form_input_list_entry($field_label, true));\n }\n $fields->attach(form_input_multi_list(do_lang_tempcode('COLUMNS'), do_lang_tempcode('SELECT_COLUMNS_TO_INCLUDE'), 'fields_to_use', $fields_to_use, null, 10, true));\n\n // Order by\n $fields_to_order_by = new Tempcode();\n foreach ($headings as $field_label => $field_name) {\n $fields_to_order_by->attach(form_input_list_entry($field_label, $field_name == 'id'));\n }\n $fields->attach(form_input_multi_list(do_lang_tempcode('ORDER'), do_lang_tempcode('MEMBER_EXPORT_ORDER'), 'order_by', $fields_to_order_by, null, 10, true));\n\n // Usergroups\n $groups = cns_create_selection_list_usergroups();\n $fields->attach(form_input_multi_list(do_lang_tempcode('USERGROUPS'), do_lang_tempcode('SELECT_USERGROUPS_TO_FILTER'), 'usergroups', $groups, null, 10, false));\n\n // Filename...\n\n $fields->attach(do_template('FORM_SCREEN_FIELD_SPACER', array('_GUID' => '16d396d2357684d2dbfebefbd20776a3', 'SECTION_HIDDEN' => false, 'TITLE' => do_lang_tempcode('FILENAME'))));\n\n // File name\n $filename = strtolower(do_lang('MEMBERS')) . '-' . date('Y-m-d');\n $fields->attach(form_input_line(do_lang_tempcode('NAME'), '', 'filename', $filename, true));\n\n // File type\n $_file_types = array('csv');\n if (addon_installed('excel_support')) {\n $_file_types[] = 'xls';\n $_file_types[] = 'xlsx';\n $_file_types[] = 'html';\n\n if (is_dir(get_file_base() . '/sources_custom/tcpdf') || is_dir(get_file_base() . '/sources_custom/dompdf') || is_dir(get_file_base() . '/sources_custom/mpdf')) {\n $_file_types[] = 'pdf';\n }\n }\n $file_types = new Tempcode();\n foreach ($_file_types as $file_type) {\n $file_types->attach(form_input_radio_entry('extension', $file_type, ($file_type == 'csv'), strtoupper($file_type)));\n }\n $fields->attach(form_input_radio(do_lang_tempcode('TYPE'), '', 'extension', $file_types, true));\n\n // ...\n\n $submit_name = do_lang_tempcode('DOWNLOAD_MEMBER_CSV');\n $post_url = build_url(array('page' => '_SELF', 'type' => '_download_csv'), '_SELF');\n $text = '';\n\n return do_template('FORM_SCREEN', array('_GUID' => '24cae29bc329a307a94c8b3f1e087708', 'TITLE' => $this->title, 'HIDDEN' => $hidden, 'FIELDS' => $fields, 'URL' => $post_url, 'TEXT' => $text, 'SUBMIT_ICON' => 'menu___generic_admin__export', 'SUBMIT_NAME' => $submit_name, 'TARGET' => '_blank', 'JAVASCRIPT' => $javascript));\n }", "title": "" }, { "docid": "fbe99be6f033467f6a2fd12e6c21cf20", "score": "0.61027", "text": "public function exportCsvAction()\n {\n $fileName = 'signature.csv';\n $content = $this->getLayout()->createBlock('bs_signature/adminhtml_signature_grid')\n ->getCsv();\n $this->_prepareDownloadResponse($fileName, $content);\n }", "title": "" }, { "docid": "28f5988678e3e807277216669ce7ef9f", "score": "0.6100017", "text": "function export()\n\t{\n\t\t$js = '';\n\t\t$html = '<tr><td colspan=\"2\"><table width=\"100%\">';\n\t\t$type = $this->getQuestionType();\n\t\t$jstmpw = 'questions_answers_ponderation['.$this->questionJSId.'] = new Array();';\n\t\t$jstmpw .= 'questions_answers_ponderation['.$this->questionJSId.'][0] = 0;';\n\n $jstmpw .= 'questions_answers_correct['.$this->questionJSId.'] = new Array();';\n\n\t\t//not sure if we are going to export also the MULTIPLE_ANSWER_COMBINATION to SCORM\n\t\t//if ($type == MCMA || $type == MULTIPLE_ANSWER_COMBINATION ) {\n\t\tif ($type == MCMA) {\n $id = 1;\n\t\t\t$jstmp = '';\n\t\t\t$jstmpc = '';\n foreach ($this->answer as $i => $answer) {\n\t\t\t\t$identifier = 'question_'.$this->questionJSId.'_multiple_'.$i;\n\t\t\t\t$html .=\n\t\t\t\t\t'<tr>\n\t\t\t\t\t<td align=\"center\" width=\"5%\">\n\t\t\t\t\t<input name=\"'.$identifier.'\" id=\"'.$identifier.'\" value=\"'.$i.'\" type=\"checkbox\" />\n\t\t\t\t\t</td>\n\t\t\t\t\t<td width=\"95%\">\n\t\t\t\t\t<label for=\"'.$identifier.'\">' . Security::remove_XSS($this->answer[$i]) . '</label>\n\t\t\t\t\t</td>\n\t\t\t\t\t</tr>';\n\n\t\t\t\t$jstmp .= $i.',';\n if ($this->correct[$i]) {\n $jstmpc .= $i.',';\n }\n\t\t\t\t$jstmpw .= 'questions_answers_ponderation['.$this->questionJSId.']['.$i.'] = '.$this->weighting[$i].\";\";\n $jstmpw .= 'questions_answers_correct['.$this->questionJSId.']['.$i.'] = '.$this->correct[$i].';';\n\t\t\t\t$id++;\n\t\t\t}\n\t\t\t$js .= 'questions_answers['.$this->questionJSId.'] = new Array('.substr($jstmp,0,-1).');'.\"\\n\";\n $js .= 'questions_types['.$this->questionJSId.'] = \\'mcma\\';'.\"\\n\";\n\t\t\t$js .= $jstmpw;\n\t\t} elseif ($type == MULTIPLE_ANSWER_COMBINATION) {\n\t \t$js = '';\n $id = 1;\n $jstmp = '';\n $jstmpc = '';\n foreach ($this->answer as $i => $answer) {\n $identifier = 'question_'.$this->questionJSId.'_exact_'.$i;\n $html .=\n '<tr>\n\t\t\t\t\t<td align=\"center\" width=\"5%\">\n\t\t\t\t\t<input name=\"'.$identifier.'\" id=\"'.$identifier.'\" value=\"'.$i.'\" type=\"checkbox\" />\n\t\t\t\t\t</td>\n\t\t\t\t\t<td width=\"95%\">\n\t\t\t\t\t<label for=\"'.$identifier.'\">' . Security::remove_XSS($this->answer[$i]) . '</label>\n\t\t\t\t\t</td>\n\t\t\t\t\t</tr>';\n\n $jstmp .= $i.',';\n if ($this->correct[$i]) {\n $jstmpc .= $i.',';\n }\n $jstmpw .= 'questions_answers_ponderation['.$this->questionJSId.']['.$i.'] = '.$this->weighting[$i].\";\";\n $jstmpw .= 'questions_answers_correct['.$this->questionJSId.']['.$i.'] = '.$this->correct[$i].\";\";\n $id++;\n }\n $js .= 'questions_answers['.$this->questionJSId.'] = new Array('.substr($jstmp,0,-1).');';\n $js .= 'questions_types['.$this->questionJSId.'] = \"exact\";';\n $js .= $jstmpw;\n\t\t} else {\n\t\t\t$id = 1;\n\t\t\t$jstmp = '';\n\t\t\t$jstmpc = '';\n foreach ($this->answer as $i => $answer) {\n $identifier = 'question_'.$this->questionJSId.'_unique_'.$i;\n\t\t\t\t$identifier_name = 'question_'.$this->questionJSId.'_unique_answer';\n\t\t\t\t$html .=\n\t\t\t\t\t'<tr>\n\t\t\t\t\t<td align=\"center\" width=\"5%\">\n\t\t\t\t\t<input name=\"'.$identifier_name.'\" id=\"'.$identifier.'\" value=\"'.$i.'\" type=\"checkbox\"/>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td width=\"95%\">\n\t\t\t\t\t<label for=\"'.$identifier.'\">' . Security::remove_XSS($this->answer[$i]) . '</label>\n\t\t\t\t\t</td>\n\t\t\t\t\t</tr>';\n\t\t\t\t$jstmp .= $i.',';\n if ($this->correct[$i]) {\n $jstmpc .= $i;\n }\n\t\t\t\t$jstmpw .= 'questions_answers_ponderation['.$this->questionJSId.']['.$i.'] = '.$this->weighting[$i].\";\";\n $jstmpw .= 'questions_answers_correct['.$this->questionJSId.']['.$i.'] = '.$this->correct[$i].';';\n\t\t\t\t$id++;\n\t\t\t}\n\t\t\t$js .= 'questions_answers['.$this->questionJSId.'] = new Array('.substr($jstmp,0,-1).');';\n\t\t\t$js .= 'questions_types['.$this->questionJSId.'] = \\'mcua\\';';\n\t\t\t$js .= $jstmpw;\n\t\t}\n\t\t$html .= '</table></td></tr>';\n\n\t\treturn array($js, $html);\n\t}", "title": "" }, { "docid": "f1f24dfe586614fe76f4c2e7873529d4", "score": "0.60267276", "text": "public function exportCsvAction()\r\n\t\t{\r\n\t\t\t$fileName = 'purchaseorders.csv';\r\n\t\t\t$grid = $this->getLayout()->createBlock('purchaseorder/adminhtml_purchaseorders_grid');\r\n\t\t\t$this->_prepareDownloadResponse($fileName, $grid->getCsvFile());\r\n\t\t}", "title": "" }, { "docid": "ecf0d2dfb1b74a74a5df3548e05305dc", "score": "0.60230315", "text": "public function exportCsvAction(){\n $fileName = 'commissionrule.csv';\n $content = $this->getLayout()\n ->createBlock('mpadvancecommission/adminhtml_commissionrule_grid')->getCsv();\n $this->_sendUploadResponse($fileName, $content);\n }", "title": "" }, { "docid": "19a0263ac9da86b8deec2d047fd7fdaf", "score": "0.60120744", "text": "private function exportar_filtrado()\n\t{\n\t\t//seleciona todos os dados da tabela FaleConosco\n\t\t$this->Delegator(\"ConcreteFaleconosco\", \"SelectFaleconoscoExportarFiltradoCsv\", $this->getParam());\n\t}", "title": "" }, { "docid": "16bba3c26b4054c16f2b875d622f84cc", "score": "0.5953838", "text": "public function exportCsvAction()\n {\n $fileName = 'CouponUsage.csv';\n $content = $this->getLayout()->createBlock('belvg_couponusage/adminhtml_couponsusage_grid');\n $this->_prepareDownloadResponse($fileName, $content->getCsvFile());\n }", "title": "" }, { "docid": "54b6cee1a477ee38974bf6ccef051f4d", "score": "0.59503406", "text": "private function saveSurvey()\n {\n $file = ANSWER_FILE;\n $userfile = USER_FILE;\n $data = array();\n\n if( isset( $_POST['question'] ) ) {\n //save answers\n $data = $_POST;\n array_pop( $data ); //remove question at end\n if( $file != null && file_exists( $file ) ) {\n if( ( $handle = fopen( $file, \"a\" ) ) !== false ) {\n fputcsv( $handle, $data, ';' );\n }\n }\n fclose( $handle );\n\n //set participated to true\n $user = $_SESSION[ 'username' ];\n $content = $this->readFile( USER_FILE );\n $line = 0;\n foreach( $content as $item ) {\n if( $user == $item[0] ) {\n $item[2] = '1';\n $temp = $item;\n break;\n }\n $line++;\n }\n\n //hahaha performance is everything :)\n unset( $content[$line] );\n array_push( $content, $temp );\n if( ( $handle = fopen( $userfile, \"w+\" ) ) !== false ) {\n foreach( $content as $line ){\n fputcsv( $handle, $line, ';' );\n }\n }\n fclose( $handle );\n }\n self::redirect( 'thankyou' );\n }", "title": "" }, { "docid": "5b3df07f018a331e5fc4042e3931dc82", "score": "0.5906432", "text": "public function exportCsvAction()\r\n {\r\n $fileName = 'my_reports.csv';\r\n $grid = $this->getLayout()->createBlock('my_reports/adminhtml_report_grid');\r\n $this->_initReportAction($grid);\r\n $this->_prepareDownloadResponse($fileName, $grid->getCsvFile());\r\n }", "title": "" }, { "docid": "722439e726381e73bd6db68bbd635921", "score": "0.5905237", "text": "public function exportCsvAction()\n {\n $fileName = 'certificate.csv';\n $content = $this->getLayout()->createBlock('bs_hr/adminhtml_certificate_grid')\n ->getCsv();\n $this->_prepareDownloadResponse($fileName, $content);\n }", "title": "" }, { "docid": "1dafe6412f7d3b5ea2cb510f7658cad8", "score": "0.5905074", "text": "public function exportCsvAction() {\r\n $fileName = 'lastmile.csv';\r\n $content = $this->getLayout()->createBlock('lastmile/adminhtml_lastmile_grid')\r\n ->getCsv();\r\n\r\n $this->_sendUploadResponse($fileName, $content);\r\n }", "title": "" }, { "docid": "8d84c90f15f6ec015f219cdf854fae0e", "score": "0.5900997", "text": "public function survey_export_csv($sid, $type) {\n if (!has_permission('export csv data any survey')) {\n show_403();\n }\n \n $survey = $this->survey_model->get($sid);\n if (!$survey) {\n show_404();\n }\n \n if (!$survey->status_allows('export csv data any survey')) {\n show_403();\n }\n \n // Load stuff.\n $this->load->model('survey_result_model');\n $this->load->helper('or_xform_results');\n \n try {\n $flattener = new OR_xform_results($survey->get_xml_full_path());\n }\n catch(Exception $e) {\n // The xform file does not exist or is not readable.\n show_404();\n }\n \n // Load results.\n $results = $this->survey_result_model->get_all($sid);\n \n // Type of export.\n switch ($type) {\n case 'csv_human':\n $label_key = \"label\";\n $value_key = \"value\";\n $filename = sprintf('survey_results_%d_normalized.csv', $survey->sid);\n break;\n case 'csv_machine':\n $label_key = \"machine_label\";\n $value_key = \"machine_value\";\n $filename = sprintf('survey_results_%d_raw.csv', $survey->sid);\n break;\n }\n \n // Compose header of csv file.\n // The header is being created from the flat xfrom so if all the result\n // files fail, we'll have an empty csv with an header.\n $flat = $flattener->get_flatten();\n $header = array();\n foreach ($flat as $key => $value) {\n // The language only matters when we're exporting a non system\n // question in a normalised format.\n if ($type == 'csv_human' && !isset($value['system']) && $flattener->is_translated()) {\n $header[] = $value['label'][$flattener->get_preferred_language()];\n }\n else {\n // Machine labels are never translated and human label behave the\n // same way if there's no translation.\n $header[] = $value[$label_key];\n }\n }\n\n // Headers.\n header(\"Cache-Control: public\");\n header(\"Cache-Control: no-cache, must-revalidate\");\n header(\"Expires: Sat, 26 Jul 1997 05:00:00 GMT\");\n header(\"Content-Description: File Transfer\");\n header(\"Content-Disposition: attachment; filename=\" . $filename);\n header(\"Content-Type: application/octet-stream; \"); \n header(\"Content-Transfer-Encoding: binary\");\n\n // Open stream.\n $output = fopen('php://output', 'w');\n \n // Put headers.\n fputcsv($output, $header);\n \n // Compose data.\n foreach ($results as $survey_result_entity) {\n try {\n $parsed_file = $flattener->parse_result_file($survey_result_entity->get_xml_full_path());\n }\n catch(Exception $e) {\n // The file does not exist or is not readable. Skip.\n continue;\n }\n \n $fields = array();\n foreach ($parsed_file as $data) {\n $fields[] = is_array($data[$value_key]) ? implode(' ', $data[$value_key]) : $data[$value_key];\n }\n fputcsv($output, $fields);\n }\n \n //Close stream.\n fclose($output);\n }", "title": "" }, { "docid": "b754cdf89c1f5563bf60e348b58f65f5", "score": "0.5897446", "text": "public function exportCsvAction() {\r\n $fileName = 'barcodes.csv';\r\n if($this->_helper()->isMultipleBarcode()) {\r\n $grid = 'inventorybarcode/adminhtml_barcode_grid';\r\n } else {\r\n $grid = 'inventorybarcode/adminhtml_singlebarcode_grid';\r\n }\r\n $content = $this->getLayout()\r\n ->createBlock($grid)\r\n ->getCsv();\r\n $this->_prepareDownloadResponse($fileName, $content);\r\n }", "title": "" }, { "docid": "a6c421fbfa706a5d7c7ef63522dc0e18", "score": "0.58931667", "text": "function export()\n\t{\n\t\t$js = '';\n $identifier = 'question_'.$this->questionJSId.'_free';\n\t\t// currently the free answers cannot be displayed, so ignore the textarea\n\t\t$html = '<tr><td colspan=\"2\">';\n $type = $this->getQuestionType();\n\n if ($type == ORAL_EXPRESSION) {\n /*\n $template = new Template('');\n $template->assign('directory', '/tmp/');\n $template->assign('user_id', api_get_user_id());\n\n $layout = $template->get_template('document/record_audio.tpl');\n $html .= $template->fetch($layout);*/\n\n\t\t\t$html = '<tr><td colspan=\"2\">'.get_lang('ThisItemIsNotExportable').'</td></tr>';\n\n return array($js, $html);\n }\n\n $html .= '<textarea minlength=\"20\" name=\"'.$identifier.'\" id=\"'.$identifier.'\" ></textarea>';\n $html .= '</td></tr>';\n\t\t$js .= 'questions_answers['.$this->questionJSId.'] = new Array();';\n\t\t$js .= 'questions_answers_correct['.$this->questionJSId.'] = \"\";';\n\t\t$js .= 'questions_types['.$this->questionJSId.'] = \\'free\\';';\n\t\t$jstmpw = 'questions_answers_ponderation['.$this->questionJSId.'] = \"0\";';\n\t\t$js .= $jstmpw;\n\n\t\treturn array($js, $html);\n\t}", "title": "" }, { "docid": "61e52d9230e47416f7d0c0c2b56b2efb", "score": "0.58842546", "text": "public function outputData()\r\n {\r\n header('Content-Type: text/csv; charset=utf-8');\r\n header('Content-Disposition: attachment; filename=data.csv');\r\n\r\n $file = fopen($this->downloadDir . DIRECTORY_SEPARATOR .$this->uploadedFile->getNameWithExtension(), 'w');\r\n\r\n\r\n foreach ($this->output as $row) {\r\n fputcsv($file, $row);\r\n }\r\n fclose($file);\r\n }", "title": "" }, { "docid": "63cc020b9cc7e749a1e6b3043f0c3218", "score": "0.585839", "text": "function export()\n\t{\n\t\t$js = '';\n\t\t$html = '<tr><td colspan=\"2\"><table width=\"100%\">';\n\t\t$identifier = 'question_'.$this->questionJSId.'_tf';\n\t\t$identifier_true = $identifier.'_true';\n\t\t$identifier_false = $identifier.'_false';\n\t\t$html .=\n\t\t\t'<tr>\n\t\t\t\t<td align=\"center\" width=\"5%\">\n\t\t\t\t<input name=\"'.$identifier_true.'\" id=\"'.$identifier_true.'\" value=\"'.$this->trueGrade.'\" type=\"radio\" />\n\t\t\t\t</td>\n\t\t\t\t<td width=\"95%\">\n\t\t\t\t<label for=\"'.$identifier_true.'\">' . get_lang('True') . '</label>\n\t\t\t\t</td>\n\t\t\t\t</tr>';\n\t\t$html .=\n\t\t\t'<tr>\n\t\t\t<td align=\"center\" width=\"5%\">\n\t\t\t<input name=\"'.$identifier_false.'\" id=\"'.$identifier_false.'\" value=\"'.$this->falseGrade.'\" type=\"radio\" />\n\t\t\t</td>\n\t\t\t<td width=\"95%\">\n\t\t\t<label for=\"'.$identifier_false.'\">' . get_lang('False') . '</label>\n\t\t\t</td>\n\t\t\t</tr></table></td></tr>';\n\t\t$js .= 'questions_answers['.$this->questionJSId.'] = new Array(\\'true\\',\\'false\\');'.\"\\n\";\n\t\t$js .= 'questions_types['.$this->questionJSId.'] = \\'tf\\';'.\"\\n\";\n\t\tif ($this->response === 'TRUE') {\n\t\t\t$js .= 'questions_answers_correct['.$this->questionJSId.'] = new Array(\\'true\\');'.\"\\n\";\n\t\t} else {\n\t\t\t$js .= 'questions_answers_correct['.$this->questionJSId.'] = new Array(\\'false\\');'.\"\\n\";\n\t\t}\n\t\t$jstmpw = 'questions_answers_ponderation['.$this->questionJSId.'] = new Array();'.\"\\n\";\n\t\t$jstmpw .= 'questions_answers_ponderation['.$this->questionJSId.'][0] = 0;'.\"\\n\";\n\t\t$jstmpw .= 'questions_answers_ponderation['.$this->questionJSId.'][1] = '.$this->weighting[1].\";\\n\";\n\t\t$js .= $jstmpw;\n\n\t\treturn array($js, $html);\n\t}", "title": "" }, { "docid": "965c00229fef2dfefd257443d7505238", "score": "0.5856709", "text": "function aakb_survey_admin_export() {\n $types = _aakb_survey_consent_types();\n\n // Build links render arrays.\n $formats = array('csv', 'xls');\n $links = array();\n foreach ($types as $type => $info) {\n $links[$type] = array();\n foreach ($formats as $format) {\n $links[$type][] = array(\n '#theme' => 'link',\n '#text' => t('Download @type file', array('@type' => drupal_strtoupper($format))),\n '#path' => 'admin/config/people/survey/export/' . $type . '/' . $format,\n '#options' => array(\n 'attributes' => array('class' => array('button')),\n 'absolute' => TRUE,\n 'html' => TRUE,\n ),\n );\n }\n }\n\n return array(\n '#theme' => 'aakb_survey_export',\n '#types' => $types,\n '#counts' => array(\n AAKB_SURVEY_USER_SATISFACTION => _aakb_survey_stats(AAKB_SURVEY_USER_SATISFACTION),\n AAKB_SURVEY_NEWSLETTER => _aakb_survey_stats(AAKB_SURVEY_NEWSLETTER),\n ),\n '#links' => $links,\n );\n}", "title": "" }, { "docid": "d9f6b3bea72a7c5477dd2f947593ac29", "score": "0.5855655", "text": "public function exportCsvAction()\n {\n $fileName = 'configproductreport.csv';\n $content = $this->getLayout()->createBlock('configproductreport/adminhtml_configproductreport_grid')\n ->getCsv();\n $this->_prepareDownloadResponse($fileName, $content);\n }", "title": "" }, { "docid": "3659c12ad15327f6c59cd44bfd52b45d", "score": "0.5847099", "text": "public function exportZasilkovnaOrders()\n {\n $this->zasOrdersModel->exportToCSV($_POST['exportOrders']);\n }", "title": "" }, { "docid": "e64114c766a49a401044ac2c8b21a395", "score": "0.58375865", "text": "public function download()\n {\n $collection = request()->tableToExport;\n\n // Perform the task\n switch ($collection) {\n case 1:\n $this->exportCSV(Comment::all());\n break;\n case 2:\n $this->exportCSV(Country::all());\n break;\n case 3:\n $this->exportCSV(Customer::all());\n break;\n case 4:\n $this->exportCSV(Order::all());\n break;\n case 5:\n $this->exportCSV(Wine::all());\n break;\n }\n }", "title": "" }, { "docid": "f303afd38f91562e32225986fd09e2e4", "score": "0.5836484", "text": "public function exportCsvAction()\r\n {\r\n $this->_prepareDownloadResponse('giftcardaccounts.csv',\r\n $this->getLayout()->createBlock('imaginato_giftcardaccount/adminhtml_giftcardaccount_export_grid')->getCsvFile()\r\n );\r\n }", "title": "" }, { "docid": "b808456242df4f521b98aae2081e66c0", "score": "0.583023", "text": "public function exportCsvAction()\n {\n \t$fileName = 'purchase_orders.csv';\n $content = $this->getLayout()->createBlock('Purchase/Order_Grid')\n ->getCsv();\n\n $this->_prepareDownloadResponse($fileName, $content);\n }", "title": "" }, { "docid": "f13f76c32d6e25aa71e7db7a817a6560", "score": "0.57986176", "text": "public function addCSVExport() {\n $this->addExportType('adminhtml/inr_report/exportCsv/report/' . $this->getReport() . '/type_id/' . $this->getTypeId()\n , Mage::helper('inventoryreports')->__('CSV'));\n }", "title": "" }, { "docid": "85cd07d3f9f9f25131149d22e4540b6f", "score": "0.578151", "text": "public function export()\n {\n $items =$this->input->get_post('items',TRUE);\n $items_data = str_replace(\"row\",\"\",$items); \n $items_data = explode(\",\",$items_data);\n $data = $this->sales_governing_mod->export();\n\n export_report($items_data);\n array_to_csv($data,\"Company.csv\");\n }", "title": "" }, { "docid": "5990474146d020e7dcf8a126a12a5ed7", "score": "0.57669157", "text": "public function exportCsvAction()\n\t{\n\t\t$fileName = 'campaigns.csv';\n\t\t$content = $this->getLayout()->createBlock('aydus_scheduledemails/adminhtml_campaign_grid')\n\t\t->getCsvFile();\n\t\n\t\t$this->_prepareDownloadResponse($fileName, $content);\n\t}", "title": "" }, { "docid": "f80e8bb351387be49e84b278df2218fb", "score": "0.57610154", "text": "function _mhc_ccrs_manager_ccrs_manager_form_export_csv($form, &$form_state)\n{\n\tdo_csv_export();\n\t\n\t$form_state['redirect'] = array(CcrsManagerPresenter::getDrupalMenuRouterPath());\n}", "title": "" }, { "docid": "9f2045c5f3f54e9132e69300a2d7628b", "score": "0.5759908", "text": "function export_risk_dashboard_csv() {\n\t$sql = \"SELECT * from risk_dashboard_tbl\";\n\t$result = runQuery($sql);\n\t\n\t# open file\n\t$export_file = \"downloads/risk_dashboard_export.csv\";\n\t$handler = fopen($export_file, 'w');\n\t\n\tfwrite($handler, \"risk_dashboard_id,risk_dashboard_name,risk_dashboard_description,risk_dashboard_disabled\\n\");\n\tforeach($result as $line) {\n\t\tfwrite($handler,\"$line[risk_dashboard_id],$line[risk_dashboard_name],$line[risk_dashboard_descripion],$line[risk_dashboard_disabled]\\n\");\n\t}\n\t\n\tfclose($handler);\n\n}", "title": "" }, { "docid": "7060913507b1e3bac953e01d8d9db706", "score": "0.5745848", "text": "function export_csv() {\n if (!empty($_POST['mytheme_export_csv'])) {\n\n if (current_user_can('manage_options')) {\n header(\"Content-type: application/force-download\");\n header('Content-Disposition: inline; filename=\"sign-up-details'.date('YmdHis').'.csv\"');\n\n // WP_User_Query arguments\n $args = array (\n 'order' => 'ASC',\n 'orderby' => 'id',\n 'fields' => 'all',\n );\n\n // The Query\n global $wpdb;\n $query = $wpdb->get_results(\"SELECT * FROM wp_signup_details ORDER BY id ASC\",ARRAY_A);\n echo 'ID,First Name,Last Name,Email,Created'.\"\\r\\n\";\n \n foreach ( $query as $res ) {\n\n echo '\"' . $res['id'] . '\",\"' . $res['first_name'] . '\",\"' . $res['last_name'] . '\",\"' . $res['email'] . '\",\"' . $res['create_at'] . '\"' . \"\\r\\n\";\n }\n\n exit();\n }\n }\n}", "title": "" }, { "docid": "f54b321ba28d0bed899af743f3d2afec", "score": "0.5738055", "text": "public function export($quizzes)\n {\n // Convert the quizzes to a jsonable array\n $jsonable = $this->toJsonable($quizzes);\n\n // Convert the array to actual json\n $json = json_encode($jsonable);\n\n // Write the contents\n File::put($this->getSeedDataPath(), $json);\n }", "title": "" }, { "docid": "3ac593b94993aab9ec952fbcb3ef6c00", "score": "0.5731845", "text": "public function get_csv()\n {\n $csv_data='';\n $csv_data.=$this->get_csv_student();\n $csv_data.=\"===;s_seq;s_label;sigle;categorie;affectation;utt;profil;credit;resultat\\r\";\n $csv_data.=$this->get_csv_all_ele();\n $csv_data.=\"END;;;;;;;;;\";\n\n if($this->_os!='mac')\n {\n $enter=$this->_enter[\"$this->_os\"];\n $csv_data=str_replace(\"\\r\",\"$enter\",$csv_data);\n }\n if($this->_delimiter!=';')\n {\n $csv_data=str_replace(\";\",\"$this->_delimiter\",$csv_data);\n }\n\n header('Content-type: application/csv');\n header(\"Content-Disposition: attachment; filename=\\\"csv_$this->_cid.csv\\\"\");\n echo $csv_data;\n }", "title": "" }, { "docid": "a7c8290e76b4cfa8659703489d92a375", "score": "0.57299596", "text": "public function exportCsvAction()\n {\n $fileName = 'device.csv';\n $content = $this->getLayout()->createBlock('xcentia_mobile/adminhtml_device_grid')\n ->getCsv();\n $this->_prepareDownloadResponse($fileName, $content);\n }", "title": "" }, { "docid": "d79d22fb5746f38117967baa1a64e10d", "score": "0.5723464", "text": "function Results(){\r\n\r\n global $db;\r\n global $user;\r\n //print_r($_REQUEST);\r\n $filename = \"Quiz\".$_REQUEST['sQuiz'].\"_Results_for_\".$db->user.\"_\". date(\"mdY\") .\".txt\";\r\n $fout = fopen(\".\\\\QuizReceipts\\\\\".$filename, \"wt\");\r\n\r\n $sql = \"SELECT USERNAME\r\n FROM USERLIST\r\n WHERE ID = :1 \";\r\n $result = $db->ExecSQL($sql, $_REQUEST['uName']);\r\n \r\n foreach ($result as $r){\r\n $uName = $r['USERNAME']; \r\n } \r\n \r\n\r\n $date = date('m/d/Y');\r\n echo \"<center style='margin-bottom:1em;'>\"; \r\n if((empty($_REQUEST['uName'])) || (empty($_REQUEST['sQuiz']))){\r\n echo 'CANNOT PROCESS, MISSING DATA';\r\n echo '<br>Quiz ID: '.$_REQUEST['sQuiz'];\r\n echo '<br>Associate Assigned: '.$_REQUEST['uName']; \r\n }else if($_REQUEST['sQuiz'] == 'ALL'){\r\n $name = $_REQUEST['uName'];\r\n if (empty($_REQUEST['sort'])){\r\n $_REQUEST['sort'] = 'QUIZ_NAME';\r\n }\r\n $sql = \"SELECT \r\n QUIZ_NAME,\r\n CLIENT_GROUP,\r\n MIN_SCORE,\r\n SCORE,\r\n PASS,\r\n ATTEMPTS,\r\n TRUNC(DATE_TAKEN) DATE_TAKEN,\r\n TO_CHAR(DATE_TAKEN, 'HH:MM:SS AM') TIME_TAKEN\r\n FROM QUIZ_MASTER INNER JOIN QUIZ_USERS ON (QID = QUIZID)\r\n WHERE USERID =:1\r\n ORDER BY :2\";\r\n $results = $db->ExecSQL($sql,array($name, $_REQUEST['sort']));\r\n $quizResults = \"<div>Test Results for: \".$uName.\"<br>User ID: \".$name.\" </div><div class='container' style='max-height:30em; overflow-y:scroll;'>\";\r\n $quiz_results = \"Test Results for: \".$uName.\"\\nUser ID: \".$name.\"\\r\\n\";\r\n $quizResults .= \"<table class='table table-bordered table-striped table-light' style='width:100%;'>\r\n <thead class='thead-light'><tr>\";\r\n /* $quizResults .= \"\r\n <th><a href='\".$_SERVER['PHP_SELF'].$_SERVER[' QUERY_STRING'].\"&sort=QUIZ_NAME&user={$uName}'>QUIZ NAME</a></th>\r\n <th><a href='\".$_SERVER['PHP_SELF'].$_SERVER[' QUERY_STRING'].\"&sort=CLIENT_GROUP&user={$uName}'>CLIENT</th>\r\n <th><a href='\".$_SERVER['PHP_SELF'].$_SERVER[' QUERY_STRING'].\"&sort=MIN_SCORE&user={$uName}'>MIN SCORE</a></th>\r\n <th><a href='\".$_SERVER['PHP_SELF'].$_SERVER[' QUERY_STRING'].\"&sort=SCORE&user={$uName}'>SCORE</a></th>\r\n <th><a href='\".$_SERVER['PHP_SELF'].$_SERVER[' QUERY_STRING'].\"&sort=PASS&user={$uName}'>PASS</a></th>\r\n <th><a href='\".$_SERVER['PHP_SELF'].$_SERVER[' QUERY_STRING'].\"&sort=ATTEMPTS&user={$uName}'>ATTEMPTS</a></th>\r\n <th><a href='\".$_SERVER['PHP_SELF'].$_SERVER[' QUERY_STRING'].\"&sort=DATE_TAKEN&user={$uName}'>DATE QUIZ TAKEN</a></th>\";/** */\r\n \r\n $quizResults .= \"\r\n <th><a href='\".$_SERVER['PHP_SELF'].$_SERVER[' QUERY_STRING'].\"&sort=QUIZ_NAME&user={$uName}'>QUIZ NAME</a></th>\r\n <th><a href='\".$_SERVER['PHP_SELF'].$_SERVER[' QUERY_STRING'].\"&sort=CLIENT_GROUP&user={$uName}'>CLIENT</th>\r\n <th><a href='\".$_SERVER['PHP_SELF'].$_SERVER[' QUERY_STRING'].\"&sort=SCORE&user={$uName}'>SCORE</a></th>\r\n <th><a href='\".$_SERVER['PHP_SELF'].$_SERVER[' QUERY_STRING'].\"&sort=PASS&user={$uName}'>PASS</a></th>\r\n <th><a href='\".$_SERVER['PHP_SELF'].$_SERVER[' QUERY_STRING'].\"&sort=DATE_TAKEN&user={$uName}'>DATE QUIZ TAKEN</a></th>\r\n <th><a href='\".$_SERVER['PHP_SELF'].$_SERVER[' QUERY_STRING'].\"&sort=TIME_TAKEN&user={$uName}'>TIME QUIZ TAKEN</a></th>\";\r\n \r\n foreach ($results as $r){\r\n $qName = $r['QUIZ_NAME'];\r\n $client = $r['CLIENT_GROUP'];\r\n $min = $r['MIN_SCORE'];\r\n $score = $r['SCORE'];\r\n $pass = $r['PASS'];\r\n $attempts = $r['ATTEMPTS']; \r\n $dateTaken = $r['DATE_TAKEN'];\r\n $timeTaken = $r['TIME_TAKEN'];\r\n\r\n // $quizResults .= \"<tr><td>\".$qName.\"</td><td>\".$client.\"</td><td>\".$min.\"</td><td>\".$score.\"</td><td>\".$pass.\"</td><td>\".$attempts.\"</td><td>\".$dateTaken.\"</td></tr>\"; \r\n $quizResults .= \"<tr><td>\".$qName.\"</td><td>\".$client.\"</td><td>\".$score.\"</td><td>\".$pass.\"</td><td>\".$dateTaken.\"</td><td>\".$timeTaken.\"</td></tr>\"; \r\n //$quiz_results .= $qName.\"\\n\".$client.\"\\n\".$min.\"\\n\".$score.\"\\n\".$pass.\"\\t\".$attempts.\"\\t\".$dateTaken.\"\\n\";\r\n $quiz_results .= \"\\r\\nQuiz Name: \".$qName.\"\r\n \\nClient: \".$client.\"\r\n \\nSCORE: \".$score.\"%\r\n \\nPASS: \".$pass.\" \r\n \\nDate Taken: \".$dateTaken.\"\r\n \\nTime Taken: \".$timeTaken.\"\\r\\n\\n\"; \r\n \r\n }\r\n $quizResults .= \"</table></div>\";\r\n echo $quizResults;\r\n fwrite($fout, $quiz_results);\r\n fclose($fout);\r\n echo \"<div style='padding-left:65%; margin:1em;'> \r\n <span> <a href=\\\".\\\\QuizReceipts\\\\\".$filename.\"\\\" class='btn btn-small btn-primary' download>PRINT RESULTS</a></span>\r\n <!-- <span> <a href='http://cs_webserver/oracle1/trainingdocs.php' class='btn btn-warning' id='qCloser'>Close Quiz</a></span> -->\r\n </div>\r\n \";\r\n }else{\r\n $name = $_REQUEST['uName'];\r\n $quizID = $_REQUEST['sQuiz'];\r\n\r\n $sql = 'SELECT QUIZ_NAME, MIN_SCORE FROM QUIZ_MASTER WHERE QID =:1';\r\n $results = $db->ExecSQL($sql,$quizID);\r\n foreach ($results as $r){\r\n $qName = $r['QUIZ_NAME'];\r\n $min = $r['MIN_SCORE'];\r\n }\r\n \r\n global $attempts;\r\n $sql = \"SELECT SCORE, PASS, ATTEMPTS, DATE_TAKEN, TO_CHAR(DATE_TAKEN, 'HH:MM:SS AM') TIME_TAKEN FROM QUIZ_USERS WHERE USERID=:1 AND QUIZID=:2\"; \r\n $results = $db->ExecSQL($sql,array($name,$quizID));\r\n foreach ($results as $r){\r\n $attempts = $r['ATTEMPTS'];\r\n $score = $r['SCORE'];\r\n $pass = $r['PASS'];\r\n $dateTaken = $r['DATE_TAKEN'];\r\n $timeTaken = $r['TIME_TAKEN'];\r\n\r\n }/** */\r\n\r\n $sql = 'SELECT * FROM QUIZ_QUESTIONS WHERE QUIZ_ID =:1 ORDER BY QUESTION_ID';\r\n $results = $db->ExecSQL($sql,$quizID);\r\n\r\n \r\n\r\n //SHOW RESULTS HERE\r\n echo \" \r\n <div class=\\\"container\\\">\r\n <h4>\r\n RESULTS\r\n </h4>\r\n </div> \r\n <div style='padding-left:25em; text-align:left;'>\r\n <br>User ID: \".$name.\"\r\n <br>User: \".$uName.\"\r\n <br>Date Taken: \".$dateTaken.\"\r\n <br>Time Taken: \".$timeTaken.\" \r\n <br>Quiz Name: \".$qName.\"<br><br>\r\n YOUR SCORE: \".$score.\"%<br><br>\";\r\n $quiz_results = \"RESULTS\r\n \\nUser: \".$uName.\"\r\n \\nDate Taken: \".$dateTaken.\"\r\n \\nTime Taken: \".$dateTaken.\"\r\n \\nQuiz Name: \".$qName.\" \r\n \\n\\nYOUR SCORE: \".$score.\"%\\n\\n\";\r\n \r\n if ($pass == 'Y'){\r\n echo \"<b>Congratulations, you've passed!</b><br>\";\r\n echo \"</div>\";\r\n $quiz_results .= \"\\nCongratulations, you've passed!\\n\";\r\n //$opStr = ob_get_contents();\r\n //$opStr =ob_get_flush();\r\n //file_put_contents($filename, $opStr);\r\n fwrite($fout, $quiz_results);\r\n fclose($fout); \r\n echo \"<div style='padding-left:65%; margin:1em;'> \r\n <span><!--<a href='' class=\\\"btn btn-primary\\\">Take Another Quiz</a>--></span>\r\n <!--<span><button onclick=\\\"window.open('', '_self', ''); window.close();\\\" class='btn btn-warning'>Close Quiz</button></span> -->\r\n <span> <a href=\\\".\\\\QuizReceipts\\\\\".$filename.\"\\\" class='btn btn-small btn-primary' download>PRINT RESULTS</a></span>\r\n <!-- <span> <a href='http://cs_webserver/oracle1/trainingdocs.php' class='btn btn-warning' id='qCloser'>Close Quiz</a></span> -->\r\n </div>\r\n \";\r\n }else{\r\n echo \"<div>Unfortunately the minimum to pass was \".$min.\"%. You will need to retake this quiz.</div><br><br>\r\n <span> <a href='http://cs_webserver/oracle1/trainingdocs.php' class='btn btn-danger'>Training Docs</a></span>\r\n </div>\";\r\n }\r\n \r\n \r\n\r\n\r\n }//ENDS MAIN ELSE STATEMENT \r\n echo \"</center><!-- END formdiv-->\";\r\n\r\n \r\n \r\n \r\n \r\n}", "title": "" }, { "docid": "cc6039b48c5e877cb95e586d8a96ee34", "score": "0.5708099", "text": "function exportStepRunCSV ($data, $title) {\n global $na;\n\n $csv .= \"$title\\n\";\n\n // Put out header information\n $csv .= \"DUT, EAST, TM500, NMS, RANTEST, USER, DATE, LOGS\\n\";\n\n $versions = array (\n \"DUTVersion\",\n \"EASTVersion\",\n \"TM500Version\",\n \"NMSVersion\",\n \"RANTESTVersion\"\n );\n\n foreach ($versions as $version) {\n if ($data[\"_header\"][$version] == $na) {\n $csv .= \"N/A,\";\n } else {\n $csv .= $data[\"_header\"][$version] . \",\";\n } // if\n } // foreach\n\n $csv .= $data[\"_header\"][\"userid\"]\t\t\t. \",\";\n $csv .= YMD2MDY ($data[\"_header\"][\"Date\"])\t\t. \",\";\n $csv .= logs ($data[\"_header\"][\"_eastlogs\"], true)\t. \"\\n\\n\";\n\n // Create header line\n $firstTime = true;\n\n foreach ($data[\"_steps\"][0] as $key => $value) {\n // Skip \"hidden\" fields - fields beginning with \"_\"\n if (preg_match (\"/^_/\", $key) == 1) {\n continue;\n } // if\n\n if (!$firstTime) {\n $csv .= \",\";\n } else {\n $firstTime = false;\n } // if\n\n $csv .= \"\\\"$key\\\"\";\n } // foreach\n\n $csv .= \"\\n\";\n\n foreach ($data[\"_steps\"] as $entry) {\n $firstTime = true;\n\n foreach ($entry as $key => $value) {\n // Skip \"hidden\" fields - fields beginning with \"_\"\n if (preg_match (\"/^_/\", $key) == 1) {\n\tcontinue;\n } // if\n\n if (!$firstTime) {\n\t$csv .= \",\";\n } else {\n\t$firstTime = false;\n } // if\n\n $csv .= \"\\\"$value\\\"\";\n } // foreach\n\n $csv .= \"\\n\";\n } // foreach\n\n return $csv;\n}", "title": "" }, { "docid": "067b59100286899741c7abd2fc868c0c", "score": "0.5704412", "text": "public function exportCsvAction()\n {\n $fileName = 'client.csv';\n $content = $this->getLayout()->createBlock('bs_client/adminhtml_client_grid')\n ->getCsv();\n $this->_prepareDownloadResponse($fileName, $content);\n }", "title": "" }, { "docid": "22d6c6580be31bf1000ae5278d93f37c", "score": "0.56932247", "text": "private function exportar_todos()\n\t{\n\t\t//seleciona todos os dados da tabela Cadastro\n\t\t$this->Delegator(\"ConcreteFaleconosco\", \"SelectFaleconoscoExportarTudoCsv\");\n\t}", "title": "" }, { "docid": "735f454de78b4b2434ee46b18ca64ba1", "score": "0.5688034", "text": "public function actionExportToCSV() {\n \n $taskSearch = $this->getTaskSearchFromRequest();\n $content = ServiceFactory::createUserProjectTaskService()->getCSVContentFromTaskSearch($taskSearch, Yii::$app->user);\n if (!$content) {\n $content = \"No results\";\n } else {\n // Convert to UTF-16 for working around excel bug (not handling utf-8 properly)\n // and remove BOM, that Excel seems not to like it either\n //$content = substr( iconv( 'UTF-8', 'UTF-8', $content ), 2 );\n $content = utf8_decode($content);\n }\n $filename = 'tasks_' . date('Ymd') . '.csv';\n Yii::$app->getRequest()->sendFile($filename, $content, \"text/csv\", true);\n }", "title": "" }, { "docid": "e18aed6651c50309c089b549fd156aec", "score": "0.5686444", "text": "public function actionCsv()\n {\n \t$model=new Maquina();\n\t\t if ($model->cargacsv(Yii::$app->request->post())){\n\t\t \treturn print_r($model->cargacsv(Yii::$app->request->post()));\n\t\t }else{\n\t\t return print_r($model->getErrors());\n\t\t }\n }", "title": "" }, { "docid": "2cb7c5748c0cc85f76555fb715582288", "score": "0.5680589", "text": "public function exportCsvAction()\n {\n $fileName = 'orders.csv';\n $grid = $this->getLayout()->createBlock('adminhtml/sales_order_grid');\n $this->_prepareDownloadResponse($fileName, $grid->getCsvFile());\n }", "title": "" }, { "docid": "040ad405e9257610d7031f5047a07905", "score": "0.56779253", "text": "public function exportBestsellersbycategoryCsvAction()\n {\n $fileName = 'bestsellersbycategory.csv';\n $content = $this->getLayout()->createBlock('customreports/bestsellersbycategory_grid')\n ->getCsvFile();\n\n $this->_prepareDownloadResponse($fileName, $content);\n }", "title": "" }, { "docid": "a34ad945888118f3bef50307671262b1", "score": "0.5676004", "text": "public function actionExportarAfiliacionCSV(){ \n ini_set('memory_limit','256M'); \n\n $criteria = Yii::app()->getSession()->get(\"comisionesAfiliacion\");\n $arrayBalances = Balance::model()->findAll($criteria);\n header( \"Content-Type: text/csv;charset=utf-8\" );\n header('Content-Disposition: attachment; filename=\"Historial-Afiliacion.csv\"');\n $fp = fopen('php://output', 'w'); \n \n fputcsv($fp,array('Fecha', 'Comision', 'Total de Visitas', 'N. Pago Afiliado'),\";\",'\"');\n \n foreach ($arrayBalances as $balance) {\n\n $payps = PayPersonalShopper::model()->findByAttributes(array('affiliatePay_id'=>$balance->orden_id,'user_id'=>$balance->user_id));\n \n $vals = array( date(\"d-m-Y H:i:s\",strtotime($balance->fecha)) , $balance->total, $payps->total_views, $payps->affiliatePay_id);\n fputcsv($fp,$vals,\";\",'\"'); \n }\n\n fclose($fp); \n ini_set('memory_limit','128M'); \n Yii::app()->end(); \n }", "title": "" }, { "docid": "a7a55c443d8eaaa37f50856da7978988", "score": "0.56757873", "text": "public function exportCSV(){ \n\t $filename = 'DataItem_'.date('d-m-Y').'.csv'; \n\t header(\"Content-Description: File Transfer\"); \n\t header(\"Content-Disposition: attachment; filename=$filename\"); \n\t header(\"Content-Type: application/csv; \");\t \n\t // get data \n\t $usersData = $this->M_monitoring->getDataCsv();\n\t // file creation \n\t $file = fopen('php://output', 'w');\n\t $header = array(\"ITEM CODE\",\"ITEM DESCRIPTION\",\"UOM1\",\"UOM2\",\"BUYER\",\"PRE-PROCESSING LEAD TIME\",\"PREPARATION PO\",\"DELIVERY\",\"POST-PROCESSING LEAD TIME\",\"MOQ\",\"FLM\",\"NAMA APPROVER PO\",\"RECEIVE CLOSE TOLERANCE\",\"TOLERANCE\",\"KETERANGAN\"); \n\t fputcsv($file, $header);\n\t foreach ($usersData as $key=>$line){ \n\t fputcsv($file,$line); \n\t }\n\t fclose($file); \n\t exit; \n\t}", "title": "" }, { "docid": "3abbd98fbba3c1c924e77b32a9ea843d", "score": "0.5671719", "text": "function export()\n\t{\n\t\t$js = $this->get_js_header();\n\t\t$html = '<tr><td colspan=\"2\"><table width=\"100%\">';\n\t\t// some javascript must be added for that kind of questions\n\t\t$html .= '';\n\n\t\t// Get the answers, make a list\n\t\t$nbrAnswers=$this->selectNbrAnswers();\n\n\t\t$answer_list = '<div style=\"padding: 10px; margin-left: -8px; border: 1px solid #4271b5; height: 448px; width: 200px;\"><b>'.get_lang('HotspotZones').'</b><ol>';\n for ($answerId = 1; $answerId <= $nbrAnswers; $answerId++) {\n $answer_list .= '<li>'.$this->selectAnswer($answerId).'</li>';\n }\n $answer_list .= '</ol></div>';\n\t\t$canClick = true;\n\t\t$relPath = api_get_path(REL_PATH);\n\t\t$html .= <<<HTML\n <tr>\n <td>\n <div id=\"hotspot-{$this->questionJSId}\"></div>\n <script>\n document.addEventListener('DOMContentListener', function () {\n new HotspotQuestion({\n questionId: {$this->questionJSId},\n selector: '#hotspot-{$this->questionJSId}',\n for: 'user',\n relPath: '$relPath'\n });\n });\n </script>\n </td>\n <td>\n $answer_list\n </td>\n <tr>\nHTML;\n\t\t$html .= '</table></td></tr>';\n\n\t\t// currently the free answers cannot be displayed, so ignore the textarea\n\t\t$html = '<tr><td colspan=\"2\">'.get_lang('ThisItemIsNotExportable').'</td></tr>';\n\n\t\treturn array($js, $html);\n\t}", "title": "" }, { "docid": "659975e2dd27d771d982e2c8fbd99747", "score": "0.5662085", "text": "public function exportClassification()\n {\n $fl = new self($this->adapter);\n $callback = function ($select) {\n $select->columns(['*']);\n $select->where('parent_id IS NULL');\n };\n $row = $this->select($callback)->toArray();\n $escaper = new \\Laminas\\Escaper\\Escaper('utf-8');\n header('Content-Type: text/csv');\n header('Content-Disposition: attachment; filename=test_export.csv');\n $file = fopen('php://output', 'w') or die('Unable to open file!');\n //add BOM to fix UTF-8 in Excel\n fputs($file, $bom = (chr(0xEF) . chr(0xBB) . chr(0xBF)));\n foreach ($row as $t) {\n $content = $t['id'] . ' ' . $escaper->escapeHtml($t['text_fr']) . ' ';\n fputcsv($file, [$content]);\n $fl->getDepth($t['id'], $file, $content);\n }\n fflush($file);\n fclose($file);\n exit;\n }", "title": "" }, { "docid": "97940af4d5cf0a46f8464d71b452900c", "score": "0.5652489", "text": "public function exportCsvAction()\r\n {\r\n $fileName = 'invoices.csv';\r\n $grid = $this->getLayout()->createBlock('vendorssales/vendor_sales_invoice_grid');\r\n $this->_prepareDownloadResponse($fileName, $grid->getCsvFile());\r\n }", "title": "" }, { "docid": "6eb53676f93c40e06eacfd394af3666a", "score": "0.56494725", "text": "function makeCSVFile() {\n\t\tif (!$this->csvArray || empty($this->csvArray))\n\t\t\treturn;\n\n\t\t// go through array and write out...\n\t\t$csvFileText = '';\n\t\t$csvCounter = 0;\n\t\tforeach ($this->csvArray as $val) {\n\t\t\tif ($val == '\\n') {\n\t\t\t\t$csvCounter++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$csvFileText[$csvCounter][] = $val;\n\t\t\t}\n\t\t}\n\n\t\t// generate a filename\n\t\t$this->csvFileName .= '-' . date('mdy');\n\t\t$this->csvFileName .= '.csv';\n\n\t\t// build file name + path\n\t\t$this->fileFunc = t3lib_div::makeInstance('t3lib_basicFileFunctions');\n\t\t$this->csvFileName = $this->fileFunc->cleanFileName($this->csvFileName);\n\t\t$csvFilePath = PATH_site . 'typo3temp/temp/';\n\t\t$csvUniqueName = $csvFilePath . $this->csvFileName;\n\n\t\t// now write out the file\n\t\t$fh = fopen($csvUniqueName, 'w');\n\t\tif ($fh) {\n\t\t\tforeach ($csvFileText as $out) {\n\t\t\t\tfputcsv($fh, $out);\n\t\t\t}\n\t\t}\n\t\tfclose($fh);\n\n\t\t$csvDownloadPath = 'typo3temp/temp/' . $this->csvFileName;\n\t\t$this->marker['###DOWNLOAD_CSV_FILE###'] = '<a class=\"button\" href=\"' . $csvDownloadPath . '\"><span>'.$this->parentObj->pi_getLL('admin_download_csv','Download CSV File').'</span></a>';\n\t}", "title": "" }, { "docid": "1222d462830d0630464929aa4d24f967", "score": "0.5647483", "text": "function bamp_report_results_form_submit($form, &$form_state) {\n\n $result = $form_state['values']['data'];\n\n $filename = 'data.csv';\n\n drupal_add_http_header('Content-Type', 'text/csv');\n drupal_add_http_header('Content-Disposition: attachment', 'filename=' . $filename);\n\n print($result) . \"\\r\\n\";\n\n exit;\n}", "title": "" }, { "docid": "11ce4c1a407203e0c200251c12cbb559", "score": "0.564544", "text": "public function embargoCsvAction(){\n if(!$this->_helper->access->allowed(\"report\", \"view\")) {return false;}\n\n //Query solr\n $optionsArray = array();\n $optionsArray['query'] = \"(degree_name:PhD OR degree_name:MS OR degree_name:MA)\";\n $optionsArray['sort'] = \"author\";\n $optionsArray['max'] = 300;\n\n $etdSet = new EtdSet();\n $etdSet->findEmbargoed($optionsArray);\n\n //Create HeaderRow for CSV file\n $csvHeaderRow=array(\"Author\", \"Author Email\",\n \"Advisor 1\", \"Advisor 1 Email\", \"Advisor 2\", \"Advisor 2 Email\",\n \"URL\", \"Publication Date\", \"Embargo End Date\");\n\n $data[] = $csvHeaderRow; //add to data array\n\n //Create data\n foreach($etdSet->etds as $etd){\n $line = array();\n $line[] = $etd->mods->author->full;\n\n $line[] = $etd->authorInfo->mads->permanent->email;\n\n //Get advisor and advisor emails\n $max=2;\n for($i = 0; $i < $max; $i++){\n\n if( isset($etd->mods->chair[$i]) ){\n $line[] = $etd->mods->chair[$i]->full;\n\n $esd = new esdPersonObject();\n $person = $esd->findByUsername($etd->mods->chair[$i]->id);\n if ($person) $line[] = $person->email;\n else $line[] = \"\";\n }\n else{\n for($i = 0; $i < $max; $i++){\n $line[] = \"\";\n }\n }\n }\n\n $line[] = $etd->ark();\n $line[] = $etd->mods->originInfo->issued;\n if (isset($etd->mods->embargo_end)) $line[] = $etd->mods->embargo_end;\n else $line[] = \"\";\n\n $data[] = $line;\n }\n\n $this->view->data = $data;\n\n //set HTML headers in response to make output downloadable\n $this->_helper->layout->disableLayout();\n $filename = \"EmbargoReport.csv\";\n $this->getResponse()->setHeader('Cache-Control', 'public', true);\n $this->getResponse()->setHeader('Pragma','public',true);\n $this->getResponse()->setHeader('Expires','-1');\n $this->getResponse()->setHeader('Content-Type', \"text/csv\");\n $this->getResponse()->setHeader('Content-Disposition', 'attachment; filename=\"' . $filename . '\"');\n $this->render(\"export-csv\"); // use generic csv template\n }", "title": "" }, { "docid": "8c7d064601a949f4efe72325ab888f20", "score": "0.5631331", "text": "public function exportCsvAction()\n {\n $fileName = 'providers.csv';\n $content = $this->getLayout()\n ->createBlock('mhub/adminhtml_provider_grid')\n ->getCsvFile()\n ;\n\n $this->_prepareDownloadResponse ($fileName, $content);\n }", "title": "" }, { "docid": "21dfaca79d73fe6e8e6c7f3a33def65e", "score": "0.56123805", "text": "function DeptResults(){\r\n global $db;\r\n global $user;\r\n //print_r($_REQUEST);\r\n $dept = $_REQUEST['dName'];\r\n $filename = \"Quiz\".$_REQUEST['sQuiz'].\"_Results_for_\".$dept.\"_\". date(\"mdY\") .\".txt\";\r\n $fout = fopen(\".\\\\QuizReceipts\\\\\".$filename, \"wt\");\r\n\r\n $quiz_results = ''; \r\n \r\n\r\n $date = date('m/d/Y');\r\n echo \"<center style='margin-bottom:1em;'>\";\r\n echo \"<h4>\r\n RESULTS\r\n </h4> \"; \r\n if((empty($_REQUEST['dName']))){\r\n echo 'CANNOT PROCESS, MISSING DATA';\r\n echo '<br>Quiz ID: '.$_REQUEST['sQuiz'];\r\n echo '<br>Department Assigned: '.$_REQUEST['dName']; \r\n }else if($_REQUEST['sQuiz'] == 'ALL'){\r\n $dept = $_REQUEST['dName'];\r\n if (empty($_REQUEST['sort'])){\r\n $_REQUEST['sort'] = 'QUIZ_NAME';\r\n }\r\n $sql = \"SELECT ID, USERNAME FROM USERLIST WHERE DEPARTMENT = :1 AND ACTIVE = 'Y'\";\r\n $results = $db->ExecSQL($sql, $dept);\r\n foreach ($results as $d){\r\n $uName = $d['USERNAME'];\r\n $name = $d['ID'];\r\n $sql = \"SELECT \r\n QUIZ_NAME,\r\n CLIENT_GROUP,\r\n MIN_SCORE,\r\n SCORE,\r\n PASS,\r\n ATTEMPTS,\r\n TRUNC(DATE_TAKEN) DATE_TAKEN,\r\n TO_CHAR(DATE_TAKEN, 'HH:MM:SS AM') TIME_TAKEN\r\n FROM QUIZ_MASTER, QUIZ_USERS \r\n WHERE QID = QUIZID AND USERID =:1 \r\n ORDER BY :2\";\r\n $results = $db->ExecSQL($sql,array($d['ID'], $_REQUEST['sort']));\r\n \r\n $quizResults = \"<div>Test Results for: \".$uName.\"<br>User ID: \".$name.\" </div><div class='container' style='max-height:30em; overflow-y:scroll;'>\";\r\n $quiz_results .= \"Test Results for: \".$uName.\"\\nUser ID: \".$name.\"\\r\\n\";\r\n $quizResults .= \"<table class='table table-bordered table-striped table-light' style='width:100%;'>\r\n <thead class='thead-light'><tr>\";\r\n /* $quizResults .= \"\r\n <th><a href='\".$_SERVER['PHP_SELF'].$_SERVER[' QUERY_STRING'].\"&sort=QUIZ_NAME&user={$uName}'>QUIZ NAME</a></th>\r\n <th><a href='\".$_SERVER['PHP_SELF'].$_SERVER[' QUERY_STRING'].\"&sort=CLIENT_GROUP&user={$uName}'>CLIENT</th>\r\n <th><a href='\".$_SERVER['PHP_SELF'].$_SERVER[' QUERY_STRING'].\"&sort=MIN_SCORE&user={$uName}'>MIN SCORE</a></th>\r\n <th><a href='\".$_SERVER['PHP_SELF'].$_SERVER[' QUERY_STRING'].\"&sort=SCORE&user={$uName}'>SCORE</a></th>\r\n <th><a href='\".$_SERVER['PHP_SELF'].$_SERVER[' QUERY_STRING'].\"&sort=PASS&user={$uName}'>PASS</a></th>\r\n <th><a href='\".$_SERVER['PHP_SELF'].$_SERVER[' QUERY_STRING'].\"&sort=ATTEMPTS&user={$uName}'>ATTEMPTS</a></th>\r\n <th><a href='\".$_SERVER['PHP_SELF'].$_SERVER[' QUERY_STRING'].\"&sort=DATE_TAKEN&user={$uName}'>DATE QUIZ TAKEN</a></th>\";/** */\r\n \r\n $quizResults .= \"\r\n <th><a href='\".$_SERVER['PHP_SELF'].$_SERVER[' QUERY_STRING'].\"&sort=QUIZ_NAME&user={$uName}'>QUIZ NAME</a></th>\r\n <th><a href='\".$_SERVER['PHP_SELF'].$_SERVER[' QUERY_STRING'].\"&sort=CLIENT_GROUP&user={$uName}'>CLIENT</th>\r\n <th><a href='\".$_SERVER['PHP_SELF'].$_SERVER[' QUERY_STRING'].\"&sort=SCORE&user={$uName}'>SCORE</a></th>\r\n <th><a href='\".$_SERVER['PHP_SELF'].$_SERVER[' QUERY_STRING'].\"&sort=PASS&user={$uName}'>PASS</a></th>\r\n <th><a href='\".$_SERVER['PHP_SELF'].$_SERVER[' QUERY_STRING'].\"&sort=DATE_TAKEN&user={$uName}'>DATE QUIZ TAKEN</a></th>\r\n <th><a href='\".$_SERVER['PHP_SELF'].$_SERVER[' QUERY_STRING'].\"&sort=TIME_TAKEN&user={$uName}'>TIME QUIZ TAKEN</a></th>\";\r\n \r\n foreach ($results as $r){\r\n $qName = $r['QUIZ_NAME'];\r\n $client = $r['CLIENT_GROUP'];\r\n $min = $r['MIN_SCORE'];\r\n $score = $r['SCORE'];\r\n $pass = $r['PASS'];\r\n $attempts = $r['ATTEMPTS']; \r\n $dateTaken = $r['DATE_TAKEN'];\r\n $timeTaken = $r['TIME_TAKEN'];\r\n if (!empty($score)){\r\n // $quizResults .= \"<tr><td>\".$qName.\"</td><td>\".$client.\"</td><td>\".$min.\"</td><td>\".$score.\"</td><td>\".$pass.\"</td><td>\".$attempts.\"</td><td>\".$dateTaken.\"</td></tr>\"; \r\n $quizResults .= \"<tr><td>\".$qName.\"</td><td>\".$client.\"</td><td>\".$score.\"</td><td>\".$pass.\"</td><td>\".$dateTaken.\"</td><td>\".$timeTaken.\"</td></tr>\"; \r\n //$quiz_results .= $qName.\"\\n\".$client.\"\\n\".$min.\"\\n\".$score.\"\\n\".$pass.\"\\t\".$attempts.\"\\t\".$dateTaken.\"\\n\";\r\n $quiz_results .= \"\\r\\nQuiz Name: \".$qName.\"\r\n \\nClient: \".$client.\"\r\n \\nSCORE: \".$score.\"%\r\n \\nPASS: \".$pass.\" \r\n \\nDate Taken: \".$dateTaken.\"\r\n \\nTime Taken: \".$timeTaken.\"\\r\\n\\n\"; \r\n } \r\n }\r\n $quizResults .= \"</table></div>\";\r\n echo $quizResults;\r\n \r\n }\r\n fwrite($fout, $quiz_results);\r\n fclose($fout);\r\n echo \"<div style='padding-left:65%; margin:1em;'> \r\n <span> <a href=\\\".\\\\QuizReceipts\\\\\".$filename.\"\\\" class='btn btn-small btn-primary' download>PRINT RESULTS</a></span>\r\n <!--<span> <a href='http://cs_webserver/oracle1/trainingdocs.php' class='btn btn-warning' id='qCloser'>Close Quiz</a></span>--> \r\n </div>\r\n \";\r\n }else{\r\n $dept = $_REQUEST['dName'];\r\n $quizID = $_REQUEST['sQuiz'];\r\n\r\n $sql = \"SELECT ID, USERNAME FROM USERLIST WHERE DEPARTMENT = :1 AND ACTIVE = 'Y'\";\r\n $results = $db->ExecSQL($sql, $dept);\r\n foreach ($results as $d){\r\n $uName = $d['USERNAME'];\r\n $sql = 'SELECT QUIZ_NAME, MIN_SCORE FROM QUIZ_MASTER WHERE QID =:1';\r\n $results = $db->ExecSQL($sql,$quizID);\r\n foreach ($results as $r){\r\n $qName = $r['QUIZ_NAME'];\r\n $min = $r['MIN_SCORE'];\r\n }\r\n $name = $d['ID'];\r\n global $attempts;\r\n $sql = \"SELECT SCORE, PASS, ATTEMPTS, DATE_TAKEN, TO_CHAR(DATE_TAKEN, 'HH:MM:SS AM') TIME_TAKEN FROM QUIZ_USERS WHERE USERID=:1 AND QUIZID=:2\"; \r\n $results = $db->ExecSQL($sql,array($name,$quizID));\r\n foreach ($results as $r){\r\n $attempts = $r['ATTEMPTS'];\r\n $score = $r['SCORE'];\r\n $pass = $r['PASS'];\r\n $dateTaken = $r['DATE_TAKEN'];\r\n $timeTaken = $r['TIME_TAKEN'];\r\n\r\n }/** */\r\n\r\n $sql = 'SELECT * FROM QUIZ_QUESTIONS WHERE QUIZ_ID =:1 ORDER BY QUESTION_ID';\r\n $results = $db->ExecSQL($sql,$quizID);\r\n\r\n \r\n if(!empty($score)){\r\n //SHOW RESULTS HERE\r\n echo \" \r\n <div class=\\\"container\\\"> \r\n </div>\r\n <hr> \r\n <div style='padding-left:25em; text-align:left;'>\r\n\r\n <br>User ID: \".$name.\"\r\n <br>User: \".$uName.\"\r\n <br>Date Taken: \".$dateTaken.\"\r\n <br>Time Taken: \".$timeTaken.\" \r\n <br>Quiz Name: \".$qName.\"<br>\r\n \".$uName.\"'S SCORE: \".$score.\"%<br><br>\";\r\n $quiz_results .= \"\r\n \\nUser: \".$uName.\"\r\n \\nDate Taken: \".$dateTaken.\"\r\n \\nTime Taken: \".$dateTaken.\"\r\n \\nQuiz Name: \".$qName.\" \r\n \\n\".$uName.\"'S SCORE: \".$score.\"%\\n\\n\";\r\n \r\n if ($pass == 'Y'){\r\n echo \"<b>Congratulations, you've passed!</b><br>\";\r\n echo \"</div>\";\r\n $quiz_results .= \"\\nCongratulations, you've passed!\\n\";\r\n //$opStr = ob_get_contents();\r\n //$opStr =ob_get_flush();\r\n //file_put_contents($filename, $opStr);\r\n \r\n }else{\r\n echo \"<div>Unfortunately the minimum to pass was \".$min.\"%. You will need to retake this quiz.</div><br><br>\r\n <span> <a href='http://cs_webserver/oracle1/trainingdocs.php' class='btn btn-danger'>Training Docs</a></span>\r\n </div>\";\r\n }\r\n }\r\n \r\n }//ENDS FOREACH FOR D\r\n fwrite($fout, $quiz_results);\r\n fclose($fout); \r\n echo \"<div style='padding-left:65%; margin:1em;'> \r\n <span><!--<a href='' class=\\\"btn btn-primary\\\">Take Another Quiz</a>--></span>\r\n <!--<span><button onclick=\\\"window.open('', '_self', ''); window.close();\\\" class='btn btn-warning'>Close Quiz</button></span> -->\r\n <span> <a href=\\\".\\\\QuizReceipts\\\\\".$filename.\"\\\" class='btn btn-small btn-primary' download>PRINT RESULTS</a></span>\r\n <!-- <span> <a href='http://cs_webserver/oracle1/trainingdocs.php' class='btn btn-warning' id='qCloser'>Close Quiz</a></span> -->\r\n </div>\r\n \";\r\n\r\n\r\n }//ENDS MAIN ELSE STATEMENT \r\n}", "title": "" }, { "docid": "0fb4ec982620ed8240b38a43bca0d30b", "score": "0.560098", "text": "public function generate_csv()\n {\n global $wpdb;\n \n $csv_output = '';\n $table_name = $wpdb->prefix . \"gokeep_optin\";\n\n $result = mysql_query(\"SHOW COLUMNS FROM \".$table.\"\");\n\n $i = 0;\n if (mysql_num_rows($result) > 0) {\n while ($row = mysql_fetch_assoc($result)) {\n $csv_output = $csv_output . $row['Field'].\",\";\n $i++;\n }\n }\n $csv_output .= \"\\n\";\n\n $values = mysql_query(\"SELECT * FROM \".$table.\"\");\n while ($rowr = mysql_fetch_row($values)) {\n for ($j=0;$j<$i;$j++) {\n $csv_output .= $rowr[$j].\",\";\n }\n $csv_output .= \"\\n\";\n }\n\n return $csv_output;\n }", "title": "" }, { "docid": "ac2adf8c4fb3a7a52f7ef5eba6cafbb9", "score": "0.55909026", "text": "private function backup()\n {\n // Save data sets into a csv file\n $filename = __DIR__ . $_ENV['BACKUP_PATH'] . 'probability.csv';\n $data = DB::table('probability')->get();\n\n // Erase existing file\n $output = fopen($filename, file_exists($filename) ? 'w' : 'x');\n\n // Set up the first row\n fputcsv($output, ['id', 'resident', 'total', 'selected', 'probability']);\n // Add all rows\n foreach ($data as $info) {\n fputcsv($output, [$info['id'], $info['resident'], $info['total'], $info['selected'], $info['probability']]);\n }\n\n // Close file\n fclose($output);\n }", "title": "" }, { "docid": "9bf3b14a321516a1d5146f466129c458", "score": "0.55751896", "text": "function export()\n {\n // get parameters\n $sort = $this->input->get('sort') ? $this->input->get('sort', TRUE) : DEFAULT_SORT;\n $dir = $this->input->get('dir') ? $this->input->get('dir', TRUE) : DEFAULT_DIR;\n\n // get filters\n $filters = array();\n\n if ($this->input->get('name'))\n {\n $filters['name'] = $this->input->get('name', TRUE);\n }\n\n if ($this->input->get('url'))\n {\n $filters['url'] = $this->input->get('url', TRUE);\n }\n\n if ($this->input->get('title'))\n {\n $filters['title'] = $this->input->get('title', TRUE);\n }\n\n // get all portfolio\n $portfolio = $this->portfolio_model->get_all(0, 0, $filters, $sort, $dir);\n\n if ($portfolio['total'] > 0)\n {\n // manipulate the output array\n foreach ($portfolio['results'] as $key=>$user)\n {\n unset($portfolio['results'][$key]['password']);\n unset($portfolio['results'][$key]['deleted']);\n\n if ($user['status'] == 0)\n {\n $portfolio['results'][$key]['status'] = lang('admin input inactive');\n }\n else\n {\n $portfolio['results'][$key]['status'] = lang('admin input active');\n }\n }\n\n // export the file\n array_to_csv($portfolio['results'], \"portfolio\");\n }\n else\n {\n // nothing to export\n $this->session->set_flashdata('error', lang('core error no_results'));\n redirect($this->_redirect_url);\n }\n\n exit;\n }", "title": "" }, { "docid": "ca04415eb3dc6a446ef164b1128f0f9f", "score": "0.5565133", "text": "public function csvExport()\n\t{\n System::loadLanguageFile('tl_bkm_hivemap');\n $formId = 'bkm_export_csv';\n\n\t\tif (Input::post('FORM_SUBMIT') == $formId)\n\t\t{\n\t\t\t$db = Database::getInstance();\n\t\t\t$id = Input::get('id');\n\n\t\t\t//Check the reference-id\n\t\t\tif($id < 1)\n\t\t\t{\n Message::addError('keine ID als Daten-Referenz angegeben');\n\t\t\t\t$this->reload();\n\t\t\t}\n\n\t\t\t//set handle from file\n\t\t\t$seperators = array('comma'=>',','semicolon'=>';','tabulator'=>\"\\t\",'linebreak'=>\"\\n\");\n\t\t\t$fieldnames = array('date'=>'Datum','description'=>'Bemerkung');\n\n\t\t\t// get records\n\t\t\t$arrExport = array();\n if(Input::post('exportYear'))\n {\n\t\t\t\t$resObj = $db->prepare('SELECT `h`.*,`c`.`hive_number` FROM `tl_bkm_hivemap` `h` LEFT JOIN `tl_bkm_colonies` `c` ON `h`.`pid` = `c`.`id`\n\t\t\t\tWHERE `c`.`id` = ? AND (FROM_UNIXTIME(`h`.`date`,\"%Y\") = ? || FROM_UNIXTIME(`h`.`date`,\"%Y\") = ?)\n\t\t\t\tORDER BY `h`.`date` ASC')\n\t\t\t\t->execute($id, Input::post('exportYear'), Input::post('exportYear'));\n } else {\n\t\t\t\t$resObj = $this->Database->prepare('SELECT `h`.*,`c`.`hive_number` FROM `tl_bkm_hivemap` `h` LEFT JOIN `tl_bkm_colonies` `c` ON `h`.`pid` = `c`.`id`\n\t\t\t\tWHERE `c`.`id` = ?\n\t\t\t\tORDER BY `h`.`date` ASC')\n\t\t\t\t->execute($id, Input::post('exportYear'), Input::post('exportYear'));\n }\n\n\t\t\t//Check the reference-id\n\t\t\tif($resObj->numRows < 1)\n\t\t\t{\n Message::addError('keine Daten zum exportieren vorhanden');\n\t\t\t\t$this->reload();\n\t\t\t}\n\t\t\t$arrExport = $resObj->fetchAllAssoc();\n\n\t\t\t// start output\n\t\t\t$exportFile = 'Stockkarte_Volk_'.$resObj->hive_number.'_' . Input::post('exportYear');\n\t\t\t$output = '';\n\t\t $output = '\"' . implode('\"'.$this->csv_separators[Input::post('separator')].'\"', array_values($this->csv_fields)).'\"' . \"\\n\";\n\n\t\t foreach ($arrExport as $export)\n\t\t {\n\t\t\t\t$row = array\n\t\t\t\t(\n\t\t\t\t\t'date' => date($GLOBALS['TL_CONFIG']['dateFormat'], $export['date']),\n\t\t\t\t\t'description' => html_entity_decode($export['description']),\n\t\t\t\t);\n\n\t\t\t\t$output .= '\"' . implode('\"'.$this->csv_separators[Input::post('separator')].'\"', str_replace(\"\\\"\", \"\\\"\\\"\", $row)).'\"' . \"\\n\";\n\t\t\t}\n\n\t\t\tob_end_clean();\n\t\t\theader('Content-Type: application/csv');\n\t\t\theader('Content-Transfer-Encoding: binary');\n\t\t\theader('Content-Disposition: attachment; filename=\"' . $exportFile .'.csv\"');\n\t\t\theader('Cache-Control: must-revalidate, post-check=0, pre-check=0');\n\t\t\theader('Pragma: public');\n\t\t\theader('Expires: 0');\n\t\t\techo $output;\n\t\t\texit();\n\n\t\t}\n\n $Template = new BackendTemplate('be_bkm_export_csv');\n $Template->headline = $GLOBALS['TL_LANG']['tl_bkm_hivemap']['csvExport'][1];\n $Template->backlink = ampersand(str_replace('&key=csvExport', '', $this->Environment->request));\n $Template->message = Message::generate();\n $Template->lang_array = $GLOBALS['TL_LANG']['tl_bkm_hivemap'];\n $Template->csv_seperators = $this->getCSVSeparators();\n $Template->export_years = $this->getExportYear(5);\n $Template->formId = $formId;\n\n // Return the form\n return $Template->parse();\n\t}", "title": "" }, { "docid": "2c54164d8d039028addc61de7e38f84b", "score": "0.5563543", "text": "protected function exportFile()\n {\n file_put_contents($this->outputPath . $this->fileName, $this->csv);\n }", "title": "" }, { "docid": "8e90ea0d168c64b7a8a5404eded7cba4", "score": "0.5555517", "text": "public function exportCsvAction()\n {\n $fileName = 'wgroup.csv';\n $content = $this->getLayout()->createBlock('bs_logistics/adminhtml_wgroup_grid')\n ->getCsv();\n $this->_prepareDownloadResponse($fileName, $content);\n }", "title": "" }, { "docid": "f603a2ff6b86568797bc999409f906e7", "score": "0.55419034", "text": "public function exportCSV(){\r\n\r\n\t\t// file name\r\n\t\t$filename = 'bankDetails_'.date('Ymd').'.csv';\r\n\r\n\t\theader(\"Content-Description: File Transfer\");\r\n\t\theader(\"Content-Disposition: attachment; filename=$filename\");\r\n\t\theader(\"Content-Type: application/csv; \");\r\n\r\n\t\t// get data\r\n\t\t$usersData = $this->Sections_model->get_bankDetails();\r\n\r\n\t\t// file creation\r\n\t\t$file = fopen('php://output', 'w');\r\n\r\n\t\t$header = array(\"First Name\",\"Middle Name\",\"Surname\",\"School\",\"Department\",\"Reg_no\",\"Bank Name\",\"Bank Branch\",\"Bank Account\",\"Amount\");\r\n\t\tfputcsv($file, $header);\r\n\r\n\t\tforeach ($usersData as $key=>$line){\r\n\t\t fputcsv($file,$line);\r\n\t\t}\r\n\r\n\t\tfclose($file);\r\n\t\texit;\r\n\t}", "title": "" }, { "docid": "468685030c55a2f88de25b43d40856ae", "score": "0.5514691", "text": "public function executeExportarCsv(sfWebRequest $request)\n {\n\n $filters = $this->getUser()->getAttribute('parroquia.filters', $this->configuration->getFilterDefaults(), 'admin_module');\n $filters_form = new ParroquiaFormFilter();\n $query = $filters_form->buildQuery($filters);\n $this->parroquias = $query->execute();\n\n $response = $this->getContext()->getResponse();\n $response->setContentType('application/csv');\n $response->addHttpMeta('cache-control', 'no-cache');\n $response->addHttpMeta('Expires', gmdate(\"D, d M Y H:i:s\") . \" GMT\",time());\n $response->setHttpHeader('Content-Disposition', 'attachment; filename=\"Parroquia.csv\"');\n $response->setContent($this->getPartial('csv'));\n \n return sfView::NONE;\n }", "title": "" }, { "docid": "864c303d4b82c6f96b1656a5a1cf04fe", "score": "0.5509429", "text": "public function exportCsvAction()\n {\n Mage::register('current_report', $this->_getReport());\n $this->loadLayout();\n\n /** @var $grid Mage_Adminhtml_Block_Widget_Grid */\n $grid = $this->getLayout()->getBlock('report.view.grid');\n if(!$grid instanceof Mage_Adminhtml_Block_Widget_Grid) {\n $this->_forward('noroute');\n return;\n }\n\n $fileName = strtolower(str_replace(' ', '_', $this->_getReport()->getTitle())) . '_' . time() . '.csv';\n\n $this->_prepareDownloadResponse(\n $fileName,\n $grid->getCsvFile(),\n 'text/csv'\n );\n }", "title": "" }, { "docid": "f80a9269209139ab0eb1a15e9327fb30", "score": "0.55065924", "text": "public function exportExcelAction()\n {\n $fileName = 'answer.xls';\n $content = $this->getLayout()->createBlock('bs_exam/adminhtml_answer_grid')\n ->getExcelFile();\n $this->_prepareDownloadResponse($fileName, $content);\n }", "title": "" }, { "docid": "f7675613f671bb8acf02f6f840181211", "score": "0.5505237", "text": "function export($id)\n {\n $this->load->model('event_model');\n $talks = $this->event_model->getEventFeedback($id);\n\n $fp = fopen('php://memory', 'w+');\n foreach ($talks as $k => $v) {\n fputcsv($fp, (array)$v);\n }\n\n rewind($fp);\n $out = stream_get_contents($fp);\n fclose($fp);\n\n header('Content-type: application/octet-stream');\n header(\n 'Content-Disposition: attachment; filename=\"Event_Comments_' .\n $id . '.csv\"'\n );\n\n echo $out;\n }", "title": "" }, { "docid": "8a9fc7a2032dac2d33c34335dc1153d2", "score": "0.5502067", "text": "public function actionCsvDownload()\n {\n $searchModel = new ProductSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams['params']);\n $dataProvider->pagination = false;\n\n header('Content-Type: application/excel');\n header('Content-Disposition: attachment; filename=\"product.csv\"'); \n\n $fp = fopen('php://output', 'w');\n $i =1;\n foreach ($dataProvider->models as $row) { \n fputcsv($fp, [$row->id, $row->code,$row->name,$row->group->name, $row->category->name],chr(9));\n //fputcsv($fp, [$i, $row->code, str_replace(';', '-', $row->name),$row->group->name, $row->category->name],';');\n $i++;\n }\n fclose($fp);\n return false;\n }", "title": "" }, { "docid": "7633fce37825517aefa91b58676fcc5b", "score": "0.5494076", "text": "function export()\n\t{\n\t\t$js = '';\n\t\t$html = '<tr><td colspan=\"2\"><table width=\"100%\">';\n\t\t// prepare list of right proposition to allow\n\t\t// - easiest display\n\t\t// - easiest randomisation if needed one day\n\t\t// (here I use array_values to change array keys from $code1 $code2 ... to 0 1 ...)\n\n\t\t// get max length of displayed array\n\n\t\t$nbrAnswers = $this->selectNbrAnswers();\n\t\t$cpt1='A';\n\t\t$cpt2=1;\n\t\t$Select = array();\n\t\t$qId = $this->questionJSId;\n\t\t$s = '';\n\t\t$jstmp = '';\n\t\t$jstmpc = '';\n\t\t$jstmpw = 'questions_answers_ponderation['.$this->questionJSId.'] = new Array();'.\"\\n\";\n\t\t$jstmpw .= 'questions_answers_ponderation['.$this->questionJSId.'][0] = 0;'.\"\\n\";\n\n\t\tfor ($answerId=1;$answerId <= $nbrAnswers;$answerId++) {\n\t\t\t$identifier = 'question_'.$qId.'_matching_';\n\t\t\t$answer=$this->selectAnswer($answerId);\n\t\t\t$answerCorrect=$this->isCorrect($answerId);\n\t\t\t$weight=$this->selectWeighting($answerId);\n\t\t\t$jstmp .= $answerId.',';\n\n\t\t\tif (!$answerCorrect) {\n\t\t\t\t// options (A, B, C, ...) that will be put into the list-box\n\t\t\t\t$Select[$answerId]['Lettre']=$cpt1;\n\t\t\t\t// answers that will be shown at the right side\n\t\t\t\t$Select[$answerId]['Reponse'] = $answer;\n\t\t\t\t$cpt1++;\n\t\t\t} else {\n\t\t\t\t$s.='<tr>';\n\t\t\t\t$s.='<td width=\"40%\" valign=\"top\"><b>'.$cpt2.'</b>.&nbsp;'.$answer.\"</td>\";\n\t\t\t\t$s.='<td width=\"20%\" align=\"center\">&nbsp;&nbsp;<select name=\"'.$identifier.$cpt2.'\" id=\"'.$identifier.$cpt2.'\">';\n\t\t\t\t$s.=' <option value=\"0\">--</option>';\n\t\t\t\t// fills the list-box\n foreach ($Select as $key => $val) {\n $s .= '<option value=\"'.$key.'\">'.$val['Lettre'].'</option>';\n } // end foreach()\n\n\t\t\t\t$s.='</select>&nbsp;&nbsp;</td>';\n\t\t\t\t$s.='<td width=\"40%\" valign=\"top\">';\n if (isset($Select[$cpt2])) {\n $s .= '<b>'.$Select[$cpt2]['Lettre'].'.</b> '.$Select[$cpt2]['Reponse'];\n } else {\n $s .= '&nbsp;';\n }\n\t\t\t\t$s.=\"</td></tr>\";\n\n\t\t\t\t$jstmpc .= '['.$answerCorrect.','.$cpt2.'],';\n\n $my_weight = explode('@', $weight);\n if (count($my_weight) == 2) {\n $weight = $my_weight[0];\n } else {\n $weight = $my_weight[0];\n }\n\t\t\t\t$jstmpw .= 'questions_answers_ponderation['.$qId.']['.$cpt2.'] = '.$weight.\";\\n\";\n\t\t\t\t$cpt2++;\n\n\t\t\t\t// if the left side of the \"matching\" has been completely shown\n\t\t\t\tif ($answerId == $nbrAnswers) {\n\t\t\t\t\t// if there remain answers to be shown on the right side\n\t\t\t\t\twhile (isset($Select[$cpt2])) {\n\t\t\t\t\t\t$s.= '<tr>';\n\t\t\t\t\t\t$s.= '<td width=\"60%\" colspan=\"2\">&nbsp;</td>';\n\t\t\t\t\t\t$s.= '<td width=\"40%\" valign=\"top\">';\n\t\t\t\t\t\t$s.= '<b>'.$Select[$cpt2]['Lettre'].'.</b> '.$Select[$cpt2]['Reponse'];\n\t\t\t\t\t\t$s.= \"</td></tr>\";\n\t\t\t\t\t\t$cpt2++;\n\t\t\t\t\t}\t// end while()\n\t\t\t\t} // end if()\n\t\t\t}\n\t\t}\n\t\t$js .= 'questions_answers['.$this->questionJSId.'] = new Array('.substr($jstmp,0,-1).');'.\"\\n\";\n\t\t$js .= 'questions_answers_correct['.$this->questionJSId.'] = new Array('.substr($jstmpc,0,-1).');'.\"\\n\";\n\t\t$js .= 'questions_types['.$this->questionJSId.'] = \\'matching\\';'.\"\\n\";\n\t\t$js .= $jstmpw;\n\t\t$html .= $s;\n\t\t$html .= '</table></td></tr>' . \"\\n\";\n\n\t\treturn array($js, $html);\n\t}", "title": "" }, { "docid": "f304fa6025c80d9046057fdb1d74f12d", "score": "0.5484073", "text": "public function add_bulk_export() {\n\t\tglobal $post_type;\n\n\t\tif( $post_type === 'wc_user_membership' && current_user_can( 'manage_woocommerce' ) ) :\n\n\t\t\t?>\n\t\t\t<script type=\"text/javascript\">\n\t\t\t\tjQuery( document ).ready(function() {\n\t\t\t\t\tvar label = '<?php esc_html_e( 'Export to CSV', 'woocommerce-memberships' ); ?>';\n\t\t\t\t\tjQuery( '<option>' ).val( 'export' ).text( label ).appendTo( 'select[name=\"action\"]' );\n\t\t\t\t\tjQuery( '<option>' ).val( 'export' ).text( label ).appendTo( 'select[name=\"action2\"]' );\n\t\t\t\t} );\n\t\t\t</script>\n\t\t\t<?php\n\n\t\tendif;\n\t}", "title": "" }, { "docid": "d8f132f1d006fc8adc29f56a188e0c1c", "score": "0.54732764", "text": "function do_csv_export()\n{\n\t$fileName = 'crss_buckets_export.csv';\n\tdrupal_add_http_header('Content-Type', 'text/csv; utf-8');\n\tdrupal_add_http_header('Content-Disposition', 'attachment; filename = '.$fileName);\n\tdrupal_add_http_header('Pragma', 'public');\n drupal_add_http_header('Expires', '0');\n drupal_add_http_header('Cache-Control', 'must-revalidate, post-check=0, pre-check=0');\n \n\t$dependencyContainer = new CcrsManagerDependencyContainer();\n\t$presenter = $dependencyContainer['CcrsManagerPresenter'];\n\t\n\t$presenter->buildMasterCSV();\n\tdrupal_exit();\n}", "title": "" }, { "docid": "f820d8d24c56a036d8f44889d1402e29", "score": "0.54630476", "text": "public function exportXmlAction()\n {\n $fileName = 'answer.xml';\n $content = $this->getLayout()->createBlock('bs_exam/adminhtml_answer_grid')\n ->getXml();\n $this->_prepareDownloadResponse($fileName, $content);\n }", "title": "" }, { "docid": "fb6e325266041b3fa32623ec14ea8a3e", "score": "0.54433846", "text": "public static function exportToCsv(ExpenseTotalizer $totalizer) : void\n {\n $file = fopen('php://memory', 'w');\n foreach ($totalizer->getTotals() as $category => $total) {\n $line = [$category,$total];\n fputcsv($file, $line, ',');\n }\n fseek($file, 0);\n header('Content-type: application/csv');\n header('Content-Disposition: attachment; filename=\"total_expenses_' . time() . '.csv');\n fpassthru($file);\n fclose($file);\n }", "title": "" }, { "docid": "fed4e2c23c664dea00dda07ca5bd54dd", "score": "0.54301137", "text": "public function exportTitleCSV() {\n $headers = [\n 'Cache-Control' => 'must-revalidate, post-check=0, pre-check=0'\n , 'Content-type' => 'text/csv'\n , 'Content-Disposition' => 'attachment; filename=TitlesData.csv'\n , 'Expires' => '0'\n , 'Pragma' => 'public'\n ];\n //Add Headers to each column in the CSV\n $query = Book::query()\n ->select('title')\n ->get();\n $list = $query->toArray(); \n array_unshift($list,array_keys($list[0]));\n \n $callback = function() use ($list) {\n $FH = fopen('php://output','w');\n foreach($list as $row) {\n fputcsv($FH, $row);\n }\n fclose($FH);\n };\n\n return response()->stream($callback, 200, $headers);\n \n }", "title": "" }, { "docid": "c59c7e3e0d480eede87c4b466d58bde9", "score": "0.5425816", "text": "private function exportDetailsCSV($table, $lang){\n\t\t\n\t\theader(\"Content-Type: application/csv-tab-delimited-table\");\n\t\theader(\"Content-disposition: filename=rapport.csv\");\n\t\t\n\t\t$content = \"\";\n\t\t$content.=\tSyTranslator::Area($lang) . \" ; \"\n\t\t\t\t.\tSyTranslator::Resource($lang) . \" ; \"\n\t\t\t\t.\tSyTranslator::Short_description($lang) . \" ; \"\n\t\t\t\t.\tSyTranslator::Date($lang) . \" ; \"\n\t\t\t\t.\tSyTranslator::Full_description($lang). \" ; \"\n\t\t\t\t.\tSyTranslator::Color_code($lang) . \" ; \"\n\t\t\t\t.\tSyTranslator::recipient($lang) . \" \\r\\n\";\n\t\t\n\n\t foreach ($table as $t){\n\t \t\t$content.= $t[\"area_name\"] . \"; \";\n\t \t\t$content.= $t[\"resource\"] . \"; \";\n\t \t\t$content.= $t[\"short_description\"] . \"; \";\n\t \t\t \n\t\t $date = date( \"d/m/Y à H:i\", $t[\"start_time\"]) . \" - \";\n\t\t $date .= date( \"d/m/Y à H:i\", $t[\"end_time\"]);\n\t\t \n\t\t $content.= $date . \";\"; \n\t\t $content.= $t[\"full_description\"] . \"; \";\n\t\t $content.= $t[\"color\"] . \"; \";\n\t\t $content.= $t[\"login\"] . \" \";\n\t\t $content.= \"\\r\\n\";\n\t }\n\t echo $content;\n\t}", "title": "" }, { "docid": "a8fa2286afc2eddcedb72c9fcc11c914", "score": "0.541626", "text": "public function data_table_footer() {\n\t\tswitch ( $this->type ) {\n\t\t\tcase 'courses':\n\t\t\t\t$report = 'courses-overview';\n\t\t\t\tbreak;\n\n\t\t\tcase 'lessons':\n\t\t\t\t$report = 'lessons-overview';\n\t\t\t\tbreak;\n\n\t\t\tcase 'users':\n\t\t\tdefault :\n\t\t\t\t$report = 'user-overview';\n\t\t\tbreak;\n\t\t} // End Switch Statement\n\t\t$url = add_query_arg( array( 'page' => $this->page_slug, 'view' => $this->type, 'sensei_report_download' => $report ), admin_url( 'admin.php' ) );\n\t\techo '<a class=\"button button-primary\" href=\"' . esc_url( wp_nonce_url( $url, 'sensei_csv_download-' . $report, '_sdl_nonce' ) ) . '\">' . __( 'Export all rows (CSV)', 'woothemes-sensei' ) . '</a>';\n\t}", "title": "" }, { "docid": "01f1e02fe52708e5b804f595acbfde14", "score": "0.54116315", "text": "function getCsvAnswer($position){\n $arr = array();\n $answers = $this->_applicant->findAnswersByPage($this->_applicationPage->getPage());\n if(isset($answers[$position])){\n $arr[] = $answers[$position]->getChildren()->first()->getPage()->getTitle();\n }\n foreach($this->_applicationPage->getPage()->getChildren() as $child){\n foreach($child->getElements() as $element){\n $element->getJazzeeElement()->setController($this->_controller);\n if(isset($answers[$position]) and $child == $answers[$position]->getChildren()->first()->getPage()){\n $arr[] = $element->getJazzeeElement()->displayValue($answers[$position]->getChildren()->first());\n } else {\n $arr[] = '';\n }\n }\n }\n return $arr;\n }", "title": "" }, { "docid": "243abb9c6082b678bb529c47710538d1", "score": "0.5407806", "text": "public function printCSV(){\r\n if(!empty($this->rows)){\r\n $filename = 'event_dates_'.$this->sourceDateTime->getTimestamp().'.csv';\r\n // create a file pointer\r\n $fp = fopen($filename, 'w');\r\n\r\n // print header by retrieving the keys of the first element in $this->rows array:\r\n $header = array_keys(array_shift(array_values($this->rows)));\r\n fputcsv($fp, $header);\r\n\r\n foreach ($this->rows as $row) {\r\n fputcsv($fp, $row);\r\n }\r\n\r\n fclose($fp);\r\n }\r\n }", "title": "" }, { "docid": "a894f9c78e8957990acec4d70221d2ea", "score": "0.54037195", "text": "public function exportCSV() {\n \n $headers = [\n 'Cache-Control' => 'must-revalidate, post-check=0, pre-check=0'\n , 'Content-type' => 'text/csv'\n , 'Content-Disposition' => 'attachment; filename=yomitaiData.csv'\n , 'Expires' => '0'\n , 'Pragma' => 'public'\n ];\n //Add Headers to each column in the CSV\n $list = Book::all()->toArray();\n array_unshift($list,array_keys($list[0]));\n \n $callback = function() use ($list) {\n $FH = fopen('php://output','w');\n foreach($list as $row) {\n fputcsv($FH, $row);\n }\n fclose($FH);\n };\n\n return response()->stream($callback, 200, $headers);\n \n }", "title": "" }, { "docid": "4b10c2b4ed60ffc328a51e1f4575ce1d", "score": "0.5394293", "text": "function get_report()\r\n{\r\n$fname = 'myCSV.csv';\r\n$fp = fopen($fname,'w');\r\n$column_name = '\"ID\",\"assignment_name\",\"assignment_add1\",\"assignment_add2\",\"assignment_state\",\"assignment_email\",\"assignment_city\",\"assignment_mobile\",\"assignment_gender\",\"assignment_dob\",\"assignment_nl_id\",\"assignment_filename\"'.\"\\n\\r\";\r\nfwrite($fp,$column_name);\t\r\n\t\r\n$SQL=\"SELECT * FROM assignment,city WHERE assignment_city = city_id\";\r\n$rs=mysql_query($SQL);\r\nwhile($data=mysql_fetch_assoc($rs))\r\n{\r\n\t$csvdata=implode(\",\",$data).\"\\n\\r\";\r\n\tfwrite($fp,$csvdata);\t\t\r\n}\r\nfclose($fp);\r\nheader('Content-type: application/csv');\r\nheader(\"Content-Disposition: inline; filename=\".$fname);\r\nreadfile($fname);\r\n}", "title": "" }, { "docid": "9af914b03272738bbfeebccb13859b5c", "score": "0.5388845", "text": "function exportCSV() {\n $data=getFlatLog();\n\t//switchBooleans($data);@deprecated since 1.2.1, MySQL now does this\n //perform validation\n if (empty($data)||!is_array($data))\n return false;\n //actually write csv\n\tif(!is_dir('reportcache'))\n\t\tmkdir('reportcache');//make directory if not existing\n\t$fname=\"reportcache/Volunteer_Log(\".date(\"d-m-Y\").\").csv\";\n\t$file = fopen($fname, \"w\");\n\tif($file){\n\t\tforeach($data as $dataitem){\n\t\t\tif(fputcsv($file,$dataitem)==false){\n\t\t\t\t$rval=false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(!isset($rval))\n\t\t\t$rval=$fname;\n\t}\n\t\tfclose($file);\n\t\tunset($file,$data,$fname);\n\t\treturn $rval;\n}", "title": "" }, { "docid": "ef139b0632c23bfd79d27a216ea81282", "score": "0.5376327", "text": "private function exportar()\n {\n \t//seleciona tudo\n\t\t$dados_fale_conosco = $this->Delegator(\"ConcreteFaleconosco\", \"SelectFaleconoscoExportar\");\n\t\t\n\t\t//Leva o $dados_cadastro para a view\n\t\t$this->View()->assign('dados_fale_conosco', $dados_fale_conosco);\n\t\t\t\n\t\t//exibe a view\n\t\t$this->View()->display('exportar.php');\n }", "title": "" }, { "docid": "61456346a254faf3d7151ee22df2282c", "score": "0.5372723", "text": "function manage_export_main(){\n\n $buf = \"\";\n $buf .= \"<center>\\n\";\n\n $buf .= \"export haruca configurations to file<BR><BR>\\n\";\n $buf .= \"<form method=post name=export action=./haruca_manage.php>\\n\";\n\n $buf .= \"<table>\\n\";\n $buf .= \" <tr><td align=left><input type=checkbox name=haruca checked>haruca configuretion</td>\";\n $buf .= \"<td rowspan=3><button class=\\\"submit_button\\\" value=\\\"export\\\" >export</button></td></tr>\\n\";\n $buf .= \" <tr><td align=left><input type=checkbox name=rtt>rtt</td></tr>\\n\";\n $buf .= \" <tr><td align=left><input type=checkbox name=traplog>trap</td></tr>\\n\";\n $buf .= \" <tr><td align=left><input type=checkbox name=log>latest config</td></tr>\\n\";\n $buf .= \" <tr><td align=left><input type=checkbox name=logold>old config</td></tr>\\n\";\n $buf .= \"</table>\\n\";\n\n $buf .= \"<input type=hidden name=action value=manage_export >\\n\";\n $buf .= \"<input type=hidden name=type value=export>\\n\";\n $buf .= \"</form>\\n\";\n $buf .= \"<br><BR>\\n\";\n\n $buf .= \"import haruca configurations from file\";\n $buf .= \"<form method=post name=import action=./haruca_manage.php enctype=\\\"multipart/form-data\\\">\\n\";\n $buf .= \"<input type=hidden name=action value=manage_export >\\n\";\n $buf .= \"<input type=hidden name=type value=import>\\n\";\n $buf .= \"<input type=file name=importfile >\\n\";\n $buf .= \"<input type=submit value=import OnClick=\\\"return confirm('Execute import all haruca configurations ?')\\\";>\\n\";\n $buf .= \"</form>\\n\";\n\n if(isset($_REQUEST['type']) && ($_REQUEST['type'] === \"import\")){\n if(manage_import_execute()){\n $buf .= \"<BR><BR><H3>import successfuly.</H3><BR>\\n\";\n }else{\n $buf .= \"<BR><BR><H3>import failed.</H3><BR>\\n\";\n }\n }\n\n\n $buf .= \"</center>\\n\";\n\n return $buf;\n}", "title": "" }, { "docid": "69bdf7cd48d00189a5fab2c83eda295c", "score": "0.5363751", "text": "function ExportData() {\n\t\tglobal $frm_u_rep_ta_form_a_1;\n\t\t$utf8 = (strtolower(UP_CHARSET) == \"utf-8\");\n\t\t$bSelectLimit = UP_SELECT_LIMIT;\n\n\t\t// Load recordset\n\t\tif ($bSelectLimit) {\n\t\t\t$this->TotalRecs = $frm_u_rep_ta_form_a_1->SelectRecordCount();\n\t\t} else {\n\t\t\tif ($rs = $this->LoadRecordset())\n\t\t\t\t$this->TotalRecs = $rs->RecordCount();\n\t\t}\n\t\t$this->StartRec = 1;\n\n\t\t// Export all\n\t\tif ($frm_u_rep_ta_form_a_1->ExportAll) {\n\t\t\t$this->DisplayRecs = $this->TotalRecs;\n\t\t\t$this->StopRec = $this->TotalRecs;\n\t\t} else { // Export one page only\n\t\t\t$this->SetUpStartRec(); // Set up start record position\n\n\t\t\t// Set the last record to display\n\t\t\tif ($this->DisplayRecs < 0) {\n\t\t\t\t$this->StopRec = $this->TotalRecs;\n\t\t\t} else {\n\t\t\t\t$this->StopRec = $this->StartRec + $this->DisplayRecs - 1;\n\t\t\t}\n\t\t}\n\t\tif ($bSelectLimit)\n\t\t\t$rs = $this->LoadRecordset($this->StartRec-1, $this->DisplayRecs);\n\t\tif (!$rs) {\n\t\t\theader(\"Content-Type:\"); // Remove header\n\t\t\theader(\"Content-Disposition:\");\n\t\t\t$this->ShowMessage();\n\t\t\treturn;\n\t\t}\n\t\tif ($frm_u_rep_ta_form_a_1->Export == \"xml\") {\n\t\t\t$XmlDoc = new cXMLDocument(UP_XML_ENCODING);\n\t\t} else {\n\t\t\t$ExportDoc = new cExportDocument($frm_u_rep_ta_form_a_1, \"h\");\n\t\t}\n\t\t$ParentTable = \"\";\n\t\tif ($bSelectLimit) {\n\t\t\t$StartRec = 1;\n\t\t\t$StopRec = $this->DisplayRecs;\n\t\t} else {\n\t\t\t$StartRec = $this->StartRec;\n\t\t\t$StopRec = $this->StopRec;\n\t\t}\n\t\tif ($frm_u_rep_ta_form_a_1->Export == \"xml\") {\n\t\t\t$frm_u_rep_ta_form_a_1->ExportXmlDocument($XmlDoc, ($ParentTable <> \"\"), $rs, $StartRec, $StopRec, \"\");\n\t\t} else {\n\t\t\t$sHeader = $this->PageHeader;\n\t\t\t$this->Page_DataRendering($sHeader);\n\t\t\t$ExportDoc->Text .= $sHeader;\n\t\t\t$frm_u_rep_ta_form_a_1->ExportDocument($ExportDoc, $rs, $StartRec, $StopRec, \"\");\n\t\t\t$sFooter = $this->PageFooter;\n\t\t\t$this->Page_DataRendered($sFooter);\n\t\t\t$ExportDoc->Text .= $sFooter;\n\t\t}\n\n\t\t// Close recordset\n\t\t$rs->Close();\n\n\t\t// Export header and footer\n\t\tif ($frm_u_rep_ta_form_a_1->Export <> \"xml\") {\n\t\t\t$ExportDoc->ExportHeaderAndFooter();\n\t\t}\n\n\t\t// Clean output buffer\n\t\tif (!UP_DEBUG_ENABLED && ob_get_length())\n\t\t\tob_end_clean();\n\n\t\t// Write BOM if utf-8\n\t\tif ($utf8 && !in_array($frm_u_rep_ta_form_a_1->Export, array(\"email\", \"xml\")))\n\t\t\techo \"\\xEF\\xBB\\xBF\";\n\n\t\t// Write debug message if enabled\n\t\tif (UP_DEBUG_ENABLED)\n\t\t\techo up_DebugMsg();\n\n\t\t// Output data\n\t\tif ($frm_u_rep_ta_form_a_1->Export == \"xml\") {\n\t\t\theader(\"Content-Type: text/xml\");\n\t\t\techo $XmlDoc->XML();\n\t\t} elseif ($frm_u_rep_ta_form_a_1->Export == \"email\") {\n\t\t\t$this->ExportEmail($ExportDoc->Text);\n\t\t\t$this->Page_Terminate($frm_u_rep_ta_form_a_1->ExportReturnUrl());\n\t\t} elseif ($frm_u_rep_ta_form_a_1->Export == \"pdf\") {\n\t\t\t$this->ExportPDF($ExportDoc->Text);\n\t\t} else {\n\t\t\techo $ExportDoc->Text;\n\t\t}\n\t}", "title": "" }, { "docid": "79dd08b0b5d1be2648e8e414e4093fcb", "score": "0.53614235", "text": "public function actionExportarClicCSV(){\n ini_set('memory_limit','256M'); \n\n $criteria = Yii::app()->getSession()->get(\"comisionesclic\");\n $arrayBalances = Balance::model()->findAll($criteria);\n header( \"Content-Type: text/csv;charset=utf-8\" );\n header('Content-Disposition: attachment; filename=\"Historial-Clic.csv\"');\n $fp = fopen('php://output', 'w'); \n \n fputcsv($fp,array('Fecha', 'Comision', 'Total de Visitas', 'N. Pago Afiliado'),\";\",'\"');\n \n foreach ($arrayBalances as $balance) {\n\n $payps = PayPersonalShopper::model()->findByAttributes(array('affiliatePay_id'=>$balance->orden_id,'user_id'=>$balance->user_id));\n \n $vals = array( date(\"d-m-Y H:i:s\",strtotime($balance->fecha)) , $balance->total, $payps->total_views, $payps->affiliatePay_id);\n fputcsv($fp,$vals,\";\",'\"');\n }\n\n fclose($fp); \n ini_set('memory_limit','128M'); \n Yii::app()->end(); \n }", "title": "" }, { "docid": "6ff7eb081244188f2696d9216ad17066", "score": "0.5356998", "text": "function default_export_filename($course,$category) {\n //Take off some characters in the filename !!\n $takeoff = array(\" \", \":\", \"/\", \"\\\\\", \"|\");\n $export_word = str_replace($takeoff,\"_\",strtolower(get_string(\"exportfilename\",\"quiz\")));\n //If non-translated, use \"export\"\n if (substr($export_word,0,1) == \"[\") {\n $export_word= \"export\";\n }\n\n //Calculate the date format string\n $export_date_format = str_replace(\" \",\"_\",get_string(\"exportnameformat\",\"quiz\"));\n //If non-translated, use \"%Y%m%d-%H%M\"\n if (substr($export_date_format,0,1) == \"[\") {\n $export_date_format = \"%%Y%%m%%d-%%H%%M\";\n }\n\n //Calculate the shortname\n $export_shortname = clean_filename($course->shortname);\n if (empty($export_shortname) or $export_shortname == '_' ) {\n $export_shortname = $course->id;\n }\n\n //Calculate the category name\n $export_categoryname = clean_filename($category->name);\n\n //Calculate the final export filename\n //The export word\n $export_name = $export_word.\"-\";\n //The shortname\n $export_name .= strtolower($export_shortname).\"-\";\n //The category name\n $export_name .= strtolower($export_categoryname).\"-\";\n //The date format\n $export_name .= userdate(time(),$export_date_format,99,false);\n //The extension - no extension, supplied by format\n // $export_name .= \".txt\";\n\n return $export_name;\n}", "title": "" }, { "docid": "5349a88e97bf694073519e2aef0c66dc", "score": "0.53555286", "text": "function export($data_type=false,$dataSets=false){\n\t\tif($dataSets){\n\t\t\theader(\"Content-Type: application/csv\");\n\t\t\theader (\"Content-disposition: attachment; filename={$data_type}_wpec_export.csv\") ;\n\t\t\techo $this->array2csv($dataSets);\n\t\t\texit();\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "2cbbf74be5b9295d88b596782415aa7c", "score": "0.5355502", "text": "function quiz_questions() {\n\n $quiz = get_record('quiz', 'id', $this->mainobject->id);\n $courseid = $quiz->course;\n\n $this->mainobject->get_course_students($quiz->course);\n\n global $CFG, $USER;\n\n //permission to grade?\n //$module = get_record('modules','name',$this->type);\n $coursemodule = get_record('course_modules', 'course', $quiz->course, 'module', $this->mainobject->modulesettings['quiz']->id, 'instance', $quiz->id) ;\n $modulecontext = get_context_instance(CONTEXT_MODULE, $coursemodule->id);\n if (!has_capability($this->capability, $modulecontext, $USER->id)) {\n return;\n }\n\n $csv_sql = \"SELECT questions\n FROM {$CFG->prefix}quiz\n WHERE id = {$this->mainobject->id}\";\n $csv_questions = get_record_sql($csv_sql);\n\n $student_sql = $this->get_role_users_sql($this->mainobject->courses[$courseid]->context);\n \n $sql = \"SELECT qst.id as qstid, qa.userid, qst.event, qs.questionid as id, q.name,\n q.questiontext as description, q.qtype, qa.timemodified\n FROM {$CFG->prefix}question_states qst\n INNER JOIN {$CFG->prefix}question_sessions qs\n ON qs.newest = qst.id\n INNER JOIN {$CFG->prefix}question q\n ON qs.questionid = q.id\n INNER JOIN {$CFG->prefix}quiz_attempts qa\n ON qs.attemptid = qa.uniqueid\n \n WHERE qa.quiz = $quiz->id\n AND qa.timefinish > 0\n AND qa.preview = 0\n AND (qa.userid IN ({$student_sql}))\n AND qs.questionid IN ($csv_questions->questions)\n AND q.qtype = 'essay'\n AND qst.event NOT IN (3,6,9)\n ORDER BY qa.timemodified\";\n\n $question_attempts = get_records_sql($sql);\n\n // not the same as $csv_questions as some of those questions will have no attempts\n // needing attention\n $questions = $this->mainobject->list_assessment_ids($question_attempts);\n\n if (!$this->mainobject->group) {\n\n $group_check = $this->mainobject->try_to_make_group_nodes($question_attempts, 'quiz', $this->mainobject->id, $quiz->course);\n \n if (!$group_check) {\n return;\n }\n }\n\n // begin json object. Why course?? Children treatment?\n $this->mainobject->output = '[{\"type\":\"quiz_question\"}'; \n\n foreach ($questions as $question) {\n\n $count = 0;\n\n foreach ($question_attempts as $question_attempt) {\n if (!isset($question_attempt->userid)) {continue;}\n // if we have come from a group node, ignore attempts where the user is not in the\n // right group. Also ignore attempts not relevant to this question\n $groupnode = $this->mainobject->group;\n //echo 'q: '.$this->mainobject->group.' qu: '.$question_attempt->userid;\n $inrightgroup = $this->mainobject->check_group_membership($this->mainobject->group, $question_attempt->userid);\n $rightquestion = ($question_attempt->id == $question->id);\n //echo $groupnode.' '.$inrightgroup.' '.$rightquestion;\n if (($groupnode && !$inrightgroup) || ! $rightquestion) {\n //continue;\n }\n $count = $count + 1;\n }\n\n if ($count > 0) {\n $name = $question->name;\n $questionid = $question->id;\n $sum = $question->description;\n $sumlength = strlen($sum);\n $shortsum = substr($sum, 0, 100);\n if (strlen($shortsum) < strlen($sum)) {\n $shortsum .= \"...\";\n }\n $length = 30;\n $this->mainobject->output .= ',';\n\n $this->mainobject->output .= '{';\n $this->mainobject->output .= '\"label\":\"'.$this->mainobject->add_icon('question');\n $this->mainobject->output .= '(<span class=\\\"AMB_count\\\">'.$count.'</span>) ';\n $this->mainobject->output .= $this->mainobject->clean_name_text($name, $length).'\",';\n $this->mainobject->output .= '\"name\":\"'.$this->mainobject->clean_name_text($name, $length).'\",';\n $this->mainobject->output .= '\"id\":\"'.$questionid.'\",';\n $this->mainobject->output .= '\"icon\":\"'.$this->mainobject->add_icon('question').'\",';\n\n $this->mainobject->output .= $this->mainobject->group ? '\"group\":\"'.$this->mainobject->group.'\",' : '';\n \n $this->mainobject->output .= '\"assid\":\"qq'.$questionid.'\",';\n $this->mainobject->output .= '\"type\":\"quiz_question\",';\n $this->mainobject->output .= '\"summary\":\"'.$this->mainobject->clean_summary_text($shortsum).'\",';\n $this->mainobject->output .= '\"count\":\"'.$count.'\",';\n $this->mainobject->output .= '\"uniqueid\":\"quiz_question'.$questionid.'\",';\n $this->mainobject->output .= '\"dynamic\":\"true\"';\n $this->mainobject->output .= '}';\n }\n }\n // end JSON array\n $this->mainobject->output .= \"]\"; \n }", "title": "" }, { "docid": "ea75fead49aaf5a38498d42df7f636fb", "score": "0.53492224", "text": "public function exportNewCsvAction()\n {\n if (!$this->getAcl()->canViewNewSubscriptionsReport()) {\n return $this->forwardDenied();\n }\n\n $fileName = 'new_subscriptions.csv';\n $content = $this->getLayout()->createBlock('sheep_subscription/adminhtml_report_subscription_new_grid')->getCsv();\n\n $this->_prepareDownloadResponse($fileName, $content);\n }", "title": "" }, { "docid": "db59873c426bf15832d4c0107cd006c5", "score": "0.534899", "text": "function CSV(){\n\t\t$this->InputCsvSeparator = ';';\n\t\t$this->OutputCsvSeparator = ';';\n\t\t$this->OutputNewLine = 2;\n\t\t$this->CsvFileIn = 'default_in.csv';\n\t\t$this->CsvFileIn = 'default_out.csv';\n\t\t$this->SetInputTableType(); \n\t\t$this->SetOutputTableType(); // Set default output table type 'P'\n\t }", "title": "" }, { "docid": "c02decfc49b4a324fa07342b0a2ae922", "score": "0.5330934", "text": "private function executeCSVforReportAbuse()\n {\n $yesterdayDate=date('Y-m-d',strtotime(\"-1 day\"));\n $reportArray=(new REPORT_ABUSE_LOG)->getReportAbuseLog($yesterdayDate,$yesterdayDate);\n $data=\"REPORTEE,REPORTER,REPORTEE_EMAIL,REPORTER_EMAIL,REASON,OTHER_REASON,DATE\\r\\n\";\n foreach ($reportArray as $key => $value) \n {\n $profileArray[]=$value['REPORTEE'];\n $profileArray[]=$value['REPORTER'];\n # code...\n }\n\n if(is_array($profileArray))\n {\n $profileDetails=(new JPROFILE())->getProfileSelectedDetails($profileArray,\"PROFILEID,EMAIL,USERNAME\");\n foreach ($reportArray as $key => $value) \n {\n\n $data.=\"\\r\\n\".$profileDetails[$value['REPORTEE']]['USERNAME'].\",\".$profileDetails[$value['REPORTER']]['USERNAME'].','.$profileDetails[$value['REPORTEE']]['EMAIL'].','.$profileDetails[$value['REPORTER']]['EMAIL'].','.$value['REASON'].','.str_replace('\"','\"\"',$value['OTHER_REASON']).','.$value['DATE'];\n \n \n }\n }\n \n SendMail::send_email('[email protected],[email protected]',\"Please find the attached CSV file.\",\"Report Abuse Summary for $yesterdayDate\",\"[email protected]\",'','',$data,'','reportAbuse_'.$yesterdayDate.\".csv\");\n }", "title": "" }, { "docid": "6cefae0190a52372d964ff7b5c6f6af1", "score": "0.53238857", "text": "public function saveToBrowser()\n\t{\n\t\t$strContent = $this->prepareContent();\n\n\t\theader('Content-Type: text/csv');\n\t\theader('Content-Transfer-Encoding: binary');\n\t\theader('Content-Disposition: attachment; filename=\"' . $this->strFileName . '.csv\"');\n\t\theader('Content-Length: ' . strlen($strContent));\n\t\theader('Cache-Control: must-revalidate, post-check=0, pre-check=0');\n\t\theader('Pragma: public');\n\t\theader('Expires: 0');\n\n\t\techo $strContent;\n\t\texit;\n\t}", "title": "" } ]
d8f7f05c41b9b3884907cb6eb7e60f83
Check is user profile is filled or not If profile is not filled, notice will be displayed on admin side of Wordpress
[ { "docid": "ad7802e0dfc3b8c9057114eb83259c7c", "score": "0.8243943", "text": "function checkIsProfileFilled() {\n\t\t$blog_owner = $this->getBlogOwnerUser();\n\t\t$current_user = wp_get_current_user();\n\t\t$access_granted = false;\n\t\tif(!function_exists('get_users')) {\n\t\t\t$users = get_users_of_blog();\n\t\t} else {\n\t\t\t$users = get_users();\n\t\t}\n\t\tforeach($users as $user) {\n\t\t\tif($user->ID == $current_user->ID) {\n\t\t\t\t$access_granted = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif((empty($current_user->first_name) || empty($current_user->last_name)) && $access_granted) {\n\t\t\t$this->echoNoticeDiv(''.__('Please edit your profile and fill <b>Firstname</b> and <b>Lastname</b> fields, otherwise some <b>features</b> of LePress are <b>disabled</b>', lepress_textdomain).'. <a href=\"'.admin_url().'profile.php'.'\">'.__('Edit profile', lepress_textdomain).'</a>');\n\t\t} else {\n\t\t\tif(!$access_granted) {\n\t\t\t\t//Not blog owner, maybe needed in future\n\t\t\t}\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "bdb1ae78266f58950a81bf9f781062b9", "score": "0.7354612", "text": "function checkProfileInformation() {\n\t$page = in('page');\n\tif ( strpos($page, 'logout') !== false || strpos($page, 'user') !== false || strpos($page, 'admin') !== false ) {\n\t\treturn true;\n\t}\n\tif ( ! loggedIn() ) {\n\t\treturn true;\n\t}\n\t$nickname = loginNickname();\n\t$nickname = strip_tags( $nickname );\n\t$nickname = trim( $nickname );\n\tif ( empty( $nickname ) || $nickname == '-' || strlen( $nickname ) < 3 ) {\n\t\tConfig::setPage( 'user.profile' );\n\t\tset_page_options( [ 'code' => updateNickname ] );\n\n\t\treturn false;\n\t}\n\n\t$email = login( 'user_email' );\n\tif ( strpos( $email, TEMP_EMAIL_DOMAIN ) !== false ) {\n\t\tConfig::setPage( 'user.profile' );\n\t\tset_page_options( [ 'code' => updateEmail ] );\n\n\t\treturn false;\n\t}\n\n\treturn true;\n}", "title": "" }, { "docid": "59cacf720ed7647f4698dedef0c8df87", "score": "0.6671537", "text": "function MyApp_Profile_Detect()\n {\n $profile=$this->GetCGIVarValue(\"Profile\");\n if (empty($profile))\n {\n $profile=$this->MyApp_Profile_Default();\n }\n\n $this->MyApp_Profile_Set($profile);\n \n\n }", "title": "" }, { "docid": "32d275fc32ab87af446db40067c51c63", "score": "0.6589457", "text": "public static function custom_user_profile_fields( $profileuser ) { \n if(is_admin( )) {\n if($profileuser->roles['0'] == 'tutor') {?>\n <h2><?php echo __( 'Thông tin cá nhân', GS_TEXTDOMAIN ); ?></h2>\n <table class=\"form-table\">\n <tr>\n <th>\n <label><?php echo __( 'Giới tính', GS_TEXTDOMAIN ); ?></label>\n </th>\n <td>\n <input type=\"radio\" name=\"user_gender\" id=\"user_gender_0\" value=\"0\" <?= 0 == get_the_author_meta( 'user_gender', $profileuser->ID ) ? 'checked' : '' ?>><label for=\"user_gender_0\"><?= __('Nam', GS_TEXTDOMAIN ) ?></label>\n <input type=\"radio\" name=\"user_gender\" id=\"user_gender_1\" value=\"1\" <?= 1 == get_the_author_meta( 'user_gender', $profileuser->ID ) ? 'checked' : '' ?>><label for=\"user_gender_1\"><?= __('Nữ', GS_TEXTDOMAIN ) ?></label>\n <input type=\"radio\" name=\"user_gender\" id=\"user_gender_2\" value=\"2\" <?= 2 == get_the_author_meta( 'user_gender', $profileuser->ID ) ? 'checked' : '' ?>><label for=\"user_gender_2\"><?= __('Khác', GS_TEXTDOMAIN ) ?></label>\n </td>\n </tr>\n <tr>\n <th>\n <label for=\"user_phone\"><?php echo __( 'Số điện thoại', GS_TEXTDOMAIN ); ?></label>\n </th>\n <td>\n <input type=\"text\" name=\"user_phone\" id=\"user_phone\" value=\"<?php echo esc_attr( get_the_author_meta( 'user_phone', $profileuser->ID ) ); ?>\" class=\"regular-text\" />\n </td>\n </tr>\n <tr>\n <th>\n <label for=\"user_birth\"><?php echo __( 'Ngày tháng năm sinh', GS_TEXTDOMAIN ); ?></label>\n </th>\n <td>\n <input type=\"date\" name=\"user_birth\" id=\"user_birth\" value=\"<?php echo esc_attr( get_the_author_meta( 'user_birth', $profileuser->ID ) ); ?>\" class=\"regular-text\" />\n </td>\n </tr>\n <tr>\n <th>\n <label for=\"user_train_province\"><?php echo __( 'Tỉnh/thành', GS_TEXTDOMAIN ); ?></label>\n </th>\n <td>\n <select name=\"user_train_province\" id=\"user_train_province\" class=\"regular-text\" value=\"<?php echo esc_attr( get_the_author_meta( 'user_train_province', $profileuser->ID ) ); ?>\">\n \n </select>\n </td>\n </tr>\n <tr>\n <th>\n <label for=\"user_train_district\"><?php echo __( 'Quận/huyện', GS_TEXTDOMAIN ); ?></label>\n </th>\n <td>\n <select name=\"user_train_district\" id=\"user_train_district\" class=\"regular-text\" value=\"<?php echo esc_attr( get_the_author_meta( 'user_train_district', $profileuser->ID ) ); ?>\">\n \n </select>\n </td>\n </tr>\n <tr>\n <th>\n <label for=\"user_address\"><?php echo __( 'Địa chỉ hiện tại', GS_TEXTDOMAIN ); ?></label>\n </th>\n <td>\n <textarea type=\"text\" rows=\"5\" name=\"user_address\" id=\"user_address\" class=\"regular-text\" ><?php echo esc_attr( get_the_author_meta( 'user_address', $profileuser->ID ) ); ?></textarea>\n <p>số nhà, ngách A, ngõ B, thôn C, xã D</p>\n </td>\n </tr>\n </table>\n <h2><?php echo __( 'Thông tin gia sư', GS_TEXTDOMAIN ); ?></h2>\n <table class=\"form-table\">\n <tr>\n <th>\n <label for=\"user_tutor_exp\"><?php echo __( 'Kinh nghiệm đi gia sư và giảng dạy ( chi tiết )', GS_TEXTDOMAIN ); ?></label>\n </th>\n <td>\n <textarea type=\"text\" rows=\"5\" name=\"user_tutor_exp\" id=\"user_tutor_exp\" class=\"regular-text\" ><?php echo esc_attr( get_the_author_meta( 'user_tutor_exp', $profileuser->ID ) ); ?></textarea>\n </td>\n </tr>\n <tr>\n <th>\n <label for=\"user_tutor_awards\"><?php echo __( 'Thành tích học tập và dạy học ( chi tiết )', GS_TEXTDOMAIN ); ?></label>\n </th>\n <td>\n <textarea type=\"text\" rows=\"5\" name=\"user_tutor_awards\" id=\"user_tutor_awards\" class=\"regular-text\" ><?php echo esc_attr( get_the_author_meta( 'user_tutor_awards', $profileuser->ID ) ); ?></textarea>\n </td>\n </tr>\n </table>\n <!-- <h2><?php // echo __( 'Hồ sơ chuyên môn', GS_TEXTDOMAIN ); ?></h2> -->\n <table class=\"form-table\">\n <!-- <tr>\n <th>\n <label for=\"user_prof_role\"><?php echo __( 'Bạn đang là ...', GS_TEXTDOMAIN ); ?></label>\n </th>\n <td>\n <?php \n // $prof_roles = array_map(function($item) {\n // return rtrim(ltrim($item, \" \"), \" \");\n // }, explode(';', get_option('gs_options')['tutor_roles']));\n ?>\n <select name=\"user_prof_role\" id=\"user_prof_role\" class=\"regular-text\" value=\"<?php // echo esc_attr( get_the_author_meta( 'user_prof_role', $profileuser->ID ) ); ?>\">\n <?php // foreach($prof_roles as $prole) : ?>\n <option value=\"<?php // echo $prole ?>\" <?php // echo $prole == get_the_author_meta( 'user_prof_role', $profileuser->ID ) ? \"selected\" : \"\" ?>><?php // echo $prole ?></option>\n <?php // endforeach ?>\n </select>\n </td>\n </tr>\n <tr>\n <th>\n <label for=\"user_prof_format\"><?php // echo __( 'Hình thức dạy', GS_TEXTDOMAIN ); ?></label>\n </th>\n <td>\n <?php \n // $prof_formats = array_map(function($item) {\n // return rtrim(ltrim($item, \" \"), \" \");\n // }, explode(';', get_option('gs_options')['tutor_formats']));\n ?>\n <select name=\"user_prof_format\" id=\"user_prof_format\" class=\"regular-text\" value=\"<?php // echo esc_attr( get_the_author_meta( 'user_prof_format', $profileuser->ID ) ); ?>\">\n <?php // foreach($prof_formats as $pformat) : ?>\n <option value=\"<?php // echo $pformat ?>\" <?php // echo $pformat == get_the_author_meta( 'user_prof_format', $profileuser->ID ) ? \"selected\" : \"\" ?>><?php // echo $pformat ?></option>\n <?php // endforeach ?>\n </select>\n </td>\n </tr>\n <tr>\n <th>\n <label for=\"user_prof_price\"><?php // echo __( 'Học phí (vnđ/buổi)', GS_TEXTDOMAIN ); ?></label>\n </th>\n <td>\n <input type=\"number\" name=\"user_prof_price\" id=\"user_prof_price\" value=\"<?php // echo esc_attr( get_the_author_meta( 'user_prof_price', $profileuser->ID ) ); ?>\" class=\"regular-text\" />\n </td>\n </tr> -->\n <tr>\n <th>\n <label for=\"user_prof_subject\"><?php echo __( 'Môn học sẽ dạy', GS_TEXTDOMAIN ); ?></label>\n </th>\n <?php \n $terms = get_terms( array(\n 'taxonomy' => 'class_subject',\n 'hide_empty' => false,\n\n ) );\n $subs = get_the_author_meta( 'user_prof_subject', $profileuser->ID );\n \n ?>\n <td class=\"inline-block\">\n <?php foreach($terms as $key => $term) : ?>\n <div class=\"subjects-checkbox\">\n <input <?= in_array($term->term_id, is_array($subs) ? $subs : array()) ? \"checked\" : \"\" ?> type=\"checkbox\" name=\"user_prof_subject[]\" id=\"user_prof_subject<?= $term->term_id ?>\" value=\"<?= $term->term_id ?>\">\n <label for=\"user_prof_subject<?= $term->term_id ?>\"><?= $term->name ?></label>\n </div>\n <?php endforeach ?>\n </td>\n </tr>\n <!-- <tr>\n <th>\n <label for=\"user_prof_classes\"><?php // echo __( 'Số lớp đã dạy', GS_TEXTDOMAIN ); ?></label>\n </th>\n <td>\n <input type=\"number\" name=\"user_prof_classes\" id=\"useuser_prof_classesr_prof_price\" value=\"<?php // echo esc_attr( get_the_author_meta( 'user_prof_classes', $profileuser->ID ) ); ?>\" class=\"regular-text\" />\n </td>\n </tr>\n <tr>\n <th>\n <label for=\"user_prof_schedule\"><?php // echo __( 'Thời gian giảng dạy', GS_TEXTDOMAIN ); ?></label>\n </th>\n <td>\n <ul>\n <?php \n // $user_prof_schedule = get_the_author_meta( 'user_prof_schedule', $profileuser->ID );\n // if(isset($user_prof_schedule) && is_array($user_prof_schedule)){\n // foreach($user_prof_schedule as $prof_schedule) {\n ?>\n <li><?php // echo $prof_schedule['user_schedule_day'].\" -- \".$prof_schedule['user_schedule_start'].\" - \".$prof_schedule['user_schedule_end'] ?></li>\n <?php // }}else{ ?>\n <p>Gia sư chưa cập nhật thông tin này</p>\n <?php // } ?>\n </ul>\n </td>\n </tr> -->\n </table>\n <h2><?php echo __( 'Ảnh hồ sơ', GS_TEXTDOMAIN ); ?></h2>\n <table class=\"form-table\">\n <!-- <tr>\n <th>\n <label for=\"user_prof_id_card\"><?php // echo __( 'Ảnh CMT/Căn cước/Hộ chiếu', GS_TEXTDOMAIN ); ?></label>\n </th>\n <td>\n <?php \n // if( get_field( 'user_prof_id_card', 'user_'. $profileuser->ID ) != \"\") {\n // $id_cards = get_field( 'user_prof_id_card', 'user_'. $profileuser->ID );\n // foreach($id_cards as $card) {\n // ?>\n // <img src=\"<?php // echo $card['url'] ?>\" alt=\"<?php // echo $card['title'] ?>\" class=\"photo\" height=\"96\">\n // <?php\n // }\n // }else{\n // ?>\n // <p>Gia sư chưa cập nhật thông tin này</p>\n // <?php\n // }\n ?>\n </td>\n </tr> -->\n <tr>\n <th>\n <label for=\"user_prof_certificate\"><?php echo __( 'Thẻ sinh viên/bằng/chứng chỉ', GS_TEXTDOMAIN ); ?></label>\n </th>\n <td>\n <?php \n if( get_field( 'user_prof_certificate', 'user_'. $profileuser->ID ) != \"\") {\n $id_cards = get_field( 'user_prof_certificate', 'user_'. $profileuser->ID );\n foreach($id_cards as $card) {\n ?>\n <img src=\"<?= $card['url'] ?>\" alt=\"<?= $card['title'] ?>\" class=\"photo\" height=\"96\">\n <?php\n }\n }else{\n ?>\n <p>Gia sư chưa cập nhật thông tin này</p>\n <?php\n }\n ?>\n </td>\n </tr>\n <tr>\n <th>\n <label for=\"user_prof_activation\"><?php echo __( 'Ảnh hoạt động', GS_TEXTDOMAIN ); ?></label>\n </th>\n <td>\n <?php \n if( get_field( 'user_prof_activation', 'user_'. $profileuser->ID ) != \"\") {\n $id_cards = get_field( 'user_prof_activation', 'user_'. $profileuser->ID );\n foreach($id_cards as $card) {\n ?>\n <img src=\"<?= $card['url'] ?>\" alt=\"<?= $card['title'] ?>\" class=\"photo\" height=\"96\">\n <?php\n }\n }else{\n ?>\n <p>Gia sư chưa cập nhật thông tin này</p>\n <?php\n }\n ?>\n </td>\n </tr>\n </table>\n <h2><?php// echo __( 'Thông tin khác', GS_TEXTDOMAIN ); ?></h2>\n <!-- <table class=\"form-table\">\n <tr>\n <th>\n <label for=\"user_prof_intro_video\"><?php // echo __( 'Video giới thiệu', GS_TEXTDOMAIN ); ?></label>\n </th>\n <td>\n <?php \n // if(get_the_author_meta( 'user_prof_intro_video', $profileuser->ID ) != \"\") {\n // ?>\n // <iframe width=\"560\" height=\"315\" src=\"<?php // echo esc_attr( get_the_author_meta( 'user_prof_intro_video', $profileuser->ID ) ); ?>\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>\n // <?php\n // }else{\n // ?>\n // <p>Gia sư chưa cập nhật thông tin này</p>\n // <?php\n // }\n ?>\n </td>\n </tr>\n </table> -->\n <?php }} else {\n ?>\n <h2><?php echo __( 'Thông tin cá nhân', GS_TEXTDOMAIN ); ?></h2>\n <p class=\"form-user_gender\">\n <label><?php echo __( 'Giới tính', GS_TEXTDOMAIN ); ?></label>\n <span class=\"display-flex\">\n <input type=\"radio\" name=\"user_gender\" id=\"user_gender_0\" value=\"0\" <?= 0 == get_the_author_meta( 'user_gender', $profileuser->ID ) ? 'checked' : '' ?>><label for=\"user_gender_0\"><?= __('Nam', GS_TEXTDOMAIN ) ?></label>\n <input type=\"radio\" name=\"user_gender\" id=\"user_gender_1\" value=\"1\" <?= 1 == get_the_author_meta( 'user_gender', $profileuser->ID ) ? 'checked' : '' ?>><label for=\"user_gender_1\"><?= __('Nữ', GS_TEXTDOMAIN ) ?></label>\n <input type=\"radio\" name=\"user_gender\" id=\"user_gender_2\" value=\"2\" <?= 2 == get_the_author_meta( 'user_gender', $profileuser->ID ) ? 'checked' : '' ?>><label for=\"user_gender_2\"><?= __('Khác', GS_TEXTDOMAIN ) ?></label>\n </span>\n </p>\n <p class=\"form-user_phone\">\n <label for=\"user_phone\"><?php echo __( 'Số điện thoại', GS_TEXTDOMAIN ); ?> <span class=\"required\">*</span></label>\n <input type=\"text\" name=\"user_phone\" id=\"user_phone\" value=\"<?php echo esc_attr( get_the_author_meta( 'user_phone', $profileuser->ID ) ); ?>\" class=\"regular-text\" required />\n </p>\n <p class=\"form-user_birth\">\n <label for=\"user_birth\"><?php echo __( 'Ngày tháng năm sinh', GS_TEXTDOMAIN ); ?> <span class=\"required\">*</span></label>\n <input type=\"date\" name=\"user_birth\" id=\"user_birth\" value=\"<?php echo esc_attr( get_the_author_meta( 'user_birth', $profileuser->ID ) ); ?>\" class=\"regular-text\" required />\n </p>\n <p class=\"form-user_train_province\">\n <label for=\"user_train_province\"><?php echo __( 'Tỉnh/thành', GS_TEXTDOMAIN ); ?></label>\n <select name=\"user_train_province\" id=\"user_train_province\" class=\"regular-text\" value=\"<?php echo esc_attr( get_the_author_meta( 'user_train_province', $profileuser->ID ) ); ?>\">\n \n </select>\n </p>\n <p class=\"form-user_train_district\">\n <label for=\"user_train_district\"><?php echo __( 'Quận/huyện', GS_TEXTDOMAIN ); ?></label>\n <select name=\"user_train_district\" id=\"user_train_district\" class=\"regular-text\" value=\"<?php echo esc_attr( get_the_author_meta( 'user_train_district', $profileuser->ID ) ); ?>\">\n \n </select>\n </p>\n <p class=\"form-user_address\">\n <label for=\"user_address\"><?php echo __( 'Địa chỉ hiện tại', GS_TEXTDOMAIN ); ?></label>\n <textarea type=\"text\" rows=\"5\" name=\"user_address\" id=\"user_address\" class=\"regular-text\" ><?php echo esc_attr( get_the_author_meta( 'user_address', $profileuser->ID ) ); ?></textarea>\n <p>gia sư ghi rõ: số nhà, ngõ ngách, phường(xã) ( để định vị lớp gần bạn cho chính xác )</p>\n </p>\n <h2><?php echo __( 'Thông tin gia sư', GS_TEXTDOMAIN ); ?></h2>\n <p>\n <label for=\"user_tutor_exp\"><?php echo __( 'Gia sư trường nào ? Kinh Nghiệm ra sao ? ( chi tiết )', GS_TEXTDOMAIN ); ?></label>\n <textarea type=\"text\" rows=\"5\" name=\"user_tutor_exp\" id=\"user_tutor_exp\" class=\"regular-text\" ><?php echo esc_attr( get_the_author_meta( 'user_tutor_exp', $profileuser->ID ) ); ?></textarea>\n </p>\n <p>\n <label for=\"user_tutor_awards\"><?php echo __( 'Thành tích học tập và dạy học ( chi tiết )', GS_TEXTDOMAIN ); ?></label>\n <textarea type=\"text\" rows=\"5\" name=\"user_tutor_awards\" id=\"user_tutor_awards\" class=\"regular-text\" ><?php echo esc_attr( get_the_author_meta( 'user_tutor_awards', $profileuser->ID ) ); ?></textarea>\n </p>\n <!-- <h2><?php // echo __( 'Hồ sơ chuyên môn', GS_TEXTDOMAIN ); ?></h2> -->\n <!-- <p>\n <label for=\"user_prof_role\"><?php // echo __( 'Bạn đang là ...', GS_TEXTDOMAIN ); ?></label>\n <?php \n // $prof_roles = array_map(function($item) {\n // return rtrim(ltrim($item, \" \"), \" \");\n // }, explode(';', get_option('gs_options')['tutor_roles']));\n ?>\n <select name=\"user_prof_role\" id=\"user_prof_role\" class=\"regular-text\" value=\"<?php echo esc_attr( get_the_author_meta( 'user_prof_role', $profileuser->ID ) ); ?>\">\n <?php // foreach($prof_roles as $prole) : ?>\n <option value=\"<?php // $prole ?>\" <?php // $prole == get_the_author_meta( 'user_prof_role', $profileuser->ID ) ? \"selected\" : \"\" ?>><?= $prole ?></option>\n <?php // endforeach ?>\n </select>\n </p>\n <p>\n <label for=\"user_prof_format\"><?php // echo __( 'Hình thức dạy', GS_TEXTDOMAIN ); ?></label>\n <?php \n // $prof_formats = array_map(function($item) {\n // return rtrim(ltrim($item, \" \"), \" \");\n // }, explode(';', get_option('gs_options')['tutor_formats']));\n ?>\n <select name=\"user_prof_format\" id=\"user_prof_format\" class=\"regular-text\" value=\"<?php // echo esc_attr( get_the_author_meta( 'user_prof_format', $profileuser->ID ) ); ?>\">\n <?php // foreach($prof_formats as $pformat) : ?>\n <option value=\"<?php // echo $pformat ?>\" <?php // $pformat == get_the_author_meta( 'user_prof_format', $profileuser->ID ) ? \"selected\" : \"\" ?>><?php // echo $pformat ?></option>\n <?php // endforeach ?>\n </select>\n </p>\n <p>\n <label for=\"user_prof_price\"><?php // echo __( 'Học phí (vnđ/buổi)', GS_TEXTDOMAIN ); ?></label>\n <input type=\"number\" name=\"user_prof_price\" id=\"user_prof_price\" value=\"<?php // echo esc_attr( get_the_author_meta( 'user_prof_price', $profileuser->ID ) ); ?>\" class=\"regular-text\" />\n </p> -->\n <p>\n <label for=\"user_prof_subject\"><?php echo __( 'Môn học sẽ dạy', GS_TEXTDOMAIN ); ?></label>\n <?php \n $terms = get_terms( array(\n 'taxonomy' => 'class_subject',\n 'hide_empty' => false,\n\n ) );\n $subs = get_the_author_meta( 'user_prof_subject', $profileuser->ID ); \n ?>\n <?php foreach($terms as $key => $term) : ?>\n <span class=\"subjects-checkbox\">\n <input <?= in_array($term->term_id, is_array($subs) ? $subs : array()) ? \"checked\" : \"\" ?> type=\"checkbox\" name=\"user_prof_subject[]\" id=\"user_prof_subject<?php echo $term->term_id ?>\" value=\"<?php echo $term->term_id ?>\">\n <label for=\"user_prof_subject<?php echo $term->term_id ?>\"><?php echo $term->name ?></label>\n </span>\n <?php endforeach ?>\n </p>\n <!-- <p>\n <label for=\"user_prof_classes\"><?php // echo __( 'Số lớp đã dạy', GS_TEXTDOMAIN ); ?></label>\n <input type=\"number\" name=\"user_prof_classes\" id=\"useuser_prof_classesr_prof_price\" value=\"<?php // echo esc_attr( get_the_author_meta( 'user_prof_classes', $profileuser->ID ) ); ?>\" class=\"regular-text\" />\n </p>\n <p>\n <label for=\"user_prof_schedule\"><?php // echo __( 'Thời gian giảng dạy', GS_TEXTDOMAIN ); ?></label>\n <table id=\"class_schedule_table\">\n <thead>\n <tr>\n <th width=\"5%\"></th>\n <th width=\"30%\">Thời gian</th>\n <th width=\"30%\">Bắt đầu</th>\n <th width=\"30%\">Kết thúc</th>\n <th width=\"5%\"></th>\n </tr>\n </thead>\n \n <?php \n // $repeatable_fields = get_the_author_meta('user_prof_schedule', $profileuser->ID);\n // wp_nonce_field('hhs_repeatable_meta_box_nonce', 'hhs_repeatable_meta_box_nonce'); \n // $days_of_week = array('Thứ 2', 'Thứ 3', 'Thứ 4', 'Thứ 5', 'Thứ 6', 'Thứ 7', 'Chủ nhật');\n ?>\n <?php //if ($repeatable_fields) :\n //foreach ($repeatable_fields as $field) : ?>\n <tr class=\"form-row\">\n <td>\n <a href=\"javascript:void(0)\" onclick=\"insertRepeaterRow(this)\"><i class=\"dashicons-before dashicons-insert\"></i></a>\n </td>\n <td class=\"width: 50%\">\n <select class=\"regular-text form-control class_schedule_day\" name=\"user_schedule_day[]\" value=\"<?php // echo $field['user_schedule_day'] ?>\">\n <?php //foreach($days_of_week as $key => $day) : ?>\n <option value=\"<?php // echo $day ?>\"<?php // echo $day == $field['user_schedule_day'] ? \"selected\" : \"\"?>><?php // echo $day ?></option>\n <?php //endforeach ?>\n </select>\n </td>\n <td>\n <input class=\"regular-text form-control class_schedule_start\" type=\"time\" name=\"user_schedule_start[]\" value=\"<?php // echo $field['user_schedule_start'] ?>\">\n </td>\n <td>\n <input class=\"regular-text form-control class_schedule_end\" type=\"time\" name=\"user_schedule_end[]\" value=\"<?php // echo $field['user_schedule_end'] ?>\">\n </td>\n <td>\n <a href=\"javascript:void(0)\" onclick=\"removeRepeaterRow(this)\"><i class=\"dashicons-before dashicons-dismiss\"></i></a>\n </td>\n </tr>\n <?php // endforeach ?>\n <?php // else : ?>\n <tr class=\"form-row\">\n <td>\n <a href=\"javascript:void(0)\" onclick=\"insertRepeaterRow(this)\"><i class=\"dashicons-before dashicons-insert\"></i></a>\n </td>\n <td class=\"width: 50%\">\n <select class=\"regular-text form-control class_schedule_day\" name=\"user_schedule_day[]\">\n <?php //foreach($days_of_week as $key => $day) : ?>\n <option value=\"<?php // $day ?>\"><?php // $day ?></option>\n <?php //endforeach ?>\n </select>\n </td>\n <td>\n <input class=\"regular-text form-control class_schedule_start\" type=\"time\" name=\"user_schedule_start[]\">\n </td>\n <td>\n <input class=\"regular-text form-control class_schedule_end\" type=\"time\" name=\"user_schedule_end[]\">\n </td>\n <td>\n <a href=\"javascript:void(0)\" onclick=\"removeRepeaterRow(this)\"><i class=\"dashicons-before dashicons-dismiss\"></i></a>\n </td>\n </tr>\n <?php // endif ?>\n </table>\n </p> -->\n \n <!-- <h2><?php // echo __( 'Thông tin khác', GS_TEXTDOMAIN ); ?></h2>\n <p>\n <label for=\"user_prof_intro_video\"><?php // echo __( 'Video giới thiệu', GS_TEXTDOMAIN ); ?></label>\n <input type=\"text\" name=\"user_prof_intro_video\" id=\"user_prof_intro_video\" value=\"<?php // echo esc_attr( get_the_author_meta( 'user_prof_intro_video', $profileuser->ID ) ); ?>\" class=\"regular-text\" />\n <?php //if(get_the_author_meta( 'user_prof_intro_video', $profileuser->ID ) != \"\") { ?>\n <iframe width=\"560\" height=\"315\" src=\"<?php // echo esc_attr( get_the_author_meta( 'user_prof_intro_video', $profileuser->ID ) ); ?>\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>\n <?php //}else{ ?>\n <p>Gia sư chưa cập nhật thông tin này</p>\n <?php //} ?>\n </p> -->\n <?php\n }}", "title": "" }, { "docid": "35201075c05cf7827e8c6af65cc25985", "score": "0.6575415", "text": "function ash_user_profile_form() {\n\n if(is_user_logged_in()) {\n \n global $ash_load_css;\n \n // set this to true so the CSS is loaded\n $ash_load_css = true;\n\n $output = ash_user_profile_form_fields();\n\n return $output;\n }else{\n echo '<p>You are not logged in so you can not edit your profile.</p>';\n }\n}", "title": "" }, { "docid": "6ef617d56650f3ee2ce65388f1cdf6f3", "score": "0.65177566", "text": "function MyApp_Profile_MayBecomeAdmin()\n {\n $res=FALSE;\n\n if ($this->LoginID>0)\n {\n if ($this->LoginData[ \"Profile_Admin\" ]==2)\n {\n $res=TRUE;\n }\n }\n\n return $res;\n }", "title": "" }, { "docid": "15a09bcbaf53f35d0f7c442dd732694d", "score": "0.6489226", "text": "function my_save_extra_profile_fields( $user_id ) {\n if ( !current_user_can( 'edit_user', $user_id ) )\n return false;\n if(isset($_POST['display_on_homepage_footer'])){\n update_user_meta( $user_id, 'display_on_homepage_footer', $_POST['display_on_homepage_footer'] );\n }else{\n update_user_meta( $user_id, 'display_on_homepage_footer',0 );\n }\n\n \n}", "title": "" }, { "docid": "6f186768346b335e96f398eac48d7583", "score": "0.6456444", "text": "public function userHasCompletedProfile(){\n \t\n \t# create empty error array\n \t$aErrors = array();\n\n \t# get the userinfo\n \t$result = $this->oUser->getUserInfo();\n\n // echo \"<pre>\";\n // var_dump($result);\n // exit;\n \n \t# error checking\n \t if(! $result['lang'])\n $aErrors[\"lang\"] = true;\n \n if(! $result['firstname'])\n $aErrors[\"firstname\"] = true;\n\n if(! $result['lastname'])\n $aErrors[\"lastname\"] = true;\n\n \treturn $aErrors;\n }", "title": "" }, { "docid": "f4b562b20a802ccdaffe0d6f47fa4cb2", "score": "0.63942677", "text": "public function show_admin_notices() {\r\n $options = get_option( $this->get_settings_field_name() );\r\n\r\n if ( !$options || ! isset( $options['uname'] ) || ! isset( $options['pkey'] ) ||\r\n $options['uname'] == '' || $options['pkey'] == '' ) {\r\n\r\n $msg = __( 'Please enter your UserName and Purchaed key to enable Automatic updates to %s.', $this->text_domain );\r\n $msg = sprintf( $msg, $this->product_name );\r\n ?> <div class=\"update-nag\">\r\n <p><?php echo $msg; ?></p>\r\n <p><a href=\"<?php echo admin_url( 'edit.php?post_type=cmc&page=' . $this->get_settings_page_slug() ); ?>\">\r\n <?php _e( 'Complete the setup now.', $this->text_domain ); ?>\r\n </a></p>\r\n </div>\r\n <?php\r\n }\r\n }", "title": "" }, { "docid": "a544b6e16f784c68ebb6566267891d2f", "score": "0.6387905", "text": "public static function display_user_profile() {\n $settings = fusion_get_settings();\n $userFields = new UserFields();\n $userFields->postName = \"register\";\n $userFields->postValue = self::$locale['u101'];\n $userFields->displayValidation = $settings['display_validation'];\n $userFields->displayTerms = $settings['enable_terms'];\n $userFields->plugin_folder = [INCLUDES.\"user_fields/\", INFUSIONS];\n $userFields->plugin_locale_folder = LOCALE.LOCALESET.\"user_fields/\";\n $userFields->showAdminPass = FALSE;\n $userFields->skipCurrentPass = TRUE;\n $userFields->registration = FALSE;\n $userFields->userData = self::$user_data;\n $userFields->method = 'display';\n $userFields->display_profile_output();\n }", "title": "" }, { "docid": "c2b1d494925c40cfe1935811bc4a4f5b", "score": "0.6361177", "text": "function _hrb_disable_admin_profile_edit() {\n\n\tif ( ! defined('IS_PROFILE_PAGE') ) {\n\t\treturn;\n\t}\n\n\tif ( current_user_can('edit_users') ) {\n\t\treturn;\n\t}\n\n\twp_redirect( appthemes_get_edit_profile_url() );\n\texit;\n}", "title": "" }, { "docid": "88c7e8026dd2cc864bbd09c07db58b92", "score": "0.63559467", "text": "function appProfileRegisteredCheck() {\n $profile = jsonLoadProfile();\n if (is_null($profile->username)) { return false; }\n if (is_null($profile->password)) { return false; }\n return true;\n}", "title": "" }, { "docid": "cff136a5bf11d30166e3c82c21e23eb5", "score": "0.6349248", "text": "function pmproio_show_extra_profile_fields($user)\r\n{\t\r\n?>\r\n\t<h3><?php _e('Invite Codes', 'pmpro');?></h3>\r\n \r\n\t<table class=\"form-table\">\r\n \r\n\t\t<tr>\r\n\t\t\t<th><?php _e('Invite Code', 'pmpro');?></th>\t\t\t\r\n\t\t\t<td>\r\n\t\t\t\t<input type=\"text\" name=\"invite_code\" value=\"<?php echo esc_attr($user->pmpro_invite_code);?>\" />\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<th><?php _e('Invite Code Used at Signup', 'pmpro');?></th>\r\n\t\t\t<td>\r\n\t\t\t\t<?php \r\n\t\t\t\t\t$invite_code_used = $user->pmpro_invite_code_at_signup;\r\n\t\t\t\t\tif(empty($invite_code_used))\r\n\t\t\t\t\t\techo \"N/A\";\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\techo $invite_code_used;\r\n\t\t\t\t?>\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t\t\r\n\t</table>\r\n<?php\r\n}", "title": "" }, { "docid": "20066d985cdf3414f7efe49867feaa31", "score": "0.6347539", "text": "function admin_default_page_register() {\n if (!empty($_GET['registered'])) {\n if($_GET['registered']){\n $user = wp_get_current_user();\n $roles = $user->roles;\n if(in_array(\"owner\",$roles)){\n /** check if user logged first time **/\n $track_user_login_status = get_user_meta($user->ID,\"track_user_login_status\", true);\n if($track_user_login_status){\n $useurl = home_url().'/dashboard/';\n wp_redirect($useurl);\n exit;\n }else{\n $useurl = home_url().'/signup-flow'; \n update_user_meta($user->ID,\"track_user_login_status\", 1);\n wp_redirect($useurl);\n exit;\n }\n }else{\n $useurl = home_url().'/dashboard/';\n wp_redirect($useurl);\n exit;\n }\n }\n }\n}", "title": "" }, { "docid": "0ccdfad08121b8348ff14e2ba2e6d0ae", "score": "0.6340037", "text": "function ash_edit_profile_form() {\n\n if(is_user_logged_in()) {\n \n global $ash_load_css;\n \n // set this to true so the CSS is loaded\n $ash_load_css = true;\n\n $output = ash_edit_profile_form_fields();\n\n return $output;\n }else{\n echo '<p>You are not logged in so you can not edit your profile.</p>';\n }\n}", "title": "" }, { "docid": "b9525be86e66f56911861db162a10845", "score": "0.63373375", "text": "public function check_meta() {\n\t\tif ( ! empty( get_user_meta( get_current_user_id(), 'calypsoify', true ) ) ) {\n\t\t\tdelete_user_meta( get_current_user_id(), 'calypsoify' );\n\t\t}\n\t}", "title": "" }, { "docid": "d15741390e1ac5aa6cd6ed007212c724", "score": "0.63318515", "text": "public function can_edit_profile() {\n return false;\n }", "title": "" }, { "docid": "4833031b6cf52e4585546576aa9794f9", "score": "0.63203603", "text": "function _for_user_profile() {\n\t\treturn '';\n\t}", "title": "" }, { "docid": "344a7cc4e545f174634dfb65bd38e790", "score": "0.63135743", "text": "function fn_check_permission_manage_own_profile()\n{\n if (Registry::get('runtime.controller') == 'profiles' && Registry::get('runtime.mode') == 'update') {\n return empty($_REQUEST['user_id']) || $_REQUEST['user_id'] == Tygh::$app['session']['auth']['user_id'];\n } elseif (Registry::get('runtime.controller') == 'auth' && Registry::get('runtime.mode') == 'password_change') {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "673da9b767d5dec4a9ea9258b51d3f30", "score": "0.6310874", "text": "public function testUpdateProfileRequiredFields()\n {\n if (config('access.users.change_email')) {\n $this->actingAs($this->user)\n ->visit('/account')\n ->type('', 'first_name')\n ->type('', 'last_name')\n ->type('', 'email')\n ->press('update-profile')\n ->seePageIs('/account')\n ->see('The first name field is required.')\n ->see('The last name field is required.')\n ->see('The email field is required.');\n } else {\n $this->actingAs($this->user)\n ->visit('/account')\n ->type('', 'first_name')\n ->type('', 'last_name')\n ->press('update-profile')\n ->seePageIs('/account')\n ->see('The first name field is required.')\n ->see('The last name field is required.');\n }\n }", "title": "" }, { "docid": "46c1d947b763548d1ab288d5f7919db6", "score": "0.6264736", "text": "function showProfile() \r\n{\r\n global $tic;\r\n\r\n $user = $tic->mod['Auth']->getActiveUser();\r\n if (isset($_POST['profile_post'])) {\r\n $user->setAuthnick($_POST['auth']);\r\n $user->setScantyp($_POST['scantyp']);\r\n $user->setHighlight($_POST['highlight']);\r\n $user->setSvs($_POST['svs']);\r\n $user->setElokas($_POST['elokas']);\r\n $user->setTelnr($_POST['tel']);\r\n $user->setTelnrComment($_POST['tel_com']);\r\n if (isset($_POST['tel_vis']))\r\n $user->setTelnrVisibility($_POST['tel_vis']);\r\n $user->setICQ($_POST['icq']);\r\n $user->setJabber($_POST['jabber']);\r\n if (isset($_POST['timeformat']))\r\n $user->setTimeformat($_POST['timeformat']);\r\n }\r\n\r\n //refresh //FIXME: shouldn't be needed\r\n $user = $tic->mod['Auth']->getActiveUser();\r\n\r\n $tic->mod['UserMan']->setVar('user', $user);\r\n $tic->mod['UserMan']->setTemplate('userman_profil.tpl');\r\n}", "title": "" }, { "docid": "ded19f84ddcccfd1232bb5bf25894819", "score": "0.6238518", "text": "function xprofile_screen_edit_profile() {\r\n\tglobal $bp;\r\n\r\n\tif ( !bp_is_my_profile() && !is_super_admin() )\r\n\t\treturn false;\r\n\r\n\t/* Make sure a group is set. */\r\n\tif ( empty( $bp->action_variables[1] ) )\r\n\t\tbp_core_redirect( $bp->displayed_user->domain . BP_XPROFILE_SLUG . '/edit/group/1' );\r\n\r\n\t/* Check the field group exists */\r\n\tif ( !xprofile_get_field_group( $bp->action_variables[1] ) )\r\n\t\tbp_core_redirect( $bp->root_domain );\r\n\r\n\t/* Check to see if any new information has been submitted */\r\n\tif ( isset( $_POST['field_ids'] ) ) {\r\n\r\n\t\t/* Check the nonce */\r\n\t\tcheck_admin_referer( 'bp_xprofile_edit' );\r\n\r\n\t\t/* Check we have field ID's */\r\n\t\tif ( empty( $_POST['field_ids'] ) )\r\n\t\t\tbp_core_redirect( $bp->displayed_user->domain . BP_XPROFILE_SLUG . '/edit/group/' . $bp->action_variables[1] . '/' );\r\n\r\n\t\t/* Explode the posted field IDs into an array so we know which fields have been submitted */\r\n\t\t$posted_field_ids = explode( ',', $_POST['field_ids'] );\r\n\r\n\t\t$is_required = array();\r\n\r\n\t\t/* Loop through the posted fields formatting any datebox values then validate the field */\r\n\t\tforeach ( (array)$posted_field_ids as $field_id ) {\r\n\t\t\tif ( !isset( $_POST['field_' . $field_id] ) ) {\r\n\r\n\t\t\t\tif ( is_numeric( $_POST['field_' . $field_id . '_day'] ) ) {\r\n\t\t\t\t\t/* Concatenate the values. */\r\n\t\t\t\t\t$date_value = $_POST['field_' . $field_id . '_day'] . ' ' .\r\n\t\t\t\t\t\t\t $_POST['field_' . $field_id . '_month'] . ' ' .\r\n\t\t\t\t\t\t\t\t $_POST['field_' . $field_id . '_year'];\r\n\r\n\t\t\t\t\t/* Turn the concatenated value into a timestamp */\r\n\t\t\t\t\t$_POST['field_' . $field_id] = strtotime( $date_value );\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\t$is_required[$field_id] = xprofile_check_is_required_field( $field_id );\r\n\t\t\tif ( $is_required[$field_id] && empty( $_POST['field_' . $field_id] ) )\r\n\t\t\t\t$errors = true;\r\n\t\t}\r\n\r\n\t\tif ( !empty( $errors ) )\r\n\t\t\tbp_core_add_message( __( 'Please make sure you fill in all required fields in this profile field group before saving.', 'buddypress' ), 'error' );\r\n\t\telse {\r\n\t\t\t/* Reset the errors var */\r\n\t\t\t$errors = false;\r\n\r\n\t\t\t/* Now we've checked for required fields, lets save the values. */\r\n\t\t\tforeach ( (array)$posted_field_ids as $field_id ) {\r\n\t\t\t\tif ( !xprofile_set_field_data( $field_id, $bp->displayed_user->id, $_POST['field_' . $field_id], $is_required[$field_id] ) )\r\n\t\t\t\t\t$errors = true;\r\n\t\t\t\telse\r\n\t\t\t\t\tdo_action( 'xprofile_profile_field_data_updated', $field_id, $_POST['field_' . $field_id] );\r\n\t\t\t}\r\n\r\n\t\t\tdo_action( 'xprofile_updated_profile', $bp->displayed_user->id, $posted_field_ids, $errors );\r\n\r\n\t\t\t/* Set the feedback messages */\r\n\t\t\tif ( $errors )\r\n\t\t\t\tbp_core_add_message( __( 'There was a problem updating some of your profile information, please try again.', 'buddypress' ), 'error' );\r\n\t\t\telse\r\n\t\t\t\tbp_core_add_message( __( 'Changes saved.', 'buddypress' ) );\r\n\r\n\t\t\t/* Redirect back to the edit screen to display the updates and message */\r\n\t\t\tbp_core_redirect( $bp->displayed_user->domain . BP_XPROFILE_SLUG . '/edit/group/' . $bp->action_variables[1] . '/' );\r\n\t\t}\r\n\t}\r\n\r\n\tdo_action( 'xprofile_screen_edit_profile' );\r\n\tbp_core_load_template( apply_filters( 'xprofile_template_edit_profile', 'members/single/home' ) );\r\n}", "title": "" }, { "docid": "8c705eff5e0630b282096e4a9e92e1e1", "score": "0.6221003", "text": "public function testProfileFieldsExistence()\r\n {\r\n $this->login();\r\n\r\n $this->browser\r\n ->click('#menuAccountItem')\r\n ->assertVisible('#walletAccount')\r\n ->assertVisible('#walletPassword')\r\n ->assertVisible('#walletParticulars')\r\n ->assertVisible('#first_name')\r\n ->assertVisible('#last_name')\r\n ->assertVisible('#address_1')\r\n ->assertVisible('#address_2')\r\n ->assertVisible('#zip_code')\r\n ->assertVisible('#city')\r\n ->assertVisible('#state')\r\n ->assertVisible('select#country')\r\n ->assertVisible('#email');\r\n }", "title": "" }, { "docid": "7445c880df6abec9b75ddf860626d2fc", "score": "0.61756325", "text": "private function myProfile()\r\n {\r\n $isDemoUser = $_SESSION['CATS']->isDemo();\r\n\r\n if (isset($_GET['s']))\r\n {\r\n switch($_GET['s'])\r\n {\r\n case 'changePassword':\r\n $templateFile = './modules/settings/ChangePassword.tpl';\r\n break;\r\n\r\n default:\r\n $templateFile = './modules/settings/MyProfile.tpl';\r\n break;\r\n }\r\n }\r\n else\r\n {\r\n $templateFile = './modules/settings/MyProfile.tpl';\r\n }\r\n\r\n if (!eval(Hooks::get('SETTINGS_DISPLAY_PROFILE_SETTINGS'))) return;\r\n\r\n $this->_template->assign('isDemoUser', $isDemoUser);\r\n $this->_template->assign('userID', $this->_userID);\r\n $this->_template->assign('active', $this);\r\n $this->_template->assign('subActive', 'My Profile');\r\n $this->_template->display($templateFile);\r\n }", "title": "" }, { "docid": "f54ba06f94a60ae51d5a584459aab746", "score": "0.6161237", "text": "public function profileforuser()\n\t{\n\t}", "title": "" }, { "docid": "14a07980b6108943eb0cdcb519c95f57", "score": "0.6159668", "text": "public function profile()\n {\n\n $user = Auth::user();\n $this->check_notification($user);\n $this->check_messages($user);\n\n if($user != null) {\n $profile = AdminProfile::whereUserId($user->id)->first();\n if ($profile->profile_completed == 0) { // Profile Not Completed\n return view('admin.profile')->with('pro',$profile)->with('shown',$this->shown)->with('total_message',$this->total_messages)\n ->with('data',$this->user_data)->with('time',$this->time)->with('ids',$this->ids)->with('user',$user);;\n\n } elseif ($profile->profile_completed == 1) { // Profile completed\n return view('admin.dashboard')->with('pro',$profile)->with('shown',$this->shown)->with('total_message',$this->total_messages)\n ->with('data',$this->user_data)->with('time',$this->time)->with('ids',$this->ids)->with('user',$user);\n ;\n }\n }\n }", "title": "" }, { "docid": "d46fe88be8b221d38d11097ae898a8c0", "score": "0.6136336", "text": "function common_admin_preprocess_user_profile(&$vars) {\n if (!empty($vars['elements']['#view_mode'])) {\n $vars['theme_hook_suggestions'][] = 'user_profile__' . $vars['elements']['#view_mode'];\n }\n}", "title": "" }, { "docid": "7a4dba211ec7603841e64d82468701b5", "score": "0.6110423", "text": "function public_profile(){\n\t\twp_die('redirect didn\\'t work');\n\t}", "title": "" }, { "docid": "62e7c33f3e177c225308965e677a9fec", "score": "0.61010563", "text": "private function checkUser() {\n $this->id = DB::run(\"SELECT id FROM users WHERE vk_id = ?\", [$this->userData['user_id']])->fetchColumn();\n if ($this->id === FALSE || is_null($this->id)) {\n $this->email = DB::run(\"SELECT email FROM users WHERE email = ?\", [$this->userData['email']])->fetchColumn();\n if ($this->email === FALSE || is_null($this->email)) {\n $this->registration();\n } else {\n $this->addSocial();\n }\n }\n }", "title": "" }, { "docid": "f8e1a3cfa40236389ac5206281d675fc", "score": "0.6090231", "text": "public function style_profile_page_to_prevent_updating_protected_user_fields() {\n\t\trequire_once( ITSEC_Core::get_core_dir() . 'lib/class-itsec-lib-fingerprinting.php' );\n\n\t\tif ( ! ITSEC_Lib_Fingerprinting::applies_to_user() || ITSEC_Lib_Fingerprinting::is_current_fingerprint_safe() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$fields = $this->get_protected_user_fields( wp_get_current_user(), ITSEC_Lib_Fingerprinting::get_current_fingerprint() );\n\n\t\techo '<style type=\"text/css\">';\n\n\t\tif ( in_array( 'user_email', $fields, true ) ) {\n\t\t\techo '.user-email-wrap { display: none; }';\n\t\t}\n\n\t\tif ( in_array( 'user_pass', $fields, true ) ) {\n\t\t\techo '#password, .user-pass2-wrap { display: none;}';\n\t\t}\n\n\t\techo '</style>';\n\t}", "title": "" }, { "docid": "2e4c3d3ecbfbfcd1d2e2e74328557df9", "score": "0.60804564", "text": "function validateProfile(){\r\n if(strlen($_POST['first_name'])==0 || strlen($_POST['last_name'])==0 || strlen($_POST['email'])==0 || strlen($_POST['headline'])==0 || strlen($_POST['summary'])==0)\r\n return 'All fields are required';\r\n\r\n if(strpos($_POST['email'],'@')===false)\r\n return 'Email address must contain @';\r\n\r\n return true;\r\n}", "title": "" }, { "docid": "4100d351352509f128fe2f0dd8135bf6", "score": "0.6052839", "text": "function MyApp_Profile_Allowed_Detect()\n {\n if (count($this->AllowedProfiles)>0) { return; }\n\n //Necessary?\n $this->NProfiles=count($this->ValidProfiles);\n\n $this->AllowedProfiles=array();\n if ($this->LoginData)\n {\n foreach ($this->ValidProfiles as $n => $profile)\n {\n if ($profile==\"Public\") { continue; }\n\n if (\n !empty($this->AuthHash[ \"ForceProfile\" ])\n ||\n (\n isset($this->LoginData[ \"Profile_\".$profile ])\n &&\n $this->LoginData[ \"Profile_\".$profile ]==2\n )\n )\n {\n array_push($this->AllowedProfiles,$profile);\n }\n }\n }\n }", "title": "" }, { "docid": "a25f213d4a9009fc1da494868f55ab21", "score": "0.60489446", "text": "function ash_registration_form() {\n\n if(!is_user_logged_in()) {\n \n global $ash_load_css;\n \n // set this to true so the CSS is loaded\n $ash_load_css = true;\n \n // check to make sure user registration is enabled\n $registration_enabled = get_option('users_can_register');\n \n // only show the registration form if allowed\n if($registration_enabled) {\n $output = ash_registration_form_fields();\n } else {\n $output = __('User registration is not enabled');\n }\n return $output;\n }else{?>\n \n <section class=\"article-single dark-wrapper\">\n <div class=\"container\">\n <div class=\"row\">\n <p>You have no need to take this quiz again</p> \n </div> \n </div>\n </section>\n\n <?php }\n}", "title": "" }, { "docid": "19411de2138f694f3fdbc781dea1aa49", "score": "0.60484016", "text": "function check()\n\t{\n\t\tif ( empty($this->userid) )\n\t\t{\n\t\t\t$this->global_achievement('No_user_id_specified');\n\t\t}\n\t}", "title": "" }, { "docid": "d38b31252489bdf7694d5707d08126b9", "score": "0.6039588", "text": "function save_profile_fields( $user_id ) {\r\n\t\tif ( ! current_user_can( 'edit_user', $user_id ) )\r\n\t\t\treturn;\r\n\r\n\t\tupdate_user_meta( $user_id, 'telegram_receive_plugins_notification',\r\n\t\t\tintval( isset( $_POST['telegram_receive_plugins_notification'] ) ) );\r\n\t}", "title": "" }, { "docid": "5cb5eb6f7ef62e66f70dc06d4a11005e", "score": "0.6027533", "text": "function affwp_update_profile_settings( $data = array() ) {\n\n\tif ( ! is_user_logged_in() ) {\n\t\treturn false;\n\t}\n\n\tif ( empty( $data['affiliate_id'] ) ) {\n\t\treturn false;\n\t}\n\n\t$affiliate_id = absint( $data['affiliate_id'] );\n\t$user_id = affwp_get_affiliate_user_id( $affiliate_id );\n\n\tif ( $user_id !== get_current_user_id() && ! current_user_can( 'manage_affiliate' ) ) {\n\t\treturn false;\n\t}\n\n\tif ( ! empty( $data['referral_notifications'] ) ) {\n\n\t\tupdate_user_meta( $user_id, 'affwp_referral_notifications', '1' );\n\n\t} else {\n\n\t\tdelete_user_meta( $user_id, 'affwp_referral_notifications' );\n\n\t}\n\n\tif ( ! empty( $data['payment_email'] ) && is_email( $data['payment_email'] ) ) {\n\t\taffiliate_wp()->affiliates->update( $affiliate_id, array( 'payment_email' => $data['payment_email'] ), '', 'affiliate' );\n\t}\n\n\t/**\n\t * Fires immediately after an affiliate's profile settings have been updated.\n\t *\n\t * @since 1.0\n\t *\n\t * @param array $data Affiliate profile data.\n\t */\n\tdo_action( 'affwp_update_affiliate_profile_settings', $data );\n\n\tif ( ! empty( $_POST['affwp_action'] ) ) {\n\t\twp_redirect( add_query_arg( 'affwp_notice', 'profile-updated' ) ); exit;\n\t}\n}", "title": "" }, { "docid": "cf11b3bac9f1308f0a15563d7c7d596e", "score": "0.60271615", "text": "public function upgradeaccount() \n\t{\n\t\t$this->layout->setData('upgradeaccount','1');\n\t\t$profile = $this->profile_model->getProfile($this->uid);\n\t\tif(trim($profile['country']) == '' or trim($profile['city']) == '' or trim($profile['firstName']) == '' or trim($profile['lastName']) == ''){\n\t\t\t$this->registeredit();\n\t\t} else {\n\t\t\t$redirect = Base_url('user/profile?chng=br');\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "73007470f3630e0651ad1a1917e41e22", "score": "0.6018241", "text": "public function profile(){\n\t\tif($this->Login_model->is_admin_logged_in() ){\n\t\t\t$id \t=\t$this->session->userdata('current_admin_id');;\n\t\t\tif($this->User_model->edit_user($id)){\n\t\t\t\t$data['userInfo']\t=\t$this->User_model->edit_user($id);\n\t\t\t}\n\t\t\t$data['ManageUser'] = 'profile';\n\t\t\t$data['logo']\t\t\t=\t$this->Setting_model->logo_find();\n\t\t\t$data['store']\t\t\t= $this->Setting_model->store_data_view();\n\t\t\t$data['icon']\t\t= \t$this->Setting_model->store_icon();\n\t\t\t$this->load->view('dashboard_layout',$data);\n\t\t}else{\n\t\t\tredirect('social-admin/?logged-in-first');\n\t\t}\n\t}", "title": "" }, { "docid": "bc2e42f8f2f0fd8519f52d5a9cc44d48", "score": "0.6006849", "text": "function _auto_create_user_profile () {\n\t\t// Check mode\n\t\tif (!module('forum')->SETTINGS['USE_GLOBAL_USERS'] || !main()->USER_ID) {\n\t\t\treturn false;\n\t\t}\n\t\t// Check if such user already exists\n\t\t$user_info = db()->query_fetch('SELECT id FROM '.db('forum_users').' WHERE id='.intval(main()->USER_ID));\n\t\tif (!empty($user_info['id'])) {\n\t\t\treturn false;\n\t\t}\n\t\t// Do create profile\n\t\tdb()->INSERT('forum_users', array(\n\t\t\t'id'\t\t\t=> intval(main()->USER_ID),\n//\t\t\t'user_email'\t=> _es($user_info['email']),\n//\t\t\t'name'\t\t\t=> _es($user_info['login']),\n\t\t\t'user_timezone'\t=> floatval(0),\n\t\t\t'dst_status'\t=> intval((bool) $user_info['dst_status']),\n\t\t\t'user_regdate'\t=> time(),\n\t\t));\n\t\t// Return result array\n\t\treturn db()->query_fetch('SELECT * FROM '.db('forum_users').' WHERE id='.intval(main()->USER_ID).' LIMIT 1');\n\t}", "title": "" }, { "docid": "e0631becb725a416e385975dca8f613a", "score": "0.6002594", "text": "function rps_check_has_info($uid, $db_conn) {\n $query = \"SELECT fname, lname, email_id FROM gen_login_info WHERE login_id = \" . real_mysql_specialchars($uid, false);\n $results = real_execute_query($query, $db_conn);\n // if the user has not entered basic info redirect him to f_info else to his profiles.\n if (mysql_num_rows($results) == 0) {\n real_redirect(\"f_info.php\", \"\", $db_conn);\n }\n}", "title": "" }, { "docid": "1a0ca3060edd80e8fd81b58321510d39", "score": "0.5996289", "text": "function fckeditor_admin_profile_form($form_state, $profile = NULL) {\n if ($profile != NULL) {\n $form['_profile'] = array(\n '#type' => 'value',\n '#value' => $profile,\n );\n }\n else {\n $profile = new stdClass();\n }\n\n module_load_include('lib.inc', 'fckeditor');\n\n $toolbar_options = fckeditor_load_toolbar_options();\n $skin_options = fckeditor_load_skin_options();\n $lang_options = fckeditor_load_lang_options();\n\n // Only display the roles that currently don't have a fckeditor profile. One\n // profile per role.\n $orig_roles = user_roles(FALSE, 'access fckeditor');\n $roles = $orig_roles;\n\n if (!empty($profile->rids) && !user_roles(FALSE, 'access fckeditor')) {\n drupal_set_message(t('You haven\\'t assigned %accesspermission !permissionslink yet. It is recommended to assign the %accesspermission !permissionslink before updating FCKeditor profiles.',\n array(\n '%accesspermission' => t('access fckeditor'),\n '!permissionslink' => l(t('permission'), 'admin/user/permissions'),\n )), 'warning');\n }\n\n if (empty($profile->name)) {\n $result = db_query(\"SELECT DISTINCT(rid) FROM {fckeditor_role}\");\n while (($data = db_fetch_object($result))) {\n if ((empty($profile->rids) || !in_array($data->rid, array_keys((array) $profile->rids))) && !form_get_errors()) {\n unset($roles[$data->rid]);\n }\n }\n if (count($orig_roles) != count($roles)) {\n drupal_set_message(t('Not all user roles are shown since they already have FCKeditor profiles. You must first unassign profiles in order to add them to a new one.'));\n }\n }\n\n $form['basic'] = array(\n '#type' => 'fieldset',\n '#title' => t('Basic setup'),\n '#collapsible' => TRUE,\n '#collapsed' => TRUE\n );\n\n if (arg(3) == 'clone') {\n //load all profiles to check their names\n $profiles = fckeditor_profile_load();\n $oldname = $profile->name;\n $maxsize=128; //default max name length\n\n $res=array();\n $pat = \"/^(?<name>.*?)_(?<n>[0-9]*)$/\";\n if (preg_match_all($pat, $oldname, $res)) { // oldname like 'name_nr'\n $name=$res['name'][0];\n $num=$res['n'][0]+1;\n }\n else{\n $name=$oldname;\n $num=2;\n }\n\n $newname=substr($name, 0, $maxsize-3) .'_'. $num; // +limit\n while (isset($profiles[$newname])) { //find next free number\n $num++;\n $newname=substr($name, 0, $maxsize-3) .'_'. $num;\n\n }\n //dont clone rids\n $profile->settings['rids']=array();\n $profile->rids=array();\n }\n else {\n $newname = $profile->name;\n }\n\n $form['basic']['name'] = array(\n '#type' => 'textfield',\n '#title' => t('Profile name'),\n '#default_value' => !empty($profile->name) ? $newname : '',\n '#size' => 40,\n '#maxlength' => 128,\n '#description' => t('Enter a name for this profile. This name is only visible within the fckeditor administration page.'),\n '#required' => TRUE\n );\n\n $form['basic']['rids'] = array(\n '#type' => 'checkboxes',\n '#title' => t('Roles allowed to use this profile'),\n '#default_value' => !empty($profile->rids) ? array_keys((array) $profile->rids) : array(),\n '#options' => $roles,\n '#description' => t('Only roles with %accesspermission permission will be shown here. If no role is available, make sure that you have assigned the %accesspermission !permissionslink.',\n array(\n '%accesspermission' => t('access fckeditor'),\n '!permissionslink' => l(t('permission'), 'admin/user/permissions'),\n )),\n '#required' => TRUE\n );\n\n $form['basic']['allow_user_conf'] = array(\n '#type' => 'radios',\n '#title' => t('Allow users to customize FCKeditor appearance'),\n '#default_value' => !empty($profile->settings['allow_user_conf']) ? $profile->settings['allow_user_conf'] : 'f',\n '#options' => array(\n 'f' => t('No'),\n 't' => t('Yes')\n ),\n '#description' => t('If allowed, users will be able to override the %appearancesection by visiting their profile page.', array('%appearancesection' => t('Editor appearance'))),\n );\n\n $form['security'] = array(\n '#type' => 'fieldset',\n '#title' => t('Security'),\n '#description' => '<p>'. t('The FCKeditor security system protects you from executing malicious code that is already in your database. In plain text areas database content is harmless because it is not executed, but the FCKeditor WYSIWYG editor evaluates HTML like a web browser and content needs to be filtered before it is loaded.') .'</p>',\n '#collapsible' => TRUE,\n '#collapsed' => TRUE\n );\n\n $all = filter_list_all();\n\n $form['security']['filters'] = array(\n '#type' => 'fieldset',\n '#title' => t('Security filters'),\n '#description' => t('Please choose carefully all filters that protect your content (probably not all filters listed below are security filters).'),\n '#tree' => TRUE,\n );\n\n //don't bother administrator with filters that definitely are not security filters\n $modules_with_filters_to_skip = array('amazon_filter', 'asy', 'bbcode', 'biblio', 'blockquote', 'bookpost', 'chessboard', 'citation_filter', 'codefilter', 'collapse_text', 'contextlinks', 'coolfilter', 'dialectic', 'dript', 'dme', 'drutex', 'embedfilter', 'ext_link_page', 'extlink', 'elf', 'flickr', 'flickrstickr', 'footnotes', 'formdefaults', 'freelinking', 'gallery', 'geogebra', 'geshifilter', 'gotwo', 'googtube', 'gotcha', 'gtspam', 'hidden_content', 'img_assist', 'image_filter', 'inlinetags', 'insert_view', 'insertframe', 'insertnode', 'interwiki', 'jlightbox', 'jsmath', 'language_sections', 'link_node', 'lootz', 'markdown', 'marksmarty', 'mobile_codes', 'mykml', 'nofollowlist', 'oagwt', 'paging', 'pathfilter', 'pearwiki_filter', 'php', 'pirate', 'reptag', 'scrippet', 'scripturefilter', 'signwriter', 'slideshowpro', 'smartlinebreakconverter', 'smartypants', 'smileys', 'spamspan', 'spam_tokens', 'spoiler', 'table_altrow', 'tablemanager', 'tableofcontents', 'textile', 'tooltips', 'twikifilter', 'typogrify', 'unwrap', 'urlclass', 'urlicon', 'url_replace_filter', 'username_highlighter', 'video_filter', 'quote');\n\n if (!isset($profile->settings['ss'])) {\n $profile->settings['filters']['filter/0'] = 1;\n }\n\n foreach ($all as $id => $filter) {\n if (in_array(strtolower($filter->module), $modules_with_filters_to_skip)) {\n continue;\n }\n //skip line break converter and email -> link\n if ($filter->module == 'filter' && in_array($filter->delta, array(1, 2))) {\n continue;\n }\n $form['security']['filters'][$id] = array(\n '#type' => 'checkbox',\n '#title' => $filter->name,\n '#default_value' => !empty($profile->settings['filters'][$id]),\n '#description' => module_invoke($filter->module, 'filter', 'description', $filter->delta),\n );\n }\n\n $form['security']['ss'] = array(\n '#type' => 'radios',\n '#title' => t('Security settings'),\n '#default_value' => isset($profile->settings['ss']) ? $profile->settings['ss'] : '2',\n '#options' => array(\n '2' => t('Always run security filters for FCKeditor.'),\n '1' => t('Run security filters only when FCKeditor is set to start automatically.'),\n ),\n '#description' => t('There are two ways of starting FCKeditor: automatically and manually (via toggle or in a popup). If you decide to apply security filters only when FCKeditor starts automatically, you will not be protected when toggling manually from plain text area to FCKeditor or when using FCKeditor in a popup mode. So choose this option only, if you can detect various attacks (mainly XSS) by yourself just by looking at the HTML code.'),\n );\n\n $form['fckeditor_exclude_settings'] = array(\n '#type' => 'fieldset',\n '#title' => t('Visibility settings'),\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n '#description' => t('The following settings are combined with the visibility settings of the global profile.'),\n );\n\n $form['fckeditor_exclude_settings']['min_rows'] = array(\n '#type' => 'textfield',\n '#title' => t('Minimum rows'),\n '#default_value' => !empty($profile->settings['min_rows']) ? $profile->settings['min_rows'] : '5',\n '#description' => t('FCKeditor will be triggered if the textarea has more rows than entered here. Enter \\'1\\' if you do not want to use this feature.'),\n );\n\n $form['fckeditor_exclude_settings']['excl_mode'] = array(\n '#type' => 'radios',\n '#title' => t('Use inclusion or exclusion mode'),\n '#default_value' => (empty($profile->settings['excl_mode']) || in_array($profile->settings['excl_mode'], array(0, 2))) ? 0 : 1,\n '#options' => array(\n '0' => t('Exclude'),\n '1' => t('Include')\n ),\n '#description' => t('Choose the way of disabling/enabling FCKeditor on selected fields/paths (see below). Use exclude to disable FCKeditor on selected fields/paths. Use include if you want to load FCKeditor only on selected paths/fields.'),\n );\n\n /**\n * get excluded fields - so we can have normal textareas too\n * split the phrase by any number of commas or space characters,\n * which include \" \", \\r, \\t, \\n and \\f\n */\n $form['fckeditor_exclude_settings']['excl'] = array(\n '#type' => 'textarea',\n '#title' => t('Fields to exclude/include'),\n '#cols' => 60,\n '#rows' => 5,\n '#prefix' => '<div style=\"margin-left:20px\">',\n '#suffix' => '</div>',\n '#default_value' => !empty($profile->settings['excl']) ? $profile->settings['excl'] : '',\n '#description' =>\n t('Enter the paths to the textarea fields on which you want to enable or disable FCKeditor.') .' '.\n t('Please see the !helppagelink for more information about defining field names. Short instruction is available below.',\n array(\n '!helppagelink' => l(t('help page'), 'admin/help/fckeditor', array('fragment' => 'fieldinclexcl')),\n )) .\n ' <ul>' .\n '<li>'. t('Path structure') .': <strong>[email protected]_id</strong></li>'.\n '<li>'. t('The following wildcards are available: *, ?') .'</li>'.\n '<li>'. t('Content type is optional. You may even specify only path or field id') .'</li>'.\n '<li>'. t('Examples') .':<ul>'.\n '<li><em>blog@*.edit-body</em> - '. t('matches all fields of type %type called %field, on any page', array('%type' => 'blog', '%field' => 'edit-body')) .\n '<li><em>node/add/*.edit-user-*</em> - '. t('matches fields starting with %field on pages starting with %path', array('%field' => 'edit-user-', '%path' => 'node/add/')) .'</li></ul>'.\n '</li></ul>',\n '#wysiwyg' => FALSE,\n );\n\n $form['fckeditor_exclude_settings']['simple_incl'] = array(\n '#type' => 'textarea',\n '#title' => t('Force simplified toolbar on the following fields'),\n '#cols' => 60,\n '#rows' => 5,\n '#default_value' => !empty($profile->settings['simple_incl']) ? $profile->settings['simple_incl'] : '',\n '#description' =>\n t('Enter the paths to the textarea fields on which you want to force the simplified toolbar (%toolbarname).',\n array(\n '%toolbarname' => FCKEDITOR_FORCE_SIMPLE_TOOLBAR_NAME,\n )) .' '.\n t('Please see the !helppagelink for more information about defining field names. Take a look at the exclusion settings (above) for short instruction.',\n array(\n '!helppagelink' => l(t('help page'), 'admin/help/fckeditor', array('fragment' => 'fieldinclexcl')),\n )),\n '#wysiwyg' => FALSE,\n );\n\n $form['appearance'] = array(\n '#type' => 'fieldset',\n '#title' => t('Editor appearance'),\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n );\n\n $form['appearance']['default'] = array(\n '#type' => 'radios',\n '#title' => t('Default state'),\n '#default_value' => !empty($profile->settings['default']) ? $profile->settings['default'] : 't',\n '#options' => array(\n 't' => t('Enabled'),\n 'f' => t('Disabled')\n ),\n '#description' => t('Default editor state. If disabled, rich text editor may still be enabled using toggle or popup window.'),\n );\n\n $form['appearance']['show_toggle'] = array(\n '#type' => 'radios',\n '#title' => t('Show disable/enable rich text editor toggle'),\n '#default_value' => !empty($profile->settings['show_toggle']) ? $profile->settings['show_toggle'] : 't',\n '#options' => array(\n 't' => t('Show'),\n 'f' => t('Hide')\n ),\n '#description' => t('Whether or not to show the disable/enable rich text editor toggle below the textarea. Works only if FCKeditor is not running in a popup window (see below).'),\n );\n\n $form['appearance']['popup'] = array(\n '#type' => 'radios',\n '#title' => t('Use FCKeditor in a popup window'),\n '#default_value' => !empty($profile->settings['popup']) ? $profile->settings['popup'] : 'f',\n '#options' => array(\n 'f' => t('No'),\n 't' => t('Yes')\n ),\n '#description' => t('If this option is enabled a link to a popup window will be used instead of a textarea replace.'),\n );\n\n $form['appearance']['skin'] = array(\n '#type' => 'select',\n '#title' => t('Skin'),\n '#default_value' => !empty($profile->settings['skin']) ? $profile->settings['skin'] : 'default',\n '#options' => $skin_options,\n '#description' => t('Choose a default skin.'),\n );\n\n $form['appearance']['toolbar'] = array(\n '#type' => 'select',\n '#title' => t('Toolbar'),\n '#default_value' => !empty($profile->settings['toolbar']) ? $profile->settings['toolbar'] : 'default',\n '#options' => $toolbar_options,\n '#description' => t('Choose a default toolbar set. To define new toolbar, edit %configfile located in %module_path.',\n array(\n '%configfile' => 'fckeditor.config.js',\n '%module_path' => drupal_get_path('module', 'fckeditor'),\n )),\n );\n\n $form['appearance']['expand'] = array(\n '#type' => 'radios',\n '#title' => t('Start the toolbar expanded'),\n '#default_value' => !empty($profile->settings['expand']) ? $profile->settings['expand'] : 't',\n '#options' => array(\n 't' => t('Expanded'),\n 'f' => t('Collapsed')\n ),\n '#description' => t('The toolbar start expanded or collapsed.'),\n );\n\n $form['appearance']['width'] = array(\n '#type' => 'textfield',\n '#title' => t('Width'),\n '#default_value' => !empty($profile->settings['width']) ? $profile->settings['width'] : '100%',\n '#description' => t('Width in pixels or percent.') .' '. t('Example') .': 400 '. t('or') .' 100%.',\n '#size' => 40,\n '#maxlength' => 128,\n );\n\n $form['appearance']['lang'] = array(\n '#type' => 'select',\n '#title' => t('Language'),\n '#default_value' => !empty($profile->settings['lang']) ? $profile->settings['lang'] : 'en',\n '#options' => $lang_options,\n '#description' => t('The language for the FCKeditor interface.')\n );\n\n $form['appearance']['auto_lang'] = array(\n '#type' => 'radios',\n '#title' => t('Auto-detect language'),\n '#default_value' => !empty($profile->settings['auto_lang']) ? $profile->settings['auto_lang'] : 't',\n '#options' => array(\n 't' => t('Enabled'),\n 'f' => t('Disabled')\n ),\n '#description' => t('Use auto detect user language feature.')\n );\n\n $form['output'] = array(\n '#type' => 'fieldset',\n '#title' => t('Cleanup and output'),\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n );\n\n $form['output']['enter_mode'] = array(\n '#type' => 'select',\n '#title' => t('Enter mode'),\n '#default_value' => !empty($profile->settings['enter_mode']) ? $profile->settings['enter_mode'] : 'p',\n '#options' => array(\n 'p' => '<p>',\n 'br' => '<br />',\n 'div' => '<div>'\n ),\n '#description' => t('Set which tag FCKeditor should use when [Enter] key is pressed.')\n );\n\n $form['output']['shift_enter_mode'] = array(\n '#type' => 'select',\n '#title' => t('Shift + Enter mode'),\n '#default_value' => !empty($profile->settings['shift_enter_mode']) ? $profile->settings['shift_enter_mode'] : 'br',\n '#options' => array(\n 'p' => '<p>',\n 'br' => '<br />',\n 'div' => '<div>'\n ),\n '#description' => t('Set which tag FCKeditor should use when [Shift] + [Enter] is pressed.')\n );\n\n $form['output']['font_format'] = array(\n '#type' => 'textfield',\n '#title' => t('Font formats'),\n '#default_value' => !empty($profile->settings['font_format']) ? $profile->settings['font_format'] : 'p;div;pre;address;h1;h2;h3;h4;h5;h6',\n '#size' => 40,\n '#maxlength' => 250,\n '#description' => t('Semicolon separated list of HTML font formats.') .' '. t('Allowed values are') .': p;div;pre;address;h1;h2;h3;h4;h5;h6',\n );\n\n $form['output']['format_source'] = array(\n '#type' => 'radios',\n '#title' => t('Apply source formatting'),\n '#default_value' => !empty($profile->settings['format_source']) ? $profile->settings['format_source'] : 't',\n '#options' => array(\n 't' => t('Yes'),\n 'f' => t('No')\n ),\n '#description' =>\n t('When set to %true the editor will format the XHTML when switching from WYSIWYG view to Source view, by inserting line breaks on some tags endings and indenting paragraphs, tables and lists.',\n array(\n '%true' => t('Yes'),\n )),\n );\n\n $form['output']['format_output'] = array(\n '#type' => 'radios',\n '#title' => t('Format output'),\n '#default_value' => !empty($profile->settings['format_output']) ? $profile->settings['format_output'] : 't',\n '#options' => array(\n 't' => t('Yes'),\n 'f' => t('No')\n ),\n '#description' =>\n t('When set to %true the editor will format the XHTML output by inserting line breaks on some tags endings and indenting paragraphs, tables and lists.',\n array(\n '%true' => t('Yes'),\n )),\n );\n\n $form['css'] = array(\n '#type' => 'fieldset',\n '#title' => t('Style and template files'),\n '#collapsible' => TRUE,\n '#collapsed' => TRUE\n );\n\n $form['css']['css_mode'] = array(\n '#type' => 'select',\n '#title' => t('Editor CSS'),\n '#default_value' => !empty($profile->settings['css_mode']) ? $profile->settings['css_mode'] : 'theme',\n '#options' => array(\n 'theme' => t('Use theme CSS'),\n 'self' => t('Define CSS'),\n 'none' => t('FCKeditor default')\n ),\n '#description' =>\n t('Defines the CSS to be used in the editor area.') .'<br />'.\n t('Use theme CSS') .': '. t('load style.css from current site theme.') .'<br/>'.\n t('Define CSS') .': '. t('enter path for CSS file below.') .'<br />'.\n t('FCKeditor default') .': '. t('uses default CSS from editor.')\n );\n\n $form['css']['css_path'] = array(\n '#type' => 'textfield',\n '#title' => t('CSS path'),\n '#default_value' => !empty($profile->settings['css_path']) ? $profile->settings['css_path'] : \"\",\n '#size' => 40,\n '#maxlength' => 255,\n '#description' =>\n t('Enter path to CSS file (Example: %cssexample1) or a list of CSS files separated by a comma (Example: %cssexample2). Make sure to select %defcss above.',\n array(\n '%cssexample1' => 'css/editor.css',\n '%cssexample2' => '/themes/garland/style.css,http://example.com/style.css',\n '%defcss' => 'Define css',\n )) .'<br />'.\n t('Available placeholders') .':<br />'.\n '<strong>%h</strong> - '. t('host name (%host)', array('%host' => base_path())) .'<br />'.\n '<strong>%t</strong> - '. t('path to theme (%theme)', array('%theme' => base_path() . fckeditor_path_to_theme() .'/'))\n );\n\n $form['css']['css_style'] = array(\n '#type' => 'select',\n '#title' => t('Predefined styles'),\n '#default_value' => !empty($profile->settings['css_style']) ? $profile->settings['css_style'] : 'theme',\n '#options' => array(\n 'theme' => t('Use theme fckstyles.xml'),\n 'self' => t('Define path to fckstyles.xml'),\n 'default' => t('FCKeditor default')\n ),\n '#description' =>\n t('Define the location of %file file. It is used by the %setting dropdown list available in the default toolbar. Copy %sourcefile inside your theme directory (%themefile) and adjust it to your needs.',\n array(\n '%file' => 'fckstyles.xml',\n '%setting' => t('Style'),\n '%sourcefile' => fckeditor_path(TRUE) .'/fckstyles.xml',\n '%themefile' => fckeditor_path_to_theme() .'/fckstyles.xml',\n ))\n );\n\n $form['css']['styles_path'] = array(\n '#type' => 'textfield',\n '#title' => t('Predefined styles path'),\n '#default_value' => !empty($profile->settings['styles_path']) ? $profile->settings['styles_path'] : \"\",\n '#size' => 40,\n '#maxlength' => 255,\n '#description' =>\n t('Enter the path to XML file with predefined @type (Example: %example). Be sure to select %setting above.',\n array(\n '@type' => t('styles'),\n '%example' => '/fckstyles.xml',\n '%setting' => t('Define path to fckstyles.xml'),\n )) .'<br />'.\n t('Available placeholders') .':<br />'.\n '<strong>%h</strong> - '. t('host name (%host)', array('%host' => base_path())) .'<br />'.\n '<strong>%t</strong> - '. t('path to theme (%theme)', array('%theme' => base_path() . fckeditor_path_to_theme() .'/')) .'<br />'.\n '<strong>%m</strong> - '. t('path to FCKeditor module (%module)', array('%module' => drupal_get_path('module', 'fckeditor'))),\n );\n\n $form['css']['templatefile_mode'] = array(\n '#type' => 'select',\n '#title' => t('Predefined templates'),\n '#default_value' => !empty($profile->settings['templatefile_mode']) ? $profile->settings['templatefile_mode'] : 'default',\n '#options' => array(\n 'default' => t('FCKeditor default'),\n 'theme' => t('Use theme fcktemplates.xml'),\n 'self' => t('Define path to fcktemplates.xml'),\n ),\n '#description' =>\n t('Define the location of %file file. It is used by the %setting dropdown list available in the default toolbar. Copy %sourcefile inside your theme directory (%themefile) and adjust it to your needs.',\n array(\n '%file' => 'fcktemplates.xml',\n '%setting' => t('Templates'),\n '%sourcefile' => fckeditor_path(TRUE) .'/fcktemplates.xml',\n '%themefile' => fckeditor_path_to_theme() .'/fcktemplates.xml',\n ))\n );\n\n $form['css']['templatefile_path'] = array(\n '#type' => 'textfield',\n '#title' => t('Predefined templates path'),\n '#default_value' => !empty($profile->settings['templatefile_path']) ? $profile->settings['templatefile_path'] : '',\n '#size' => 40,\n '#maxlength' => 255,\n '#description' =>\n t('Enter the path to XML file with predefined @type (Example: %example). Be sure to select %setting above.',\n array(\n '@type' => t('templates'),\n '%example' => '/fckstyles.xml',\n '%setting' => t('Define path to fckstyles.xml'),\n )) .'<br />'.\n t('Available placeholders') .':<br />'.\n '<strong>%h</strong> - '. t('host name (%host)', array('%host' => base_path())) .'<br />'.\n '<strong>%t</strong> - '. t('path to theme (%theme)', array('%theme' => base_path() . fckeditor_path_to_theme() .'/')) .'<br />'.\n '<strong>%m</strong> - '. t('path to FCKeditor module (%module)', array('%module' => drupal_get_path('module', 'fckeditor'))),\n );\n\n $form['fckeditor_upload_settings'] = array(\n '#type' => 'fieldset',\n '#title' => t('File browser settings'),\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n '#description' =>\n t('Set file browser settings. A file browser will allow you to explore the files contained on the server and embed them as links, images or flash movies. Besides the built-in FCKeditor file browser, you can also use a contributed module like !imcelink, !iblink or !webfmlink. The quick upload setting controls whether images, flash movies and files can be uploaded using the upload tab of the respective dialogs. Please note that these options require manual configuration, check !readmelink for more information.',\n array(\n '!imcelink' => l(t('IMCE'), 'http://drupal.org/project/imce'),\n '!iblink' => l(t('Image Browser'), 'http://drupal.org/project/imagebrowser'),\n '!webfmlink' => l(t('Web File Manager'), 'http://drupal.org/project/webfm'),\n '!readmelink' => l(t('readme.txt'), 'admin/help/fckeditor'),\n ))\n );\n\n $filebrowsers = array(\n 'none' => t('None'),\n 'builtin' => t('Built-in file browser'),\n );\n\n if (module_exists('imce')) {\n $filebrowsers['imce'] = t('IMCE');\n }\n\n if (module_exists('imagebrowser')) {\n $filebrowsers['ib'] = t('Image Browser');\n }\n\n if (module_exists('webfm_popup')) {\n $filebrowsers['webfm'] = t('Web File Manager');\n }\n\n $form['fckeditor_upload_settings']['filebrowser'] = array(\n '#type' => 'select',\n '#title' => t('File browser type'),\n '#default_value' => !empty($profile->settings['filebrowser']) ? $profile->settings['filebrowser'] : 'none',\n '#options' => $filebrowsers,\n '#description' => t('Select the file browser that you would like to use to upload files, images and flash movies.'),\n );\n\n $form['fckeditor_upload_settings']['quickupload'] = array(\n '#type' => 'radios',\n '#title' => t('Allow quick uploads'),\n '#default_value' => !empty($profile->settings['quickupload']) ? $profile->settings['quickupload'] : 'f',\n '#options' => array(\n 'f' => t('No'),\n 't' => t('Yes')\n ),\n '#description' => t('The quick upload functionality can be disabled and enabled independently of the file browser. It will always use the settings below. To enable quick uploads you must follow the same configuration procedure as when enabling the built-in file browser.'),\n );\n\n $current_user_files_path = empty($profile->settings['UserFilesPath']) ? \"\" : strtr($profile->settings['UserFilesPath'], array(\"%f\" => file_directory_path(), \"%u\" => \"UID\", \"%b\" => base_path(), \"%n\" => \"UNAME\"));\n $current_user_files_absolute_path = empty($profile->settings['UserFilesAbsolutePath']) ? \"\" : strtr($profile->settings['UserFilesAbsolutePath'], array(\"%f\" => file_directory_path(), \"%u\" => \"UID\", \"%b\" => base_path(), \"%d\" => $_SERVER['DOCUMENT_ROOT'], \"%n\" => \"UNAME\"));\n\n $form['fckeditor_upload_settings']['UserFilesPath'] = array(\n '#type' => 'textfield',\n '#title' => t('Path to uploaded files'),\n '#default_value' => !empty($profile->settings['UserFilesPath']) ? $profile->settings['UserFilesPath'] : \"%b%f/\",\n '#size' => 40,\n '#maxlength' => 255,\n '#description' =>\n t('Path to uploaded files relative to the document root.') .'<br />'.\n t('Available placeholders') .':<br/>'.\n '<strong>%b</strong> - '. t('base URL path of the Drupal installation (%base)', array('%base' => base_path())) .'<br/>'.\n '<strong>%f</strong> - '. t('Drupal file system path where the files are stored (%files)', array('%files' => file_directory_path())) .'<br />'.\n '<strong>%u</strong> - '. t('User ID') .'<br />'.\n '<strong>%n</strong> - '. t('Username') .'<br />'.\n t('Current path: %path', array('%path' => $current_user_files_path)),\n );\n\n $form['fckeditor_upload_settings']['UserFilesAbsolutePath'] = array(\n '#type' => 'textfield',\n '#title' => t('Absolute path to uploaded files'),\n '#default_value' => !empty($profile->settings['UserFilesAbsolutePath']) ? $profile->settings['UserFilesAbsolutePath'] : \"%d%b%f/\",\n '#size' => 40,\n '#maxlength' => 255,\n '#description' =>\n t('The path to the local directory (in the server) which points to the path defined above. If empty, FCKeditor will try to discover the right path.') .'<br />'.\n t('Available placeholders') .':<br/>'.\n '<strong>%d</strong> - '. t('server path to document root (%root)', array('%root' => $_SERVER['DOCUMENT_ROOT'])) .'<br />'.\n '<strong>%b</strong> - '. t('base URL path of the Drupal installation (%base)', array('%base' => base_path())) .'<br/>'.\n '<strong>%f</strong> - '. t('Drupal file system path where the files are stored (%files)', array('%files' => file_directory_path())) .'<br />'.\n '<strong>%u</strong> - '. t('User ID') .'<br />'.\n '<strong>%n</strong> - '. t('Username') .'<br />'.\n t('Current path: %path', array('%path' => $current_user_files_absolute_path)),\n );\n\n if (variable_get('file_downloads', '') == FILE_DOWNLOADS_PRIVATE) {\n $form['fckeditor_upload_settings']['UserFilesPath']['#description'] = t('Setting relative path to uploaded files has been disabled because private downloads are enabled and this path is calculated automatically. To change the location of uploaded files in the private file system, edit the !globallink.', array('!globallink' => l(t('FCKeditor Global Profile'), 'admin/settings/fckeditor/editg')));\n $form['fckeditor_upload_settings']['UserFilesPath']['#disabled'] = TRUE;\n $form['fckeditor_upload_settings']['UserFilesAbsolutePath']['#description'] = t('Setting path to uploaded files has been disabled because private downloads are enabled and this path is calculated automatically. To change the location of uploaded files in the private file system, edit the !globallink.', array('!globallink' => l(t('FCKeditor Global Profile'), 'admin/settings/fckeditor/editg')));\n $form['fckeditor_upload_settings']['UserFilesAbsolutePath']['#disabled'] = TRUE;\n }\n\n $form['advanced'] = array(\n '#type' => 'fieldset',\n '#title' => t('Advanced options'),\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n );\n $form['advanced']['theme_config_js'] = array(\n '#type' => 'radios',\n '#title' => t('Load fckeditor.config.js from theme path'),\n '#default_value' => !empty($profile->settings['theme_config_js']) ? $profile->settings['theme_config_js'] : 'f',\n '#options' => array(\n 't' => t('Yes'),\n 'f' => t('No')\n ),\n '#description' =>\n t('When set to %true the editor will try to load the %configfile file from theme directory.',\n array(\n '%true' => t('Yes'),\n '%configfile' => 'fckeditor.config.js',\n )),\n );\n $form['advanced']['js_conf'] = array(\n '#type' => 'textarea',\n '#title' => t('Custom javascript configuration'),\n '#default_value' => !empty($profile->settings['js_conf']) ? $profile->settings['js_conf'] : \"\",\n '#cols' => 60,\n '#rows' => 5,\n '#description' =>\n t('To change FCKeditor configuration globally, you should modify the config file: %fckeditor_config. Sometimes it is required to change the FCKeditor configuration for a single profile only. Use this box to define settings that are unique for this profile. Available options are listed in the !docslink. Add the following code snippet to disable some advanced tabs in dialog windows of FCKeditor.',\n array(\n '%fckeditor_config' => drupal_get_path('module', 'fckeditor') .'/fckeditor.config.js',\n '!docslink' => l(t('FCKeditor documentation'), 'http://docs.cksource.com/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options'),\n )) .\n \"<pre>LinkDlgHideTarget = true;\\nLinkDlgHideAdvanced = true;\\nImageDlgHideLink = true;\\nImageDlgHideAdvanced = true;\\nFlashDlgHideAdvanced = true;</pre>\".\n '<strong>'. t('Warning') .'</strong>: '.\n t('If you do something wrong here, FCKeditor may fail to load.'),\n '#wysiwyg' => FALSE,\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save')\n );\n\n return $form;\n}", "title": "" }, { "docid": "827d390a39213da83a7e9e573b3cdb87", "score": "0.59747", "text": "public function user_profil()\n\t{\n $posts = $this->input->post();\n if(!empty($posts))\n {\n //Si il y a un POST je le traite\n if($this->_treat_posts($posts,\"form_fiche_profile\", \"user\") == TRUE)\n {\n $this->data[\"returned_message\"] = \"Données enregistrées\";\n }else{\n $this->data[\"returned_message\"] = \"Erreur lors de l'enregistrement\";\n }\n }\n\n\n //On récupère les informations de l'utilisateur\n $this->data[\"user\"] = New User($this->session->userdata(\"id_user\"));\n\n\n\t\t$this->_layout(\"/esp_inscrit/form_user\");\n\t}", "title": "" }, { "docid": "6afb603d23fa8abff52d93050bd7991b", "score": "0.59573317", "text": "function memberProfile_shortcode() {\n $user = wp_get_current_user();\n // get post id of member profile associated with this user\n $registrationid = get_user_meta($user->id, 'wpcf-user-registrationid', true);\n $member = getMemberByRegistrationID($registrationid);\n $postid = $member->id();\n\n // check if user needs to renew their profile\n if($member->subscriptionExpired()) {\n echo do_shortcode('[cred_user_form form=326 user=' . $user->id . ']');\n } else {\n echo do_shortcode('[cred_form form=142 post=' . $postid . ']');\n }\n}", "title": "" }, { "docid": "56cc5db21b3260e8f85a06431aa72bc0", "score": "0.593578", "text": "function zen_swissmon_preprocess_user_profile(&$variables) {\n\t// Fetch relevant user account\n\t$account = $variables['elements']['#account'];\n\t\n\t$nr_of_posts = zen_swissmon_get_user_posts_count($account->uid);\n\t$variables['user_profile']['posts'] = _zen_swissmon_createArray('posts', 'Posts', $nr_of_posts);\n\t\n\tif (is_array($account->roles) && in_array('administrator', $account->roles)) {\n\t\t$variables['user_profile']['initmail'] = _zen_swissmon_createArray('initmail', 'Mail', $account->init);\n\t}\n}", "title": "" }, { "docid": "83bd3d76128368585bd4b53fcd20e31b", "score": "0.5934887", "text": "public function profile() {\n\t\t// LOAD LIBRARIES\n $this->load->library(array('encrypt', 'form_validation'));\n $this->load->helper(array('form', 'form_select'));\n\t\t\n\t\t//render to HTML.\n\t\techo $this->twig->render(strtolower(__CLASS__), 'profile', array (\n\t\t 'BOARD_URL' => $this->boardUrl,\n\t\t 'THEME_NAME' => $this->getStyleName(),\n\t\t 'UCPPROFILEFORM' => form_open('ucpform/profileSubmit/', array('name' => 'frmUpdateProfile', 'id' => 'frmUpdateProfile', 'class' => 'form')),\n\t\t 'LANG_ERROR' => $this->lang->line('error'),\n\t\t 'LANG_CUSTOMTITLE' => $this->lang->line('customtitle'),\n\t\t 'CUSTOMTITLE' => $this->Usermodel->getCustomTitle(),\n\t\t 'ALLOWCTITLE' => $this->Groupmodel->validateAccess(1, 30),\n\t\t \"LANG_WWW\" => $this->lang->line('www'),\n\t\t \"WWW\" => $this->Usermodel->getWWW(),\n\t\t \"LANG_LOCATION\" => $this->lang->line('location'),\n\t\t \"LOCATION\" => $this->Usermodel->getLocation(),\n\t\t 'LANG_EDITPROFILE' => $this->lang->line('editprofile'),\n\t\t 'LANG_FORMFAILURE' => $this->lang->line('formfail'),\n\t\t \"LANG_INVALIDURL\" => $this->lang->line('invalidurl')\n\t\t));\n\t}", "title": "" }, { "docid": "45aebceddbeeac616930415c71a74c05", "score": "0.59288174", "text": "function faeprofile_page_information($account, $page = TRUE) {\n $profile = field_get_items('user', $account, 'field_profile_profile');\n \n if (!variable_get('faeprofile_information', 0) && empty($profile)) {\n return $page ? drupal_not_found() : '';\n }\n\n return theme('faeprofile_information', array('data' => $profile));\n}", "title": "" }, { "docid": "76b70ada8ce5d19e6225ee9b60cf9175", "score": "0.59282035", "text": "function userProfilePage($user) {\n?>\n <h3><?php _e(\"Stat Tracker\", \"stat-tracker\"); ?></h3>\n <table class=\"form-table\">\n <tr>\n\t <th>\n\t\t<label for=\"<?php echo ST_ACCESS_CAPABILITY; ?>\"><?php _e(\"Access Stat Tracker\", \"stat-tracker\"); ?></label>\n\t </th>\n\t <td><?php\n // Checkbox is enabled only for admins viewing another person's profile\n $is_disabled = !current_user_can(ST_APPROVE_CAPABILITY) || get_current_user_id() == $user->ID;\n ?><input type=\"checkbox\" name=\"<?php echo ST_ACCESS_CAPABILITY;?>\" id=\"<?php echo ST_ACCESS_CAPABILITY;?>\" <?php echo $user->has_cap(ST_ACCESS_CAPABILITY) ? \"checked \" : \"\"; echo $is_disabled ? \"disabled \" : \"\"; ?>/><br/>\n <span class=\"description\"><?php _e(\"Can access Stat Tracker.\", \"stat-tracker\"); ?></span>\n </td>\n </tr>\n <tr>\n\t <th>\n\t\t<label for=\"bhr_stat_tracker\"><?php _e(\"Approve for Stat Tracker\", \"stat-tracker\"); ?></label>\n\t </th>\n\t <td><?php\n // Checkbox is enabled only for admins viewing another person's profile\n $is_disabled = !current_user_can(ST_APPROVE_CAPABILITY);\n ?><input type=\"checkbox\" name=\"<?php echo ST_APPROVE_CAPABILITY;?>\" id=\"<?php echo ST_APPROVE_CAPABILITY;?>\" <?php echo $user->has_cap(ST_APPROVE_CAPABILITY) ? \"checked \" : \"\"; echo $is_disabled ? \"disabled \" : \"\"; ?>/><br/>\n <span class=\"description\"><?php _e(\"Can approve others for Stat Tracker.\", \"stat-tracker\"); ?></span>\n </td>\n </tr>\n </table>\n<?php\n }", "title": "" }, { "docid": "6bf11aa00330636e129ce8b2ca9e497b", "score": "0.5923351", "text": "function buddyplug_is_user_settings() {\n\tif( bp_is_settings_component() && bp_is_current_action( buddyplug_get_component_slug() ) )\n\t\treturn true;\n\n\treturn false;\n}", "title": "" }, { "docid": "6bdd344c2694d13b2df59bb4ce0c03ce", "score": "0.59140706", "text": "function update_custom_user_profile_fields( $user_id )\n\t{\n\t\t// Update contact number in user meta\t\n\t\t$contact_number = $_POST['contact_number'];\n\t\tupdate_user_meta( $user_id, 'contact_number', $contact_number );\n\t\t// Update action in user meta\n\t\t$action = $_POST['agency_action'];\n\t\tupdate_user_meta( $user_id, 'action', $action );\n\n\t\t// Update action in user meta\n\t\t$note_up = $_POST['ageny_note'];\n\t\tupdate_user_meta( $user_id, 'note', $note_up );\n\n\t\t$user=get_userdata( $user_id);\n\t\t$user_role=$user->roles[0];\n // insert register user data in custome \"user\" table if register role is 'subscriber'\n\t\t\tif($user_role=\"subscriber\"){\n\t\t\t\t$custome_uid=get_user_meta( $user_id, 'custome_uid' );\n\t\t\t\t$email = $_POST['email'];\n\t\t\t\t$first_name = $_POST['first_name'];\n\t\t\t\tglobal $wpdb;\n\t\t\t\t$table ='user';\n\t\t\t\t$data = [ 'email' =>$email,'firstName' =>$first_name]; // NULL value.\n\t\t\t\t$where = [ 'id' =>$custome_uid[0] ]; // NULL value in WHERE clause.\n\t\t\t\t$wpdb->update( $table, $data, $where);\n\t\t\t} \n\t}", "title": "" }, { "docid": "99cbd2b7e00428a6391df327e1d20905", "score": "0.59112275", "text": "public function display_settings_errors() {\n\t\tsettings_errors( 'wpforms_user_registration' );\n\t}", "title": "" }, { "docid": "8b865612b266baae8566026247f77320", "score": "0.5910703", "text": "public function add_sign_up_form_profile_fields() {\n\n\t\tif ( get_current_user_id() > 0 || ! Profile_Fields_Handler::is_using_profile_fields() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$membership_plans = wc_memberships_get_free_membership_plans();\n\t\t$applicable_plans = [];\n\n\t\tforeach ( $membership_plans as $id => $membership_plan ) {\n\t\t\t$applicable_plans[ $membership_plan->get_id() ] = $membership_plan;\n\t\t}\n\n\t\t$profile_fields = $this->get_profile_fields_for_submission( [\n\t\t\t'membership_plan_ids' => array_keys( $applicable_plans ),\n\t\t\t'visibility' => Profile_Fields_Handler::VISIBILITY_REGISTRATION_FORM\n\t\t] );\n\n\t\tif ( ! empty( $profile_fields ) ) {\n\n\t\t\twc_get_template( 'myaccount/member-profile-fields.php', [\n\t\t\t\t'membership_plans' => $applicable_plans,\n\t\t\t\t'profile_fields' => $profile_fields,\n\t\t\t] );\n\t\t}\n\t}", "title": "" }, { "docid": "6ee69e326a3670cf190bda4945306543", "score": "0.5900751", "text": "protected function has_mailchimp_signup() {\n\t\t$user_meta = get_user_meta( get_current_user_id(), WPSEO_Config_Component_Mailchimp_Signup::META_NAME, true );\n\t\treturn ( ! empty( $user_meta ) );\n\t}", "title": "" }, { "docid": "01ea15bc1bac726425e23bc5ca4d871f", "score": "0.5877712", "text": "function update_profile () {\n\t\t$this->protect('signed_in');\n\n\t\t// set validator rules\n\t\t$validator = new Validator();\n\t\t$validator->rules[] = ['Email Address', 'email_address', 'required|email_address|unique:user:'.AppUser::$user->email_address];\n\t\t$validator->rules[] = ['Timezone', 'timezone', 'required|in_list:'.implode(',', timezone_identifiers_list())];\n\n\t\t// process form submission\n\t\tif (!empty($_POST)) {\n\t\t\t// set object properties with desanitized data & validate\n\t\t\tAppUser::$user->set_properties_by_array($this->desanitize($_POST));\n\t\t\t$validator->model = AppUser::$user;\n\n\t\t\tif ($validator->rules_passed()) {\n\t\t\t\t// rules passed, update\n\t\t\t\tAppUser::update_profile();\n\n\t\t\t\t// change password & delete tokens if new one entered\n\t\t\t\tif (!empty(AppUser::$user->password)) {\n\t\t\t\t\tAppUser::$user->update_password();\n\t\t\t\t\tAppUser::$user->delete_tokens();\n\t\t\t\t\t$this->redirect('sign_in');\n\t\t\t\t}\n\n\t\t\t\tAppUser::create_action('Updated profile', (array)AppUser::$user);\n\t\t\t\t$this->set_alert('success', 'Profile updated successfully');\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// rules invalid, set error alert\n\t\t\t\t$this->set_alert('danger', $validator->errors);\n\t\t\t}\n\t\t}\n\n\t\t// render view\n\t\t$this->page_title = 'Update Profile';\n\t\t$this->view('app_update_profile');\n\t}", "title": "" }, { "docid": "0feb424a8952463d01c8d4a566f8f249", "score": "0.58735967", "text": "public function viewProfile() {\n if (empty($this->auth())) {\n Utils::response(['status' => false, 'message' => 'Forbidden access.'], 403);\n }\n Utils::response(['status' => true, 'message' => 'Your account details.', 'data' => $this->auth()]);\n }", "title": "" }, { "docid": "e2f95c043dea26ee9bf91862f66c57c5", "score": "0.5867799", "text": "function xprofile_sync_bp_profile( &$errors, $update, &$user ) {\r\n\tglobal $bp;\r\n\r\n\tif ( (int)$bp->site_options['bp-disable-profile-sync'] || !$update || $errors->get_error_codes() )\r\n\t\treturn;\r\n\r\n\txprofile_set_field_data( BP_XPROFILE_FULLNAME_FIELD_NAME, $user->ID, $user->display_name );\r\n}", "title": "" }, { "docid": "53c8b297e1831310ff42edcfc4ef03a4", "score": "0.5867571", "text": "function checkForPermissionProfiles()\n{\n\t$db = database();\n\n\t$result = $db->query('', '\n\t\tSELECT \n\t\t\tid_profile\n\t\tFROM {db_prefix}sp_profiles\n\t\tWHERE type = {int:type}\n\t\tLIMIT {int:limit}',\n\t\tarray(\n\t\t\t'type' => 1,\n\t\t\t'limit' => 1,\n\t\t)\n\t);\n\t$has_permission_profiles = '';\n\tif ($db->num_rows($result) !== 0)\n\t{\n\t\tlist ($has_permission_profiles) = $db->fetch_row($result);\n\t\t$db->free_result($result);\n\t}\n\n\treturn !empty($has_permission_profiles);\n}", "title": "" }, { "docid": "baf7f7b8710d3db1091d9e95db0844fc", "score": "0.58570075", "text": "function seb_save_user_profile_fields( $user_id )\n{\n if ( empty( $_POST['_wpnonce'] ) || ! wp_verify_nonce( $_POST['_wpnonce'], 'update-user_' . $user_id ) ) {\n return;\n }\n \n if ( !current_user_can( 'edit_user', $user_id ) ) { \n return false; \n }\n\n update_user_meta( $user_id, 'bpost_accountid', $_POST['bpost_accountid'] );\n update_user_meta( $user_id, 'bpost_passphrase', $_POST['bpost_passphrase'] );\n}", "title": "" }, { "docid": "6cac574cc04dfb68bca782f4ed9c1d6a", "score": "0.5853276", "text": "function offline_signup_update_profile($form, &$form_state) {\n // Set register to TRUE since we only allow changes to fields that are available during register.\n profile_save_profile($form_state['values']['update_values'], $form_state['values']['account'], variable_get('offline_signup_profile_category', 'account'), TRUE);\n}", "title": "" }, { "docid": "e05260f5e0ffcf07ba8a478c1d4c446a", "score": "0.58431137", "text": "function UTKdrupal_preprocess_user_profile(&$variables) {\n unset($variables['user_profile']['summary']['member_for']['#title']);\n unset($variables['user_profile']['summary']['member_for']['#markup']);\n unset($variables['user_profile']['summary']['member_for']['#type']);\n unset($variables['user_profile']['summary']['member_for']);\n $variables['user_profile']['summary']['#title']='';\n}", "title": "" }, { "docid": "32a7284ca23cadf733ddf2e986720d15", "score": "0.5842505", "text": "public function profile()\r\n {\r\n $this->checkAdminLogin();\r\n $data['page'] = lang('profile');\r\n $data['menu'] = 'profile';\r\n $profile = objToArr($this->AdminUserModel->getUser('user_id', adminSession()));\r\n $this->load->view('admin/layout/header', $data);\r\n $this->load->view('admin/profile', compact('profile'));\r\n }", "title": "" }, { "docid": "fc7e9a430fe30ab264be2b8913d61559", "score": "0.5838905", "text": "public function checkProfileUrlAvail() {\n $data = $_REQUEST;\n $profileUrl = trim(urldecode($data['merchant']['profile_url']));\n\n if (isset($_REQUEST['merchant_id'])) {\n $query = $this->Merchants->find('all')->where(['AND' => ['Merchants.profile_url' => $profileUrl, 'user_id !=' => $_REQUEST['merchant_id']]]);\n }\n\n if ($query->count()) {\n echo json_encode(false);\n } else {\n echo json_encode(true);\n }\n exit;\n }", "title": "" }, { "docid": "df51d07362c481162e8c8e37ea3b13fc", "score": "0.583549", "text": "function xprofile_sync_wp_profile( $user_id = false ) {\r\n\tglobal $bp, $wpdb;\r\n\r\n\tif ( (int)$bp->site_options['bp-disable-profile-sync'] )\r\n\t\treturn true;\r\n\r\n\tif ( empty( $user_id ) )\r\n\t\t$user_id = $bp->loggedin_user->id;\r\n\r\n\tif ( empty( $user_id ) )\r\n\t\treturn false;\r\n\r\n\t$fullname = xprofile_get_field_data( BP_XPROFILE_FULLNAME_FIELD_NAME, $user_id );\r\n\t$space = strpos( $fullname, ' ' );\r\n\r\n\tif ( false === $space ) {\r\n\t\t$firstname = $fullname;\r\n\t\t$lastname = '';\r\n\t} else {\r\n\t\t$firstname = substr( $fullname, 0, $space );\r\n\t\t$lastname = trim( substr( $fullname, $space, strlen($fullname) ) );\r\n\t}\r\n\r\n\tupdate_user_meta( $user_id, 'nickname', $fullname );\r\n\tupdate_user_meta( $user_id, 'first_name', $firstname );\r\n\tupdate_user_meta( $user_id, 'last_name', $lastname );\r\n\r\n\t$wpdb->query( $wpdb->prepare( \"UPDATE {$wpdb->users} SET display_name = %s WHERE ID = %d\", $fullname, $user_id ) );\r\n\t$wpdb->query( $wpdb->prepare( \"UPDATE {$wpdb->users} SET user_url = %s WHERE ID = %d\", bp_core_get_user_domain( $user_id ), $user_id ) );\r\n}", "title": "" }, { "docid": "ed219398cd2b56b4cc6668a1eeabf3af", "score": "0.58255744", "text": "function ash_edit_profile_form_fields() {\n \n ob_start(); ?> \n \n <?php \n\n // show any error messages after form submission\n\n ash_show_error_messages(); ?>\n\n\n <?php \n $user_ID = get_current_user_id(); \n\n if($_GET['id']){\n $user_ID = $_GET['id'];\n }\n ?> \n\n \n\n <?php $user_data = get_userdata( $user_ID );?>\n\n <?php \n $ash_personality = get_user_meta( $user_ID, 'ash_personality', true );\n $ash_first_date = get_user_meta( $user_ID, 'ash_first_date', true );\n $ash_gender = get_user_meta( $user_ID, 'ash_gender', true );\n $ash_partner_gender = get_user_meta( $user_ID, 'ash_partner_gender', true );\n $ash_age_group = get_user_meta( $user_ID, 'ash_age_group', true );\n $ash_partner_age_group = get_user_meta( $user_ID, 'ash_partner_age_group', true );\n $ash_relationship_time = get_user_meta( $user_ID, 'ash_relationship_time', true );\n $ash_your_budget = get_user_meta( $user_ID, 'ash_your_budget', true );\n $ash_not_interested = get_user_meta( $user_ID, 'ash_not_interested', true );\n $ash_zip_code = get_user_meta( $user_ID, 'ash_zip_code', true );\n $ash_how_far = get_user_meta( $user_ID, 'ash_how_far', true );\n $ash_car_service = get_user_meta( $user_ID, 'ash_car_service', true );\n ?>\n <?php \n $users = get_userdata( $user_ID ); \n\n // echo \"<pre>\";\n // print_r($users);\n // echo \"</pre>\";\n\n $user_name = $users->user_login;\n $user_email = $users->user_email;\n $full_name = $users->display_name;\n ?> \n<div class=\"mainwraper\">\n <section>\n <div class=\"container\">\n <div class=\"col-sm-3\">\n <div class=\"text-center\"> <img src=\"http://lorempixel.com/200/200/people/9/\" class=\"avatar img-circle img-thumbnail\" alt=\"avatar\">\n <h6>Upload a different photo...</h6>\n <input type=\"file\" class=\"text-center center-block well well-sm\">\n </div>\n <ul class=\"list-group mxwdth\">\n <li class=\"list-group-item text-muted\" contenteditable=\"false\"><strong>Personal Details</strong></li>\n <li class=\"list-group-item text-right\"><span class=\"pull-left\"><strong class=\"\">Name:</strong></span><input name=\"\" value=\"<?php echo $user_name;?>\" type=\"text\" disabled></li>\n <li class=\"list-group-item text-right\"><span class=\"pull-left\"><strong class=\"\">User Name:</strong></span><input name=\"\" value=\"<?php echo $full_name;?>\" type=\"text\" disabled></li>\n <li class=\"list-group-item text-right\"><span class=\"pull-left\"><strong class=\"\"><strong>Email:</strong></strong></span><input name=\"\" value=\"<?php echo $user_email;?>\" type=\"text\" disabled></li>\n </ul>\n </div>\n <div class=\"col-sm-9\">\n \n <form id=\"ash_edit_registration_form\" class=\"ash_edit_form\" action=\"\" method=\"POST\">\n <fieldset> \n\n <div class=\"aaa_quz\">\n <p class=\"aaa_bld\">Do you need to change any Date Personality Profile answers?</p>\n <div class=\"aaa_edt\">\n <input type=\"radio\" name=\"ash_edit_personality\" value=\"Yes\" <?php if($ash_personality == 'Yes'){echo 'checked';}?>> Yes<br>\n <input type=\"radio\" name=\"ash_edit_personality\" value=\"No\" <?php if($ash_personality == 'No'){echo 'checked';}?>> No<br>\n </div>\n </div>\n <div class=\"aaa_quz\">\n <p class=\"aaa_bld\">Is this your first date?</p>\n <div class=\"aaa_edt\">\n <input type=\"radio\" name=\"ash_edit_first_date\" value=\"Yes\" <?php if($ash_first_date == 'Yes'){echo 'checked';}?>> Yes<br>\n <input type=\"radio\" name=\"ash_edit_first_date\" value=\"No\" <?php if($ash_first_date == 'No'){echo 'checked';}?>> No<br>\n </div>\n </div>\n <div class=\"aaa_quz\">\n <p class=\"aaa_bld\">What is your gender?</p>\n <div class=\"aaa_edt\">\n <input type=\"radio\" name=\"ash_edit_gender\" id=\"ash_edit_gender1\" value=\"Male\" <?php if($ash_gender == 'Male'){echo 'checked';}?>> Male<br>\n <input type=\"radio\" name=\"ash_edit_gender\" id=\"ash_edit_gender2\" value=\"Female\" <?php if($ash_gender == 'Female'){echo 'checked';}?>> Female<br>\n </div>\n </div>\n <div class=\"aaa_quz\">\n <p class=\"aaa_bld\">What is your partner's gender?</p>\n <div class=\"aaa_edt\">\n <input type=\"radio\" name=\"ash_edit_partner_gender\" id=\"ash_edit_partner_gender_1\" value=\"Male\" <?php if($ash_partner_gender == 'Male'){echo 'checked';}?>> Male<br>\n <input type=\"radio\" name=\"ash_edit_partner_gender\" id=\"ash_edit_partner_gender_2\" value=\"Female\" <?php if($ash_partner_gender == 'Female'){echo 'checked';}?>> Female<br>\n </div>\n </div> \n <div class=\"aaa_quz\">\n <p class=\"aaa_bld\">Select your age group</p>\n <div class=\"aaa_edt\">\n <select name=\"ash_edit_age_group\" id=\"ash_edit_age_group\" class=\"form-control\">\n <option <?php if($ash_age_group == ''){echo 'selected';}?> value=\"\">Select</option>\n <option <?php if($ash_age_group == '18-25'){echo 'selected';}?> value=\"18-25\">18-25</option>\n <option <?php if($ash_age_group == '26-34'){echo 'selected';}?> value=\"26-34\">26-34</option>\n <option <?php if($ash_age_group == '35-48'){echo 'selected';}?> value=\"35-48\">35-48</option>\n <option <?php if($ash_age_group == '49-67'){echo 'selected';}?> value=\"49-67\">49-67</option>\n </select>\n </div>\n </div>\n <div class=\"aaa_quz\">\n <p class=\"aaa_bld\">Select your partner's age group?</p>\n <div class=\"aaa_edt\">\n <select name=\"ash_edit_partner_age_group\" id=\"ash_edit_partner_age_group\" class=\"form-control\">\n <option <?php if($ash_partner_age_group == ''){echo 'selected';}?> value=\"\">Select</option>\n <option <?php if($ash_partner_age_group == '18-25'){echo 'selected';}?> value=\"18-25\">18-25</option>\n <option <?php if($ash_partner_age_group == '26-34'){echo 'selected';}?> value=\"26-34\">26-34</option>\n <option <?php if($ash_partner_age_group == '35-48'){echo 'selected';}?> value=\"35-48\">35-48</option>\n <option <?php if($ash_partner_age_group == '49-67'){echo 'selected';}?> value=\"49-67\">49-67</option>\n </select>\n </div>\n </div>\n <div class=\"aaa_quz\">\n <p class=\"aaa_bld\">How long have you been in a relationship with your partner?</p>\n <div class=\"aaa_edt\">\n <select name=\"ash_edit_relationship_time\" id=\"ash_edit_relationship_time\" class=\"form-control\">\n <option <?php if($ash_relationship_time == ''){echo 'selected';}?> value=\"\">Select</option>\n <option <?php if($ash_relationship_time == '18-25'){echo 'selected';}?> value=\"18-25\">18-25</option>\n <option <?php if($ash_relationship_time == '26-34'){echo 'selected';}?> value=\"26-34\">26-34</option>\n <option <?php if($ash_relationship_time == '35-48'){echo 'selected';}?> value=\"35-48\">35-48</option>\n <option <?php if($ash_relationship_time == '49-67'){echo 'selected';}?> value=\"49-67\">49-67</option>\n </select>\n </div>\n </div>\n <div class=\"aaa_quz\">\n <p class=\"aaa_bld\">What is your budget?</p> \n <div class=\"aaa_edt\">\n <input type=\"radio\" name=\"ash_edit_your_budget\" id=\"ash_edit_your_budget1\" <?php if($ash_your_budget == '$30-60'){echo 'checked';}?> value=\"$30-60\"> $30-60<br>\n <input type=\"radio\" name=\"ash_edit_your_budget\" id=\"ash_edit_your_budget2\" <?php if($ash_your_budget == 'Under$100'){echo 'checked';}?>value=\"Under$100\"> Under$100<br>\n <input type=\"radio\" name=\"ash_edit_your_budget\" id=\"ash_edit_your_budget3\" <?php if($ash_your_budget == 'Under$200'){echo 'checked';}?>value=\"Under$200\"> Under$200<br>\n <input type=\"radio\" name=\"ash_edit_your_budget\" id=\"ash_edit_your_budget4\" <?php if($ash_your_budget == 'I want to fun'){echo 'checked';}?>value=\"I want to fun\"> I want to fun<br>\n </div>\n </div> \n <div class=\"aaa_quz\">\n <p class=\"aaa_bld\">Is there anything specific you are not interested in doing or trying?</p>\n <div class=\"aaa_edt\"><textarea name=\"ash_edit_not_interested\" id=\"ash_edit_not_interested\" class=\"form-control\"><?php echo $ash_not_interested;?></textarea></div>\n </div>\n <div class=\"aaa_quz\">\n <p class=\"aaa_bld\">Are you open to traveling?</p>\n <div class=\"aaa_edt\" style=\"clear:both;\">\n <input class=\"form-control\" type=\"text\" name=\"ash_edit_zip_code\" id=\"ash_edit_zip_code\" value = \"<?php echo $ash_zip_code;?>\" placeholder=\"zip-code\">\n </div>\n </div>\n\n <div class=\"aaa_quz\">\n <p class=\"aaa_bld\">How far?</p>\n <div class=\"aaa_edt\">\n <select name=\"ash_edit_how_far\" id=\"ash_edit_how_far\" class=\"form-control\">\n <option <?php if($ash_how_far == ''){echo 'selected';}?> value=\"\">Select</option>\n <option <?php if($ash_how_far == '18-25'){echo 'selected';}?> value=\"18-25\">18-25</option>\n <option <?php if($ash_how_far == '26-34'){echo 'selected';}?> value=\"26-34\">26-34</option>\n <option <?php if($ash_how_far == '35-48'){echo 'selected';}?> value=\"35-48\">35-48</option>\n <option <?php if($ash_how_far == '49-67'){echo 'selected';}?> value=\"49-67\">49-67</option>\n </select> \n </div>\n </div>\n <div class=\"aaa_quz\">\n <p class=\"aaa_bld\">Would you like to include car service in your package?</p>\n <div class=\"aaa_edt\">\n <input type=\"radio\" name=\"ash_edit_car_service\" <?php if($ash_car_service == 'Yes'){echo 'checked';}?> value=\"Yes\"> Yes<br>\n <input type=\"radio\" name=\"ash_edit_car_service\" <?php if($ash_car_service == 'No'){echo 'checked';}?> value=\"No\"> No<br>\n </div>\n </div>\n <div class=\"clearfix\"></div>\n <p>\n <input type=\"hidden\" name=\"ash_edit_register_nonce\" value=\"<?php echo wp_create_nonce('ash-edit-register-nonce'); ?>\"/>\n <input class=\"btn btn-primary login-button btn-xs\" type=\"submit\" value=\"<?php _e('Edit Your Account'); ?>\"/>\n </p>\n </fieldset>\n </form>\n </div>\n </div>\n </section> \n</div> \n <?php\n return ob_get_clean();\n}", "title": "" }, { "docid": "0a9f53e19ec520ece5df9c85e919712e", "score": "0.5824479", "text": "public function profile() {\n\n\t\t// Initialize the $msg variable to nothing\n\t\t$msg = \"\";\n\n\t\t// Check if any data was posted from the form\n\t\tif ($_POST) {\n\n\t\t\t// User details posted for update\n\t\t\t// Call the appropriate method from the auth_model\n\t\t\t$msg .= $this->auth_model->profile_update();\n\n\t\t}\t//\tChecking for posting of any profile details\n\n\t\t//\tRun the query to get the current user's profile details\n\t\t$user_criteria_array = array('user_id' => $this->session->userdata('user_id'));\n\t\t$query = $this->db->get_where($this->vw_users, $user_criteria_array);\n\n\t\t// Check for results\n\t\tif ($query->num_rows() == 1) {\n\n\t\t\t// Successfully retrieved user details from the database\n\t\t\t// Now prepare to load the user profie view\n\t\t\t$data = array(\n\t\t\t\t\t'view' => 'user/profile',\n\t\t\t\t\t'user_details' => $query->row_array(),\n\t\t\t\t\t'msg' => $msg\n\t\t\t\t);\n\n\t\t\t// Load the view\n\t\t\t$this->load->view('main_template', $data);\n\n\t\t} else {\n\n\t\t\t// No results were fetched for the user_id provided\n\t\t\t// Notify the user that his/her details could not be found\n\t\t\t// This is of course most weird because then how did the user log in?\n\t\t\t// Maybe his/her details were deleted while they were still logged in ...\n\t\t\t// Does this necessitate us to validate sessions using the users table everytime?\n\t\t\t// Are we willing to underwrite such database overheads? HELL NO!!!\n\t\t\t$data = array(\n\t\t\t\t\t'view' => 'common/notifications',\n\t\t\t\t\t'msg' => array('type'=>'error','message'=>'Your details could not be found in the database. Please try again later.')\n\t\t\t\t);\n\n\t\t\t// Load the view\n\t\t\t$this->load->view('main_template', $data);\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "f67b735d44a16e5e2604d87a99a9613d", "score": "0.5820016", "text": "private function check_pseudo() \n {\n return (\n $this->field_is_filled(\n 'signup-username', \n 'Please enter your username'\n )\n );\n }", "title": "" }, { "docid": "fe07b032688e32c251bad2c90ca18abe", "score": "0.5814963", "text": "function update_gradlift(){\n global $ultimatemember;\n $user_data = $_POST['user_data'];\n\n if ($user_data == 'transcripts') {\n $to_update['are_transcripts_submitted'] = 'true'; \n }\n if ($user_data == 'summary') {\n $to_update['is_summary_submitted'] = 'true'; \n }\n if ($user_data == 'loans') {\n $to_update['are_loans_submitted'] = 'true'; \n }\n if ($user_data == 'terms') {\n $to_update['agreed_terms'] = 'true'; \n }\n \n $ultimatemember->user->update_profile( $to_update );\n\n exit;\n}", "title": "" }, { "docid": "a23eebd5af9c6f3beeefdc4f472c0b86", "score": "0.58083373", "text": "public function viewProfile(){\n if(empty($this->auth())){\n Utils::response(['status'=>false,'message'=>'Forbidden access.'],403);\n }\n Utils::response(['status'=>true,'message'=>'Your account details.','data'=>$this->auth()]);\n }", "title": "" }, { "docid": "7784edf670737349c28dc4181c6a5cc0", "score": "0.58053505", "text": "public function completeProfile()\r\n {\r\n $settings = \\Users\\Models\\Settings::fetch();\r\n // check, if front-end registration is enabled\r\n if( $settings->{'general.registration.enabled' } == '0' ){\r\n \t$f3->reroute( '/login' );\r\n }\r\n \r\n if (!$settings->isSocialLoginEnabled())\r\n {\r\n \\Dsc\\System::addMessage( 'Social login is not supported.', 'error' );\r\n \\Base::instance()->reroute( \"/login\" );\r\n }\r\n \r\n $f3 = \\Base::instance();\r\n \r\n try \r\n {\r\n \r\n $data = \\Dsc\\System::instance()->get('session')->get('users.incomplete_provider_data' );\r\n $data['email'] = $this->input->get( 'email', null, 'string' );\r\n $data['username'] = $this->input->get( 'username', null, 'string' );\r\n \r\n // we just got an email from a customer, so we need to verify it\r\n $user = \\Users\\Models\\Users::createNewUser($data, 'auto_login_with_validation');\r\n \r\n // social login should always login the user if successful,\r\n // so login the user if they aren't already logged in\r\n if (empty($this->getIdentity()->id)) {\r\n \\Dsc\\System::instance()->get( 'auth' )->login( $user );\r\n }\r\n \r\n \\Dsc\\System::instance()->get('session')->set('users.incomplete_provider_data', array() );\r\n \r\n } \r\n catch (\\Exception $e) \r\n {\r\n switch ($e->getCode()) \r\n {\r\n \tcase \\Users\\Models\\Users::E_EMAIL_EXISTS:\r\n \t \r\n \t // This email is already registered\r\n \t // Push the user back to the login page,\r\n \t // and tell them that they must first sign-in using another method (the one they previously setup),\r\n \t // then upon login, they can link this current social provider to their existing account\r\n \t \\Dsc\\System::addMessage( 'This email is already registered.', 'error' );\r\n \t \\Dsc\\System::addMessage( 'Please login using the registered email address or with the other social profile that also uses this email address.', 'error' );\r\n \t \\Dsc\\System::addMessage( 'Once you are logged in, you may link additional social profiles to your account.', 'error' );\r\n \t \r\n \t $f3->reroute( '/login' );\r\n \t \r\n \t break;\r\n \tdefault:\r\n \t \r\n \t \\Dsc\\System::addMessage( 'Registration failed.', 'error' );\r\n \t \\Dsc\\System::addMessage( $e->getMessage(), 'error' );\r\n \t \r\n \t \\Dsc\\System::instance()->setUserState('users.site.login.complete_profile.flash_filled', true);\r\n \t $flash = \\Dsc\\Flash::instance();\r\n \t $flash->store($data);\r\n \t \r\n \t $f3->reroute('/login/completeProfile');\r\n \t \r\n \t break;\r\n }\r\n \r\n return;\r\n }\r\n\r\n // if we have reached here, then all is right with the world.\r\n // redirect to the requested target, or the default if none requested\r\n $redirect = '/user';\r\n if ($custom_redirect = \\Dsc\\System::instance()->get( 'session' )->get( 'site.login.redirect' ))\r\n {\r\n $redirect = $custom_redirect;\r\n }\r\n \\Dsc\\System::instance()->get( 'session' )->set( 'site.login.redirect', null );\r\n $f3->reroute( $redirect );\r\n }", "title": "" }, { "docid": "f97be1027e03c74974d5746dd2ba118d", "score": "0.5804198", "text": "public function adminchkphoneexist(){\n $userprofiles = TableRegistry::get('UserProfiles');\n $phone_number = $this->request->getQuery('user_profile.phone_number');\n $userprofiles = $userprofiles->find()->where(['UserProfiles.phone_number' => $phone_number])->first();\n if(!empty($userprofiles)){\n echo 'false';\n }else{\n echo 'true';\n }\n exit();\n }", "title": "" }, { "docid": "cfadf2f6debf55d9af94b2f834ccf92a", "score": "0.5801258", "text": "public function get_profile_box()\n\t{\n if(UserHelper::isLoggedIn())\n {\n $this->load->view('global/_profile_box');\n }\n else\n {\n $this->load->view('global/_login_form');\n }\n\t}", "title": "" }, { "docid": "674bf73b7afac66358349dc8a004851e", "score": "0.5798924", "text": "function extra_user_profile_fields_woo($user_id) {\n ?>\n <fieldset>\n <legend><?php _e(\"Minter store information\", \"blank\"); ?></legend>\n <p class=\"woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide\">\n <label for=\"<?php echo self::getKeyExternalMinterAddress();?>\"><?php _e( 'Ваш личный адрес в Minter', 'minter-store' ); ?>\n <input type=\"text\" class=\"woocommerce-Input woocommerce-Input--text input-text\" name=\"<?php echo self::getKeyExternalMinterAddress();?>\" id=\"<?php echo self::getKeyExternalMinterAddress();?>\" value=\"<?php echo esc_attr( $this->getExternalMinterAddress()); ?>\" />\n </p>\n </fieldset>\n\n <?php\n }", "title": "" }, { "docid": "b6281dc09f9ecf5d03c89c1d80233481", "score": "0.5797377", "text": "function check_user() {\n $current_user = wp_get_current_user();\n \n if( $current_user->ID ) {\n $last_login = ( isset( $current_user->last_login ) ) ? strtotime( $current_user->last_login ) : 0;\n \n $duration = 24 * 60 * 60; //24hours\n if( (time() - $last_login ) > $duration ) {\n $this->update( $current_user->ID );\n }\n }\n }", "title": "" }, { "docid": "857d693cce59470ae7e0a8097f37389e", "score": "0.57972467", "text": "function custom_user_profile_fields($user){\n if(is_object($user)) {\n $company = esc_attr( get_the_author_meta( 'company', $user->ID ) );\n\t\t\t\t$wikiPic = esc_attr( get_the_author_meta( 'wikiPicfile', $user->ID ) );\n } else {\n $company = null;\n\t\t}\n ?>\n <h3>Extra profile information</h3>\n <table class=\"form-table\">\n <tr>\n <th><label for=\"company\">Wiki URL</label></th>\n <td>\n <input type=\"text\" class=\"regular-text\" name=\"company\" value=\"<?php echo $company; ?>\" id=\"company\" /><br />\n <span class=\"description\">Json URL</span>\n </td>\n </tr>\n\t\t\t\t<tr>\n <th><label for=\"pic\">Wiki Pic</label></th>\n <td>\n <img alt=\"<?php echo $wikiPic; ?>\" src=\"<?php echo $wikiPic; ?>\" class=\"avatar avatar-96 photo\" height=\"96\" width=\"96\">\n <br><span class=\"description\">Json URL</span>\n </td>\n </tr>\n </table>\n<?php\n}", "title": "" }, { "docid": "a4146bafcae27057ee0354b738406ba4", "score": "0.57874036", "text": "private function checkProfile()\n{\n\t$profileArr=array();\n\t$profileObj= new JPROFILE;\n\tif($this->validArray)\n\t{\n\t\t$profileArr= $profileObj->checkPhone($this->validArray,$this->isd);\n\t\tif($profileArr)\n\t\t{\n\t\t\tforeach($profileArr as $key=>$profileDetails)\n\t\t\t{\n\t\t\t\tif($profileDetails['PROFILEID'] && (LoggedInProfile::getInstance()->getPROFILEID()!=$profileDetails[\"PROFILEID\"]))\n\t\t\t\t{\n\t\t\t\t\t$this->duplicateProfiles[$profileDetails[\"PROFILEID\"]][\"PHONE_TYPE\"] = $profileDetails[\"TYPE\"];\n\t\t\t\t\t$this->duplicateProfiles[$profileDetails[\"PROFILEID\"]][\"PHONE_NUMBER\"] = $profileDetails[\"NUMBER\"];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "d598f5ea2a6722deb710cae5b8f2da8e", "score": "0.5784022", "text": "protected function _isProfilesDefaultActionAvailable()\n {\n if (count($this->getProfiles()) <= 1) {\n return false;\n }\n \n return $this->getGridModel()\n ->checkUserPermissions(\n array(\n BL_CustomGrid_Model_Grid_Sentry::ACTION_CHOOSE_OWN_USER_DEFAULT_PROFILE,\n BL_CustomGrid_Model_Grid_Sentry::ACTION_CHOOSE_OTHER_USERS_DEFAULT_PROFILE,\n BL_CustomGrid_Model_Grid_Sentry::ACTION_CHOOSE_OWN_ROLE_DEFAULT_PROFILE,\n BL_CustomGrid_Model_Grid_Sentry::ACTION_CHOOSE_OTHER_ROLES_DEFAULT_PROFILE,\n BL_CustomGrid_Model_Grid_Sentry::ACTION_CHOOSE_GLOBAL_DEFAULT_PROFILE,\n )\n );\n }", "title": "" }, { "docid": "e7161d0df4e25645edfda54470a6440b", "score": "0.5783426", "text": "function seb_add_user_profile_fields( $user )\n{\n ?>\n <h3 id=\"bpost\">Informations bpost</h3>\n <table class=\"form-table\">\n <tr>\n <th><label for=\"bpost_accountid\">Account ID</label></th>\n <td>\n <input type=\"text\" inputmode=\"numeric\" name=\"bpost_accountid\" id=\"bpost_accountid\" value=\"<?php echo esc_attr( get_user_meta( $user->ID, 'bpost_accountid', true ) ); ?>\" class=\"regular-text\" /><br />\n <!-- <span class=\"description\"><?php _e(\"Please enter your address.\"); ?></span> -->\n </td>\n </tr>\n <tr>\n <th><label for=\"bpost_passphrase\">Passphrase</label></th>\n <td>\n <input type=\"password\" name=\"bpost_passphrase\" id=\"bpost_passphrase\" value=\"<?php echo esc_attr( get_user_meta( $user->ID, 'bpost_passphrase', true ) ); ?>\" class=\"regular-text\" /><br />\n </td>\n </tr>\n </table>\n <?php\n}", "title": "" }, { "docid": "e1c3f2b49c9a661b800c0c47cf15f27a", "score": "0.5776913", "text": "public function ubah_profil()\n\t{\n\t\t$data['title'] = 'Ubah Profil';\n\t\t$data['user'] = $this->Admin_model->get_user();\n\n\t\t// form_validation\n\t\t$this->form_validation->set_rules(\n\t\t\t'enama',\n\t\t\t'Nama lengkap',\n\t\t\t'trim|required',\n\t\t\t[\n\t\t\t\t'required' => 'Nama lengkap harus diisi'\n\t\t\t]\n\t\t);\n\n\n\t\tif ($this->form_validation->run() == FALSE) {\n\t\t\t# code...\n\t\t\t$this->load->view('templates/admin/header', $data);\n\t\t\t$this->load->view('templates/admin/sidebar', $data);\n\t\t\t$this->load->view('templates/admin/topbar', $data);\n\t\t\t$this->load->view('admin/ubah_profil', $data);\n\t\t\t$this->load->view('templates/admin/footer');\n\t\t} else {\n\t\t\t# code...\n\t\t\t$this->update_profil();\n\t\t}\n\t}", "title": "" }, { "docid": "d09f528b1bd9c7651f75af93985e101e", "score": "0.57755196", "text": "function IsUserAdmin(){\r\n\tglobal $user_data;\r\n\tif($user_data[\"user_admin\"] == 1 || $user_data[\"user_coadmin\"] == 1 || $user_data[\"management_user\"] == 1) return 1;\r\n\telse return 0;\r\n}", "title": "" }, { "docid": "8047f7b526dc6639813dd0e755d20f22", "score": "0.5769362", "text": "function profile() {\n\t\tglobal $current_user;\n\n\t\tif (!empty( $_GET['user_id'])) {\n\t\t\t$uid = $_GET['user_id'];\n\t\t} else {\n\t\t\t$uid = $current_user->ID;\n\t\t}\n\n\t\t$chat_sounds = get_user_meta( $uid, 'chat_sounds' );\n\t\t?>\n\t <h3><?php _e('Chat Settings', $this->translation_domain); ?></h3>\n\n\t <table class=\"form-table\">\n\t\t <tr>\n\t\t <th><label for=\"chat_sounds\"><?php _e('Chat sounds', $this->translation_domain); ?></label></th>\n\t\t <td>\n\t\t <select name=\"chat_sounds\" id=\"chat_sounds\">\n\t\t \t<option value=\"enabled\"<?php if ( $chat_sounds == 'enabled' ) { echo ' selected=\"selected\" '; } ?>><?php _e('Enabled', $this->translation_domain); ?></option>\n\t\t \t<option value=\"disabled\"<?php if ( $chat_sounds == 'disabled' ) { echo ' selected=\"selected\" '; } ?>><?php _e('Disabled', $this->translation_domain); ?></option>\n\t\t </select>\n\t\t </td>\n\t\t </tr>\n\t </table>\n\t <?php\n\t}", "title": "" }, { "docid": "5b10d32967cc04ed77028d2514d5cd18", "score": "0.57677877", "text": "function pmprorh_rf_show_extra_frontend_profile_fields( $user, $withlocations = false ) {\n\tglobal $pmprorh_registration_fields;\n\n\t//which fields are marked for the profile\n\t$profile_fields = pmprorh_getProfileFields($user->ID, $withlocations);\n\n\t//show the fields\n\tif ( ! empty( $profile_fields ) && $withlocations ) {\n\t\tforeach( $profile_fields as $where => $fields ) {\n\t\t\t$box = pmprorh_getCheckoutBoxByName( $where );\n\n\t\t\t// Only show on front-end if there are fields to be shown.\n\t\t\t$show_fields = false;\n\t\t\tforeach( $fields as $key => $field ) {\n\t\t\t\tif ( $field->profile !== 'only_admin' ) {\n\t\t\t\t\t$show_fields = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Bail if there are no fields to show on the front-end profile.\n\t\t\tif ( ! $show_fields ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t?>\n\n\t\t\t<div class=\"pmpro_checkout_box-<?php echo $where; ?>\">\n\t\t\t\t<?php if ( ! empty( $box->label ) ) { ?>\n\t\t\t\t\t<h3><?php echo $box->label; ?></h3>\n\t\t\t\t<?php } ?>\n\n\t\t\t\t<div class=\"pmpro_member_profile_edit-fields\">\n\t\t\t\t\t<?php\n\t\t\t\t\t\t // Cycle through groups.\n\t\t\t\t\t\tforeach( $fields as $field ) {\n\t\t\t\t\t\t\tif ( is_a( $field, 'PMProRH_Field' ) && $field->profile !== 'only_admin' ) {\n\t\t\t\t\t\t\t\t$field->displayAtCheckout( $user->ID );\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</div> <!-- end pmpro_member_profile_edit-fields -->\n\t\t\t</div> <!-- end pmpro_checkout_box_$where -->\n\t\t\t<?php\n\t\t}\n\t} elseif ( ! empty( $profile_fields ) ) { ?>\n\t\t<div class=\"pmpro_member_profile_edit-fields\">\n\t\t\t<?php\n\t\t\t\t // Cycle through groups.\n\t\t\t\tforeach( $fields as $field ) {\n\t\t\t\t\tif ( is_a( $field, 'PMProRH_Field' ) && $field->profile !== 'only_admin' ) {\n\t\t\t\t\t\t$field->displayAtCheckout( $user->ID );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t?>\n\t\t</div> <!-- end pmpro_member_profile_edit-fields -->\n\t\t<?php\n\t}\n}", "title": "" }, { "docid": "4b962cfffe4bcc8bddd9ed1fc7114051", "score": "0.57659686", "text": "public function action_profile()\r\n\t{\r\n\t}", "title": "" }, { "docid": "91423e445433a8073e6a12af071d8e48", "score": "0.5762673", "text": "public function profileUser();", "title": "" }, { "docid": "92c79bdb0816b4089eba0995e4993b93", "score": "0.5753363", "text": "function commerce_store_access_add_people_page_validate($form, &$form_state) {\n $username = $form_state['values']['user'];\n $store = $form_state['store'];\n $field_members = field_get_items('commerce_store', $store, 'cmp_m_store');\n $members = array();\n foreach ($field_members as $m) {\n $members[] = $m['target_id'];\n }\n $account = user_load_by_name($username);\n if (!$account) {\n form_set_error('user', t('Invalid user name.'));\n }\n elseif (in_array($account->uid, $members)) {\n form_set_error('user', t('User @name is already a member of this store.', array('@name' => $account->name)));\n }\n else {\n $form_state['target_uid'] = $account->uid;\n }\n}", "title": "" }, { "docid": "e59b03a2989c193e05d942b5bc5e47a3", "score": "0.57517874", "text": "protected function _isProfilesEditActionAvailable()\n {\n return $this->getGridModel()\n ->checkUserActionPermission(BL_CustomGrid_Model_Grid_Sentry::ACTION_EDIT_PROFILES);\n }", "title": "" }, { "docid": "12a5bc8fc60986996100da05855486af", "score": "0.5747016", "text": "function pkg_autologin_check_view_permissions($user_id=NULL) {\n if ($user_id === NULL) {\n $user_id = wp_get_current_user()->ID;\n }\n \n return (defined(\"IS_PROFILE_PAGE\") && IS_PROFILE_PAGE) || pkg_autologin_check_modify_permissions();\n}", "title": "" }, { "docid": "23f2886faa191a80d73f74508d088891", "score": "0.5745824", "text": "function bpfilter_hide_profile_edit( $retval ) { \n // remove field from edit tab\n if( bp_is_profile_edit() ) { \n $retval['exclude_fields'] = '6'; // field ID's separated by comma\n } \n // remove field on register page\n if ( bp_is_register_page() ) {\n $retval['exclude_fields'] = '6'; // field ID's separated by comma\n } \n\n // show the field on profile view tab\n if ( $data = bp_get_profile_field_data( 'field=6' ) ) : \n $retval['include_fields'] = '6'; // field ID's separated by comma \n endif; \n\n return $retval; \n}", "title": "" }, { "docid": "4e21a580d39f38ad27f2ae54e357c682", "score": "0.5743365", "text": "function validate_user_register()\n\t{\n\t\t$honeepot_field = $this->EE->input->post($this->settings['honeepot_field'], TRUE);\n\n\t\tif($honeepot_field !== '' && $honeepot_field !== FALSE) {\n\t\t\t$errors[] = $this->settings['honeepot_error'];\n\n\t\t\t$this->_log('Solspace User Registration');\n\t\t}\n\n\t\treturn $errors;\n\t}", "title": "" }, { "docid": "6474a70307cf4ead3d891be18e901cdd", "score": "0.57408106", "text": "private function check_account_name()\n { return (\n $this->field_is_filled(\n 'signup-accname', \n 'Please enter your account name'\n )\n );\n }", "title": "" }, { "docid": "3cae95f8f7630c269064c071fdfac686", "score": "0.5739533", "text": "protected function load_user_stuff()\n\t{\n\t\t// queries info\n\t\tif (access::has(\"admin\") && isset($_COOKIE['show_queries_info']))\n\t\t{\n\t\t\tdefine(\"SHOW_QUERIES_INFO\", true);\n\t\t}\n\t}", "title": "" }, { "docid": "65b997d4f6705077c315b9be6ca4dac1", "score": "0.57361025", "text": "function wpau_add_settings_error() {\n\tif ( ! current_user_can( 'manage_options' ) || 0 === stripos( get_current_screen()->id, 'options' ) ) {\n\t\treturn;\n\t}\n\n\t$url = is_multisite() ? network_admin_url( 'settings.php' ) : admin_url( 'options-general.php' );\n\n\tadd_settings_error(\n\t\t'wp-approve-user',\n\t\t'no-users-can-register',\n\t\tsprintf(\n\t\t\t/* translators: Link to options page. */\n\t\t\twp_kses_post( __( 'Please <a href=\"%s\">enable user registrations</a> for WP Approve User to work.' ) ),\n\t\t\tesc_url( $url )\n\t\t),\n\t\t'notice-info'\n\t);\n}", "title": "" }, { "docid": "e38a3bb23f22f556aabb8f69ef1d3b53", "score": "0.5732806", "text": "private static function CheckDataOnUserUpdate( $data ) {\n\t\t\t$validints = array ( 'profile_moodid', 'profile_placeid' );\n\t\t\t$validarrays = array( \n\t\t\t\t'profile_sexualorientation' => array( '-' , 'straight', 'bi', 'gay' ) ,\n \t\t\t\t'profile_relationship' => array( '-', 'single', 'relationship', 'casual', 'engaged', 'married','complicated' ),\n\t\t\t\t'profile_religion' => array( '-', 'christian', 'muslim', 'atheist','agnostic', 'nothing', 'pastafarian', 'pagan', 'budhist', 'greekpolytheism', 'hindu' ),\n\t\t\t\t'profile_politics' => array( '-', 'right', 'left', 'center', 'radical left', 'center left', 'center right', 'nothing', 'anarchism', 'communism', 'socialism', 'liberalism', 'green' ),\n\t\t\t\t'profile_eyecolor' => array ( '-', 'black','brown', 'green', 'blue', 'grey' ),\n\t\t\t\t'profile_haircolor' => array( '-', 'black', 'brown', 'red', 'blond', 'highlights', 'dark', 'grey', 'skinhead' ),\n\t\t\t\t'profile_smoker' => array( '-', 'yes', 'no', 'socially' ),\n\t\t\t\t'profile_drinker' => array( '-', 'yes', 'no', 'socially' ),\n\t\t\t\t'user_gender' => array( '-', 'm', 'f' )\n\t\t\t);\n\n\t\t\tforeach ( $validints as $one ) {\n\t\t\t\tif ( isset( $data[ $one ] ) ) {\n\t\t\t\t\t$data[ $one ] = ( int ) $data[ $one ];\n\t\t\t\t}\n\t\t\t}\n\t\t\tforeach ( $validarrays as $key => $val ) {\n\t\t\t\tif ( isset( $data[ $key ] ) ) {\n\t\t\t\t\tif ( !in_array( $data[ $key ], $val ) ) {\n\t\t\t\t\t\t$data[ $key ] = $val[ 0 ];\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t}\n \n static $textfields = array( 'profile_msn', 'profile_skype', 'profile_yim', 'profile_slogan', 'profile_aboutme' );\n foreach ( $textfields as $field ) {\n if ( isset( $data[ $field ] ) ) {\n $data[ $field ] = preg_replace( '/[\\xC2\\xA0]/', ' ', $data[ $field ] ); //nbsps -> space\n $data[ $field ] = trim( $data[ $field ] );\n if ( $field == 'profile_aboutme' ) {\n $data[ 'profile_aboutme' ] = preg_replace( '/(\\n){3,}/', \"\\n\\n\", $data[ $field ] ); //limit nls to 2 each time\n }\n else {\n $data[ $field ] = preg_replace( '/(\\n)+/', ' ', $data[ $field ] );\n }\n }\n }\n if ( isset( $data[ 'profile_aboutme' ] ) ) {\n $data[ 'profile_aboutme' ] = preg_replace( '/(\\n){2,}/', \"\\n\\n\", $data[ 'profile_aboutme' ] );\n }\n\t\n\t\t\treturn $data;\n\t\t}", "title": "" }, { "docid": "459fb7ba6e43854fffbc10176a6bfd2b", "score": "0.5732288", "text": "function user_profile() {\n $this->page_title();\n $this->extra_cms();\n $this->city_footer();\n\n $this->checkUserSession();\n\n\n $this->data = $this->Session->read(\"fuser_session\");\n\n $this->Session->write(\"fuser_session_id\", $this->data['0']['User']['id']);\n $this->Session->write(\"form1\", $this->data['0']);\n $this->Session->write(\"form2\", $this->data['0']);\n $this->Session->write(\"form3\", $this->data['0']);\n $this->Session->write(\"form4\", $this->data['0']);\n\n\n\n\n $paymenttype = explode(',', $this->data['0']['User']['payment_type']);\n\n for ($i = 0; $i < count($paymenttype); $i++) {\n\n\n\n if ($paymenttype[$i] == 'Diners Club') {\n $this->data[0]['User']['service_hours_dinerclub'] = 'Diners Club';\n } elseif ($paymenttype[$i] == 'American Express') {\n\n $this->data[0]['User']['service_hours_aexpress'] = 'American Express';\n } elseif ($paymenttype[$i] == 'Mastercard') {\n $this->data[0]['User']['service_hours_mastercard'] = 'Mastercard';\n } elseif ($paymenttype[$i] == 'Visa') {\n $this->data[0]['User']['service_hours_visa'] = 'Visa';\n } elseif ($paymenttype[$i] == 'Paypal') {\n $this->data[0]['User']['service_hours_paypal'] = 'Paypal';\n } elseif ($paymenttype[$i] == 'Personal Checks') {\n $this->data[0]['User']['service_hours_pchecks'] = 'Personal Checks';\n } elseif ($paymenttype[$i] == 'Discover') {\n $this->data[0]['User']['service_hours_discover'] = 'Discover';\n } elseif ($paymenttype[$i] == 'Debit Card') {\n $this->data[0]['User']['service_hours_dcard'] = 'Debit Card';\n } elseif ($paymenttype[$i] == 'Money Orders') {\n $this->data[0]['User']['service_hours_morders'] = 'Money Orders';\n } elseif ($paymenttype[$i] == 'Cash Only') {\n $this->data[0]['User']['service_hours_cashonly'] = 'Cash Only';\n }\n }\n $this->set('data', $this->data['0']);\n\n $this->set('address', $this->data['0']['User']['street_address'] . $this->data['0']['User']['city'] . $this->State->state_name($this->data['0']['User']['state']) . $this->Country->country_name($this->data['0']['User']['country']));\n $this->set('tilte', $this->data['0']['User']['business_name']);\n\n $this->head_category();\n }", "title": "" }, { "docid": "e2b0e11b884a6e53539d2948d7a845e9", "score": "0.5730606", "text": "public function showadminprofile()\n {\n $user = Auth::user();\n $profile = AdminProfile::whereUserId($user->id)->first();\n\n $this->check_notification($user);\n\n //Check Message in Message Table\n $u = $user;\n\n\n $this->check_messages($u);\n\n\n\n return view('Admin.ManageProfile.showprofile')->with('pro',$profile)->with('shown',$this->shown)->with('total_message',$this->total_messages)\n ->with('data',$this->user_data)->with('time',$this->time)->with('ids',$this->ids)->with('user',$user);\n\n }", "title": "" }, { "docid": "5504aab64fc978f94f3e686b9ab498b9", "score": "0.5727961", "text": "private function is_simple_user_allowed(){\n\t\t\t return $this->options[self::$ALLOW_SIMPLE_USER_KEY];\n\t}", "title": "" }, { "docid": "79003507a1eef017135450ff50f43b4a", "score": "0.5718098", "text": "public function profile()\n {\n if($this->app->user->account == 'guest') $this->locate(inlink('login'));\n $this->view->user = $this->user->getByAccount($this->app->user->account);\n $this->display();\n }", "title": "" }, { "docid": "39a31073c9769bd1ec72d2debd0da99c", "score": "0.57128274", "text": "function hasDetails(){\r\n\t\treturn !empty($this->username) && !empty($this->password);\r\n\t}", "title": "" }, { "docid": "6e6e4a6342faa1bbcd729a132d90fa7c", "score": "0.5707157", "text": "function at_welcome_is_pro_user() {\n $isPro = false;\n $options = get_option('addthis_settings');\n $profile = $options['profile'];\n if ($profile) {\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, \"http://q.addthis.com/feeds/1.0/config.json?pubid=\" . $profile);\n\n // receive server response ...\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n // further processing ....\n $server_output = curl_exec($ch);\n curl_close($ch);\n \n $array = json_decode($server_output);\n // check for pro user\n if (array_key_exists('_default',$array)) {\n $isPro = true;\n } else {\n $isPro = false;\n }\n }\n return $isPro;\n}", "title": "" }, { "docid": "4148cc40fd576e7b9cd43ff46d8715f3", "score": "0.570575", "text": "public function check_page() {\n\t\t// If the user hits plain /wp-admin/ then disable Calypso styles.\n\t\t$page = wp_basename( esc_url( $_SERVER['REQUEST_URI'] ) );\n\n\t\tif ( false !== strpos( 'index.php', $page ) || false !== strpos( 'wp-admin', $page ) ) {\n\t\t\tupdate_user_meta( get_current_user_id(), 'calypsoify', 0 );\n\t\t\twp_safe_redirect( admin_url() );\n\t\t\tdie;\n\t\t}\n\t}", "title": "" }, { "docid": "400415b305b9ac2330c041662f89e673", "score": "0.57017636", "text": "function ciusan_restrict_widget_userinfo($input, $var = null){\r\n\tglobal $wpdb;\r\n\t$user = $wpdb->get_row(\"SELECT * FROM $wpdb->users WHERE user_login = '{$input}' OR user_email = '{$input}' OR ID = '{$input}'\");\r\n\tif(!empty($user)){\r\n\r\n\t\tforeach ($user as $key => $value) {\r\n\t\t\t$users_data[$key] = $value; \r\n\t\t}\r\n\r\n\t\t$usermeta = $wpdb->get_results(\"SELECT * FROM $wpdb->usermeta WHERE user_id = '{$user->ID}'\");\r\n\r\n\t\tforeach ($usermeta as $key => $value) {\r\n\t\t\t$users_data[$value->meta_key] = $value->meta_value;\r\n\t\t}\r\n\r\n\t\tif(!is_null($var)){\r\n\t\t\treturn @$users_data[$var];\t\r\n\t\t}else{\r\n\t\t\treturn @$users_data;\r\n\t\t}\t\t\t\r\n\t}else{\r\n\t\treturn null;\r\n\t}\r\n}", "title": "" }, { "docid": "79fe0d046e69ad0be681a3239adc055b", "score": "0.569709", "text": "public function profileOpen()\r\n\t{\r\n\t\tif ( !empty( $this->currProfile ) )\r\n\t\t\treturn true;\r\n\t\t\r\n\t\t$this->errorId = 'ERR0000';\r\n\t\t$this->errorMsg = 'Notice: profileOpen(): No profile open';\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "7d362336d1af8d45a6fdf74d1e7c357b", "score": "0.56941754", "text": "public function MyProfile()\n {\n\n $data = $this->input->post(); \n \n if (!empty($this->input->post())) { \n $success = $this->Authentication_model->updateProfile($data,get_staff_user_id()); \n \n $data['title'] = _l('admin_edit_profile');\n \n if ($success == true) { \n setFlashData(_l('admin_profile_update_success'),'success',_l('success')); \n } else { \n setFlashData(_l('admin_profile_update_fail'),'danger',_l('fail')); \n } \n } \n $data['addAssets'] = true;\n $data['title'] = _l('txt_my_profile');\n $data['admin'] = $this->Authentication_model->getAdmin(get_staff_user_id());\n \n $this->load->view(camelToSnake(getRedirectUrl()).'/staffs/staff',$data);\n }", "title": "" } ]
4b50f68a3dd1f5a3e8d8f666023e7fea
Get / Set the output stream
[ { "docid": "53e20fb06da9180ba71edcc622d1c19f", "score": "0.6613981", "text": "public function OutputStream($stream=null) : mixed\n {\n if($stream == null) return $this->stream;\n else {\n $this->stream = $stream;\n return $this;\n }\n }", "title": "" } ]
[ { "docid": "a3a4c2c94e77194fd9da5795b6ed47d9", "score": "0.7007247", "text": "static public function GetOutputStream() {\n if (isset(self::$output))\n return self::$output;\n else\n return false;\n }", "title": "" }, { "docid": "2cd3b8283a23ff8685f943eac76243c6", "score": "0.66596407", "text": "public function getOutput()\n {\n $this->output = $output;\n }", "title": "" }, { "docid": "ea7447024a0f81c8ed57291d83f49db9", "score": "0.6658285", "text": "public static function getStream() {}", "title": "" }, { "docid": "3883a7ecafdc2161e1426f488685c12c", "score": "0.6648668", "text": "public function getStream() {}", "title": "" }, { "docid": "3883a7ecafdc2161e1426f488685c12c", "score": "0.66468066", "text": "public function getStream() {}", "title": "" }, { "docid": "3883a7ecafdc2161e1426f488685c12c", "score": "0.66468066", "text": "public function getStream() {}", "title": "" }, { "docid": "3883a7ecafdc2161e1426f488685c12c", "score": "0.66468066", "text": "public function getStream() {}", "title": "" }, { "docid": "3883a7ecafdc2161e1426f488685c12c", "score": "0.66468066", "text": "public function getStream() {}", "title": "" }, { "docid": "fcafc5114c51275463b1138b8e2bf49d", "score": "0.6502528", "text": "protected function connectOutput()\n {\n $this->output_handle = fopen($this->output_filepath, 'w');\n }", "title": "" }, { "docid": "df1927029fa8098f80008209e12bc398", "score": "0.64852756", "text": "public function getWriteStream()\n {\n return $this->write_stream;\n }", "title": "" }, { "docid": "d1d781fdc6d8119fb3391998a69f72d7", "score": "0.6439208", "text": "function getStream() {\n\t\t $this->Close();\n\t\t return $this->Stream;\n\t\t}", "title": "" }, { "docid": "c9743f35e132037663578e7627c4a6b7", "score": "0.6404847", "text": "public function getStream();", "title": "" }, { "docid": "c9743f35e132037663578e7627c4a6b7", "score": "0.6404847", "text": "public function getStream();", "title": "" }, { "docid": "c9743f35e132037663578e7627c4a6b7", "score": "0.6404847", "text": "public function getStream();", "title": "" }, { "docid": "c9743f35e132037663578e7627c4a6b7", "score": "0.6404847", "text": "public function getStream();", "title": "" }, { "docid": "c9743f35e132037663578e7627c4a6b7", "score": "0.6404847", "text": "public function getStream();", "title": "" }, { "docid": "c9743f35e132037663578e7627c4a6b7", "score": "0.6404847", "text": "public function getStream();", "title": "" }, { "docid": "ee6776fbc6fa18b18defdb578f148404", "score": "0.63903415", "text": "public function returnStream() {\n return $this->stream;\n }", "title": "" }, { "docid": "b1bfa5219f3b6487a357d75e29c3a8bc", "score": "0.63873416", "text": "public function getStream()\n {\n return $this->stream;\n }", "title": "" }, { "docid": "b1bfa5219f3b6487a357d75e29c3a8bc", "score": "0.63873416", "text": "public function getStream()\n {\n return $this->stream;\n }", "title": "" }, { "docid": "aa7001411caa98544fae24e0f93a3eb1", "score": "0.63569874", "text": "public function getStream()\n\t\t{\n\t\t\treturn $this->stream;\n\t\t}", "title": "" }, { "docid": "f93d772e6209df8d1b2d191691aaa712", "score": "0.63233685", "text": "public function set_output_stream( $output_stream ) {\n\t\t\t$this->output_stream = $output_stream;\n\t\t}", "title": "" }, { "docid": "86243aca3a577ec475576dd4aa9bd481", "score": "0.63204634", "text": "public function getStream() {\n return $this->stream;\n }", "title": "" }, { "docid": "d254d7c0c3ced14c8233aacd3e3ea64c", "score": "0.6247225", "text": "public function getStreamWrapper()\n {\n return $this->_streamWrapper;\n }", "title": "" }, { "docid": "d254d7c0c3ced14c8233aacd3e3ea64c", "score": "0.6247225", "text": "public function getStreamWrapper()\n {\n return $this->_streamWrapper;\n }", "title": "" }, { "docid": "8c98c487bc494e83d15d7b0c6abbd01e", "score": "0.62124676", "text": "public function setOutput()\n\t{\n\t\t$this->createBuilder();\n\t\t$this->builder->setOutput();\n\t}", "title": "" }, { "docid": "fc61211fd01fccb430bc951a9c210595", "score": "0.62072104", "text": "public function output( ) {\n rewind( $this->buffer );\n $output = $this->readBuffer( );\n fclose( $this->buffer );\n\n return $output;\n }", "title": "" }, { "docid": "d7fa79bf91343256c4adbdb4ce677219", "score": "0.6207067", "text": "protected function write_output() {\n\t\t\tif ( null === $this->output_stream ) {\n\t\t\t\techo $this->output_string;\n\t\t\t} else {\n\t\t\t\tfwrite( $this->output_stream, $this->output_string );\n\t\t\t}\n\t\t\t$this->output_string = '';\n\t\t}", "title": "" }, { "docid": "839d96d0157e60367ee73358ef3372dc", "score": "0.62068856", "text": "public function getOutput() {\n return $this->io()->getOutput();\n }", "title": "" }, { "docid": "69d523a8710a14e5542337bb10e051ef", "score": "0.619537", "text": "public function getStream(): mixed;", "title": "" }, { "docid": "6913f9d0c2485b3653c312164e1801c4", "score": "0.6156126", "text": "public function getStreamObject() {}", "title": "" }, { "docid": "d2b55e8f79b651139b491938ff4b59c1", "score": "0.607788", "text": "public function &getStream()\n {\n return $this->_stream;\n }", "title": "" }, { "docid": "57082d81f8665f9a272e7d5fb9cf5d09", "score": "0.6065631", "text": "public function getOutput()\n {\n return $this->output;\n }", "title": "" }, { "docid": "ab841b6ff92115bf0d9e3c4d81eecccc", "score": "0.6035028", "text": "public function getOutput()\n {\n return $this->output;\n }", "title": "" }, { "docid": "ab841b6ff92115bf0d9e3c4d81eecccc", "score": "0.6035028", "text": "public function getOutput()\n {\n return $this->output;\n }", "title": "" }, { "docid": "ab841b6ff92115bf0d9e3c4d81eecccc", "score": "0.6035028", "text": "public function getOutput()\n {\n return $this->output;\n }", "title": "" }, { "docid": "ab841b6ff92115bf0d9e3c4d81eecccc", "score": "0.6035028", "text": "public function getOutput()\n {\n return $this->output;\n }", "title": "" }, { "docid": "ab841b6ff92115bf0d9e3c4d81eecccc", "score": "0.6035028", "text": "public function getOutput()\n {\n return $this->output;\n }", "title": "" }, { "docid": "ab841b6ff92115bf0d9e3c4d81eecccc", "score": "0.6035028", "text": "public function getOutput()\n {\n return $this->output;\n }", "title": "" }, { "docid": "ab841b6ff92115bf0d9e3c4d81eecccc", "score": "0.6035028", "text": "public function getOutput()\n {\n return $this->output;\n }", "title": "" }, { "docid": "532babfec528b2f7b811b9ba9b95959e", "score": "0.60178167", "text": "public function getStream(): StreamInterface\n {\n return $this->stream;\n }", "title": "" }, { "docid": "532babfec528b2f7b811b9ba9b95959e", "score": "0.60178167", "text": "public function getStream(): StreamInterface\n {\n return $this->stream;\n }", "title": "" }, { "docid": "eaa02583f7b25ef13a431d04e75dd5bc", "score": "0.60127705", "text": "public function setStream(&$value)\n {\n $this->_stream = $value;\n }", "title": "" }, { "docid": "b0f104ea3b6c6bf6bc0ed4e25d0ffb57", "score": "0.59879464", "text": "public function stream();", "title": "" }, { "docid": "65a102e16a096d4e033d1c367b26c92a", "score": "0.59832406", "text": "public function getOutputHandler()\n\t{\n\t\treturn $this->_outputHandler;\n\t}", "title": "" }, { "docid": "78dbc0735fd98ce573652d50e4bb0519", "score": "0.59820944", "text": "public function getOutput()\n {\n return $this->output ?? $this->createOutput();\n }", "title": "" }, { "docid": "358fc99ada07e465e1dbde58bb9337ca", "score": "0.59771186", "text": "public static function output_buffer($output)\n {\n // Could be flushing, so send headers first\n if (! Event::has_run('system.send_headers')) {\n // Run the send_headers event\n Event::run('system.send_headers');\n }\n\n self::$output = $output;\n\n // Set and return the final output\n return self::$output;\n }", "title": "" }, { "docid": "d9a15744bd8216bb994960d994fb0b0c", "score": "0.5968069", "text": "public static function setStream($stream) {}", "title": "" }, { "docid": "09a992bc17cb0485a6f2e428bc7b73d9", "score": "0.59599304", "text": "public function getOutput()\n {\n return $this->_output;\n }", "title": "" }, { "docid": "56e1c837519a92aa8dea2c43b454b4b8", "score": "0.59095585", "text": "public function expose()\n\t\t{\n\t\t\treturn $this->stream;\n\t\t}", "title": "" }, { "docid": "67be88befd2cccd3c0bea7d8c6d87ba4", "score": "0.58860034", "text": "public function output($output = null) {\n\t\treturn $this->sget('output', $output);\n\t}", "title": "" }, { "docid": "7c637dafac8d1c8432443dbb3673ea93", "score": "0.5881553", "text": "public function setOutput($output)\n {\n $this->_output = $output;\n }", "title": "" }, { "docid": "38ac5a489ed297edd392b2fe6249f36f", "score": "0.58691525", "text": "public function getOutput()\n\t{\n\t\treturn $this->output;\n\t}", "title": "" }, { "docid": "6039d3aa8aa4e37fc958a387e9f20841", "score": "0.58562875", "text": "public function getDirectOutput()\n {\n return $this->directOutput;\n }", "title": "" }, { "docid": "34075e736e7794be3660d43c486becd5", "score": "0.5840549", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->stream = fopen('php://output', 'w');\n\t}", "title": "" }, { "docid": "ce524b6e66da74f6322a12a61f2cccb5", "score": "0.5825485", "text": "public function sendStream($out) {\r\n //send the output\r\n echo $out;\r\n //flush just to be sure\r\n ob_flush();\r\n flush();\r\n }", "title": "" }, { "docid": "51b500f341047e9c214f3603fed5460b", "score": "0.580411", "text": "public function getOutput()\n {\n return $this->getParameter('output');\n }", "title": "" }, { "docid": "3115014133cd17c562323cf7fb21c2a2", "score": "0.580385", "text": "public function getStream()\n {\n if ($this->stream instanceof \\Closure) {\n $this->stream = $this->stream->__invoke();\n }\n if (is_resource($this->stream)) {\n $meta = stream_get_meta_data($this->stream);\n if ($meta['seekable']) {\n rewind($this->stream);\n }\n }\n return $this->stream;\n }", "title": "" }, { "docid": "843468fb85e25d901276dfc0f8ab0d6c", "score": "0.57997", "text": "function setOutput($output)\r\n\t{\r\n\t\t$this->output = $output;\r\n\t}", "title": "" }, { "docid": "825c586f820ea6a3c987444b73a2184c", "score": "0.5798564", "text": "public function getBufferOutput()\n {\n if($this->_output === null)\n {\n if($this->_blocking === false)\n {\n return $this->_output = $this->generateTmpFile();\n }\n }\n else if($this->_output === self::TEMP)\n {\n return $this->_output = $this->generateTmpFile();\n }\n \n return $this->_output;\n }", "title": "" }, { "docid": "7731ef40a38bcae50ccfa6470e959faf", "score": "0.5777989", "text": "function output() {\n\t\t$_this =& AmfStream::getInstance();\n\t\tprint($_this->__stream);\n\t\t$_this->reset();\n\t\treturn true;\n\t}", "title": "" }, { "docid": "49703ead9e5e40cb222b773c68dea6e0", "score": "0.5776998", "text": "public static function sendStream($out){\n //send the output\n echo $out;\n //flush just to be sure\n ob_flush();\n flush();\n }", "title": "" }, { "docid": "c3279022d887aa254b7a1f355a1e34b1", "score": "0.57742155", "text": "public function getOutput()\r\n\t{\r\n\t\treturn $this->_output;\r\n\t}", "title": "" }, { "docid": "551fe5942391a7b9a33a2f319c440a1d", "score": "0.57590485", "text": "public function setOutput(OutputInterface $output) {\n $output->write($this->output->fetch());\n $this->output = $output;\n }", "title": "" }, { "docid": "3d60949428ff533e6f50963e80b9d490", "score": "0.57471204", "text": "public function setStream($stream) {}", "title": "" }, { "docid": "450ac01c0f0c9b31b8496758b20ce398", "score": "0.574532", "text": "public function getImageOutputStream() {\n\t\t\t//Send Modified Header\n\t\t\theader(\"Content-Type: image/png\");\n\t\t\t\n\t\t\t//Output Image and destroy the Stream\n\t\t\timagepng($this->image);\n\t\t\timagedestroy($this->image);\n\t\t}", "title": "" }, { "docid": "e6650e9268a7101e6d0f4684d240eb38", "score": "0.57433015", "text": "public function getOutputUri()\n {\n return $this->output_uri;\n }", "title": "" }, { "docid": "adac32e0277527c8bac80b1f2b0ea594", "score": "0.57338494", "text": "public function getOutput(): string {\n\t\treturn $this->output;\n\t}", "title": "" }, { "docid": "83bd0cc8b128d364dfe85342bbec83d3", "score": "0.5725206", "text": "public function setOutput($output)\n {\n $this->_output = $output;\n }", "title": "" }, { "docid": "6bfe522233e81ad48560d61084862228", "score": "0.5708552", "text": "public function getOutput()\n\t{\n\t\tif (!$this->output)\n\t\t{\n\t\t\t// In 4.0, this will convert to throwing an exception and you will expected to\n\t\t\t// initialize this in the constructor. Until then set a default.\n\t\t\t$default = new Joomla\\Application\\Cli\\Output\\Xml;\n\t\t\t$this->setOutput($default);\n\t\t}\n\n\t\treturn $this->output;\n\t}", "title": "" }, { "docid": "1b0b9b62442661b23a0bb5acea732668", "score": "0.56952834", "text": "public function getOutput()\n\t{\n\t\t$this->context = null;\n\t\t\n\t\treturn $this->output;\n\t}", "title": "" }, { "docid": "dfbd77dc4c7f8fb1d8195b3722d19819", "score": "0.5695214", "text": "public function openWrite() {\r\n return new FileStream($this->fullName());\r\n }", "title": "" }, { "docid": "2676e616f3953700d79210b80dec2c6e", "score": "0.5687558", "text": "public function getOutputBuffer()\n {\n }", "title": "" }, { "docid": "9fe0d11fd2a0cb1ceadaad07fb2700af", "score": "0.56797194", "text": "protected final function output ()\n\t{\n\t\tif ($this->isFailed() || !$this->isOutputSet())\n\t\t{\n\t\t\t$this->outputData();\n\t\t}\n\t\telse\n\t\t{\n\t\t\theader('Content-Description: File Download');\n\t\t\theader('Content-Type: ' . $this->outputContentType);\n\t\t\t$disposition = $this->attachResult ?\n\t\t\t\t\t'attachment; filename=' . $this->outputFileName :\n\t\t\t\t\t'inline';\n\t\t\theader('Content-Disposition: ' . $disposition);\n\t\t\theader('Content-Transfer-Encoding: binary');\n\t\t\theader('Content-Length: ' . filesize($this->outputFile));\n\n\t\t\twhile (ob_get_level()) {\n\t\t\t\tob_end_clean();\n\t\t\t}\n\t\t\tflush();\n\t\t\treadfile($this->outputFile);\n\t\t}\n\t}", "title": "" }, { "docid": "96936f3554aa608acbae2769cc02ef0e", "score": "0.56335336", "text": "public function getStreamProxy() {}", "title": "" }, { "docid": "96936f3554aa608acbae2769cc02ef0e", "score": "0.56326705", "text": "public function getStreamProxy() {}", "title": "" }, { "docid": "96936f3554aa608acbae2769cc02ef0e", "score": "0.56326705", "text": "public function getStreamProxy() {}", "title": "" }, { "docid": "8c670f01df0559ddbe179db042955dbc", "score": "0.5626564", "text": "public function setOutput(OutputInterface $output);", "title": "" }, { "docid": "8c670f01df0559ddbe179db042955dbc", "score": "0.5626564", "text": "public function setOutput(OutputInterface $output);", "title": "" }, { "docid": "87d7c6f404d8954f70329985fd420c2e", "score": "0.56211716", "text": "public function setOutput($option = FALSE) {\n $this->output = $option ;\n }", "title": "" }, { "docid": "9161c6f659b3a07c2845e098de14e9bc", "score": "0.5595711", "text": "public function getOutputFileHandle()\n {\n if($this->state['ofh'] === null || $this->state['ofh'] === false){\n $this->state['ofh'] = $this->getFileHandle($this->vars['ofn'], 'w');\n }\n return $this->state['ofh'];\n }", "title": "" }, { "docid": "29bc0be2f8c0cfa58b0c5c3831218054", "score": "0.55891085", "text": "public function end_stream(){\r\n\t\t\t$this->stream->endElement(); // program\r\n\t\t\t$this->stream->endDocument();\r\n\t\t\techo $this->stream->outputMemory();\r\n\t\t}", "title": "" }, { "docid": "4055e676879e7bd9706a4387fdfc5113", "score": "0.55871093", "text": "public function getWriter() {}", "title": "" }, { "docid": "9fdf42ec48a79f39d37352968d561b62", "score": "0.55797106", "text": "public function setOutputStream($stream) {\n if (!$stream->isOpen()) $stream->open (STREAM_MODE_WRITE);\n $this->stream= $stream;\n return TRUE;\n }", "title": "" }, { "docid": "329e19f340c969337e6114fd8343f3b7", "score": "0.5544356", "text": "public function getOutputFilePath()\n {\n return $this->outputFilePath;\n }", "title": "" }, { "docid": "70c33551d8c3427ab1a6ad6670af9b08", "score": "0.55307645", "text": "public function getStreamProxy();", "title": "" }, { "docid": "3d8562873ab6418eb5332e7cb680a1dd", "score": "0.5483692", "text": "public static function endStream(): ?string\n {\n if (ob_get_contents())\n {\n $results = ob_get_contents();\n ob_get_clean();\n\n if($results == false)\n {\n throw new RuntimeException(\"There was an error while trying to obtain the buffer output.\");\n }\n\n self::$CurrentlyStreaming = false;\n self::$Content = $results;\n }\n else\n {\n self::$CurrentlyStreaming = false;\n self::$Content = null;\n $results = null;\n }\n\n return $results;\n }", "title": "" }, { "docid": "810e4450d874a8551cf2762690531212", "score": "0.54815364", "text": "public function openStream() {\n\t\t$this->stream = $this->handler->openStream($this->uri);\n\t\treturn $this->stream;\n\t}", "title": "" }, { "docid": "0b252fcae81baefe140260d118b4a9f4", "score": "0.5479162", "text": "public function Get_OLE_Stream( )\r\n\t{\r\n\t\treturn $this -> fileStream;\r\n\t}", "title": "" }, { "docid": "8a16332cc82cd31f11c80305aa93fc41", "score": "0.5475666", "text": "protected function setupStreams()\n {\n ConsoleStub::$inputStream = fopen('php://memory', 'w+');\n ConsoleStub::$outputStream = fopen('php://memory', 'w+');\n ConsoleStub::$errorStream = fopen('php://memory', 'w+');\n }", "title": "" }, { "docid": "f4767571993200e48a8f558b5c7de175", "score": "0.54725844", "text": "public function getOutputProperty(): ?string\n {\n return $this->output;\n }", "title": "" }, { "docid": "363cf8f455cbf00cfcb3624a92ac3097", "score": "0.5469843", "text": "public function writeStream($resource);", "title": "" }, { "docid": "168cf875eb5c58181f8559be6f0e5957", "score": "0.5466302", "text": "public function stream()\r\n\t{\r\n\t\tif(empty($this->img))\r\n\t\t{\r\n\t\t\t$this->render();\r\n\t\t}\r\n\t\theader('Content-type: image/png');\r\n\t\timagepng($this->img);\r\n\t}", "title": "" }, { "docid": "15c6745f20ba7da1e7c953e6bff98030", "score": "0.5459749", "text": "public static function output() {}", "title": "" }, { "docid": "a44c4f1bcecbc3cf6ae43785b64adf34", "score": "0.5452311", "text": "public function getOutput(){\n\n if (is_null($this->output)) {\n\n ob_start();\n\n extract($this->data);\n\n require $this->view;\n\n $this->output = ob_get_clean();\n\n return $this->output;\n }\n }", "title": "" }, { "docid": "87ef5ddec2bd728188c30c3cec6b6a70", "score": "0.5444731", "text": "public function output() {}", "title": "" }, { "docid": "c4494ef74a97fdcac8dcbc72ce219483", "score": "0.54244375", "text": "public function setStreamTo($stream);", "title": "" }, { "docid": "6c7d34c233c5e58182f3df241e2237e2", "score": "0.5423058", "text": "public function send_output($value='')\n { $class = get_class($this);\n if ($this->output_target instanceof $class) {\n if ($this->output_target->accepting_input()) {\n $this->output_target->store_input($value);\n $this->output_target->run();\n return;\n }\n }\n // store in own buffer.. who knows.\n $this->output[] = $value;\n }", "title": "" }, { "docid": "6aaf21493959b016f2c1b7a677f68501", "score": "0.54205865", "text": "public function getIO()\n {\n if (!isset($this->inputOutput)) {\n $this->inputOutput = new ConsoleIO($this->getInput(), new TaskOutput($this), new HelperSet([]));\n }\n\n return $this->inputOutput;\n }", "title": "" }, { "docid": "46508832d37d2b568c9320343af5ec3e", "score": "0.54179007", "text": "private function getStream() {\n\n\t\t// Check for SIGTERM to shut down gracefully\n\t\tif ($this->_pcntlEnabled == TRUE) {\n\t\t\t$this->handleSignals();\n\t\t}\n\n\t\t// If we have a valid stream, return it\n\t\tif (is_resource($this->statusStream)) {\n\t\t\treturn $this->statusStream;\n\t\t}\n\t\n\t\t// If it's not a valid resource, we need to create one\n\t\tif (!is_dir($this->queueDir) || !is_writable($this->queueDir)) {\n\t\t\tthrow new Exception('Unable to write to queueDir: ' . $this->queueDir);\n\t\t}\n\t\n\t\t// Construct stream file name, log and open\n\t\t$this->streamFile = $this->queueDir . '/' . self::QUEUE_FILE_ACTIVE;\n\t\t// $this->log('Opening new active status stream: ' . $this->streamFile);\n\t\t$this->statusStream = fopen($this->streamFile, 'a'); // Append if present (crash recovery)\n\t\t\n\t\t// Okay?\n\t\tif (!is_resource($this->statusStream)) {\n\t\t\tthrow new Exception('Unable to open stream file for writing: ' . $this->streamFile);\n\t\t}\n\t\n\t\t// If we don't have a last rotated time, it's effectively now\n\t\tif ($this->lastRotated == NULL) {\n\t\t\t$this->lastRotated = time();\n\t\t}\n\t\n\t\t// Looking good, return the resource\n\t\treturn $this->statusStream;\n\t}", "title": "" } ]
95c5dbd304ac0e392be6ca111a53325d
Updates generated $class with given field config.
[ { "docid": "1f88f879636c33b346cd5bd6bd14806b", "score": "0.52154666", "text": "private function generateField(array $config, array $class, RdfResource $type, string $typeName, RdfResource $property, bool $isCustom = false): array\n {\n $typeUri = $type->getUri();\n $propertyName = $property->localName();\n $propertyUri = $property->getUri();\n $typeConfig = $config['types'][$typeName] ?? null;\n\n // Warn when property are not part of GoodRelations\n if ($config['checkIsGoodRelations'] && !$this->goodRelationsBridge->exists($propertyName)) {\n $this->logger->warning(sprintf('The property \"%s\" (type \"%s\") is not part of GoodRelations.', $propertyUri, $typeUri));\n }\n\n // Ignore or warn when properties are legacy\n if (null !== $property && preg_match('/legacy spelling/', (string) $property->get('rdfs:comment'))) {\n if (isset($typeConfig['properties'])) {\n $this->logger->warning(sprintf('The property \"%s\" (type \"%s\") is legacy.', $propertyUri, $typeUri));\n } else {\n $this->logger->debug(sprintf('The property \"%s\" (type \"%s\") is legacy. Ignoring.', $propertyUri, $typeUri));\n\n return $class;\n }\n }\n\n $propertyConfig = $typeConfig['properties'][$propertyName] ?? [];\n\n $ranges = [];\n foreach (self::$rangeProperties as $rangePropertyType) {\n /**\n * @var RdfResource $range\n */\n foreach ($property->all($rangePropertyType, 'resource') as $range) {\n $ranges[] = $this->getRanges($range, $propertyConfig, $config);\n }\n }\n $ranges = array_merge(...$ranges);\n\n if (!$ranges) {\n if (isset($propertyConfig['range'])) {\n $ranges[] = new RdfResource($propertyConfig['range'], $type->getGraph());\n } else {\n $this->logger->error(sprintf('The property \"%s\" (type \"%s\") has an unknown type. Add its type to the config file.', $propertyUri, $typeUri));\n }\n }\n\n if (\\count($ranges) > 1) {\n $this->logger->warning(sprintf('The property \"%s\" (type \"%s\") has several types. Using the first one (\"%s\"). Other possible options: \"%s\".', $propertyUri, $typeUri, $ranges[0]->getUri(), implode('\", \"', array_map(static fn (RdfResource $range) => $range->getUri(), $ranges))));\n }\n\n $rangeName = null;\n $range = null;\n if (isset($ranges[0])) {\n $range = $ranges[0];\n if (!isset($propertyConfig['range']) && $mappedUri = ($config['rangeMapping'][$ranges[0]->getUri()] ?? false)) {\n $range = new RdfResource($mappedUri);\n }\n\n $rangeName = $this->phpTypeConverter->escapeIdentifier($range->localName());\n }\n\n if (!$ranges) {\n return $class;\n }\n\n $cardinality = $propertyConfig['cardinality'] ?? false;\n if (!$cardinality || CardinalitiesExtractor::CARDINALITY_UNKNOWN === $cardinality) {\n $cardinality = $this->cardinalities[$propertyUri] ?? CardinalitiesExtractor::CARDINALITY_1_1;\n }\n\n $isArray = \\in_array($cardinality, [\n CardinalitiesExtractor::CARDINALITY_0_N,\n CardinalitiesExtractor::CARDINALITY_1_N,\n CardinalitiesExtractor::CARDINALITY_N_N,\n ], true);\n\n if (isset($propertyConfig['nullable'])) {\n $isNullable = (bool) $propertyConfig['nullable'];\n } else {\n $isNullable = !\\in_array($cardinality, [\n CardinalitiesExtractor::CARDINALITY_1_1,\n CardinalitiesExtractor::CARDINALITY_1_N,\n ], true);\n }\n\n $columnPrefix = false;\n $isEmbedded = $propertyConfig['embedded'] ?? false;\n\n if (true === $isEmbedded) {\n $columnPrefix = $propertyConfig['columnPrefix'] ?? false;\n }\n\n $class['fields'][$propertyName] = [\n 'name' => $propertyName,\n 'resource' => $property,\n 'rangeName' => $rangeName,\n 'range' => $range,\n 'cardinality' => $cardinality,\n 'ormColumn' => $propertyConfig['ormColumn'] ?? null,\n 'isArray' => $isArray,\n 'isReadable' => $propertyConfig['readable'] ?? true,\n 'isWritable' => $propertyConfig['writable'] ?? true,\n 'isNullable' => $isNullable,\n 'isUnique' => $propertyConfig['unique'] ?? false,\n 'isCustom' => $isCustom,\n 'isEmbedded' => $isEmbedded,\n 'columnPrefix' => $columnPrefix,\n 'mappedBy' => $propertyConfig['mappedBy'] ?? null,\n 'inversedBy' => $propertyConfig['inversedBy'] ?? null,\n 'isId' => false,\n ];\n\n if ($isArray) {\n $class['hasConstructor'] = true;\n\n if ($config['doctrine']['useCollection'] && !\\in_array(ArrayCollection::class, $class['uses'], true)) {\n $class['uses'][] = ArrayCollection::class;\n $class['uses'][] = Collection::class;\n }\n }\n\n return $class;\n }", "title": "" } ]
[ { "docid": "f58454b2dab26c20aef373b0e820888d", "score": "0.5533646", "text": "protected function load_field_class( $class, $type, $module ) {\n\t}", "title": "" }, { "docid": "9b74ef7572684989e5a0cdba2ba087e2", "score": "0.5351481", "text": "function wponion_get_field_class_remap( $class, $default = false ) {\n\t\twponion_deprecated_function( __FUNCTION__, '1.5', 'wponion_field_class_remaps' );\n\t\treturn wponion_field_class_remaps( $class, $default );\n\t}", "title": "" }, { "docid": "c71512faee37e69d834ae140c9666894", "score": "0.5330364", "text": "public function configureClass($class) {\n\t\treturn [\n\t\t\t'classes' => $this->_classes,\n\t\t\t'meta' => ['key' => 'id', 'locked' => true]\n\t\t];\n\t}", "title": "" }, { "docid": "44cdfb8894501df55c2bb8c24ebedaae", "score": "0.5319237", "text": "private function setFieldConfig() {\n\t\t$fieldId = $GLOBALS['TL_DCA']['tl_formdata']['fields'][$this->strField]['ff_id'];\n\t\tif ($fieldId > 0)\n\t\t{\n\t\t\t$config = $this->Database->prepare(\"SELECT * FROM tl_form_field WHERE id = ?\")->execute($fieldId);\n\t\t\t\n\t\t\t$this->efgMemberSelectMembers = $config->efgMemberSelectMembers;\n\t\t\t$this->efgMemberSelectMemberGroups = $config->efgMemberSelectMemberGroups;\n\t\t\t$this->efgMemberSelectIncludeBlankOption = $config->efgMemberSelectIncludeBlankOption;\n\t\t\t$this->efgMemberSelectBlankOptionLabel = $config->efgMemberSelectBlankOptionLabel;\n\t\t\t$this->efgMemberSelectOutputFormat = $config->efgMemberSelectOutputFormat;\n\t\t\t$this->efgMemberSelectReturnValue = $config->efgMemberSelectReturnValue;\n\t\t\t$this->efgMemberSelectRemoveLoggedMember = $config->efgMemberSelectRemoveLoggedMember;\n\t\t\t$this->efgMemberSelectShowInactiveMembers = $config->efgMemberSelectShowInactiveMembers;\n\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "9b4eed9eb71c5d4a056fe726f763ebb0", "score": "0.5283063", "text": "protected function getClassField()\n {\n // Adds subform if the type is a RelationManyToManyAsSubform\n if ($this->kickstarterFieldConfiguration['fieldType'] == 'RelationManyToManyAsSubform') {\n $class = 'subform ';\n } else {\n $class = 'field ';\n }\n\n if (! empty($this->kickstarterFieldConfiguration['classfield'])) {\n $class = $class . $this->kickstarterFieldConfiguration['classfield'];\n }\n\n return $class;\n }", "title": "" }, { "docid": "a87830bb5290cd7031d388f9d5a70d5f", "score": "0.52424985", "text": "public function SetConfigClass ($configClass);", "title": "" }, { "docid": "4ac4975a0513b8c65e3fbfafb8395b54", "score": "0.52338874", "text": "public function update(DataClass $dataClass);", "title": "" }, { "docid": "35b9729fe9e09017da5439795513a642", "score": "0.5203285", "text": "function create() {\n\t\t$this->id = DBUtils::getNextSequnceID(\"class_fields\");\n\n\t\t$params = array($this->id, $this->name, $this->shortname, $this->nodeClassId, $this->fieldTypeId, $this->required, $this->shown, $this->order);\n\t\tDBUtils::execUpdate(\n\t\t\t\"INSERT INTO dbm_class_fields (id, name, shortname, class_id, type_id, required, shown, `order`) VALUES (?,?,?,?,?,?,?,?)\",\n\t\t\t$params\n\t\t);\n\n\t\t$fieldType = $this->getFieldType();\n\t\t$parameters = $fieldType->parameterList;\n\t\tforeach ($parameters as $parameter) {\n\t\t\t$params = array($parameter->shortname, $this->id, $parameter->default_value);\n\t\t\tDBUtils::execUpdate(\n\t\t\t\t\"INSERT INTO dbm_field_parameters (shortname,field_id, _value) VALUES (?,?,?)\",\n\t\t\t\t$params\n\t\t\t);\n\t\t}\n\t\t$nodeClass = $this->getNodeClass();\n\t\tif ($nodeClass == null) {\n\t\t\tassert(\"FieldDef create failed: nodeClass == null\");\n\t\t}\n\n\t\t$tableName = $nodeClass->getNFVTableName();\n\n\t\t$ft = $this->getFieldType();\n\n\t\tDBUtils::execUpdate(\"ALTER TABLE \" . $tableName . \" ADD COLUMN \" . $this->shortname . \" \" . $ft->dbType);\n\t\t//DBUtils::execUpdate(\"ALTER TABLE \" . $tableName . \" ADD COLUMN \" . $this->shortname . \" \" . $ft->dbType . \" CHARACTER SET \" . DB_CHARSET);\n\n\t\t$value = $this->getDefaultValue();\n\t\tDBUtils::execUpdate(\"UPDATE \" . $tableName . \" SET \".$this->shortname.\" = ?\", array($value));\n\t}", "title": "" }, { "docid": "7867663165e4671ad37a5c310de7b663", "score": "0.5187657", "text": "function sitesettings_field_wrap_class($field_wrap_class, $id)\n{\n $field_wrap_class = str_replace('field-wrap', 'field-wrap form-group', $field_wrap_class);\n\n return $field_wrap_class;\n}", "title": "" }, { "docid": "9441b9d40150bc1fc0026a6ed5b522b7", "score": "0.5182601", "text": "function custom_override_checkout_fields( $fields ) {\n\tforeach ($fields as $k1 => $subfields)\n\t{\n\t\tforeach ($subfields as $k2 => $field)\n\t\t{\n\t\t\t// add classes\n\t\t\t$fields[$k1][$k2]['class'][] = 'form-group';\n\t\t\t$fields[$k1][$k2]['input_class'][] = 'form-control';\n\t\t}\n\t}\n\t//pr($fields);\n // $fields['billing']['billing_first_name']['placeholder'] = 'My new placeholder';\n // $fields['billing']['billing_first_name']['label'] = 'My new label';\n\treturn $fields;\n}", "title": "" }, { "docid": "1825a790a68db4766a8e58d47ad89c0f", "score": "0.51617986", "text": "public function setClass( $class );", "title": "" }, { "docid": "3f8c80b6ab325743bf772fd1b7d380da", "score": "0.5141602", "text": "protected function mergeConfig($class, $group, $fields)\n {\n $base = (isset($this->config[$class]['fields'][$group])) ? $this->config[$class]['fields'][$group] : array();\n\n if (!is_array($fields)) {\n $fields = array($fields);\n }\n\n $this->config[$class]['fields'][$group] = array_merge($base, $fields);\n }", "title": "" }, { "docid": "01fd35842e322ff93ae8ac30e543038f", "score": "0.5090305", "text": "abstract function set_class_vars();", "title": "" }, { "docid": "830a3e92c78766067fced5f67fe85aa4", "score": "0.5082592", "text": "protected function restructureInputValidationConfig(array &$fieldConfig): void\n {\n if (empty($fieldConfig['validation']['cascade'])) {\n return;\n }\n\n $fieldConfig['validation']['cascade']['isCollection'] = $this->isCollectionType($fieldConfig['type']);\n $fieldConfig['validation']['cascade']['referenceType'] = trim($fieldConfig['type'], '[]!');\n }", "title": "" }, { "docid": "8d9bb53305f0591ff0ac9f8bad910715", "score": "0.508074", "text": "private function _render_class($class, $field) {\r\n echo ' class=\"', $class, ' ';\r\n if (isset($field['class']))\r\n echo $field['class'];\r\n echo '\" ';\r\n }", "title": "" }, { "docid": "95a5e92c0f60e3cdb91cb8afcf4d80f4", "score": "0.50424945", "text": "abstract public function setupFields();", "title": "" }, { "docid": "e16fc272f73e8377e8b5ad88f95fff98", "score": "0.50114125", "text": "public function testUpdateBillingCodeCustomFields()\n {\n }", "title": "" }, { "docid": "b99a7b26bbfcbf6fde2036f9327a67be", "score": "0.49912336", "text": "public function prepareTheClass($class, $config)\n {\n $finalizedClass = $class;\n\n if (isset($config['class'])) {\n $finalizedClass .= ' '.$config['class'];\n }\n\n return $finalizedClass;\n }", "title": "" }, { "docid": "7c5f098b1c15380e5224215c4098394c", "score": "0.49727377", "text": "public function setField($field);", "title": "" }, { "docid": "7c5f098b1c15380e5224215c4098394c", "score": "0.49727377", "text": "public function setField($field);", "title": "" }, { "docid": "5ae763fa3fcaa484f279e79ae4995fdb", "score": "0.49493062", "text": "function store() {\n\t\tglobal $DBM_FIELD_TYPES;\n\n\t\t$sql = \"UPDATE dbm_class_fields SET shortname=?, name=?, type_id=?, required=?, shown=?, `order`=? WHERE id=?\";\n\t\tDBUtils::execUpdate($sql, array($this->shortname, $this->name, $this->fieldTypeId, $this->required, $this->shown, $this->order, $this->id));\n\t\tNodeClass::removeNodeClassFromCache($this->nodeClassId);\n\n\t\tif (($this->oldshortname != null) || ($this->oldfieldTypeId != null)) {\n\t\t\t$ft = $this->getFieldType();\n\t\t\t$nodeClass = $this->getNodeClass();\n\t\t\t$tableName = $nodeClass->getNFVTableName();\n\t\t\tif ($this->oldshortname == null) {\n\t\t\t\t$this->oldshortname = $this->shortname;\n\t\t\t}\n\t\t\t//DBUtils::execUpdate(\"ALTER TABLE \" . $tableName . \" CHANGE COLUMN \" . $this->oldshortname . \" \" . $this->shortname . \" \" . $ft->dbType . \" CHARACTER SET \" . DB_CHARSET);\n\t\t\tDBUtils::execUpdate(\"ALTER TABLE \" . $tableName . \" CHANGE COLUMN \" . $this->oldshortname . \" \" . $this->shortname . \" \" . $ft->dbType);\n\t\t}\n\n\t\tif ($this->oldfieldTypeId != null) {\n\t\t\t$ft = $this->getFieldType();\n\t\t\t$sql = \"DELETE FROM dbm_field_parameters WHERE field_id=?\";\n\t\t\tDBUtils::execUpdate($sql, array($this->id));\n\n\t\t\t$parameters = &$ft->parameterList;\n\t\t\tforeach ($parameters as $parameter) {\n\t\t\t\t$sql = \"INSERT INTO dbm_field_parameters (shortname,field_id,_value) VALUES (?,?,?)\";\n\t\t\t\tDBUtils::execUpdate($sql, array($parameter->shortname, $this->id, $parameter->default_value));\n\t\t\t}\n\t\t}\n\n\t\t$this->oldshortname = null;\n\t\t//clean nodes cache\n\t\tNode::cleanCache();\n\t\tNodeClass::removeNodeClassFromCache($this->nodeClassId);\n\t}", "title": "" }, { "docid": "0880daeb871bfe3e02e424d1043bca86", "score": "0.49473935", "text": "protected function setFieldClass($name, $attributes = [], $type = 'text')\n\t{\n\t\tif (!in_array($type, ['hidden', 'checkbox', 'radio']))\n\t\t{\n\t\t\t$defaultClass = config('form.field.class');\n\t\t\tif ($defaultClass != \"\")\n\t\t\t{\n\t\t\t\tif (isset($attributes['class']) && $attributes['class'] != \"\")\n\t\t\t\t\t$attributes['class'] .= ' '.$defaultClass;\n\t\t\t\telse\n\t\t\t\t\t$attributes['class'] = $defaultClass;\n\t\t\t}\n\t\t}\n\n\t\t$nameSegments = explode('.', $name);\n\t\t$fieldClass = strtolower(str_replace('_', '-', str_replace(' ', '-', end($nameSegments))));\n\n\t\t// add \"pivot\" prefix to field name if it exists\n\t\tif (count($nameSegments) > 1 && $nameSegments[count($nameSegments) - 2] == \"pivot\")\n\t\t\t$fieldClass = $nameSegments[count($nameSegments) - 2].\"-\".$fieldClass;\n\n\t\t// remove icon code\n\t\tif (preg_match('/\\[ICON:(.*)\\]/i', $fieldClass, $match))\n\t\t{\n\t\t\t$fieldClass = str_replace($match[0], '', $fieldClass);\n\t\t}\n\n\t\t// remove round brackets that are used to prevent index number from appearing in field name\n\t\t$fieldClass = str_replace('(', '', str_replace(')', '', $fieldClass));\n\n\t\t// remove end dash if one exists\n\t\tif (substr($fieldClass, -1) == \"-\")\n\t\t\t$fieldClass = substr($fieldClass, 0, (strlen($fieldClass) - 1));\n\n\t\t$fieldClass = Format::slug($fieldClass); // strip illegal characters from class name\n\n\t\tif ($fieldClass != \"\")\n\t\t{\n\t\t\t$classPrefix = config('form.field.prefix');\n\n\t\t\tif (!is_null($classPrefix) && $classPrefix !== false && $classPrefix != \"\")\n\t\t\t\t$fieldClass = config('form.field.prefix').$fieldClass;\n\n\t\t\t// replace double dashes with single dash\n\t\t\t$fieldClass = str_replace('--', '-', $fieldClass);\n\n\t\t\tif (isset($attributes['class']) && $attributes['class'] != \"\")\n\t\t\t\t$attributes['class'] .= ' '.$fieldClass;\n\t\t\telse\n\t\t\t\t$attributes['class'] = $fieldClass;\n\t\t}\n\n\t\treturn $attributes;\n\t}", "title": "" }, { "docid": "2f17a55df3972fdbb8bbdb1a04ac4acd", "score": "0.49456167", "text": "public function buildClass() {\n\n foreach ($this->_optionsFrom($this->_reflect) as $options) {\n\n $this->_map->add(\n $this->_makeItemFromOptions($options)\n );\n\n }\n\n }", "title": "" }, { "docid": "99af086ad69e3d3bca122c460b513922", "score": "0.4905905", "text": "public function testUpdateCartonTypeCustomFields()\n {\n }", "title": "" }, { "docid": "50db6269b8a3f3496b7c6d6624622b0e", "score": "0.4899132", "text": "public function register_field_type( $class_name ){\n if( is_object( $class_name ) ){\n $class_name = get_class( $class_name );\n }\n\n if(!in_array( $class_name, $this->field_types)){\n $this->field_types[] = $class_name;\n }\n }", "title": "" }, { "docid": "0d14045218f391bba4575c0418c589e3", "score": "0.4892559", "text": "function field($label, $fieldname, $fieldtype) {\n\t\t// field type loaders\n\t\t$fieldtypes = $this->confs->read('ran/htmlform')['fieldtypes'];\n\n\t\tif (isset($fieldtypes[$fieldtype])) {\n\t\t\t$instance = $fieldtypes[$fieldtype]($this, $this->confs);\n\t\t}\n\t\telse { # assume specialized class definition with no fieldtype loader\n\t\t\t$class = \\hlin\\PHP::pnn('ran.'.ucfirst($fieldtype).'Field');\n\t\t\t$instance = $class::instance($this->confs);\n\t\t}\n\n\t\t// configure and return\n\t\treturn $instance\n\t\t\t->set('id', $this->signature($this->fieldcounter++))\n\t\t\t->set('name', $fieldname)\n\t\t\t->form_is($this)\n\t\t\t->fieldlabel_is($label)\n\t\t\t->fieldtemplate_is($this->fieldtemplate($fieldtype))\n\t\t\t->fieldconfigurer_is($this->fieldconfigurer($fieldtype))\n\t\t\t->hintrenderer_is($this->hintrenderer($fieldtype))\n\t\t\t->errorrenderer_is($this->errorrenderer($fieldtype))\n\t\t\t->adderrors($this->errors($fieldname));\n\t}", "title": "" }, { "docid": "2dbe2226dfb546a6e92b136ac35ee1c6", "score": "0.4883182", "text": "function AdminFields($object, $field) {\n $this->object = $object;\n $this->max = $field[\"max\"];\n $this->cols = $field[\"cols\"];\n $this->rows = $field[\"rows\"];\n $this->size = $field[\"size\"];\n $this->type = $field[\"type\"];\n $this->list = $field[\"list\"];\n $this->java = $field[\"java\"];\n $this->class = $field[\"class\"];\n $this->classRadio = $field[\"class\"] ? $field[\"class\"] : \"checkbox\"; //css style for radiobuttons and checkboxes\n $this->classTextarea = $field[\"class\"] ? $field[\"class\"] : \"textarea\"; //css style for textarea\n $this->wrap = $field[\"wrap\"];\n $this->setNameAttr($this->object);\n $this->setNameAttrArray($this->object);\n }", "title": "" }, { "docid": "53edd2079afe1f871df424d1de9b6579", "score": "0.4880981", "text": "protected function updateFields()\r\n {\r\n if (!is_array($this->_fields))\r\n {\r\n if ($this->_tablename!='')\r\n {\r\n $this->_fields=$this->Database->MetaFields($this->_tablename);\r\n }\r\n }\r\n $this->_fieldbuffer = array();\r\n }", "title": "" }, { "docid": "a32e1b726d33ac9e0dc898eb2f8187a2", "score": "0.48598832", "text": "protected function _upgrade()\n {\n return true; // remove this line to trigger update\n\n /*\n $this->addDataClass(\n 'name_here',\n array( // fields\n 'field_here' => array(\n 'type' => 'type_here',\n // 'length' => 'length_here',\n // 'required' => true,\n // 'allowedValues' => array('value_1', 'value_2'),\n // 'default' => 0,\n // 'autoIncrement' => true,\n ),\n // other fields go here\n ),\n array('primary_key_1', 'primary_key_2'), // or 'primary_key', both are okie\n array( // indeces\n array(\n 'fields' => array('field_1', 'field_2'),\n 'type' => 'NORMAL', // UNIQUE or FULLTEXT\n ),\n ),\n );\n */\n }", "title": "" }, { "docid": "19156ee953ef4b4effa2ec0e2c6cd61b", "score": "0.48520082", "text": "public function resolveFields () {\n\t\t$fields = array();\n\n\t\tforeach ($this as $key => $value) {\n\t\t\tif (strpos($key, '::') !== false) {\n\t\t\t\tlist($class, $field, $name) = explode('::', $key, 3);\n\n\t\t\t\tif (!isset($this->$name)) {\n\t\t\t\t\t$fields[] = $name;\n\t\t\t\t\t$this->$name = (new \\ReflectionClass($class))->newInstanceWithoutConstructor();\n\t\t\t\t}\n\n\t\t\t\t$this->$name->$field = $value;\n\t\t\t\tunset($this->$key);\n\t\t\t}\n\t\t}\n\n\t\tforeach ($fields as $name) {\n\t\t\t$this->$name->__construct();\n\t\t}\n\t}", "title": "" }, { "docid": "13ab0f511b00aee9fe58952a701dceca", "score": "0.48439202", "text": "protected function _upgrade()\n {\n return true; // remove this line to trigger update\n\n /*\n $this->addDataClass(\n 'name_here',\n array( // fields\n 'field_here' => array(\n 'type' => 'type_here',\n // 'length' => 'length_here',\n // 'required' => true,\n // 'allowedValues' => array('value_1', 'value_2'),\n // 'default' => 0,\n // 'autoIncrement' => true,\n ),\n // other fields go here\n ),\n 'primary_key_field_here',\n array( // indeces\n array(\n 'fields' => array('field_1', 'field_2'),\n 'type' => 'NORMAL', // UNIQUE or FULLTEXT\n ),\n ),\n );\n */\n }", "title": "" }, { "docid": "8931607c3149007ff5aafb071af9ab4c", "score": "0.4818332", "text": "protected function define(ClassDefinition $class)\n {\n $class->property($this->id)->asInt();\n $class->property($this->val)->asInt();\n }", "title": "" }, { "docid": "d3ca5093d4a6ae510b4ba04c0b44bd1a", "score": "0.4810654", "text": "function updateField(){\n //print_r($_POST);exit;\n $retObj = array();\n try {\n\n if(!empty($_POST['field_id'])) {\n $data = $_POST;\n $obj = new CustomFieldManager();\n $response = $obj->updateField($data);\n $retObj = $response;\n\n } else {\n throw new \\Exception('Unsupported Request: missing critical parameter(s).');\n }\n\n\n } catch (\\Exception $e) {\n\n Api::invalidResponse(\n $e->getMessage(),\n 400,\n Constants::STATUS_INVALID,\n $e,\n true,\n true\n );\n\n }\n\n return Api::apiResponse($retObj, Constants::STATUS_SUCCESSFUL);\n }", "title": "" }, { "docid": "b494ecc5c375bec7d142e6f142589e9d", "score": "0.48088416", "text": "private function buildFieldsConfig() {\n\n foreach ($this->extendersList as $extender) {\n $functionsConfig = $extender->__getFunctionsConfig();\n $functionConfigDefault = $extender->__getFunctionConfigDefault();\n\n foreach ((new \\ReflectionClass($extender))->getMethods(\\ReflectionMethod::IS_PUBLIC) as $method) {\n $method = $method->getName();\n\n if (preg_match('/^__/', $method)) {\n continue;\n } // for service functions\n\n $config = isset($functionsConfig[$method]) ? $functionsConfig[$method] : $functionConfigDefault;\n\n $type = $config['type'];\n\n $this->fieldsConfig[$method] = compact('extender', 'type');\n }\n }\n }", "title": "" }, { "docid": "bdc7bf657cf6969dc3d56929085d294d", "score": "0.48076078", "text": "public function buildFieldDefinitions();", "title": "" }, { "docid": "c2b5223c76efda3d9459c3a2e74a64ec", "score": "0.48049757", "text": "private function __update() {\n $class = $this->class;\n\n $attributes = $this->get_attributes();\n // do not update the primary key\n $primary_key = $attributes[$this->model['primary_key']['field']];\n $attributes['date_updated'] = 'UNIX_TIMESTAMP()';\n\n $keys = array_keys($this->model['fields']);\n $set_columns = $values = array();\n foreach ($keys as $key) {\n // skip primary key\n if ($this->model['primary_key']['field'] == $key) {\n continue;\n }\n $set_columns[] = \"`$key` = \" . $this->model['fields'][$key];\n $values[] = $attributes[$key];\n }\n $set_columns = 'SET ' . implode(', ', $set_columns);\n\n $values[] = $primary_key;\n\n $database = new database($class::$database);\n $database->query(\"UPDATE `{$class::$table}` $set_columns WHERE `\" . $this->model['primary_key']['field'] . '` = ' . $this->model['fields'][$this->model['primary_key']['field']], $values);\n $this->__fetch($primary_key);\n }", "title": "" }, { "docid": "69f4079e0ab5492daf2cbc08f6c91bba", "score": "0.48043317", "text": "protected function _populateProperties($fieldKey, &$fieldDef)\n {\n switch ($fieldDef[self::TYPE]) {\n case 'string':\n case 'text':\n case 'fulltext':\n case 'integer':\n case self::TYPE_BIGINT:\n case 'float':\n case 'boolean':\n case 'container':\n break;\n case self::TYPE_JSON:\n if (isset($fieldDef[self::JSON_SCHEMA_CALLBACK])) {\n $fieldDef[self::JSON_SCHEMA] = call_user_func($fieldDef[self::JSON_SCHEMA_CALLBACK]);\n }\n break;\n case 'datetime_separated_date':\n case 'date':\n // add to datetime fields\n $this->_dateFields[] = $fieldKey;\n break;\n case 'datetime':\n // add to alarm fields\n if (isset($fieldDef['alarm'])) {\n $this->_alarmDateTimeField = $fieldKey;\n }\n // add to datetime fields\n $this->_datetimeFields[] = $fieldKey;\n break;\n case 'time':\n // add to timefields\n $this->_timeFields[] = $fieldKey;\n break;\n case 'user':\n $fieldDef['config'] = array(\n 'refIdField' => 'id',\n 'length' => 40,\n 'appName' => 'Tinebase',\n 'modelName' => 'User',\n 'recordClassName' => ModelUser::class,\n 'controllerClassName' => Tinebase_User::class,\n 'filterClassName' => Tinebase_Model_FullUserFilter::class,\n );\n $this->_recordFields[$fieldKey] = $fieldDef;\n break;\n /** @noinspection PhpMissingBreakStatementInspection */\n case 'record':\n if (isset($this->_filterModel[$fieldKey]['options'])) {\n $this->_filterModel[$fieldKey]['options']['controller'] = $this->_getPhpClassName($this->_filterModel[$fieldKey]['options'], 'Controller');\n $this->_filterModel[$fieldKey]['options']['filtergroup'] = $this->_getPhpClassName($this->_filterModel[$fieldKey]['options'], 'Model') . 'Filter';\n }\n case 'records':\n if (!isset($fieldDef['config'])) {\n break;\n }\n $fieldDef['config']['recordClassName'] = isset($fieldDef['config']['recordClassName']) ? $fieldDef['config']['recordClassName'] : $this->_getPhpClassName($fieldDef['config']);\n $fieldDef['config']['controllerClassName'] = isset($fieldDef['config']['controllerClassName']) ? $fieldDef['config']['controllerClassName'] : $this->_getPhpClassName($fieldDef['config'], 'Controller');\n $fieldDef['config']['filterClassName'] = isset($fieldDef['config']['filterClassName']) ? $fieldDef['config']['filterClassName'] : $this->_getPhpClassName($fieldDef['config']) . 'Filter';\n if ($fieldDef[self::TYPE] == 'record') {\n $fieldDef['config']['length'] = 40;\n $this->_recordFields[$fieldKey] = $fieldDef;\n } else {\n $fieldDef['config']['dependentRecords'] = (isset($fieldDef['config']['dependentRecords']) || array_key_exists('dependentRecords', $fieldDef['config'])) ? $fieldDef['config']['dependentRecords'] : FALSE;\n $this->_recordsFields[$fieldKey] = $fieldDef;\n }\n break;\n case 'custom':\n try {\n // prepend table name to id prop because of ambiguous ids\n $this->_filterModel['customfield'] = array(\n 'filter' => 'Tinebase_Model_Filter_CustomField', \n 'options' => array(\n 'idProperty' => $this->getTableName() . '.' . $this->_idProperty\n )\n );\n } catch (Exception $e) {\n // no customfield filter available (yet?)\n Tinebase_Exception::log($e);\n }\n break;\n case 'virtual':\n if (isset($fieldDef['config']) && isset($fieldDef['config'][self::TYPE]) && 'datetime' ===\n $fieldDef['config'][self::TYPE]) {\n // add to datetime fields\n $this->_datetimeFields[] = $fieldKey;\n }\n break;\n case 'keyfield':\n $this->_keyfieldFields[] = $fieldKey;\n break;\n default:\n break;\n }\n }", "title": "" }, { "docid": "60d6c0255fa1506f989a5007eb1cdec1", "score": "0.48034105", "text": "private function _SetDataClass(&$Class = NULL){\n\t\tif(!is_null($Class)){\n\t\t\tforeach (get_object_vars($Class) as $Key => $Value) {\n\t\t\t\tif(property_exists(get_class($this), $Key)){\n\t\t\t\t\tif(!is_null($Class->{$Key}) && $Class->{$Key} != \"\" && $Key != \"CI\" && strpos($Key, \"INTERNAL_\") === false){\n\t\t\t\t\t\t$this->{$Key} = $Class->{$Key};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "4d6272f58f889d27111934fdfe2bfeab", "score": "0.4783879", "text": "public function compileClass($classFormat);", "title": "" }, { "docid": "ab13d27c1d497d1886a6aa77722be88c", "score": "0.47637454", "text": "public function createProjectConfig( \\ReflectionClass $classToTest );", "title": "" }, { "docid": "97b15d011d5267cfd6c31ab4fedc534d", "score": "0.47568843", "text": "protected function update($class)\n {\n $values = get_object_vars($class);\n $keys = array_keys($values);\n\n $table = $this->tableFromClass(get_class($class));\n\n $sql = 'UPDATE ' . $table . ' SET ' . $this->pdoSet($keys) . \" WHERE id=:id\";\n $statement = $this->pdo->prepare($sql);\n $r = $statement->execute($values);\n\n if (!$r) {\n return $statement->errorInfo();\n }\n return $r;\n }", "title": "" }, { "docid": "4f95a2c8490df54115ee1012e8e94d30", "score": "0.47349003", "text": "public function updated(Field $field)\n {\n $this->clearCache();\n }", "title": "" }, { "docid": "38341d3f0fade2473f65c069958465f0", "score": "0.4724818", "text": "public function handleField(Field $field)\n\t{\n\t\t$prefix = $this->prefix . strtoupper($field->name);\n\n\t\tif (!isset($field->label))\n\t\t{\n\t\t\t$field->label = $prefix . '_LABEL';\n\t\t}\n\n\t\tif (preg_match('~^([A-Z_]+)$~', $field->label, $match))\n\t\t{\n\t\t\t$prefix = $match[1];\n\t\t}\n\n\t\tif (preg_match('~^([A-Z_]+?)_LABEL$~', $field->label, $match))\n\t\t{\n\t\t\t$prefix = $match[1];\n\t\t}\n\n\t\tif (!isset($field->description))\n\t\t{\n\t\t\t$field->description = $prefix . '_DESC';\n\t\t}\n\n\t\tif (preg_match('~^([A-Z_]+?)_DESC$~', $field->description, $match))\n\t\t{\n\t\t\t$prefix = $match[1];\n\t\t}\n\n\t\tif (!isset($field->hint))\n\t\t{\n\t\t\t$field->hint = $prefix . '_HINT';\n\t\t}\n\n\t\t$this->reflector->addField($field);\n\t}", "title": "" }, { "docid": "0cf4b1139dbc80ba96cafd5d34d0ac0e", "score": "0.47089162", "text": "public function getConfigFieldtype(){}", "title": "" }, { "docid": "a2ef1cdcad013a9cf5f87d113d5e3c8a", "score": "0.46980986", "text": "public function update($class, $fields, $idArray) {\n\t\t$tableName = $class::getTableName();\n\t\t$sql = 'UPDATE ' . $tableName . ' SET ';\n\t\t$count = 0;\n\t\tforeach ($fields AS $key => $value) {\n\t\t\tif ($count++)\n\t\t\t\t$sql .= ',';\n\t\t\t$sql .= $key . ' = ' . $this->quote($value, $class::requiresQuoting($key));\n\t\t}\n\t\t$sql .= ' WHERE ';\n\t\t$count = 0;\n\t\tforeach ($idArray AS $key => $value) {\n\t\t\tif ($count++)\n\t\t\t\t$sql .= ' AND ';\n\t\t\t$sql .= $key . ' = ' . $this->quote($value, $class::requiresQuoting($key));\n\t\t}\n\t\t$sql .= ';';\n\t\treturn $this->execute($sql);\n\t}", "title": "" }, { "docid": "334e0a3ac8459f9cc84dc9ed3534863c", "score": "0.468817", "text": "protected function updateRecordClass($templateName)\n {\n $this->record->setClassNameByTemplate($templateName);\n\n if ($this->hasRecordChangedClass()) {\n $newClass = $this->record->ClassName;\n $this->record = $newClass::create((array) $this->record);\n }\n }", "title": "" }, { "docid": "2e81c1c935c867921cf8f32482c738ff", "score": "0.46824217", "text": "public function updateClassFieldAuditing(int $index, string $field, bool $auditSuccess, bool $auditFailure);", "title": "" }, { "docid": "c0d5eeed0b7d0b8d797e6cba30735a5c", "score": "0.46730676", "text": "public function setField(GdprField $field) {\n $values = $field->toArray();\n\n $bundle = $values['bundle'];\n $field_name = $values['name'];\n\n foreach ($values as $key => $value) {\n $this->bundles[$bundle][$field_name][$key] = $value;\n }\n\n $this->filenames[$bundle] = $values['sars_filename'];\n\n return $this;\n }", "title": "" }, { "docid": "7d9aec82b8b731eee6c1a6900ace61c2", "score": "0.46708694", "text": "public function boardingPass_addClassInfo($class_label,$class_value) {\n \n if($this->passtype!=\"boardingPass\") {\n throw new \\Exception(\"You can add Class info only to Boarding pass\");\n }\n \n if($this->passtype==\"boardingPass\"&&count(@$this->passdata[$this->passtype]['auxiliaryFields'])==5) {\n throw new \\Exception(\"You can add only 5 Auxiliary fields to Boarding Pass\");\n }\n $class_info = array(\"key\" => \"class\",\"label\" => $class_label,\"value\" => $class_value);\n $this->passdata[$this->passtype]['auxiliaryFields'][] = $class_info; \n }", "title": "" }, { "docid": "b0488eb7aa112f4690b79b97d7236f24", "score": "0.46683833", "text": "function update_field( $field ) {\n\n\t\t\t// decode choices (convert to array)\n\t\t\t$field['choices'] = acf_decode_choices( $field['choices'] );\n\t\t\t$field['default_value'] = acf_decode_choices( $field['default_value'], true );\n\n\t\t\t// Convert back to string for single selects.\n\t\t\tif ( ! $field['multiple'] ) {\n\t\t\t\t$field['default_value'] = acf_unarray( $field['default_value'] );\n\t\t\t}\n\n\t\t\t// return\n\t\t\treturn $field;\n\t\t}", "title": "" }, { "docid": "32b7f571ec34605d0b3f451a3e3a2732", "score": "0.46642447", "text": "public static function loadFieldClass($type)\n\t{\n\t\treturn self::loadClass('field', $type);\n\t}", "title": "" }, { "docid": "00708c4d4f7010cfb48833078b45a016", "score": "0.4655774", "text": "public function getFieldConfiguration() {\n\t\t$extraClass = ($this->getSetting('ExtraClass')) ? $this->getSetting('ExtraClass') : '';\n\n\t\tif (is_array(self::$allowed_css) && !empty(self::$allowed_css)) {\n\t\t\t$cssList = [];\n\t\t\tforeach (self::$allowed_css as $k => $v) {\n\t\t\t\tif (!is_array($v)) {\n\t\t\t\t\t$cssList[$k] = $v;\n\t\t\t\t} elseif ($k == $this->ClassName()) {\n\t\t\t\t\t$cssList = array_merge($cssList, $v);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$ec = new DropdownField(\n\t\t\t\t$this->getSettingName('ExtraClass'), _t('EditableField.EXTRACLASSA', 'Extra Styling/Layout'), $cssList,\n\t\t\t\t$extraClass\n\t\t\t);\n\t\t} else {\n\t\t\t$ec = new TextField(\n\t\t\t\t$this->getSettingName('ExtraClass'),\n\t\t\t\t_t('EditableField.EXTRACLASSB', 'Extra css Class - separate multiples with a space'), $extraClass\n\t\t\t);\n\t\t}\n\n\t\t$right = new TextField(\n\t\t\t$this->getSettingName('RightTitle'), _t('EditableField.RIGHTTITLE', 'Right Title'),\n\t\t\t$this->getSetting('RightTitle')\n\t\t);\n\n\t\t$fields = FieldList::create(\n\t\t\t$ec, $right\n\t\t);\n\t\t$this->extend('updateFieldConfiguration', $fields);\n\n\t\treturn $fields;\n\t}", "title": "" }, { "docid": "1e478383494c7b89f497538e66785067", "score": "0.46444154", "text": "public function newFieldDefinitionUpdateStruct()\n {\n return new FieldDefinitionUpdateStruct;\n }", "title": "" }, { "docid": "8727b16ce424dd5e867c2b84336c45e4", "score": "0.46439922", "text": "public function setClass($clasName);", "title": "" }, { "docid": "bf042f22ae9dd4616bea956f5eec21eb", "score": "0.46397445", "text": "public function getFieldConfiguration()\n {\n // Sets table name and field name\n $tableName = $this->kickstarterFieldConfiguration['tableName'];\n $fieldName = $this->kickstarterFieldConfiguration['fieldName'];\n $fullFieldName = $tableName . '.' . $fieldName;\n\n // Injects the uid of the foreign table in the special markers in case of a subform item\n if ($this->kickstarterFieldConfiguration['subformItem']) {\n if ($this->getQuerier() instanceof UpdateQuerier) {\n // Gets the form action\n $formAction = $this->getQuerier()->getFormAction();\n\n // Checks if update comes from a rtf button\n if (isset($formAction['saveAndGenerateRtf'])) {\n $uidForeign = key(current($formAction['saveAndGenerateRtf']));\n } else {\n $cryptedFullFieldName = AbstractController::cryptTag($fullFieldName);\n $uidForeign = $this->getQuerier()\n ->getPostVariableKey($cryptedFullFieldName) ?? '0';\n }\n } else {\n if ($this->getController()->getViewer() != null && $this->getController()\n ->getViewer()\n ->isNewView()) {\n $uidForeign = '0';\n } else {\n $uidForeign = $this->getQuerier()->getFieldValueFromCurrentRow('uid');\n }\n }\n $this->getQuerier()->injectSpecialMarkers([\n '###uidForeignTable###' => $uidForeign\n ]);\n }\n\n // Intializes the field configuration\n $fieldConfiguration = [];\n\n // Adds the TCA config field\n $fieldConfiguration = array_merge($fieldConfiguration, TcaConfigurationManager::getTcaConfigField($tableName, $fieldName));\n\n // Adds the configuration from the kickstarter\n $fieldConfiguration = array_merge($fieldConfiguration, $this->kickstarterFieldConfiguration);\n\n // Adds the configuration from the extension TypoScript configuration\n $viewConfigurationFieldFromTypoScriptConfiguration = $this->getController()\n ->getExtensionConfigurationManager()\n ->getViewConfigurationFieldFromTypoScriptConfiguration($fullFieldName);\n if (is_array($viewConfigurationFieldFromTypoScriptConfiguration)) {\n $fieldConfiguration = array_merge($fieldConfiguration, $viewConfigurationFieldFromTypoScriptConfiguration);\n }\n\n // Adds the configuration from the page TypoScript configuration\n $viewConfigurationFieldFromPageTypoScriptConfiguration = $this->getController()\n ->getPageTypoScriptConfigurationManager()\n ->getViewConfigurationFieldFromPageTypoScriptConfiguration($fullFieldName);\n if (is_array($viewConfigurationFieldFromPageTypoScriptConfiguration)) {\n $fieldConfiguration = array_merge($fieldConfiguration, $viewConfigurationFieldFromPageTypoScriptConfiguration);\n }\n\n // Adds the label\n $fieldConfiguration['label'] = $this->getLabel();\n\n // Adds the value\n $fieldConfiguration['value'] = $this->getValue();\n\n // Adds the required attribute\n $viewer = $this->getController()->getViewer();\n if (($viewer instanceof EditViewer || $this->getQuerier() instanceof UpdateQuerier) && $this->kickstarterFieldConfiguration['requiredif']) {\n $fieldConfiguration['required'] = ($this->processFieldCondition($this->kickstarterFieldConfiguration['requiredif']) ? '1' : '0');\n } else {\n $fieldConfiguration['required'] = $fieldConfiguration['required'] || preg_match('/required/', $fieldConfiguration['eval']) > 0;\n }\n\n // Adds special attributes\n $querier = $this->getQuerier();\n if (! empty($querier)) {\n // Adds the uid\n $fieldConfiguration['uid'] = $querier->getFieldValueFromCurrentRow('uid');\n // Adds field-based attributes\n $fieldBasedAttribute = $fieldConfiguration['fieldlink'];\n if (! empty($fieldBasedAttribute)) {\n $fieldConfiguration['link'] = $querier->getFieldValueFromCurrentRow($querier->buildFullFieldName($fieldBasedAttribute));\n }\n $fieldBasedAttribute = $fieldConfiguration['fieldmessage'];\n if (! empty($fieldBasedAttribute)) {\n $fieldConfiguration['message'] = $querier->getFieldValueFromCurrentRow($querier->buildFullFieldName($fieldBasedAttribute));\n }\n }\n\n // Adds the default class label\n $fieldConfiguration['classLabel'] = $this->getClassLabel();\n\n // Adds the style for the label if any\n if ($this->kickstarterFieldConfiguration['stylelabel']) {\n $fieldConfiguration['styleLabel'] = $this->kickstarterFieldConfiguration['stylelabel'];\n }\n\n // Adds the default class value\n $fieldConfiguration['classValue'] = $this->getClassValue();\n\n // Adds the style for the value if any\n if ($this->kickstarterFieldConfiguration['stylevalue']) {\n $fieldConfiguration['styleValue'] = $this->kickstarterFieldConfiguration['stylevalue'];\n }\n\n // Adds the default class Field\n $fieldConfiguration['classField'] = $this->getClassField();\n\n // Adds the default class Item\n $fieldConfiguration['classItem'] = $this->getClassItem();\n\n // Adds the error flag if there was at least an error during the update\n $fieldConfiguration['error'] = $this->getErrorFlag();\n\n // Adds the cutters (fusion and field)\n $this->setCutFlag();\n $fieldConfiguration['cutDivItemBegin'] = $this->getCutDivItemBegin();\n $fieldConfiguration['cutDivItemInner'] = $this->getCutDivItemInner();\n $fieldConfiguration['cutDivItemEnd'] = $this->getCutDivItemEnd();\n $fieldConfiguration['cutLabel'] = $this->getCutLabel();\n\n // Gets the value from the TypoScript stdwrap property, if any\n if ($this->kickstarterFieldConfiguration['stdwrapvalue']) {\n $fieldConfiguration['value'] = $this->getValueFromTypoScriptStdwrap($fieldConfiguration['value']);\n }\n\n // Gets the value from a TypoScript object, if any\n if ($this->kickstarterFieldConfiguration['tsobject']) {\n $fieldConfiguration['value'] = $this->getValueFromTypoScriptObject();\n }\n\n // Adds the item wrapper if the viewer exists\n $viewer = $this->getController()->getViewer();\n if (! empty($viewer)) {\n if ($this->kickstarterFieldConfiguration['wrapitemifnotcut'] && ! $fieldConfiguration['cutDivItemInner']) {\n $this->kickstarterFieldConfiguration['wrapitem'] = $this->kickstarterFieldConfiguration['wrapitemifnotcut'];\n }\n $fieldConfiguration['wrapItem'] = $querier->parseLocalizationTags($this->kickstarterFieldConfiguration['wrapitem']);\n $fieldConfiguration['wrapItem'] = $querier->parseFieldTags($fieldConfiguration['wrapItem']);\n\n $fieldConfiguration['wrapInnerItem'] = $querier->parseLocalizationTags($this->kickstarterFieldConfiguration['wrapinneritem']);\n $fieldConfiguration['wrapInnerItem'] = $querier->parseFieldTags($fieldConfiguration['wrapInnerItem']);\n\n $fieldConfiguration['wrapValue'] = $querier->parseLocalizationTags($this->kickstarterFieldConfiguration['wrapvalue']);\n $fieldConfiguration['wrapValue'] = $querier->parseFieldTags($fieldConfiguration['wrapValue']);\n }\n\n // Processes edit attribute and condition if any\n if ($viewer instanceof EditViewer && $this->kickstarterFieldConfiguration['editif']) {\n $fieldConfiguration['edit'] = ($this->processFieldCondition($this->kickstarterFieldConfiguration['editif']) ? '1' : '0');\n }\n\n // Adds the TODO if any\n if (! empty($this->kickstarterFieldConfiguration['todo'])) {\n FlashMessages::addError('error.todo', [\n $fullFieldName,\n $this->kickstarterFieldConfiguration['todo']\n ]);\n }\n\n return $fieldConfiguration;\n }", "title": "" }, { "docid": "39ef3a43041261c710110ab17cde9dfe", "score": "0.4639333", "text": "public function setClass(?string $class): void\n {\n $this->class = $class;\n }", "title": "" }, { "docid": "ac3507b50411caf407659c54fd75a03e", "score": "0.4635186", "text": "protected function afterGetFieldDefinition() : void\n {\n }", "title": "" }, { "docid": "9369e1cfefaa9e87f57baa76b2fdeed5", "score": "0.46331537", "text": "function update_field( $field ) {\n\t\t\n\t\treturn $field;\n\t\t\n\t}", "title": "" }, { "docid": "2826c7f7d1ce59a6b60ece9e6d3da52b", "score": "0.4630579", "text": "function __construct($fieldSchema) {\r\n foreach ($fieldSchema as $name => $value) {\r\n $this->$name = $value;\r\n }\r\n}", "title": "" }, { "docid": "9cedce500a3293378c63f32feef0061f", "score": "0.46300504", "text": "public function instantiateFieldAndReturn($field_config_ob) {\n\t\t$return_field_object = new fieldSQL($field_config_ob);\n $return_field_object->field_config_data = $return_field_object->data;\n $return_field_object->data = NULL;\n\t\treturn $return_field_object;\n\t}", "title": "" }, { "docid": "49be4bae88be3f525e4b96a6687c74a8", "score": "0.46227905", "text": "public function buildConfig($fieldArray)\n {\n $this->fieldArray = $fieldArray;\n $this->emailFullName = $fieldArray['first_name'] . ' ' . $fieldArray['last_name'];\n $this->emailSubject = \"Support Request from $this->emailFullName\";\n $this->emailFrom = [$fieldArray['email'], $this->emailFullName];\n }", "title": "" }, { "docid": "8a4050b3f5cfe638592546c8ae02578f", "score": "0.46157378", "text": "protected function alterFields(&$fields) {\n }", "title": "" }, { "docid": "43adf93b434a8f8d8fd216592c4981d0", "score": "0.46144614", "text": "public function setField($fieldName) {}", "title": "" }, { "docid": "38bf75bbf5ea399022057b50f5757843", "score": "0.4614123", "text": "public function setFormClass($class){\n $this->formClass = $class;\n }", "title": "" }, { "docid": "8f4afcaf96e0424b16208e352dc63595", "score": "0.46131966", "text": "public function addFields()\n {\n $this->configFields['query'] = new Tweester_Settings_Option_Query(self::SECTION_SEARCH, $this->coreManager);\n $this->configFields['excludes'] = new Tweester_Settings_Option_Excludes(self::SECTION_SEARCH, $this->coreManager);\n $this->configFields['cron_run_time'] = new Tweester_Settings_Option_CronRunTime(self::SECTION_CRON, $this->coreManager);\n }", "title": "" }, { "docid": "7f7251ef7c533fab8010136e909804c6", "score": "0.46058902", "text": "function initAjaxDBFieldUpdater() {\n $fieldUpdater = new M_Office_AjaxDBFieldUpdater();\n $this->registerClass($fieldUpdater,'fieldUpdater','updateField','invertBool');\n }", "title": "" }, { "docid": "a0638197a6a50d02ad469efe195edb85", "score": "0.46058363", "text": "function hook_entity_field_info_alter(&$info, $entity_type) {\n if (!empty($info['definitions']['mymodule_text'])) {\n // Alter the mymodule_text property to use a custom class.\n $info['definitions']['mymodule_text']['class'] = '\\Drupal\\anothermodule\\EntityComputedText';\n }\n}", "title": "" }, { "docid": "b0ee5c94a95a8ce0554095145dd49675", "score": "0.4603161", "text": "private function updateConfig() {\n\t\t$this->FreePBX->WriteConfig(array($this->file => $this->config->ProcessedConfig));\n\t}", "title": "" }, { "docid": "7c163f17f03235686c2030c2c1301d0f", "score": "0.460279", "text": "public function initFieldAttributes() {\n\t\t$configAr = Configs\\Ar::config();\n\t\t$configSo = Configs\\So::config();\n\t\t$custID = Configs\\Sys::custid();\n\n\t\t$attributes = self::FIELD_ATTRIBUTES;\n\t\t$attributes['webgroup']['disabled'] = $configAr->isWebGroup() === false || $custID == 'ALUMAC';\n\t\t$attributes['salesprogram']['disabled'] = $configSo->isRequestProgram() === false;\n\t\t$attributes['ecommdesc']['disabled'] = $custID != 'LINDST';\n\t\t$this->fieldAttributes = $attributes;\n\t}", "title": "" }, { "docid": "7ec274ce1fb7cdcbc435ac81cc0819f8", "score": "0.46018553", "text": "final protected function define(ClassDefinition $class)\n {\n $class->property($this->id)->nullable()->asInt();\n\n $this->defineEntity($class);\n }", "title": "" }, { "docid": "20418fb9322513cd764922b39723fefe", "score": "0.45972225", "text": "protected function createFields() { }", "title": "" }, { "docid": "f09748a9370ca3f9f001015adf941424", "score": "0.45963374", "text": "public final function setInputClass ($prValue)\n {\n\n $this->inputClass = $prValue;\n\n }", "title": "" }, { "docid": "802491038abacc75736a0354fb611932", "score": "0.45915234", "text": "public function _create(App_Generator_Php_Config $config)\n {\n $classGen = new Zend_CodeGenerator_Php_Class();\n\n $docblock = new Zend_CodeGenerator_Php_Docblock(array(\n 'shortDescription' => 'Automatically generated data model',\n 'longDescription' => 'This class has been automatically generated based on the dbTable \"' . $config->tableName . '\" @ ' . strftime('%d-%m-%Y %H:%M')\n ));\n\n $classGen\n ->setName($config->className)\n ->setExtendedClass($config->extends)\n ->setDocblock($docblock)\n ->setProperty(array(\n 'name' => '_name',\n 'visibility' => 'protected',\n 'defaultValue' => $config->tableName,\n ))\n ->setProperty(array(\n 'name' => '_primary',\n 'visibility' => 'protected',\n 'defaultValue' => $config->primary,\n ))\n ->setProperty(array(\n 'name' => '_dependentTables',\n 'visibility' => 'protected',\n 'defaultValue' => $config->dependents,\n ))\n ->setProperty(array(\n 'name' => '_referenceMap',\n 'visibility' => 'protected',\n 'defaultValue' => $config->relations,\n ));\n /*\n ->setProperty(array(\n 'name' => '_metadata',\n 'visibility' => 'protected',\n 'defaultValue' => $config->metadata,\n ));\n */\n if ($config->isReflection) {\n $classGen = $this->_createFromReflection($config, $classGen);\n }\n return $classGen;\n }", "title": "" }, { "docid": "b72e3e899a3d877ca2cc6e7878ac9179", "score": "0.45912975", "text": "public function setClass($class) {\n $this->class = new Attribute('class', $class);\n $this->addAttribute($this->class);\n }", "title": "" }, { "docid": "fcc810b5e2570062564e861cd2df286b", "score": "0.45864743", "text": "protected function define(ClassDefinition $class)\n {\n $class->property($this->data)->asString();\n }", "title": "" }, { "docid": "0902e45ec56379fe48fd864dd096ea29", "score": "0.45675066", "text": "public function setField($field){\r\n\t\t$this->field = $field;\r\n\t}", "title": "" }, { "docid": "cf5b65d18fcf4f250f7962017dc2f6c7", "score": "0.4566583", "text": "public function updateMinorClass($id, $fields) {\r\n\t\t$this->db->where('min_class_id', $id);\r\n\t\t$this->db->limit(1); //always limit one\r\n\t\t$this->db->update('minor_class', $fields);\r\n\t\t\r\n\t\treturn null; //null\r\n\t}", "title": "" }, { "docid": "7761605d7a215d6461cf95e949e6e320", "score": "0.45626947", "text": "public function __set($field, $value) { if(property_exists($this, $field)) $this->{$field} = $value; }", "title": "" }, { "docid": "72d0ed585fca3972f378791b7bbdc3ef", "score": "0.45626855", "text": "protected function setUpModelFields()\n\t{\n\t\tif (isset($this->extraData['valueType'])) {\n\t\t\t$this->valueType = $this->extraData['valueType'];\n\t\t}\n\t\tif (isset($this->extraData['valueField'])) {\n\t\t\t$this->valueName = $this->extraData['valueField'];\n\t\t}\n\t\t$this->groupFieldModel = Vtiger_Field_Model::getInstance($this->extraData['groupField'], $this->getTargetModuleModel());\n\t\t$this->groupFieldName = $this->groupFieldModel->getFieldName();\n\t\t$this->groupName = $this->groupFieldModel->getName();\n\t\tif ($this->isDividedByField()) {\n\t\t\t$this->dividingFieldModel = Vtiger_Field_Model::getInstance($this->extraData['dividingField'], $this->getTargetModuleModel());\n\t\t\t$this->dividingFieldName = $this->dividingFieldModel->getFieldName();\n\t\t\t$this->dividingName = $this->dividingFieldModel->getName();\n\t\t}\n\t}", "title": "" }, { "docid": "e05feff23d9cc474478b1c184882cc79", "score": "0.45584407", "text": "public function with_config_reflect($class_name, $config){\n return static::with_just_config($class_name, $config, 'with_config_reflect');\n }", "title": "" }, { "docid": "d3b2a6e94f4afcf49bb5ffce99c8d7af", "score": "0.4554499", "text": "public function injectKickstarterFieldConfiguration(&$kickstarterFieldConfiguration)\n {\n $this->kickstarterFieldConfiguration = $kickstarterFieldConfiguration;\n $this->setFullFieldName();\n }", "title": "" }, { "docid": "346b0239396a845d63559e17543e0f63", "score": "0.45529488", "text": "function append_field($name, $config)\n {\n if (array_key_exists($name, $this->fields)) {\n throw new midcom_error(\"Duplicate field {$name} encountered, schema operation is invalid. Aborting.\");\n }\n\n $this->field_order[] = $name;\n $this->_complete_field_defaults($config);\n $this->fields[$name] = $config;\n }", "title": "" }, { "docid": "a9015ab89b932cdcd9d29f8384f8197c", "score": "0.4549463", "text": "public function setFields($value);", "title": "" }, { "docid": "bf42973c6751db2b2653a2037bea7786", "score": "0.45417383", "text": "protected function prepareClass(): void\n {\n $namespace = config('travy.definitions.namespace');\n $name = Str::studly($this->name);\n $this->class = \"{$namespace}\\\\Dashboard\\\\{$name}Dashboard\";\n }", "title": "" }, { "docid": "b4ef6af46b710569e88ca56ee8a23539", "score": "0.45304668", "text": "public static function build(array $config, $fieldName=null) {\n\t\t$Field = parent::build($config, $fieldName);\n\t\tif (empty($Field->validValues)) {\n\t\t\tthrow new \\InvalidArgumentException();\n\t\t}\n\t\treturn $Field;\n\t}", "title": "" }, { "docid": "bed1ed20e12c89e3d3b4a1acc42f9fe9", "score": "0.45273754", "text": "public function update(Request $request, Field $field)\n {\n try {\n\n\n\n $field->fill([\n\n \"title\" => $request->input(\"title\"),\n \"category_id\"=> $request->input(\"category_id\"),\n \"excerpt\" => $request->input(\"excerpt\"),\n \"body\" => $request->input(\"body\"),\n \"name\" => $request->input(\"name\"),\n \"defination\" => $request->input(\"defination\"),\n \"description\" => $request->input(\"description\"),\n \"comment\" => $request->input(\"comment\"),\n \"tfield1\"=> $request->input(\"tfield1\"),\n \"tfield2\"=> $request->input(\"tfield2\"),\n \"tfield3\"=> $request->input(\"tfield3\"),\n \"tfield4\"=> $request->input(\"tfield4\"),\n \"tfield5\"=> $request->input(\"tfield5\"),\n \"tfield6\"=> $request->input(\"tfield6\"),\n \"tfield7\"=> $request->input(\"tfield7\"),\n \"tfield8\"=> $request->input(\"tfield8\"),\n \"tfield9\"=> $request->input(\"tfield9\"),\n \"tfield10\"=> $request->input(\"tfield10\"),\n \"file_url\"=> $request->input(\"file_url\"),\n \"name_label\" => $request->input(\"name_label\"),\n \"defination_label\" => $request->input(\"defination_label\"),\n \"description_label\" => $request->input(\"description_label\"),\n \"comment_label\" => $request->input(\"comment_label\"),\n \"img_url\" => $request->input(\"img_url\"),\n \"link_url\" => $request->input(\"link_url\"),\n \"excerpt_label\" => $request->input(\"excerpt_label\"),\n \"body_label\" => $request->input(\"body_label\"),\n \"img_url_label\" => $request->input(\"img_url_label\"),\n \"link_url_label\" => $request->input(\"link_url_label\"),\n \"title_label\" => $request->input(\"title_label\"),\n \"tfield1_label\"=> $request->input(\"tfield1_label\"),\n \"tfield2_label\"=> $request->input(\"tfield2_label\"),\n \"tfield3_label\"=> $request->input(\"tfield3_label\"),\n \"tfield4_label\"=> $request->input(\"tfield4_label\"),\n \"tfield5_label\"=> $request->input(\"tfield5_label\"),\n \"tfield6_label\"=> $request->input(\"tfield6_label\"),\n \"tfield7_label\"=> $request->input(\"tfield7_label\"),\n \"tfield8_label\"=> $request->input(\"tfield8_label\"),\n \"tfield9_label\"=> $request->input(\"tfield9_label\"),\n \"tfield10_label\"=> $request->input(\"tfield10_label\"),\n \"file_url_label\"=> $request->input(\"file_url_label\"),\n \"galery\" => $request->input(\"galery\"),\n \"content\" => $request->input(\"content\"),\n \"meta_description\" => $request->input(\"meta_description\"),\n \"meta_keyword\" => $request->input(\"meta_keyword\"),\n\n\n ])->save();\n\n\n\n\n return back()->with(\"success\", \"Güncelleme İşlemi Başarılı\");\n }\n catch (\\Exception $e)\n {\n\n\n echo $e->getMessage();\n }\n }", "title": "" }, { "docid": "4f108be426ec11368e68fd6fc0eac9d9", "score": "0.4517064", "text": "public function _fillContainerTypesClassnameFields() {\n $types = [\n [\n 'name' => 'vertical',\n 'classname' => 'App\\Models\\Backoffice\\ContainerTypes\\Vertical',\n ],\n [\n 'name' => 'horizontal',\n 'classname' => 'App\\Models\\Backoffice\\ContainerTypes\\Horizontal'\n ]\n ];\n\n $containerTypes = \\App\\Models\\Backoffice\\ContainerType::all();\n $num = count($containerTypes);\n for ($i = 0; $i < $num; $i++) {\n $containerTypes[$i]->classname = $types[$i]['classname'];\n $containerTypes[$i]->name = $types[$i]['name'];\n $containerTypes[$i]->save();\n }\n }", "title": "" }, { "docid": "6761fd6ab27e2c4023bbc2d2416394a9", "score": "0.45111743", "text": "public function setClass($class) {\n $this->_class = $class;\n }", "title": "" }, { "docid": "fc09e00b6f7b869d24a91da8e8d6ae07", "score": "0.45067427", "text": "abstract protected function _initModelInstance($class, $totalCode, $totalConfig);", "title": "" }, { "docid": "7d247d0fc42b6e5464de6ce9cc0ed0ce", "score": "0.45032233", "text": "protected function saveChangesToClass() {\n foreach ($this->vals as $key => $val) {\n self::$loadedVars[$key] = $val;\n }\n }", "title": "" }, { "docid": "edaf44a21daed93d2160cba75c55f0da", "score": "0.44910944", "text": "function populateFieldInfo($thisFieldInfo,$SQLLayerFieldInfo)\r\n\t{\r\n\t\tif (method_exists($SQLLayerFieldInfo,\"auto_increment\"))\r\n\t\t{\r\n\t\t\t$thisFieldInfo->setAutoIncrement($SQLLayerFieldInfo->auto_increment);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$thisFieldInfo->setAutoIncrement(false);\r\n\t\t}\r\n\r\n\t\t\r\n\t\tif (method_exists($SQLLayerFieldInfo,\"primary_key\"))\r\n\t\t{\r\n\t\t\t$thisFieldInfo->setPrimaryKey($SQLLayerFieldInfo->primary_key);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$thisFieldInfo->setPrimaryKey(false);\r\n\t\t}\r\n\r\n\r\n\r\n\t\tif (method_exists($SQLLayerFieldInfo,\"default_value\"))\r\n\t\t{\r\n\t\t\t$thisFieldInfo->setDefaultValue($SQLLayerFieldInfo->default_value);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$thisFieldInfo->setDefaultValue(\"\");\r\n\t\t}\r\n\r\n\r\n\t\tif (method_exists($SQLLayerFieldInfo,\"type\"))\r\n\t\t{\r\n\t\t\t$thisFieldInfo->setFieldDbType($SQLLayerFieldInfo->type);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$thisFieldInfo->setFieldDbType(\"Undefined Type\");\r\n\t\t}\r\n\r\n\t\tif (method_exists($SQLLayerFieldInfo,\"max_length\"))\r\n\t\t{\r\n\t\t\t$thisFieldInfo->setFieldLength($SQLLayerFieldInfo->max_length);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$thisFieldInfo->setFieldLength(\"0\");\r\n\t\t}\r\n\r\n\r\n\t\t$thisFieldInfo->setFieldName($SQLLayerFieldInfo->name);\r\n\t\t$thisFieldInfo->setFieldFormType(\"\");\r\n\t\t$thisFieldInfo->setFieldLabel(\"\");\r\n\r\n\r\n\r\n\r\n\t\tif ($thisFieldInfo->getPrimaryKey()==1)\r\n\t\t{\r\n\t\t\t$this->setPrimaryKey($thisFieldInfo->getFieldName());\r\n\t\t}\r\n\r\n\t\treturn $thisFieldInfo;\r\n\r\n\t}", "title": "" }, { "docid": "69387a6864e1420c1dd7709cda0591c0", "score": "0.44861248", "text": "protected function configureFields()\r\n {\r\n return true;\r\n }", "title": "" }, { "docid": "fb22825ff1508f6960fef98260c5be79", "score": "0.44859308", "text": "protected function build(array $field) {\n\n $container = $this;\n $name = a::get($field, 'name');\n $type = a::get($field, 'type', 'text');\n $required = a::get($field, 'required', false);\n $default = a::get($field, 'default', '');\n $value = a::get($this->data, $name, $default);\n\n // Append an asterisk to required fields\n if ($required) {\n\n $field['label'] .= '<abbr title=\"' . l('comments.field.required', 'Required') . '\">*</abbr>';\n $field['aria-required'] = true;\n\n }\n\n // Create a field label\n if (!empty($field['label'])) {\n\n $class = 'field field--type-' . $type . ' field--name-' . strtr($name, '_', '-');\n $container = new Brick('div', array('class' => $class));\n $label = new Brick('label', $field['label']);\n\n if (!empty($field['id'])) {\n $label->attr('for', $field['id']);\n }\n\n $container->append($label);\n\n }\n\n // Apply default class name\n if (empty($field['class'])) {\n $field['class'] = 'input input--' . $type . ' input--' . strtr($name, '_', '-');\n }\n\n // Create a whitelist of allowed attribute names\n $attrs = array(\n 'id',\n 'class',\n 'name',\n 'value',\n 'required',\n 'placeholder',\n 'aria-required',\n 'autocomplete'\n );\n\n switch ($type) {\n case 'text':\n case 'email':\n case 'url':\n $attrs[] = 'type';\n $attrs[] = 'size';\n break;\n case 'textarea':\n $attrs[] = 'rows';\n $attrs[] = 'cols';\n break;\n }\n\n $tag = ( $type === 'textarea' ) ? 'textarea' : 'input';\n $attrs = array_intersect_key($field, array_flip($attrs));\n\n // Create form field\n $element = new Brick($tag, '', $attrs);\n if ( !empty($value) && ('input' === $element->tag()) ) {\n $element->attr('value', $value);\n }\n\n // Render field and container\n if ($container != $this) {\n $this->append($element, $container);\n } else {\n $this->append($element);\n }\n\n }", "title": "" }, { "docid": "79ae76f67791d1a7fd2b121aa90d9a4d", "score": "0.44709066", "text": "public function _load_class( $class, $field_type, $module ) {\n\t\tif ( strtolower( $field_type ) !== strtolower( $this->type ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! empty( $this->class_file ) ) {\n\t\t\trequire_once $this->dir( $this->class_file );\n\t\t} else {\n\t\t\t$this->load_field_class( $class, $field_type, $module );\n\t\t}\n\t}", "title": "" }, { "docid": "a9a2b3eb042576cd6d8d9d33832208b4", "score": "0.44667107", "text": "function fieldClass( &$field, &$user, &$postdata, $reason ) {\r\r\n\t\tglobal $_CB_framework, $_CB_database, $ueConfig, $_GET;\r\r\n\r\r\n\t\tparent::fieldClass( $field, $user, $postdata, $reason );\t\t// performs spoofcheck.\r\r\n\r\r\n\t\tif ( ( ( ( $field->type == 'primaryemailaddress' ) && ( isset( $ueConfig['reg_email_checker'] ) && ( $ueConfig['reg_email_checker'] > 0 ) ) )\r\r\n\t\t\t\t||\t$field->params->get( 'field_check_email', 0 )\r\r\n\t\t\t\t|| ( $_CB_framework->getUi() == 2 ) )\r\r\n\t\t\t&& ( ( $reason == 'edit' ) || ( $reason == 'register' ) ) )\r\r\n\t\t{\r\r\n\t\t\t$function\t\t\t=\tcbGetParam( $_GET, 'function', '' );\r\r\n\t\t\tif ( $function == 'checkvalue' ) {\r\r\n\t\t\t\t$email\t\t\t=\tstripslashes( cbGetParam( $postdata, 'value', '' ) );\r\r\n\t\t\t\t$emailISO \t\t=\tCBTxt::utf8ToISO( $email );\t\t\t// ajax sends in utf8, we need to convert back to the site's encoding.\r\r\n\t\t\t\r\r\n\t\t\t\tif ( ( $field->type == 'primaryemailaddress' )\r\r\n\t\t\t\t&& ( ( isset( $ueConfig['reg_email_checker'] ) ? ( $ueConfig['reg_email_checker'] > 1 ) : false ) || ( $_CB_framework->getUi() == 2 ) )\r\r\n\t\t\t\t&& ( ( $reason == 'register' ) || ( ( $reason == 'edit') && $user && ( $emailISO != $user->email ) ) ) )\r\r\n\t\t\t\t{\r\r\n\t\t\t\t\tif ( $_CB_database->isDbCollationCaseInsensitive() ) {\r\r\n\t\t\t\t\t\t$query\t=\t\"SELECT COUNT(*) AS result FROM #__users WHERE email = \" . $_CB_database->Quote( ( trim( $emailISO ) ) );\r\r\n\t\t\t\t\t} else {\r\r\n\t\t\t\t\t\t$query\t=\t\"SELECT COUNT(*) AS result FROM #__users WHERE LOWER(email) = \" . $_CB_database->Quote( ( strtolower( trim( $emailISO ) ) ) );\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t\t$_CB_database->setQuery($query);\r\r\n\t\t\t\t\t$dataObj\t=\tnull;\r\r\n\t\t\t\t\tif ( $_CB_database->loadObject( $dataObj ) ) {\r\r\n\t\t\t\t\t\tif ( $function == 'testexists' ) {\r\r\n\t\t\t\t\t\t\tif ( $dataObj->result ) {\r\r\n\t\t\t\t\t\t\t\treturn '<span class=\"cb_result_ok\">' . sprintf( ISOtoUtf8( _UE_EMAIL_EXISTS_ON_SITE ), htmlspecialchars( $email ) ) . \"</span>\";\r\r\n\t\t\t\t\t\t\t} else {\r\r\n\t\t\t\t\t\t\t\treturn '<span class=\"cb_result_error\">' . sprintf( ISOtoUtf8( _UE_EMAIL_DOES_NOT_EXISTS_ON_SITE ), htmlspecialchars( $email ) ) . \"</span>\";\r\r\n\t\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\t} else {\r\r\n\t\t\t\t\t\t\tif ( $dataObj->result ) {\r\r\n\t\t\t\t\t\t\t\treturn '<span class=\"cb_result_error\">' . sprintf( ISOtoUtf8( _UE_EMAIL_ALREADY_REGISTERED ), htmlspecialchars( $email ) ) . \"</span>\";\r\r\n\t\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\t}\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t}\r\r\n\t\t\t\tif ( $function == 'testexists' ) {\r\r\n\t\t\t\t\treturn ISOtoUtf8( _UE_NOT_AUTHORIZED );\r\r\n\t\t\t\t} else {\r\r\n\t\t\t\t\tif ( ( $reason == 'register' ) || ( ( $reason == 'edit') && $user && ( $emailISO != $user->email ) ) || ( $_CB_framework->getUi() == 2 ) ) {\r\r\n\t\t\t\t\t\t$checkResult\t=\tcbCheckMail( $_CB_framework->getCfg( 'mailfrom' ), $emailISO );\r\r\n\t\t\t\t\t} else {\r\r\n\t\t\t\t\t\treturn '<span class=\"cb_result_info\">' . sprintf( ISOtoUtf8( CBTxt::T(\"No changes.\") ), htmlspecialchars( $email ) ) . \"</span>\";\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t}\r\r\n\t\t\t\tswitch ( $checkResult ) {\r\r\n\t\t\t\t\tcase -2:\r\r\n\t\t\t\t\t\treturn '<span class=\"cb_result_error\">' . sprintf( ISOtoUtf8( _UE_EMAIL_NOVALID ), htmlspecialchars( $email ) ) . \"</span>\";\r\r\n\t\t\t\t\t\tbreak;\r\r\n\t\t\t\t\tcase -1:\r\r\n\t\t\t\t\t\treturn '<span class=\"cb_result_warning\">' . sprintf( ISOtoUtf8( _UE_EMAIL_COULD_NOT_CHECK ), htmlspecialchars( $email ) ) . \"</span>\";\r\r\n\t\t\t\t\t\tbreak;\r\r\n\t\t\t\t\tcase 0:\r\r\n\t\t\t\t\t\tif ( $ueConfig['reg_confirmation'] == 0 ) {\r\r\n\t\t\t\t\t\t\treturn '<span class=\"cb_result_error\">' . sprintf( ISOtoUtf8( _UE_EMAIL_INCORRECT_CHECK ), htmlspecialchars( $email ) ) . \"</span>\";\r\r\n\t\t\t\t\t\t} else {\r\r\n\t\t\t\t\t\t\treturn '<span class=\"cb_result_error\">' . sprintf( ISOtoUtf8( _UE_EMAIL_INCORRECT_CHECK_NEEDED ), htmlspecialchars( $email ) ) . \"</span>\";\r\r\n\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\tbreak;\r\r\n\t\t\t\t\tcase 1:\r\r\n\t\t\t\t\t\treturn '<span class=\"cb_result_ok\">' . sprintf( ISOtoUtf8( _UE_EMAIL_VERIFIED ), htmlspecialchars( $email ) ) . \"</span>\";\r\r\n\t\t\t\t\t\tbreak;\r\r\n\t\t\t\t\tdefault:\r\r\n\t\t\t\t\t\treturn '<span class=\"cb_result_error\">' . sprintf(CBTxt::T('Unexpected cbCheckMail result: %s'), $checkResult) . '.</span>';\r\r\n\t\t\t\t\t\tbreak;\r\r\n\t\t\t\t}\r\r\n\t\t\t}\r\r\n\t\t\treturn null;\r\r\n\t\t} else {\r\r\n\t\t\treturn ISOtoUtf8( _UE_NOT_AUTHORIZED );\r\r\n\t\t}\r\r\n\t}", "title": "" }, { "docid": "f07c858371623bda3b47256cbbabac66", "score": "0.4466702", "text": "protected function setClass($class)\n {\n return $this->setToken('Class', $class);\n }", "title": "" }, { "docid": "af566a4425f09e587385a89ec35b5898", "score": "0.4453912", "text": "public function setFieldMapping($fieldMapping) {}", "title": "" }, { "docid": "5f0ff82f49b975961a2f8c4c07b91087", "score": "0.44509435", "text": "public function __construct($field) {}", "title": "" }, { "docid": "ce17c9c7fd3e9b9c960a7add77d5eea8", "score": "0.4449542", "text": "private function fillSqlElementFromRequest($included = false, $ext = null) {\r\n foreach ( $this as $key => $value ) {\r\n // If property is an object, recusively fill it\r\n if (ucfirst ( $key ) == $key and substr ( $key, 0, 1 ) != \"_\") {\r\n if (is_object ( $key )) {\r\n $subObjectClass = get_class ( $key );\r\n $subObject = $key;\r\n } else {\r\n $subObjectClass = $key;\r\n $subObject = new $subObjectClass ();\r\n }\r\n $subObject->fillSqlElementFromRequest ( true, $ext );\r\n $this->$key = $subObject;\r\n } else {\r\n if (substr ( $key, 0, 1 ) == \"_\") {\r\n // not a real field\r\n } else {\r\n $dataType = $this->getDataType ( $key );\r\n $dataLength = $this->getDataLength ( $key );\r\n $formField = $key . $ext;\r\n if ($included) { // if included, then object is called recursively, name is prefixed by className\r\n $formField = get_class ( $this ) . '_' . $key . $ext;\r\n }\r\n if ($dataType == 'int') {\r\n if ($dataLength == 1 and substr ( $key, 0, 11 ) != 'periodicity') {\r\n if (array_key_exists ( $formField, $_REQUEST )) {\r\n // if field is hidden, must check value, otherwise just check existence\r\n // if ($this->isAttributeSetToField($key, 'hidden')) {\r\n // V5.4 : for action isPrivate can be dynamically hidden, was not detected with prior test\r\n if ($_REQUEST [$formField] === '0' or $_REQUEST [$formField] === '1') {\r\n $this->$key = $_REQUEST [$formField];\r\n } else if ($_REQUEST [$formField] == '') {\r\n $this->$key = 0;\r\n } else {\r\n $this->$key = 1;\r\n }\r\n } else {\r\n // echo \"val=False<br/>\";\r\n $this->$key = 0;\r\n }\r\n } else if (array_key_exists ( $formField, $_REQUEST )) {\r\n $this->$key = Security::checkValidInteger ( $_REQUEST [$formField] );\r\n }\r\n } else if ($dataType == 'datetime') {\r\n $formFieldBis = $key . \"Bis\" . $ext;\r\n if ($included) {\r\n $formFieldBis = get_class ( $this ) . '_' . $key . \"Bis\" . $ext;\r\n }\r\n if (isset ( $_REQUEST [$formFieldBis] )) {\r\n $test = Security::checkValidDateTime ( $_REQUEST [$formField] );\r\n $test = Security::checkValidDateTime ( $_REQUEST [$formFieldBis] );\r\n $this->$key = $_REQUEST [$formField] . \" \";\r\n if (substr ( $_REQUEST [$formFieldBis], 0, 1 ) == 'T') {\r\n $this->$key .= substr ( $_REQUEST [$formFieldBis], 1 );\r\n } else {\r\n $this->$key .= $_REQUEST [$formFieldBis];\r\n }\r\n } else {\r\n // hidden field\r\n if (isset ( $_REQUEST [$formField] )) {\r\n $this->$key = $_REQUEST [$formField];\r\n }\r\n }\r\n } else if ($dataType == 'decimal' and (substr ( $key, - 4, 4 ) == 'Work')) {\r\n if (array_key_exists ( $formField, $_REQUEST )) {\r\n if (get_class ( $this ) == 'WorkElement') {\r\n $this->$key = Work::convertImputation ( $_REQUEST [$formField] );\r\n } else {\r\n $this->$key = Work::convertWork ( $_REQUEST [$formField] );\r\n }\r\n }\r\n } else if ($dataType == 'time') {\r\n if (array_key_exists ( $formField, $_REQUEST )) {\r\n $test = Security::checkValidDateTime ( $_REQUEST [$formField] );\r\n $this->$key = substr ( $_REQUEST [$formField], 1 );\r\n }\r\n } else if ($dataType == 'date') {\r\n if (array_key_exists ( $formField, $_REQUEST )) {\r\n $test = Security::checkValidDateTime ( $_REQUEST [$formField] );\r\n $this->$key = $_REQUEST [$formField];\r\n }\r\n } else if ($dataType == 'varchar' or substr ( $dataType, - 4 ) == 'text') {\r\n if (array_key_exists ( $formField, $_REQUEST )) {\r\n $this->$key=preg_replace('/[\\xF0-\\xF7].../s', '', $_REQUEST [$formField]);\r\n }\r\n } else {\r\n if (array_key_exists ( $formField, $_REQUEST )) {\r\n $this->$key = $_REQUEST [$formField];\r\n }\r\n }\r\n // FOR PHP 7.1 COMPATIBILITY\r\n if (($this->$key===null or $this->$key==='') \r\n and ( ($dataType=='decimal') or ($dataType=='numeric') ) \r\n and $key!='warningValue' and $key!='alertValue'\r\n//ELIOTT - LEAVE SYSTEM\r\n and !(in_array(get_class($this),self::$_classesArrayToBypassPHPCompatibilityIf) and in_array($key,self::$_attributesArrayToBypassPHPCompatibilityIf)) ) {\r\n//ELIOTT - LEAVE SYSTEM\r\n $this->$key=0;\r\n }\r\n }\r\n }\r\n }\r\n if (RequestHandler::isCodeSet('moveToAfterCreate')) {\r\n $this->_moveToAfterCreate=RequestHandler::getId('moveToAfterCreate');\r\n }\r\n }", "title": "" }, { "docid": "1d6da770d080b6fc5596a50218792bb4", "score": "0.44483373", "text": "function set_value($field,$value) {\n global $db;\n trigger_before( 'set_value', $this, $db );\n if (!(isset($this->attributes[$this->primary_key]))) {\n $pkfield = $this->primary_key;\n $this->attributes[$pkfield] = \"\";\n $this->$pkfield =& $this->attributes[$pkfield];\n }\n if ($this->validate_field($field,$value)) {\n if ($db->models[$this->table]->is_blob($field) && is_array($value))\n $value = $value['tmp_name'];\n $this->attributes[$field] = $value;\n if ( !( isset( $this->$field ) ) )\n $this->$field =& $this->attributes[$field];\n $this->modified_fields[] = $field;\n } else {\n trigger_error(\"the new value for $field is invalid\", E_USER_ERROR );\n }\n trigger_after( 'set_value', $this, $db );\n }", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "0d94828ff89f6423ccfc41f51d521f72", "score": "0.0", "text": "public function show(Show $request, Rehearsal $rehearsal)\n {\n return view('pages.rehearsals.show', [\n 'record' =>$rehearsal,\n ]);\n\n }", "title": "" } ]
[ { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.8190437", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.8190437", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "4a213f970d44ae570e7f216941006306", "score": "0.7264416", "text": "public function setting_show_resource($resource,$resourceFile)\n {\n echo $this->_template_url . '/'.$resource.'/'.$resourceFile;\n }", "title": "" }, { "docid": "fb1ffd800184a0a42701459345c41281", "score": "0.6991857", "text": "public function show(Resource $resource)\n {\n Gate::authorize('view', $resource);\n\n return $resource;\n }", "title": "" }, { "docid": "8e9fe6c0081f8ce768620060cccb65f3", "score": "0.68753964", "text": "public function show($param)\n {\n $resource = Resource::with('tags', 'likesCount', 'user', 'category')\n ->where('id', $param)\n ->orWhere('slug', $param)\n ->firstOrFail();\n\n $initialState = [\n 'resource' => $resource,\n 'currentUser' => Auth::user()\n ];\n\n return response()->view('public.resource', [\n 'appName' => 'resource',\n 'pageName' => $resource->title,\n 'initialState' => $initialState\n ]);\n }", "title": "" }, { "docid": "48b397ea8942d2fa9785a3e43388943e", "score": "0.6725769", "text": "public function show($id)\n\t{\n\t\t$resource = Resource::with('UserResourceLink')->find($id);\n\t\treturn View::make('resources.show')->with('resource', $resource);\n\t}", "title": "" }, { "docid": "2c30b4b167b469c3db298602e7ead28d", "score": "0.6711636", "text": "private function display_item($resource, $item) {\n\t\t$db = $this->db($resource);\n\t\t$item = $db->get($item);\n\n\t\tif ($item) {\n\t\t\t echo json_encode($item);\n\t\t} else {\n\t header('HTTP/1.1 404 Not Found');\n\t }\n\t}", "title": "" }, { "docid": "95bf452408be21abf4a83c19b8bbd6fb", "score": "0.667411", "text": "public function show(string $resource, $id)\n {\n return Jory::byUri($resource)->find($id);\n }", "title": "" }, { "docid": "cd76a0fc79013f2dbdd01b09770768ec", "score": "0.6580917", "text": "public function show($id)\n {\n // $resource = Resource ::find($id);\n // return view('Resource.resource')->with('resource',$resource);\n }", "title": "" }, { "docid": "39dabc4dde3ba3c708fb3782a17fde5c", "score": "0.6434556", "text": "function show( $resource ){\n $product = get( 'products', $resource );\n\n return view( 'admin/product/view_product', compact( 'product' ) );\n}", "title": "" }, { "docid": "0d9d138ae5e21142d7d77d5c45711a1c", "score": "0.6386195", "text": "public function displayAction()\r\n\t{\r\n\t\t// set filters and validators for GET input\r\n\t\t$filters = array(\r\n 'id' => array('HtmlEntities', 'StripTags', 'StringTrim')\r\n\t\t);\r\n\t\t$validators = array(\r\n 'id' => array('NotEmpty', 'Int')\r\n\t\t);\r\n\t\t$input = new Zend_Filter_Input($filters, $validators);\r\n\t\t$input->setData($this->getRequest()->getParams());\r\n\r\n\t\t// test if input is valid\r\n\t\t// retrieve requested record\r\n\t\t// attach to view\r\n\t\tif ($input->isValid()) {\r\n\t\t\t$q = Doctrine_Query::create()\r\n\t\t\t->from('Webteam_Model_Video i')\r\n\t\t\t->where('i.VideoID = ?', $input->id);\r\n\t\t\t$result = $q->fetchArray();\r\n\t\t\tif (count($result) == 1) {\r\n\t\t\t\t$this->view->item = $result[0];\r\n\t\t\t} else {\r\n\t\t\t\tthrow new Zend_Controller_Action_Exception('Page not found', 404);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tthrow new Zend_Controller_Action_Exception('Invalid input');\r\n\t\t}\r\n\r\n\r\n\r\n\r\n\t}", "title": "" }, { "docid": "43c7d44dab00c2107caa033394e76a4e", "score": "0.6370414", "text": "public function display($spec = null)\n {\n $response = $this->fetch($spec);\n $response->display();\n }", "title": "" }, { "docid": "2c8806a4c1933c4361ab0e84ba707311", "score": "0.6274676", "text": "public function show()\n {\n $this->beginAction('show');\n $this->getResource();\n $this->applyHooks(AuthorizeResource::class);\n $this->formatResource();\n\n return $this->makeResponse();\n }", "title": "" }, { "docid": "f99807bc50ee366a325d9c40a162d254", "score": "0.62724066", "text": "public function actionGetInfoResource()\n\t{\n\t\t//die (print_r($_POST));\n\t\t$resource = Yii::app()->db->createCommand()->select('*')->from('ki_resource')\n\t\t\t\t\t\t\t\t->where('lang=:lang AND id=:id', array(':lang' => 'ru_ru', ':id' => $_POST['id']))\n\t\t\t\t\t\t\t\t->queryRow();\n\t\t\n\t\techo $this->renderPartial('_resourceInfo', array('resource' => $resource), true);\n\t}", "title": "" }, { "docid": "c8d2320b9dba46b7850ea9a25da02fad", "score": "0.61858386", "text": "public function viewResource($id)\n {\n $resource = carrierResource::where('resource_id',$id)->get();\n $carrierDetailUserID = carrierResource::where('resource_id',$id)->value('user_id');\n $carrierDetail = carrierDetail::where('user_id',$carrierDetailUserID)->get();\n return view ('resources.resourceDetails', ['resource'=>$resource, 'carrierDetail'=>$carrierDetail]);\n }", "title": "" }, { "docid": "d2e2e944df863de5f56668d68b5f0002", "score": "0.6169535", "text": "public function singleResource(Resource $resource)\n {\n if($resource->resource_status !== 'published')\n abort(404);\n $resource->increment('views');\n \n if (Auth::user()) {\n $userRourceVisit = UserRourceVisit::where('resource_id', $resource->id)->where('user_id', Auth::user()->id)->whereDate('created_at', Carbon::today())->first();\n if (blank($userRourceVisit)) {\n UserRourceVisit::create(['resource_id' => $resource->id, 'user_id' => Auth::user()->id]);\n }\n }\n\n $relatedResources = $this->resourceModel->relatedResources($resource);\n $resources = $this->resourceModel->getResourceByUserId($resource->user_id);\n\n return view('single-resource')\n ->withResource($resource)\n ->withRelated($relatedResources)\n ->withResources($resources);\n }", "title": "" }, { "docid": "f54a56f5688812ff54db4ce8c7ee9e8a", "score": "0.6088493", "text": "public function showAction($id)\n {\n $requestParameterHandler = $this->getRequestParameterHandler();\n $singleResourceRequestHandler = $this->get(self::SINGLE_RESOURCE_HANDLER);\n // TODO ADD Check if the user have authorisation before proceeding from the request.\n\n $resource = $singleResourceRequestHandler->process($id);\n\n if (null !== $resource) {\n $deleteFormView = $this->createDeleteForm(\n $requestParameterHandler\n );\n\n return $this->render(\n $requestParameterHandler->getThemePath(),\n array(\n $requestParameterHandler->getResourceViewName() => $resource,\n 'delete_form' => $deleteFormView,\n )\n );\n }\n // Add a message if the does't not exist.\n throw $this->createNotFoundException(sprintf('The %s %d %s', $requestParameterHandler->getResourceName(), $id, self::NOT_FOUND));\n }", "title": "" }, { "docid": "eb5ce2e515c2c4b1d34c71d116115e47", "score": "0.60823214", "text": "public function getResource($resource);", "title": "" }, { "docid": "ed3d20317cbecdf072f7b882feb64335", "score": "0.6073599", "text": "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Rack ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found',null,true);\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "title": "" }, { "docid": "1f19b3abcb62dd0bf36e4cc2e2e9a4b3", "score": "0.60681057", "text": "public function details($request, $response, $args) {\n $resource_id = $args['id'];\n $resource_details = $this->resource_gateway->get_resource_details($resource_id);\n\n return $this->view->render($response, 'resource/details.html.twig', [\n 'id' => $resource_id,\n 'resource_details' => $resource_details,\n ]);\n }", "title": "" }, { "docid": "c09849a3051e163c36ba622c042416dd", "score": "0.60172373", "text": "public function show($id)\n {\n $resource = $this->model::findOrFail($id);\n\n if (view()->exists($this->basicViewFolder . '.show')) {\n if (request()->ajax()) {\n return view($this->basicViewFolder . '.show', compact('resource'))->render();\n } else {\n return view($this->basicViewFolder . '.show', compact('resource'));\n }\n }\n\n return \" the view \" . $this->basicViewFolder . \".show not found\";\n }", "title": "" }, { "docid": "886db488fd45282953d62e88f2c58889", "score": "0.60164165", "text": "public function showAction($id) {\r\n\r\n $remote = $this->getDoctrine()\r\n ->getRepository('RemotePadMainBundle:Remote')\r\n ->find($id);\r\n\r\n if (!$remote) {\r\n return new Response(\"No Remote found. id: \" . $id, 404);\r\n }\r\n\r\n return $this->render('RemotePadMainBundle:Remote:show.html.twig', array('remote' => $remote));\r\n }", "title": "" }, { "docid": "df63d689055cf5765df52fd5165e28e7", "score": "0.5990083", "text": "abstract function show($identifier);", "title": "" }, { "docid": "ddc28327288006b3d29c6bdc8761ca44", "score": "0.598783", "text": "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "title": "" }, { "docid": "599b6dc077c4d34a9b3b0b168003b106", "score": "0.5974851", "text": "public function viewResource($resourceController, $id) {\n $values = self::getData($resourceController->wrapper($id));\n $function = __FUNCTION__;\n drupal_alter('restws_response', $values, $function, $this->formatName);\n\n return $this->serialize($values);\n }", "title": "" }, { "docid": "e8033cfc300396ea61f2cce5539e61f9", "score": "0.5959599", "text": "public function show() {\n\t\t$this->getOutput()->disable();\n\n\t\ttry {\n\t\t\techo $this->ampRenderer->render( $this->getArticle() );\n\t\t}\n\t\tcatch ( RevisionNotFound $e ) {\n\t\t\t$response = $this->getRequest()->response();\n\t\t\t$response->statusHeader( 302 );\n\t\t\t$response->header( 'Location: ' . $this->getTitle()->getFullURL() );\n\t\t}\n\t}", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5954321", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5954321", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "9f057a9bec094dea20c158d2ab8094d7", "score": "0.5936922", "text": "public function show(HrmAssetInformation $asset)\n {\n //\n }", "title": "" }, { "docid": "bb2e29f5f05ab065358c99c7225d6dc0", "score": "0.59295714", "text": "public function show(rc $rc)\n {\n //\n }", "title": "" }, { "docid": "9f2521adfd0849eebb7acbb6e94d94a0", "score": "0.592653", "text": "public function show($id) // show a single record\n {\n //\n }", "title": "" }, { "docid": "c356495b91bbab48f9b27e5a5ce7089e", "score": "0.59247625", "text": "public function display()\n {\n if (!current_user_can($this->capability)) {\n wp_die(__('You do not have sufficient permissions to access this page.', $this->textDomain));\n }\n\n $this->view->render();\n }", "title": "" }, { "docid": "151fea634645ed45ca7e8eb127afba25", "score": "0.59127665", "text": "public function show(Resource $resource)\n {\n $now = new \\DateTime('now');\n $reservations = $resource->reservationsIn($now->format('m'));\n\n\n $event_list = [];\n foreach ($reservations as $key => $reservation) {\n $event_list[] = Calendar::event(\n $reservation->user->name,\n false,\n new \\DateTime($reservation->start_time),\n new \\DateTime($reservation->end_time),\n null\n );\n }\n\n $calendar_details = Calendar::addEvents($event_list);\n\n return view('GeneralViews.ResourcesViews.Calendar.view', compact('calendar_details'));\n }", "title": "" }, { "docid": "301defef90a746cf93478d6f4bfc5091", "score": "0.5905301", "text": "public function show($id)\n {\n $model = $this->resourceModel;\n return $model::find($id);\n }", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59036547", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "447c87b0b6a3806d4bab38780df02aa1", "score": "0.5881883", "text": "public function displayTask($rid=null, $version=null)\n\t{\n\t\t$this->view->setLayout('display');\n\n\t\t// Incoming\n\t\tif (!$rid)\n\t\t{\n\t\t\t$rid = Request::getInt('rid', 0);\n\t\t}\n\t\tif (!$version)\n\t\t{\n\t\t\t$version = Request::getString('version', 'dev');\n\t\t}\n\n\t\t// Ensure we have an ID to work with\n\t\tif (!$rid)\n\t\t{\n\t\t\tApp::abort(500, Lang::txt('COM_TOOLS_CONTRIBUTE_NO_ID'));\n\t\t\treturn;\n\t\t}\n\t\t// Get resource information\n\t\t$resource = Entry::oneOrFail($rid);\n\n\t\t// Get version id\n\t\t$objV = new \\Components\\Tools\\Tables\\Version($this->database);\n\t\t$vid = $objV->getVersionIdFromResource($rid, $version);\n\n\t\t// Do we have a published tool?\n\t\t$this->view->published = $objV->getCurrentVersionProperty($resource->alias, 'id');\n\n\t\t// Get screenshot information for this resource\n\t\t$this->view->shots = $resource->screenshots()\n\t\t\t->whereEquals('versionid', $vid)\n\t\t\t->ordered()\n\t\t\t->rows();\n\n\t\t// Build paths\n\t\t$path = $resource->relativepath();\n\t\t$this->view->upath = PATH_APP . DS . trim($this->rconfig->get('uploadpath'), DS) . $path;\n\t\t$this->view->wpath = DS . trim($this->rconfig->get('uploadpath'), DS) . $path;\n\t\tif ($vid)\n\t\t{\n\t\t\t$this->view->upath .= DS . $vid;\n\t\t\t$this->view->wpath .= DS . $vid;\n\t\t}\n\n\t\t// Make sure wpath is preceded by app\n\t\tif (substr($this->view->wpath, 0, 4) != DS . 'app')\n\t\t{\n\t\t\t$this->view->wpath = DS . 'app' . $this->view->wpath;\n\t\t}\n\n\t\t// get config\n\t\t$this->view->cparams = Component::params('com_resources');\n\t\t$this->view->version = $version;\n\t\t$this->view->rid = $rid;\n\n\t\tforeach ($this->getErrors() as $error)\n\t\t{\n\t\t\t$this->view->setError($error);\n\t\t}\n\n\t\t// Output HTML\n\t\t$this->view->display();\n\t}", "title": "" }, { "docid": "2d9ba0bfae0a8169414d51cb94341bff", "score": "0.58672357", "text": "public function displayDoc($resource_name, $cache_id=null, $compile_id=null, $parent = null)\n {\n $this->_smarty_vars['template'] = $resource_name; // Added so that the template name would be accessible within the outputfilter\n $this->fetchDoc($resource_name, $cache_id, $compile_id, $parent);\n }", "title": "" }, { "docid": "313cd42e65f168efe8cb0ed49ea30ce1", "score": "0.58634895", "text": "public function displayAction(){\n \n // set filters and validators for GET input\n $filters = array(\n 'id' => array(\n 'HtmlEntities', \n 'StripTags', \n 'StringTrim'\n )\n );\n \n $validators = array(\n 'id' => array(\n 'NotEmpty', \n 'Int'\n )\n );\n \n // Zend_Filter_Input can validate, filter and escape input.\n // retrieve requested record\n // attach to view\n $input = new Zend_Filter_Input($filters, $validators);\n \n $input->setData($this->getRequest()\n ->getParams());\n \n if($input->isValid()) {\n \n // create service\n $service = new Catalog_Service_ItemService();\n \n $stamp_item = $service->getDisplayableItemIfNotExpired($input->id);\n \n if(isset($stamp_item)) {\n \n $this->view->stamp_item = $stamp_item; // store the StampItem in\n // the view.\n \n } else { // entity not found\n \n throw new Zend_Controller_Action_Exception('Page not found', 404);\n }\n \n } else { // not valid input\n \n throw new Zend_Controller_Action_Exception('Invalid input');\n \n } // endif\n }", "title": "" }, { "docid": "18b1a953d7b4f38d94ba36d78e007c30", "score": "0.5862241", "text": "public function display() {\n require $this->layout;\n }", "title": "" }, { "docid": "f1c47ce6af2faf1f1d79c5449022ee8c", "score": "0.58610433", "text": "public function show($id) {\n return Resource::find($id);\n }", "title": "" }, { "docid": "5dc30ed0a3c41d7bf4354e7bfd2d3260", "score": "0.58572257", "text": "protected function addResourceShow($name, $base, $controller)\n\t{\n\t\t$uri = $this->getResourceUri($name).'/{'.$base.'}';\n\n\t\treturn $this->get($uri, $this->getResourceAction($name, $controller, 'show'));\n\t}", "title": "" }, { "docid": "a57eaaa12abdbabb675c82237206d780", "score": "0.58206403", "text": "public function displayResourceUsing(string $resource, callable $displayResourceCallback)\n {\n $this->displayResourceCallback[$resource] = $displayResourceCallback;\n\n return $this;\n }", "title": "" }, { "docid": "3133b3b1b52a90fd561fc5996432c0e7", "score": "0.58170664", "text": "public function show($id)\n {\n return $this->responseItem(['title' => 'Đây là resource show ' . $id]);\n }", "title": "" }, { "docid": "1b6934d948dba93be88f01d4f4cde49a", "score": "0.58158535", "text": "public function display($context);", "title": "" }, { "docid": "935c4042b3fe02e20c14c171b86ae1d7", "score": "0.5801874", "text": "public function shouldDisplayResource($resource)\n {\n return $this->metaValue('resources.'.$resource::uriKey());\n }", "title": "" }, { "docid": "0c7f3ae23b93225868fde0e649f535aa", "score": "0.57749224", "text": "public function show(ShowResourceRequest $request, $id)\n {\n }", "title": "" }, { "docid": "b5b132820f922eef4e644b41ff67adde", "score": "0.57740575", "text": "public function show($id)\n\t{\n\t\t// unneeded for this project\n\t}", "title": "" }, { "docid": "cdbe9eb27e47a619361449d5953ad429", "score": "0.57726145", "text": "public function display()\n {\n\n $this->component->display();\n }", "title": "" }, { "docid": "fbea10219f07495b19ed6548d4ede1a4", "score": "0.5764195", "text": "public function show($id)\n\t{\n\t\t// not supported\n\t}", "title": "" }, { "docid": "cb35029e70932874ca4a7420e41f6917", "score": "0.5749518", "text": "public function discoverAction()\n {\n $this->view->title .= ' - Avaliable Resource';\n\n $data = array_values($this->_findResource());\n\n $this->view->data = $data;\n }", "title": "" }, { "docid": "7aa11579ff48f6202a3402f35980a6d7", "score": "0.574863", "text": "public function show(RestRequestInterface $request, $identifier);", "title": "" }, { "docid": "7fb606c6d980259fc7bc2be7fb3892f7", "score": "0.57364357", "text": "public function display()\n \t{\n \t\techo $this->render();\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": "b5e7179ea7c94add1c1af50e9f9b7fdd", "score": "0.57208323", "text": "public function show($id)\n\t{\n\t\n\t}", "title": "" }, { "docid": "7b33ab8280dac7d9e7f301bb46885ef2", "score": "0.57203656", "text": "public function display($action, $status);", "title": "" }, { "docid": "7eca9a150b08650a78b0cbe2467767e8", "score": "0.5714993", "text": "public function show()\n {\n return view('redistask::show');\n }", "title": "" }, { "docid": "a4bb0929797f59b1f372c0ea97423933", "score": "0.5714916", "text": "public function show()\n {\n $product = $this->model('IndexModel')->get($this->getParam()['id']);\n\n $this->template('show', $product);\n }", "title": "" }, { "docid": "91b6c2566d39e03a0eef7bad0aebcd5a", "score": "0.5707991", "text": "public function detailsAction()\n {\n // Get id from url params and check if record exist\n $params = $this->router->getParams();\n if (isset($params[0]) && $device = Devices::findFirst($params[0])) {\n $this->tag->setTitle(__('Devices') . ' / ' . __('Details'));\n $this->view->setVars([\n 'device' => $device,\n ]);\n } else {\n parent::notFoundAction();\n }\n }", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.57057405", "text": "public abstract function display();", "title": "" }, { "docid": "95c8e483ffde08b500f0a18be5d683d2", "score": "0.5704582", "text": "public function display() {\n\t$this->getRenderer()->dispatch($this);\n\n }", "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": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "d49f4e51972ac93263ce45277638f862", "score": "0.56985086", "text": "public function show($id) {\n\t\t\t\n\t}", "title": "" }, { "docid": "7b283ba1c0546a155efc95a44dd0f9cf", "score": "0.56981397", "text": "public function show(Response $response)\n {\n //\n }", "title": "" }, { "docid": "2204f8d554d9525d60e0aba235700bfd", "score": "0.56858474", "text": "public function locate($resource);", "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": "" } ]
6d3121ad3592fe18f570acbc247aed26
Operation restNewslettersFoldersFolderIdGetAsync List details of a folder
[ { "docid": "01bb04fa36acf2fc4658105fc91a67cf", "score": "0.5974566", "text": "public function restNewslettersFoldersFolderIdGetAsync($folder_id)\n {\n return $this->restNewslettersFoldersFolderIdGetAsyncWithHttpInfo($folder_id)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" } ]
[ { "docid": "f695cbeaf654d2e4a7bba6b699746730", "score": "0.7551494", "text": "protected function restNewslettersFoldersGetRequest($folder_id)\n {\n // verify the required parameter 'folder_id' is set\n if ($folder_id === null || (is_array($folder_id) && count($folder_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $folder_id when calling restNewslettersFoldersGet'\n );\n }\n\n $resourcePath = '/rest/newsletters/folders';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if (is_array($folder_id)) {\n $folder_id = ObjectSerializer::serializeCollection($folder_id, '', true);\n }\n if ($folder_id !== null) {\n $queryParams['folderId'] = $folder_id;\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": "be66e61d634f579ff77ba84fb2adddc3", "score": "0.7394224", "text": "protected function restNewslettersFoldersFolderIdGetRequest($folder_id)\n {\n // verify the required parameter 'folder_id' is set\n if ($folder_id === null || (is_array($folder_id) && count($folder_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $folder_id when calling restNewslettersFoldersFolderIdGet'\n );\n }\n\n $resourcePath = '/rest/newsletters/folders/{folderId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($folder_id !== null) {\n $resourcePath = str_replace(\n '{' . 'folderId' . '}',\n ObjectSerializer::toPathValue($folder_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": "de6f2d93472b64eaa5ef3aa3cd6e81ce", "score": "0.7207005", "text": "public function folder_get_list($ews,$folder_id=null){\n\t\t$request = new EWSType_FindFolderType();\n\t\t$request->Traversal = EWSType_FolderQueryTraversalType::DEEP; // use EWSType_FolderQueryTraversalType::DEEP for subfolders too\n\t\t$request->FolderShape = new EWSType_FolderResponseShapeType();\n\t\t$request->FolderShape->BaseShape = EWSType_DefaultShapeNamesType::ALL_PROPERTIES;\n\t\t\n\t\t// configure the view\n\t\t$request->IndexedPageFolderView = new EWSType_IndexedPageViewType();\n\t\t$request->IndexedPageFolderView->BasePoint = 'Beginning';\n\t\t$request->IndexedPageFolderView->Offset = 0;\n\t\t\n\t\t$request->ParentFolderIds = new EWSType_NonEmptyArrayOfBaseFolderIdsType();\n\t\t\n\t\tif($folder_id != null){\n\t\t\t// if you know exact folder id, then use this piece of code instead. For example\n\t\t\t$request->ParentFolderIds->FolderId = new EWSType_FolderIdType();\n\t\t\t$request->ParentFolderIds->FolderId->Id = $folder_id;\n\t\t}else{\t\t\n\t\t\t// use a distinguished folder name to find folders inside it\n\t\t\t$request->ParentFolderIds->DistinguishedFolderId = new EWSType_DistinguishedFolderIdType();\n\t\t\t$request->ParentFolderIds->DistinguishedFolderId->Id = EWSType_DistinguishedFolderIdNameType::MESSAGE_FOLDER_ROOT;\n\t\t}\n\t\t\n\t\t// request\n\t\t$response = $ews->FindFolder($request);\n\t\t$folder_data = array();\n\t\tarray_push($folder_data,$response->ResponseMessages->FindFolderResponseMessage);\n\t\treturn $folder_data;\n\t}", "title": "" }, { "docid": "26948569679691c3161829c3ed7edacd", "score": "0.71166223", "text": "public function restNewslettersFoldersFolderIdGetWithHttpInfo($folder_id)\n {\n $request = $this->restNewslettersFoldersFolderIdGetRequest($folder_id);\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\\Folder' === '\\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\\Folder', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\OpenAPI\\Client\\Model\\Folder';\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\\Folder',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "4b3ddf90258819dfd6ed62a24c79f7c4", "score": "0.6890903", "text": "public function getFolders(string $username, int $folderId);", "title": "" }, { "docid": "9e584371c888bd8bf1afe15f0518828a", "score": "0.6691115", "text": "public function restNewslettersFoldersGetWithHttpInfo($folder_id)\n {\n $request = $this->restNewslettersFoldersGetRequest($folder_id);\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\\Recipient[]' === '\\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\\Recipient[]', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\OpenAPI\\Client\\Model\\Recipient[]';\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\\Recipient[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "c13e5932cfdb0d43dc67a0d0576428d9", "score": "0.65932256", "text": "protected function restNewslettersFoldersFolderIdDeleteRequest($folder_id)\n {\n // verify the required parameter 'folder_id' is set\n if ($folder_id === null || (is_array($folder_id) && count($folder_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $folder_id when calling restNewslettersFoldersFolderIdDelete'\n );\n }\n\n $resourcePath = '/rest/newsletters/folders/{folderId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($folder_id !== null) {\n $resourcePath = str_replace(\n '{' . 'folderId' . '}',\n ObjectSerializer::toPathValue($folder_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": "e2fb272c4e080f6266d761f7af4b9d1c", "score": "0.65716714", "text": "public function getSubFolders($folderId)\n {\n $userId = Auth::user()->id;\n try {\n\n $folders = DB::table('user_parent_directory as upd')\n ->leftJoin('user_directory as ud','upd.user_directory_id','=','ud.id')\n ->select('ud.id', 'ud.name', 'ud.created_at', 'ud.updated_at')\n ->where('ud.user_id', $userId)\n ->where('upd.user_parent_directory_id', $folderId)\n ->whereNull('ud.deleted_at')->get();\n\n $documents = $this->getDocuments($userId, $folderId);\n //$signatures = User::where('id', $userId)->find(1)->userSignatures()->get();\n $response = array($this->common->success => true);\n\n $response['data']['folders'] = $folders;\n $response['data']['documents'] = $documents;\n //$response['data']['signatures'] = $signatures;\n\n } catch (\\Exception $e) {\n $response = $this->common->getErrorMessage($e->getMessage());\n }\n\n return Response::json($response);\n }", "title": "" }, { "docid": "9e3362e484d37dcc7a21c485b725bf1d", "score": "0.6553756", "text": "public function getFolders($folder, $locale = null);", "title": "" }, { "docid": "eede411bc3e969bb5e0d3bf54f721200", "score": "0.65472776", "text": "function email_get_folder($folderid) {\n\n\t$folder = new object();\n\n\tif ( $folder = get_record('email_folder', 'id', $folderid) ) {\n\n\t\tif ( isset($folder->isparenttype) ) {\n\t\t\t// Only change in parent folders\n\t\t\tif ( ! is_null($folder->isparenttype) ) {\n\t\t\t\t// If is parent ... return language name\n\t\t\t\tif ( ( email_isfolder_type($folder, EMAIL_INBOX) ) ) {\n\t\t\t\t\t$folder->name = get_string('inbox', 'block_email_list');\n\t\t\t\t}\n\n\t\t\t\tif ( ( email_isfolder_type($folder, EMAIL_SENDBOX) ) ) {\n\t\t\t\t\t$folder->name = get_string('sendbox', 'block_email_list');\n\t\t\t\t}\n\n\t\t\t\tif ( ( email_isfolder_type($folder, EMAIL_TRASH) ) ) {\n\t\t\t\t\t$folder->name = get_string('trash', 'block_email_list');\n\t\t\t\t}\n\n\t\t\t\tif ( ( email_isfolder_type($folder, EMAIL_DRAFT) ) ) {\n\t\t\t\t\t$folder->name = get_string('draft', 'block_email_list');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $folder;\n}", "title": "" }, { "docid": "1c3e086b76a043822eb3c13a057e5045", "score": "0.6489492", "text": "public function restNewslettersFoldersGet($folder_id)\n {\n list($response) = $this->restNewslettersFoldersGetWithHttpInfo($folder_id);\n return $response;\n }", "title": "" }, { "docid": "1404139197c9625750c2fde1b8ee9517", "score": "0.6397186", "text": "public function getFolderInfo() {}", "title": "" }, { "docid": "977c8a31999051f86ce54f137328615c", "score": "0.63868755", "text": "public function getFolder($folder)\n {\n $this->_init();\n return $this->_list->getFolder($folder);\n }", "title": "" }, { "docid": "5dc49252b2341c893e443ce65d740c0f", "score": "0.6384582", "text": "public function getFolder();", "title": "" }, { "docid": "c2f18e71d1c3b8f2e8bacb2d2397a9f7", "score": "0.6383679", "text": "public function listFolders(User $user, Folder $folder) {\n $folders = $folder->folders()\n ->where('account_id', $user->account->id)\n ->orderBy('name')\n ->get();\n\n return response()->json([\n 'success' => true,\n 'folders' => $folders,\n ]);\n }", "title": "" }, { "docid": "aee5895511653f6cf4b3b23b23b876d7", "score": "0.6365692", "text": "public function restNewslettersFoldersFolderIdGet($folder_id)\n {\n list($response) = $this->restNewslettersFoldersFolderIdGetWithHttpInfo($folder_id);\n return $response;\n }", "title": "" }, { "docid": "70ecc91550c2c6ed173571976349d116", "score": "0.6341666", "text": "public function all() {\n $uri = \"folder\";\n $response = $this->client->get($uri);\n return json_decode($response->getBody(), true);\n }", "title": "" }, { "docid": "43480024903502a86d5e0f09932d3a08", "score": "0.6340417", "text": "public function restNewslettersFoldersGetAsyncWithHttpInfo($folder_id)\n {\n $returnType = '\\OpenAPI\\Client\\Model\\Recipient[]';\n $request = $this->restNewslettersFoldersGetRequest($folder_id);\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": "1c7f25262d0dca69ea64d1d2188a0661", "score": "0.6291338", "text": "public function GetFriendlyFolder(GetFriendlyFolder $parameters)\n {\n return $this->__soapCall('GetFriendlyFolder', array($parameters));\n }", "title": "" }, { "docid": "ff700dc557cabfa4bec87c66b7b046f8", "score": "0.6284999", "text": "public function folder($folder)\n {\n return $this->mailbox($folder);\n }", "title": "" }, { "docid": "1bfbeaa2781b488872f3cc1ca2659e4f", "score": "0.6251672", "text": "public function get_campaign_folder( $folder_id ) {\n $endpoint = \"/campaign-folders/$folder_id/\";\n return $this->get_request( $endpoint );\n }", "title": "" }, { "docid": "be4bf4248f89dc865459b92a765f2ceb", "score": "0.62318486", "text": "protected function restNewslettersFoldersDeleteRequest()\n {\n\n $resourcePath = '/rest/newsletters/folders';\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 'DELETE',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "8e10de805af696b6cf3289fba0f3f978", "score": "0.6227186", "text": "function listFolder($sessionKey,$group_id,$item_id) {\n $params = array('id' => $item_id, 'report' => 'List');\n return _makeDocmanRequest($sessionKey, $group_id, 'show', $params);\n}", "title": "" }, { "docid": "639e541f551d6b4ed41aceafd26cd2fc", "score": "0.6220778", "text": "public function restNewslettersFoldersDeleteWithHttpInfo()\n {\n $request = $this->restNewslettersFoldersDeleteRequest();\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\\Folder[]' === '\\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\\Folder[]', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\OpenAPI\\Client\\Model\\Folder[]';\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\\Folder[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "99232857496c7880fa3bef2649d2ee48", "score": "0.62082344", "text": "public function restNewslettersFoldersFolderIdDeleteWithHttpInfo($folder_id)\n {\n $request = $this->restNewslettersFoldersFolderIdDeleteRequest($folder_id);\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\\Folder' === '\\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\\Folder', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\OpenAPI\\Client\\Model\\Folder';\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\\Folder',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "1f0bb63e64c1bd21bf8cfc03358f2356", "score": "0.61953384", "text": "public function restNewslettersFoldersFolderIdGetAsyncWithHttpInfo($folder_id)\n {\n $returnType = '\\OpenAPI\\Client\\Model\\Folder';\n $request = $this->restNewslettersFoldersFolderIdGetRequest($folder_id);\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": "1516c0affee2e5effd5756d14cf59001", "score": "0.6143873", "text": "public function index()\n {\n $user = Auth::user();\n\n //$folders = $user->folders;\n\n $folders = Folder::where('user_id', $user->id)\n ->orderBy('name', 'desc')\n ->get();\n\n return response()->json($folders, 200);\n }", "title": "" }, { "docid": "5b07f5c35b1de0c28ab27f66604e303b", "score": "0.61384493", "text": "public function restNewslettersFoldersGetAsync($folder_id)\n {\n return $this->restNewslettersFoldersGetAsyncWithHttpInfo($folder_id)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "6e249ec6ffeec837a11720646ab14ca6", "score": "0.6120477", "text": "protected function restNewslettersFoldersFolderIdRecipientsGetRequest($folder_id)\n {\n // verify the required parameter 'folder_id' is set\n if ($folder_id === null || (is_array($folder_id) && count($folder_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $folder_id when calling restNewslettersFoldersFolderIdRecipientsGet'\n );\n }\n\n $resourcePath = '/rest/newsletters/folders/{folderId}/recipients';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($folder_id !== null) {\n $resourcePath = str_replace(\n '{' . 'folderId' . '}',\n ObjectSerializer::toPathValue($folder_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": "15926b4187d6c87252570be04b390190", "score": "0.61181283", "text": "public function getFolderId()\n {\n return $this->folderId;\n }", "title": "" }, { "docid": "5786c20c8fa654a4110fd98b321268e2", "score": "0.61160845", "text": "public function show(Folder $folder)\n {\n $files = File::query()->where('folder_id', $folder->id)->get();\n $categories = Category::query()->where('status', 1)->get();\n $types = Type::query()->get();\n $languages = Language::query()->get();\n\n $title = null;\n $author = null;\n $category_selected = null;\n $type_selected = null;\n $document_number = null;\n $language_selected = null;\n\n return view('folders.show', [\n 'folder' => $folder,\n 'files' => $files,\n 'categories' => $categories,\n 'types' => $types,\n 'languages' => $languages,\n 'title' => $title,\n 'author' => $author,\n 'category_selected' => $category_selected,\n 'type_selected' => $type_selected,\n 'document_number' => $document_number,\n 'language_selected' => $language_selected\n ]);\n }", "title": "" }, { "docid": "ec8af33f57ca06d3e7522226dc52a363", "score": "0.61126363", "text": "public function get($folderId) {\n $this->validateId($folderId);\n $uri = \"folder/\".$folderId;\n $response = $this->client->get($uri);\n return json_decode($response->getBody(), true);\n }", "title": "" }, { "docid": "f08f1c49301881295eafbb9bb4bb2b81", "score": "0.61034954", "text": "public function getFolderId()\n {\n return $this->_FolderId;\n }", "title": "" }, { "docid": "feaf051dc04210f2695563a8d33efa01", "score": "0.60789394", "text": "public function get_folder_properties($folderid) {\n\n\t\t$arraytoreturn = Array();\n\n\t\tif ($folderid === null) {\n\n\t\t\t$response = $this->curl_get(skydrive_base_url.\"/me/skydrive?access_token=\".$this->access_token);\n\n\t\t} else {\n\n\t\t\t$response = $this->curl_get(skydrive_base_url.$folderid.\"?access_token=\".$this->access_token);\n\n\t\t}\n\n\t\t\n\n\t\tif (@array_key_exists('error', $response)) {\n\n\t\t\tthrow new Exception($response['error'].\" - \".$response['description']);\n\n\t\t\texit;\n\n\t\t} else {\t\t\t\n\n\t\t\t@$arraytoreturn = Array('id' => $response['id'], 'name' => $response['name'], 'parent_id' => $response['parent_id'], 'size' => $response['size'], 'source' => $response['source'], 'created_time' => $response['created_time'], 'updated_time' => $response['updated_time'], 'link' => $response['link'], 'upload_location' => $response['upload_location'], 'is_embeddable' => $response['is_embeddable'], 'count' => $response['count']);\n\n\t\t\treturn $arraytoreturn;\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "1ff4b0ed79651945f284d69d05a5d4ee", "score": "0.6071808", "text": "public function listFolders()\n {\n $list = Horde_Kolab_Storage_Exception_Pear::catchError(\n $this->getBackend()->getMailboxes()\n );\n return $this->decodeList($list);\n }", "title": "" }, { "docid": "c633dd34b0345b70ad4ee9583a10151d", "score": "0.6063372", "text": "public function folder()\n {\n return Folder::find($this->folder_id);\n }", "title": "" }, { "docid": "409c046c648a50574a7d8c8d7c7ea0e6", "score": "0.6032655", "text": "public function index(Folder $folder)\n {\n\n $users = User::all()\n ->where('id','<>' , auth()->id());\n\n\n $folders = Folder::all()\n ->where('user_id' , auth()->id())\n ->where('parent_folder_id',$folder->id);\n\n $departmentFolders = DepartmentFolder::all()\n ->where('department_id' , Auth::user()->department->id);\n\n $files = FileSystem::all()\n ->where('user_id' , auth()->id())\n ->where('folder_id',$folder->id)\n ->where('isDepartmentFile',0);\n\n\n return view('FileSystem.index', [\n 'folders' => $folders,\n 'parent_id' => $folder->id,\n 'parent' => $folder,\n 'departmentFolders' => $departmentFolders,\n 'users' => $users,\n 'files' => $files\n ]);\n }", "title": "" }, { "docid": "e6a9f18ca69113608f70577b7bac59b4", "score": "0.5991599", "text": "public function listFolders()\n {\n $this->_init();\n return $this->_list_cache->getFolders();\n }", "title": "" }, { "docid": "541e23ed17636eef8864e6076493e4f6", "score": "0.5962124", "text": "function folderGet($args)\n {\n if(!array_key_exists('id', $args))\n {\n throw new Exception('Parameter id is not defined', MIDAS_INVALID_PARAMETER);\n }\n $userDao = $this->_getUser($args);\n\n $id = $args['id'];\n $folder = $this->Folder->load($id);\n\n if($folder === false || !$this->Folder->policyCheck($folder, $userDao, MIDAS_POLICY_READ))\n {\n throw new Exception(\"This folder doesn't exist or you don't have the permissions.\", MIDAS_INVALID_POLICY);\n }\n\n return $folder->toArray();\n }", "title": "" }, { "docid": "76da2db1ba3cb8ea6d1b03b97322a95e", "score": "0.59320825", "text": "public function getFolders()\n {\n $userId = Auth::user()->id;\n\n try {\n\n $folders = DB::table('user_directory as ud')\n ->leftJoin('user_parent_directory as usd','ud.id','=','usd.user_directory_id')\n ->select('ud.id', 'ud.name', 'ud.created_at', 'ud.updated_at')\n ->where('ud.user_id', $userId)\n ->whereNull('usd.user_directory_id')\n ->whereNull('ud.deleted_at')->get();\n\n $documents = $this->getDocuments($userId, 0);\n $signatures = $this->getUserSignatures('true');\n\n $response = array($this->common->success => true);\n $response['data']['folders'] = $folders;\n $response['data']['documents'] = $documents;\n $response['data']['signatures'] = $signatures;\n\n } catch (\\Exception $e) {\n $response = $this->common->getErrorMessage($e->getMessage());\n }\n\n return Response::json($response);\n }", "title": "" }, { "docid": "4801fda9befbea048a561fc268c2992a", "score": "0.5929228", "text": "public function GetDocumentFolder(GetDocumentFolder $parameters)\n {\n return $this->__soapCall('GetDocumentFolder', array($parameters));\n }", "title": "" }, { "docid": "e4d82f5ed61104bff1ba5da07e4f4022", "score": "0.5920551", "text": "public function getFlatFolders()\n {\n $society_id = OauthToken::find(\\Input::get('access_token'))->society_id;\n $user_id = OauthToken::find(\\Input::get('access_token'))->user_id;\n\t\t\n\t\t$search = \\Input::get('search',null);\n $type = \\Input::get('type',1);\n//\t\tprint_r($type);exit;\n\t\t$binds = ['offset'=>\\Input::get('offset',0),'limit'=>\\Input::get('limit',10)];\n \n $where = ' where f.society_id = \"'.$society_id.'\" and f.deleted_at IS NULL';\n\t\tif ($search) {\n\t\t\t$where .= ' and f.name like :search and f.type= :type';\n\t\t\t$binds['search'] = '%'.$search.'%';\n $binds['type'] =$type;\n\t\t}else{\n $where .= ' and f.type = :type';\n $binds['type'] = $type;\n }\n \n $results = \\DB::select(\"select f.*,users.first_name,users.last_name,f.name as folder_name,date_format(f.created_at,'%d-%m-%Y') as created_at from admin_folder as f INNER JOIN users on f.user_id=users.id $where order by f.id desc limit :limit offset :offset\",$binds);\n \n \n\t\t$count = \\DB::selectOne(\n\t\t\t\t\t\"select count(*) as total from admin_folder as f $where\",\n\t\t\t\t\t$search ? array('search'=>'%'.$search.'%','type'=>$type) : array('type'=>$type)\n\t\t\t\t);\n\n\t\treturn ['total'=>$count->total,'data'=>$results];\n }", "title": "" }, { "docid": "c28f9ca51a027cb4618760e366f78be6", "score": "0.58889925", "text": "protected function restNewslettersFoldersPostRequest($id = null, $name = null, $position = null, $is_deletable = null, $is_selectable = null, $_rest_newsletters_folders = null)\n {\n\n $resourcePath = '/rest/newsletters/folders';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if (is_array($id)) {\n $id = ObjectSerializer::serializeCollection($id, '', true);\n }\n if ($id !== null) {\n $queryParams['id'] = $id;\n }\n // query params\n if (is_array($name)) {\n $name = ObjectSerializer::serializeCollection($name, '', true);\n }\n if ($name !== null) {\n $queryParams['name'] = $name;\n }\n // query params\n if (is_array($position)) {\n $position = ObjectSerializer::serializeCollection($position, '', true);\n }\n if ($position !== null) {\n $queryParams['position'] = $position;\n }\n // query params\n if (is_array($is_deletable)) {\n $is_deletable = ObjectSerializer::serializeCollection($is_deletable, '', true);\n }\n if ($is_deletable !== null) {\n $queryParams['isDeletable'] = $is_deletable;\n }\n // query params\n if (is_array($is_selectable)) {\n $is_selectable = ObjectSerializer::serializeCollection($is_selectable, '', true);\n }\n if ($is_selectable !== null) {\n $queryParams['isSelectable'] = $is_selectable;\n }\n\n\n\n // body params\n $_tempBody = null;\n if (isset($_rest_newsletters_folders)) {\n $_tempBody = $_rest_newsletters_folders;\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": "89fe4cfdaac9fed1bff5622a99f3c17f", "score": "0.5885202", "text": "public function index()\n {\n //\n return new FolderResource(Folder::all());\n }", "title": "" }, { "docid": "0af6e87658d01fbfae65ffb47688a5b5", "score": "0.58601433", "text": "public function get_folder_list()\n\t{\n\t\t$folders = DB::select('folder_name', 'friendly_name')\n\t\t\t->from(self::FOLDER_OPTION_TABLE)\n\t\t\t->where('publish', '=', 1)\n\t\t\t->where('deleted', '=', 0)\n\t\t\t->execute()\n\t\t\t->as_array();\n\t\treturn $folders;\n\t}", "title": "" }, { "docid": "399f0db4341ee4376bc986aab70e7733", "score": "0.58478236", "text": "public function rechercherCreatedFolder() \n {\n $auth = AuthenticationManager::getInstance();\n $username = $auth->getMatricule();\n //sécurité\n $action = 'listCreatedFolder';\n $error = AccessControll::checkRight($action);\n if ( empty($error) ){ //ok\n $search = $this->request->getPostAttribute('search');\n $dossier = DossierManager::rechercherIdOrNameCreatedFolder($search, $username);\n $prez = DossierHtml::listCreatedFolderHtml($dossier);\n } else{ //pas ok\n $prez = HomeHtml::toHtml($error);\n }\n $this->response->setPart('contenu', $prez);\n }", "title": "" }, { "docid": "f410873bd965440394d45a1d9171b751", "score": "0.58339536", "text": "public function listmessages($folder) {\n\t\t//Return result to jTable\n\t\t$jTableResult = array();\n\t\t$jTableResult['Result'] = \"OK\";\n\t\t$jTableResult['TotalRecordCount'] = $this->Pmmodel->countAllMessagesByUser($this->userID, $folder);\n\t\t$jTableResult['Records'] = $this->Pmmodel->getPMMessagesByUserID($this->userID, $this->timeZone, $this->dateTimeFormat, $folder, $this->input->get('jtSorting', TRUE), $this->input->get('jtPageSize', TRUE), $this->input->get('jtStartIndex', TRUE));\n\t\tprint json_encode($jTableResult);\t\t\n\t}", "title": "" }, { "docid": "e043534dfddad053772277c3be8f9d81", "score": "0.5822235", "text": "public function getPageFolders();", "title": "" }, { "docid": "3cdf001f31ea3633b7c1b871384205bf", "score": "0.58195305", "text": "public function show(Folder $folder)\n {\n //\n return new FolderResource($folder);\n }", "title": "" }, { "docid": "a52954828f59ea29e065ef66aed7bf43", "score": "0.58194363", "text": "function folderChildren($args)\n {\n if(!array_key_exists('id', $args))\n {\n throw new Exception('Parameter id is not defined', MIDAS_INVALID_PARAMETER);\n }\n\n $id = $args['id'];\n $folder = $this->Folder->load($id);\n\n $userDao = $this->_getUser($args);\n $folders = $this->Folder->getChildrenFoldersFiltered($folder, $userDao);\n $items = $this->Folder->getItemsFiltered($folder, $userDao);\n\n return array('folders' => $folders, 'items' => $items);\n }", "title": "" }, { "docid": "94e62184ea7a090289d3da54481422b9", "score": "0.57972723", "text": "public function show(Folder $folder)\n {\n\n }", "title": "" }, { "docid": "f3a5ab5856bcc1f9b5b8cb57113c5403", "score": "0.5795861", "text": "function getFolder($id) { /* {{{ */\n\t\t$hits = $this->index->find('F'.$id);\n\t\treturn $hits['hits'] ? $hits['hits'][0] : false;\n\t}", "title": "" }, { "docid": "de1047a4238943fd1c8cc0883e2f7d2a", "score": "0.5777787", "text": "public function folder($folder)\n {\n // @todo\n }", "title": "" }, { "docid": "dc022f6baa6d8df08c742821eb799fe2", "score": "0.5767443", "text": "public function find_folder($folder)\n {\n }", "title": "" }, { "docid": "46b205335c24597dbb0c91a828228e18", "score": "0.5751227", "text": "public function folderInfo($folderPath)\n\t{\n\t\t$folderName = explode('/', $folderPath);\n\t\treturn [\n\t\t\t'origin' => $folderPath,\n\t\t\t'name' => end($folderName),\n\t\t\t'type' => 'folder',\n\t\t\t'url' => Storage::url($folderPath),\n \t\t];\n\t}", "title": "" }, { "docid": "3518d12becc4aa3e8da6ebc52fa230ac", "score": "0.57410115", "text": "public function getFolderInfo($folder_id = null)\n {\n return $this->_process('folder/info', ['folder_id' => $folder_id])->folder;\n }", "title": "" }, { "docid": "c1fb0ba6e831e0b4e577b5915052d115", "score": "0.573099", "text": "function email_get_root_folder($userid, $folder) {\n\n\tglobal $USER;\n\n\tif ( empty($userid) ) {\n\t\t$userid = $USER->id;\n\t}\n\n\temail_create_parents_folders($userid);\n\n\t$rootfolder = new object();\n\n\tif ( $userid > 0 and !empty($userid) ) {\n\t\tif ( $folder == EMAIL_INBOX ) {\n\t\t\t$rootfolder = get_record('email_folder', 'userid', $userid, 'isparenttype', EMAIL_INBOX);\n\t\t\t$rootfolder->name = get_string('inbox', 'block_email_list');\n\t\t\treturn $rootfolder;\n\t\t}\n\n\t\tif ( $folder == EMAIL_SENDBOX ) {\n\t\t\t$rootfolder = get_record('email_folder', 'userid', $userid, 'isparenttype', EMAIL_SENDBOX);\n\t\t\t$rootfolder->name = get_string('sendbox', 'block_email_list');\n\t\t\treturn $rootfolder;\n\t\t}\n\n\t\tif ( $folder == EMAIL_TRASH ) {\n\t\t\t$rootfolder = get_record('email_folder', 'userid', $userid, 'isparenttype', EMAIL_TRASH);\n\t\t\t$rootfolder->name = get_string('trash', 'block_email_list');\n\t\t\treturn $rootfolder;\n\t\t}\n\n\t\tif ( $folder == EMAIL_DRAFT ) {\n\t\t\t$rootfolder = get_record('email_folder', 'userid', $userid, 'isparenttype', EMAIL_DRAFT);\n\t\t\t$rootfolder->name = get_string('draft', 'block_email_list');\n\t\t\treturn $rootfolder;\n\t\t}\n\t}\n\n\treturn $rootfolder;\n\n}", "title": "" }, { "docid": "e97d44eec01aa4a898ec58202877c3db", "score": "0.5721138", "text": "public function get($id)\n {\n return $this->_driver->get(\"/security/folder/$id\");\n }", "title": "" }, { "docid": "f0412c7e958a529039e11be5a8239f9c", "score": "0.57121086", "text": "protected function getFolderId()\n\t{\n\t\tif(!$this->folderId)\n\t\t{\n\t\t\t$id = basename(Route::current()->uri());\n\t\t\t\n\t\t\tif(!$id || !in_array($id, $this->folders))\n\t\t\t{\n\t\t\t\t$this->folderId = 'sent';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->folderId = $id;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $this->folderId;\n\t}", "title": "" }, { "docid": "1ebbece5298d6637ba920a67181241a0", "score": "0.5693453", "text": "function campaignFolders() {\n $params = array();\n return $this->callServer(\"campaignFolders\", $params);\n }", "title": "" }, { "docid": "12ec60050a5d9f4d4427eba05e224b84", "score": "0.5682609", "text": "protected function get_sub_folders($folder) {\n\n $sub_folders = array();\n\n // set target (folder name with trailing delimiter)\n $target = $folder . $this->delimiter;\n\n $query = \" SELECT mailbox_idnr, name \"\n . \" FROM dbmail_mailboxes \"\n . \" WHERE name like '{$this->dbmail->escape($target)}%' \"\n . \" AND owner_idnr = {$this->dbmail->escape($this->user_idnr)} \"\n . \" AND deleted_flag = 0 \";\n\n $res = $this->dbmail->query($query);\n\n while ($row = $this->dbmail->fetch_assoc($res)) {\n\n $sub_folders[$row['mailbox_idnr']] = $row['name'];\n }\n\n return $sub_folders;\n }", "title": "" }, { "docid": "5ab12d08c07ce4592dcda99c9876af05", "score": "0.5674443", "text": "public function setFolderId($data)\n {\n $this->_FolderId=$data;\n return $this;\n }", "title": "" }, { "docid": "8ea3fce572691be32ea002a14f80d5d3", "score": "0.56737685", "text": "public function removeFolder(int $folderId): ApiInterface;", "title": "" }, { "docid": "d6f25449dd61bf508243da633c623f0f", "score": "0.566816", "text": "public function findFolder(int $folderId)\n {\n return $this->model->where('is_folder', 1)->where('id', $folderId)->first();\n }", "title": "" }, { "docid": "1ddd5eb8df23a0da9f2439125d92d164", "score": "0.5634658", "text": "function retrieveSubfolderArray($folderId, $apiKey){\n $fileArray = retrieveFilesArray($folderId, $apiKey);\n $subfolderArray = filterByMimeType($fileArray, \"folder\");\n return $subfolderArray;\n}", "title": "" }, { "docid": "f8f87efa689935268e828263d8c6a2dd", "score": "0.5632244", "text": "public function show(User $user, Folder $folder) {\n $files = $folder->files()\n ->where('account_id', $user->account->id)\n ->orderBy('type', 'desc')\n ->orderBy('name')\n ->get();\n\n return response()->json([\n 'success' => true,\n 'files' => $files,\n ]);\n }", "title": "" }, { "docid": "c1e3d1cf43a491f50d2e2ce309bc1b8c", "score": "0.562984", "text": "public function ajax_get_folder_contents() {\n\n\t\t$path = '#' === rgget( 'path' ) ? '/' : rgget( 'path' );\n\n\t\techo wp_json_encode( $this->get_folder_tree( $path, rgget( 'first_load' ) ) );\n\t\tdie();\n\n\t}", "title": "" }, { "docid": "b84df5978746c653c2d9dfa88c023aa1", "score": "0.56218493", "text": "public function folder_info($folder) {\n\n /*\n * folder name could be too long to be used as cache key, so we hash it \n * to prevent \"Data too long for column 'cache_key'\" issues\n */\n $cache_key = \"FOLDER_\" . md5($folder);\n\n $folder_cached = $this->get_cache($cache_key);\n if (is_object($folder_cached)) {\n return $folder_cached;\n }\n\n $folderAttributes = $this->folder_attributes($folder);\n $folderRights = $this->_get_acl($folder);\n\n $options = array(\n 'is_root' => FALSE,\n 'name' => $folder,\n 'attributes' => $folderAttributes,\n 'namespace' => $this->folder_namespace($folder),\n 'special' => (in_array($folder, self::$folder_types) ? TRUE : FALSE),\n 'noselect' => (array_key_exists('no_select', $folderAttributes) ? $folderAttributes['no_select'] : FALSE),\n 'rights' => $folderRights,\n 'norename' => (in_array(self::ACL_DELETE_FLAG, $folderRights) ? FALSE : TRUE)\n );\n\n $this->update_cache($cache_key, $options);\n\n return $options;\n }", "title": "" }, { "docid": "9c75f100cd4a291df5c104d976cde941", "score": "0.56216985", "text": "public function GetFontsFolder(GetFontsFolder $parameters)\n {\n return $this->__soapCall('GetFontsFolder', array($parameters));\n }", "title": "" }, { "docid": "54afc2a7da454ffe526b309eda6c97a6", "score": "0.5613468", "text": "function email_get_all_subfolders($folderid) {\n\n\t// Get childs for this parent\n\t$childs = get_records('email_subfolder', 'folderparentid', $folderid);\n\n\t$subfolders = array();\n\n\t// If have childs\n\tif ( $childs ) {\n\n\t\t// Save child folder in array\n\t\tforeach ( $childs as $child ) {\n\t\t\t\t$subfolders[] = get_record('email_folder', 'id', $child->folderchildid);\n\t\t\t\tif ( $morechilds = get_records('email_subfolder', 'folderparentid', $child->folderchildid) ) {\n\t\t\t\t\t$childs = array_merge($childs, $morechilds);\n\t\t\t\t}\n\t\t}\n\t} else {\n\t\t// If no childs, return false\n\t\treturn false;\n\t}\n\n\t// Return subfolders\n\treturn $subfolders;\n}", "title": "" }, { "docid": "b80f456d8debbc74c47763d059018a04", "score": "0.5606903", "text": "public function showAll($id,$token,$folderid)\n {\n $files = [];\n $this->getChildFiles($files,$folderid);\n\n if($files != null){\n for($i = 0; $i < sizeOf($files); $i++){\n $files[$i]->keywords = Keyword::where('file_id',$files[$i]->id)->pluck('keyword');\n $files[$i]->version_count = File::where('version_group_id',$files[$i]->version_group_id)->count()-1;\n if($files[$i]->user_owner_id != null){\n $fileuser = User::where('id', $files[$i]->user_owner_id)->first(['name','lastname']);\n $files[$i]->ownername = $fileuser->name.' '.$fileuser->lastname;\n }\n else if($files[$i]->admin_owner_id != null){\n $fileuser = Admin::where('id', $files[$i]->admin_owner_id)->first(['name','lastname']);\n $files[$i]->ownername = $fileuser->name.' '.$fileuser->lastname;\n }\n }\n }\n return response()->json([$files]);\n }", "title": "" }, { "docid": "25e301dd7c4a635d0a2f177ecec5db54", "score": "0.5597164", "text": "public function show(Folder $folder)\n {\n //\n }", "title": "" }, { "docid": "0f067db724d54e732f2ce624cab30c0a", "score": "0.55915695", "text": "public function select(EmailFolder $folder, OroEntityManager $em);", "title": "" }, { "docid": "002a58c1715d3ee54ed636b60af27c67", "score": "0.55814373", "text": "function email_get_folders($userid, $sort='id') {\n\n\treturn get_records('email_folder', 'userid', $userid, $sort);\n}", "title": "" }, { "docid": "cbd6ff2275566baa919e37c040c9ecfc", "score": "0.5566907", "text": "function loadFolderData() {\n if (isset($this->params['folder_id'])) {\n $folder = $this->getFolder($this->params['folder_id']);\n if (isset($folder[$this->lngSelect->currentLanguageId])) {\n $this->currentFolder = $folder[$this->lngSelect->currentLanguageId];\n } else {\n $this->currentFolder = current($folder);\n }\n }\n }", "title": "" }, { "docid": "2b106cb22de8a7f6d857a97fcd1781f6", "score": "0.55584455", "text": "public function getFoldersList()\r\n\t{\r\n\t\t$olist = new CAntObjectList($this->dbh, \"folder\", $this->user);\r\n\t\t$olist->addCondition(\"and\", \"parent_id\", \"is_equal\", $this->id);\r\n\t\treturn $olist;\r\n\t}", "title": "" }, { "docid": "b62afe68866e1c99b276d87b1ffe780f", "score": "0.555682", "text": "function email_get_subfolders($folderid, $courseid=NULL, $admin=false) {\n\n\tglobal $USER;\n\n\t// Get childs for this parent\n\t$childs = get_records('email_subfolder', 'folderparentid', $folderid);\n\n\t$subfolders = array();\n\n\t// If have childs\n\tif ( $childs ) {\n\n\t\t// Save child folder in array\n\t\tforeach ( $childs as $child ) {\n\n\t\t\tif ( is_null($courseid) or !email_have_asociated_folders($USER->id) ) {\n\t\t\t\t$subfolders[] = get_record('email_folder', 'id', $child->folderchildid);\n\t\t\t} else {\n\t\t\t\tif ( $folder = get_record('email_folder', 'id', $child->folderchildid, 'course', $courseid) ) {\n\t\t\t\t\t$subfolders[] = $folder;\n\t\t\t\t} else if ( $folder = get_record('email_folder', 'id', $child->folderchildid, 'course', '0') ) {\n\t\t\t\t\t$subfolders[] = $folder; // Add general folder's\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// If no childs, return false\n\t\treturn false;\n\t}\n\n\t// Return subfolders\n\treturn $subfolders;\n}", "title": "" }, { "docid": "ae979ffedc6e20e7e6ac361adac889cb", "score": "0.55562377", "text": "public function get_folder() {\n return $this->folder;\n }", "title": "" }, { "docid": "2a425105077c7a406383f9ce4fb9b82b", "score": "0.55484736", "text": "public static function create_all_folder($a_folder){\n\n\t\t$request = self::_get_connection()->select(\"SELECT ID from `apine_images` where folder=$a_folder ORDER BY `ID`\");\n\t\t$liste = new Liste();\n\t\tif($request != null && count($request) > 0){\n\t\t\tforeach($request as $item){\n\t\t\t\t$liste->add_item(new ApineImage($item['ID']));\n\t\t\t}\n\t\t}\n\t\treturn $liste;\n\t\n\t}", "title": "" }, { "docid": "4063f8834365d93ed1d3399dd41d338f", "score": "0.55435896", "text": "public function folderInfo($folder = '/')\n {\n $folder = $this->cleanFolder($folder);\n $breadCrumbs = $this->breadcrumbs($folder);\n\n $files = [];\n $subFolders = $this->disk->directories($folder);\n foreach ($subFolders as $subFolder) {\n if ($this->isItemHidden($subFolder)) {\n continue;\n }\n $fileLists = $this->disk->files($subFolder);\n foreach ($fileLists as $file) {\n if (!$this->isItemHidden($file)) {\n $files[] = $this->fileDetails($folder . $file);\n }\n }\n }\n $fileLists = $this->disk->files($folder);\n foreach ($fileLists as $file) {\n if (!$this->isItemHidden($file)) {\n $files[] = $this->fileDetails($folder . $file);\n }\n }\n return compact('folder', 'breadCrumbs', 'subFolders', 'files', 'itemsCount');\n }", "title": "" }, { "docid": "e5955d9f62f83aae5d4e76bc5ba715e0", "score": "0.55418575", "text": "private static function folders_path(){\n\t\treturn dirname(__DIR__) . '/content/folders.json';\n\t}", "title": "" }, { "docid": "f6619c9777ed3c2b43420f34c934298a", "score": "0.5531493", "text": "public function getFolder()\n {\n return $this->_folder;\n }", "title": "" }, { "docid": "57facb7ca573fb30d08c2e44e423b4f2", "score": "0.55180293", "text": "public function list_folder($path, $recursive = false, $include_media_info = false, $include_has_explicit_shared_members = false)\n {\n $endpoint = 'https://api.dropboxapi.com/2/files/list_folder';\n $headers = [\n 'Content-Type: application/json',\n ];\n $postdata = json_encode(['path' => $path, 'recursive' => $recursive, 'include_media_info' => $include_media_info, 'include_has_explicit_shared_members' => $include_has_explicit_shared_members]);\n return Dropbox::postRequest($endpoint, $headers, $postdata);\n }", "title": "" }, { "docid": "6943efc51afb8f95be77cb4b1923f3fd", "score": "0.5504764", "text": "public function restNewslettersFoldersPostWithHttpInfo($id = null, $name = null, $position = null, $is_deletable = null, $is_selectable = null, $_rest_newsletters_folders = null)\n {\n $request = $this->restNewslettersFoldersPostRequest($id, $name, $position, $is_deletable, $is_selectable, $_rest_newsletters_folders);\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\\Folder' === '\\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\\Folder', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\OpenAPI\\Client\\Model\\Folder';\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\\Folder',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "688edba943f762aa78cf5f1f2feea102", "score": "0.54995316", "text": "public function folder_data($folder) {\n // TO DO!!!!!!\n }", "title": "" }, { "docid": "9c7e25999a5c4ccdbcaa13d1facc7f93", "score": "0.5498601", "text": "public function restNewslettersFoldersDelete()\n {\n list($response) = $this->restNewslettersFoldersDeleteWithHttpInfo();\n return $response;\n }", "title": "" }, { "docid": "36568770bef2b699372579ad423f42ea", "score": "0.54858947", "text": "public static function getRowsForTree( $folderId=0 )\n\t{\n\t\ttry\n\t\t{\n\t\t\tif ( $folderId === 0 )\n\t\t\t{\n\t\t\t\t$folders = \\IPS\\cms\\Media\\Folder::roots();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$folders = \\IPS\\cms\\Media\\Folder::load( $folderId )->children( NULL, NULL, FALSE );\n\t\t\t}\n\t\t}\n\t\tcatch( \\OutOfRangeException $ex )\n\t\t{\n\t\t\t$folders = array();\n\t\t}\n\n\t\t$media = \\IPS\\cms\\Media::getChildren( $folderId );\n\n\t\treturn \\IPS\\cms\\Media\\Folder::munge( $folders, $media );\n\t}", "title": "" }, { "docid": "43385cd4521a6aacfd5681bda03364bc", "score": "0.5484854", "text": "public function testGetFoldersFromFolderId()\n {\n\n }", "title": "" }, { "docid": "9dcc3d6060f14e70285f3bd6922dfa47", "score": "0.54842716", "text": "function get_folder_by_id($folder_id) {\n\t\t// Obtain a connection\n\t\t$con = $this->connection->get_pdo_connection();\n\n\t\t// Prepare insert statement\n\t\t$sql = \"SELECT * FROM folders WHERE folder_id=:folder_id\";\n\t\t$statement = $con->prepare($sql);\n\n\t\t// Bind folder id\n\t\t$statement->bindValue(\"folder_id\", $folder_id, PDO::PARAM_INT);\n\n\t\t// Execute the statement\n\t\t$statement->execute();\n\n\t\t$results = array();\n\n\t\t// Check if row exists\n\t\tif ( $row = $statement->fetch(PDO::FETCH_ASSOC) ) {\n\t \t\t// Create folder object\n\t \t\t$folder = new Folder($row);\n\t \t\treturn $folder;\n\t \t}\n\n\t \treturn false;\n\t}", "title": "" }, { "docid": "6fe49dcd0e1d2b813ca5e94eae4d0061", "score": "0.548058", "text": "function loadFolders() {\n unset($this->folders);\n unset($this->folderTree);\n unset($this->alternativeFolderNames);\n $this->folders = $this->getFolders($this->lngSelect->currentLanguageId);\n $this->countSubFolders($this->folders);\n foreach ($this->folders as $folderId => $folder) {\n $this->folderTree[$folder['parent_id']][$folderId] = $folderId;\n if (!isset($folder['folder_name'])) {\n $foldersWithoutName[] = $folderId;\n }\n }\n if (PAPAYA_CONTENT_LANGUAGE != $this->lngSelect->currentLanguageId &&\n isset($foldersWithoutName) && is_array($foldersWithoutName) &&\n count($foldersWithoutName) > 0) {\n $this->alternativeFolderNames = $this->getFolders(\n PAPAYA_CONTENT_LANGUAGE, $foldersWithoutName\n );\n }\n }", "title": "" }, { "docid": "d74ddad6590acd407e89eb984713f7db", "score": "0.54681015", "text": "private function scanFolder(string $folderId = null, \\stdClass $folder = null)\n {\n if ($folder != null) {\n $this->info(\"Scanning folder: {$folder->name}\");\n } else {\n $this->info(\"Scanning root folder\");\n }\n\n $result = json_decode($this->preClient->get('folder/list', [\n 'query' => ['id' => $folderId],\n ])->getBody());\n\n if ($result->status == 'success') {\n $items = $result->content;\n foreach ($items as $item) {\n switch ($item->type) {\n case 'folder':\n $this->scanFolder($item->id, $item);\n break;\n case 'file':\n $this->scanFile($item, $folderId, $folder != null ? $folder->name : null);\n break;\n default:\n $this->warn('Found unknown item type: '.$item);\n }\n }\n } else {\n $this->error('API Returned an error: '.$result->message);\n }\n }", "title": "" }, { "docid": "18f23caf249a1e71d9b0e03ca720e7f8", "score": "0.5460475", "text": "protected function restNewslettersFoldersFolderIdPutRequest($folder_id, $name = null, $position = null, $client_ids = null, $is_deletable = null, $is_selectable = null)\n {\n // verify the required parameter 'folder_id' is set\n if ($folder_id === null || (is_array($folder_id) && count($folder_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $folder_id when calling restNewslettersFoldersFolderIdPut'\n );\n }\n\n $resourcePath = '/rest/newsletters/folders/{folderId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if (is_array($name)) {\n $name = ObjectSerializer::serializeCollection($name, '', true);\n }\n if ($name !== null) {\n $queryParams['name'] = $name;\n }\n // query params\n if (is_array($position)) {\n $position = ObjectSerializer::serializeCollection($position, '', true);\n }\n if ($position !== null) {\n $queryParams['position'] = $position;\n }\n // query params\n if (is_array($client_ids)) {\n $client_ids = ObjectSerializer::serializeCollection($client_ids, '', true);\n }\n if ($client_ids !== null) {\n $queryParams['clientIds'] = $client_ids;\n }\n // query params\n if (is_array($is_deletable)) {\n $is_deletable = ObjectSerializer::serializeCollection($is_deletable, '', true);\n }\n if ($is_deletable !== null) {\n $queryParams['isDeletable'] = $is_deletable;\n }\n // query params\n if (is_array($is_selectable)) {\n $is_selectable = ObjectSerializer::serializeCollection($is_selectable, '', true);\n }\n if ($is_selectable !== null) {\n $queryParams['isSelectable'] = $is_selectable;\n }\n\n\n // path params\n if ($folder_id !== null) {\n $resourcePath = str_replace(\n '{' . 'folderId' . '}',\n ObjectSerializer::toPathValue($folder_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 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "11c7044da42d7c392e8873540d9e17e8", "score": "0.54573935", "text": "public function get_campaign_folders( $args = [] ) {\n $defaults = [\n 'count' => 10,\n 'offset' => 0,\n ];\n $args = wp_parse_args( $args, $defaults );\n $endpoint = '/campaign-folders';\n $output = $this->get_request( $endpoint, $args );\n\n // Remove the _links items\n if ( ! empty( $output->folders ) ) {\n foreach ( $output->folders as $key => $folder ) {\n if ( isset( $folder->_links ) ) {\n unset( $output->folders[ $key ]->_links );\n }\n }\n }\n\n return $output;\n }", "title": "" }, { "docid": "423032149d642b15be16b52d9f309374", "score": "0.54496455", "text": "public function getChildren($folderId, $options = array ()) {\n\t\t$myURL = $this->getLink($folderId, self::LINK_DOWN);\n\t\t$myURL.= $this->GenURLQueryString($options);\n\t\t$ret = $this->doGet($myURL);\n\t\t$objs = $this->extractObjectFeed($ret->body);\n\t\t$this->cacheFeedInfo($objs);\n\t\treturn $objs;\n\t}", "title": "" }, { "docid": "6aa5c569fbe287b0419874cf72ed7b74", "score": "0.5437656", "text": "public function getMediaFolder($id){\n return MediaFolder::find($id);\n\t\t\n }", "title": "" }, { "docid": "9b2ac0292c30133e8c4bb5d47927833d", "score": "0.54359055", "text": "function email_get_my_folders($userid, $courseid, $excludetrash, $excludedraft, $excludesendbox=false, $excludeinbox=false) {\n\n\t// Save my folders in this variable\n\t$myfolders = array();\n\n\t// Get especific root folders\n\t$folders = email_get_root_folders($userid, !$excludedraft, !$excludetrash, !$excludesendbox, !$excludeinbox);\n\n\t// for every root folder\n\tforeach ( $folders as $folder ) {\n\n\t\t$myfolders[$folder->id] = $folder->name;\n\t\t$myfolders = email_my_folders($folder->id, $courseid, $myfolders, '&#160;&#160;&#160;');\n\t}\n\n\treturn $myfolders;\n}", "title": "" }, { "docid": "5d423b1e88717978a72f30a419ef502e", "score": "0.543574", "text": "public function getAllFolders($locale = null);", "title": "" }, { "docid": "23c9a388c4626d2f44275997acc82b59", "score": "0.54324174", "text": "public function getSubfoldersByFolderId ($folderId)\n {\n return $this->conn->select(\n array('table' => 'folder_data' ,\n 'where' => 'visible=' . $this->conn->getBool(true) . ' AND parent_id=' .\n (int) $folderId ,\n 'orderBy' => 'folder_name ASC'));\n }", "title": "" }, { "docid": "155523ac8707c329537c141daf94bb14", "score": "0.5426208", "text": "public function getFolder()\n\t{\n\t\treturn $this->router->getFolder();\n\t}", "title": "" }, { "docid": "05a070c44801c1d24b80c26cae731343", "score": "0.5421537", "text": "public function restNewslettersFoldersDeleteAsyncWithHttpInfo()\n {\n $returnType = '\\OpenAPI\\Client\\Model\\Folder[]';\n $request = $this->restNewslettersFoldersDeleteRequest();\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": "" } ]
000046ef35898287dcc33f4c818e5430
Return the lowest and highest price for configurable product
[ { "docid": "9851ed756ed48c3cb68d5ec84155e5cf", "score": "0.7471076", "text": "protected function _getLowestHighestPrice() \n {\n\n $childProductIds = Mage::getResourceSingleton('catalog/product_type_configurable')->getChildrenIds($this->_product->getId());\n $childProducts = Mage::getResourceModel('catalog/product_collection')\n ->addIdFilter($childProductIds)\n ->addAttributeToSelect('price');\n\n $childPriceLowest = \"\";\n $childPriceHighest = \"\";\n foreach($childProducts as $child){\n if($child->isInStock()) {\n $this->_childProductsCount++;\n }\n if($childPriceLowest == '' || $childPriceLowest > $child->getPrice() )\n $childPriceLowest = $child->getPrice();\n\n if($childPriceHighest == '' || $childPriceHighest < $child->getPrice() )\n $childPriceHighest = $child->getPrice();\n\n }\n return array(\n 'lowPrice' => $childPriceLowest,\n 'highPrice' => $childPriceHighest\n );\n }", "title": "" } ]
[ { "docid": "afa5eaed246cca4bbcd9b95bd7bdf115", "score": "0.7365151", "text": "public function price_min_max()\n\t{\n\n\t\t// Variables\n\t\t$return = array('min' => '0.00', 'max' => '0.00');\n\n\t\t// Run min query\n\t\t$query = $this->db->select('price')->order_by('price', 'asc')->limit('1')->get('firesale_products');\n\n\t\t// Check for min\n\t\tif( $query->num_rows() )\n\t\t{\n\t\t\t$results = current($query->result_array());\n\t\t\t$return['min'] = $results['price'];\n\t\t}\n\n\t\t// Run max query\n\t\t$query = $this->db->select('price')->order_by('price', 'desc')->limit('1')->get('firesale_products');\n\n\t\t// Check for max\n\t\tif( $query->num_rows() )\n\t\t{\n\t\t\t$results = current($query->result_array());\n\t\t\t$return['max'] = $results['price'];\n\t\t}\n\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "0cfc54b261b690be5ccb1a0acb6f8789", "score": "0.6868742", "text": "function productMinAndMaxPrice(){\n $products = Product::orderBy('price', 'asc')->select('price')->get();\n\n return ['min_price' => isset($products->first()->price)?$products->first()->price:'', 'max_price' => isset($products->last()->price)?$products->last()->price:''];\n}", "title": "" }, { "docid": "9042bd12ef8dc74026a0c0865ed91b10", "score": "0.67443424", "text": "public function getMinimalprice()\n {\n //if(empty($price)) return Shopcurrency::valueBycurrency($this->price,$this->currency);\n //return $price->price;\n //$price=($this->net_prices==1)?round($this->price*(1+(Yii::$app->params['tax']/100)),2):$this->price;\n $price=$this->price;\n if($this->price==0) {\n $prices=Productsprice::find()->where(['product_id' => $this->id])->andWhere(['<>','price',0])->orderBy(['price' => SORT_ASC])->select('price')->asArray()->one();\n if(!empty($prices['price'])) $price=$prices['price'];\n }\n if($this->marketplace==1){\n return Shopcurrency::valueBycurrency($price*((100-$this->marketplace_discount)/100),$this->currency);\n } else {\n return Shopcurrency::valueBycurrency($price,$this->currency);\n }\n }", "title": "" }, { "docid": "13d310e7c019fe02c0edfe5b3ee6ea3e", "score": "0.66990465", "text": "public function getSellerMinimalPrice($product)\n {\n static $price = [];\n\n if ($product->type == 'configurable') {\n\n $sellerProducts = $this->findWhere(['product_id' => $product->id]);\n\n foreach ($sellerProducts as $sellerProduct) {\n\n if ($this->findWhere(['parent_id' => $sellerProduct->id]))\n {\n $varients = $this->findWhere(['parent_id' => $sellerProduct->id]);\n\n foreach ($varients as $varient) {\n $productPrice[] = $varient->price;\n }\n\n } else if ($this->findWhere(['parent_id' => ''])) {\n\n }\n\n }\n\n $minimalPrice = min($productPrice);\n\n return $minimalPrice;\n } else {\n\n $sellerProducts = $this->findWhere(['product_id' => $product->id ,'parent_id' => null]);\n\n if (count($sellerProducts) > 0) {\n foreach ($sellerProducts as $sellerProduct) {\n $productPrice[] = $sellerProduct->price;\n }\n\n $minimalPrice = min($productPrice);\n\n return $minimalPrice;\n }\n }\n }", "title": "" }, { "docid": "cc5538eaff8cd355b479c3058c09e167", "score": "0.660467", "text": "public function minProductPrice():Float\n {\n return SupplierProduct::min('price');\n }", "title": "" }, { "docid": "6470406b9720a6282150145b9d67164c", "score": "0.6551918", "text": "protected function _getSCPBasePrice($product)\n {\n if ($product->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE &&\n $this->isModuleEnabled('OrganicInternet_SimpleConfigurableProducts')\n ) {\n $action = $this->_getRequest()->getActionName();\n if ($action == 'search' || $action == 'searchProducts') {\n $_price = $product->getData('price');\n try {\n $_priceBlock = new OrganicInternet_SimpleConfigurableProducts_Catalog_Model_Product_Type_Configurable_Price;\n $childProduct = $_priceBlock->getChildProductWithLowestPrice($product, \"finalPrice\");\n if (!$childProduct) {\n $childProduct = $_priceBlock->getChildProductWithLowestPrice($product, \"finalPrice\", false);\n }\n $_childBaseprice = $childProduct->getPrice();\n\n if ($_price > $_childBaseprice) {\n return $_price;\n } else {\n return $_childBaseprice;\n }\n } catch (Exception $e) {\n return $_price;\n }\n } else {\n return $product->getPrice();\n }\n } elseif (\n $product->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE\n && $this->isModuleEnabled('Ayasoftware_SimpleProductPricing')\n ) {\n $prices = Mage::helper('spp')->getCheapestChildPrice($product);\n if (is_array($prices)) {\n return $prices['Min']['price'];\n }\n return $product->getPrice();\n } else {\n return $product->getPrice();\n }\n }", "title": "" }, { "docid": "b1290d3c660c4b256b9da13ae8f54d84", "score": "0.6521767", "text": "private function setConfigPrice()\n {\n $price = 0;\n foreach ($this->simpleProducts as $p) {\n /** @var Simple $p */\n if ($p->getRequiredData()->getPrice() > $price) {\n $price = $p->getRequiredData()->getPrice();\n }\n }\n\n $this->set('price', $price);\n\n $specialprice = 0;\n foreach ($this->simpleProducts as $p) {\n /** @var Simple $p */\n if ($p->get('special_price') !== null && $p->get('special_price') > $specialprice) {\n $specialprice = $p->get('special_price');\n }\n }\n\n if ($specialprice > 0) {\n $this->set('special_price', $specialprice);\n }\n\n }", "title": "" }, { "docid": "6df53d4c77cd3d655a5b2a74ae6e563f", "score": "0.6426898", "text": "public function priceRange($minOrMax)\n {\n if ($minOrMax === 'min') {\n return $this->variants()->min('price');\n } else if ($minOrMax === 'max') {\n return $this->variants()->max('price');\n }\n }", "title": "" }, { "docid": "ed8b61b8f06611b0c05c64189288d4bc", "score": "0.64098436", "text": "public function getLowestPrices()\n {\n return $this->_fields['LowestPrices']['FieldValue'];\n }", "title": "" }, { "docid": "c5327e1f427b7dbe5547ef44cbb3bb2c", "score": "0.6407659", "text": "public function getMinMaxCategoryPrice()\n {\n if (isset(self::$_cache['minmaxprice'])) {\n return self::$_cache['minmaxprice'];\n }\n\n $sql = $this->_prepareFilterQuery(false);\n \n $sql->clean('select')->clean('group')\n ->select(array(\n 'min' => \"MIN(actual_price)\",\n 'max' => \"MAX(actual_price)\",\n ));\n \n \n $res = $this->db->query($sql);\n \n self::$_cache['minmaxprice'] = $res->row;\n \n return $res->row;\n }", "title": "" }, { "docid": "20d2a74addd4bd2f1afef932732414f9", "score": "0.64069945", "text": "public function getMaxPriceThreshold();", "title": "" }, { "docid": "30be00205af0fef42801b65fd14533a6", "score": "0.63869923", "text": "function scrape_product_price_lowest($page) {\n\n\t \t// Method 1\n\n\t $price = self::get_pattern(array('priceblock_', '>', '<'), $page);\n\t $price = preg_replace(\"/[^0-9-]/\", \"\", $price);\n\n\t $prices = explode(\"-\", $price);\n\t if (isset($prices[0])) {\n\t if (is_numeric($prices[0])) return $prices[0];\n\t }\n\n\n\t // Method 2\n\n\t $price = self::get_pattern(array('priceblock_ourprice\"', '>', '<'), $page);\n\t $price = preg_replace(\"/[^0-9-]/\", \"\", $price);\n\n\t $prices = explode(\"-\", $price);\n\t if (isset($prices[0])) {\n\t if (is_numeric($prices[0])) return $prices[0];\n\t }\n\n\n\t // Method 3\n\n\t $price = self::get_pattern(array('priceblock_ourprice\"', '</span>', '</span>'), $page);\n\t $price = preg_replace(\"/[^0-9-]/\", \"\", $price);\n\n\t $prices = explode(\"-\", $price);\n\t if (isset($prices[0])) {\n\t if (is_numeric($prices[0])) return $prices[0];\n\t }\n\n\n\t // Method 4\n\n $price = self::get_pattern(array('class=\"priceLarge\"', '>', '<'), $page);\n $price = preg_replace(\"/[^0-9-]/\", \"\", $price);\n\t if (is_numeric($price)) return $price;\n\n\n\t // Method 5\n\n $price = self::get_div('id=\"priceblock_saleprice\"', $page);\n $price = preg_replace(\"/[^0-9-]/\", \"\", $price);\n\t if (is_numeric($price)) return $price;\n\n\n\t // Method 6\n\n\t $prices = self::get_pattern_repeat(array('swatchElement', 'a-color-', '>', '</span>'), $page);\n\n\t if (sizeof($prices)) {\n\t \t$prices = array_map('strip_tags', $prices);\n\t \t$prices = array_map('self::remove_non_numeric', $prices);\n\t \t$prices = array_filter($prices);\n\t \tasort($prices);\n\n\t \tif (sizeof($prices)) return reset($prices);\n\t }\n\n\n\t // Method 7\n\n\t $price = self::get_div('id=\"olp_feature_div\"', $page);\n\t $price = self::get_div('a-color-price', $price, 0, false);\n\t $price = strip_tags($price);\n $price = preg_replace(\"/[^0-9-]/\", \"\", $price);\n\n if (is_numeric($price)) return $price;\n\n\n\n\t return \"\";\n\t }", "title": "" }, { "docid": "54c4dade228accf98278864d7490ec21", "score": "0.63339835", "text": "private function getMinPrice()\n {\n if ($this->defaultService->price_base_type == 'TTC') {\n return $this->defaultService->price_min;\n }\n return $this->defaultService->price_min_ttc;\n }", "title": "" }, { "docid": "d52083b38a5d83bfe02ddc0a33e8f5cf", "score": "0.6331143", "text": "public function getLowestPrice()\n {\n return $this->formatPrice($this->getProduct()->getFinalPrice());\n }", "title": "" }, { "docid": "8f4e3d50f09e8063529823da331513c0", "score": "0.6326564", "text": "public function getMinOrMaxPrice($minOrMax)\n {\n $database = $GLOBALS['database'];\n $result = null;\n\n try\n {\n $sql = 'SELECT '.$minOrMax.'(price) as price FROM ' . self::tablename();\n $sql .= ';';\n \n $result = $database->query($sql)->fetch();\n }\n catch(\\PDOException $e)\n {\n die('Select statement failed: ' . $e->getMessage());\n }\n\n return $result;\n }", "title": "" }, { "docid": "c635c9c546e8af8b5cddf5e6f6b5efdc", "score": "0.630417", "text": "public function determineSortPrice()\n {\n $price = $this->mcp3Project->getIntByPath('//project:Details/project:Koop/project:PrijsMin');\n if (!empty($price))\n return $price;\n\n $price = $this->mcp3Project->getIntByPath('//project:Details/project:Huur/project:Prijs/project:Min');\n if (!empty($price))\n return $price;\n\n $price = $this->mcp3Project->getIntByPath('//project:Details/project:Koop/project:PrijsMax');\n if (!empty($price))\n return $price;\n\n $price = $this->mcp3Project->getIntByPath('//project:Details/project:Huur/project:Prijs/project:Max');\n if (!empty($price))\n return $price;\n\n return 0;\n }", "title": "" }, { "docid": "cf64d7ade7a7ea2701788f45f272ad19", "score": "0.6279579", "text": "public function getCatalogPrice();", "title": "" }, { "docid": "7cfcb97956b075fae8c1212930fb56a8", "score": "0.6271359", "text": "private function getMinPrice($selections)\n {\n $minPrice = PHP_INT_MAX;\n foreach ($selections as $product) {\n if ($product->isSalable()) {\n $price = Mage::helper('tax')\n ->getPrice($product, $product->getFinalPrice());\n\n if ($price < $minPrice) {\n $minPrice = $price;\n }\n }\n }\n\n return $minPrice;\n }", "title": "" }, { "docid": "1d290d008530bb90630bb7065a4953bd", "score": "0.62186444", "text": "public function getMinPriceThreshold();", "title": "" }, { "docid": "4ebf26ccc2116d890f19dfc58cdceeb8", "score": "0.6210948", "text": "public function getValue()\n {\n if ($this->value === null) {\n $this->value = false;\n foreach ($this->priceInfo->getPrices() as $price) {\n if ($price instanceof BasePriceProviderInterface && $price->getValue() !== false) {\n $this->value = min($price->getValue(), $this->value !== false ? $this->value: $price->getValue());\n }\n }\n }\n return $this->value;\n }", "title": "" }, { "docid": "74a5c4deb47030f44933b33ae8b1f62b", "score": "0.6206482", "text": "public function getLowestSecondaryCurrencyPrice()\n {\n return $this->object->LowestSecondaryCurrencyPrice;\n }", "title": "" }, { "docid": "e0828ac28e7edb30fab77b839694420d", "score": "0.6185636", "text": "public function getprice() {\n /**\n * Returning the resource Model for 'price'\n */\n return Mage::getResourceModel ( 'eav/entity_attribute' )->getIdByCode ( 'catalog_product', 'price' );\n }", "title": "" }, { "docid": "7b675ba0d2057e533e3597624670dfe0", "score": "0.618556", "text": "public function getMaxPrice()\n {\n return $this->max_price;\n }", "title": "" }, { "docid": "eab6a61df882016c785d10ef433a7018", "score": "0.6183469", "text": "protected function _getMainPrice($id = 'active') {\n\t\t$result = $this->{$this->modelClass}->find('product', $id);\n\t\t$prices = Hash::combine($result['ShopProductVariant'], '{n}.id', '{n}.ShopProductVariantPrice');\n\n\t\t$selling = Hash::extract($prices, '{s}.selling');\n\t\tif ($selling) {\n\t\t\t$this->assertEquals(min($selling), $result[$this->modelClass]['price_min']);\n\t\t\t$this->assertEquals(max($selling), $result[$this->modelClass]['price_max']);\n\t\t}\n\n\t\treturn $prices;\n\t}", "title": "" }, { "docid": "4a6edaa4a0cd10a5be7021eed05af6f0", "score": "0.6116312", "text": "function max_prices_for_rent_list() {\n\n\t\t$max_price_for_rent_array = array( 1000, 2000, 3000, 4000, 5000, 7500, 10000, 15000, 20000, 25000, 30000, 40000, 50000, 75000, 100000, 150000 );\n\n\t\t/* Get values from theme options and convert them to an integer array */\n\t\t$maximum_price_for_rent_values = get_option( 'theme_maximum_price_values_for_rent' );\n\t\tif ( ! empty( $maximum_price_for_rent_values ) ) {\n\t\t\t$max_prices_string_array = explode( ',', $maximum_price_for_rent_values );\n\t\t\tif ( is_array( $max_prices_string_array ) && ! empty( $max_prices_string_array ) ) {\n\t\t\t\t$new_max_prices_array = array();\n\t\t\t\tforeach ( $max_prices_string_array as $string_price ) {\n\t\t\t\t\t$integer_price = doubleval( $string_price );\n\t\t\t\t\tif ( $integer_price > 1 ) {\n\t\t\t\t\t\t$new_max_prices_array[] = $integer_price;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ( ! empty( $new_max_prices_array ) ) {\n\t\t\t\t\t$max_price_for_rent_array = $new_max_prices_array;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$maximum_price = '';\n\t\tif ( isset( $_GET[ 'max-price' ] ) ) {\n\t\t\t$maximum_price = doubleval( $_GET[ 'max-price' ] );\n\t\t}\n\n\t\tif ( $maximum_price == inspiry_any_value() || empty( $maximum_price ) ) {\n\t\t\techo '<option value=\"' . inspiry_any_value() . '\" selected=\"selected\">' . inspiry_any_text() . '</option>';\n\t\t} else {\n\t\t\techo '<option value=\"' . inspiry_any_value() . '\">' . inspiry_any_text() . '</option>';\n\t\t}\n\n\t\tif ( ! empty( $max_price_for_rent_array ) ) {\n\t\t\tforeach ( $max_price_for_rent_array as $price ) {\n\t\t\t\tif ( $maximum_price == $price ) {\n\t\t\t\t\techo '<option value=\"' . $price . '\" selected=\"selected\">' . get_custom_price( $price ) . '</option>';\n\t\t\t\t} else {\n\t\t\t\t\techo '<option value=\"' . $price . '\">' . get_custom_price( $price ) . '</option>';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "title": "" }, { "docid": "6e211a618040342d0d7b04f15e928091", "score": "0.6095476", "text": "protected function doPriceSearch()\n {\n if (true === $this->hasCache) {\n return;\n }\n if ($this->hasMinMaxSearch()) {\n $min = $this->rawData['MinimumPrice'];\n if ($min) {\n $this->products = $this->products->filter(['Price:GreaterThanOrEqual' => $min]);\n if ($this->debug) {\n $this->debugOutput('<h3>MIN PRICE</h3><pre>' . $min . '</pre>');\n }\n }\n $max = $this->rawData['MaximumPrice'];\n if ($max) {\n $this->products = $this->products->filter(['Price:LessThanOrEqual' => $max]);\n if ($this->debug) {\n $this->debugOutput('<h3>MAX PRICE</h3><pre>' . $max . '</pre>');\n }\n }\n if ($this->debug) {\n $this->debugOutput('<hr />');\n $this->debugOutput('<h3>BASE LIST AFTER PRICE SEARCH</h3><pre>' . Vardump::inst()->mixedToUl($this->products->sql()) . '</pre>');\n $this->debugOutput('<h3>PRODUCTS AFTER PRICE SEARCH</h3><pre>' . $this->products->count() . '</pre>');\n }\n } elseif ($this->debug) {\n $this->debugOutput('<h3>BASE LIST AFTER PRICE SEARCH</h3><p>Not required</p>');\n }\n }", "title": "" }, { "docid": "0f2083e421b50983904b3fd61f19fcea", "score": "0.6082685", "text": "public function getMinprice()\n {\n return $this->minprice;\n }", "title": "" }, { "docid": "f0686a687b3ba646906829c295911204", "score": "0.6073122", "text": "function findByPriceRange($min, $max){\n //creates a new instance of the database\n $db = new Database();\n \n //connects to the database\n $connection = $db->getConnection();\n \n //create prepared statement\n $stmt = $connection->prepare(\"SELECT ID, PRODUCT_NAME, DESCRIPTION, PRICE FROM PRODUCTS WHERE PRICE BETWEEN ? AND ?\");\n \n //bind, execute, and get results\n $stmt->bind_param(\"ss\", $min, $max);\n $stmt->execute();\n $result = $stmt->get_result();\n \n //checks if result didn't work\n if (!$result) {\n echo \"assume the SQL statement has an error\";\n return null;\n exit;\n }\n \n //checks if there were results found\n if ($result->num_rows == 0) {\n return null;\n }\n else {\n $product_array = array();\n while ($product = $result->fetch_assoc()){\n \n array_push($product_array, $product);\n \n }\n \n return $product_array;\n }\n }", "title": "" }, { "docid": "cf1c064be389f82f7e65ed5b2391eea2", "score": "0.6054565", "text": "public function getMaxPrice()\n {\n return $this->maxPrice;\n }", "title": "" }, { "docid": "a7c5cbec9ee4f94246903814d3725066", "score": "0.6037135", "text": "function min_prices_for_rent_list() {\n\n\t\t$min_price_for_rent_array = array( 500, 1000, 2000, 3000, 4000, 5000, 7500, 10000, 15000, 20000, 25000, 30000, 40000, 50000, 75000, 100000 );\n\n\t\t/* Get values from theme options and convert them to an integer array */\n\t\t$minimum_price_values_for_rent = get_option( 'theme_minimum_price_values_for_rent' );\n\t\tif ( ! empty( $minimum_price_values_for_rent ) ) {\n\t\t\t$min_prices_string_array = explode( ',', $minimum_price_values_for_rent );\n\t\t\tif ( is_array( $min_prices_string_array ) && ! empty( $min_prices_string_array ) ) {\n\t\t\t\t$new_min_prices_array = array();\n\t\t\t\tforeach ( $min_prices_string_array as $string_price ) {\n\t\t\t\t\t$integer_price = doubleval( $string_price );\n\t\t\t\t\tif ( $integer_price > 1 ) {\n\t\t\t\t\t\t$new_min_prices_array[] = $integer_price;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ( ! empty( $new_min_prices_array ) ) {\n\t\t\t\t\t$min_price_for_rent_array = $new_min_prices_array;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$minimum_price = '';\n\t\tif ( isset( $_GET[ 'min-price' ] ) ) {\n\t\t\t$minimum_price = doubleval( $_GET[ 'min-price' ] );\n\t\t}\n\n\t\tif ( $minimum_price == inspiry_any_value() || empty( $minimum_price ) ) {\n\t\t\techo '<option value=\"' . inspiry_any_value() . '\" selected=\"selected\">' . inspiry_any_text() . '</option>';\n\t\t} else {\n\t\t\techo '<option value=\"' . inspiry_any_value() . '\">' . inspiry_any_text() . '</option>';\n\t\t}\n\n\t\tif ( ! empty( $min_price_for_rent_array ) ) {\n\t\t\tforeach ( $min_price_for_rent_array as $price ) {\n\t\t\t\tif ( $minimum_price == $price ) {\n\t\t\t\t\techo '<option value=\"' . $price . '\" selected=\"selected\">' . get_custom_price( $price ) . '</option>';\n\t\t\t\t} else {\n\t\t\t\t\techo '<option value=\"' . $price . '\">' . get_custom_price( $price ) . '</option>';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "title": "" }, { "docid": "ca9f523e67a0b4d9b3a91efdf4b4ac71", "score": "0.5990755", "text": "public function cheapest_products()\n\t{\n\t\tif ( ! $this->loaded())\n\t\t\treturn $this->products;\n\n\t\t$minprice = $this->products\n\t\t\t->select(array(DB::expr('LEAST(MIN(price), MIN(sale_price))'), 'minprice'))\n\t\t\t->find()\n\t\t\t->minprice;\n\n\t\treturn $this->products\n\t\t\t->where('price', '=', $minprice)\n\t\t\t->or_where('sale_price', '=', $minprice);\n\t}", "title": "" }, { "docid": "3ee0a6800d34f6d36760f934dbece04b", "score": "0.59856534", "text": "public function getMinimumBestOfferPrice()\n {\n return $this->minimumBestOfferPrice;\n }", "title": "" }, { "docid": "3edb57591ef983952b95607d73cb8472", "score": "0.59683436", "text": "public function getPriceForConfig()\n {\n $config = array();\n $product = $this->product; \n $regularPrice = $product->getPrice();\n $finalPrice = $product->getFinalPrice();\n $tierPrices = array();\n \n foreach ($product->getTierPrice() as $tierPrice) {\n $tierPrices[] = Mage::helper('core')->currency($tierPrice['website_price'], false, false);\n }\n\n $config = array(\n 'productId' => $product->getId(),\n 'priceFormat' => Mage::app()->getLocale()->getJsPriceFormat(),\n 'productPrice' => Mage::helper('core')->currency($finalPrice, false, false),\n 'productOldPrice' => Mage::helper('core')->currency($regularPrice, false, false),\n 'plusDisposition' => 0,\n 'minusDisposition' => 0,\n 'tierPrices' => $tierPrices,\n );\n\n \n return Mage::helper('core')->jsonEncode($config);\n }", "title": "" }, { "docid": "6580144a76164a934514b5ac8a2d8f3f", "score": "0.5958905", "text": "public function getMaximalPrice()\n {\n \\Magento\\Framework\\Profiler::start(__CLASS__.':'.__METHOD__);\n if (!$this->maximalPrice) {\n $this->maximalPrice = $this->calculator->getAmount($this->getValue(), $this->product);\n }\n \\Magento\\Framework\\Profiler::stop(__CLASS__.':'.__METHOD__);\n return $this->maximalPrice;\n }", "title": "" }, { "docid": "36146bf5b79f7fddf1758494fe40ad45", "score": "0.5943208", "text": "public function getMinPrice()\n {\n return $this->min_price;\n }", "title": "" }, { "docid": "eb9f4623fdefe782b11fa3240a696352", "score": "0.5889681", "text": "public function getMinimalPrice()\n {\n \\Magento\\Framework\\Profiler::start(__CLASS__.':'.__METHOD__);\n if (!$this->minimalPrice) {\n $minimalPrice = $this->product->getMinimalPrice();\n if ($minimalPrice === null) {\n $minimalPrice = $this->getValue();\n } else {\n $minimalPrice = $this->priceCurrency->convertAndRound($minimalPrice);\n }\n $this->minimalPrice = $this->calculator->getAmount($minimalPrice, $this->product);\n }\n \\Magento\\Framework\\Profiler::stop(__CLASS__.':'.__METHOD__);\n return $this->minimalPrice;\n }", "title": "" }, { "docid": "f379ca751d9f0812541b3978504ed3cb", "score": "0.58862936", "text": "public function getSellingPrice(){\n $highestPricedLot = $this->getLots(['ORDER' => 'unitCost DESC'])[0] ?? null;\n \n $price = null;\n if ( $highestPricedLot != null ){\n $price = $highestPricedLot->getUnitCost() * 1.2;\n }\n\n return $highestPricedLot == null? null:$price;\n }", "title": "" }, { "docid": "30cdde7a875dfb7e33802545ee4b8a76", "score": "0.5876494", "text": "public function fetchProductByPriceHighest() {\r\n $sqlQuery = 'SELECT * FROM tb_product ORDER BY pprice DESC';\r\n\r\n\r\n $statement = $this->_dbHandle->prepare($sqlQuery); // prepare PDO statement\r\n $statement->execute(); // execute the PDO statement\r\n\r\n $dataSet = [];\r\n while ($row = $statement->fetch()) {\r\n $dataSet[] = new productData($row);\r\n }\r\n return $dataSet;\r\n }", "title": "" }, { "docid": "1ae2b37a2b93ad88373ea764d9739755", "score": "0.5872776", "text": "function _getMaxStoreBatchPrice($product, $attributeCode, $currency) {\n\t\t\t$price = null;\n\t\t\t$batchPrices = $product->getData( 'store_' . $attributeCode );\n\n\t\t\tif (( ( !is_null( $batchPrices ) && isset( $batchPrices[$currency] ) ) && count( $batchPrices[$currency] ) )) {\n\t\t\t\t$this->getWarehouseHelper( );\n\t\t\t\t$helper->getStockIds( );\n\t\t\t\t$currencyBatchPrices = $helper = $batchPrices[$currency];\n\t\t\t\t$storeId = $stockIds = $product->getStoreId( );\n\t\t\t\tforeach ($stockIds as $stockId) {\n\n\t\t\t\t\tif (isset( $currencyBatchPrices[$stockId] )) {\n\t\t\t\t\t\t$batchPrice = (double)$currencyBatchPrices[$stockId];\n\t\t\t\t\t} \nelse {\n\t\t\t\t\t\tif ($attributeCode == 'special_price') {\n\t\t\t\t\t\t\t$batchPrice = $this->getDefaultSpecialPrice2( $product, $storeId, $currency, $stockId );\n\t\t\t\t\t\t} \nelse {\n\t\t\t\t\t\t\t$batchPrice = $this->getDefaultPrice2( $product, $storeId, $currency, $stockId );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\n\t\t\t\t\tif (is_null( $price )) {\n\t\t\t\t\t\t$price = $stockId;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\n\t\t\t\t\tif ($price < $batchPrice) {\n\t\t\t\t\t\t$price = $stockId;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $price;\n\t\t}", "title": "" }, { "docid": "c8255b1c2242fbdaf4eebdcdf29f4d68", "score": "0.5871799", "text": "public function fetchProductByPriceLowest() {\r\n $sqlQuery = 'SELECT * FROM tb_product ORDER BY pprice ASC';\r\n\r\n\r\n $statement = $this->_dbHandle->prepare($sqlQuery); // prepare PDO statement\r\n $statement->execute(); // execute the PDO statement\r\n\r\n $dataSet = [];\r\n while ($row = $statement->fetch()) {\r\n $dataSet[] = new productData($row);\r\n }\r\n return $dataSet;\r\n }", "title": "" }, { "docid": "df87010d49de954eb71221976c965b0c", "score": "0.58620006", "text": "function parsePrice()\n {\n $price_array = array( 1 => 1 );\n foreach ($this->_Search_Array as $No) {\n //if there is a number greater than 100 we assume this is the price.\n if ($No >= 100) {\n //we add these numbers to the price array\n $price_array[] = $No;\n }\n }\n if (!isset($pricearray)) {\n //set the max and minimum prices from the array\n $this->_Price_Max = max($price_array);\n $this->_Price_Min = min($price_array);\n }\n }", "title": "" }, { "docid": "54cd55cb58e52c3a6f9c14ab46e7f513", "score": "0.58413094", "text": "protected function _getChildProductOptionPrices($product)\n {\n\n $config = array();\n\n /*\n * Adjust the configurable products cpo for the simple products\n */\n if ($this->getProductOptionsCollection()->count() > 0)\n {\n foreach ($this->getProductOptionsCollection() as $option)\n {\n $option->setProduct($product);\n\n /* @var $option Mage_Catalog_Model_Product_Option */\n $priceValue = 0;\n if ($option->getGroupByType() == Mage_Catalog_Model_Product_Option::OPTION_GROUP_SELECT)\n {\n $_tmpPriceValues = array();\n foreach ($option->getValues() as $value)\n {\n /* @var $value Mage_Catalog_Model_Product_Option_Value */\n $_tmpPriceValues[$value->getId()] = Mage::helper('bcp')->getChildProductOptionPrice($value->getPrice(true));\n }\n $priceValue = $_tmpPriceValues;\n }\n else\n {\n $priceValue = Mage::helper('core')->currency($option->getPrice(true), false, false);\n }\n $config[$option->getId()] = $priceValue;\n }\n }\n\n /*\n * Add the simple products cpo\n */\n $childCpo = $product->getProductOptionsCollection();\n if ($childCpo->count() > 0)\n {\n foreach ($childCpo as $option)\n {\n $option->setProduct($product);\n $product->addOption($option);\n \n /* @var $option Mage_Catalog_Model_Product_Option */\n $priceValue = 0;\n if ($option->getGroupByType() == Mage_Catalog_Model_Product_Option::OPTION_GROUP_SELECT) {\n $_tmpPriceValues = array();\n $usePlainPrice = version_compare(Mage::getVersion(), '1.7.0', '<');\n foreach ($option->getValues() as $value)\n {\n $optionsPrice = Mage::helper('core')->currency($value->getPrice(true), false, false);\n if ($usePlainPrice) {\n /* @var $value Mage_Catalog_Model_Product_Option_Value */\n $_tmpPriceValues[$value->getId()] = $optionsPrice;\n } else {\n $_tmpPriceValues[$value->getId()] = array('price' => $optionsPrice); \n }\n }\n $priceValue = $_tmpPriceValues;\n }\n else\n {\n $priceValue = Mage::helper('core')->currency($option->getPrice(true), false, false);\n }\n $config[$option->getId()] = $priceValue;\n \n }\n }\n return $config;\n }", "title": "" }, { "docid": "f6e2baa1f34271c00c3efedab7ea2605", "score": "0.58386064", "text": "private function getMaxPrice($selections)\n {\n $maxPrice = 0;\n foreach ($selections as $product) {\n if ($product->isSalable()) {\n $price = Mage::helper('tax')\n ->getPrice($product, $product->getFinalPrice());\n\n if ($price > $maxPrice) {\n $maxPrice = $price;\n }\n }\n }\n\n return $maxPrice;\n }", "title": "" }, { "docid": "04c38eee0eab4be20d99d8b69fd26d72", "score": "0.5821386", "text": "public function getPriceConfig(){\n return $this->aPriceConfig;\n }", "title": "" }, { "docid": "c4b0f9e09b4df9da2bef42be49b09bdf", "score": "0.5808682", "text": "public function getLowestProductPrice($id)\n {\n try {\n $product = $this->productRepository->getById($id);\n if($product->getTypeId() == \\Magento\\ConfigurableProduct\\Model\\Product\\Type\\Configurable::TYPE_CODE){\n $children = $product->getTypeInstance()->getUsedProducts($product);\n $price = [];\n foreach($children as $child) {\n $price[] = $this->getTierPriceFromProduct($child); //$child->getPrice();\n }\n\n }\n $price[] = $this->getTierPriceFromProduct($product);\n\n return $this->getMinVal($price);\n\n } catch (\\Magento\\Framework\\Exception\\NoSuchEntityException $e){\n return 0;\n }\n }", "title": "" }, { "docid": "ed49238720383b28e11aae8c02e9aab1", "score": "0.57964784", "text": "protected function getBasePrice()\n {\n \\Magento\\Framework\\Profiler::start(__CLASS__.':'.__METHOD__);\n if (!$this->basePrice) {\n $this->basePrice = $this->priceInfo->getPrice(BasePrice::PRICE_CODE);\n }\n \\Magento\\Framework\\Profiler::stop(__CLASS__.':'.__METHOD__);\n return $this->basePrice;\n }", "title": "" }, { "docid": "d001d3156654219cae6e091f7c949ae2", "score": "0.5775181", "text": "public function getMinPrice(): float\n {\n return $this->minPrice;\n }", "title": "" }, { "docid": "fbe56157bd5fc09e6e4aa15ecf2dbf82", "score": "0.57551974", "text": "abstract protected function getProductPagePrices($actualPrices);", "title": "" }, { "docid": "608bc9f29901faea78b6588b43e9ce75", "score": "0.5739712", "text": "public function getMerchandisePricing();", "title": "" }, { "docid": "c402e059b12490174fce683892920c30", "score": "0.57308936", "text": "function inspiry_price_search( $meta_query ) {\n\t\tif ( isset( $_GET[ 'min-price' ] ) && ( $_GET[ 'min-price' ] != inspiry_any_value() ) && isset( $_GET[ 'max-price' ] ) && ( $_GET[ 'max-price' ] != inspiry_any_value() ) ) {\n\t\t\t$min_price = doubleval( $_GET[ 'min-price' ] );\n\t\t\t$max_price = doubleval( $_GET[ 'max-price' ] );\n\t\t\tif ( $min_price >= 0 && $max_price > $min_price ) {\n\t\t\t\t$meta_query[] = array(\n\t\t\t\t\t'key' => 'REAL_HOMES_property_price',\n\t\t\t\t\t'value' => array( $min_price, $max_price ),\n\t\t\t\t\t'type' => 'NUMERIC',\n\t\t\t\t\t'compare' => 'BETWEEN'\n\t\t\t\t);\n\t\t\t}\n\t\t} elseif ( isset( $_GET[ 'min-price' ] ) && ( $_GET[ 'min-price' ] != inspiry_any_value() ) ) {\n\t\t\t$min_price = doubleval( $_GET[ 'min-price' ] );\n\t\t\tif ( $min_price > 0 ) {\n\t\t\t\t$meta_query[] = array(\n\t\t\t\t\t'key' => 'REAL_HOMES_property_price',\n\t\t\t\t\t'value' => $min_price,\n\t\t\t\t\t'type' => 'NUMERIC',\n\t\t\t\t\t'compare' => '>='\n\t\t\t\t);\n\t\t\t}\n\t\t} elseif ( isset( $_GET[ 'max-price' ] ) && ( $_GET[ 'max-price' ] != inspiry_any_value() ) ) {\n\t\t\t$max_price = doubleval( $_GET[ 'max-price' ] );\n\t\t\tif ( $max_price > 0 ) {\n\t\t\t\t$meta_query[] = array(\n\t\t\t\t\t'key' => 'REAL_HOMES_property_price',\n\t\t\t\t\t'value' => $max_price,\n\t\t\t\t\t'type' => 'NUMERIC',\n\t\t\t\t\t'compare' => '<='\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\treturn $meta_query;\n\t}", "title": "" }, { "docid": "4521abf90d2f01e228c54381da39c010", "score": "0.5726137", "text": "function fetch_lowest_shipping_cost($prices = array(), $docurrencyformat = false, $pid = 0)\r\n{\r\n\tglobal $ilance;\r\n\t\r\n\t$currencyid = fetch_auction('currencyid', $pid);\r\n\t\r\n\tif ($docurrencyformat)\r\n\t{\r\n\t\tif (count($prices) > 0)\r\n\t\t{\r\n\t\t\treturn $ilance->currency->format(min($prices), $currencyid);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn '-';\r\n\t\t}\r\n\t}\r\n\telse\r\n\t{\r\n\t\tif (count($prices) > 0)\r\n\t\t{\r\n\t\t\treturn min($prices);\r\n\t\t}\r\n\t}\r\n\t\r\n\treturn false;\r\n}", "title": "" }, { "docid": "0000ff273e1394a1353368633bd88318", "score": "0.5725909", "text": "public function getCurrMinPrice(){\n\t\tif($this->_currMinPrice > 0){\n\t\t\t$min = $this->_currMinPrice;\n\t\t} else{\n\t\t\t$min = $this->_minPrice;\n\t\t}\n\t\treturn $min;\n\t}", "title": "" }, { "docid": "76a274d4c233dc67ca58f29801da7a73", "score": "0.57203424", "text": "public function getMaximalRegularPrice(SaleableInterface $product): AmountInterface;", "title": "" }, { "docid": "a07860b6e7618ba072639e2fbdb2305e", "score": "0.5713994", "text": "public function getConfigurableProductPrice($product)\n {\n if ($product->getFinalPrice() === 0) {\n $simpleCollection = $product->getTypeInstance()\n ->getUsedProducts($product);\n \n foreach ($simpleCollection as $simpleProduct) {\n if ($simpleProduct->getPrice() > 0) {\n return $this->getFinalPrice($simpleProduct);\n }\n }\n }\n \n return $this->getFinalPrice($product);\n }", "title": "" }, { "docid": "bf56ca3a377094d90f294ebcae13c0c3", "score": "0.5713586", "text": "public function getPrice();", "title": "" }, { "docid": "bf56ca3a377094d90f294ebcae13c0c3", "score": "0.5713586", "text": "public function getPrice();", "title": "" }, { "docid": "bf56ca3a377094d90f294ebcae13c0c3", "score": "0.5713586", "text": "public function getPrice();", "title": "" }, { "docid": "bf56ca3a377094d90f294ebcae13c0c3", "score": "0.5713586", "text": "public function getPrice();", "title": "" }, { "docid": "bf56ca3a377094d90f294ebcae13c0c3", "score": "0.5713586", "text": "public function getPrice();", "title": "" }, { "docid": "bf56ca3a377094d90f294ebcae13c0c3", "score": "0.5713586", "text": "public function getPrice();", "title": "" }, { "docid": "bf56ca3a377094d90f294ebcae13c0c3", "score": "0.5713586", "text": "public function getPrice();", "title": "" }, { "docid": "bf56ca3a377094d90f294ebcae13c0c3", "score": "0.5713586", "text": "public function getPrice();", "title": "" }, { "docid": "bf56ca3a377094d90f294ebcae13c0c3", "score": "0.5713586", "text": "public function getPrice();", "title": "" }, { "docid": "bf56ca3a377094d90f294ebcae13c0c3", "score": "0.5713586", "text": "public function getPrice();", "title": "" }, { "docid": "baf5df553a7655f130269c2f491e4ea0", "score": "0.5702084", "text": "private function recalcProductPrimaryPrices($code = null)\n {\n $where = $code ? \"WHERE p.currency = '\".$this->escape($code).\"'\" : '';\n $sql = \"UPDATE `shop_product` p JOIN\n (\n SELECT p.id, MIN(ps.price) AS min_price, MAX(ps.price) AS max_price\n FROM `shop_product` p\n JOIN `shop_product_skus` ps ON ps.product_id = p.id\n GROUP BY p.id\n ) r ON p.id = r.id\n JOIN `shop_currency` c ON c.code = p.currency\n SET p.min_price = r.min_price*c.rate, p.max_price = r.max_price*c.rate\n $where\n \";\n $this->exec($sql);\n\n $sql = \"UPDATE `shop_product` p\n JOIN `shop_product_skus` ps ON ps.product_id = p.id AND ps.id = p.sku_id\n JOIN `shop_currency` c ON c.code = p.currency\n SET p.price = ps.price*c.rate\n $where\";\n $this->exec($sql);\n\n $sql = \"UPDATE `shop_product` p\n JOIN `shop_product_skus` ps ON ps.product_id = p.id AND ps.id = p.sku_id\n JOIN `shop_currency` c ON c.code = p.currency\n SET p.compare_price = ps.compare_price*c.rate\n $where\";\n $this->exec($sql);\n\n $sql = \"UPDATE `shop_product` p\n JOIN `shop_product_skus` ps ON p.id = ps.product_id\n JOIN `shop_currency` c ON c.code = p.currency\n SET ps.primary_price = ps.price*c.rate\n $where\";\n $this->exec($sql);\n }", "title": "" }, { "docid": "1b83687fcf0fb3766dd5b4f9e5ef0b3a", "score": "0.5691811", "text": "function fn_get_product_filter_fields()\n{\n $filters = array (\n // price filter\n ProductFilterProductFieldTypes::PRICE => array (\n 'db_field' => 'price',\n 'table' => 'product_prices',\n 'description' => 'price',\n 'condition_type' => 'D',\n 'slider' => true,\n 'convert' => function($min, $max, $extra = '') {\n\n if (!empty($extra) && $extra != CART_PRIMARY_CURRENCY && Registry::get('currencies.' . $extra)) {\n $currency = Registry::get('currencies.' . $extra);\n\n $min = round(floatval($min) * floatval($currency['coefficient']), $currency['decimals']);\n $max = round(floatval($max) * floatval($currency['coefficient']), $currency['decimals']);\n } elseif (empty($extra) && CART_PRIMARY_CURRENCY != CART_SECONDARY_CURRENCY) {\n $currency = Registry::get('currencies.' . CART_SECONDARY_CURRENCY);\n\n $min = round(floatval($min) / floatval($currency['coefficient']), $currency['decimals']);\n $max = round(floatval($max) / floatval($currency['coefficient']), $currency['decimals']);\n }\n\n return array($min, $max);\n },\n 'conditions' => function($db_field, $join, $condition) {\n\n $join .= db_quote(\"\n LEFT JOIN ?:product_prices as prices_2 ON ?:product_prices.product_id = prices_2.product_id AND ?:product_prices.price > prices_2.price AND prices_2.lower_limit = 1 AND prices_2.usergroup_id IN (?n)\",\n array_merge(array(USERGROUP_ALL), Tygh::$app['session']['auth']['usergroup_ids'])\n );\n\n $condition .= db_quote(\"\n AND ?:product_prices.lower_limit = 1 AND ?:product_prices.usergroup_id IN (?n) AND prices_2.price IS NULL\",\n array_merge(array(USERGROUP_ALL), Tygh::$app['session']['auth']['usergroup_ids'])\n );\n\n if (fn_allowed_for('ULTIMATE') && Registry::get('runtime.company_id')) {\n $db_field = \"IF(shared_prices.product_id IS NOT NULL, shared_prices.price, ?:product_prices.price)\";\n $join .= db_quote(\" LEFT JOIN ?:ult_product_prices AS shared_prices ON shared_prices.product_id = products.product_id\"\n . \" AND shared_prices.lower_limit = 1\"\n . \" AND shared_prices.usergroup_id IN (?n)\"\n . \" AND shared_prices.company_id = ?i\",\n array_merge(array(USERGROUP_ALL), Tygh::$app['session']['auth']['usergroup_ids']),\n Registry::get('runtime.company_id')\n );\n }\n\n return array($db_field, $join, $condition);\n },\n 'extra' => CART_SECONDARY_CURRENCY,\n 'prefix' => (Registry::get('currencies.' . CART_SECONDARY_CURRENCY . '.after') == 'Y' ? '' : Registry::get('currencies.' . CART_SECONDARY_CURRENCY . '.symbol')),\n 'suffix' => (Registry::get('currencies.' . CART_SECONDARY_CURRENCY . '.after') != 'Y' ? '' : Registry::get('currencies.' . CART_SECONDARY_CURRENCY . '.symbol'))\n ),\n // amount filter\n ProductFilterProductFieldTypes::IN_STOCK => array (\n 'db_field' => 'amount',\n 'table' => 'products',\n 'description' => 'in_stock',\n 'condition_type' => 'C',\n 'map' => array(\n 'amount_from' => 1,\n )\n ),\n // filter by free shipping\n ProductFilterProductFieldTypes::FREE_SHIPPING => array (\n 'db_field' => 'free_shipping',\n 'table' => 'products',\n 'description' => 'free_shipping',\n 'condition_type' => 'C',\n 'map' => array(\n 'free_shipping' => 'Y',\n )\n )\n );\n\n /**\n * Changes product filter fields data\n *\n * @param array $filters Product filter fields\n */\n fn_set_hook('get_product_filter_fields', $filters);\n\n return $filters;\n}", "title": "" }, { "docid": "036698e519b98d03e9af5d4911fbcdd6", "score": "0.56860155", "text": "public function getMinCostPerProduct(): Cost\n {\n return $this->minCostPerProduct;\n }", "title": "" }, { "docid": "43003105a9499592a3da03e5b3cee3ca", "score": "0.5685238", "text": "public function getSmallestPrice(): array {\n $smallestPrice = [];\n \n if (($content = $this->getContent()) !== null) {\n \n if ((float) $content->vat = 0.05) {\n $content->vat = 0.055;\n }\n \n $pricing = $content->pricing;\n \n if (is_array($pricing) && count($pricing) > 1) {\n usort(\n $pricing,\n function ($price1, $price2) {\n return $price1->ht <=> $price2->ht;\n }\n );\n $price = array_shift($pricing);\n\n\n $smallestPrice[\"ttc\"] = $price->ht * (1 + $content->vat);\n $smallestPrice[\"multi\"] = true;\n } else {\n $price = $pricing[0];\n $smallestPrice[\"ttc\"] = $price->ht * (1 + $content->vat);\n $smallestPrice[\"multi\"] = false;\n }\n }\n \n return $smallestPrice;\n }", "title": "" }, { "docid": "239c861b32ad342fd7e345138d058614", "score": "0.5681545", "text": "public function getMinimalRegularPrice(SaleableInterface $product): AmountInterface;", "title": "" }, { "docid": "4d0614186e4ff2127d22ed1813bf1c9d", "score": "0.56812584", "text": "function retail_range($product) {\n\t\tlist($psid, $productid, $storeid, $active, $qty, $vpricing, $tax1, $tax2, $shipping, $retailLevel1, $retailLevel2, $retailLevel3, $discountLevel1, $discountLevel2, $discountLevel3) = $this->product_store($product);\n\t\t$a = array($retailLevel1, $retailLevel2, $retailLevel3, $discountLevel1, $discountLevel2, $discountLevel3);\n\t\t\n\t\tforeach ($a as $i => $v):\n\t\t\tif ($v == 0)\n\t\t\t\tunset($a[$i]);\n\t\tendforeach;\n\n\t\treturn array(min($a), max($a));\n\t}", "title": "" }, { "docid": "665f5937c7316f42db8bf804d5278b3c", "score": "0.56812507", "text": "private function GetCheapestItemFromList(array $prodList)\n {\n if (count($prodList) == 0)\n {\n return null;\n }\n /* @var $minValue Product*/\n $minValue = $prodList[0];\n foreach ($prodList as $product)\n {\n if (is_null($product->Price) || $product->Price == 0)\n {\n continue;\n }\n /* @var $product Product */\n if ($minValue->Price > $product->Price)\n {\n $minValue = $product;\n }\n }\n\n return $minValue;\n }", "title": "" }, { "docid": "5ac713cc6c6f6a30df829e571e78f9e5", "score": "0.56769663", "text": "public function getMinimalFinalPrice(SaleableInterface $product): AmountInterface;", "title": "" }, { "docid": "9dacbd704e613bdad30a98db3976a5dd", "score": "0.56741685", "text": "public function getBuyablePrice();", "title": "" }, { "docid": "60621959559d2ba649a397b46d8b3eb7", "score": "0.5671466", "text": "public function getCurrentLowestOfferPrice()\n {\n return $this->object->CurrentLowestOfferPrice;\n }", "title": "" }, { "docid": "a9366161cad8f08d149bb783fd26f53a", "score": "0.5666245", "text": "static function bkap_get_price_range_booking( $product_id, $booking_settings ){\n\t\t \n\t\t $result = get_post_meta( $product_id, '_bkap_price_range_data', true );\n\t\t $results = ( isset( $result ) && $result != \"\" ) ? $result : array();\n\t\t $block_count = count( $results );\n\t\t $row_number = 0;\n\t\t $max_key = 0;\n\t\t $_product = wc_get_product( $product_id );\n\t\t \n\t\t if( $block_count != 0 ){\n\t\t $max_key = max( array_keys( $results ) );\n\t\t }\n\t\t \n\t\t \n\t\t $product_attributes = \"\";\n\t\t if( $_product->is_type( 'variable' ) ){\n\t\t \n\t\t $product_attributes = get_post_meta( $product_id, '_product_attributes', true );\n\t\t \n\t\t if( $product_attributes != \"\" )\n\t\t $product_attributes_keys = array_keys( $product_attributes );\n\t\t }\n\t\t \n\t\t $c = 0;\n\t\t while( $row_number <= $max_key ) {\n\t\t \n\t\t if( !in_array( $row_number, array_keys( $results ) ) ){\n\t\t $row_number++;\n\t\t continue;\n\t\t }\n\t\t \n\t\t $i = 0;\n\t\t $number_of_columns = count( $results[$row_number] );\n\t\t $min_number = $max_number = $per_day_price = $fixed_price = \"\";\n\t\t \n\t\t $min_number = $results[$row_number]['min_number'];\n\t\t $max_number = $results[$row_number]['max_number'];\n\t\t $per_day_price = $results[$row_number]['per_day_price'];\n\t\t $fixed_price = $results[$row_number]['fixed_price'];\n\t\t \n\t\t $bkap_row_toggle = '';\n\t\t $bkap_row_toggle_display = '';\n\t\t \n\t\t if( $c > 4 ){\n\t\t $bkap_row_toggle = \"bkap_price_range_row_toggle\";\n\t\t $bkap_row_toggle_display = 'style=\"display:none;\"';\n\t\t }\n\t\t \n\t\t \n\t\t ?>\n\t\t\t <tr id=\"bkap_price_range_row_<?php echo $row_number; ?>\" class=\"<?php echo $bkap_row_toggle; ?>\" <?php echo $bkap_row_toggle_display; ?>>\n\t\t\t <?php \n \t\t\t if( $product_attributes != '' && $_product->is_type( 'variable' ) ) {\n \t\t\t \n \t\t\t foreach( $product_attributes as $key => $value ) {\n \t\t\t \n \t\t\t if ( $value['is_taxonomy'] ) {\n \t\t\t $value_array = wc_get_product_terms( $product_id, $value['name'], array( 'fields' => 'names' ) );\n \t\t\t }else{\n \t\t\t $value_array = explode( ' | ', $value['value'] );\n \t\t\t }\n \t\t\t \t\n \t\t\t print( '<td><select name=\"attribute_'.$i.'_'.$row_number.'\" id=\"attribute_'.$i.'_'.$row_number.'\" value=\"\" style=\"width:100%\">' );\n \t\t\t \n \t\t\t $j = 1;\n \t\t\t \n \t\t\t foreach( $value_array as $k => $v ) {\n \t\t\t $attr_value = trim( $v );\n \t\t\t $attribute_key = $product_attributes_keys[$i];\n \t\t\t $selected = \"\";\n \t\t\t \n \t\t\t if( $attr_value == $results[$row_number][$attribute_key] ){\n \t\t\t $selected = \"selected\"; \n \t\t\t }\n \t\t\t print( '<option name=\"option_attribute_'.$i.'_'.$j.'\" id=\"option_attribute_'.$i.'_'.$j.'\" value=\"'.htmlspecialchars( $attr_value ).'\" '.$selected.'>'.$v.'</option>' );\n \t\t\t }\n \t\t\t \n \t\t\t print( '</select></td>' );\n \t\t\t $i++;\n \t\t\t $j++;\t\t\t \n \t\t\t }\n \t\t\t }\n \t\t\t ?>\n <td>\n <input type=\"number\" id=\"number_of_start_days_<?php echo $row_number; ?>\" name=\"number_of_start_days\" min=0 style=\"width:100%\" value=\"<?php echo $min_number; ?>\"></input>\n </td>\n <td>\n <input type=\"number\" id=\"number_of_end_days_<?php echo $row_number; ?>\" name=\"number_of_end_days\" min=0 style=\"width:100%\" value=\"<?php echo $max_number; ?>\"></input>\n </td>\n <td >\n <input type=\"text\" id=\"per_day_price_<?php echo $row_number; ?>\" name=\"per_day_price\" style=\"width:100%\" value=\"<?php echo $per_day_price; ?>\"></input>\n </td>\n <td>\n <input type=\"text\" id=\"fixed_price_<?php echo $row_number; ?>\" name=\"fixed_price\" style=\"width:100%\" value=\"<?php echo $fixed_price; ?>\"></input>\n </td>\n \n <td width=\"4%\" id=\"bkap_price_range_close_<?php echo $row_number; ?>\" class=\"\" style=\"text-align: center;cursor:pointer;\"><i class=\"fa fa-trash\" aria-hidden=\"true\"></i></td>\n </tr>\n\t\t \n\t\t <?php \n\t\t \n\t\t \n\t\t $row_number++;\n\t\t $c++;\n\t\t }\n\t\t \n\t\t if ( $block_count > 5 ){\n\t\t ?>\n <tr style=\"\">\n <td colspan=\"<?php echo $number_of_columns + 1 ; ?>\">\n <span class=\"bkap_expand-close\">\n\t\t\t\t <a href=\"#\" class=\"bkap_price_range_expand_all\"><?php echo __( 'Expand', 'woocommerce-booking' ); ?></a> / <a href=\"#\" class=\"bkap_price_range_close_all\"><?php echo __( 'Close', 'woocommerce-booking' ); ?></a>\n\t\t\t </span>\n\t\t\t </td>\n </tr>\n <?php\n }\n\t\t \n\t\t}", "title": "" }, { "docid": "84a11720eb0323e25e0f3754b0d68dea", "score": "0.5665308", "text": "public function getMaxPrice(): float\n {\n return $this->maxPrice;\n }", "title": "" }, { "docid": "8601026829cd0ef55c20d02a1adc167a", "score": "0.5664809", "text": "public function initialPrice()\n {\n return $this->price();\n }", "title": "" }, { "docid": "20d6a0984f1b65a422917ad944454ebd", "score": "0.56634057", "text": "public function getFilterPrice()\n {\n if (empty($this->minFilterPrice)) {\n $this->minFilterPrice = 0;\n }\n if (empty($this->maxFilterPrice)) {\n $this->maxFilterPrice = 0;\n }\n\n return ['min' => $this->minFilterPrice, 'max' => $this->maxFilterPrice];\n }", "title": "" }, { "docid": "e64e650901c4cdac19df70cae3313109", "score": "0.5654896", "text": "public function get_price_for_auctions() {\n\n\t\t\t\t$return = null;\n\n\t\t\t\tif ( isset( $_POST['last_activity'] ) ) {\n\n\t\t\t\t\t$last_activity = get_option( 'simple_auction_last_activity', '0' );\n\n\t\t\t\t\tif ( intval( $_POST['last_activity'] ) == $last_activity ) {\n\t\t\t\t\t\twp_send_json( apply_filters( 'simple_auction_get_price_for_auctions', $return ) );\n\t\t\t\t\t\tdie();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$return['last_activity'] = $last_activity;\n\t\t\t\t\t}\n\n\t\t\t\t\t$args = array(\n\t\t\t\t\t\t'post_type' => 'product',\n\t\t\t\t\t\t'posts_per_page' => '-1',\n\t\t\t\t\t\t'meta_query' => array(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'key' => '_auction_last_activity',\n\t\t\t\t\t\t\t\t'compare' => '>',\n\t\t\t\t\t\t\t\t'value' => intval( $_POST['last_activity'] ),\n\t\t\t\t\t\t\t\t'type' => 'NUMERIC',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'tax_query' => array(array('taxonomy' => 'product_type' , 'field' => 'slug', 'terms' => 'auction')),\n\t\t\t\t\t\t'auction_arhive' => true,\n\t\t\t\t\t\t'show_past_auctions' => true,\n\t\t\t\t\t\t'show_future_auctions' => true,\n\t\t\t\t\t\t'fields' => 'ids',\n\t\t\t\t\t\t'suppress_filters' => true,\n\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\t$the_query = new WP_Query( $args );\n\n\t\t\t\t\t$posts_ids = $the_query->posts;\n\n\t\t\t\t\tif ( is_array( $posts_ids ) ) {\n\t\t\t\t\t\tforeach ( $posts_ids as $posts_id ) {\n\t\t\t\t\t\t\t$posts_id = apply_filters( 'wpml_object_id', $posts_id, 'product' );\n\t\t\t\t\t\t\t$product_data = wc_get_product( $posts_id );\n\t\t\t\t\t\t\tif ( $product_data->get_auction_sealed() != 'yes' ) {\n\t\t\t\t\t\t\t\tif ( $product_data->is_closed() ) {\n\t\t\t\t\t\t\t\t\t$return[ $posts_id ]['curent_bid'] = $product_data->get_price_html();\n\t\t\t\t\t\t\t\t\t$return[ $posts_id ]['curent_bider'] = $product_data->get_auction_current_bider();\n\t\t\t\t\t\t\t\t\t$return[ $posts_id ]['add_to_cart_text'] = $product_data->add_to_cart_text();\n\t\t\t\t\t\t\t\t\tif ( $product_data->is_reserved() === true ) {\n\t\t\t\t\t\t\t\t\t\tif ( $product_data->is_reserve_met() === false ) {\n\t\t\t\t\t\t\t\t\t\t\t$return[ $posts_id ]['reserve'] = apply_filters( 'reserve_bid_text', __( 'Reserve price has not been met', 'wc_simple_auctions' ) );\n\t\t\t\t\t\t\t\t\t\t} elseif ( $product_data->is_reserve_met() === true ) {\n\t\t\t\t\t\t\t\t\t\t\t$return[ $posts_id ]['reserve'] = apply_filters( 'reserve_met_bid_text', __( 'Reserve price has been met', 'wc_simple_auctions' ) );\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} else {\n\n\t\t\t\t\t\t\t\t\t\t$return[ $posts_id ]['curent_bid'] = $product_data->get_price_html();\n\t\t\t\t\t\t\t\t\t\t$return[ $posts_id ]['curent_bider'] = $product_data->get_auction_current_bider();\n\t\t\t\t\t\t\t\t\t\t$return[ $posts_id ]['bid_value'] = $product_data->bid_value();\n\t\t\t\t\t\t\t\t\t\t$return[ $posts_id ]['timer'] = $product_data->get_seconds_remaining();\n\t\t\t\t\t\t\t\t\t\t$return[ $posts_id ]['activity'] = $product_data->auction_history_last( $posts_id );\n\t\t\t\t\t\t\t\t\t\t$return[ $posts_id ]['add_to_cart_text'] = $product_data->add_to_cart_text();\n\t\t\t\t\t\t\t\t\tif ( $product_data->is_reserved() === true ) {\n\t\t\t\t\t\t\t\t\t\tif ( $product_data->is_reserve_met() === false ) {\n\t\t\t\t\t\t\t\t\t\t\t$return[ $posts_id ]['reserve'] = apply_filters( 'reserve_bid_text', __( 'Reserve price has not been met', 'wc_simple_auctions' ) );\n\t\t\t\t\t\t\t\t\t\t} elseif ( $product_data->is_reserve_met() === true ) {\n\t\t\t\t\t\t\t\t\t\t\t$return[ $posts_id ]['reserve'] = apply_filters( 'reserve_met_bid_text', __( 'Reserve price has been met', 'wc_simple_auctions' ) );\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}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twp_send_json( apply_filters( 'simple_auction_get_price_for_auctions', $return ) );\n\t\t\t\tdie();\n\t\t\t}", "title": "" }, { "docid": "5431ddfaa2acda8e9c13711cbf83fe74", "score": "0.56520385", "text": "protected function getProductPrice(\n ProductInterface $product,\n MappingCollection $attributeMapping,\n array $priceChanges = [],\n $lowest = true\n ) {\n $toSubstract = 0;\n\n foreach ($priceChanges as $attributeCode => $attributePriceMapping) {\n $attributeCode = $attributeMapping->getSource($attributeCode);\n foreach ($attributePriceMapping as $optionCode => $optionPrice) {\n if ($product->getValue($attributeCode, $this->locale) !== null &&\n $product->getValue($attributeCode, $this->locale)->getData()->getCode() === $optionCode\n ) {\n $toSubstract += $optionPrice;\n }\n }\n }\n\n $toSubstract = ($lowest * -1) * $toSubstract;\n\n $priceAttr = $attributeMapping->getSource(self::PRESTASHOP_PRICE);\n\n $price = $product->getValue($priceAttr, $this->locale, $this->channel);\n\n $data = (null != $price) ? $price->getPrice($this->currency)->getData() : 0;\n\n return $data + $toSubstract;\n }", "title": "" }, { "docid": "7655675e07e3f6fc7f93bc9cd43c9d5f", "score": "0.5651197", "text": "public function getStandalonePrice()\n {\n return $this->standalonePrice instanceof StandalonePriceBuilder ? $this->standalonePrice->build() : $this->standalonePrice;\n }", "title": "" }, { "docid": "b3ffa3f4af8b0167df583013ff68b90c", "score": "0.56444675", "text": "public static function price_range_calculate_price( $product_id, $product_type, $variation_id, $number, $variations_selected ) {\n\t\t \n\t\t $price = 0;\n\t\t $results_price = array();\n\t\t $price_range = get_post_meta( $product_id, '_bkap_price_ranges', true );\n\t\t $price_range_data = get_post_meta( $product_id , '_bkap_price_range_data', true );\n\t\t $_product = wc_get_product( $product_id );\n\t\t \n\t\t \n\t\t if ( $product_type == 'variable' ) {\n\t\t \n\t\t if( $price_range == \"booking_block_price_enable\" && $price_range_data != \"\" ){\n\t\t \n\t\t $bkap_post = $_POST; // Getting all the data from \n\t\t $attribute_string = \"attribute_\";\n\t\t $attribute_variation_pair = array();\n\t\t \n\t\t // Preparing array for attribute and its value\n\t\t // so that in post meta array we can check for that combination \n\t\t foreach( $bkap_post as $post_key => $post_value ){\n\t\t \n\t\t if( strpos( $post_key, $attribute_string ) !== false ) {\n\t\t \n\t\t $p_key = str_replace( $attribute_string,\"\", $post_key );\n\t\t $attribute_variation_pair[ $p_key ] = $post_value;\n\t\t }\n\t\t }\n\t\t \n\t\t // Removing attribute_selected from the attribute array so we got the final array.\n\t\t array_shift( $attribute_variation_pair ); \n\n\t\t // Modify the array to ensure Attribute names are used instead of slugs.\n\t\t foreach( $attribute_variation_pair as $a_name => $a_slug ) {\n\t\t $term = get_term_by('slug', $a_slug, $a_name );\n\t\t if( false !== $term )\n\t\t $attribute_variation_pair[ $a_name ] = $term->name;\n\t\t }\n\t\t \n\t\t $_POST['fixed_price'] = $_POST['variable_blocks'] = \"N\";\n\t\t \n\t\t $result_array = $results = array();\n\t\t \n\t\t // Looping through post meta and checking if there is range available\n\t\t // for selected variation and min max numbers of days.\n\t\t \n\t\t $e = 0;\n\t\t \n\t\t foreach( $price_range_data as $price_range_data_key => $price_range_data_value ){\n\t\t \n\t\t $i = 0;\n\t\t $a_v_p_count = count( $attribute_variation_pair ); // \n\t\t \n\t\t /*\n\t\t * Looping through $attribute_variation_pair and setting $i\n\t\t * so if the count of $attribute_variation_pair and $i is equal\n\t\t * then combination is found in post meta for selected attributes\n\t\t */\n\t\t \n\t\t foreach( $attribute_variation_pair as $a_v_p_key => $a_v_p_value ){\n\t\t if( array_key_exists( $a_v_p_key, $price_range_data_value ) && $price_range_data_value[ $a_v_p_key ] == stripslashes( $a_v_p_value ) ) {\n\t\t $i++; \n\t\t }\n\t\t }\n\t\t \n\t\t /*\n\t\t * Checking if the combination matched and selected number of days for booking\n\t\t * is falling in min and max numbers set in range or not.\n\t\t * If set then assign that array in $result_price\n\t\t */\n\t\t \n if( $i == $a_v_p_count && $price_range_data_value['min_number'] <= $number && $price_range_data_value['max_number'] >= $number ){\n \n $results_price[$e] = $price_range_data_value; // here we got the range for the selection.\n } \n $e++;\n\t\t }\n\t\t \n\t\t // If we found the ranges in _bkap_price_range_data. \n\t\t if ( isset( $results_price ) && count( $results_price ) > 0 ) {\n\t\t \n\t\t // Looping throught the ranges and calculating the price.\n\t\t foreach( $results_price as $k => $v ){\n\t\t \n\t\t if ( !empty( $results_price[ $k ] ) ){\n\t\t $_POST['variable_blocks'] = \"Y\";\n\t\t \t\n\t\t if ( $variation_id != '' ) {\n\t\t \n\t\t $price = get_post_meta( $variation_id, '_sale_price', true );\n\t\t \n\t\t if ( !isset( $price ) || $price == '' || $price == 0 ){\n\t\t $price = get_post_meta( $variation_id, '_regular_price', true );\n\t\t }\n\t\t \t\n\t if ( $v['fixed_price'] != 0 ){\n\t $calc_price = $v['fixed_price'];\n\t $price = $calc_price . \"-fixed\";\n\t $_POST['fixed_price'] = \"Y\";\n\t } else {\n\t $calc_price = $v['per_day_price'] * $number;\n\t $price = $calc_price . \"-per_day\";\n\t }\n\t\t \n\t\t }else {\n\t\t $price = 0;\n\t\t }\n\t\t } else {\n\t\t unset( $results_price[ $k ] );\n\t\t }\n\t\t }\n\t\t \n\t\t } else { \n\t\t \n\t\t /* You will come here when number of days selected for booking do not have any matching range in data\n\t\t * then see the last matching range based on nearest max day in other range.\n\t\t */\n\t\t \n\t\t // Finding the ranges which have max days lower than selected number of days for booking.\n\t\t foreach( $price_range_data as $price_range_data_key => $price_range_data_value ){\n\t\t \n\t\t $i = 0;\n\t\t $a_v_p_count = count( $attribute_variation_pair );\n\t\t \n\t\t foreach( $attribute_variation_pair as $a_v_p_key => $a_v_p_value ){\n\t\t if( array_key_exists( $a_v_p_key, $price_range_data_value ) && $price_range_data_value[ $a_v_p_key ] == stripslashes( $a_v_p_value ) ) {\n\t\t \n\t\t $i++;\n\t\t }\n\t\t }\n\t\t \n\t\t if( $i == $a_v_p_count && $price_range_data_value['min_number'] <= $number ){\n\t\t \n\t\t $results_price[$e] = $price_range_data_value;\n\t\t }\n\t\t $e++;\n\t\t }\n\t\t \n\t\t // In $results_price array all the ranges will be added which \n\t\t // have lower max days compare to selected days for booking.\n\t\t \n\t\t /* \n\t\t * Sorting the array so the price of the range will be calculated correctly.\n\t\t * Issue was occurring when range of days not added sequencially\n\t\t */\n\t\t \n\t\t foreach ( $results_price as $kk => $val ) {\n\t\t $ab[ $kk ] = $val['max_number'];\n\t\t }\n\t\t \n\t\t asort( $ab );\n\t\t $ordered = array();\n\t\t \n\t\t foreach ( $ab as $key => $value ) {\n\t\t if ( array_key_exists( $key, $results_price ) ) {\n\t\t $ordered[ $key ] = $results_price[ $key ];\n\t\t unset( $results_price[ $key ] );\n\t\t }\n\t\t }\n\t\t \n\t\t $results_price = $ordered; // Here we are gettting sorted array for $result_price\n\t\t \t\t\t \n\t\t // Looping throught the ranges and calculating the price.\n\t\t foreach ( $results_price as $k => $v ) {\n\t\t \t\n\t\t if ( !empty( $results_price[ $k ] ) ) {\n\t\t \n\t\t $_POST['variable_blocks'] = \"Y\";\n\t\t \n\t\t if ( $variation_id != '' ) {\n\t\t $price = get_post_meta( $variation_id, '_sale_price', true );\n\t\t \t\n\t\t if ( !isset( $price ) || $price == '' || $price == 0 ){\n\t\t $price = get_post_meta( $variation_id, '_regular_price', true );\n\t\t }\n\t\t \t\n\t\t $diff_days = '';\n\t\t \t\n\t\t if ( $v['max_number'] < $number ){\n\t\t $diff_days = $number - $v['max_number'];\n\t\t \n\t\t if ( $v['fixed_price'] != 0 ){\n\t\t $_POST['fixed_price'] = \"Y\";\n\t\t $calc_price = $v['fixed_price'] + ( $price * $diff_days );\n\t\t $price = $calc_price . \"-fixed\";\n\t\t } else {\n\t\t $calc_price = ($v['per_day_price'] * $v['max_number']) + ($price * $diff_days);\n\t\t $price = $calc_price . \"-per_day\";\n\t\t }\n\t\t \n\t\t } else {\n\t\t \n\t\t if ( $v['fixed_price'] != 0 ) {\n\t\t $_POST['fixed_price'] = \"Y\";\n\t\t $calc_price = $v['fixed_price'];\n\t\t $price = $calc_price . \"-fixed\";\n\t\t } else {\n\t\t $calc_price = $v['per_day_price'] * $number;\n\t\t $price = $calc_price . \"-per_day\";\n\t\t }\n\t\t }\n\t\t }\n\t\t else {\n\t\t $price = 0;\n\t\t }\n\t\t } else {\n\t\t unset( $results_price[ $k ] );\n\t\t }\n\t\t }\n\t\t \n\t\t // If no result found then simply set price as variation price.\n\t if ( count( $results_price ) == 0 ) {\n\t\t\t\t\t\t\t$price = 0;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ( $variation_id != '' ) {\n\t\t\t\t\t\t\t\t$price = get_post_meta( $variation_id, '_sale_price', true );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif ( !isset( $price ) || $price == '' || $price == 0) {\n\t\t\t\t\t\t\t\t\t$price = get_post_meta( $variation_id, '_regular_price', true );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$price .= \"-\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t } else { // price by range is not enable and no record in the price by range data.\n\t\t\t\t\tif ( $variation_id != '' ) {\n\t\t\t\t\t\t$price = get_post_meta( $variation_id, '_sale_price', true );\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( !isset( $price ) || $price == '' || $price == 0 ){\n\t\t\t\t\t\t\t$price = get_post_meta( $variation_id, '_regular_price', true );\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$price .= \"-\";\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$price = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Code for variable product ends here\n\t\t } else {\n\t\t \n\t\t if( $price_range == \"booking_block_price_enable\" ){\n\t\t // Price by range is active.\n\t\t \n\t\t $results_price = array();\n\t\t \n\t\t foreach( $price_range_data as $price_range_data_key => $price_range_data_value ){\n\t\t \n\t\t if( $price_range_data_value['min_number'] <= $number && $price_range_data_value['max_number'] >= $number ){\n\t\t $results_price[$price_range_data_key] = $price_range_data[$price_range_data_key];\n\t\t }\n\t\t }\n\t \n\t if ( count( $results_price ) == 0 ) {\n\t // if no records found in $result price array then \n\t \n\t foreach( $price_range_data as $price_range_data_key => $price_range_data_value ){\n\t \n\t if( $price_range_data_value['min_number'] <= $number ){\n\t $results_price[$price_range_data_key] = $price_range_data[$price_range_data_key];\n\t }\n\t }\n\t \n\t if ( count( $results_price ) == 0 ) {\n\t $price = $_product->get_price();\n\t\t\t\t\t $price .= \"-\";\n\t\t\t\t\t \n\t }else{\n\t \n\t // select max value from the range \n\t $max_results_block = array();\n\t foreach( $price_range_data as $price_range_data_key => $price_range_data_value ){\n\t if( $price_range_data_value['min_number'] <= $number ){\n\t array_push( $max_results_block , $price_range_data_value['max_number'] );\n\t }\n\t }\n\t \n\t $results_block['maximum_number_of_days'] = max( $max_results_block ); // Max day in all the range.\n\t \n\t $results_price = array();\n\t \n\t\t\t\t\t\t\tforeach( $price_range_data as $price_range_data_key => $price_range_data_value ){\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t if( $price_range_data_value['min_number'] <= $number && $price_range_data_value['max_number'] == $results_block['maximum_number_of_days'] ){\n\t\t\t $results_price[$price_range_data_key] = $price_range_data[$price_range_data_key];\n\t\t\t }\n\t\t\t\t\t\t\t}\n\t \n\t foreach( $results_price as $k => $v ) {\n\t \n\t if ( !empty( $results_price[ $k ] ) ) {\n\t \n\t $_POST['variable_blocks'] = \"Y\";\n\t $price = $_product->get_price();\n\t \n\t if ( $results_block['maximum_number_of_days'] < $number ) {\n\t $diff_days = $number - $results_block['maximum_number_of_days'];\n\t \n\t if ( $v['fixed_price'] != 0 ) {\n\t $_POST['fixed_price'] = \"Y\";\n\t $calc_price = $v['fixed_price'] + ( $price * $diff_days );\n\t $price = $calc_price . \"-fixed\";\n\t } else {\n\t $calc_price = ( $v['per_day_price'] * $results_block['maximum_number_of_days'] ) + ( $price * $diff_days );\n\t $price = $calc_price . \"-per_day\";\n\t }\n\t }\n\t }else {\n\t unset( $results_price[ $k ] );\n\t }\n\t }\n\t }\n\t }else{\n\t \n\t foreach ( $results_price as $k => $v ) {\n\t \n\t if( !empty( $results_price[ $k ] ) ) {\n\t \n\t $_POST['variable_blocks'] = \"Y\";\n\t \t\n\t if ( $v['fixed_price'] != 0 ) {\n\t \n\t $_POST['fixed_price'] = \"Y\";\n\t $price = $v['fixed_price'];\n\t $price .= \"-fixed\";\n\t $price .= \"-\";\n\t } else {\n\n\t \t$decimal_separator = wc_get_price_decimal_separator();\n\t\t\t\t\t\t\t\t\t$thousand_separator = wc_get_price_thousand_separator();\n\n\t\t\t\t\t\t\t\t\tif ( '' != $thousand_separator ) {\n\t \t\n\t\t\t\t\t\t\t\t\t\t$price_with_thousand_separator_removed = str_replace( $thousand_separator, '', $v['per_day_price'] );\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t$price_with_thousand_separator_removed = $v['per_day_price'];\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif ( '.' != $decimal_separator ) {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t$v['per_day_price'] = str_replace ( $decimal_separator, '.', $price_with_thousand_separator_removed ) ;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t \n\t $price = $v['per_day_price'] * $number;\n\t $price = number_format ( $price, wc_get_price_decimals(), $decimal_separator, $thousand_separator );\n\t $price .= \"-per_day\";\n\t $price .= \"-\";\n\t }\n\t } else {\n\t unset( $results_price[ $k ] );\n\t }\n\t }\n\t }\n\t\t \n\t\t \n\t\t }else {\n\t\t // Price by range is not active.\n\t\t\t\t\t$price = $_product->get_price();\n\t\t\t\t\t$price .= \"-\";\n\t\t\t\t\t\n\t\t\t\t}\n\t\t }\n\t\t \n\t\t return $price;\n\t\t}", "title": "" }, { "docid": "cdf12a256d16162c6ec6a6a9d16158d6", "score": "0.5644412", "text": "function osc_search_price_max() {\n return View::newInstance()->_get('search_price_max');\n }", "title": "" }, { "docid": "762320cc853f0c92db9d85809beac42c", "score": "0.56164557", "text": "public function getPrice(): float;", "title": "" }, { "docid": "42d4ec14d1b5219278c0a9fffa58ef17", "score": "0.5611822", "text": "public function setPricing() {\n\t\treturn $productPriceArr = array(\n\t\t\t'A' => array('1'=>2.00, '4'=>7.00), \n\t\t\t'B' => array('1'=>12.00), \n\t\t\t'C' => array('1'=>1.25, '6'=>6.00), \n\t\t\t'D' => array('1'=>0.15)\n\t\t);\n\t}", "title": "" }, { "docid": "f23f7be44ccb98c76625d7846b751fbb", "score": "0.559861", "text": "public function getProductPriceBundle($_product, $currentstore){\n\t\t$_priceModel = $_product->getPriceModel();\n\t\tlist($_minimalPriceTax, $_maximalPriceTax) = $_priceModel->getTotalPrices($_product, null, null, false);\n\t\tlist($_minimalPriceInclTax, $_maximalPriceInclTax) = $_priceModel->getTotalPrices($_product, null, true, false);\n\t\treturn $_minimalPriceInclTax;\n\t}", "title": "" }, { "docid": "60ed758504ff87d3259fb1c6aeacf77d", "score": "0.55816793", "text": "function attributes_price($products_id) {\n// global variable (session) $sppc_customer_group_id -> class variable cg_id\n $this->cg_id = $this->get_customer_group_id();\n\n if (isset($this->contents[$products_id]['attributes'])) {\n reset($this->contents[$products_id]['attributes']);\n $where = \" AND ((\";\n while (list($option, $value) = each($this->contents[$products_id]['attributes'])) {\n $where .= \"options_id = '\" . (int)$option . \"' AND options_values_id = '\" . (int)$value . \"') OR (\";\n }\n $where=substr($where, 0, -5) . ')';\n \n $attribute_price_query = tep_db_query(\"SELECT products_attributes_id, options_values_price, price_prefix FROM \" . TABLE_PRODUCTS_ATTRIBUTES . \" WHERE products_id = '\" . (int)$products_id . \"'\" . $where .\"\");\n \t\t\t \n if (tep_db_num_rows($attribute_price_query)) {\n\t $list_of_prdcts_attributes_id = '';\n\t while ($attributes_price_array = tep_db_fetch_array($attribute_price_query)) { \n\t\t $attribute_price[] = $attributes_price_array;\n\t\t $list_of_prdcts_attributes_id .= $attributes_price_array['products_attributes_id'].\",\";\n }\n\n\t if (tep_not_null($list_of_prdcts_attributes_id) && $this->cg_id != '0') { \n $select_list_of_prdcts_attributes_ids = \"(\" . substr($list_of_prdcts_attributes_id, 0 , -1) . \")\";\n\t $pag_query = tep_db_query(\"select products_attributes_id, options_values_price, price_prefix from \" . TABLE_PRODUCTS_ATTRIBUTES_GROUPS . \" where products_attributes_id IN \" . $select_list_of_prdcts_attributes_ids . \" AND customers_group_id = '\" . $this->cg_id . \"'\");\n\t while ($pag_array = tep_db_fetch_array($pag_query)) {\n\t\t $cg_attr_prices[] = $pag_array;\n }\n\n\t // substitute options_values_price and prefix for those for the customer group (if available)\n\t if ($customer_group_id != '0' && tep_not_null($cg_attr_prices)) {\n\t for ($n = 0 ; $n < count($attribute_price); $n++) {\n\t\t for ($i = 0; $i < count($cg_attr_prices) ; $i++) {\n\t\t\t if ($cg_attr_prices[$i]['products_attributes_id'] == $attribute_price[$n]['products_attributes_id']) {\n\t\t\t\t$attribute_price[$n]['price_prefix'] = $cg_attr_prices[$i]['price_prefix'];\n\t\t\t\t$attribute_price[$n]['options_values_price'] = $cg_attr_prices[$i]['options_values_price'];\n }\n\t\t } // end for ($i = 0; $i < count($cg_att_prices) ; $i++)\n }\n } // end if ($customer_group_id != '0' && (tep_not_null($cg_attr_prices))\n } // end if (tep_not_null($list_of_prdcts_attributes_id) && $customer_group_id != '0')\n// now loop through array $attribute_price to add up/substract attribute prices\n\n for ($n = 0 ; $n < count($attribute_price); $n++) {\n if ($attribute_price[$n]['price_prefix'] == '+') {\n $attributes_price += $attribute_price[$n]['options_values_price'];\n } else {\n $attributes_price -= $attribute_price[$n]['options_values_price'];\n }\n } // end for ($n = 0 ; $n < count($attribute_price); $n++)\n return $attributes_price;\n } else { // end if (tep_db_num_rows($attribute_price_query))\n return 0;\n }\n } else { // end if (isset($this->contents[$products_id]['attributes']))\n return 0;\n }\n }", "title": "" }, { "docid": "04dcfc227cae62576e642aea8988c476", "score": "0.5578683", "text": "public static function getMinMax($id, $key = 'products_quantity') {\n global $lC_Database;\n\n $Qproducts = $lC_Database->query('select MAX(' . $key . ') as high, MIN(' . $key . ') as low from :table_products where parent_id = :parent_id and is_subproduct > :is_subproduct');\n $Qproducts->bindTable(':table_products', TABLE_PRODUCTS);\n $Qproducts->bindInt(':parent_id', $id);\n $Qproducts->bindInt(':is_subproduct', 0);\n $Qproducts->execute();\n \n $result = $Qproducts->toArray();\n \n $Qproducts->freeResult();\n \n return $result;\n }", "title": "" }, { "docid": "b9f40e105c2135392298e423296f8eb4", "score": "0.55736256", "text": "protected function initFilterWithPrice()\n {\n $sFilter = Input::get('price');\n if (empty($sFilter)) {\n return;\n }\n $arFilterValue = explode('|', $sFilter);\n $this->minFilterPrice = min($arFilterValue);\n $this->maxFilterPrice = max($arFilterValue);\n if (empty($this->minFilterPrice)) {\n $this->minFilterPrice = 0;\n }\n }", "title": "" }, { "docid": "20ea1d0e881e5f3797ce3baf4ff52287", "score": "0.5568922", "text": "public function getLimitPrice(\n array $products,\n MappingCollection $attributeMapping,\n array $priceChanges = [],\n $lowest = true\n ) {\n $limitPrice = $this->getProductPrice($products[0], $attributeMapping, $priceChanges, $lowest);\n\n foreach ($products as $product) {\n $productPrice = $this->getProductPrice($product, $attributeMapping, $priceChanges, $lowest);\n\n if ($lowest) {\n $limitPrice = ($productPrice < $limitPrice) ? $productPrice : $limitPrice;\n } else {\n $limitPrice = ($productPrice > $limitPrice) ? $productPrice : $limitPrice;\n }\n }\n\n return $limitPrice;\n }", "title": "" }, { "docid": "acdf7eb0563c7eef70329f787c00c3e2", "score": "0.5562002", "text": "function wbupro_product_min_value($product) {\n if ( wbupro_minicart_sync_enabled() ) {\n return 0;\n }\n \n // woocommerce default code\n return apply_filters( 'woocommerce_quantity_input_min', $product->get_min_purchase_quantity(), $product );\n}", "title": "" }, { "docid": "802b6d6eedc373733928d703a8836d19", "score": "0.5547057", "text": "public function defaultPrice()\n {\n return (float)$this->get('mtPrice');\n }", "title": "" }, { "docid": "f07135f24547a3993ae5842a0bac4677", "score": "0.55469733", "text": "public function createPriceRange($price)\n {\n// $priceRange = StatisticOfPriceRanges::max('max_price');\n// $next = 0;\n //============feature price with min and max range===========\n //====== 800 to max 1000 300 to max 400================\n $increasing = str_pad(1, strlen($price), '0', STR_PAD_RIGHT);\n $nextStep = str_pad(1, strlen($price) + 1, '0', STR_PAD_RIGHT);\n\n //======== $price from 100,200,300,400 the increasing is 100 ==============\n if (($price * 2) < $nextStep):\n $nextMax = $price + $increasing;\n $nextMin = $price;\n $increasing = $increasing; else:\n //======== $price from 500,600,700,800,900 the increasing is 1000 ==============\n $nextMax = $nextStep;\n $nextMin = $nextStep / 2;\n $increasing = $nextStep;\n endif;\n\n $priceRange = new StatisticOfPriceRanges();\n// ============ 500-1000 , 1000-200 ===============\n $priceRange->max_price = $nextMax;\n $priceRange->min_price = $nextMin;\n $priceRange->increasing_number = $increasing;\n $priceRange->save();\n\n return $priceRange;\n }", "title": "" }, { "docid": "d8ec117bbbe6e817f409aeaaac30d4a1", "score": "0.5546397", "text": "function getMinPrice($idGame){\n\n\t\treturn 21;\n\t}", "title": "" }, { "docid": "44929861a39e4426dc1ea7cb5e336587", "score": "0.5545829", "text": "public function price()\n\t{\n\t\tif($db = $this->module->db())\n\t\t{\n\t\t\tif($result = $db->query(\"SELECT\n\t\t\t\ti_price\n\t\t\t\tFROM\n\t\t\t\t\".$db->getPrefix().\"products\n\t\t\t\tWHERE\n\t\t\t\tid=\".$this->id.\";\"))\n\t\t\t{\n\t\t\t\twhile( $line = mysql_fetch_array($result) )\n\t\t\t\t{\n\t\t\t\t\treturn $line[0];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "title": "" }, { "docid": "b7ca163da8a9f4fcdf63c22f726b655e", "score": "0.55439025", "text": "public function initialListPrice()\n {\n return $this->listPrice();\n }", "title": "" }, { "docid": "2b7e83d2813d60a81898460b3a4b453d", "score": "0.5537791", "text": "private function getPriceRange() {\n\t\t$rentData = $this->processRentFilterFormData();\n\t\t$priceRange = ($rentData != '')\n\t\t\t? $rentData\n\t\t\t: $this->filterFormData['priceRange'];\n\n\t\treturn $this->getFormattedPriceRange($priceRange);\n\t}", "title": "" }, { "docid": "a66e2e2d6848c6448f144af1595f3c15", "score": "0.5528796", "text": "public function wherePrice($min, $max)\n {\n $this->priceMin = floatval($min);\n\n $this->priceMax = floatval($max);\n\n return $this;\n }", "title": "" }, { "docid": "7ec3ba71fe81bc2b12d86ce737de147c", "score": "0.55249566", "text": "public function dearest_products()\n\t{\n\t\tif ( ! $this->loaded())\n\t\t\treturn $this->products;\n\n\t\t$maxprice = $this->products\n\t\t\t->select(array(DB::expr('MAX(price)'), 'maxprice'))\n\t\t\t->find()\n\t\t\t->maxprice;\n\n\t\treturn $this->products\n\t\t\t->where('price', '=', $maxprice);\n\t}", "title": "" }, { "docid": "0c5f2fc63146921fe551425ef5e961de", "score": "0.5520551", "text": "public function getPriceHtml($product, $displayMinimalPrice = false, $idSuffix='')\n {\n \t$id = $product->Field['id'];\n\t\tif(key_exists('magento_id',$product->Field))\n\t\t\t$id = $product->Field['magento_id'];\n\t\t\t\n\t\t$realProduct = Mage::getModel('catalog/product')->load($id);\n\t\t\n\n\t\tif($realProduct)\n\t\t{\n\t\t\n\t\t$realProduct=\n\t Mage::getModel(\"catalog/product\")->getCollection()\n ->addAttributeToSelect(Mage::getSingleton(\"catalog/config\")->getProductAttributes())\n ->addAttributeToFilter(\"entity_id\", $realProduct->getId())\n ->setPage(1, 1)\n ->addMinimalPrice()\n ->addFinalPrice()\n ->addTaxPercents()\n ->load()\n ->getFirstItem();\n\n\t\t\treturn parent::getPriceHtml($realProduct, $displayMinimalPrice, $idSuffix);\n\t\t}\n\t\telse return $product->Field['price'];\n }", "title": "" } ]
60d567fbfd6b633a0fba0f69e652f8b8
$this>setOutputType($type) $type = 'vertical', otherwise horizontal setColumns()
[ { "docid": "7ddabe1089d75eb5775868bced30cc8b", "score": "0.0", "text": "public function getMetaData($model)\n {\n $ret = parent::getMetaData($model);\n unset($ret['store']);\n unset($ret['editable']);\n unset($ret['triggerAction']);\n if (isset($ret['outputType']) && $ret['outputType'] == 'vertical') {\n unset($ret['outputType']);\n if (!$this->getColumns()) {\n //set the default value for columns to 1, otherwise the radio buttons would be displayed in a row\n $ret['columns'] = 1;\n }\n $ret['vertical'] = true;\n } else {\n $ret['vertical'] = false;\n }\n $store = $this->_getStoreData();\n if (!isset($store['data'])) {\n throw new Kwf_Exception(\"No data set for radio field '{$this->getName()}'\");\n }\n foreach ($store['data'] as $d) {\n $id = $d[0];\n $value = $d[1];\n $ret['items'][] = array(\n 'name' => $this->getFieldName(),\n 'boxLabel' => $value,\n 'inputValue' => $id\n );\n }\n return $ret;\n }", "title": "" } ]
[ { "docid": "d43d6455e20f1f060fbfe2d8af5957f6", "score": "0.5535326", "text": "function createVerticalTable()\n {\n if ($this->data)\n {\n $this->setStyle();\n $this->html=\"\\n<table style=\\\"\".$this->customization[\"table_style\"].\"\\\">\";\n if($this->title)\n $this->html.=\"<tr><td colspan=\\\"\".count($this->data[0]).\"\\\" class=\\\"link_head\\\">\".$this->title.\"</td></tr>\";\n $this->setDisplayColumnNorder();\n $i=0;\n $this->data=flipArrayKeys($this->data);\n foreach($this->customization[\"display_order\"] as $column)\n {\n if($this->highlight)\n $class=($i=!$i)?\"row1\":\"row2\";\n $this->html.=\"\\n\\t<tr class=\\\"$class\\\" style=\\\"\".$this->customization[\"tr_style\"].\"\\\">\";\n if($this->set_column_heading)\n\t\t\t\t\t{\n\t\t\t\t\t$this->customization[\"column_style\"][$column]=($this->customization[\"column_style\"][$column])?$this->customization[\"column_style\"][$column]:\"text-align:left\";\n $this->html.=\"\\n\\t\\t<td class=\\\"link_head1\\\" style=\\\"\".$this->customization[\"column_style\"][$column].\"\\\"><b>\".$this->customization[\"display_columns\"][$column].\"</b></td>\";\n\t\t\t\t\t}\n foreach($this->data[$column] as $key=>$value)\n {\n $this->customization[\"column_style\"][$column]=($this->customization[\"column_style\"][$column])?$this->customization[\"column_style\"][$column]:\"text-align:left\";\n $this->html.=\"\\n\\t\\t<td style=\\\"\".$this->customization[\"column_style\"][$column].\"\\\">\".$this->formatColumn($column,$value).\"</td>\";\n }\n $this->html.=\"\\n\\t</tr>\";\n }\n $this->html.=\"\\n</table>\\n\";\n unset($this->title);\n return $this->html;\n }\n }", "title": "" }, { "docid": "f0004a08a4781f06616d0ff8c1eaedfe", "score": "0.5454428", "text": "private function nColumnMode() {\n $label = new CLabel;\n $values = array();\n if (!empty($this->value)) {\n if (is_array($this->headers)) {\n foreach ($this->headers as $key => $field) {\n $row = '';\n if (is_string($key)) {\n if (is_array($field)) {\n if (isset($field['label'])) $row.= '<b>' . $field['label'] . '</b>';\n else $row.= '<b>' . $label->getLabel($key) . '</b>';\n $row.= ': ';\n $data = $this->value->$key;\n if (isset($field['format'])) {\n if (is_array($field['format'])) {\n foreach ($field['format'] as $format) $data = $this->setDisplay($data, $format);\n } else $data = $this->setDisplay($data, $field['format']);\n }\n $row.= $data;\n }\n //$field is label\n else {\n $row.= '<b>' . $field . '</b>';\n $row.= ': ';\n $row.= $this->value->$key;\n }\n } else {\n $row.= '<b>' . $label->getLabel($field) . '</b>';\n $row.= ': ';\n $row.= $this->value->$field;\n }\n $values[] = $row;\n }\n }\n }\n if (is_array($this->additional)) {\n foreach ($this->additional as $label => $value) {\n $temp = '<b>' . $label . '</b>:';\n $temp.= $value;\n $values[] = $temp;\n }\n }\n if (!empty($values)) {\n $table = '';\n $maxTr = count($values);\n $maxTr = $maxTr / $this->numberOfColumns;\n $maxTr = ceil($maxTr);\n for ($i = 0;$i < $maxTr;$i++) {\n $table.= '<tr>';\n for ($j = 0;$j < $this->numberOfColumns;$j++) {\n $table.= '<td>';\n $x = $i * $this->numberOfColumns + $j;\n if (isset($values[$x])) $table.= $values[$x];\n $table.= '</td>';\n }\n $table.= '</tr>';\n }\n }\n $table.= '</tr>';\n return $table;\n }", "title": "" }, { "docid": "f6ca728a8ca46bcb47999468c66f8bb8", "score": "0.5405281", "text": "function AppendColumn($varianttype){}", "title": "" }, { "docid": "7a2262a1a5f8b097890b4ed508d2a9d8", "score": "0.52987623", "text": "public function getXsiTypeName() {\n return \"Vertical\";\n }", "title": "" }, { "docid": "e9a050832e86e37a640730a4dc79e54f", "score": "0.52342486", "text": "public function renderTable($type) {\n if ($type === \"plants\") {\n return $this->renderTablePlants();\n } else {\n return $this->renderContentTable($type);\n }\n }", "title": "" }, { "docid": "3e9111fd79935098e93f4028b581a37e", "score": "0.5167087", "text": "public function &generateOutput()\t{\r\n\t\t\t$this->_output = '<table class=\"'.$this->_tableClass.'\">';\r\n\r\n\t\t\t//Loop through each field; if an appropriate presenter function is found, use it to print output.\r\n\t\t\tforeach($this->_fields as $field)\t{\r\n\t\t\t\tif(isset($field['type']) && method_exists($this, '_'.$field['type']))\t{\r\n\t\t\t\t\t$this->_output .= $this->{'_'.$field['type']}($field);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t$this->_output .= '</table>';\r\n\t\t\treturn $this;\r\n\t\t}", "title": "" }, { "docid": "ca65b183b328cddb6af5c1f3fd6cb88f", "score": "0.51608104", "text": "private function _appendToOutput($value, $type=PHPExcel_Cell_DataType::TYPE_STRING){\n\t\t$column = $this->_column++;\n\t\t$this->_worksheet->setCellValueExplicitByColumnAndRow($column, $this->_row, $value, $type);\n\t\treturn $this->_worksheet->getStyleByColumnAndRow($column, $this->_row);\n\t}", "title": "" }, { "docid": "3fa6c5372f2ce403f39929f560390f5e", "score": "0.51553315", "text": "function setType($type) {\n switch ($type) {\n case 'barx':\n case 'bhg':\n $type = 'bhg';\n break; //horizontal bars\n case 'bary':\n case 'bvg':\n $type = 'bvg';\n break; //vertical bars\n case 'pie':\n case 'p':\n $type = 'p';\n break; //pie chart\n case 'pie3d':\n case 'p3':\n $type = 'p3';\n break; //3d pie chart\n case 'line':\n case 'lc': //line graph\n default:\n $type = 'lc';\n }\n $this->type = $type;\n }", "title": "" }, { "docid": "8089b68b610567068b775580c7ae530b", "score": "0.5146183", "text": "public function outputType();", "title": "" }, { "docid": "05ee02e16c3a076d8b82b99ae89e8928", "score": "0.5135453", "text": "public function setExportType($type)\n\t{\n\t\t$this->exportType = $type;\n\t}", "title": "" }, { "docid": "f1df85dd5bfd617f93e7935713a6ca8d", "score": "0.51033604", "text": "public static function vertical()\n {\n return self::VERTICAL;\n }", "title": "" }, { "docid": "6fa6149487c2cd5df6cb4c7b5493e5b4", "score": "0.5101315", "text": "function writeRow($NumEmployees, $SUM, $columnType)\n\t{\n\t\t$open = \"\\t\\t<\" . $columnType . '>';\n\t\t$close = \"</\" . $columnType . \">\\n\";\n\t\t\n\t\techo \"\\t<tr>\\n\";\n\t\techo $open . $NumEmployees . $close;\n\t\techo $open . $SUM . $close;\n\t\techo \"\\t</tr>\\n\";\n\t}", "title": "" }, { "docid": "174e133020dbebac4d4649fc14c2cb13", "score": "0.50656927", "text": "function setViewType($value)\n {\n switch (strtolower($value)) {\n case \"sidebyside\":\n $this->_settings->setParameter(\"view_type\", \"SideBySide\");\n break;\n\n case \"inline\":\n default:\n $this->_settings->setParameter(\"view_type\", \"Inline\");\n }\n }", "title": "" }, { "docid": "fe202a6c9f4c3f5990167d5e4ca120af", "score": "0.5062707", "text": "public function getColumn();", "title": "" }, { "docid": "cce5b64967d9f51938c26630950f203c", "score": "0.5047015", "text": "function AppendCols($numCols=1){}", "title": "" }, { "docid": "66323fbdc946f54ac5382d3ff4a6c9ee", "score": "0.50373673", "text": "protected function _prepareColumns() {\r\n\r\n $this->addColumn(\"id\", array(\r\n \"header\" => Mage::helper(\"mprmasystem\")->__(\"Id\"),\r\n \"align\" => \"center\",\r\n \"width\" => \"200px\",\r\n \"index\" => \"id\"\r\n ));\r\n\r\n $this->addColumn(\"reason\", array(\r\n \"header\" => Mage::helper(\"mprmasystem\")->__(\"Reason\"),\r\n \"align\" => \"left\",\r\n \"index\" => \"reason\"\r\n ));\r\n\r\n $this->addColumn(\"status\", array(\r\n \"header\" => Mage::helper(\"mprmasystem\")->__(\"Status\"),\r\n \"align\" => \"center\",\r\n \"type\" => \"options\",\r\n \"align\" => \"center\",\r\n \"width\" => \"200px\",\r\n \"index\" => \"status\",\r\n \"options\" => array(\"0\" => Mage::helper(\"mprmasystem\")->__(\"Disabled\"), \"1\" => Mage::helper(\"mprmasystem\")->__(\"Enabled\"))\r\n ));\r\n\r\n $this->addExportType(\"*/*/exportCsvreason\", Mage::helper(\"mprmasystem\")->__(\"CSV\"));\r\n $this->addExportType(\"*/*/exportXmlreason\", Mage::helper(\"mprmasystem\")->__(\"XML\"));\r\n return parent::_prepareColumns();\r\n }", "title": "" }, { "docid": "98aaee4cb6e83dec59788fe014d9fe77", "score": "0.50214535", "text": "private function get_column_class( $type ) {\n\t\t\t$cls = '';\n\t\t\tswitch ( $type ) {\n\t\t\t\tcase '1-1':\n\t\t\t\t\t$cls = 'col-md-12';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase '1-2':\n\t\t\t\t\t$cls = 'col-md-6';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase '1-3':\n\t\t\t\t\t$cls = 'col-md-4';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase '1-4':\n\t\t\t\t\t$cls = 'col-md-3';\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\t$cls = apply_filters( 'pt_pb_get_column_class', $cls, $type );\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\treturn $cls;\n\t\t}", "title": "" }, { "docid": "e4358b327ddb670085677f2c8755db24", "score": "0.50178254", "text": "public function render()\n {\n \n $columnCount = count($this->columns);\n $columnLength = $this->length / $columnCount;\n\n //computing dimensions\n if(($columnLength - floor($columnLength)) > 0)\n {\n $lastColumn = $columnLength;\n $columnLength = ceil($columnLength);\n }\n else\n {\n $lastColumn = $columnLength;\n }\n\n //print the header\n print str_repeat(\"-\", $this->length) . PHP_EOL;\n print \"|\";\n for($i = 0; $i < $columnCount; $i++)\n {\n print \" \";\n print $this->columns[$i];\n $currentLength = ($i < ($columnCount-1)) ? $columnLength : $lastColumn - 1;\n print str_repeat(\" \", $currentLength - 2 - strlen($this->columns[$i]));\n print \"|\";\n }\n print PHP_EOL;\n print str_repeat(\"=\", $this->length) . PHP_EOL;\n //print the body\n foreach ($this->rows as $row) {\n print \"|\";\n for($i = 0; $i < $columnCount; $i++)\n {\n print \" \";\n print $row[$i];\n $currentLength = ($i < ($columnCount-1)) ? $columnLength : $lastColumn - 1;\n print str_repeat(\" \", $currentLength - 2 - strlen((string)$row[$i]));\n print \"|\";\n }\n print PHP_EOL;\n print str_repeat(\"-\", $this->length) . PHP_EOL;\n }\n\n }", "title": "" }, { "docid": "d02aa0bb814a6d52c0c1a60faedd4b2e", "score": "0.5013036", "text": "function WriteTable($tcolums)\n {\n for ($i = 0; $i < sizeof($tcolums); $i++)\n {\n $current_col = $tcolums[$i];\n $height = 0;\n \n // get max height of current col\n $nb=0;\n for($b = 0; $b < sizeof($current_col); $b++)\n {\n // set style\n $this->SetFont($current_col[$b]['font_name'], $current_col[$b]['font_style'], $current_col[$b]['font_size']);\n $color = explode(\",\", $current_col[$b]['fillcolor']);\n $this->SetFillColor($color[0], $color[1], $color[2]);\n $color = explode(\",\", $current_col[$b]['textcolor']);\n $this->SetTextColor($color[0], $color[1], $color[2]); \n $color = explode(\",\", $current_col[$b]['drawcolor']); \n $this->SetDrawColor($color[0], $color[1], $color[2]);\n $this->SetLineWidth($current_col[$b]['linewidth']);\n \n $nb = max($nb, $this->NbLines($current_col[$b]['width'], $current_col[$b]['text'])); \n $height = $current_col[$b]['height'];\n } \n $h=$height*$nb;\n \n \n // Issue a page break first if needed\n $this->CheckPageBreak($h);\n \n // Draw the cells of the row\n for($b = 0; $b < sizeof($current_col); $b++)\n {\n $w = $current_col[$b]['width'];\n $a = $current_col[$b]['align'];\n \n // Save the current position\n $x=$this->GetX();\n $y=$this->GetY();\n \n // set style\n $this->SetFont($current_col[$b]['font_name'], $current_col[$b]['font_style'], $current_col[$b]['font_size']);\n $color = explode(\",\", $current_col[$b]['fillcolor']);\n $this->SetFillColor($color[0], $color[1], $color[2]);\n $color = explode(\",\", $current_col[$b]['textcolor']);\n $this->SetTextColor($color[0], $color[1], $color[2]); \n $color = explode(\",\", $current_col[$b]['drawcolor']); \n $this->SetDrawColor($color[0], $color[1], $color[2]);\n $this->SetLineWidth($current_col[$b]['linewidth']);\n \n $color = explode(\",\", $current_col[$b]['fillcolor']); \n $this->SetDrawColor($color[0], $color[1], $color[2]);\n \n \n // Draw Cell Background\n $this->Rect($x, $y, $w, $h, 'FD');\n \n $color = explode(\",\", $current_col[$b]['drawcolor']); \n $this->SetDrawColor($color[0], $color[1], $color[2]);\n \n // Draw Cell Border\n if (substr_count($current_col[$b]['linearea'], \"T\") > 0)\n {\n $this->Line($x, $y, $x+$w, $y);\n } \n \n if (substr_count($current_col[$b]['linearea'], \"B\") > 0)\n {\n $this->Line($x, $y+$h, $x+$w, $y+$h);\n } \n \n if (substr_count($current_col[$b]['linearea'], \"L\") > 0)\n {\n $this->Line($x, $y, $x, $y+$h);\n }\n \n if (substr_count($current_col[$b]['linearea'], \"R\") > 0)\n {\n $this->Line($x+$w, $y, $x+$w, $y+$h);\n }\n \n \n // Print the text\n $this->MultiCell($w, $current_col[$b]['height'], $current_col[$b]['text'], 0, $a, 0);\n \n // Put the position to the right of the cell\n $this->SetXY($x+$w, $y); \n }\n \n // Go to the next line\n $this->Ln($h); \n } \n }", "title": "" }, { "docid": "fbccefcbb94b456223c62cd2270707ae", "score": "0.5010777", "text": "function WriteTable($tcolums)\n {\n // go through all colums\n for ($i = 0; $i < sizeof($tcolums); $i++)\n {\n $current_col = $tcolums[$i];\n $height = 0;\n\n // get max height of current col\n $nb=0;\n for($b = 0; $b < sizeof($current_col); $b++)\n {\n // set style\n $this->SetFont($current_col[$b]['font_name'], $current_col[$b]['font_style'], $current_col[$b]['font_size']);\n $color = explode(\",\", $current_col[$b]['fillcolor']);\n $this->SetFillColor($color[0], $color[1], $color[2]);\n $color = explode(\",\", $current_col[$b]['textcolor']);\n $this->SetTextColor($color[0], $color[1], $color[2]);\n $color = explode(\",\", $current_col[$b]['drawcolor']);\n $this->SetDrawColor($color[0], $color[1], $color[2]);\n $this->SetLineWidth($current_col[$b]['linewidth']);\n\n $nb = max($nb, $this->NbLines($current_col[$b]['width'], $current_col[$b]['text']));\n $height = $current_col[$b]['height'];\n }\n $h=$height*$nb;\n\n\n // Issue a page break first if needed\n $this->CheckPageBreak($h);\n\n // Draw the cells of the row\n for($b = 0; $b < sizeof($current_col); $b++)\n {\n $w = $current_col[$b]['width'];\n $a = $current_col[$b]['align'];\n\n // Save the current position\n $x=$this->GetX();\n $y=$this->GetY();\n\n // set style\n $this->SetFont($current_col[$b]['font_name'], $current_col[$b]['font_style'], $current_col[$b]['font_size']);\n $color = explode(\",\", $current_col[$b]['fillcolor']);\n $this->SetFillColor($color[0], $color[1], $color[2]);\n $color = explode(\",\", $current_col[$b]['textcolor']);\n $this->SetTextColor($color[0], $color[1], $color[2]);\n $color = explode(\",\", $current_col[$b]['drawcolor']);\n $this->SetDrawColor($color[0], $color[1], $color[2]);\n $this->SetLineWidth($current_col[$b]['linewidth']);\n\n $color = explode(\",\", $current_col[$b]['fillcolor']);\n $this->SetDrawColor($color[0], $color[1], $color[2]);\n\n\n // Draw Cell Background\n $this->Rect($x, $y, $w, $h, 'FD');\n\n $color = explode(\",\", $current_col[$b]['drawcolor']);\n $this->SetDrawColor($color[0], $color[1], $color[2]);\n\n // Draw Cell Border\n if (substr_count($current_col[$b]['linearea'], \"T\") > 0)\n {\n $this->Line($x, $y, $x+$w, $y);\n }\n\n if (substr_count($current_col[$b]['linearea'], \"B\") > 0)\n {\n $this->Line($x, $y+$h, $x+$w, $y+$h);\n }\n\n if (substr_count($current_col[$b]['linearea'], \"L\") > 0)\n {\n $this->Line($x, $y, $x, $y+$h);\n }\n\n if (substr_count($current_col[$b]['linearea'], \"R\") > 0)\n {\n $this->Line($x+$w, $y, $x+$w, $y+$h);\n }\n\n\n // Print the text\n $this->MultiCell($w, $current_col[$b]['height'], $current_col[$b]['text'], 0, $a, 0);\n\n // Put the position to the right of the cell\n $this->SetXY($x+$w, $y);\n }\n\n // Go to the next line\n $this->Ln($h);\n }\n }", "title": "" }, { "docid": "aec9e99471b94191c9f6b4b28966efe4", "score": "0.5002901", "text": "public function printTable()\n {\n\n echo '|';\n foreach ($this->headers as $header) {\n echo ' ' . $header . (str_repeat(' ', $this->maxWidth-strlen($header))) . ' |';\n }\n\n echo PHP_EOL;\n\n echo '|';\n foreach ($this->headers as $header) {\n echo str_repeat('-', $this->maxWidth+2) . '|';\n }\n echo PHP_EOL;\n\n// echo str_repeat('-', (($this->maxWidth+3)*count($this->headers))+1) . PHP_EOL;\n\n foreach ($this->rows as $row) {\n echo '|';\n\n foreach ($row as $header) {\n echo ' ' . $header . (str_repeat(' ', $this->maxWidth-strlen($header))) . ' |';\n }\n\n echo PHP_EOL;\n// echo str_repeat('-', (($this->maxWidth+3)*count($this->headers))+1) . PHP_EOL;\n }\n }", "title": "" }, { "docid": "02bbd171e70e01f8eb375e6f6b98f274", "score": "0.500175", "text": "function configure_header_layout($column_array=\"\"){\n\t\n\t\t//font_size\n\t\tif(!empty($column_array['head']) && !empty($column_array['head']['font_size'])){\n\t\t\t$font_size = $column_array['head']['font_size'];\n\t\t} elseif(!empty($this->data_set_object->font_size)) {\n\t\t\t$font_size = $this->data_set_object->font_size;\t\n\t\t}\n else {\n $font_size = '';\n }\n\n\t\t//font_color\n\t\tif(!empty($column_array['head']) && !empty($column_array['head']['font_color'])){\n\t\t\t$font_color = $column_array['head']['font_color'];\n\t\t} elseif(!empty($this->data_set_object->header_text_color)){\t\n\t\t\t$font_color = $this->data_set_object->header_text_color;\t\n\t\t}\n else {\n $font_color = '';\n }\n\n\t\t//bg_color\n\t\tif(!empty($column_array['head']) && !empty($column_array['head']['bg_color'])){\n\t\t\t$bg_color = $column_array['head']['bg_color'];\n } elseif(!empty($this->data_set_object->header_back_color)){\n $bg_color = $this->data_set_object->header_back_color;\n\t\t} else {\t\n\t\t\t$bg_color ='';\n\t\t}\t\t\t\t\n\t\n\t\t//wrap\n\t\tif(!empty($column_array['head']) && !empty($column_array['head']['wrap'])){\n\t\t\t$wrap = $column_array['head']['wrap'];\n\t\t} else {\t\n\t\t\t$wrap = \"\";\t\n\t\t}\n\t\t\n\t\t//style\n\t\tif(!empty($column_array['head']) && !empty($column_array['head']['style'])){\n\t\t\t$style = $column_array['head']['style'];\n\t\t} else {\t\n\t\t\t$style = \"\";\t\n\t\t}\t\t\t\n\t\n\t\n\t/////OUTPUT CSS STYLE INFORMATION\t\n\t\n\t\t//configure font_size\t\t\t\t\t\n\t\tif(!empty($font_size)){\n\t\t\n\t\t\tif($font_size==\"Default\"){\n\t\t\t\t$field_font_size_amount = 12;\n\t\t\t} else {\n\t\t\t\t$field_font_size_amount = ($font_size) + 12;\n\t\t\t}\n\t\t\t\n\t\t\tif(!empty($inline_header_style)){\n\t\t\t\t$inline_header_style .= \"font-size: \".$field_font_size_amount.\"px; \";\n\t\t\t} else {\n\t\t\t\t$inline_header_style = \"style=\\\"font-size: \".$field_font_size_amount.\"px; \";\n\t\t\t}\t\t\t\n\t\t//end if empty font_size\n\t\t}\n\t\n\t\t//configure header_font_color\t\t\t\t\t\n\t\tif(!empty($font_color)){\n\t\t\t\n\t\t\tif(!empty($inline_header_style)){\n\t\t\t$inline_header_style .= \"color: \".$font_color.\"; \";\t\n\t\t\t} else {\t\n\t\t\t$inline_header_style = \"style=\\\"color: \".$font_color.\"; \";\n\t\t\t}\n\t\t//end if empty font_color\n\t\t}\n\t\n\t\t//configure header background\t\t\t\t\t\n\t\tif(!empty($bg_color)){\n\t\t\n\t\t\tif(!empty($inline_header_style)){\n\t\t\t\t$inline_header_style .= \"background-image: none; background-color: \".$bg_color.\"; \";\t\n\t\t\t} else {\t\n\t\t\t\t$inline_header_style = \"style=\\\"background-image: none; background-color: \".$bg_color.\"; \";\n\t\t\t}\n\t\t//end if empty bg_color\n\t\t}\t\n\t\n\t\n\t\t//configure header_style\n\t\tif(!empty($style) && $style!=\"Normal\"){\n\t\t\t$style_type = \"style\";\n\t\t\tif($style==\"bold\") $style_type = \"weight\";\n\t\t\t\n\t\t\tif(!empty($inline_header_style)){\n\t\t\t\t$inline_header_style .= \"font-\".$style_type.\": \".$style.\";\";\n\t\t\t} else {\n\t\t\t\t$inline_header_style = \"style=\\\"font-\".$style_type.\": \".$style.\";\";\n\t\t\t}\n\t\t//end if empty style\n\t\t}\t\n\t\t\n\t\t//configure header_wrap\n\t\tif(!empty($wrap)){\n\n\t\t\t$this->xTemplate->assign('WRAP', $wrap);\n\t\t//end if empty wrap\n\t\t}\t\t\n\t\n\t\t//add ending quote\t\n\t\tif(!empty($inline_header_style)){\n\t\t\t$inline_header_style .=\" \\\"\";\t\n\t\t\t$this->xTemplate->assign('INLINE_HEADER_STYLE', $inline_header_style);\n\t\t}\n\t\n\t//end function configure_header_layout\n\t}", "title": "" }, { "docid": "c1a58f5ce57fdcfa9ebea78c8108ce9f", "score": "0.4984163", "text": "function WriteTable($tcolums) {\n // go through all colums\n for ($i = 0; $i < sizeof($tcolums); $i++) {\n $current_col = $tcolums[$i];\n $height = 0;\n\n // get max height of current col\n $nb = 0;\n for ($b = 0; $b < sizeof($current_col); $b++) {\n // set style\n $this->SetFont($current_col[$b]['font_name'], $current_col[$b]['font_style'], $current_col[$b]['font_size']);\n $color = explode(\",\", $current_col[$b]['fillcolor']);\n $this->SetFillColor($color[0], $color[1], $color[2]);\n $color = explode(\",\", $current_col[$b]['textcolor']);\n $this->SetTextColor($color[0], $color[1], $color[2]);\n $color = explode(\",\", $current_col[$b]['drawcolor']);\n $this->SetDrawColor($color[0], $color[1], $color[2]);\n $this->SetLineWidth($current_col[$b]['linewidth']);\n\n $nb = max($nb, $this->NbLines($current_col[$b]['width'], $current_col[$b]['text']));\n $height = $current_col[$b]['height'];\n }\n $h = $height * $nb;\n\n\n // Issue a page break first if needed\n $this->CheckPageBreak($h);\n\n // Draw the cells of the row\n for ($b = 0; $b < sizeof($current_col); $b++) {\n $w = $current_col[$b]['width'];\n $a = $current_col[$b]['align'];\n\n // Save the current position\n $x = $this->GetX();\n $y = $this->GetY();\n\n // set style\n $this->SetFont($current_col[$b]['font_name'], $current_col[$b]['font_style'], $current_col[$b]['font_size']);\n $color = explode(\",\", $current_col[$b]['fillcolor']);\n $this->SetFillColor($color[0], $color[1], $color[2]);\n $color = explode(\",\", $current_col[$b]['textcolor']);\n $this->SetTextColor($color[0], $color[1], $color[2]);\n $color = explode(\",\", $current_col[$b]['drawcolor']);\n $this->SetDrawColor($color[0], $color[1], $color[2]);\n $this->SetLineWidth($current_col[$b]['linewidth']);\n\n $color = explode(\",\", $current_col[$b]['fillcolor']);\n $this->SetDrawColor($color[0], $color[1], $color[2]);\n\n\n // Draw Cell Background\n $this->Rect($x, $y, $w, $h, 'FD');\n\n $color = explode(\",\", $current_col[$b]['drawcolor']);\n $this->SetDrawColor($color[0], $color[1], $color[2]);\n\n // Draw Cell Border\n if (substr_count($current_col[$b]['linearea'], \"T\") > 0) {\n $this->Line($x, $y, $x + $w, $y);\n }\n\n if (substr_count($current_col[$b]['linearea'], \"B\") > 0) {\n $this->Line($x, $y + $h, $x + $w, $y + $h);\n }\n\n if (substr_count($current_col[$b]['linearea'], \"L\") > 0) {\n $this->Line($x, $y, $x, $y + $h);\n }\n\n if (substr_count($current_col[$b]['linearea'], \"R\") > 0) {\n $this->Line($x + $w, $y, $x + $w, $y + $h);\n }\n\n\n // Print the text\n $this->MultiCell($w, $current_col[$b]['height'], $current_col[$b]['text'], 0, $a, 0);\n\n // Put the position to the right of the cell\n $this->SetXY($x + $w, $y);\n }\n\n // Go to the next line\n $this->Ln($h);\n }\n }", "title": "" }, { "docid": "bc5025d0cf889904bc2b5fb0560deb1a", "score": "0.49799183", "text": "function WriteTables($tcolums)\r\n {\r\n for ($i = 0; $i < sizeof($tcolums); $i++)\r\n {\r\n $current_col = $tcolums[$i];\r\n $height = 0;\r\n \r\n // get max height of current col\r\n $nb=0;\r\n for($b = 0; $b < sizeof($current_col); $b++)\r\n {\r\n // set style\r\n $this->SetFont($current_col[$b]['font_name'], $current_col[$b]['font_style'], $current_col[$b]['font_size']);\r\n $color = explode(\",\", $current_col[$b]['fillcolor']);\r\n $this->SetFillColor($color[0], $color[1], $color[2]);\r\n $color = explode(\",\", $current_col[$b]['textcolor']);\r\n $this->SetTextColor($color[0], $color[1], $color[2]);\r\n $color = explode(\",\", $current_col[$b]['drawcolor']);\r\n $this->SetDrawColor($color[0], $color[1], $color[2]);\r\n $this->SetLineWidth($current_col[$b]['linewidth']);\r\n \r\n $nb = max($nb, $this->NbLines($current_col[$b]['width'], $current_col[$b]['text']));\r\n $height = $current_col[$b]['height'];\r\n }\r\n $h=$height*$nb;\r\n \r\n // Issue a page break first if needed\r\n $this->CheckPageBreak($h);\r\n \r\n // Draw the cells of the row\r\n for($b = 0; $b < sizeof($current_col); $b++)\r\n {\r\n $w = $current_col[$b]['width'];\r\n $a = $current_col[$b]['align'];\r\n \r\n // Save the current position\r\n $x=$this->GetX();\r\n $y=$this->GetY();\r\n \r\n // set style\r\n $this->SetFont($current_col[$b]['font_name'], $current_col[$b]['font_style'], $current_col[$b]['font_size']);\r\n $color = explode(\",\", $current_col[$b]['fillcolor']);\r\n $this->SetFillColor($color[0], $color[1], $color[2]);\r\n $color = explode(\",\", $current_col[$b]['textcolor']);\r\n $this->SetTextColor($color[0], $color[1], $color[2]);\r\n $color = explode(\",\", $current_col[$b]['drawcolor']);\r\n $this->SetDrawColor($color[0], $color[1], $color[2]);\r\n $this->SetLineWidth($current_col[$b]['linewidth']);\r\n \r\n $color = explode(\",\", $current_col[$b]['fillcolor']);\r\n $this->SetDrawColor($color[0], $color[1], $color[2]);\r\n \r\n \r\n // Draw Cell Background\r\n $this->Rect($x, $y, $w, $h, 'FD');\r\n \r\n $color = explode(\",\", $current_col[$b]['drawcolor']);\r\n $this->SetDrawColor($color[0], $color[1], $color[2]);\r\n \r\n // Draw Cell Border\r\n if (substr_count($current_col[$b]['linearea'], \"T\") > 0)\r\n {\r\n $this->Line($x, $y, $x+$w, $y);\r\n }\r\n \r\n if (substr_count($current_col[$b]['linearea'], \"B\") > 0)\r\n {\r\n $this->Line($x, $y+$h, $x+$w, $y+$h);\r\n }\r\n \r\n if (substr_count($current_col[$b]['linearea'], \"L\") > 0)\r\n {\r\n $this->Line($x, $y, $x, $y+$h);\r\n }\r\n \r\n if (substr_count($current_col[$b]['linearea'], \"R\") > 0)\r\n {\r\n $this->Line($x+$w, $y, $x+$w, $y+$h);\r\n }\r\n \r\n \r\n // Print the text\r\n $this->MultiCell($w, $current_col[$b]['height'], $current_col[$b]['text'], 0, $a, 0);\r\n \r\n // Put the position to the right of the cell\r\n $this->SetXY($x+$w, $y);\r\n }\r\n \r\n // Go to the next line\r\n $this->Ln($h);\r\n }\r\n }", "title": "" }, { "docid": "5d963fc847f57c88518c850f73258ae1", "score": "0.49624115", "text": "public function getModelTableShowColumns($table,$model,$type=false){\n\n $showColumns=$this->db->prepare(\"SHOW COLUMNS FROM \".$table.\"\");\n $showColumns->execute();\n\n $columns=$showColumns->fetchAll(\\PDO::FETCH_OBJ);\n\n\n if(!$type){\n return $this->getColumnsTable($columns,$model);\n }\n else{\n return $columns;\n }\n\n\n }", "title": "" }, { "docid": "acaaf120738042784c98a5d20135759d", "score": "0.4959685", "text": "public function typeDef()\n {\n if($this->isSimpleType())\n {\n $typeDef = $this->getSimpleType();\n }else{\n $typeDef = $this->getComplexType();\n }\n\n $this->outputCode .= $this->lineArray[1] . \": \" . $typeDef . \";\" . PHP_EOL;\n }", "title": "" }, { "docid": "8468c8ff15cb31fb7d7b98a2db08f918", "score": "0.4957246", "text": "function SetCols($cols){}", "title": "" }, { "docid": "82017d9b644ac05571f035710ff90fcf", "score": "0.4955485", "text": "function display() {\n global $CFG;\n\n $output = '';\n\n if (empty($this->data)) {\n return $output;\n }\n\n foreach ($this->headers as $column => $header) {\n $id = $column;\n\n if ($this->sortable[$id]) {\n if ($this->sort != $column) {\n $columnicon = \"\";\n $columndir = \"ASC\";\n } else {\n $columndir = $this->dir == \"ASC\" ? \"DESC\":\"ASC\";\n $columnicon = $this->dir == \"ASC\" ? \"down\":\"up\";\n $columnicon = \" <img src=\\\"$CFG->pixpath/t/$columnicon.gif\\\" alt=\\\"\\\" />\";\n }\n $args = '&amp;sort=' . $id . '&amp;dir=' . $columndir;\n $$column = '<a href=\"' . $this->baseurl . $args . '\">' . $header . '</a>' . $columnicon;\n } else {\n $$column = $header;\n }\n\n $this->table->head[] = $$column;\n $this->table->align[] = $this->align[$id];\n $this->table->wrap[] = $this->wrap[$id];\n }\n\n foreach ($this->data as $datum) {\n $row = array();\n\n if (is_array($datum) && (strtolower($datum[0]) == 'hr')) {\n $row = 'hr';\n } else {\n foreach ($this->headers as $id => $header) {\n if (isset($datum->$id)) {\n $row[$id] = $datum->$id;\n } else {\n $row[$id] = '';\n }\n }\n }\n\n $this->table->data[] = $row;\n }\n\n $this->table->width = '100%';\n\n $output .= print_table($this->table, true);\n\n return $output;\n }", "title": "" }, { "docid": "cfe1f599fd0f84804d406db8417cca61", "score": "0.49339327", "text": "public function export($type='',$case=''){\r\n include APPPATH.'appexcel/PHPExcel.php';\r\n \r\n // Panggil class PHPExcel nya\r\n $excel = new PHPExcel();\r\n // Settingan awal fil excel\r\n $excel->getProperties()->setCreator('BBP2TP')\r\n ->setLastModifiedBy('BBP2TP')\r\n ->setTitle(\"Laporan Berita\")\r\n ->setSubject(\"Berita\")\r\n ->setDescription(\"Laporan Berita\")\r\n ->setKeywords(\"Laporan erita\");\r\n \r\n // Buat sebuah variabel untuk menampung pengaturan style dari header tabel\r\n $style_col = array(\r\n 'font' => array('bold' => true), // Set font nya jadi bold\r\n 'alignment' => array(\r\n 'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER, // Set text jadi ditengah secara horizontal (center)\r\n 'vertical' => PHPExcel_Style_Alignment::VERTICAL_CENTER // Set text jadi di tengah secara vertical (middle)88888888888888888888888888v v\r\n ),\r\n 'borders' => array(\r\n 'top' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border top dengan garis tipis\r\n 'right' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border right dengan garis tipis\r\n 'bottom' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border bottom dengan garis tipis\r\n 'left' => array('style' => PHPExcel_Style_Border::BORDER_THIN) // Set border left dengan garis tipis\r\n )\r\n );\r\n // Buat sebuah variabel untuk menampung pengaturan style dari isi tabel\r\n $style_row = array(\r\n 'alignment' => array(\r\n 'vertical' => PHPExcel_Style_Alignment::VERTICAL_CENTER, // Set text jadi di tengah secara vertical (middle)\r\n 'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER\r\n ),\r\n 'borders' => array(\r\n 'top' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border top dengan garis tipis\r\n 'right' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border right dengan garis tipis\r\n 'bottom' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border bottom dengan garis tipis\r\n 'left' => array('style' => PHPExcel_Style_Border::BORDER_THIN) // Set border left dengan garis tipis\r\n )\r\n );\r\n $excel->setActiveSheetIndex(0)->setCellValue('A1', \"LAPORAN BERITA\"); // Set kolom A1 dengan tulisan \"DATA SISWA\"\r\n $excel->getActiveSheet()->mergeCells('A1:I2'); // Set Merge Cell pada kolom A1 sampai E1\r\n $excel->getActiveSheet()->getStyle('A1')->getFont()->setBold(TRUE); // Set bold kolom A1\r\n $excel->getActiveSheet()->getStyle('A1')->getFont()->setSize(15); // Set font size 15 untuk kolom A1\r\n $excel->getActiveSheet()->getStyle('A1')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER); // Set text center untuk kolom A1\r\n // Buat header tabel nya pada baris ke 3\r\n $excel->setActiveSheetIndex(0)->setCellValue('A4', \"NO\"); // Set kolom A3 dengan tulisan \"NO\"\r\n $excel->setActiveSheetIndex(0)->setCellValue('B4', \"TANGGAL\"); // Set kolom B3 dengan tulisan \"NIS\"\r\n // $excel->setActiveSheetIndex(0)->setCellValue('C4', \"SUBSEKTOR\"); // Set kolom C3 dengan tulisan \"NAMA\"\r\n // $excel->setActiveSheetIndex(0)->setCellValue('D4', \"KOMODITAS\"); // Set kolom C3 dengan tulisan \"NAMA\"\r\n $excel->setActiveSheetIndex(0)->setCellValue('C4', \"KEGIATAN\"); // Set kolom C3 dengan tulisan \"NAMA\"\r\n $excel->setActiveSheetIndex(0)->setCellValue('D4', \"PRIORITAS\"); // Set kolom C3 dengan tulisan \"NAMA\"\r\n $excel->setActiveSheetIndex(0)->setCellValue('E4', \"JUDUL BERITA\"); // Set kolom C3 dengan tulisan \"NAMA\"\r\n $excel->setActiveSheetIndex(0)->setCellValue('F4', \"Sumber\"); // Set kolom C3 dengan tulisan \"NAMA\"\r\n $excel->setActiveSheetIndex(0)->setCellValue('G4', \"BPTP/BBP2TP\"); // Set kolom C3 dengan tulisan \"NAMA\"\r\n // Apply style header yang telah kita buat tadi ke masing-masing kolom header\r\n $excel->getActiveSheet()->getStyle('A4')->applyFromArray($style_col);\r\n $excel->getActiveSheet()->getStyle('B4')->applyFromArray($style_col);\r\n // $excel->getActiveSheet()->getStyle('C4')->applyFromArray($style_col);\r\n // $excel->getActiveSheet()->getStyle('D4')->applyFromArray($style_col);\r\n $excel->getActiveSheet()->getStyle('C4')->applyFromArray($style_col);\r\n $excel->getActiveSheet()->getStyle('D4')->applyFromArray($style_col);\r\n $excel->getActiveSheet()->getStyle('E4')->applyFromArray($style_col);\r\n $excel->getActiveSheet()->getStyle('F4')->applyFromArray($style_col);\r\n //$excel->getActiveSheet()->getStyle('H3:H'.$excel->getActiveSheet()->getHighestRow())->getAlignment()->setWrapText(true); \r\n $excel->getActiveSheet()->getStyle('G4')->applyFromArray($style_col);\r\n \r\n // Panggil function view yang ada di SiswaModel untuk menampilkan semua data siswanya\r\n\r\n switch ($case) {\r\n case '4':\r\n $wheres = \" AND tanggal > DATE_SUB(now(), INTERVAL 12 MONTH)\";\r\n break;\r\n case '2':\r\n $wheres = \" AND tanggal > DATE_SUB(now(), INTERVAL 1 MONTH)\";\r\n break;\r\n case '3':\r\n $wheres = \" AND tanggal > DATE_SUB(now(), INTERVAL 6 MONTH)\";\r\n break;\r\n \r\n default:\r\n $wheres = '';\r\n break;\r\n }\r\n if ($this->config->item('isDaerah')) {\r\n $where = array(\r\n 'baseUrl'=>base_url(),\r\n );\r\n // print_r($where);die();\r\n $berita = $this->login_m->getAllBerita(base_url(),$wheres);\r\n }else{\r\n $berita = $this->login_m->getAllBerita('',$wheres);\r\n }\r\n \r\n $wizard = new PHPExcel_Helper_HTML;\r\n // echo json_encode($berita->result());die();\r\n $no = 1; // Untuk penomoran tabel, di awal set dengan 1\r\n $numrow = 5; // Set baris pertama untuk isi tabel adalah baris ke 4\r\n foreach($berita->result() as $data){ // Lakukan looping pada variabel siswa\r\n $excel->setActiveSheetIndex(0)->setCellValue('A'.$numrow, $no);\r\n $excel->setActiveSheetIndex(0)->setCellValue('B'.$numrow, $data->tanggal);\r\n // $excel->setActiveSheetIndex(0)->setCellValue('C'.$numrow, $data->namaSubsektor);\r\n // $excel->setActiveSheetIndex(0)->setCellValue('D'.$numrow, $data->namaKomoditas);\r\n $excel->setActiveSheetIndex(0)->setCellValue('C'.$numrow, $data->namaKegiatan);\r\n $excel->setActiveSheetIndex(0)->setCellValue('D'.$numrow, $data->namaPrioritas);\r\n $excel->setActiveSheetIndex(0)->setCellValue('E'.$numrow, $data->judulBerita);\r\n // $excel->setActiveSheetIndex(0)->setCellValue('F'.$numrow, $wizard->toRichTextObject($data->isiBerita));\r\n $excel->setActiveSheetIndex(0)->setCellValue('F'.$numrow, $data->sumber);\r\n $excel->setActiveSheetIndex(0)->setCellValue('G'.$numrow, $data->nama);\r\n \r\n\r\n // Apply style row yang telah kita buat tadi ke masing-masing baris (isi tabel)\r\n $excel->getActiveSheet()->getStyle('A'.$numrow)->applyFromArray($style_row);\r\n $excel->getActiveSheet()->getStyle('B'.$numrow)->applyFromArray($style_row);\r\n $excel->getActiveSheet()->getStyle('C'.$numrow)->applyFromArray($style_row);\r\n $excel->getActiveSheet()->getStyle('D'.$numrow)->applyFromArray($style_row);\r\n $excel->getActiveSheet()->getStyle('E'.$numrow)->applyFromArray($style_row);\r\n // $excel->getActiveSheet()->getStyle('F'.$numrow)->applyFromArray($style_row);\r\n $excel->getActiveSheet()->getStyle('F'.$numrow)->applyFromArray($style_row);\r\n $excel->getActiveSheet()->getStyle('G'.$numrow)->applyFromArray($style_row);\r\n // $excel->getActiveSheet()->getStyle('I'.$numrow)->applyFromArray($style_row);\r\n\r\n $no++; // Tambah 1 setiap kali looping\r\n $numrow++; // Tambah 1 setiap kali looping\r\n }\r\n // Set width kolom\r\n $excel->getActiveSheet()->getColumnDimension('A')->setWidth(5); // Set width kolom A\r\n $excel->getActiveSheet()->getColumnDimension('B')->setWidth(25); // Set width kolom B\r\n // $excel->getActiveSheet()->getColumnDimension('C')->setWidth(25); // Set width kolom C\r\n // $excel->getActiveSheet()->getColumnDimension('D')->setWidth(15); // Set width kolom C\r\n $excel->getActiveSheet()->getColumnDimension('C')->setWidth(40); // Set width kolom C\r\n $excel->getActiveSheet()->getColumnDimension('D')->setWidth(30); // Set width kolom C\r\n $excel->getActiveSheet()->getColumnDimension('E')->setWidth(50); // Set width kolom C\r\n // $excel->getActiveSheet()->getColumnDimension('F')->setWidth(150); // Set width kolom C\r\n $excel->getActiveSheet()->getColumnDimension('F')->setWidth(40); // Set width kolom C\r\n $excel->getActiveSheet()->getColumnDimension('G')->setWidth(40); // Set width kolom C\r\n\r\n // Set height semua kolom menjadi auto (mengikuti height isi dari kolommnya, jadi otomatis)\r\n //$excel->getActiveSheet()->getDefaultRowDimension()->setRowHeight(-1);\r\n // $excel->getActiveSheet()->getStyle('H1:H'.$excel->getActiveSheet()->getHighestRow())->getAlignment()->setWrapText(true); \r\n // Set orientasi kertas jadi LANDSCAPE\r\n $excel->getActiveSheet()->getPageSetup()->setOrientation(PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE);\r\n // Set judul file excel nya\r\n $excel->getActiveSheet(0)->setTitle(\"Laporan Berita\");\r\n $excel->setActiveSheetIndex(0);\r\n // Proses file excel\r\n header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\r\n header('Content-Disposition: attachment; filename=\"Laporan Berita.xlsx\"'); // Set nama file excel nya\r\n header('Cache-Control: max-age=0');\r\n $write = PHPExcel_IOFactory::createWriter($excel, 'Excel2007');\r\n $write->save('php://output');\r\n }", "title": "" }, { "docid": "3491e5526ec966a453c2c0b0eb70037e", "score": "0.4909488", "text": "protected function _prepareColumns() {\n $id = array (\n 'header' => Mage::helper ( 'marketplace' )->__ ( 'Transaction ID' ),\n 'width' => '100px',\n 'index' => 'id' \n );\n $this->addColumn ( 'id', $id );\n $orderId = array (\n 'header' => Mage::helper ( 'marketplace' )->__ ( 'Order ID' ),\n 'width' => '100px',\n 'index' => 'order_id' \n );\n $this->addColumn ( 'order_id', $orderId );\n $sellerCommission = array (\n 'header' => Mage::helper ( 'marketplace' )->__ ( 'Seller Amount' ),\n 'width' => '100px',\n 'index' => 'seller_commission' \n );\n $this->addColumn ( 'seller_commission', $sellerCommission );\n $adminCommission = array (\n 'header' => Mage::helper ( 'marketplace' )->__ ( 'Admin Commission' ),\n 'width' => '100px',\n 'index' => 'admin_commission' \n );\n $this->addColumn ( 'admin_commission', $adminCommission );\n $paidDate = array (\n 'header' => Mage::helper ( 'customer' )->__ ( 'Paid On' ),\n 'width' => '100px',\n 'align' => 'center',\n 'index' => 'paid_date',\n 'gmtoffset' => true \n );\n $this->addColumn ( 'paid_date', $paidDate );\n $acknowledgeDate = array (\n 'header' => Mage::helper ( 'customer' )->__ ( 'Acknowledge On' ),\n 'align' => 'center',\n 'width' => '100px',\n 'index' => 'acknowledge_date',\n 'gmtoffset' => true \n );\n $this->addColumn ( 'acknowledge_date', $acknowledgeDate );\n $this->addExportType ( '*/*/exportCsv', Mage::helper ( 'customer' )->__ ( 'CSV' ) );\n $this->addExportType ( '*/*/exportXml', Mage::helper ( 'customer' )->__ ( 'Excel XML' ) );\n return parent::_prepareColumns ();\n }", "title": "" }, { "docid": "3ab5b74b2e986654ed4d93d898657aa5", "score": "0.48845074", "text": "public function setColumnType()\n\t{\n\t\tswitch ($this->dataType) {\n\t\t\tcase 'char':\n\t\t\tcase 'varchar':\n\t\t\tcase 'text':\n\t\t\t\t$this->columnType = self::TYPE_STRING;\n\t\t\t\tbreak;\n\t\t\tcase 'int':\n\t\t\tcase 'bigint':\n\t\t\tcase 'mediumint':\n\t\t\tcase 'smallint':\n\t\t\tcase 'tinyint':\n\t\t\tcase 'bit':\n\t\t\t\t$this->columnType = self::TYPE_INT;\n\t\t\t\tbreak;\n\t\t\tcase 'float':\n\t\t\tcase 'decimal':\n\t\t\tcase 'double':\n\t\t\t\t$this->columnType = self::TYPE_DECIMAL;\n\t\t\t\tbreak;\n\t\t\tcase 'date':\n\t\t\t\t$this->columnType = self::TYPE_DATE;\n\t\t\t\tbreak;\n\t\t\tcase 'datetime':\n\t\t\t\t$this->columnType = self::TYPE_DATETIME;\n\t\t\t\tbreak;\n\t\t\tcase 'time':\n\t\t\t\t$this->columnType = self::TYPE_TIME;\n\t\t\t\tbreak;\n\t\t\tcase 'enum':\n\t\t\tcase 'set':\n\t\t\t\t$this->columnType = self::TYPE_ENUM;\n\t\t\t\tbreak;\n\t\t\tcase 'json':\n\t\t\t\t$this->columnType = self::TYPE_OBJECT;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->columnType = self::TYPE_UNKNOWN;\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "9d1e784b50832f68c9753f17440ff0fa", "score": "0.4879144", "text": "private function setColumns() {\n $model = self::$config['class'];\n $columns = $model::attributLabels();\n\n //has defined columns \n if (isset(self::$config['columns'])) {\n foreach (self::$config['columns'] as $attr => $parms) {\n if (is_int($attr)) {\n $attr = $parms;\n }\n //iff model has attribute \n if (isset($columns[$attr])) {\n $this->configColumn($attr, $parms);\n $cols[$attr] = isset($parms['label']) ? $parms['label'] : $columns[$attr];\n } elseif (isset($parms['label'])) { //iff user has configured \n if (!isset($parms['value']))\n $parms['value'] = \"Error: Could not find any method or a value!\";\n $this->configColumn($attr, $parms);\n $cols[$attr] = $parms['label'];\n } else { //default\n $cols[$attr] = $attr;\n }\n }\n $columns = $cols;\n } else {\n self::$config['sortable'] = [];\n }\n //set columns\n self::$config['columns'] = $columns;\n }", "title": "" }, { "docid": "0acad4c30ef7d27b6ae39e462139b267", "score": "0.48771533", "text": "public function canHaveAttributeColumns($type)\n {\n return false;\n }", "title": "" }, { "docid": "0e4a04e1c00c83ebcfddf92c6d3cadc7", "score": "0.4875129", "text": "protected function printColumnHeaders($is_footer = false)\n {\n $columns = $this->getColumns();\n $sortable = $this->getSortableColumns();\n $primary = $this->getPrimaryColumn();\n\n if (!is_array($columns)) {\n throw new \\Exception('Wrong value type for getColumns() method. The value type for getColumns() method should be array.');\n }\n if (!is_array($sortable)) {\n throw new \\Exception('Wrong value type for getSortableColumns() method. The value type for getSortableColumns() method should be array.');\n }\n\n if (array_key_exists('checkbox', $columns)) {\n static $checkbox_count = 1;\n $columns['checkbox'] = '<label class=\"sr-only screen-reader-only\" for=\"checkbox-select-all-' . $checkbox_count . '\">' . $this->getText('select_all') . '</label>'\n . '<input id=\"checkbox-select-all-' . $checkbox_count . '\" class=\"checkbox\" type=\"checkbox\">';\n $checkbox_count++;\n }\n\n $this->columnsCount = 0;\n foreach ($columns as $column_unique_name => $column_display_name) {\n $class = ['column-' . $column_unique_name];\n\n if ($column_unique_name == $primary) {\n $class[] = 'column-primary';\n }\n\n if ($is_footer === false) {\n $class = array_merge($class, $this->getColumnHeaderClasses($column_unique_name));\n } else {\n $class = array_merge($class, $this->getColumnFooterClasses($column_unique_name));\n }\n\n if ($column_unique_name == 'checkbox') {\n $table_cell = 'td';\n } else {\n $table_cell = 'th';\n }\n\n // sortable column\n if (is_array($sortable)) {\n $current_url = (isset($_SERVER['HTTPS']) ? 'https://' : 'http://') . (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'localhost') . $_SERVER['PHP_SELF'] . '?';\n if (!empty($_GET)) {\n foreach ($_GET as $get_key => $get_val) {\n if ($get_key != $this->paginationQueryName && $get_key != $this->orderQueryName && $get_key != $this->sortQueryName) {\n $current_url .= $get_key . '=' . urlencode($get_val) . '&amp;';\n }\n }// endforeach;\n unset($get_key, $get_val);\n }\n $current_order = (isset($_GET[$this->orderQueryName]) ? $_GET[$this->orderQueryName] : '');\n $current_sort = (isset($_GET[$this->sortQueryName]) ? $_GET[$this->sortQueryName] : '');\n\n if (array_key_exists($column_unique_name, $sortable)) {\n list($order, $descending_first) = $sortable[$column_unique_name];\n\n if ($current_order == $order) {\n $sort = ($current_sort === 'asc' ? 'desc' : 'asc');\n $class[] = 'sorted';\n $class[] = $current_sort;\n } else {\n $sort = ($descending_first === true ? 'desc' : 'asc');\n $class[] = 'sortable';\n $class[] = $sort;\n }\n $current_url .= $this->orderQueryName . '=' . urlencode($order) . '&amp;' . $this->sortQueryName . '=' . $sort;\n\n unset($descending_first, $order, $sort);\n $column_display_name = '<a href=\"' . $current_url . '\"><span>' . $column_display_name . '</span><span class=\"sorting-indicator\"></span></a>';\n }\n\n unset($current_order, $current_sort, $current_url);\n }\n\n if ($is_footer === false) {\n $id = ' id=\"table-column-' . $column_unique_name . '\"';\n } else {\n $id = ' id=\"table-column-' . $column_unique_name . '-footer\"';\n }\n\n $class = ' class=\"' . implode(' ', $class) . '\"';\n\n if ($table_cell == 'th') {\n $scope = ' scope=\"col\"';\n } else {\n $scope = '';\n }\n\n $this->columnsCount++;\n\n echo '<' . $table_cell . $id . $class . $scope . '>' . $column_display_name . '</' . $table_cell . '>';\n }// endforeach;\n unset($class, $column_display_name, $column_unique_name, $id, $scope, $table_cell);\n\n unset($columns, $primary, $sortable);\n echo \"\\n\";\n }", "title": "" }, { "docid": "fa0be1701e1d9fbf571c03d0ae2a9650", "score": "0.48690596", "text": "public function setColumns()\n {\n $this->columns = [\n \"id\" => [\n \"label\" => \"ID\",\n \"filter\" => [\n \"enabled\" => true,\n \"operator\" => \"=\",\n ],\n ],\n \"systemName\" => [\n \"label\" => \"System Name\",\n \"search\" => [\n \"enabled\" => true,\n ],\n \"filter\" => [\n \"enabled\" => true,\n \"operator\" => \"like\",\n ],\n ],\n \"description\" => [\n \"search\" => [\n \"enabled\" => true,\n ],\n \"filter\" => [\n \"enabled\" => true,\n \"operator\" => \"like\",\n ],\n ],\n \"relation\" => [\n \"label\" => \"Parent Handbook\",\n \"filter\" => [\n \"enabled\" => true,\n \"operator\" => \"=\",\n \"type\" => \"select\",\n \"data\" => Handbook::getList(),\n ],\n 'data' => function ($handbook) {\n /** @var \\App\\Components\\Handbook\\Models\\Handbook $handbook */\n return $handbook->getParent();\n },\n ],\n \"created_at\" => [\n \"sort\" => false,\n \"date\" => \"true\",\n \"filter\" => [\n \"enabled\" => true,\n \"type\" => \"date\",\n \"operator\" => \"<=\",\n ],\n ],\n ];\n }", "title": "" }, { "docid": "2e3b7352dab3665aaa5a75811b95e6ce", "score": "0.4856916", "text": "function SetColFormatCustom($col, $typeName){}", "title": "" }, { "docid": "11b5498507fcc694115348cf85542654", "score": "0.48555973", "text": "function GetCols(){}", "title": "" }, { "docid": "1cd2a19b7bfc7c906b7bc0781cafeb54", "score": "0.48518246", "text": "function AppendCols($numCols=1, $updateLabels=true){}", "title": "" }, { "docid": "6da6868116e3b14f3d55c3892ccc56d2", "score": "0.48319724", "text": "public function isVertical()\n\t{\n\t\treturn isset($this->type) && $this->type === self::TYPE_LIST;\n\t}", "title": "" }, { "docid": "418d307fab9b8ba555d95fe6d6cf6a73", "score": "0.4824769", "text": "private function _renderRow($row){\n\t\tif($row['_type']=='normal'){\n\t\t\tunset($row['_type']);\n\t\t\tif($this->_numberColumns===null){\n\t\t\t\t$this->_numberColumns = count($row);\n\t\t\t}\n\t\t\tforeach($row as $numberColumn => $value){\n\t\t\t\tif(isset($this->_totalizeColumns[$numberColumn])){\n\t\t\t\t\tif(!isset($this->_totalizeValues[$numberColumn])){\n\t\t\t\t\t\t$this->_totalizeValues[$numberColumn] = 0;\n\t\t\t\t\t}\n\t\t\t\t\t$this->_totalizeValues[$numberColumn]+=$value;\n\t\t\t\t}\n\t\t\t\tif(isset($this->_columnFormats[$numberColumn])){\n\t\t\t\t\t$stdType = $this->_columnFormats[$numberColumn]->getStdType();\n\t\t\t\t\tswitch($stdType){\n\t\t\t\t\t\tcase 'number':\n\t\t\t\t\t\t\t$type = PHPExcel_Cell_DataType::TYPE_NUMERIC;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$type = PHPExcel_Cell_DataType::TYPE_STRING;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t$cellStyle = $this->_appendToOutput($value, $type);\n\t\t\t\t\tswitch($stdType){\n\t\t\t\t\t\tcase 'number':\n\t\t\t\t\t\t\t$cellStyle->getNumberFormat()->setFormatCode('#,##0.00');\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$cellStyle = $this->_appendToOutput($value);\n\t\t\t\t}\n\t\t\t\tif(isset($this->_preparedStyles[$numberColumn])){\n\t\t\t\t\t$cellStyle->applyFromArray($this->_preparedStyles[$numberColumn]);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif($row['_type']=='raw'){\n\t\t\t\tunset($row['_type']);\n\t\t\t\tforeach($row as $numberColumn => $rawColumn){\n\t\t\t\t\t/*$output.=\"\\t\\t\\t\\t<td colspan='\".$rawColumn->getSpan().\"'\";\n\t\t\t\t\t$styles = $rawColumn->getStyle();\n\t\t\t\t\tif($styles){\n\t\t\t\t\t\t$style = $this->_prepareStyle($styles);\n\t\t\t\t\t\t$output.=\" style='\".join(';', $style).\"'\t\";\n\t\t\t\t\t}\n\t\t\t\t\t$output.=\">\".$rawColumn->getValue().\"</td>\\n\";*/\n\t\t\t\t\t$this->_appendToOutput($rawColumn->getValue());\n\t\t\t\t\tunset($rawColumn);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->_lineFeed();\n\t}", "title": "" }, { "docid": "a743c0f0cb443596e82ff7b44bccdbb0", "score": "0.48239928", "text": "public function getColumn()\n {\n // the values their names in the application\n return [\n 'id_Produit',\n 'taille_Sd',\n 'type_Sd',\n 'adaptateur_Sd'\n\n ];\n }", "title": "" }, { "docid": "15646d2d5b44033538b4435fdc86ad7b", "score": "0.4817563", "text": "public function showOutput(Array $data = array())\n {\n if (isset($data['value'])) $this->value = $data['value'];\n $data['value'] = $this->getValue();\n\n try {\n $displayconfig = $this->display_column_definition;\n\n // Remove this line once legacy code no longer needed\n if (isset($displayconfig['value'])) $displayconfig = $displayconfig['value'];\n\n // New way for configs\n $titles = array();\n $types = array();\n $defaults = array();\n $configurations = array();\n foreach ($displayconfig as $row) {\n $titles[] = isset($row[0]) ? $row[0] : '';\n $types[] = isset($row[1]) ? $row[1] : 1;\n $defaults[] = isset($row[2]) ? $row[2] : '';\n $configurations[] = isset($row[3]) ? $row[3] : '';\n }\n } catch (Exception $e) {\n // Legacy way for configs\n $titles = array();\n $types = array();\n $defaults = array();\n $configurations = array();\n foreach ($this->default_column_definition as $row) {\n $titles[] = $row[0];\n $types[] = $row[1];\n $defaults[] = $row[2];\n $configurations[] = $row[0];\n }\n }\n $data['column_titles'] = $titles;\n $data['rows'] = isset($data['value'][0]) ? count($data['value'][0]) : 0;\n \n // We initialize the required properties here, for reuse in the template\n $data['column_types'] =array();\n sys::import('modules.dynamicdata.class.properties.master');\n foreach($types as $key => $thistype) {\n $data['column_types'][$key] = DataPropertyMaster::getProperty(array('type' => $thistype));\n }\n return parent::showOutput($data);\n }", "title": "" }, { "docid": "b102047131a174c6455599d57610e6b2", "score": "0.48167536", "text": "function export($type, $format = 'CSV') {\n\tglobal $log, $adb;\n\t$log->debug('> export '.$type);\n\n\t$focus = 0;\n\n\tif ($type != '') {\n\t\t// vtlib customization: Hook to dynamically include required module file.\n\t\t// Refer to the logic in setting $currentModule in index.php\n\t\t$focus = CRMEntity::getInstance($type);\n\t}\n\t$log = LoggerManager::getLogger('export_'.$type);\n\n\t$oCustomView = new CustomView($type);\n\t$viewid = $oCustomView->getViewId($type);\n\t$sorder = $focus->getSortOrder();\n\t$order_by = $focus->getOrderBy();\n\n\t$search_type = vtlib_purify($_REQUEST['search_type']);\n\t$export_data = vtlib_purify($_REQUEST['export_data']);\n\t$filtercolumns = (isset($_REQUEST['visiblecolumns']) && $_REQUEST['visiblecolumns']=='on');\n\n\tif (isset($_SESSION['export_where']) && $_SESSION['export_where']!='' && $search_type == 'includesearch') {\n\t\t$where =$_SESSION['export_where'];\n\t} else {\n\t\t$where = '';\n\t}\n\n\t$query = $focus->create_export_query($where);\n\tif ($search_type != 'includesearch') {\n\t\t$stdfiltersql = $oCustomView->getCVStdFilterSQL($viewid);\n\t\t$advfiltersql = $oCustomView->getCVAdvFilterSQL($viewid);\n\t\tif (isset($stdfiltersql) && $stdfiltersql != '') {\n\t\t\t$query .= ' and '.$stdfiltersql;\n\t\t}\n\t\tif (isset($advfiltersql) && $advfiltersql != '') {\n\t\t\t$query .= ' and '.$advfiltersql;\n\t\t}\n\t}\n\t$params = array();\n\n\tif (($search_type == 'withoutsearch' || $search_type == 'includesearch') && $export_data == 'selecteddata') {\n\t\t$idstring = explode(';', vtlib_purify($_REQUEST['idstring']));\n\t\tif ($type == 'Accounts' && count($idstring) > 0) {\n\t\t\t$query .= ' and vtiger_account.accountid in ('. generateQuestionMarks($idstring) .')';\n\t\t\t$params[] = $idstring;\n\t\t} elseif ($type == 'Contacts' && count($idstring) > 0) {\n\t\t\t$query .= ' and vtiger_contactdetails.contactid in ('. generateQuestionMarks($idstring) .')';\n\t\t\t$params[] = $idstring;\n\t\t} elseif ($type == 'Potentials' && count($idstring) > 0) {\n\t\t\t$query .= ' and vtiger_potential.potentialid in ('. generateQuestionMarks($idstring) .')';\n\t\t\t$params[] = $idstring;\n\t\t} elseif ($type == 'Leads' && count($idstring) > 0) {\n\t\t\t$query .= ' and vtiger_leaddetails.leadid in ('. generateQuestionMarks($idstring) .')';\n\t\t\t$params[] = $idstring;\n\t\t} elseif ($type == 'Products' && count($idstring) > 0) {\n\t\t\t$query .= ' and vtiger_products.productid in ('. generateQuestionMarks($idstring) .')';\n\t\t\t$params[] = $idstring;\n\t\t} elseif ($type == 'Documents' && count($idstring) > 0) {\n\t\t\t$query .= ' and vtiger_notes.notesid in ('. generateQuestionMarks($idstring) .')';\n\t\t\t$params[] = $idstring;\n\t\t} elseif ($type == 'HelpDesk' && count($idstring) > 0) {\n\t\t\t$query .= ' and vtiger_troubletickets.ticketid in ('. generateQuestionMarks($idstring) .')';\n\t\t\t$params[] = $idstring;\n\t\t} elseif ($type == 'Vendors' && count($idstring) > 0) {\n\t\t\t$query .= ' and vtiger_vendor.vendorid in ('. generateQuestionMarks($idstring) .')';\n\t\t\t$params[] = $idstring;\n\t\t} elseif ($type == 'Invoice' && count($idstring) > 0) {\n\t\t\t$query .= ' and vtiger_invoice.invoiceid in ('. generateQuestionMarks($idstring) .')';\n\t\t\t$params[] = $idstring;\n\t\t} elseif ($type == 'Quotes' && count($idstring) > 0) {\n\t\t\t$query .= ' and vtiger_quotes.quoteid in ('. generateQuestionMarks($idstring) .')';\n\t\t\t$params[] = $idstring;\n\t\t} elseif ($type == 'SalesOrder' && count($idstring) > 0) {\n\t\t\t$query .= ' and vtiger_salesorder.salesorderid in ('. generateQuestionMarks($idstring) .')';\n\t\t\t$params[] = $idstring;\n\t\t} elseif ($type == 'PurchaseOrder' && count($idstring) > 0) {\n\t\t\t$query .= ' and vtiger_purchaseorder.purchaseorderid in ('. generateQuestionMarks($idstring) .')';\n\t\t\t$params[] = $idstring;\n\t\t} elseif (count($idstring) > 0) {\n\t\t\t// vtlib customization: Hook to make the export feature available for custom modules.\n\t\t\t$query .= \" and $focus->table_name.$focus->table_index in (\" . generateQuestionMarks($idstring) . ')';\n\t\t\t$params[] = $idstring;\n\t\t\t// END\n\t\t}\n\t}\n\n\tif (isset($order_by) && $order_by != '') {\n\t\tif ($order_by == 'smownerid') {\n\t\t\t$query .= ' ORDER BY vtiger_users.user_name '.$sorder;\n\t\t} elseif ($order_by == 'lastname' && $type == 'Documents') {\n\t\t\t$query .= ' ORDER BY vtiger_contactdetails.lastname '. $sorder;\n\t\t} elseif ($order_by == 'crmid' && $type == 'HelpDesk') {\n\t\t\t$query .= ' ORDER BY vtiger_troubletickets.ticketid '. $sorder;\n\t\t} else {\n\t\t\t$tablename = getTableNameForField($type, $order_by);\n\t\t\t$tablename = (($tablename != '')?($tablename.'.'):'');\n\t\t\t$entity = getEntityFieldNames($type);\n\t\t\tif (empty($tablename) && $entity['entityidfield'] == $order_by) {\n\t\t\t\t$tablename = $focus->table_name.'.';\n\t\t\t}\n\t\t\t$query .= ' ORDER BY '.$tablename.$order_by.' '.$sorder;\n\t\t}\n\t}\n\n\tif ($export_data == 'currentpage') {\n\t\t$list_max_entries_per_page = GlobalVariable::getVariable('Application_ListView_PageSize', 20, $type);\n\t\t$current_page = ListViewSession::getCurrentPage($type, $viewid);\n\t\t$limit_start_rec = ($current_page - 1) * $list_max_entries_per_page;\n\t\tif ($limit_start_rec < 0) {\n\t\t\t$limit_start_rec = 0;\n\t\t}\n\t\t$query .= ' LIMIT '.$limit_start_rec.','.$list_max_entries_per_page;\n\t}\n\n\t$result = $adb->pquery($query, $params, true, \"Error exporting $type: <BR>$query\");\n\t$fields_array = $adb->getFieldsArray($result);\n\t$fields_array = array_diff($fields_array, array('user_name'));\n\tif ($filtercolumns) {\n\t\t$visiblecolumns_array = $oCustomView->getColumnsListByCvid($viewid);\n\t\tarray_walk($visiblecolumns_array, 'obtainVisibleColumnNames');\n\t\t$fields_array = array_filter($visiblecolumns_array, function ($efield) use ($fields_array) {\n\t\t\treturn in_array($efield, $fields_array);\n\t\t});\n\t\t$fields_array[] = 'cbuuid';\n\t}\n\n\t$columnsToExport = array_map(\n\t\tfunction ($field) {\n\t\t\treturn strtolower($field);\n\t\t},\n\t\t$fields_array\n\t);\n\n\t$processor = new ExportUtils($type, $fields_array);\n\n\t$translated_fields_array = array_map(\n\t\tfunction ($field) use ($type) {\n\t\t\treturn getTranslatedString($field, $type);\n\t\t},\n\t\t$fields_array\n\t);\n\n\tif ($format == 'CSV') {\n\t\t$CSV_Separator = GlobalVariable::getVariable('Export_Field_Separator_Symbol', ',', $type);\n\t\t$header = '\"'.implode('\"'.$CSV_Separator.'\"', $translated_fields_array).\"\\\"\\r\\n\";\n\t\t/** Output header information */\n\t\techo $header;\n\t\tdumpRowsToCSV($type, $processor, $CSV_Separator, $columnsToExport, $result, $focus);\n\t}\n\tif ($format == 'XLS') {\n\t\treturn dumpRowsToXLS($type, $processor, $columnsToExport, $translated_fields_array, $result);\n\t}\n\n\t$log->debug('< export');\n\treturn true;\n}", "title": "" }, { "docid": "84b7b4d540662deee335a181f40bf74e", "score": "0.48154414", "text": "function showColumns($tables);", "title": "" }, { "docid": "a47ce50707093a77571d1f0029727706", "score": "0.48010752", "text": "public function col($width);", "title": "" }, { "docid": "8982158532edced3c6f3d78fb5b893dc", "score": "0.47986808", "text": "public function renderCode($type)\n {\n /** @var $code InformationMatrix */\n $code = $this->createCode($type);\n\n return $code\n ->setHeight(50)\n ->setLength(80);\n }", "title": "" }, { "docid": "6657ae48c0ce20597c91596eb02f5674", "score": "0.4796408", "text": "function tbl(){\t\t//this function creates table structure and titles of columns\n\t\techo '<table border=\"1\">';\n\t\techo '<thead>';\n\t\techo '<tr>';\n\t\techo '<th>int</th>';\n\t\techo '<th>varchar</th>';\n\t\techo '</tr>';\n\t\techo '</thead>';\n\t\techo '<tbody>';\n\t }", "title": "" }, { "docid": "1e5614fc26734d1f473d857e3405fbd6", "score": "0.479338", "text": "public function column($name, $type, $size = null) {}", "title": "" }, { "docid": "0fb2b18ca56736a28c20d99806463038", "score": "0.47881567", "text": "private function addTableFooter() {\n\n\t\t// width (for each column)\n\t\tforeach ($this->tableParams['col_width'] as $col => $value) {\n\n\t\t\tif ($value) {\n\t\t\t\tif ($value == 'auto') {\n\t\t\t\t\t$this->xls->getActiveSheet()->getColumnDimensionByColumn($col)->setAutoSize(true);\n\t\t\t\t} else {\n\t\t\t\t\t$this->xls->getActiveSheet()->getColumnDimensionByColumn($col)->setAutoSize(false);\n\t\t\t\t\t$this->xls->getActiveSheet()->getColumnDimensionByColumn($col)->setWidth((float) $value);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->xls->getActiveSheet()->getColumnDimensionByColumn($col)->setAutoSize(false);\n\t\t\t}\n\n\t\t}\n\n\t\t// filter (all columns)\n\t\tif ($this->tableParams['filter']) {\n\t\t\t$this->xls->getActiveSheet()->setAutoFilter(sprintf('%s%d:%s%d',\n\t\t\t\t\tPHPExcel_Cell::stringFromColumnIndex($this->tableParams['col_offset']),\n\t\t\t\t\t$this->tableParams['header_row'],\n\t\t\t\t\tPHPExcel_Cell::stringFromColumnIndex($this->tableParams['col_offset'] + $this->tableParams['col_count'] - 1),\n\t\t\t\t\t$this->tableParams['row_count']));\n\t\t}\n\n\t}", "title": "" }, { "docid": "2ad321436acc38316065f7ebddeb137e", "score": "0.4780638", "text": "public function createTable($result, $type) {\n $tableHeader = true;\n $html = '<table class=\"table\">';\n $id = ($type == 'user' ? 'id' : 'activity_id');\n\n while ($row = $result->fetch(PDO::FETCH_ASSOC)) {\n if ($tableHeader) {\n $html .= '<tr>';\n\n foreach ($row as $key => $value) {\n $html .= '<th>' . $key . '</th>';\n }\n\n $html .= '<th colspan=\"3\" style=\"text-align: center;\">Actions</th>';\n $html .= '</tr>';\n $tableHeader = !$tableHeader;\n }\n\n $html .= '<tr>';\n\n foreach ($row as $key => $value) {\n\n if ($type === 'todo') {\n\n if ($key === 'description') {\n $html .= '<td>' . $this->limitSummary($value, 5) . ' ...</td>';\n }\n\n if ($key === 'title') {\n $html .= '<td>' . $value . ' </td>';\n }\n\n if ($key === 'todo_id') {\n $html .= '<td>' . $value . ' </td>';\n }\n\n if ($key === 'user_id') {\n $html .= '<td>' . $this->getUser($value) . ' </td>';\n }\n\n if ($key === 'activity_id') {\n $html .= '<td>' . $this->getActivityName($value) . ' </td>';\n }\n\n if ($key === 'cat_id') {\n $html .= '<td>' . $this->getCategory($value) . ' </td>';\n }\n\n if ($key === 'status_id') {\n $html .= '<td>' . $this->getStatus($value) . '</td>';\n }\n\n } else {\n $html .= ($key === 'activity_description' ? '<td>' . $this->limitSummary($value, 5) . ' ...</td>' : '<td>' . $value . '</td>');\n }\n }\n\n if ($type !== 'todo') {\n if ($type !== 'user') {\n $html .= '<td><a href=\"admin_form.php?fieldset=' . $type . '&' . $type . '_id=' . $row[$id] . '\" class=\"btn btn-secondary\" style=\"width: 100%;\"><i class=\"fas fa-pencil-alt action-icons\"></i> Update </a></td>';\n }\n }\n\n $html .= '<td><form action=\"./includes/form_handling.php\" method=\"GET\">';\n $html .= '<input type=\"hidden\" name=\"operation\" value=\"delete_' . $type . '\" />';\n $html .= '<input type=\"hidden\" name=\"id\" value=\"' . $this->correctDeleteId($type, $row) . '\" />';\n $html .= '<button type=\"submit\" class=\"btn btn-danger\" style=\"width: 100%;\">';\n $html .= '<i class=\"fas fa-times action-icons\"></i></button></form></td>';\n\n\n $html .= '</tr>';\n }\n\n $html .= '</table>';\n\n\n return $html;\n }", "title": "" }, { "docid": "59eb056074f009ec90f4bd0519aaa9c7", "score": "0.47793034", "text": "public function getOutputFormat() {\n return $this->outputStyle; \t\n }", "title": "" }, { "docid": "96ddda569651c54853af7ac717b82d08", "score": "0.47775495", "text": "function PrependColumn(wxDataViewColumn &$column, $varianttype){}", "title": "" }, { "docid": "b678dc38f6b386b154f763f65ca24e2c", "score": "0.47764462", "text": "public function isVertical() {\n\t\t\n\t\treturn isset($this->type) && $this->type === self::TYPE_LIST;\n\t}", "title": "" }, { "docid": "5634d8af39d7025cbf7121acac3003a4", "score": "0.477117", "text": "function SetColumns($n=1){}", "title": "" }, { "docid": "4aa85810be146793d6feb99acbf3997e", "score": "0.47709322", "text": "private function setWritter($outputType, $options = array())\n {\n $this->writter = WritterFactory::build($outputType, $options);\n }", "title": "" }, { "docid": "5c386ffb77d13c9efec5a547e3cf13d8", "score": "0.47690615", "text": "function columnCount()\n\t{\n\t\tif ( $this->cell == 2) {\n\t\t\tPRINT \"</tr>\\n\";\n\t\t\tPRINT '<tr class=\"devicedetail\">';\n\t\t\t$this->cell=0 ;\n\t\t}\n\t\t$this->cell++;\n\t}", "title": "" }, { "docid": "1eb03d46c79c210aa31575f66dd1fe2d", "score": "0.47687706", "text": "function write($doc) {\n\t\t$regex = new Regex();\n\t\t\n\t\t// standard width for each column, if not specified otherwise\n\t\t$defaultWidth = 17 / (count($this->data[0])-1); // 20.5 (A4 width) - 2x 1.7 (borders left and right) = 17.1 -> 17\n\t\t\n\t\t$fill = 0; // standard not filled -> transparent\n\t\t$align = 'L'; // default align left\n\t\t\n\t\t$widthLastCol = 0;\n\t\t$totalWidth = 0;\n\t\t$lineY = $doc->GetY();\n\t\t$lineX = $doc->GetX();\n\t\t\n\t\t// write table from data\n\t\tforeach($this->data as $row => $info) {\n\n\t\t\t// set row's attributes\n\t\t\t$border = $this->border;\n\t\t\t$height = $doc->lineHeight;\n\t\t\t$spacing = $this->spacing;\n\t\t\t\n\t\t\t// write each cell \n\t\t\tforeach($info as $col => $value) {\n\t\t\t\tif(!is_numeric($col)) continue; // because every column has a num and key value, one has to be omitted\n\t\t\t\tif(in_Array($col, $this->ignoreCols)) continue; // ignore cols, e.g. don't print id column\n\n\t\t\t\t// Set align right, when values are decimal\n\t\t\t\tif(isset($this->data[1]) && $regex->isNumber($this->data[1][$col]) &&\n\t\t\t\t\t(!isset($this->colType[$col]) || $this->colType[$col] == FieldType::DECIMAL\n\t\t\t\t\t\t || $this->colType[$col] == FieldType::INTEGER)) {\n\t\t\t\t\t$align = 'R';\n\t\t\t\t\tif($regex->isInteger($value)) {\n\t\t\t\t\t\t$value = Data::formatInteger($value);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$value = Data::convertFromDb($value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$align = 'L';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// format dates\n\t\t\t\tif(isset($this->data[1]) && $regex->isDatabaseDateQuiet($this->data[1][$col])) {\n\t\t\t\t\t$value = Data::convertDateFromDb($value);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Header\n\t\t\t\tif($row == 0) {\n\t\t\t\t\t$doc->setFontBold();\n\t\t\t\t\t$doc->SetFillColor($this->headerBackgroundColor[0], $this->headerBackgroundColor[1], $this->headerBackgroundColor[2]);\n\t\t\t\t\t$fill = 1;\n\t\t\t\t\t$spacing = 0;\n\t\t\t\t\tif(isset($this->header[$col])) $value = $this->header[$col]; // change value if header was renamed\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$doc->setFontStandard();\n\t\t\t\t\t$fill = 0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// change standard width if it was set differently\n\t\t\t\tif(isset($this->widths[$col])) $width = $this->widths[$col];\n\t\t\t\t else $width = $defaultWidth;\n\t\t\t\tif($row == 0) $totalWidth += $width; \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// check whether another column is header for the current\n\t\t\t\tif(isset($this->colHeaders[$col]) && $row != 0) {\n\t\t\t\t\t$doc->setFontBold();\n\t\t\t\t\t$doc->Cell($width, $doc->lineHeight, $this->data[$row][$this->colHeaders[$col]], 0, 1);\n\t\t\t\t\t$doc->setFontStandard();\n\t\t\t\t\t\n\t\t\t\t\t// calc the X position of the following text\n\t\t\t\t\t$w = 0;\n\t\t\t\t\tforeach($this->data[0] as $id => $colname) {\n\t\t\t\t\t\tif($id >= $col) break;\n\t\t\t\t\t\tif(isset($this->widths[$id])) $w += $this->widths[$id];\n\t\t\t\t\t\t else $w += $defaultWidth;\n\t\t\t\t\t}\n\t\t\t\t\t$doc->SetX($w + $doc->leftMargin);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// write cell\n\t\t\t\tif($row != 0 && $doc->GetStringWidth($value) > $width) {\t\n\t\t\t\t\t// write multiline text if the width is too wide or the text contains breaks\n\t\t\t\t\t$currentX = $doc->GetX();\n\t\t\t\t\t$currentY = $doc->GetY();\n\t\t\t\t\t$doc->MultiCell($width, $doc->lineHeight, $value, $border, 'L');\n\t\t\t\t\tif($lineY < $doc->GetY()) $lineY = $doc->GetY() - $doc->lineHeight;\n\t\t\t\t\t$doc->SetXY($currentX + $width, $currentY);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$doc->Cell($width, $doc->lineHeight, $value, $border, 0, $align, $fill);\n\t\t\t\t\tif($lineY < $doc->GetY()) $lineY = $doc->GetY();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// set last column's width\n\t\t\t\t$widthLastCol = $width;\n\t\t\t}\n\t\t\t\n\t\t\t// at the end of the row set cursor to correct position\n\t\t\tif($lineY > $this->pageBreakThreshold) {\n\t\t\t\t$doc->addPage();\n\t\t\t\t$lineY = $doc->topMargin; \n\t\t\t}\n\t\t\t$doc->setXY($lineX, $lineY+$doc->lineHeight+$spacing);\n\t\t}\n\t\t$doc->Ln($doc->lineHeight +2);\n\t\t\n\t\t// write \"no data\" of if the table is empty, except header\n\t\tif(count($this->data) == 1)\t{\n\t\t\t$doc->Write($height, \"No data available.\");\n\t\t\t$doc->Ln();\n\t\t}\n\t\t\n\t\t// write last lines\n\t\tforeach($this->lastlines as $label => $info) {\n\t\t\t// calc widths\n\t\t\t$wCell1 = $totalWidth - $widthLastCol;\n\t\t\t$wCell2 = $widthLastCol;\n\t\t\t\n\t\t\t// set styles\n\t\t\t$align = 'R';\n\t\t\t$doc->setFontBold();\n\t\t\t\n\t\t\t$fill = 0;\n\t\t\tif($info[1] == 1) $border = 'B';\n\t\t\telseif($info[1] == 2) {\n\t\t\t\t$border = 'T';\n\t\t\t\t$doc->SetFillColor($this->headerBackgroundColor[0], $this->headerBackgroundColor[1], $this->headerBackgroundColor[2]);\n\t\t\t\t$fill = 1;\n\t\t\t}\n\t\t\telse $border = 0; \n\t\t\t\n\t\t\t// format values\n\t\t\tif($regex->isNumber($info[0])) {\n\t\t\t\tif($regex->isInteger($info[0])) {\n\t\t\t\t\t$info[0] = Data::formatInteger($info[0]);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$info[0] = Data::convertFromDb($info[0]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// write lines\n\t\t\t$doc->Cell($wCell1, $height, $label, $border, 0, $align, $fill);\n\t\t\t$doc->Cell($wCell2, $height, $info[0], $border, 1, $align, $fill);\n\t\t\t\n\t\t\t$doc->setFontStandard();\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "7bbd97947d2b4d5251f566a13ae69ff7", "score": "0.47593665", "text": "public function render_content() {\n $real_type = $this->type;\n\n if( isset( $this->input_attrs['type'] ) ){\n $this->type = $this->input_attrs['type'];\n }\n\n parent::render_content();\n\n $this->type = $real_type;\n echo \"<hr />\";\n }", "title": "" }, { "docid": "11aa384f41d5ac2998b441f25e499dcc", "score": "0.47555414", "text": "public function setOutputType($outputType) {\n\t\tif($outputType == 'json')\n\t\t\t$this->outputType = $outputType;\n\t}", "title": "" }, { "docid": "bc00ad23b415fba59f2bdbfbee7378df", "score": "0.4754954", "text": "function SetColLabelTextOrientation($textOrientation){}", "title": "" }, { "docid": "e2dc7ca610f26481ce6ff8265103c740", "score": "0.47366127", "text": "function setDataType($type) {\n $instance = $this->CI->ciwy->current_instance[$this->component_name];\n if (!array_key_exists($type, $this->data_type)) {\n echo $type . ' is not a valid dataType.<br />';\n } else {\n $this->CI->ciwy->component_config[$instance]['dataType'] = $type;\n }\n }", "title": "" }, { "docid": "6fee7beb3e0ca101f80c757d467e23c7", "score": "0.47364193", "text": "private function setCustomOptions(&$startLineIndex, &$endLineIndex)\n { \n $this->customOutputOptions = [\n 'type' => 'DubScript8',\n 'breaker' => '',\n 'tableHeaders' => [],\n 'tableCaptions' => [],\n 'tableContent' => [],\n 'tableFooter' => ''\n ];\n \n $linesCount = count($this->lines);\n for ($index = 0; $index < $linesCount; $index++) {\n $line = trim($this->lines[$index]);\n if (empty($line)) \n continue;\n \n if ($endLineIndex == 0) {\n if ($startLineIndex == 0)\n $startLineIndex = $index;\n\n if (preg_match('/FIM\\./u', $line)) {\n $endLineIndex = $index - 1;\n $this->customOutputOptions['breaker'] = $line;\n break;\n }\n }\n }\n \n for (++$index; $index < $linesCount; $index++) {\n $line = trim($this->lines[$index]);\n if (empty($line)) \n continue;\n \n $this->customOutputOptions['tableHeaders'][] = $line;\n if (count($this->customOutputOptions['tableHeaders']) == 3)\n break;\n }\n \n for (++$index; $index < $linesCount; $index++) {\n $line = trim($this->lines[$index]);\n if (empty($line)) \n continue;\n \n $this->customOutputOptions['tableCaptions'][] = $line;\n if (count($this->customOutputOptions['tableCaptions']) == 3)\n break;\n }\n \n $tblRowIndex = 0;\n $index++; \n while ($index < $linesCount) {\n $line = trim($this->lines[$index]);\n if (empty($line)) {\n $index++;\n continue;\n }\n \n if (strripos($line, \"_________\") > 0) { \n $this->customOutputOptions['tableFooter'] = $this->lines[$index];\n break;\n }\n \n $this->customOutputOptions['tableContent'][$tblRowIndex][] = $this->lines[$index];\n if (isset($this->lines[$index + 1]))\n $this->customOutputOptions['tableContent'][$tblRowIndex][] = $this->lines[$index + 1];\n else\n $this->customOutputOptions['tableContent'][$tblRowIndex][] = '';\n \n if (isset($this->lines[$index + 2]))\n $this->customOutputOptions['tableContent'][$tblRowIndex][] = $this->lines[$index + 2];\n else\n $this->customOutputOptions['tableContent'][$tblRowIndex][] = '';\n \n $tblRowIndex++;\n $index += 3;\n }\n }", "title": "" }, { "docid": "bc15c398aa90c980729f7ea52799ca97", "score": "0.47362453", "text": "function renderStatement($type, $data) {\n\t\textract($data);\n\t\t$aliases = null;\n\n\t\tswitch (strtolower($type)) {\n\t\t\tcase 'select':\n\t\t\t\treturn \"SELECT {$fields} FROM {$table} {$alias} {$joins} {$conditions} {$group} {$order} {$limit}\";\n\t\t\tbreak;\n\t\t\tcase 'create':\n\t\t\t\treturn \"INSERT INTO {$table} ({$fields}) VALUES ({$values})\";\n\t\t\tbreak;\n\t\t\tcase 'update':\n\t\t\t\tif (!empty($alias)) {\n\t\t\t\t\t$aliases = \"{$this->alias}{$alias} \";\n\t\t\t\t}\n\t\t\t\treturn \"UPDATE {$table} {$aliases}SET {$fields} {$conditions}\";\n\t\t\tbreak;\n\t\t\tcase 'delete':\n\t\t\t\tif (!empty($alias)) {\n\t\t\t\t\t$aliases = \"{$this->alias}{$alias} \";\n\t\t\t\t}\n\t\t\t\treturn \"DELETE FROM {$table} {$aliases}{$conditions}\";\n\t\t\tbreak;\n\t\t\tcase 'schema':\n\t\t\t\tforeach (array('columns', 'indexes') as $var) {\n\t\t\t\t\tif (is_array(${$var})) {\n\t\t\t\t\t\t${$var} = \"\\t\" . implode(\",\\n\\t\", array_filter(${$var}));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (trim($indexes) != '') {\n\t\t\t\t\t$columns .= ',';\n\t\t\t\t}\n\t\t\t\treturn \"CREATE TABLE {$table} (\\n{$columns}{$indexes})\";\n\t\t\tbreak;\n\t\t\tcase 'alter':\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "1a51cca6b56eda54beb3f6fd49c872c4", "score": "0.47278714", "text": "function SetColLabelAlignment($horiz, $vert){}", "title": "" }, { "docid": "5c68f6a5f311beb69b4dd90f442ed567", "score": "0.47274718", "text": "public function getColumnStyles() : array;", "title": "" }, { "docid": "5ead00eef454db17ffc32cf3ffae2190", "score": "0.47253013", "text": "function PrependColumn($varianttype){}", "title": "" }, { "docid": "f22dfc532087a1c10741091cb9d9b1b9", "score": "0.47150004", "text": "function AppendColumn(wxDataViewColumn &$column, $varianttype){}", "title": "" }, { "docid": "226a04a22f83183d6270972c6ff7ad2d", "score": "0.471426", "text": "function PMA_showColumnTypesInDataEditView($url_params, $showColumnType )\n{\n if(!$showColumnType) {\n $params = array('ShowFieldTypesInDataEditView' => 1);\n } else {\n $params = array('ShowFieldTypesInDataEditView' => 0);\n }\n $params = array(\n 'ShowFunctionFields' => $GLOBALS['cfg']['ShowFunctionFields'],\n 'goto' => 'sql.php');\n $this_other_url_params = array_merge($url_params, $params);\n if(!$showColumnType) {\n return ' : <a href=\"tbl_change.php' . PMA_generate_common_url($this_other_url_params) . '\">' . __('Type') . '</a>' . \"\\n\";\n }\n return ' <th><a href=\"tbl_change.php' . PMA_generate_common_url($this_other_url_params) . '\" title=\"' . __('Hide') . '\">' . __('Type') . '</a></th>' . \"\\n\";\n\n}", "title": "" }, { "docid": "2103cd32aa2d522a6eb5a8bd92238a1a", "score": "0.47050983", "text": "public static function getColumnDefinition($optionType) {\r\n\t\t$column = array(\r\n\t\t\t'autoIncrement' => false,\r\n\t\t\t'key' => false,\r\n\t\t\t'notNull' => false,\r\n\t\t\t'type' => 'text'\r\n\t\t);\r\n\t\t\r\n\t\tswitch ($optionType) {\r\n\t\t\tcase 'boolean':\r\n\t\t\t\t$column['notNull'] = true;\r\n\t\t\t\t$column['default'] = 0;\r\n\t\t\t\t$column['length'] = 1;\r\n\t\t\t\t$column['type'] = 'tinyint';\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 'integer':\r\n\t\t\t\t$column['notNull'] = true;\r\n\t\t\t\t$column['default'] = 0;\r\n\t\t\t\t$column['length'] = 10;\r\n\t\t\t\t$column['type'] = 'int';\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 'float':\r\n\t\t\t\t$column['notNull'] = true;\r\n\t\t\t\t$column['default'] = 0.0;\r\n\t\t\t\t$column['type'] = 'float';\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 'textarea':\r\n\t\t\t\t$column['type'] = 'mediumtext';\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 'birthday':\r\n\t\t\tcase 'date':\r\n\t\t\t\t$column['notNull'] = true;\r\n\t\t\t\t$column['default'] = '0000-00-00';\r\n\t\t\t\t$column['length'] = 10;\r\n\t\t\t\t$column['type'] = 'char';\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\treturn $column;\r\n\t}", "title": "" }, { "docid": "387a3ad81a82a5ce4d0434d6aeb7a59c", "score": "0.4704298", "text": "public function getFieldSet($type);", "title": "" }, { "docid": "7ce1b21a8e0a647eee62b29cc68bbf1c", "score": "0.47023425", "text": "private function setHeader($type)\n {\n switch ($type) {\n case 'HTML':\n header('Content-type: text/html; charset=utf-8');\n break;\n case 'XML':\n header('Content-type: text/xml; charset=utf-8');\n break;\n case 'JSON':\n header('Content-type: application/json');\n break;\n case '404':\n header('HTTP/1.0 404 Not Found');\n header('Content-type: text/html; charset=utf-8');\n break;\n }\n }", "title": "" }, { "docid": "d25da59bcdcb208ae83f9d1731240ce1", "score": "0.4700287", "text": "function createHorizontalTable()\n {\n if ($this->data)\n {\n $this->setStyle();\n $this->html=\"<table style=\\\"\".$this->customization[\"table_style\"].\"\\\">\";\n if($this->title)\n $this->html.=\"<tr><td colspan=\\\"\".count($this->data[0]).\"\\\" class=\\\"link_head\\\">\".$this->title.\"</td></tr>\";\n\n $this->setDisplayColumnNorder();\n\n if($this->set_column_heading)\n {\n foreach($this->customization[\"display_order\"] as $value)\n $this->html.=\"<th class=\\\"link_head\\\" style=\\\"\".$this->customization[\"th_style\"].\"\\\">\".$this->customization[\"display_columns\"][$value].\"</th>\";\n }\n\n $i=0;\n foreach($this->data as $key=>$value)\n {\n //want different formatting for alternate rows\n if($this->highlight)\n $class=($i=!$i)?\"row1\":\"row2\";\n $this->html.=\"<tr class=\\\"$class\\\" style=\\\"\".$this->customization[\"tr_style\"].\"\\\">\";\n foreach($this->customization[\"display_order\"] as $column)\n {\n $this->customization[\"column_style\"][$column]=($this->customization[\"column_style\"][$column])?$this->customization[\"column_style\"][$column]:\"text-align:center\";\n $this->html.=\"<td style=\\\"\".$this->customization[\"column_style\"][$column].\"\\\">\".$this->formatColumn($column,$this->data[$key][$column]).\"</td>\";\n }\n $this->html.=\"</tr>\";\n }\n\n $this->html.=\"</table>\";\n unset($this->title);\n return $this->html;\n }\n }", "title": "" }, { "docid": "07162f3275ccfbc700940caeca1699a9", "score": "0.46974862", "text": "function renderStatement($type, $data)\n {\n extract($data);\n\n \n \tswitch (strtolower($type)) {\n\t\t\tcase 'select':\n\t\t\t\treturn \"SELECT {$limit} {$fields} FROM {$table} {$alias} {$joins} {$conditions} {$order}\";\n\t\t\tbreak;\n\t\t\tcase 'update':\n\t\t\t\treturn \"UPDATE {$table} SET {$fields} {$conditions}\";\n\t\t\tbreak;\n\t\t\tcase 'delete':\n\t\t\t\treturn \"DELETE FROM {$table} {$conditions}\";\n\t\t\tbreak;\n\t\t}\n \n\n }", "title": "" }, { "docid": "1fc902b45787741cce687358f56e8f40", "score": "0.46908566", "text": "public function generateViewColumns($isView, $column)\n {\n $row = null;\n\n $name = $column->name;\n if ($isView) {\n switch ($column) {\n case $column->name == 'published':\n $row = \"'published:boolean',\";\n break;\n case $column->name == 'visible':\n $row = \"'visible:boolean',\";\n break;\n case $column->type === 'boolean':\n $row = \"'{$name}:boolean',\";\n break;\n default:\n $row = \"'{$name}',\";\n break;\n }\n } else {\n switch ($column) {\n case ($column->autoIncrement):\n case $column->name == 'position':\n $row = \"[\n 'attribute' => '{$name}',\n 'headerOptions' => ['class' => 'col-sm-1']\n ],\";\n break;\n case (($column->type == 'integer') || ($column->type == 'string' && $column->size && $column->size <= 255)):\n $row = \"'{$name}',\";\n break;\n default:\n break;\n }\n }\n return $row ? $row . \"\\n\" : $row;\n }", "title": "" }, { "docid": "3917997e9c2fb5b3f395fc856a015a1d", "score": "0.46873572", "text": "public function setType($type){ }", "title": "" }, { "docid": "2624877a0f35f0780f16e478913c2b65", "score": "0.4678838", "text": "function setDisplayColumnNorder()\n {\n foreach($this->data[0] as $key=>$value)\n {\n if(!$this->customization[\"display_columns\"][$key])\n {\n $this->customization[\"display_columns\"][$key]=$key;\n }\n }\n //we want column1, column2 array for the order of display, if not available in report customisation show the same order returned by db\n $this->customization[\"display_order\"]=array_keys($this->data[0]);\n }", "title": "" }, { "docid": "7d8b88c84f9d58f7103c77dbb9ff5412", "score": "0.46753985", "text": "private function _renderColumnHeaders(){\n\t\t$style = $this->getCellHeaderStyle();\n\t\tif($style!==null){\n\t\t\t$preparedStyle = $this->_prepareStyle($style->getStyles());\n\t\t} else {\n\t\t\t$preparedStyle = null;\n\t\t}\n\t\t$headers = $this->getColumnHeaders();\n\t\t$numberColumns = count($headers);\n\t\tif($numberColumns>0){\n\t\t\tfor($i=1;$i<$this->_row;$i++){\n\t\t\t\t$this->_worksheet->mergeCellsByColumnAndRow(0, $i, $numberColumns-1, $i);\n\t\t\t}\n\t\t\tfor($i=0;$i<$numberColumns;$i++){\n\t\t\t\t$this->_worksheet->getColumnDimensionByColumn($i)->setAutoSize(true);\n\t\t\t}\n\t\t}\n\t\tforeach($headers as $header){\n\t\t\t$cellStyle = $this->_appendToOutput($header);\n\t\t\tif($preparedStyle!==null){\n\t\t\t\t$this->_extendStyle($preparedStyle);\n\t\t\t\t$cellStyle->applyFromArray($preparedStyle);\n\t\t\t}\n\t\t}\n\t\t$this->_numberColumns = $numberColumns;\n\t\t$this->_lineFeed();\n\t}", "title": "" }, { "docid": "bdfd86a3fdb8705c4c8272f28dcad129", "score": "0.4671124", "text": "public function Column(array $config);", "title": "" }, { "docid": "827f70407a573ad5a07ef279976fa8ed", "score": "0.46599498", "text": "protected function storeColsAndRowsInfo()\n {\n $this->appendRecord('Defcolwidth');\n\n foreach ($this->colInfo as $item) {\n $this->appendRecord('Colinfo', array($item));\n }\n\n foreach ($this->rowInfo as $item) {\n $this->appendRecord('Row', array($item));\n }\n }", "title": "" }, { "docid": "b85c58e3724843e23ebcfc5bb5bad2c5", "score": "0.4656917", "text": "protected function addColumnType(): void\n {\n CRUD::addColumn([\n 'name' => 'type_id',\n 'label' => 'Type',\n 'type' => 'select',\n 'model' => 'App\\Models\\CodeItem',\n 'entity' => 'type',\n 'attribute' => 'description',\n 'visibleInTable' => true,\n 'visibleInModal' => true,\n 'visibleInShow' => true,\n 'visibleInExport' => true,\n 'searchLogic' => function (Builder $query, $column, $searchTerm) {\n $query->orWhereHas('type', function ($q) use ($column, $searchTerm) {\n $q->where(\n 'description',\n 'iLike',\n '%' . $searchTerm . '%'\n );\n });\n }\n ]);\n }", "title": "" }, { "docid": "8fcd6156d09f65a972979f202f99bcb3", "score": "0.4641492", "text": "function setColumnType($col, $type) {\n\t\t$this->colType[$col] = $type;\n\t}", "title": "" }, { "docid": "1b86d0a9a6eecf69dcb73ac7812e2f44", "score": "0.46352464", "text": "function getColumn();", "title": "" }, { "docid": "be3d49b4df225f8ad2676a4ab3c7ca29", "score": "0.46291047", "text": "protected function _prepareColumns()\n {\n \t// Checkbox\n \t$checkboxColumnBody = new Lumia_DataGrid_Body_Checkbox('exam_id');\n \t$checkboxColumnHeader = new Lumia_DataGrid_Header_Checkbox();\n $this->addColumn(new Lumia_DataGrid_Column($checkboxColumnBody, $checkboxColumnHeader));\n \n // Code\n $codeColumnBody = new Lumia_DataGrid_Body_Text('exam_code');\n $codeColumnHeader = new Lumia_DataGrid_Header_Text('ExamListView:@Code');\n $this->addColumn(new Lumia_DataGrid_Column($codeColumnBody, $codeColumnHeader));\n \n // Subject\n $subjectColumnBody = new Lumia_DataGrid_Body_Text('subject_name');\n $subjectColumnHeader = new Lumia_DataGrid_Header_Text('ExamListView:@Subject');\n $this->addColumn(new Lumia_DataGrid_Column($subjectColumnBody, $subjectColumnHeader));\n \n // Start time\n $startTimeColumnBody = new Lumia_DataGrid_Body_Date('exam_management_start_time');\n $startTimeColumnBody->setOptions(array('dateFormat' => 'dd/MM/yyyy HH:mm'));\n $startTimeColumnHeader = new Lumia_DataGrid_Header_Text('ExamListView:@Start time');\n $this->addColumn(new Lumia_DataGrid_Column($startTimeColumnBody, $startTimeColumnHeader));\n \n // Status\n $statusColumnBody = new Admin_DataGrid_Exam_Body_Status('exam_status');\n $statusColumnHeader = new Lumia_DataGrid_Header_Text('ExamListView:@Status');\n $this->addColumn(new Lumia_DataGrid_Column($statusColumnBody, $statusColumnHeader));\n \n // Action\n $actionColumnBody = new Admin_DataGrid_Exam_Body_Action();\n $actionColumnHeader = new Lumia_DataGrid_Header_Text();\n $this->addColumn(new Lumia_DataGrid_Column($actionColumnBody, $actionColumnHeader));\n }", "title": "" }, { "docid": "a8ee59f1784c8e27c7f80dc4acda4f7b", "score": "0.46275905", "text": "function GetColumnCount(){}", "title": "" }, { "docid": "a8ee59f1784c8e27c7f80dc4acda4f7b", "score": "0.46275905", "text": "function GetColumnCount(){}", "title": "" }, { "docid": "a8ee59f1784c8e27c7f80dc4acda4f7b", "score": "0.46275905", "text": "function GetColumnCount(){}", "title": "" }, { "docid": "a8ee59f1784c8e27c7f80dc4acda4f7b", "score": "0.46275905", "text": "function GetColumnCount(){}", "title": "" }, { "docid": "a8ee59f1784c8e27c7f80dc4acda4f7b", "score": "0.46275905", "text": "function GetColumnCount(){}", "title": "" }, { "docid": "a8ee59f1784c8e27c7f80dc4acda4f7b", "score": "0.46275905", "text": "function GetColumnCount(){}", "title": "" }, { "docid": "4f92192b8c4d418e651838b7e5647108", "score": "0.46167454", "text": "public function getColumns();", "title": "" }, { "docid": "4f92192b8c4d418e651838b7e5647108", "score": "0.46167454", "text": "public function getColumns();", "title": "" }, { "docid": "4f92192b8c4d418e651838b7e5647108", "score": "0.46167454", "text": "public function getColumns();", "title": "" }, { "docid": "f41fcbe033f13ace23d0b6681da472ab", "score": "0.46122825", "text": "public function setType($type);", "title": "" }, { "docid": "f41fcbe033f13ace23d0b6681da472ab", "score": "0.46122825", "text": "public function setType($type);", "title": "" }, { "docid": "f41fcbe033f13ace23d0b6681da472ab", "score": "0.46122825", "text": "public function setType($type);", "title": "" }, { "docid": "f41fcbe033f13ace23d0b6681da472ab", "score": "0.46122825", "text": "public function setType($type);", "title": "" }, { "docid": "f41fcbe033f13ace23d0b6681da472ab", "score": "0.46122825", "text": "public function setType($type);", "title": "" }, { "docid": "f41fcbe033f13ace23d0b6681da472ab", "score": "0.46122825", "text": "public function setType($type);", "title": "" }, { "docid": "f41fcbe033f13ace23d0b6681da472ab", "score": "0.46122825", "text": "public function setType($type);", "title": "" }, { "docid": "f41fcbe033f13ace23d0b6681da472ab", "score": "0.46122825", "text": "public function setType($type);", "title": "" }, { "docid": "f41fcbe033f13ace23d0b6681da472ab", "score": "0.46122825", "text": "public function setType($type);", "title": "" } ]
9379b0170277979a278e7113a23b37c1
Display a listing Of Baccount.
[ { "docid": "80366ba522518af73ff9bfd68989dbc6", "score": "0.0", "text": "public function DataTableBaccount()\n {\n $baccount = Baccount::all();\n return Datatables::of($baccount)\n ->addColumn('action', function($item){\n return '<center><a href=\"'.url('admin/edit-bank-account').'/'.$item->id.'\" class=\"btn btn-warning\" data-title=\"Edit Akun Bank\" title=\"Edit Akun Bank\"><i class=\"fa fa-edit\"></i></a> <a href=\"'.url('admin/delete_baccount').'/'.$item->id.'\" class=\"btn btn-danger\" data-title=\"Hapus Akun Bank\" title=\"Hapus AKun Bank\" id=\"delete_akun_bank\"><i class=\"fa fa-trash-o\"></i></center>';\n })\n ->addColumn('bank_logo', function($bank_logo){\n return '<center><img src=\"'.$bank_logo->src.'\" width=\"65px\" height=\"30px\"></center>';\n })->rawColumns(['action','bank_logo'])->make(true);\n }", "title": "" } ]
[ { "docid": "92399114596b13e369015f80d73449bb", "score": "0.74165326", "text": "public function actionIndex()\n\t{\n\t\t$searchModel = new BUserAccountSearch();\n\t\t$dataProvider = $searchModel;\n\t\tUrl::remember(Url::current(), 'account');\n\t\treturn $this->render('index', [\n\t\t\t'searchModel' => $searchModel,\n\t\t\t'dataProvider' => $dataProvider,\n\t\t]);\n\t}", "title": "" }, { "docid": "8b6f204c05982b011557792f48043cca", "score": "0.7023188", "text": "public function account_list()\r\n {\r\n // // $result = $usersLogic->account($this->user_id, $type);\r\n\r\n // if ($_GET['is_ajax']) {\r\n // \treturn $this->fetch('ajax_account_list');\r\n // }\r\n return $this->fetch();\r\n }", "title": "" }, { "docid": "ae0757bdb107198bd3a9bff984456148", "score": "0.70140094", "text": "public function index()\n {\n $menu = 'baccount';\n return view('admin.baccount.index', compact('menu'));\n }", "title": "" }, { "docid": "dc507ab7d7fac2a1e02824486b33143e", "score": "0.6995515", "text": "public function index()\n {\n //\n $accounts = Account::all();\n return view('accounts.list', compact('accounts'));\n }", "title": "" }, { "docid": "83a7c4c3b18ab5dcce1e5aaebdfdf043", "score": "0.6950939", "text": "public function index()\n {\n return view('ftp::ftp_accounts.list', [\n 'ftpAccounts' => FtpAccount::paginate(20)\n ]);\n }", "title": "" }, { "docid": "feaaf949d4e394848caff754904f8213", "score": "0.690409", "text": "public function index()\n {\n $accounts = Account::latest()->paginate();\n return view('system.accounts.index',compact(['accounts']));\n }", "title": "" }, { "docid": "ad460fd67b7d72a1e5bdc9ac0f3bf379", "score": "0.6903205", "text": "public function show(accountheads $accountheads)\n {\n \n }", "title": "" }, { "docid": "a9c8a1722f5a5e5bbdc54244c97ea5ee", "score": "0.6871931", "text": "public function show_bank_account()\n {\n if ($this->check_authentication()) {\n\n $accounts = CenterAccount::where('center_id', Auth::user()->center->id)->get();\n $total_courses = $this->get_center_courses();\n $total_trainers = $this->get_center_trainers();\n $total_admins = $this->get_center_trainers();\n $total_students = $this->get_center_students();\n return view('center.show-banks-accounts', compact('accounts', 'total_courses', 'total_trainers', 'total_admins', 'total_students'));\n } else {\n return $this->external_error_page();\n }\n }", "title": "" }, { "docid": "b20bbdc5242c2b3925978b7146ce1a00", "score": "0.6868127", "text": "public function index()\n {\n $models = $this->models->allAccount();\n\n return view('account_index', compact('models'));\n }", "title": "" }, { "docid": "85e861931b02c3548bb0b93eb478a1a6", "score": "0.68517", "text": "public function index()\n {\n $browsings = Infor_Temp::paginate(10);\n $classes = Classes::all();\n $user = User::Where('is_admin',2)->paginate(10);\n return view('admin/browsingAccount/index')->with(compact(\"browsings\",\"classes\",\"user\"));\n }", "title": "" }, { "docid": "1f7dfa1516e629113d6f3ce9cc1b7954", "score": "0.68283784", "text": "public function list()\n {\n return $this->bankService->list();\n }", "title": "" }, { "docid": "4e38f0ee85f6e7fa8626afd71480280b", "score": "0.68208855", "text": "public function actionIndex()\n {\n $request = Yii::$app->getRequest();\n if (!$request->getQueryParam('sort')) {\n $request->setQueryParams(['sort' => '-id']);\n }\n $dataProvider = new ActiveDataProvider([\n 'query' => AccountBook::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "a89dfee5ce2a94c183fd76d13c0ec9a7", "score": "0.6811327", "text": "public function show(BankAccount $bankAccount)\n {\n //\n }", "title": "" }, { "docid": "9cf5b099aa94a24c26c8754e3a87bbac", "score": "0.6805045", "text": "public function index()\n\t{\n\t\t$include = array('blacklist' => Blacklist::paginate(10));\n\n\t\treturn View::make('admin.blacklist.list', $include);\n\t}", "title": "" }, { "docid": "e5df81dc21e697a197f0f03fc1aaaad0", "score": "0.67409784", "text": "public function index()\n {\n return AccountResource::collection($this->service->list());\n }", "title": "" }, { "docid": "081342dfaecdcfc1eb23c602328ebead", "score": "0.67239517", "text": "public function indexAction()\n {\n $result = $this->_api->getAccountBalance($this->_auth->UniqueRef);\n \n if (true === $result->Status)\n $this->view->balance = $result->Balance;\n\t\n }", "title": "" }, { "docid": "0a8d4e73eb77c62a4d64e59304a1adf6", "score": "0.67206645", "text": "function index()\n\t{\n\n $this->get_all_accounts('User');\n\n\t}", "title": "" }, { "docid": "1a85a86e27cbde1ff0fcca8fc504a147", "score": "0.6716302", "text": "public function index()\n\t{\n\t\t$subaccount = Subaccount::paginate(5);\n\t\treturn View::make('subaccount.index')->with('subaccount',$subaccount);\n\t}", "title": "" }, { "docid": "5636cbdb0c06590e039af609cbbc9f2d", "score": "0.6713727", "text": "public function index(){\n $accounts = User::paginate(20);\n return ViewController::view( 'admin.account.index', 'Quản lý tài khoản', 'Trang quản lý tài khoản người dùng')\n ->with(['accounts' => $accounts]);\n }", "title": "" }, { "docid": "2b7dbbf5c274822684761da17d87f37e", "score": "0.66943", "text": "public function actionIndex() {\n $this->render('account/index', array());\n }", "title": "" }, { "docid": "4e43d961b022594e5e4318d37ffd7160", "score": "0.6683495", "text": "public function index()\n {\n $accounts = Account::all(); // visos saskaitos\n $accounts = $accounts->sortBy('eur'); // objektas - kolekcija\n // https://laravel.com/docs/8.x/collections#available-methods\n return view('account.index', ['accounts' => $accounts]);\n }", "title": "" }, { "docid": "383809e970ab9220fbfdbcb2015dcea8", "score": "0.667475", "text": "public function index()\n {\n $accountheads = accountheads::all();\n\n return view('account-heads', compact('accountheads'));\n }", "title": "" }, { "docid": "7cfa724ced7cc0a44babb72f778d473c", "score": "0.6661893", "text": "public function index()\n {\n\n $accounts = Account::where('user_id', auth()->user()->id)->orderBy('id','desc')->paginate(20);\n\n return view('beneficiaries/index', compact('accounts'));\n }", "title": "" }, { "docid": "a5cc68eec025f7f95137f5493c0d8bf2", "score": "0.6659905", "text": "public function index()\n\t{\n\t\tif (Auth::check()) {\n\n\t\t\t$userinfo = ['username'=>Auth::user()->name];\n\t\t\t$userinfo['billinfo'] = Userinfo::where('users_id','=',Auth::user()->id)->get()->toArray();\n\t\t\t\n\t\t\tif (!array_key_exists('0', $userinfo['billinfo'])) {\n\n\t\t\t\t\n\t\t\t\t$userinfo['billinfo'] = null;\n\n\t\t\t}\t\n\t\t\t\n\t\t\treturn view('frontend.account.account',$userinfo);\n\t\t}\n\t}", "title": "" }, { "docid": "0d91c3e0c2778dbfccaa0d006f8f8a7a", "score": "0.6649941", "text": "public function index()\n {\n $sortBy = \\Request::get('sortBy');\n $direction = \\Request::get('direction', 'asc');\n $showLeft = \\Request::get('showLeft', 0);\n $users = $this->userRepository->getPaginated(compact('sortBy', 'direction', 'showLeft'));\n return \\View::make('account.index')->withUsers($users);\n }", "title": "" }, { "docid": "9ab6c111d087b4be9e86921e5b8f7d6f", "score": "0.66468656", "text": "public function index()\n {\n $bills = Bill::with(\n 'user',\n 'user.profiles',\n // $order->title\n 'order',\n 'order.user',\n 'order.user.profiles',\n 'order.teacher',\n 'order.teacher.profiles',\n 'order.agency',\n 'order.agency.profiles'\n )\n ->orderBy('id', 'desc')\n ->paginate(100);\n\n return view('bills.index', compact('bills'));\n }", "title": "" }, { "docid": "47788c7db33a58623e475fb948e39b7b", "score": "0.6637752", "text": "public function actionIndex()\n {\n\t\t$this->layout = 'myaccount';\n\t\t\n $searchModel = new BookingSearch();\n\t\t$searchModel->customer_id = Yii::$app->user->id;\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "cc7451bad7c1e36f22e8cea1feb53957", "score": "0.66342825", "text": "public function index()\n {\n $data['current'] = 'accountIndex';\n $data['title'] = $this->lang->line('account.title_index');\n $data['acct'] = $this->account_model->get_acct('grouped');\n \n $this->load->view('templates/header', $data);\n $this->load->view('account/index', $data);\n $this->load->view('templates/footer', $data);\n }", "title": "" }, { "docid": "2e55ce63790f3f71c919f2289d8e242d", "score": "0.661942", "text": "public function index()\n {\n $bills = Bill::with([('user'),('product'), ('provider')])->get()->sortByDesc('id');\n\n return view('admin.bill', compact('bills'));\n }", "title": "" }, { "docid": "c65bc4324011f458628ebbabcaae82b0", "score": "0.66132426", "text": "public function index()\n\t{\n\t\t$records = $this->collection_model->find_all();\n\t\tTemplate::set('records', $records);\n\t\tTemplate::set('toolbar_title', 'Cash Collection Details');\n\n //Template::set_view('account/account/index');\n\t\tTemplate::render();\n\t}", "title": "" }, { "docid": "e3389a1fe78e6a8f0e421ab0d147a5e5", "score": "0.6610206", "text": "public function index()\n {\n $data['category'] = AccountCategory::all();\n $data['title'] = AccountTitle::orderBy('name')->get();\n $data['subtitle'] = AccountSubtitle::orderBy('name')->get();\n return view('collection::rate.select_account', compact('data'))->with('base', $this->base);\n }", "title": "" }, { "docid": "f5a3831d4e4ff511346f67e26527024a", "score": "0.65923595", "text": "public function index()\n\t{ \n\t\t$beneficiaries = Beneficiaries::where('user_id', auth()->user()->id)->get();\n\t return view('user.account', compact('beneficiaries'));\n\t}", "title": "" }, { "docid": "aecb3b1b58ecefe26d8b2bf3d217b0c5", "score": "0.65919095", "text": "public function index()\n {\n $accounts = account::fetchAccounts();\n\n $branches = Branch::fetchBranches();\n\n $natures = account_nature::fetchAccountNatures();\n\n\n $edit_branches = branch::where('company_id','=',auth()->user()->company_id)->pluck('branch_name','id');\n $edit_natures = account_nature::pluck('nature_name','id');\n\n\n return view('pages.account.account',array(\n\n 'branches' => $branches,\n 'natures' => $natures,\n 'accounts' => $accounts,\n 'edit_branches' => $edit_branches,\n 'edit_natures' => $edit_natures,\n ));\n }", "title": "" }, { "docid": "c59402833f572eb1be30320098a3e4b0", "score": "0.6584846", "text": "public function index()\n {\n $vendor_accounts=VendorAccount::latest()->get();\n return view('admin.accounts.index',compact('vendor_accounts'));\n }", "title": "" }, { "docid": "dec5c63c4320cad5693a5858392738b3", "score": "0.6581405", "text": "public function listBank()\n {\n return $this->dao->listBank();\n }", "title": "" }, { "docid": "eda2f8b1f012b17b40c1ef0f5fef8177", "score": "0.6580261", "text": "public function show(Account $account)\n {\n //\n }", "title": "" }, { "docid": "eda2f8b1f012b17b40c1ef0f5fef8177", "score": "0.6580261", "text": "public function show(Account $account)\n {\n //\n }", "title": "" }, { "docid": "eda2f8b1f012b17b40c1ef0f5fef8177", "score": "0.6580261", "text": "public function show(Account $account)\n {\n //\n }", "title": "" }, { "docid": "eda2f8b1f012b17b40c1ef0f5fef8177", "score": "0.6580261", "text": "public function show(Account $account)\n {\n //\n }", "title": "" }, { "docid": "c898ad8608dd040b61048d61ca9a22da", "score": "0.657456", "text": "public function index()\n {\n $blacklists = Blacklist::where(\"company_id\",company_id())\n\t\t\t\t\t\t\t ->orderBy(\"id\",\"desc\")->get();\n return view('backend.blacklist.list',compact('blacklists'));\n }", "title": "" }, { "docid": "345f59e0e3925e0addd8f50681abc2b2", "score": "0.655333", "text": "public function index()\n {\n $billUsers = BillUser :: all();\n return view('backend.admin.online_bills.index',['bill_users' => $billUsers]);\n }", "title": "" }, { "docid": "c776d2914a5d94b3383ed040b6f046c4", "score": "0.6548818", "text": "public function index()\n {\n\n\n $account = Account::orderBy('id')->paginate(10);\n return view('account.index')->with('accounts', $account);\n }", "title": "" }, { "docid": "ec249a9965aa138b9df4d1186d357ee3", "score": "0.6547202", "text": "public function index()\n {\n return Bank::all();\n }", "title": "" }, { "docid": "6380c994cf7cb0546885d0e118023984", "score": "0.6518943", "text": "public function index()\n {\n $banks=Bank::where('status',1)->orderBy('id','DESC')->get();\n return view('admin.company.bank.view',compact('banks'));\n }", "title": "" }, { "docid": "2aa3ed5024431ad4a7c44a2c89271d72", "score": "0.6516895", "text": "public function index()\n {\n $banks = Bank::orderBy('id', 'ASC')->paginate(10);\n return view('banks.index')->with('banks', $banks);\n }", "title": "" }, { "docid": "369bd06efaea65305d1e8d4e8fd1d049", "score": "0.6506877", "text": "public function index()\n {\n return view('account::account', [\n 'data' => $this->account->show(Auth::user()->id)\n ]);\n }", "title": "" }, { "docid": "88710415ed259d15bb08a46fd91f95ad", "score": "0.6506156", "text": "public function index()\n {\n $accounts = Account::where('user_id', Auth::id())->get();\n $accounts->load('currency', 'accountType');\n return Inertia::render('Accounts/Accounts', [\n 'accounts' => $accounts\n ]);\n }", "title": "" }, { "docid": "4f2f6493997d3813c6c7ed33044ff291", "score": "0.64981186", "text": "public function index()\n {\n $accounts = Account::orderBy('created', 'desc')->get();\n return view('account::index', compact('accounts'))->with('i', (request()->input('page', 1) - 1) * 5);\n }", "title": "" }, { "docid": "f9ee2595a0f8ddd7f14a44b74047224e", "score": "0.64926684", "text": "public function index()\n {\n $bill = Bill::all();\n return view('admin.bill.list_bill',['bill'=>$bill]);\n }", "title": "" }, { "docid": "53aa517f6ea528ae954eef5a74fca39f", "score": "0.6484431", "text": "public function index()\n {\n $banks = Bank::all();\n\n return view('admin.banks.index')->with('banks', $banks);\n }", "title": "" }, { "docid": "19dae0c38eaaac2de698b0998802a57e", "score": "0.6466555", "text": "public function bank_accounts() { \n $data['page'] = 'Maintenance';\n\t\t$data['page_title'] = 'Bank Accounts Maintenance';\n $data['page_module'] = 'finance';\t\n\t\t$data['bank_name'] = $this->Maintenance_Bank_Model->bank_name_list();\n\t\t$data['bank_info'] = $this->Maintenance_Bank_Model->bankAccount_List();\n\t\t$data['fpo'] = $this->Fpo_Model->fpoList();\n $this->load->view('finance/banking/maintenance/bank_accounts', $data); \n\t}", "title": "" }, { "docid": "7cfc1298566d25b7eb5dfddee3fe4dea", "score": "0.64652276", "text": "public function index()\n {\n $bank = BankModel::paginate(20);\n return view('sdm::master.bank.index',compact('bank'))\n ->with('i', (request()->input('page', 1) - 1) * 5);\n }", "title": "" }, { "docid": "d4276184b6f782226a07c158f2a778c9", "score": "0.6435761", "text": "public function index()\n {\n return Inertia::render('Accounts/Index', [\n 'filters' => Request::all('search', 'trashed'),\n 'accounts' => Account::filter(Request::only('search', 'trashed'))\n ->orderBy('id', 'desc')\n ->paginate()\n ]);\n }", "title": "" }, { "docid": "3af2d6cd4c9feee9e56b117202c0bf44", "score": "0.6424356", "text": "public function index() {\n $model=D(\"Serialnumber\");\n $list=$model->Authorize();\n $this->assign(\"list\", $list);\n $this->display();\n }", "title": "" }, { "docid": "2937166e8726f6f79cfbdc6da9371411", "score": "0.6423864", "text": "public function index()\n {\n $accounts=Accounts::all();\n\n return view('account.index')->with('accounts',$accounts);\n }", "title": "" }, { "docid": "238e539e422a30a7295d43f259a89dab", "score": "0.6419795", "text": "public function actionIndex()\n {\n $searchModel = new AccountsSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n $accounts = Accounts::find()->where(['user_id'=>Yii::$app->user->identity->id])->all();\n $display_names = ArrayHelper::map($accounts,'display_name','display_name');\n\n\n $user_names = ArrayHelper::map($accounts,'username','username');\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n 'display_names'=>$display_names,\n 'usernames'=>$user_names\n ]);\n }", "title": "" }, { "docid": "1320b8a7088ebff260af14784622d399", "score": "0.64109653", "text": "public function index()\n {\n $users = User::where('role_id','<>',1)->get();\n return view(\"user.displayAccounts\", ['users' => $users]);\n }", "title": "" }, { "docid": "5ac8dfaf80399ad9fe4527ee53a566ab", "score": "0.64088994", "text": "public function index()\n {\n //fetch all useraccounts\n $useraccounts=useraccount::orderby('created_at','desc')->get();\n\n //pass useraccounts data to view\n return view('useraccounts.index',['useraccounts'=>$useraccounts]);\n }", "title": "" }, { "docid": "f1cd7dce0dea25d71ade0333d4685479", "score": "0.63898826", "text": "public function index()\n {\n // print_r(Auth::user());\n\n $accounts = UserAccount::where('is_active', true)->where('account_type',1)->where('user_id', Auth::user()->id)->orderBy('account_type','ASC')->get();\n // echo Auth::user()->id;\n // print_r($accounts);die;\n return view('account/index')->with(['accounts'=>$accounts]);\n }", "title": "" }, { "docid": "b4324479a8949a6f6df7f63098ac96d4", "score": "0.6379322", "text": "function listUserAccounts(){\n\t\t\t// Typically, students and even teachers will get an empty list in response, \n\t\t\t// only account admins can view the accounts that they are in.\n\t\t\t$response = $this->curlGet(\"accounts/\");\n\t\t\treturn $response;\n\t\t}", "title": "" }, { "docid": "267740cd8badd4c019d5e70d8bba1826", "score": "0.6378256", "text": "function getaccounts()\n {\n \n $a = new ACCOUNT();\n $filter = null;\n \n if ($this->apidata[\"search_string\"])\n {\n $filter[\"login\"] = $this->apidata[\"search_string\"];\n $filter[\"name\"] = $this->apidata[\"search_string\"];\n }\n \n $results = $a->search($filter);\n\n for ($i=0;$i<$results[\"count\"];$i++)\n {\n\n \t//skip ourselves\n \tif ($results[$i][\"id\"]==USER_ID) continue;\n \n $arr = array();\n $arr[\"id\"] = $results[$i][\"id\"];\n $arr[\"name\"] = $results[$i][\"full_name\"];\n $arr[\"login\"] = $results[$i][\"login\"];\n \n $this->PROTO->add(\"account\",$arr);\n\n }\n \n \n }", "title": "" }, { "docid": "82d935dfdad1123421f96389ec963e8d", "score": "0.6375631", "text": "public function index(){\n $bills = Bill::orderBy('id')->paginate(10);\n return view('bill.index')->with('bills', $bills);\n }", "title": "" }, { "docid": "04d5b1cc9c1c0b138fe50ede77c0b845", "score": "0.6364096", "text": "public function bank_accounts()\n {\n $data['page'] = 'Maintenance';\n $data['page_title'] = 'Bank Accounts Maintenance';\n $data['page_module'] = 'finance';\n $data['bank_name'] = $this->Finance_Model->bank_name_list();\n $data['bank_info'] = $this->Finance_Model->bankAccount_List();\n $data['chart_master'] = $this->Finance_Model->gl_ChartMasterList();\n $this->load->view('finance/banking/maintenance/bank_accounts', $data);\n }", "title": "" }, { "docid": "af3cbf52745d71c75550d7c88cd40c06", "score": "0.63613886", "text": "public function index()\n {\n $Account = new Account();\n return view('settlement_accounts.index', ['model' => $Account->allData(\\request()->get('search'))]);\n }", "title": "" }, { "docid": "dd77e6f5438aa8a2cb72ef8326880f7f", "score": "0.635901", "text": "public function index()\n {\n return $this->render('account/account.html.twig', []);\n }", "title": "" }, { "docid": "769943c03663818c64dcdafeccb99550", "score": "0.6349667", "text": "public function list()\n {\n $annonce= $this->getDoctrine()->getRepository(Annonce::class)->findAll();\n\n\n return $this->render('annonce/list.html.twig', [\n 'annonces' => $annonce,\n ]);\n }", "title": "" }, { "docid": "781ec8a566cdede274fb42ea6f86d424", "score": "0.634097", "text": "public function index()\n {\n $bills = Bill::all();\n return view ('admin.bill.index',compact('bills'));\n\n }", "title": "" }, { "docid": "4bbd6c6f41902294e31c198f7983207c", "score": "0.6337905", "text": "public function bankaccounts() { \n $data['page'] = 'Transaction';\n\t\t $data['page_title'] = 'Bank Accounts';\n $data['page_module'] = 'finance';\t\t\n $this->load->view('finance/banking/transaction/bank_accounts', $data); \n\t}", "title": "" }, { "docid": "ac20f158a828923b2bd99b9a9b97d6d1", "score": "0.63275295", "text": "public function index()\n {\n $list = Bill_detail::paginate(10);\n return view('admin.bill_details.index', ['list' => $list]);\n }", "title": "" }, { "docid": "a690c468deb2f125d21510b88fa34732", "score": "0.6324355", "text": "public function bankList($limit = 0, $start = 0){\n//<!-- Below line is customized to see all type of users for Approver in Cutomer list section(All users) Tab -->\n $query = $this->db->order_by('id', 'desc')->limit($limit, $start)->get_where('bank', ['created_by' => '0']);\n\t\treturn $query;\n }", "title": "" }, { "docid": "13f1fbeb2427c6c0ea5aa598a56157a4", "score": "0.6322601", "text": "public function index()\n {\n $data = Organizer::dataForPaginate(['*'], function ($o) {\n $o->t = '<i class=\"glyphicon glyphicon-unchecked\"></i>';\n if ($o->bank && $o->account && $o->headline) {\n $o->t = '<i class=\"glyphicon glyphicon-check\"></i>';\n }\n $o->t_ = '<i class=\"glyphicon glyphicon-unchecked\"></i>';\n if ($o->t_publishable_key && $o->t_secret_key) {\n $o->t_ = '<i class=\"glyphicon glyphicon-check\"></i>';\n }\n $o->p = '<i class=\"glyphicon glyphicon-unchecked\"></i>';\n if ($o->paypal_client_id && $o->paypal_client_secret) {\n $o->p = '<i class=\"glyphicon glyphicon-check\"></i>';\n }\n });\n return $this->dataWithPagination($data);\n }", "title": "" }, { "docid": "76f6d44ad5672d5ab711020c8b3da9ed", "score": "0.6322233", "text": "public function list_account() {\n /* construct the sql SELECT statement in this format\n * SELECT ...\n * FROM ...\n * WHERE ...\n */\n\n $sql = \"SELECT * FROM \" . $this->tblAccounts;\n\n //execute the query\n $query = $this->dbConnection->query($sql);\n\n // if the query failed, return false. \n if (!$query)\n return false;\n\n //if the query succeeded, but no account was found.\n if ($query->num_rows == 0)\n return 0;\n\n //handle the result\n //create an array to store all returned albums\n $accounts = array();\n\n //loop through all rows in the returned accounts\n while ($obj = $query->fetch_object()) {\n $account = new Account(stripslashes($obj->id), stripslashes($obj->client_id), stripslashes($obj->account_number), stripslashes($obj->balance), stripslashes($obj->routing_number), stripslashes($obj->account_type));\n //set the id for the account\n $account->setID($obj->id);\n\n //add the account into the array\n $accounts[] = $account;\n }\n return $accounts;\n }", "title": "" }, { "docid": "8a6fa32828a9fd3682ca64e168802c0f", "score": "0.6321742", "text": "public function index() {\n $banks = $this->bankModel->findAll();\n return view('banks.index', ['banks' => $banks]);\n }", "title": "" }, { "docid": "461b7b5ab3800140836f5c767fe726ee", "score": "0.6319791", "text": "public function index()\n {\n //\n \n $bike_detail = BikeDetail::all();\n return view('user.bike-listing',compact ('bike_detail'));\n \n }", "title": "" }, { "docid": "03deb6d7ea12ba1a70141121dec908d5", "score": "0.631678", "text": "public function index()\r\n {\r\n $this->billing->pushCriteria(AffiliateCriteria::class);\r\n $this->billing->scopeQuery(function($query){\r\n $query->addSelect(BillingTransformer::select());\r\n $query = BillingTransformer::where($query);\r\n $query = BillingTransformer::order($query);\r\n\r\n return $query;\r\n });\r\n\r\n\r\n $list = $this->billing->paginate();\r\n return apiResponse($list);\r\n }", "title": "" }, { "docid": "100d807fa570559a152bdcc3609319e7", "score": "0.63072455", "text": "public function index()\n {\n $zone_list = AppHelper::getAppSettings('fee_trans_zones');\n $buses = Bus::select('id','name','numeric_value','order','status','note')->with('zones')->orderBy('order', 'asc')->get();\n\n // return $buses;\n return view('backend.academic.buses.list', compact('buses', 'zone_list'));\n }", "title": "" }, { "docid": "a2c82e645f33199ca3af4df01daa0da0", "score": "0.63034976", "text": "public function listAction()\n {\n $this->view->headTitle('Book Listing ','PREPEND');\n $this->view->books = $this->bookService->listService();\n }", "title": "" }, { "docid": "4023da2de0dba68f1ecdf1fb4c98e92c", "score": "0.63017", "text": "public function index()\n {\n $brands = Brand::all();\n return view('backend.brands.list-brands',compact('brands'));\n }", "title": "" }, { "docid": "274587aa8fe5055947d30745dbf0cb0a", "score": "0.6299212", "text": "public function list_get()\n \t{\n \t\tlog_message('debug', 'Account/list_get');\n \t\t\n\t\t$result = array();\n\t\t# Only proceed if the type of account list is given\n\t\tif(!empty($this->get('type')))\n\t\t{\n\t\t\t$restrictions = array(\n\t\t\t\t'offset'=>(!empty($this->get('offset'))? $this->get('offset'): '0'), \n\t\t\t\t'limit'=>(!empty($this->get('limit'))? $this->get('limit'): NUM_OF_ROWS_PER_PAGE),\n\t\t\t\t'phrase'=>(!empty($this->get('phrase'))? $this->get('phrase'): ''), \n\t\t\t\t'status'=>(!empty($this->get('status'))? $this->get('status'): 'active'),\n\t\t\t\t'return'=>'list'\n\t\t\t);\n\t\t\t\n\t\t\tlog_message('debug', 'Account/list_get:: [1] restrictions= '.json_encode($restrictions));\n\t\t\t$result = $this->_account->types($this->get('type'), $restrictions);\n\t\t}\n\t\t\n\t\tlog_message('debug', 'Account/list_get:: [2] result='.json_encode($result));\n\t\t\n\t\t$this->response($result);\n\t}", "title": "" }, { "docid": "e64a5ddd21a13e48baa434bc1a794ad8", "score": "0.62904376", "text": "public function index()\n {\n $accounts = $this->user()->accounts;\n\n return $this->response()->collection($accounts, new AccountTransformer());\n }", "title": "" }, { "docid": "c272f7c71f5a8ea4a19bb0f81a754718", "score": "0.6288931", "text": "public function index()\n {\n $this->checkPermission('manage-brands');\n $paginate = config('app.pagenation_count', 3);\n \n $brands = Brand::with('country')->orderBy('created_at', 'DESC')->paginate($paginate);\n\n return view('backend.pages.brand-list' ,[\n 'brands' => $brands,\n ]);\n }", "title": "" }, { "docid": "f26002e0096d7213cd7f5eb6f429f06d", "score": "0.62821144", "text": "public function index() {\n // Get the logged in user's accounts\n $accounts = Auth::user()->Accounts;\n\n // Something failed in account creation\n if ($accounts->isEmpty()) {\n abort('404');\n }\n\n // Get the account dropdown partial\n $accountSelect = view('accounts.partials.account-select', compact('accounts'))->render();\n\n // Get the account details partial\n $accountDetails = $this->getAccountDetails($accounts->first());\n\n return view('index', compact('accountSelect', 'accountDetails'));\n }", "title": "" }, { "docid": "2b773dd5e8e6073a9454d2fb3122d423", "score": "0.62770116", "text": "public function index()\n {\n $bills=DB::table('bills')\n ->join('customers','bills.id','=','customers.id')\n ->get();\n return view('admin.bill.index',compact('bills'));\n }", "title": "" }, { "docid": "996751022349fb34afd981e6c5055229", "score": "0.62720364", "text": "public function index()\n {\n return view('admin.pages.country-banks.index', [\n 'banks' => CountryBank::with('country')\n ->orderBy('id', 'DESC')\n ->get()\n ]);\n }", "title": "" }, { "docid": "3cab64f04647f4e99479f8e767ca9fe4", "score": "0.6267913", "text": "public function index()\n {\n $user = $this->accounts->getUserData();\n\n if ($this->accounts->backend) {\n\n return view('backend.account.index', compact('user'));\n }\n return view('shared.account.index', compact('user'));\n\n }", "title": "" }, { "docid": "ec942c502364f2d51fc6f3bb3cecbbc0", "score": "0.6265061", "text": "public function index()\n {\n $beban=Beban::all();\n return view('beban',compact('beban'));\n }", "title": "" }, { "docid": "24e636979c1f42460aa694d04c3dd71c", "score": "0.62607616", "text": "public function myAccountIndexAction()\n {\n $searchForm = new Forms\\projectSearchForm();\n $searchForm->initFromGet();\n $searchForm->setCustomerUser($this->context->security->user);\n\n $this->context->render(\"Commercial/pages/clientProjectsList.twig\", array(\n \"searchForm\" => $searchForm,\n 'data_table' => $this->_em->getRepository(\"CommercialProject\")->findFromSearchForm($searchForm)\n ));\n }", "title": "" }, { "docid": "e20b2015b6644281d0f674916acea927", "score": "0.6256207", "text": "public function index()\n {\n return $this->view('account.index'); \n }", "title": "" }, { "docid": "e73db84fa3acf8cc19c21cb0688594a7", "score": "0.6237741", "text": "public function index()\n {\n $foundBills = Bill::where('user_id', $this->authenticatedUser->id)->paginate(5);\n\n return response()->json($foundBills);\n }", "title": "" }, { "docid": "d0dec0615ad7b00c66f4ce5f9371644f", "score": "0.62364316", "text": "public function listAction()\n {\n $request = $this->getRequest();\n $blacklistNamePart = $request->getParam('BlacklistNamePart','');\n $blacklistNamePart = trim($blacklistNamePart);\n $customerAccountId = $request->getParam('CustomerAccountId');\n\n $pagination['CurrentPage'] = $request->getParam('CurrentPage',SwIRS_Web_Request::CURRENT_PAGE);\n $pagination['ItemsPerPage'] = $request->getParam('ItemsPerPage',SwIRS_Web_Request::ITEMS_PER_PAGE);\n $pagination['ItemsTotal'] = 0;\n $blacklists = array();\n if (strlen($blacklistNamePart) > 0) {\n Streamwide_Web_Log::debug(\"list blacklists whose name contains $blacklistNamePart\");\n $blacklists = Streamwide_Web_Model::call('Blacklist.GetByName',\n array(\n $customerAccountId,\n $blacklistNamePart,\n $pagination['CurrentPage'],\n $pagination['ItemsPerPage']\n )\n );\n $pagination['ItemsTotal'] = Streamwide_Web_Model::call('Blacklist.Count',array($customerAccountId,$blacklistNamePart));\n } else {\n Streamwide_Web_Log::debug(\"list blacklists\");\n $blacklists = Streamwide_Web_Model::call('Blacklist.GetByCustomer',\n array(\n $customerAccountId,\n $pagination['CurrentPage'],\n $pagination['ItemsPerPage']\n )\n );\n $pagination['ItemsTotal'] = Streamwide_Web_Model::call('Blacklist.Count',array($customerAccountId));\n }\n $this->view->assign(array(\n 'Blacklists' => $blacklists,\n 'Pagination' => $pagination\n ));\n }", "title": "" }, { "docid": "5076598898fa28157460a12263152cb0", "score": "0.62348896", "text": "public function index()\n {\n if (! Gate::allows('beritum_access')) {\n return abort(401);\n }\n\n\n if (request('show_deleted') == 1) {\n if (! Gate::allows('beritum_delete')) {\n return abort(401);\n }\n $beritas = Beritum::onlyTrashed()->get();\n } else {\n $beritas = Beritum::all();\n }\n\n return view('admin.beritas.index', compact('beritas'));\n }", "title": "" }, { "docid": "2c808a690ba543f511823645abce1d03", "score": "0.6212048", "text": "public function index()\n {\n\n $details = Detail::find(Auth::user()->id);\n\n return view('pages.account', compact('details'));\n }", "title": "" }, { "docid": "779eace01ffb758bf1e24ed0dea4ccf6", "score": "0.62076956", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $bidClients = $em->getRepository('AdBoxBundle:BidClient')->findAll();\n\n return $this->render('bidclient/index.html.twig', array(\n 'bidClients' => $bidClients,\n ));\n }", "title": "" }, { "docid": "df25793877d2c1baf2a4217e9ec823a7", "score": "0.620744", "text": "function manage_bank_ac()\n {\n $page_data['accounts'] = $this->db->get('bank_account')->result_array();\n $this->loadView('accounting/manage_bank_ac', 'manage_bank_account', $page_data);\n }", "title": "" }, { "docid": "d86f7010e038e42226b46aedbce3cfc3", "score": "0.61960286", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $billDetails = $em->getRepository('AdminBundle:BillDetail')->findAll();\n\n return $this->render('AdminBundle:BillDetail:index.html.twig', array(\n 'billDetails' => $billDetails,\n ));\n }", "title": "" }, { "docid": "967ca0045bbecd3dae86e7a8f40358b4", "score": "0.6191631", "text": "public function listBenevoles()\n {\n \n \n $query = $this->Users->find('all')\n ->where(['role' => 'volunteer']);\n \n $users = $this->paginate($query);\n $this->set(compact('users'));\n $this->set('_serialize', ['users']);\n \n }", "title": "" }, { "docid": "7ba061fa0b9d3a74be57c3f78da5ecab", "score": "0.6190579", "text": "public function index()\n {\n $user = Auth::user();\n $user->authorizeRoles('Super Admin');\n\n $bands = BandName::all();\n $data = [\n 'bands' => $bands,\n\n 'page_name' => 'administer.band-name.list',\n ];\n return view('bands.band_name.list')->with($data);\n }", "title": "" }, { "docid": "065f2a22109271a5e21e8909a6df101c", "score": "0.6177833", "text": "public function index()\n {\n // $account = User::all();\n $account = User::where(\"status\",\"=\",\"1\")->get();\n return view('account', compact('account'));\n\n }", "title": "" }, { "docid": "694a951536b2cd43a834e01ae5c9a664", "score": "0.61763555", "text": "public function index()\n {\n $accounts = $this->service->allAccounts();\n return view('admin.index')->with('accounts', $accounts);\n }", "title": "" }, { "docid": "d5dda7ef2bc15bfdd0126ef4ed2a1e39", "score": "0.6176274", "text": "public function actionIndex()\n {\n $searchModel = new BlackListSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "f2cae650d043d9d8070d275cf0f9cca7", "score": "0.61733824", "text": "public function index()\n\t{\n $name = Auth::user()->name;\n $user = User::with('house')->whereName($name)->first();\n $id = Auth::id();\n\n\n $bills = Bill::where('user_id', $id)->get();\n\n\n\t\treturn view ('bills.show')->withBills($bills)->withUser($user);\n\t}", "title": "" } ]
af75ad68dfe5a25a55775a8a0f2be540
Get single item as array.
[ { "docid": "3a5f46e6a2aa88331a8d62f5f3d079e9", "score": "0.0", "text": "public function get($id, $add_id = true)\n\t{\n\t\t$data = @file_get_contents($this->path . '/' . $id);\n\t\tif (!$data)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\t$data = @json_decode($data, true);\n\t\tif ($data === null)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\tif ($add_id)\n\t\t{\n\t\t\t$data['id'] = $id;\n\t\t}\n\t\treturn $data;\n\t}", "title": "" } ]
[ { "docid": "22ac91413d0981d965bee498bb8bfebd", "score": "0.72798806", "text": "public function toArray()\n {\n return (array) $this->item;\n }", "title": "" }, { "docid": "0d1a2efe96bc53f237b0d7a3bfd2eceb", "score": "0.68204176", "text": "public function getItems(): ?array;", "title": "" }, { "docid": "381a3b5355772d4e07cca51355987763", "score": "0.67579466", "text": "function convert_to_array( $item )\n\t{\n\t\tif( !is_array( $item ) )\n\t\t{\n\t\t\treturn array( $item );\n\t\t}\n\t\treturn $item;\n\t}", "title": "" }, { "docid": "4cb46dfcc4f8e11b97ff83a0972210b3", "score": "0.6753968", "text": "public function getItems(): array;", "title": "" }, { "docid": "fa1ef8913f36a7bb21cef81ccb7f0f02", "score": "0.6718832", "text": "public function get(): array;", "title": "" }, { "docid": "fa1ef8913f36a7bb21cef81ccb7f0f02", "score": "0.6718832", "text": "public function get(): array;", "title": "" }, { "docid": "03262d030be455932349b2851dd49d81", "score": "0.6701107", "text": "public function one() {\n\t\t$ret = call_user_func_array(array($this, 'get'), func_get_args());\n\t\tif($ret)\n\t\t\treturn $ret[0];\n\t\treturn array();\n\t}", "title": "" }, { "docid": "815910d8874928a26643d661790b4fc6", "score": "0.6700981", "text": "public function getArray(){\n\t\t$out = array();\n\t\tforeach($this->item as $value){\n\t\t\t$out[] = $value;\n\t\t}\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "30a3fd6be8ac91f044658922d2c9ef9d", "score": "0.66986066", "text": "public function getArray();", "title": "" }, { "docid": "30a3fd6be8ac91f044658922d2c9ef9d", "score": "0.66986066", "text": "public function getArray();", "title": "" }, { "docid": "ad46f4a7c58385fa3abaa239c5595044", "score": "0.6608336", "text": "protected function getOne(): array\n {\n return $this->exec()->fetch();\n }", "title": "" }, { "docid": "6fae571b8f922ea13d993c3db979427e", "score": "0.6590786", "text": "public function get_array() {\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "93e8446027a27ad339eab65bac252a31", "score": "0.6519811", "text": "function toArray()\n {\n return json_decode(json_encode($this->items), true);;\n }", "title": "" }, { "docid": "d36593d80179b6e2900d9bb90531fb81", "score": "0.6479885", "text": "public function get(): array\n {\n return $this->items;\n }", "title": "" }, { "docid": "004353f653881c9d2a0a27219112f749", "score": "0.64778763", "text": "public function as_array ();", "title": "" }, { "docid": "3f3bf8ac6544166f67f408f0fa9c1211", "score": "0.6460031", "text": "public function asArray();", "title": "" }, { "docid": "3f3bf8ac6544166f67f408f0fa9c1211", "score": "0.6460031", "text": "public function asArray();", "title": "" }, { "docid": "9ae01a267eab7699b200581a59aafa4e", "score": "0.641665", "text": "public function getAsArray(): array\n {\n $itemsArray = [];\n foreach ($this->items as $item) {\n $itemsArray[] = \\GuzzleHttp\\json_decode(\\GuzzleHttp\\json_encode($item), true);\n }\n\n return $itemsArray;\n }", "title": "" }, { "docid": "0bf07cbe595b004294581709b113b7d6", "score": "0.63965386", "text": "static function getItem(): array{\n\t\tif(self::isItemStored()){\n\t\t\t$item = $_SESSION[self::SESSION_ITEM_KEY];\n\t\t\tself::deleteItem();\n\t\t\treturn $item;\n\t\t}\n\t\treturn [];\n\t}", "title": "" }, { "docid": "23c80370969adf3761b676bee9023c92", "score": "0.63543034", "text": "public function to_arr() {\n return $this->items();\n }", "title": "" }, { "docid": "2017ef965fbe9fbb12a9b9b48d6f03ee", "score": "0.6353697", "text": "public function getArray()\n {\n return $this->list->array();\n }", "title": "" }, { "docid": "c74ccdd4508451c4412de4ff2f69e149", "score": "0.6338455", "text": "public function first()\n{\n\treturn (!empty($this->_result))? $this->_result[0] : [];\n}", "title": "" }, { "docid": "0d30565e275d49a2c5a59071a462eb7d", "score": "0.6330598", "text": "public function value() {\n\t\treturn (array) parent::value();\n\t}", "title": "" }, { "docid": "2d4c6e5fd8349643f51525dc300bcb59", "score": "0.6317322", "text": "public function toArray()\n\t{\n\t\treturn (array) $this->data;\n\t}", "title": "" }, { "docid": "6fd93fb018fe8966766e54ac56183e8a", "score": "0.6309785", "text": "public function toArray()\n {\n return $this->items;\n }", "title": "" }, { "docid": "6fd93fb018fe8966766e54ac56183e8a", "score": "0.6309785", "text": "public function toArray()\n {\n return $this->items;\n }", "title": "" }, { "docid": "6fd93fb018fe8966766e54ac56183e8a", "score": "0.6309785", "text": "public function toArray()\n {\n return $this->items;\n }", "title": "" }, { "docid": "05a31552c5bdf2ec21731a3433562fa6", "score": "0.6308341", "text": "public function asArray(): array;", "title": "" }, { "docid": "05a31552c5bdf2ec21731a3433562fa6", "score": "0.6308341", "text": "public function asArray(): array;", "title": "" }, { "docid": "05a31552c5bdf2ec21731a3433562fa6", "score": "0.6308341", "text": "public function asArray(): array;", "title": "" }, { "docid": "05a31552c5bdf2ec21731a3433562fa6", "score": "0.6308341", "text": "public function asArray(): array;", "title": "" }, { "docid": "ef7582be03c4f7df19f3e588cc3614af", "score": "0.63070047", "text": "public function toArray() {\n return (array)$this;\n }", "title": "" }, { "docid": "25c074b001cfa48684cad8b3d9e3246b", "score": "0.6286414", "text": "public function toArray() {\n return (array) $this->data;\n }", "title": "" }, { "docid": "34c33ac486bfe25c8a4ef65d94b99492", "score": "0.6275308", "text": "public function asArray()\n {\n return $this->result;\n }", "title": "" }, { "docid": "2ebf0468d47513af8418dafd3535ff41", "score": "0.6267743", "text": "public function one($asArray = false)\n {\n $res = $this->slice(1, 0, $asArray);\n return isset($res[0]) ? $res[0] : ($asArray ? [] : null);\n }", "title": "" }, { "docid": "ba8b40f142c4108cecec7aad1bb72908", "score": "0.62666947", "text": "function get() {\n\n return $this->arr;\n \n }", "title": "" }, { "docid": "58b3e45f5a50f8ec2bc6a2b7247992b3", "score": "0.62643576", "text": "public function asArray()\n {\n return $this->_data;\n }", "title": "" }, { "docid": "d4f9d2448c94ac199b08e887a8dc4ae0", "score": "0.6264204", "text": "public function getArray()\n {\n return $this->array;\n }", "title": "" }, { "docid": "a2894a4f186b2ac8bba0a3a1f0229442", "score": "0.6234369", "text": "public function getDataAsArray(): array;", "title": "" }, { "docid": "9cc51dca32aee1667e223a3f3a051450", "score": "0.62334526", "text": "public function toArray(): array\n\t{\n\t\treturn array_map(static function ($value) {\n\t\t\treturn method_exists($value, 'toArray') ? $value->toArray() : $value;\n\t\t}, $this->items);\n\t}", "title": "" }, { "docid": "e5ea835cf1f3a889f056d6995f51dacb", "score": "0.6229822", "text": "public function toArray()\n {\n return (array)$this->data;\n }", "title": "" }, { "docid": "2a334ade5b0731f4e7006bcb7fe3ed5c", "score": "0.6226545", "text": "public function toArray()\n {\n return (array)$this;\n }", "title": "" }, { "docid": "be687afa12a5383af9ff270ce48c15ca", "score": "0.62098473", "text": "public function get()\n {\n return array(1,2,3,4);\n }", "title": "" }, { "docid": "a2aaee53fe21620e8d5e6061ddc9ec18", "score": "0.62078464", "text": "public function toArray() // untested\n {\n return $this->_data;\n }", "title": "" }, { "docid": "ceb1704de5dca3b5224253125e81be60", "score": "0.6206595", "text": "public function as_array()\n {\n return $this->data;\n }", "title": "" }, { "docid": "311816c86b29da6236c91e53a3601a7f", "score": "0.62057173", "text": "public function toArray()\n\t{\n\t\treturn $this->value;\n\t}", "title": "" }, { "docid": "7ed9219dd48927669906a14e61eebd31", "score": "0.62004477", "text": "public function getArray()\n\t{\n\t}", "title": "" }, { "docid": "3a8803ac86717aeb5e12767f7a649d3f", "score": "0.61972207", "text": "public function getArray(): array\n {\n return (array) $this->storage;\n }", "title": "" }, { "docid": "f97e62acfd52cf63f9ed769fd5f746fa", "score": "0.61753577", "text": "public function getArray()\n {\n return $this->toArray();\n }", "title": "" }, { "docid": "2d1393ef04d3df0b71c8d2d6d8aa8ece", "score": "0.61731297", "text": "public function getAsArray(){\n \t$result=array();\n \tforeach($this as $key => $value) {\n \t\tif (!is_array($value) && !is_object($value)) {\n \t\t\t$result[$key]= $value;\n \t\t}\n \t}\n \treturn $result;\n }", "title": "" }, { "docid": "c1b232cd0ed464e8e9777742f0d6df06", "score": "0.6164355", "text": "public function read(): array;", "title": "" }, { "docid": "87ce4ab6fa6d7d85b44229c42a59def3", "score": "0.6161145", "text": "public function &getArray() : array\n {\n return $this->data;\n }", "title": "" }, { "docid": "f4bf98422265a6e8d853855e763e463b", "score": "0.6154238", "text": "public function getArray() {\n return $this->data;\n }", "title": "" }, { "docid": "1a808c85271c1543c17ad5f7b798eb10", "score": "0.6139874", "text": "public function getItemsAsArray()\n {\n $items = array();\n if (count($this->_items) > 0) {\n foreach($this->_items as $productKey => $product) {\n $items[$productKey] = $product->toArray();\n }\n }\n return $items;\n }", "title": "" }, { "docid": "02bd9782c7bfaacd4c61c6192b3d4b96", "score": "0.61364156", "text": "public function __toArray();", "title": "" }, { "docid": "57cea7d06ed4ceeca3dd15d8ea7c4e67", "score": "0.6136197", "text": "public function toArray()\n {\n return $this->_array;\n }", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6129926", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6129926", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6129926", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6129926", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6129926", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6129926", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6129926", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6129926", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6129926", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6129926", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6129926", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6129926", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6129926", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6129926", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6129926", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6129926", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6129926", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6129926", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6129926", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6129926", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6129926", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6129926", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6129926", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6129926", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6129926", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6129926", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6129926", "text": "public function toArray(): array;", "title": "" }, { "docid": "a42332b542f055b5d3afd4c736da2e98", "score": "0.6127428", "text": "function EnvoGetarray ()\n\t{\n\t\t$d = $this -> data;\n\n\t\treturn $d;\n\n\t}", "title": "" }, { "docid": "d705f7f44e32ef135baa0ca3297d8db6", "score": "0.6120712", "text": "public function toArray()\n\t{\n\t\t$data = array();\n\t\tforeach ($this->_data as $key => $item) {\n\t\t\t$data[$key] = $item instanceof Cd_Reader_Array ? $item->toArray() : $item;\n\t\t}\n\t\t\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "fcdbf04b1d488e2a5a4ce75efbbb4ed4", "score": "0.6120029", "text": "public function toArray()\r\n\t{\r\n\t\treturn $this->_data;\r\n\t}", "title": "" }, { "docid": "a4e8a5b8fc57db9a86afa08b8b3f0e33", "score": "0.61005104", "text": "public function asArray() {\n\t\t$items = [];\n\t\tforeach($this as $item) {\n\t\t\t$items[] = $item;\n\t\t}\n\n\t\treturn $items;\n\t}", "title": "" }, { "docid": "e50df38982b1fe86cc5b8976126d7baa", "score": "0.60991436", "text": "public function get()\n {\n return $this->toArray();\n }", "title": "" }, { "docid": "670426632e95c37157fa48e4b1e27968", "score": "0.6090752", "text": "public function getData() {\n return $item;\n }", "title": "" }, { "docid": "670426632e95c37157fa48e4b1e27968", "score": "0.6090752", "text": "public function getData() {\n return $item;\n }", "title": "" }, { "docid": "0636ffedc818dc17761d6e2d7592ffee", "score": "0.6083468", "text": "public function getData()\n\t{\n\t\treturn (array) $this->data;\n\t}", "title": "" }, { "docid": "f3ad68036cead8abfa89100aea384824", "score": "0.6080962", "text": "public function toSimpleArray()\n {\n $item = [\n 'value' => $this->getValue(),\n ];\n\n if ($this->getPriority() !== 0.0) {\n $item['priority'] = $this->getPriority();\n }\n\n if (!empty($this->getMetadata())) {\n $item['metadata'] = $this->getMetadata();\n }\n\n if (count($item) === 1) {\n return $item['value'];\n } else {\n return $item;\n }\n }", "title": "" }, { "docid": "da61882e886540c1fc67bbb7a9d029bc", "score": "0.6071559", "text": "abstract protected function getArray(): array;", "title": "" }, { "docid": "f9390feb086459d69f6b9881ef8b8544", "score": "0.60645473", "text": "public function getAsArray(){\n\t\t$result=array();\n\t\tforeach($this as $key => $value) {\n\t\t\tif (!is_array($value)) {\n\t\t\t\t$result[$key]= $value;\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "60165cadd8fc98268e271a64cbfebb87", "score": "0.6063232", "text": "public function getRecord() : array\n {\n return current($this->data);\n }", "title": "" }, { "docid": "b74fe2dca4fde97ac467a153b843cef6", "score": "0.6061434", "text": "function toArray()\n {\n return (array)$this->storage;\n }", "title": "" }, { "docid": "eaa25d242a98528f6a85207ac514f957", "score": "0.60522455", "text": "public function getArray() {\n\t\treturn($this->dataArray);\n\t}", "title": "" }, { "docid": "1bc94362b02377ec0128d98c18c8ae4d", "score": "0.6030739", "text": "public function value(): ?array;", "title": "" }, { "docid": "588dcf99c32174b5a246ad725d3da599", "score": "0.6030382", "text": "public function toArray(): array\n {\n return $this->value;\n }", "title": "" }, { "docid": "da9fb3296df7ca38b71da8337a86ab37", "score": "0.60226554", "text": "public function get() : array\n\t\t{\n\n\t\treturn $this->doGet([]);\n\t\t}", "title": "" }, { "docid": "398a9add51ac7293127188ab9a119633", "score": "0.60165787", "text": "public function toArray() : array\n {\n return array_map(function ($value) {\n return is_object($value) && method_exists($value, 'toArray')\n ? $value->toArray()\n : $value;\n\n }, $this->items);\n }", "title": "" } ]
a56adcad81fed6c26b6419f4b687af71
Essentially a ban, removes all permissions the current user is currently granted with
[ { "docid": "679b2e17afb340d15e873bcb712adfc2", "score": "0.7164454", "text": "public function ungrantAllPerms() {\n $this->permissions = array();\n return $this->dba->pdo\n ->prepare( 'DELETE FROM users_permissions\n WHERE user_id = :userid' )\n ->execute( array( ':userid' => $this->id ) );\n }", "title": "" } ]
[ { "docid": "bfcd8396a1574fa08b90f398a32bf718", "score": "0.70079297", "text": "public function removeAllPermissions();", "title": "" }, { "docid": "5d53a5e2472ad45f35dae5f18efa2d74", "score": "0.67066497", "text": "public function unBan();", "title": "" }, { "docid": "3069432683f77ccfc9cb3b98be9f0c45", "score": "0.6670794", "text": "public function banPermissions() {\n $perms = [];\n\n foreach (LivingSpacesBanType::loadMultiple() as $type) {\n $perms += $this->buildPermissions($type);\n }\n\n return $perms;\n }", "title": "" }, { "docid": "db522fefc4425f0a6310927e4ed89a00", "score": "0.64629596", "text": "public function removeAllPermissions()\n {\n throw new NotImplementedException;\n }", "title": "" }, { "docid": "fc7f129b00916a0d30dac99c5b33ed4b", "score": "0.64584285", "text": "public function deny($permissions);", "title": "" }, { "docid": "9c64a66d8a66c028da551cad6a1a390b", "score": "0.63729835", "text": "public function unban()\n {\n $this->status = User::IS_UNBANNED;\n $this->save();\n }", "title": "" }, { "docid": "4a99524e6a38527b4b2b92310889e553", "score": "0.62520504", "text": "public function ban(Request $request)\n {\n $user = User::role('patient')->where('id', $request->id)->first();\n if ($request->ban == 'true') {\n $user->removeRole('ban');\n return \"true\";\n } else {\n $user->assignRole('ban');\n return \"false\";\n }\n }", "title": "" }, { "docid": "a95d20ae783246868d5a2cd1da433532", "score": "0.6166201", "text": "protected function bfRemove()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$client = \\IPS\\Api\\OAuthClient::load( \\IPS\\Request::i()->client_id );\n\t\t}\n\t\tcatch ( \\OutOfRangeException $e )\n\t\t{\n\t\t\t\\IPS\\Output::i()->error( 'node_error', '2C362/4', 404, '' );\n\t\t}\n\t\t\n\t\tif ( \\IPS\\Request::i()->ip and \\IPS\\Request::i()->ban )\n\t\t{\n\t\t\t\\IPS\\Db::i()->insert( 'core_banfilters', array(\n\t\t\t\t'ban_type'\t\t=> 'ip',\n\t\t\t\t'ban_content'\t=> \\IPS\\Request::i()->ip,\n\t\t\t\t'ban_date'\t\t=> time(),\n\t\t\t\t'ban_reason'\t=> 'OAuth',\n\t\t\t) );\n\t\t\tunset( \\IPS\\Data\\Store::i()->bannedIpAddresses );\n\t\t\t\\IPS\\Session::i()->log( 'acplog__ban_created', array( 'ban_filter_ip_select' => TRUE, \\IPS\\Request::i()->ip => FALSE ) );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\\IPS\\Session::i()->log( 'acplogs__oauth_unlock_ip', array( \\IPS\\Request::i()->ip => FALSE, 'core_oauth_client_' . $client->client_id => TRUE ) );\n\t\t}\n\t\t\n\t\t$bruteForce = json_decode( $client->brute_force, TRUE );\n\t\tunset( $bruteForce[ \\IPS\\Request::i()->ip ] );\n\t\t$client->brute_force = json_encode( $bruteForce );\n\t\t$client->save();\n\t\t\n\t\t\\IPS\\Output::i()->redirect( \\IPS\\Http\\Url::internal( \"app=core&module=applications&controller=oauth&do=view&client_id={$client->client_id}\" ) );\n\t}", "title": "" }, { "docid": "79f861da04066c9032443e049391c71d", "score": "0.6138181", "text": "function clearAllPermissions() {\n $this->deleteAll(_GSC_Tags::$permission);\n }", "title": "" }, { "docid": "282d710f147dae30c6b48c8ec9b4839f", "score": "0.61353844", "text": "public function denyAccess()\n {\n $this->_aclPlugin->denyAccess();\n }", "title": "" }, { "docid": "49dabbbcf690785d6fefabc3557bc957", "score": "0.6042718", "text": "public function forgetCachedPermissions()\n {\n app(PermissionRegistrar::class)->forgetCachedPermissions();\n }", "title": "" }, { "docid": "5a44cd000925cc6b828d240f1a482ea7", "score": "0.5970848", "text": "public function ban()\n {\n $this->status = User::IS_BANNED;\n $this->save();\n }", "title": "" }, { "docid": "79ffb64f53897cc8efb1a0c0ee4b8f51", "score": "0.5778485", "text": "function ban() {\n if($this->id == '') return false;\n try{\n $consulta = $this->bd->prepare(\"UPDATE Users SET user_type=-1 WHERE id = :id\");\n $consulta->execute(array('id' => (int)$this->id));\n \n $this->set_clicks_p(0);\n $this->set_clicks_r(0);\n $this->set_views_p(0);\n $this->set_views_r(0);\n \n return true;\n } catch(PDOException $e) {header('location: dberro.php'); return false;}\n}", "title": "" }, { "docid": "0f9fddcb113004f880c8866e2c007414", "score": "0.5777305", "text": "public function clearBanned()\n {\n return $this->__call('clearbanned');\n }", "title": "" }, { "docid": "9e085d05c3fccf432c31d12d109363c1", "score": "0.57726645", "text": "function ban() {\n\tif (E107_DBG_DEPRECATED) {\n\t\tglobal $db_debug;\n\t\t$db_debug->logDeprecated();\n\t}\n\tglobal $e107;\n\t$e107->ban();\n}", "title": "" }, { "docid": "c3a4679330c450d7d777a4280c9b743e", "score": "0.5772111", "text": "public function removePermission($request);", "title": "" }, { "docid": "0abb30485b841d719cee3343564155a8", "score": "0.5767964", "text": "function ban() \n\t{\n\t global $sql, $e107, $tp, $pref;\n\t $ban_count = $sql->db_Count(\"banlist\");\n\t if($ban_count)\n\t {\n\t $vals = array();\n\t\t$ip = $this->getip();\n\t\tif ($ip != 'x.x.x.x')\n\t\t{\n\t\t $tmp = explode(\".\",$ip);\n\t\t $vals[] = $tp -> toDB($_SERVER['REMOTE_ADDR'], true);\n\t\t $vals[] = $tmp[0].\".\".$tmp[1].\".\".$tmp[2].\".*\";\n\t\t $vals[] = $tmp[0].\".\".$tmp[1].\".*.*\";\n\t\t}\n\n\t\tif(varsettrue($pref['enable_rdns']))\n\t\t{\n\t\t $tmp = array_reverse(explode('.',$addr = $e107->get_host_name(getenv('REMOTE_ADDR'))));\n\t\t $line = '';\n\t\t $vals[] = $addr;\n\t\t foreach ($tmp as $e)\n\t\t {\n\t\t\t$line = '.'.$e.$line;\n\t\t\t$vals[] = '*'.$line;\n\t\t }\n\t\t}\n\n\t\tif ((defined('USEREMAIL') && USEREMAIL))\n\t\t{\n\t\t $vals[] = USEREMAIL;\n\t\t}\n\n\t\tif (($ip != '127.0.0.1') && count($vals))\n\t\t{\n\t\t $match = \"`banlist_ip`='\".implode(\"' OR `banlist_ip`='\",$vals).\"'\";\n\t\t if ($sql->db_Select(\"banlist\", \"*\",$match))\n\t\t {\n\t\t\theader(\"HTTP/1.1 403 Forbidden\", true);\n\t\t\t\t// enter a message here if you want some text displayed to banned users ...\n\t\t\texit();\n\t\t }\n\t\t}\n\t }\n\t}", "title": "" }, { "docid": "487135adf1360ecb6278aa046457b6cf", "score": "0.5765979", "text": "public function absorb()\n {\n $groups_without = array();\n $all_groups = $GLOBALS['FORUM_DRIVER']->get_usergroup_list(false, true);\n $list1 = new Tempcode();\n $list2 = new Tempcode();\n $admin_groups = $GLOBALS['FORUM_DRIVER']->get_super_admin_groups();\n $moderator_groups = $GLOBALS['FORUM_DRIVER']->get_moderator_groups();\n foreach ($all_groups as $id => $name) {\n if (in_array($id, $admin_groups)) {\n continue;\n }\n\n $test = $GLOBALS['SITE_DB']->query_select_value_if_there('group_privileges', 'group_id', array('group_id' => $id));\n if (is_null($test)) {\n $groups_without[$id] = $name;\n }\n\n $list1->attach(form_input_list_entry($id, is_null($test), $name));\n $list2->attach(form_input_list_entry($id, !is_null($test) && !in_array($id, $moderator_groups), $name));\n }\n\n $__groups_without = escape_html(implode(', ', $groups_without));\n if ($__groups_without == '') {\n $_groups_without = do_lang_tempcode('NONE_EM');\n } else {\n $_groups_without = protect_from_escaping($__groups_without);\n }\n $text = do_lang_tempcode('USERGROUPS_WITH_NO_PERMISSIONS', $_groups_without);\n\n $submit_name = do_lang_tempcode('ABSORB_PERMISSIONS');\n $post_url = build_url(array('page' => '_SELF', 'type' => '_absorb'), '_SELF');\n\n require_code('form_templates');\n $fields = new Tempcode();\n $fields->attach(form_input_list(do_lang_tempcode('FROM'), do_lang_tempcode('PERMISSIONS_FROM'), 'from', $list1));\n $fields->attach(form_input_list(do_lang_tempcode('TO'), do_lang_tempcode('PERMISSIONS_TO'), 'to', $list2));\n\n return do_template('FORM_SCREEN', array('_GUID' => '9e20011006a26b240fc898279338875c', 'SKIP_WEBSTANDARDS' => true, 'TITLE' => $this->title, 'HIDDEN' => '', 'FIELDS' => $fields, 'TEXT' => $text, 'SUBMIT_ICON' => 'buttons__proceed', 'SUBMIT_NAME' => $submit_name, 'URL' => $post_url));\n }", "title": "" }, { "docid": "90f5f31bc6b1b38fdd90d0fce7d09c82", "score": "0.57495403", "text": "public function api_socialRevokeAccess()\n {\n $errMsg = $this->checkApiHeaderInfo();\n\t\t$error = !empty($errMsg) ? 1 : 0;\n if ($error == 0) {\n $userData = $this->BusinessOwner->find('first', array('conditions' => array('User.id' => $this->loggedInUserId), 'fields' => array('BusinessOwner.id', 'BusinessOwner.notifications_enabled')));\n if ($this->jsonDecodedRequestedData->revokeList) {\n switch ($this->jsonDecodedRequestedData->revokeList) {\n case \"twitter\":\n $updateField['twitter_connected'] = 0;\n $updateField['twitter_oauth_token'] = '';\n $updateField['twitter_oauth_token_secret'] = '';\n //unset the notifications\n $notifData = explode(',', $userData['BusinessOwner']['notifications_enabled']);\n $pos = array_search('tweetReferralSend', $notifData);\n if ($pos !== FALSE) {\n unset($notifData[$pos]);\n }\n $pos = array_search('tweetMessageSend', $notifData);\n if ($pos !== FALSE) {\n unset($notifData[$pos]);\n }\n $pos = array_search('tweetInviteSend', $notifData);\n if ($pos !== FALSE) {\n unset($notifData[$pos]);\n }\n $message = \"Twitter account has been disconnected\";\n break;\n case \"facebook\":\n $updateField['fb_connected'] = 0;\n $updateField['fb_access_token'] = '';\n //unset the notifications\n $notifData = explode(',', $userData['BusinessOwner']['notifications_enabled']);\n $pos = array_search('fbReferralSend', $notifData);\n if ($pos !== FALSE) {\n unset($notifData[$pos]);\n }\n $pos = array_search('fbMessageSend', $notifData);\n if ($pos !== FALSE) {\n unset($notifData[$pos]);\n }\n $pos = array_search('fbInviteSend', $notifData);\n if ($pos !== FALSE) {\n unset($notifData[$pos]);\n }\n $message = \"Facebook account has been disconnected\";\n break;\n case \"linkedin\":\n $updateField['linkedin_connected'] = 0;\n $updateField['linkedin_access_token'] = '';\n //unset the notifications\n $notifData = explode(',', $userData['BusinessOwner']['notifications_enabled']);\n $pos = array_search('linkedinReferralSend', $notifData);\n if ($pos !== FALSE) {\n unset($notifData[$pos]);\n }\n $pos = array_search('linkedinMessageSend', $notifData);\n if ($pos !== FALSE) {\n unset($notifData[$pos]);\n }\n $pos = array_search('linkedinInviteSend', $notifData);\n if ($pos !== FALSE) {\n unset($notifData[$pos]);\n }\n $message = \"LinkedIn account has been disconnected\";\n break;\n default:\n break;\n }\n }\n $this->User->id = $this->loggedInUserId;\n $this->User->save($updateField);\n if (!empty($notifData)) {\n $notifData = implode(',', array_values($notifData));\n $this->BusinessOwner->id = $this->Encryption->decode($userData['BusinessOwner']['id']);\n if ($this->BusinessOwner->saveField('notifications_enabled', $notifData)) {\n $this->set(array(\n 'code' => Configure::read('RESPONSE_SUCCESS'),\n 'message' => $message,\n '_serialize' => array('code', 'message')\n ));\n } else {\n $this->errorMessageApi('Try again later');\n }\n } else {\n $this->set(array(\n 'code' => Configure::read('RESPONSE_SUCCESS'),\n 'message' => $message,\n '_serialize' => array('code', 'message')\n ));\n }\n } else {\n $this->errorMessageApi($errMsg);\n }\n }", "title": "" }, { "docid": "fc3c8b0ac77576db642b47c3761d8e4e", "score": "0.5745321", "text": "public function deny() {\n\t\t$args = func_get_args();\n\t\tif (isset($args[0]) and is_array($args[0])) {\n\t\t\t$args = $args[0];\n\t\t}\n\t\tforeach ($args as $arg) {\n\t\t\t$i = array_search(strtolower($arg), $this->allowedActions);\n\t\t\tif (is_int($i)) {\n\t\t\t\tunset($this->allowedActions[$i]);\n\t\t\t}\n\t\t}\n\t\t$this->allowedActions = array_values($this->allowedActions);\n\t}", "title": "" }, { "docid": "9117ef282815fede80c7ffd319747d48", "score": "0.57351977", "text": "function cmd_cleanaccess(CmdRequest $r) {\n $allchans = Array();\n foreach ($this->pMysql->query(\"SELECT `chans` FROM `bots`\") as $r) {\n $cs = explode(' ', $r['chans']);\n foreach ($cs as $css) {\n $allchans[substr($css, 2)] = substr($css, 2);\n }\n }\n $deleted = '';\n $stmt = $this->pMysql->prepare(\"UPDATE `users` SET `chans` = :chans WHERE `name` = :name\");\n foreach ($this->pMysql->query(\"SELECT `name`,`chans` FROM `users`\") as $u) {\n $chans = unserialize($u['chans']);\n if (!is_array($chans)) {\n continue;\n }\n foreach ($chans as $c => $d) {\n if (!array_key_exists($c, $allchans)) {\n unset($chans[$c]);\n $deleted .= \"$c \";\n }\n }\n $chans = serialize($chans);\n if ($r->args['CONFIRM'] == 'CONFIRM') {\n $stmt->execute(Array(':chans'=>$chans,':name'=>$u['name']));\n }\n }\n if ($r->args['CONFIRM'] == 'CONFIRM') {\n $r->notice(\"Deleted access for: $deleted\");\n } else {\n $r->notice(\"Would delete access for: $deleted\");\n }\n $stmt->closeCursor();\n }", "title": "" }, { "docid": "ab91a4dae1f9542b11b2c8dc9623a5e8", "score": "0.57313114", "text": "public function invalidatePermissions(UserPermissionInterface $user) : void;", "title": "" }, { "docid": "dc18b3f049bfaacef511d16bdb611ddb", "score": "0.5728969", "text": "function listBans() {\n\tglobal $dirs, $paths;\n\tif (!isAdmin()) return false;\n\n\tensureExists($dirs['prefs']);\n\t$jData = decode($paths['ban']);\n\n\tif ($jData == null) {\n\t\tsysShout('There aren\\'t any bans to list.');\n\t\treturn;\n\t}\n\n\t$shoutText = 'Here\\'s the list of bans. Click on an IP to unban.<br>';\n\t\n\tforeach ($jData as $key => $value) {\n\t\t$shoutText .= '<a href=\"javascript:yS.setShoutText(\\'/unban ' . $value['ip'] . '\\');\">' . $value['ip'] . '</a><br>';\n\t}\n\n\tsysShout($shoutText);\n}", "title": "" }, { "docid": "08b1f229275b16cf5d6d2f5ec170ece7", "score": "0.5633389", "text": "public function uninstallFallbackAcl();", "title": "" }, { "docid": "5c7ad7781979b2c4d3b08c56296ff6ce", "score": "0.56194836", "text": "function ban_user($group_name, $username){\r\n $gid = $this->get_gid($group_name);\r\n $uid = $this->user->get_uid_by_username($username);\r\n $group = $this->group->select_by_id($gid);\r\n $group[\"banned_users\"] .= \",$uid\";\r\n $this->remove_member($group_name, $username);\r\n return $this->group->update([\"banned_users\" => $group['banned_users']], $gid);\r\n }", "title": "" }, { "docid": "eb891c413d10a23f1f109259a391712c", "score": "0.56166327", "text": "public function removePermissions()\n\t{\n\t\tFoundry::requireLogin();\n\n\t\t$client \t\t= JRequest::getWord( 'client' );\n\t\t$permissions \t= JRequest::getWord( 'permissions' );\n\n\t\t$oauth \t\t\t= Foundry::oauth( $client );\n\t\t$oauth->removePermissions( $permissions );\n\n\t\t// Get the current view\n\t\t$view \t\t\t= $this->getCurrentView();\n\n\t\treturn $view->call( __FUNCTION__ );\n\t}", "title": "" }, { "docid": "7d046253ef96db1144358e5168cc554d", "score": "0.561392", "text": "public function unblockAccess()\n {\n return $this->surveillanceManager->setType($this->type)->setValue($this->value)->unblockAccess();\n }", "title": "" }, { "docid": "c555e562ec23ec0d3546171afb36fb63", "score": "0.56087035", "text": "function blackfyre_remove_user_from_clan_on_delete( $user_id ) {\n\t$clans = get_user_meta($user_id,'clan_post_id');\n\tforeach ($clans as $clan) {\n\t\tblackfyre_change_membership_remove_friend_admin_by_id($user_id, $clan);\n\t}\n}", "title": "" }, { "docid": "6e15a954f4177efc615761eb06e62eff", "score": "0.55806553", "text": "function steam_activation_f_banuser($uid, $length, $reason) {\r\n\tsteam_activation_f_debug(\"Function: banuser()\");\r\n\tglobal $db, $mybb;\r\n\r\n\tif($length == 0) {\r\n\t\tsteam_activation_f_debug(\"Length is 0, not banning\");\r\n\r\n\t} else {\r\n\t\tsteam_activation_f_debug(\"Length is not 0, so we should ban\");\r\n\t\t\r\n\t\t//Query for user with uid $uid\r\n\t\t$result = $db->simple_select(\"users\", \"*\", \"uid=\".$uid);\r\n\r\n\t\tif($db->num_rows($result) == 0) {\r\n\t\t\tsteam_activation_f_debug(\"<b>ERROR</b>User does not exist. This should not happen!\");\r\n\r\n\t\t} else {\r\n\t\t\tsteam_activation_f_debug(\"User found in the database\");\r\n\r\n\t\t\t$userInfo = $db->fetch_array($result);\r\n\r\n\t\t\tif($userInfo[\"usergroup\"] == $mybb->settings[\"steam_activation_banned_group\"]) { \r\n\t\t\t\tsteam_activation_f_debug(\"User is already banned, not double-banning\");\r\n\r\n\t\t\t} else {\r\n\t\t\t\tsteam_activation_f_debug(\"User not already banned, <b>let's ban this fucker!</b>\");\r\n\r\n\t\t\t\tif($length == -1) {\r\n\t\t\t\t\tsteam_activation_f_debug(\"Permanent ban detected\");\r\n\t\t\t\t\t$bantime = \"---\";\r\n\t\t\t\t\t$lifted = 0;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsteam_activation_f_debug(\"Ban is not a permaban. Building bantime and lifted db-entries now\");\r\n\r\n\t\t\t\t\t$secsperyear = 31536000;\r\n\t\t\t\t\t$secspermonth = 2630000;\r\n\t\t\t\t\t$secsperday = 86400;\r\n\r\n steam_activation_f_debug(\"Found \".$length.\" as bantime in minutes\");\r\n\r\n $timeconstruct = $length;\r\n $years = floor($timeconstruct / $secsperyear);\r\n $timeconstruct = $timeconstruct - $years * $secsperyear;\r\n $months = floor($timeconstruct / $secspermonth);\r\n $timeconstruct = $timeconstruct - $months * $secspermonth;\r\n $days = floor($timeconstruct / $secsperday);\r\n\r\n steam_activation_f_debug(\"I should ban for: \".$years.\" years, \".$months.\" months and \".$days.\" days.\");\r\n\r\n\t\t\t\t\t$bantime = $years.\"-\".$months.\"-\".$days;\r\n\r\n\t\t\t\t\t$lifted = time()+$length;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$banInfo = array(\r\n\t\t\t\t\t\"uid\" => $uid,\r\n\t\t\t\t\t\"gid\" => $mybb->settings[\"steam_activation_banned_group\"],\r\n\t\t\t\t\t\"oldgroup\" => $userInfo[\"usergroup\"],\r\n\t\t\t\t\t\"olddisplaygroup\" => $userInfo[\"displaygroup\"],\r\n\t\t\t\t\t\"admin\" => 0,\r\n\t\t\t\t\t\"dateline\" => time(),\r\n\t\t\t\t\t\"bantime\" => $bantime,\r\n\t\t\t\t\t\"lifted\" => $lifted,\r\n\t\t\t\t\t\"reason\" => $reason\r\n\t\t\t\t);\r\n\r\n\t\t\t\t//Insert baninfo into the \"banned\" table\r\n\t\t\t\t$db->insert_query(\"banned\", $banInfo);\r\n\r\n\t\t\t\t//Update usergroup\r\n\t\t\t\t$db->update_query(\"users\", array(\"usergroup\" => $mybb->settings[\"steam_activation_banned_group\"]), \"uid=\".$uid);\r\n\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tsteam_activation_f_refresh();\r\n}", "title": "" }, { "docid": "68ff133e26003fb167794fca456c4db1", "score": "0.5576582", "text": "protected function preparePermissions()\n\t{\n\t\t//block access to the administrators block, if the admin doesn't have explicit permissions set\n\t\t$default_no_view = false;\n\t\tif ($this->name == 'administrators' && !$this->app->user->isSuperAdmin()) {\n\t\t\t$default_no_view = true;\n\t\t}\n\n\t\t$allowed_blocks = ['index', 'login'];\n\t\t//always allow access to the index/login blocks iregardless of what permissions have been set\n\t\tif (in_array($this->name, $allowed_blocks)) {\n\t\t\t$this->permissions = $this->app->user->getDefaultPermissions();\n\t\t\t$this->app->user->setPermissions($this->permissions);\n\t\t\treturn;\n\t\t}\n\n\t\tif (!$this->app->user->id) {\n\t\t\treturn;\n\t\t}\n\n\t\t$permissions = $this->app->db->select($this->getPermissionsTable(), ['user_id' => $this->app->user->id, 'block_id' => $this->id]);\n\n\t\tif ($permissions) {\n\t\t\tunset($permissions['user_id']);\n\t\t\tunset($permissions['block_id']);\n\t\t} else {\n\t\t\t$permissions = $this->app->user->getDefaultPermissions();\n\n\t\t\tif ($default_no_view) {\n\t\t\t\t$permissions['view'] = 0;\n\t\t\t}\n\t\t}\n\n\t\t$this->permissions = $permissions;\n\t\t$this->app->user->setPermissions($permissions);\n\t}", "title": "" }, { "docid": "f19aec74383be3a945c7a8f4014b5eec", "score": "0.5560905", "text": "function SplitForum_DenyAccess()\n{\n\tglobal $forumid, $user_info, $modSettings;\n\n\t// Make sure we can log out. Otherwise, we stuck in an endless loop:\n\tif (isset($_GET['action']) && $_GET['action'] == 'logout')\n\t\treturn;\n\t\n\t// Make sure we are NOT ADMIN and have not been denied access to this subforum....\n\t// NOTE: If we skip the admin check, all admins will be denied access to all subforums!!!\n\tif (empty($user_info['is_admin']) && !empty($modSettings['subforum_settings_permission_access']))\n\t{\n\t\tif (allowedTo('deny_subforum' . $forumid))\n\t\t{\n\t\t\tloadLanguage('ManageSplitForum');\n\t\t\tfatal_lang_error('subforum_access_denied', 'user', !empty($modSettings['subforum_settings_permission_access_log']));\n\t\t}\n\t}\n}", "title": "" }, { "docid": "374b52b07232a6f420e06dbc704c9107", "score": "0.55519533", "text": "public function unblock()\n\t{\n\t\t$userId = $this->security->xss_clean($this->uri->segment(3));\n\n\t\tif (Authencate::find($userId)->update(['ban_id' => 0, ''])) { // User is unblocked.\n\t\t\t$this->session->set_flashdata('class', 'alert alert-success');\n\t\t\t$this->session->set_flashdata('message', 'De gebruiker is actief.');\n\t\t}\n\n\t\treturn redirect($_SERVER['HTTP_REFERER']);\n\t}", "title": "" }, { "docid": "522bec56a16c13ad1745b5a39686c6d6", "score": "0.5537848", "text": "public function setBlockUnblock(){\n\t\t$id = $this->input->post('id');\n\t\t$buttonValue = $this->input->post('buttonValue');\n\t\t$status = $this->input->post('status');\n\n\t\t//get deleted user info\n\t\t$userInfo = singleDbTableRow($id);\n\t\t$fullName = user_full_name($userInfo);\n\t\t// add a activity\n\t\tcreate_activity($status.\" {$fullName} from Agent\");\n\t\t//Now delete permanently\n\n\t\t$this->db->where('id', $id)->update('bank', ['active' => $buttonValue]);\n\t\treturn true;\n\t}", "title": "" }, { "docid": "7641cc3456b584fc28f5395a92fce438", "score": "0.5532099", "text": "public function unbanUser($id)\n {\n $this->db->update($this->table, ['statusId' => '2'], ['id' => $id]);\n }", "title": "" }, { "docid": "17a51577f7cb4b734d945c8d7ee78b96", "score": "0.55249697", "text": "public function fbRevoke()\n {\n $loginUserId = $this->Encryption->decode($this->Session->read('Auth.Front.id'));\n $this->User->id = $loginUserId;\n $this->User->save(array('User'=>array('fb_connected'=>0,'fb_access_token'=>\"\")));\n $buisnessOwndata = $this->BusinessOwner->find('first',array('conditions'=>array('User.id'=>$loginUserId)));\n if ( !empty($buisnessOwndata) ) {\n $twitterData = explode(',',$buisnessOwndata['BusinessOwner']['notifications_enabled']);\n $pos = array_search('fbReferralSend', $twitterData);\n if ($pos !== FALSE) {\n unset($twitterData[$pos]);\n }\n $pos = array_search( 'fbMessageSend', $twitterData );\n if ($pos !== FALSE) {\n unset($twitterData[$pos]);\n }\n $pos = array_search( 'fbInviteSend', $twitterData );\n if ($pos !== FALSE) {\n unset($twitterData[$pos]);\n }\n $twitterData = implode( ',',array_values($twitterData) );\n $this->BusinessOwner->id = $this->Encryption->decode($buisnessOwndata['BusinessOwner']['id']);\n $this->BusinessOwner->saveField('notifications_enabled',$twitterData);\n }\n $this->Session->setFlash( 'Facebook account has been disconnected','Front/flash_good' );\n $this->redirect( array('action'=>'social','facebook') );\n }", "title": "" }, { "docid": "31adc67226aac1b54365f4cd223dcfc6", "score": "0.5514175", "text": "function permission(){\n return false;\n }", "title": "" }, { "docid": "cda019cce37640a929de9a2cbc16a294", "score": "0.55090576", "text": "function revokeAdmin(){\r\n\t\tif(checkAdminLevel()){\r\n\t\t\tglobal $database;\r\n\t\t\t$database->openConnection();\r\n\t\t\t$username = $_GET['auxData1'];\r\n\t\t\t$queryText = \"update Users set Admin = 0 where Username = '\" . $username . \"'\";\r\n\t\t\t$result = $database->query($queryText);\r\n\t\t\t$database->closeConnection();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "81ab47c204e2c7685c4a29e18c586e97", "score": "0.54822016", "text": "public function prevent_admin_access() {\r\n\t\t$prevent_access = false;\r\n\r\n\t\tif ( 'yes' === get_option( 'ffd_lock_down_admin', 'yes' ) && ! is_ajax() && basename( $_SERVER['SCRIPT_FILENAME'] ) !== 'admin-post.php' ) {\r\n\t\t\t$has_cap = false;\r\n\t\t\t$access_caps = array( 'edit_posts', 'manage_ffd_integration', 'view_admin_dashboard' );\r\n\r\n\t\t\tforeach ( $access_caps as $access_cap ) {\r\n\t\t\t\tif ( current_user_can( $access_cap ) ) {\r\n\t\t\t\t\t$has_cap = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif ( ! $has_cap ) {\r\n\t\t\t\t$prevent_access = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t\r\n\t}", "title": "" }, { "docid": "c8819ff7810eace973920313f1da8ab1", "score": "0.54785", "text": "public static function ban(){\n\t\tself::set(BANNED, time() + BAN_TIME);\n\t\tHelper::refresh();\n\t}", "title": "" }, { "docid": "b42364b12d7afb8e348dd3c2a25f2264", "score": "0.5474591", "text": "public function revokeAll($userId);", "title": "" }, { "docid": "b42364b12d7afb8e348dd3c2a25f2264", "score": "0.5474591", "text": "public function revokeAll($userId);", "title": "" }, { "docid": "ce64a48c92931c02063454f1bf25524d", "score": "0.547007", "text": "function ct_unblock_user($useless){\n\t$nonce = $_POST['nonce'];\n if (1) {\n\t\t//remove current_user_id from $user_id's blocked list\n\t\t$user_id = sanitize_text_field($_POST['blockedID_post']);\n\t\t$current_user = get_current_user_id();\n\t\t$blocked_by_list = get_user_meta($user_id, \"blocked_by_list\", true);\n\t\tdelete_user_meta($user_id, \"blocked_by_list\");\n\n\t\terror_log(\"unblocking \" . $user_id . \" from \" . $current_user);\n\n\t\t//removes the current user from $blocked_by_list\n\t\tfor($i = 0; $i < count($blocked_by_list); $i++){\n\t\t\tif($blocked_by_list[$i] == $current_user || $blocked_by_list[$i] == (string)$current_user){\n\t\t\t\tunset($blocked_by_list[$i]);\n\t\t\t}\n\t\t}\n\t\tadd_user_meta($user_id, \"blocked_by_list\", $blocked_by_list);\n\n\t\t$blocked_list = get_user_meta($current_user, \"blocked_list\", true);\n\t\tdelete_user_meta($current_user, \"blocked_list\");\n\t\tfor($i = 0; $i < count($blocked_list); $i++){\n\t\t\tif($blocked_list[$i] == $user_id || $blocked_list[$i] == (string)$user_id){\n\t\t\t\tunset($blocked_list[$i]);\n\t\t\t\t//$i = $i-1; this was commented out because it appeared to be causing undefined index errors in php testing window? very odd\n\t\t\t}\n\t\t}\n\n\t\tadd_user_meta($current_user, \"blocked_list\", $blocked_list);\n\t}\n}", "title": "" }, { "docid": "9d0b878109f187eb7ab281537c51032c", "score": "0.5460696", "text": "function phpbb_cache_moderators($db, $cache, $auth)\n{\n\t// Remove cached sql results\n\t$cache->destroy('sql', MODERATOR_CACHE_TABLE);\n\n\t// Clear table\n\tswitch ($db->get_sql_layer())\n\t{\n\t\tcase 'sqlite':\n\t\tcase 'sqlite3':\n\t\t\t$db->sql_query('DELETE FROM ' . MODERATOR_CACHE_TABLE);\n\t\tbreak;\n\n\t\tdefault:\n\t\t\t$db->sql_query('TRUNCATE TABLE ' . MODERATOR_CACHE_TABLE);\n\t\tbreak;\n\t}\n\n\t// We add moderators who have forum moderator permissions without an explicit ACL_NEVER setting\n\t$hold_ary = $ug_id_ary = $sql_ary = array();\n\n\t// Grab all users having moderative options...\n\t$hold_ary = $auth->acl_user_raw_data(false, 'm_%', false);\n\n\t// Add users?\n\tif (sizeof($hold_ary))\n\t{\n\t\t// At least one moderative option warrants a display\n\t\t$ug_id_ary = array_keys($hold_ary);\n\n\t\t// Remove users who have group memberships with DENY moderator permissions\n\t\t$sql_ary_deny = array(\n\t\t\t'SELECT'\t=> 'a.forum_id, ug.user_id, g.group_id',\n\n\t\t\t'FROM'\t\t=> array(\n\t\t\t\tACL_OPTIONS_TABLE\t=> 'o',\n\t\t\t\tUSER_GROUP_TABLE\t=> 'ug',\n\t\t\t\tGROUPS_TABLE\t\t=> 'g',\n\t\t\t\tACL_GROUPS_TABLE\t=> 'a',\n\t\t\t),\n\n\t\t\t'LEFT_JOIN'\t=> array(\n\t\t\t\tarray(\n\t\t\t\t\t'FROM'\t=> array(ACL_ROLES_DATA_TABLE => 'r'),\n\t\t\t\t\t'ON'\t=> 'a.auth_role_id = r.role_id',\n\t\t\t\t),\n\t\t\t),\n\n\t\t\t'WHERE'\t\t=> '(o.auth_option_id = a.auth_option_id OR o.auth_option_id = r.auth_option_id)\n\t\t\t\tAND ((a.auth_setting = ' . ACL_NEVER . ' AND r.auth_setting IS NULL)\n\t\t\t\t\tOR r.auth_setting = ' . ACL_NEVER . ')\n\t\t\t\tAND a.group_id = ug.group_id\n\t\t\t\tAND g.group_id = ug.group_id\n\t\t\t\tAND NOT (ug.group_leader = 1 AND g.group_skip_auth = 1)\n\t\t\t\tAND ' . $db->sql_in_set('ug.user_id', $ug_id_ary) . \"\n\t\t\t\tAND ug.user_pending = 0\n\t\t\t\tAND o.auth_option \" . $db->sql_like_expression('m_' . $db->get_any_char()),\n\t\t);\n\t\t$sql = $db->sql_build_query('SELECT', $sql_ary_deny);\n\t\t$result = $db->sql_query($sql);\n\n\t\twhile ($row = $db->sql_fetchrow($result))\n\t\t{\n\t\t\tif (isset($hold_ary[$row['user_id']][$row['forum_id']]))\n\t\t\t{\n\t\t\t\tunset($hold_ary[$row['user_id']][$row['forum_id']]);\n\t\t\t}\n\t\t}\n\t\t$db->sql_freeresult($result);\n\n\t\tif (sizeof($hold_ary))\n\t\t{\n\t\t\t// Get usernames...\n\t\t\t$sql = 'SELECT user_id, username\n\t\t\t\tFROM ' . USERS_TABLE . '\n\t\t\t\tWHERE ' . $db->sql_in_set('user_id', array_keys($hold_ary));\n\t\t\t$result = $db->sql_query($sql);\n\n\t\t\t$usernames_ary = array();\n\t\t\twhile ($row = $db->sql_fetchrow($result))\n\t\t\t{\n\t\t\t\t$usernames_ary[$row['user_id']] = $row['username'];\n\t\t\t}\n\t\t\t$db->sql_freeresult($result);\n\n\t\t\tforeach ($hold_ary as $user_id => $forum_id_ary)\n\t\t\t{\n\t\t\t\t// Do not continue if user does not exist\n\t\t\t\tif (!isset($usernames_ary[$user_id]))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tforeach ($forum_id_ary as $forum_id => $auth_ary)\n\t\t\t\t{\n\t\t\t\t\t$sql_ary[] = array(\n\t\t\t\t\t\t'forum_id'\t\t=> (int) $forum_id,\n\t\t\t\t\t\t'user_id'\t\t=> (int) $user_id,\n\t\t\t\t\t\t'username'\t\t=> (string) $usernames_ary[$user_id],\n\t\t\t\t\t\t'group_id'\t\t=> 0,\n\t\t\t\t\t\t'group_name'\t=> ''\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Now to the groups...\n\t$hold_ary = $auth->acl_group_raw_data(false, 'm_%', false);\n\n\tif (sizeof($hold_ary))\n\t{\n\t\t$ug_id_ary = array_keys($hold_ary);\n\n\t\t// Make sure not hidden or special groups are involved...\n\t\t$sql = 'SELECT group_name, group_id, group_type\n\t\t\tFROM ' . GROUPS_TABLE . '\n\t\t\tWHERE ' . $db->sql_in_set('group_id', $ug_id_ary);\n\t\t$result = $db->sql_query($sql);\n\n\t\t$groupnames_ary = array();\n\t\twhile ($row = $db->sql_fetchrow($result))\n\t\t{\n\t\t\tif ($row['group_type'] == GROUP_HIDDEN || $row['group_type'] == GROUP_SPECIAL)\n\t\t\t{\n\t\t\t\tunset($hold_ary[$row['group_id']]);\n\t\t\t}\n\n\t\t\t$groupnames_ary[$row['group_id']] = $row['group_name'];\n\t\t}\n\t\t$db->sql_freeresult($result);\n\n\t\tforeach ($hold_ary as $group_id => $forum_id_ary)\n\t\t{\n\t\t\t// If there is no group, we do not assign it...\n\t\t\tif (!isset($groupnames_ary[$group_id]))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tforeach ($forum_id_ary as $forum_id => $auth_ary)\n\t\t\t{\n\t\t\t\t$flag = false;\n\t\t\t\tforeach ($auth_ary as $auth_option => $setting)\n\t\t\t\t{\n\t\t\t\t\t// Make sure at least one ACL_YES option is set...\n\t\t\t\t\tif ($setting == ACL_YES)\n\t\t\t\t\t{\n\t\t\t\t\t\t$flag = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (!$flag)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$sql_ary[] = array(\n\t\t\t\t\t'forum_id'\t\t=> (int) $forum_id,\n\t\t\t\t\t'user_id'\t\t=> 0,\n\t\t\t\t\t'username'\t\t=> '',\n\t\t\t\t\t'group_id'\t\t=> (int) $group_id,\n\t\t\t\t\t'group_name'\t=> (string) $groupnames_ary[$group_id]\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\t$db->sql_multi_insert(MODERATOR_CACHE_TABLE, $sql_ary);\n}", "title": "" }, { "docid": "248ee34e432393e3fd9d6ad1525c174d", "score": "0.54571086", "text": "function steam_activation_f_bancheck_currentuser() {\r\n\tsteam_activation_f_debug(\"Function: bancheck_currentuser()\");\r\n\tglobal $mybb;\r\n\r\n\tsteam_activation_f_bancheck_user($mybb->user[\"uid\"], $mybb->user[\"steam_activation_steamid\"]);\r\n}", "title": "" }, { "docid": "8d458ba32105046327348534292439fa", "score": "0.54514235", "text": "public function removerPrivilegios()\n {\n $this->privilegios->clear();\n }", "title": "" }, { "docid": "69bc08a8100d4563088915e5a5de704b", "score": "0.5449567", "text": "function unban_user($group_name, $username){\r\n $uid = $this->user->get_uid_by_username($username);\r\n $gid = $this->get_gid($group_name);\r\n $group = $this->group->select_by_id($gid);\r\n $banned = array();\r\n \r\n foreach(explode(\",\", $group[\"banned_users\"]) as $user){\r\n if($user[\"uid\"] != $uid){\r\n $banned[] = $user;\r\n }\r\n }\r\n $banned = implode(\",\", $banned);\r\n $this->group->update([\"banned_users\" => $banned],$gid);\r\n \r\n return add_members($group_name, $username);\r\n }", "title": "" }, { "docid": "489ee07b79fdf60d3c6d42635ee8d784", "score": "0.5445065", "text": "function unban() {\n if($this->id == '') return false;\n try{\n $consulta = $this->bd->prepare(\"UPDATE Users SET user_type=0 WHERE id = :id\");\n $consulta->execute(array('id' => (int)$this->id));\n return true;\n } catch(PDOException $e) {header('location: dberro.php'); return false;}\n}", "title": "" }, { "docid": "13707f10a00eaa8989d0b0e12b5b9188", "score": "0.54235095", "text": "function dss_block_some_super_admins() {\n\t$user_id = get_current_user_id();\n\tif (\n\t\t1 != $user_id && // Ryan Hellyer\n\t\t75 != $user_id && // Gorm Haug Eriksen\n\t\t181 != $user_id // Per Soderlin\n\t) {\n\t\tdefine( 'DISALLOW_FILE_MODS', true );\n\t}\n\t\n}", "title": "" }, { "docid": "0eafe842795cb550c78a3202fc43492a", "score": "0.5416162", "text": "public function unBan(): self\n\t{\n\t\tif ('banned' === $this->getStatus()) {\n\t\t\t$this->setStatus('active');\n\t\t\t$this->attributes['status_reason'] = null;\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "7cd653e23a42fd5f5bc994f368f20f1e", "score": "0.5399337", "text": "function remove_admin_bar_links() {\n global $wp_admin_bar;\n $wp_admin_bar->remove_menu('wp-logo');\n $wp_admin_bar->remove_node('my-account-messages-compose');//removes the compose menu from messages in buddypress\n $wp_admin_bar->remove_node('my-account-xprofile-public');\n $wp_admin_bar->remove_node('my-account-settings-general');\n $wp_admin_bar->remove_node('my-account-settings-profile');\n\n if (!current_user_can('administrator')):\n $wp_admin_bar->remove_menu('site-name');\n endif;\n\n if (!current_user_can('candidate')):\n $wp_admin_bar->remove_menu('mycred-account');\n endif;\n\n}", "title": "" }, { "docid": "e45ccceca70112cb9a347b24e07bebf9", "score": "0.5393772", "text": "function spam_throttle_20130224() {\n $exempt = unserialize(elgg_get_plugin_setting('exempt', 'spam_throttle'));\n \n if (is_array($exempt)) {\n\tforeach ($exempt as $guid) {\n\t $user = get_user($guid);\n\t \n\t if ($user) {\n\t\t$user->spam_throttle_exempt = 1;\n\t }\n\t}\n }\n}", "title": "" }, { "docid": "edcb765a14cf2b80993ff4971bec5074", "score": "0.53867877", "text": "private function removeBlockingTimeOnUser(): void\n {\n $unblockStatement = $this->DB->prepare(\n \"UPDATE contact SET blocking_time = NULL, login_attempts = NULL \"\n . \"WHERE contact_alias = :contactAlias\"\n );\n $unblockStatement->bindValue(':contactAlias', $this->login, \\PDO::PARAM_STR);\n $unblockStatement->execute();\n }", "title": "" }, { "docid": "abe34c12726b17d35f95651172771586", "score": "0.5357118", "text": "public function down()\n\t{\n\t\t$permission = Permission::where('name', '=', 'api')->delete();\n\t}", "title": "" }, { "docid": "01af8026dfb4b43017814b0cda12c1eb", "score": "0.5336293", "text": "public function remove_settings() {\r\n\r\n\t\t// delete our two options\r\n\t\tdelete_option( 'blacklist_local' );\r\n\t\tdelete_option( 'blacklist_exclude' );\r\n\r\n\t\t// delete the transient\r\n\t\tdelete_transient( 'blacklist_update_process' );\r\n\r\n\t}", "title": "" }, { "docid": "cbc31839b8fbe9cc12e6d29d688b7b28", "score": "0.53280544", "text": "public function showDenyUser()\n\t{\n\t\tPhpfox::isAdmin(true);\t\t\n\t\t$iUser = (int)$this->get('iUser');\n\t\tPhpfox::getBlock('user.admincp.denyUser', array('iUser' => $iUser));\n\t}", "title": "" }, { "docid": "3a369b0e243ee5c20c6e6ce858f7a44a", "score": "0.5326809", "text": "function bpges_unsubscribe_on_membership_ban( BP_Groups_Member $membership ) {\n\tif ( ! $membership->is_banned ) {\n\t\treturn;\n\t}\n\n\tass_group_subscription( 'delete', $membership->user_id, $membership->group_id );\n\tbpges_delete_queued_items_for_user_group( $membership->user_id, $membership->group_id );\n}", "title": "" }, { "docid": "6cd29a9f069782e7ef8277ff89cfe82c", "score": "0.53182065", "text": "function unblock_user($con,$user_id){\n $query = \"UPDATE user SET blocked=0 WHERE user_id='$user_id'\";\n $result = $con->query($query);\n if (!$result){\n die($con->connect_error);\n }else {\n return true;\n }\n}", "title": "" }, { "docid": "37c53fc12e41bab01365d611fd8ef2b3", "score": "0.53057414", "text": "function remove_admin_bar_links()\n\t\t{\n\t\t\tglobal $user_ID;\n\t\t\t\n\t\t\tif(current_user_can('lcp_member'))\n\t\t\t{\n\t\t\t\tglobal $wp_admin_bar;\n\t\t\t\t$wp_admin_bar->remove_menu('my-account');\n\t\t\t\t$wp_admin_bar->remove_menu('updates');\n\t\t\t\t$wp_admin_bar->remove_menu('wp-logo'); // Remove the WordPress logo\n\t\t\t\t$wp_admin_bar->remove_menu('about'); // Remove the about WordPress link\n\t\t\t\t$wp_admin_bar->remove_menu('wporg'); // Remove the WordPress.org link\n\t\t\t\t$wp_admin_bar->remove_menu('documentation'); // Remove the WordPress documentation link\n\t\t\t\t$wp_admin_bar->remove_menu('support-forums');\n\t\t\t}\n }", "title": "" }, { "docid": "2a2728533c5d28ff66252819ab428aeb", "score": "0.5295195", "text": "public function cannot($permissions);", "title": "" }, { "docid": "b2d73e07ff3fd465d9c359e1bfba096a", "score": "0.52885586", "text": "public function revoke_access($id){\n $sql = \"UPDATE members SET clab_access=0 WHERE id='$id'\";\n $this->connect()->query($sql);\n }", "title": "" }, { "docid": "dee916921c55b5d067111a02894c82ef", "score": "0.52885216", "text": "function do_ban_member()\r\t{\r\t\tif ( !$this->ipsclass->member['ibbookie_admin_groups'] && ( !$this->ipsclass->member['ibbookie_admin'] )) \r {\r $this->ipsclass->Error(array(LEVEL => 1, MSG => 'error_no_admin_bookie'));\r }\r\t\t\t$this->ipsclass->input['userid'] = intval( $this->ipsclass->input['userid'] );\r\t\t\t$ban = $this->ipsclass->input['ban'];\r\t\t\t$add_games = $this->ipsclass->input['add_games'];\r\t\t\t$mod_games = $this->ipsclass->input['mod_games'];\r\t\t\t$admin_games = $this->ipsclass->input['admin_games'];\r\t\t\t$username = trim( $this->ipsclass->input['username'] );\r\t\t\t$ibbookie_bets = intval( $this->ipsclass->input['ibbookie_bets'] );\r\t\t\t\r\t\t\t$ibbookie_won = intval( $this->ipsclass->input['ibbookie_won'] );\r\t\t\t\r\t\t\t$ibbookie_points = intval( $this->ipsclass->input['ibbookie_points'] );\r\t\t\tif ( !$this->ipsclass->input['userid'] )\r\t\t\t{\r\t\t\t\t$this->ipsclass->Error( array( 'MSG' => 'no_user' ) );\r\t\t\t}\r\t\t\t$this->ipsclass->DB->build_query( array( 'update' => 'members',\r\t\t\t\t\t\t\t\t\t\t\t\t 'set' => \"ibbookie_banned=$ban,ibbookie_bets=$ibbookie_bets,ibbookie_admin=$admin_games,ibbookie_mod=$mod_games,ibbookie_add=$add_games,ibbookie_won=$ibbookie_won,{$this->ipsclass->vars['ibbookie_points']}=$ibbookie_points\",\r\t\t\t\t\t\t\t\t\t\t\t\t 'where' => 'id='.$this->ipsclass->input['userid']\r\t\t\t\t\t\t\t\t\t\t)\t );\r\t\t\t$this->ipsclass->DB->exec_query();\r\t\t\t\r\t\t\t$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['member_banned'], \"&autocom=bookie&cmd=show_member_perms\" );\r\t}", "title": "" }, { "docid": "e8e144bb41eea728c1720142d5ea598b", "score": "0.5287832", "text": "public function remove_admin_menu_items()\n {\n global $menu, $current_user;\n\n // unset($menu[10]); // Media\n // unset($menu[70]); // Profile\n\n if (! current_user_can('manage_options')) {\n // unset($menu[20]); // Pages\n // unset($menu[75]); // Tools\n }\n }", "title": "" }, { "docid": "30404e896ea17d30312d4c42bd393678", "score": "0.52785486", "text": "public function run() {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::table('user_permissions')->truncate();\n \t\t\t\t\n\t\t// `internal_manager`.`user_permissions`\n\t\t$user_permissions = array(\n\t\t\tarray('user_id' => '324','permission_id' => 'edit_permission','created_at' => '2017-08-24 13:26:08','updated_at' => '2017-08-24 13:26:08'),\n\t\t\tarray('user_id' => '324','permission_id' => 'edit_salary','created_at' => '2017-08-24 13:26:08','updated_at' => '2017-08-24 13:26:08'),\n\t\t\tarray('user_id' => '324','permission_id' => 'manage_permission','created_at' => '2017-08-24 13:26:08','updated_at' => '2017-08-24 13:26:08'),\n\t\t\tarray('user_id' => '324','permission_id' => 'view_permission','created_at' => '2017-08-24 13:26:08','updated_at' => '2017-08-24 13:26:08'),\n\t\t\tarray('user_id' => '324','permission_id' => 'view_salary','created_at' => '2017-08-24 13:26:08','updated_at' => '2017-08-24 13:26:08'),\n\t\t\tarray('user_id' => '328','permission_id' => 'edit_permission','created_at' => '2017-08-25 16:38:58','updated_at' => '2017-08-25 16:38:58'),\n\t\t\tarray('user_id' => '328','permission_id' => 'edit_salary','created_at' => '2017-08-25 16:38:58','updated_at' => '2017-08-25 16:38:58'),\n\t\t\tarray('user_id' => '328','permission_id' => 'manage_permission','created_at' => '2017-08-25 16:38:58','updated_at' => '2017-08-25 16:38:58'),\n\t\t\tarray('user_id' => '328','permission_id' => 'password_salary','created_at' => '2017-08-25 16:38:58','updated_at' => '2017-08-25 16:38:58'),\n\t\t\tarray('user_id' => '328','permission_id' => 'view_permission','created_at' => '2017-08-25 16:38:58','updated_at' => '2017-08-25 16:38:58'),\n\t\t\tarray('user_id' => '328','permission_id' => 'view_salary','created_at' => '2017-08-25 16:38:58','updated_at' => '2017-08-25 16:38:58')\n\t\t);\n\t\t\n DB::table('user_permissions')->insert($user_permissions);\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "title": "" }, { "docid": "4f08e5eea7be290fb3044390c5b9def5", "score": "0.5266638", "text": "function ban_link()\r\t{\r\t\tif ( !$this->ipsclass->member['ibbookie_admin_groups'] && ( !$this->ipsclass->member['ibbookie_admin'] )) \r {\r $this->ipsclass->Error(array(LEVEL => 1, MSG => 'error_no_admin_bookie'));\r }\r\t\t\r\t\t$this->ipsclass->input['userid'] = intval($this->ipsclass->input['userid']);\r\t\t\r\t\t\tif ( !$this->ipsclass->input['userid'] )\r\t\t\t{\r\t\t\t\t$this->ipsclass->Error( array( 'MSG' => 'no_user' ) );\r\t\t\t}\r\t\t\tif ($this->ipsclass->vars['ibbookie_points'] == ibbookie_points)\r\t\t\t{\r\t\t\t$r = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'id, ibbookie_add, ibbookie_mod, ibbookie_admin, ibbookie_banned, members_display_name, ibbookie_bets, ibbookie_won, ibbookie_points AS ibbookie_points',\r\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => 'members',\r\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => 'id='.$this->ipsclass->input['userid'],\r\t\t\t\t\t\t\t\t\t\t\t\t\t )\t\t );\r\t\t\t}\r\t\t\t\r\t\t\tif ($this->ipsclass->vars['ibbookie_points'] == points)\r\t\t\t{\r\t\t\t$r = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'id, ibbookie_add, ibbookie_mod, ibbookie_admin, ibbookie_banned, members_display_name, ibbookie_bets, ibbookie_won, points AS ibbookie_points',\r\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => 'members',\r\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => 'id='.$this->ipsclass->input['userid'],\r\t\t\t\t\t\t\t\t\t\t\t\t\t )\t\t );\r\t\t\t}\t\t\t\r\t\t\r\t\t\tif ($this->ipsclass->vars['ibbookie_points'] == money )\r\t\t\t{\r\t\t\t$r = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'id, ibbookie_add, ibbookie_mod, ibbookie_admin, ibbookie_banned, members_display_name, ibbookie_bets, ibbookie_won, money AS ibbookie_points',\r\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => 'members',\r\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => 'id='.$this->ipsclass->input['userid'],\r\t\t\t\t\t\t\t\t\t\t\t\t\t )\t\t );\r\t\t\t}\r\t\t\t\r\t\t\tif ($this->ipsclass->vars['ibbookie_points'] == utr_points)\r\t\t\t{\r\t\t\t$r = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'id, ibbookie_add, ibbookie_mod, ibbookie_admin, ibbookie_banned, members_display_name, ibbookie_bets, ibbookie_won, utr_points AS ibbookie_points',\r\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => 'members',\r\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => 'id='.$this->ipsclass->input['userid'],\r\t\t\t\t\t\t\t\t\t\t\t\t\t )\t\t );\r\t\t\t}\r\t\t\tif ($this->ipsclass->vars['ibbookie_points'] == posts)\r\t\t\t{\r\t\t\t$r = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'id, ibbookie_add, ibbookie_mod, ibbookie_admin, ibbookie_banned, members_display_name, ibbookie_bets, ibbookie_won, posts AS ibbookie_points',\r\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => 'members',\r\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => 'id='.$this->ipsclass->input['userid'],\r\t\t\t\t\t\t\t\t\t\t\t\t\t )\t\t );\r\t\t\t}\r\t\t\t\r\t\t\tif ( $r['id'] )\r\t\t\t{ \r\t\t\t\t$r['ban'] = $r['ibbookie_banned'];\r\t\t\t\t$r['name'] = $r['members_display_name'];\r\t\t\t\t$r['ibbookie_add'] = $r['ibbookie_add'];\r\t\t\t\t$r['ibbookie_mod'] = $r['ibbookie_mod'];\r\t\t\t\t$r['ibbookie_admin'] = $r['ibbookie_admin'];\r\t\t\t\t\r\t\t\t\t$r['ibbookie_won'] = $r['ibbookie_won'];\r\t\t\t\t\r\t\t\t\t$r['ibbookie_bets'] = $r['ibbookie_bets'];\r\t\t\t\t\r\t\t\t\t$r['ibbookie_points'] = $r['ibbookie_points'];\r\t\t\t\t\r\t\t\t\t\r\t\t\t\t\r\t\t\t\t$this->output .= $this->ipsclass->compiled_templates['skin_bookie']->ban_link( $r );\r\t\t\t}\r\t\t\telse\r\t\t\t{\r\t\t\t\t$this->ipsclass->Error( array( 'MSG' => 'error_no_user' ) );\r\t\t\t}\r\t\t\r\t\t\r\t\t$this->page_title = $this->ipsclass->lang['ban_member'];\r\t\t$this->nav[] = $this->ipsclass->lang['ban_member'];\r\t}", "title": "" }, { "docid": "fbe597df8ae6a7d205f8ba581b4a9015", "score": "0.52658856", "text": "public function deleteAllSpam()\n {\n global $wpdb;\n $wpdb->query(\"DELETE $this->table_name.* FROM $this->table_name NATURAL JOIN $wpdb->comments WHERE comment_approved = 'spam'\");\n $wpdb->query(\"DELETE FROM $wpdb->comments WHERE comment_approved = 'spam'\");\n }", "title": "" }, { "docid": "d81bf297af7be358a464c0483a06bbea", "score": "0.5264143", "text": "public function clearPermissionsOf($vhost, $user) {\n\t\t$this->requestDelete('permissions/' . urlencode($vhost) . '/' . urlencode($user));\n\t}", "title": "" }, { "docid": "3d287ee390b5932cd71abb2bda160713", "score": "0.52614003", "text": "public function deactivate() {\n $items = MenuItem::getPluginMenuItems($this->_plugin);\n foreach($items as $item){\n $item->delete();\n }\n\n $permissions = Permission::getPluginPermissions($this->_plugin);\n foreach($permissions as $permission){\n $permission->delete();\n }\n\n }", "title": "" }, { "docid": "c6189e839d2de622a4f9102deda29abf", "score": "0.52597576", "text": "function blacklist($fromLogin, $param1 = NULL, $param2 = \"\", $param3 = NULL) {\n\t\t$player = $this->storage->getPlayerObject($fromLogin);\n\t\tif (!AdminGroup::contains($player->login)) {\n\t\t\t$this->connection->chatSendServerMessage('$fff» $f00$iYou don\\'t have the permission to do that!', $fromLogin);\n\t\t\treturn;\n\t\t}\n\n\t\tif (!$this->playerExists($param1)) {\n\t\t\t$this->connection->chatSendServerMessage('$fff» $f00$iPlayer $fff' . $param1 . '$f00 doesn\\' exist.', $fromLogin);\n\t\t\treturn;\n\t\t}\n\n\t\t$player = $this->storage->getPlayerObject($param1);\n\t\tif (is_object($player)) {\n\t\t\t$nickname = $player->nickName;\n\t\t} else {\n\t\t\t$nickname = $param1;\n\t\t}\n\n\t\t$admin = $this->storage->getPlayerObject($fromLogin);\n\t\ttry {\n\t\t\tif ($this->playerExists($param1)) {\n\t\t\t\t$this->connection->banAndBlackList($player, $param2, true);\n\t\t\t} else {\n\t\t\t\t$this->manualAddBlacklist($param1);\n\t\t\t}\n\t\t\t$this->connection->chatSendServerMessage('$fff»» $ff0Admin $fff' . $admin->nickName . '$z$s$ff0 blacklists the player $fff' . $nickname);\n\t\t} catch (\\Exception $e) {\n\t\t\t$this->connection->chatSendServerMessage('$fff» $f00$i' . $e->getMessage(), $fromLogin);\n\t\t}\n\t}", "title": "" }, { "docid": "cc9172e7b94db060b3196c3f73e2fa95", "score": "0.52570957", "text": "public function down()\n\t{\n\t\tSchema::drop('permissions');\n\t}", "title": "" }, { "docid": "e0b0da9529f888f430147fed74002bf2", "score": "0.52561617", "text": "function denyFriendRequest($uid1, $uid2)\n\t{\n\t\treturn $this->query->deleteFriend($uid1, $uid2);\n\t}", "title": "" }, { "docid": "c2f9df2519c22e0537d6f3593cb370d6", "score": "0.52551717", "text": "function remove_admin_bar()\n{\n if (!current_user_can('administrator') && !is_admin()) {\n show_admin_bar(false);\n }\n}", "title": "" }, { "docid": "2b09196c8794ae539285438e60db952e", "score": "0.5251149", "text": "protected function finalActions()\n\t{\n\t\t/** @var \\XF\\Repository\\PermissionCombination $combinationRepo */\n\t\t$combinationRepo = $this->app->repository('XF:PermissionCombination');\n\t\t$combinationRepo->deleteUnusedPermissionCombinations();\n\t}", "title": "" }, { "docid": "6723ca9ed2922a1173679c017f749df9", "score": "0.52498686", "text": "public function _permissionCheck()\n {\n $temp = array(\n 'ban' => FALSE,\n 'bf3' => FALSE,\n 'bf4' => FALSE,\n 'forgive' => FALSE,\n 'kick' => FALSE,\n 'kickall' => FALSE,\n 'kill' => FALSE,\n 'nuke' => FALSE,\n 'pmute' => FALSE,\n 'psay' => FALSE,\n 'punish' => FALSE,\n 'pyell' => FALSE,\n 'say' => FALSE,\n 'squad' => FALSE,\n 'tban' => FALSE,\n 'team' => FALSE,\n 'tsay' => FALSE,\n 'tyell' => FALSE,\n 'yell' => FALSE,\n );\n\n if(!\\Auth::check()) return $temp;\n\n $user_permissions = \\Auth::user()->permissions();\n\n foreach($user_permissions as $permission)\n {\n if(starts_with($permission->name, 'scoreboard'))\n {\n $cmdname = explode('.', $permission->name);\n\n if(array_key_exists($cmdname[1], $temp))\n {\n $temp[$cmdname[1]] = TRUE;\n }\n }\n }\n\n return $temp;\n }", "title": "" }, { "docid": "12703377a9de8c809db6430efbdba335", "score": "0.5241404", "text": "function removePermission($permission, $user) {\n\tglobal $mysqli,$db_table_prefix; \n\t$i = 0;\n\t$stmt = $mysqli->prepare(\"DELETE FROM \".$db_table_prefix.\"user_permission_matches \n\t\tWHERE permission_id = ?\n\t\tAND user_id =?\");\n\tif (is_array($permission)){\n\t\tforeach($permission as $id){\n\t\t\t$stmt->bind_param(\"ii\", $id, $user);\n\t\t\t$stmt->execute();\n\t\t\t$i++;\n\t\t}\n\t}\n\telseif (is_array($user)){\n\t\tforeach($user as $id){\n\t\t\t$stmt->bind_param(\"ii\", $permission, $id);\n\t\t\t$stmt->execute();\n\t\t\t$i++;\n\t\t}\n\t}\n\telse {\n\t\t$stmt->bind_param(\"ii\", $permission, $user);\n\t\t$stmt->execute();\n\t\t$i++;\n\t}\n\t$stmt->close();\n\treturn $i;\n}", "title": "" }, { "docid": "3f0b2943a9d93df7a1901eb7d9fccc89", "score": "0.5234171", "text": "function unBlacklist($fromLogin, $param1 = NULL, $param2 = NULL, $param3 = NULL) {\n\t\t$player = $this->storage->getPlayerObject($fromLogin);\n\t\tif (!AdminGroup::contains($player->login)) {\n\t\t\t$this->connection->chatSendServerMessage('$fff» $f00$iYou don\\'t have the permission to do that!', $fromLogin);\n\t\t\treturn;\n\t\t}\n\n\t\tif (empty($param1)) {\n\t\t\t$this->connection->chatSendServerMessage('$fff» $f00$i/unblack takes a s login as a parameter, none entered.', $fromLogin);\n\t\t\treturn;\n\t\t}\n\t\t$admin = $this->storage->getPlayerObject($fromLogin);\n\t\t$player = new \\ManiaLive\\DedicatedApi\\Structures\\Player();\n\t\t$player->login = $param1;\n\t\ttry {\n\t\t\t$this->connection->unBlackList($player);\n\t\t\t$this->connection->chatSendServerMessage('$fff»» $ff0Admin $fff' . $admin->nickName . '$z$s$ff0 unblacklists the player ' . $player->login);\n\t\t} catch (\\Exception $e) {\n\t\t\t$this->connection->chatSendServerMessage('$fff» $f00$i' . $e->getMessage(), $fromLogin);\n\t\t}\n\t}", "title": "" }, { "docid": "9c7d20121a7b03759f24f2cb914d0c9e", "score": "0.5232072", "text": "function install_remove_permissions($rid, $perms) {\n // Retrieve the currently set permissions.\n $result = db_query(\"SELECT p.perm FROM {role} r INNER JOIN {permission} p ON p.rid = r.rid WHERE r.rid = %d \", $rid);\n $existing_perms = array();\n while ($row = db_fetch_object($result)) {\n $existing_perms += explode(', ', $row->perm);\n }\n $new_perms = array_diff($existing_perms, $perms);\n \n // Update the permissions.\n db_query('DELETE FROM {permission} WHERE rid = %d', $rid);\n db_query(\"INSERT INTO {permission} (rid, perm) VALUES (%d, '%s')\", $rid, implode(', ', $new_perms));\n}", "title": "" }, { "docid": "705fbf9b1df496a555a2847c10b34291", "score": "0.5221809", "text": "function denyBid(){\n\t\tJSession::checkToken('request') or jexit(JText::_('JINVALID_TOKEN'));\n\t\t\n\t\t$app \t= JFactory::getApplication();\n\t\t$row = JTable::getInstance('bid', 'Table');\n\t\n\t\t$id = $app->input->get('id', 0, 'int');\t//bid id\n\t\t$row->load($id);\n\t\t$row->status = 'COM_JBLANCE_DENIED';\n\t\t\n\t\t$project = JTable::getInstance('project', 'Table');\n\t\t$project->load($row->project_id);\n\t\n\t\tif(!$row->check())\n\t\t\tJError::raiseError(500, $row->getError());\n\t\t\n\t\tif(!$row->store())\n\t\t\tJError::raiseError(500, $row->getError());\n\t\t\n\t\t$row->checkin();\n\t\t\n\t\t//send bid denied notification to publisher\n\t\t$jbmail = JblanceHelper::get('helper.email');\t\t// create an instance of the class EmailHelper\n\t\t$jbmail->sendProjectDeniedNotification($row->project_id, $row->user_id);\n\t\t\n\t\t//Trigger the plugin event to feed the activity - buyer pick freelancer\n\t\tJPluginHelper::importPlugin('joombri');\n\t\t$dispatcher = JDispatcher::getInstance();\n\t\t$dispatcher->trigger('onFreelancerDenyBid', array($project->assigned_userid, $project->publisher_userid, $project->id));\n\t\t\n\t\t$msg = JText::_('COM_JBLANCE_BID_DENIED_SUCCESSFULLY');\n\t\t$return\t= JRoute::_('index.php?option=com_jblance&view=project&layout=showmybid', false);\n\t\t$this->setRedirect($return, $msg);\n\t}", "title": "" }, { "docid": "675368aea9c490c85bb7235c12116ffb", "score": "0.52202505", "text": "function th_remove_admin_bar_links() {\n global $wp_admin_bar, $current_user;\n\n $wp_admin_bar->remove_menu('ot-theme-options'); // Remove the updates link\n\n if ($current_user->ID != 1) {\n\n }\n}", "title": "" }, { "docid": "ccf09da7b3b8d70fc518b26343d349d7", "score": "0.52156186", "text": "public function unblocked($id){\n $admin=Admin::find($id);\n $admin->block=User::UNBLOCK;\n $admin->save();\n return redirect('/admin/admins');\n }", "title": "" }, { "docid": "0d2f65f6142e288db99a89f5f7b6c472", "score": "0.52142256", "text": "function ban() {\n global $locations, $config;\n setcookie('chocolate',time(),time() * (60*60*24*365),'/');\n #sleep(10);\n #mail($config[admin_email],\"Error in $_SERVER[SCRIPT_FILENAME]\",\"User '$_POST[message_author]' is banned [$_SERVER[REMOTE_ADDR]\\n\",\"From: \\\"Script Debugging SubSystem\\\" <$config[admin_email]>\\n\");\n header(\"Location: $locations[forum]\");\n exit();\n}", "title": "" }, { "docid": "a63b9daa329327e848b32afcc8c8027a", "score": "0.5213453", "text": "function steam_activation_f_bancheck_user($checkuid, $checkSteamID) {\r\n\tsteam_activation_f_debug(\"Function: bancheck_user()\");\r\n global $mybb;\r\n\r\n\t$banInfo = steam_activation_f_check_uid($checkuid, $checkSteamID);\r\n\r\n\tif(isset($banInfo[\"error\"])) {\r\n\t\tsteam_activation_f_debug(\"<b>An error was thrown: \".$banInfo[\"error\"].\"</b>\");\r\n\t\t//An error was thrown. Lets do something about it!\r\n\r\n if($banInfo[\"error\"] === \"unban\"){\r\n steam_activation_f_debug(\"Plugin told to unban. Doing as you wish!\");\r\n steam_activation_f_unban($checkuid);\r\n } else {\r\n steam_activation_f_debug(\"It's not an unban, so we'll ban.\");\r\n if($mybb->user[\"usergroup\"] == $mybb->settings[\"steam_activation_banned_group\"]){\r\n steam_activation_f_debug(\"This user is banned. Returning now as if there is no error since we are only supposed to check it user needs unban if he's banned\");\r\n return;\r\n } else {\r\n steam_activation_f_debug(\"This user was not banned, but an error was thrown. Let's ban this fucker!\");\r\n if(isset($banInfo[\"banlength\"])) {\r\n steam_activation_f_debug(\"Length detected: \".$banInfo[\"banlength\"]);\r\n\r\n $banlength = $banInfo[\"banlength\"];\r\n } else {\r\n //Default ban length\r\n $banlength = 15780000; //6 Months\r\n\r\n steam_activation_f_debug(\"No ban length detected, using default: \".$banlength);\r\n }\r\n\r\n if(isset($banInfo[\"banreason\"])) {\r\n steam_activation_f_debug(\"Reason detected: \".$banInfo[\"banreason\"]);\r\n\r\n $banreason = $banInfo[\"banreason\"];\r\n } else {\r\n //Default ban length\r\n $banreason = \"Automatic ban by a custom plugin of the steam_activation plugin. It threw the following error: \".$banInfo[\"error\"].\".\";\r\n\r\n steam_activation_f_debug(\"No ban reason detected, using default: \".$banreason);\r\n }\r\n steam_activation_f_banuser($checkuid, $banlength, $banreason);\r\n }\r\n }\r\n\r\n steam_activation_f_debug(\"Checking if this is a check on a logged in user.\");\r\n if($mybb->user[\"uid\"] === $checkuid){\r\n steam_activation_f_debug(\"Yes, the logged in user. Refreshing the page since he's been affected\");\r\n steam_activation_f_refresh();\r\n } else {\r\n steam_activation_f_debug(\"Nope, not the logged in user. Not going to refresh.\");\r\n }\r\n\t} else {\r\n\t\tsteam_activation_f_debug(\"No error found. \".$checkuid.\" is all good!\");\r\n\t\t\r\n\t}\r\n}", "title": "" }, { "docid": "97c170cb23324f44b7d7e3b531341032", "score": "0.5211797", "text": "public static function prevent_access() {\n\t\treturn current_user_can( 'manage_options' ) || TQB_Product::has_access() || tve_dash_is_crawler();\n\t}", "title": "" }, { "docid": "b32da08a4f2da48479678221884e31a5", "score": "0.5210264", "text": "function rocket_warning_busting_cache_dir_permissions() {\r\n\tif ( current_user_can( apply_filters( 'rocket_capacity', 'manage_options' ) )\r\n\t && ( ! is_writable( WP_ROCKET_CACHE_BUSTING_PATH ) )\r\n\t && ( get_rocket_option( 'remove_query_strings', false ) )\r\n\t && rocket_valid_key() ) {\r\n\r\n\t\t$boxes = get_user_meta( $GLOBALS['current_user']->ID, 'rocket_boxes', true );\r\n\r\n\t\tif ( ! in_array( __FUNCTION__, (array) $boxes ) ) { ?>\r\n\r\n\t\t\t<div class=\"error\">\r\n\t\t\t\t<a href=\"<?php echo wp_nonce_url( admin_url( 'admin-post.php?action=rocket_ignore&box='.__FUNCTION__ ), 'rocket_ignore_'.__FUNCTION__ ); ?>\" class=\"rkt-cross\"><div class=\"dashicons dashicons-no\"></div></a>\r\n\t\t\t\t<p><b><?php echo WP_ROCKET_PLUGIN_NAME; ?></b>: <?php printf( __('Be careful, you don\\'t have <a href=\"%1$s\" target=\"_blank\">writing permissions</a> on <b>%3$s</b> cache busting folder (<code>%2$s</code>). To make <b>%3$s</b> work properly, please CHMOD <code>755</code> or <code>775</code> or <code>777</code> this folder.', 'rocket' ), 'http://codex.wordpress.org/Changing_File_Permissions', trim( str_replace( ABSPATH, '', WP_ROCKET_CACHE_BUSTING_PATH ), '/' ), WP_ROCKET_PLUGIN_NAME ); ?></p>\r\n\t\t\t</div>\r\n\r\n\t\t<?php\r\n\t\t}\r\n\r\n\t}\r\n}", "title": "" }, { "docid": "86d7c4022b64a98ed0e43ea27fe51b62", "score": "0.5207387", "text": "public function deleteAll()\n {\n $db = XenForo_Application::get('db');\n\n $db->delete('xf_permission_entry', [\n 'permission_group_id = ?' => self::GROUP_ID\n ]);\n }", "title": "" }, { "docid": "aa74cefa3ca9587232b510ff321e0efc", "score": "0.52011925", "text": "public function block($id)\n {\n $id = intval($id);\n \n $this->db->query(\"UPDATE `admin` SET `status` = 'banned' WHERE `id` = {$id} LIMIT 1\");\n\n /**\n * Delete token.\n */\n $this->db->query(\"DELETE FROM `admin_token` WHERE `userId` = {$id}\");\n }", "title": "" }, { "docid": "31a1d6b7b81fe5269fd16738cd944697", "score": "0.5193159", "text": "function permdelete()\n\t{\n\t\tglobal $db;\n\n\t\tif ($this->customerID)\n\t\t{\n\t\t\t$sql = \"DELETE FROM customers WHERE cus_customerID=$this->customerID\";\n\n\t\t\tmysql_query($sql,$db);\n\t\t\t$this->error->mysql(__FILE__,__LINE__);\n\n\t\t\t$this->status[0] = DELETED;\n\t\t}\n\t}", "title": "" }, { "docid": "1fc5d0913fd170b0c58dbc6d7e608778", "score": "0.51892215", "text": "public function banUser($id)\n {\n $data = User::findOrFail($id);\n\n if($data->banned == false){\n if ($data->username == Auth::user()->username && Auth::user()->banned == true){\n return redirect()->back()->withTitle('You cant your status')->withInfo('You cannot change your status while logged in');\n }\n $data->banned = true;\n $data->save();\n return redirect()->back()->withTitle('Account Banned')->withInfo('You have successfully banned the user');\n }\n else{\n $data->banned = false;\n $data->save();\n return redirect()->back()->withTitle('Account Lifted')->withInfo('You have successfull lifted the ban');\n }\n\n }", "title": "" }, { "docid": "19e363273c0e651011a0a9407094252e", "score": "0.5188589", "text": "public function delete_banned_user($user_id) {\n\t\tif ($this->is_banned_user($user_id)) {\n\t\t\t$this->mdb->query(\"DELETE FROM {$this->prefix}banned WHERE uid = {$user_id}\");\n\t\t\t$this->mdb->query(\"\n\t\t\t\tUPDATE {$this->prefix}users\n\t\t\t\tSET \".$this->_arrayToUpdateSQL(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'usergroup' => $this->conf['groupid_4'],\n\t\t\t\t\t\t'displaygroup' => $this->conf['groupid_4']\n\t\t\t\t\t)\n\t\t\t\t).\"\n\t\t\t\tWHERE uid = {$user_id}\"\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "c95f081acefaadee0921ab01de8c6af6", "score": "0.5187406", "text": "public function banUser($id)\n {\n $this->db->update($this->table, ['statusId' => '3'], ['id' => $id]);\n }", "title": "" }, { "docid": "d30e6eb585562564271677618a8179b8", "score": "0.51859015", "text": "function access_denied_user(){\n\t\n\t\t$role_id = Config::get('constant.role_id');\n\t if($role_id['CUSTOMER_USER']== current_user_role_id()){\n\t\t return abort_unless(\\Gate::denies(current_user_role_name()), 403);\n\t } \n}", "title": "" }, { "docid": "84c2009b600dcd0aa4c6cfdb9dc46b24", "score": "0.5183889", "text": "public function permissions();", "title": "" }, { "docid": "a25efe0bb691db1d17e63e8f3d81fc54", "score": "0.51747227", "text": "public function unban_user($user_id) {\n\t\t$data = array(\n\t\t\t'activation' => 4\n\t\t);\n\t\t$this->auth_db->where('id', $user_id);\n\t\treturn $this->auth_db->update('tb_ui_users', $data);\n\t}", "title": "" }, { "docid": "bda332c90c7f7cc85f04ee5fcecfe79a", "score": "0.5174484", "text": "function unban($ip) {\n\tglobal $dirs, $paths;\n\tif (!isAdmin()) return false;\n\tif (!isValidIP($ip)) return false;\n\n\t$ip = formatString($ip); \n\tensureExists($dirs['prefs']);\n\t$jData = decode($paths['ban']);\n\n\tif ($jData == null) $jData = array();\n\n\tforeach ($jData as $key => $value) {\n\t\tif ($value['ip'] == $ip) {\n \t\t\tunset($jData[$key]);\n\t\t}\n\t}\n\n\t$jData = array_values($jData);\n\t$output = encode($jData);\n\twrite($paths['ban'], $output, 0773);\n\n\treturn true;\n}", "title": "" }, { "docid": "0fb2cac11a6e5b9e626ed0c94fd74269", "score": "0.51724434", "text": "public function ban(Request $request)\n {\n $user = User::findOrFail($request->get('ban_id'));\n $user->banned = true;\n $user->save();\n return back()->with('success', 'User has been banned');\n }", "title": "" }, { "docid": "902c70c634b777ff963e5f010288c719", "score": "0.5169523", "text": "function ban($ip) {\n\tglobal $dirs, $paths;\n\tif (!isAdmin()) return false;\n\tif (!isValidIP($ip)) return false;\n\t\n\t$ip = formatString($ip); \n\t\n\tensureExists($dirs['prefs']);\n\tif (isBanned($ip)) return;\n\t\n\t$jData = decode($paths['ban']);\n\n\tif ($jData == null) $jData = array();\n\t\n\t$jData[] = array (\n\t\t'ip' => $ip\n\t);\n\t\n\t$jData = array_values($jData);\n\t$output = encode($jData);\n\twrite($paths['ban'], $output, 0773);\n\n\treturn true;\n}", "title": "" }, { "docid": "b820498c99d59428c4f9c938494592a5", "score": "0.5167728", "text": "function remove_admin_bar() {\t\n\t\tif (!current_user_can('administrator') && !is_admin()) {\n\t\t show_admin_bar(false);\n\t\t}\n\t}", "title": "" }, { "docid": "c63f4d3055a7bac987cb59fb822d5a88", "score": "0.51633924", "text": "public function ban_user($user_id) {\n return $this->change_user_status($user_id, 3);\n }", "title": "" }, { "docid": "72254723d1fe5a5eff08add3d9953b14", "score": "0.5162285", "text": "public function disallow()\n {\n $this->status = self::STATUS_DISALLOW;\n return $this->save(false);\n }", "title": "" }, { "docid": "a8ecea83e28c094245857a2325a6aebf", "score": "0.5138868", "text": "final public function deny($role=NULL,$modules=NULL,$actions=NULL,$subdomain=\"*\"){\n try{\n $this->addRule($role,self::DENY,$modules,$actions,$subdomain);\n }catch(Exception $e){\n die($e->getMessage());\n }\n }", "title": "" }, { "docid": "2028fe4dc232466bacb2c367952140e9", "score": "0.51384616", "text": "function skywarrior_restrict_admin() {\n\t$user = new WP_User( get_current_user_id() );\n\tif (isset($_POST['_wp_http_referer'])) {\n\t\t$referer = $_POST['_wp_http_referer'];\n\t} else {\n\t\t$referer = \"\";\n\t\tif (strpos($_SERVER['REQUEST_URI'], \"action=edit\") !== false) {\n\t\t\t$referer = ' post_type=clan ';\n\t\t}\n\t}\n if ( !current_user_can( 'manage_options' ) ) {\n \tif ( in_array( 'gamer', (array) $user->roles ) ) {\n\t\t\t//is a gamer\n\t\t\tif((strpos($_SERVER['REQUEST_URI'], \"post_type=clan\") === false) && (strpos($referer, \"post_type=clan\") === false) && (strpos($_SERVER['REQUEST_URI'], \"admin-ajax.php\") === false) && ((strpos($_SERVER['REQUEST_URI'], \"post.php\") !== false) && (strpos($_SERVER['REQUEST_URI'], \"image-editor\") !== false) ) ) {\n\t\t\t\t//default check for rest of shit\n\t\t\t\twp_die( esc_html__('You are not allowed to access this part of the site ('.$_SERVER['REQUEST_URI'].')', 'blackfyre'));\n\t\t\t} else {\n\t\t\t\t$holder = explode ('/', $_SERVER['REQUEST_URI'] );\n\t\t\t\tif (strlen($holder[count($holder) -1 ]) < 3 ) {\n\t\t\t\t\twp_die( esc_html__('You are not allowed to access this part of the site ('.$_SERVER['REQUEST_URI'].')', 'blackfyre'));\n\t\t\t\t} elseif ((strpos($holder[count($holder) -1 ], '-new') !== false) AND (strpos($referer, \"post_type=clan\") === false)) {\n\t\t\t\t\t\twp_die( esc_html__('You are not allowed to access this part of the site ('.$_SERVER['REQUEST_URI'].')', 'blackfyre'));\n\t\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(blackfyre_endsWith($_SERVER['REQUEST_URI'], \"edit.php\")){\n\t\t\t\t\t\twp_die( esc_html__('You are not allowed to access this part of the site ('.$_SERVER['REQUEST_URI'].')', 'blackfyre'));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} elseif((strpos($_SERVER['REQUEST_URI'], \"post_type=clan\") === false) && (strpos($referer, \"post_type=clan\") === false)&& (strpos($_SERVER['REQUEST_URI'], \"admin-ajax.php\") === false) && ((strpos($_SERVER['REQUEST_URI'], \"post.php\") !== false) && (strpos($_SERVER['REQUEST_URI'], \"image-editor\") !== false) ) ) {\n\t \t wp_die( esc_html__('You are not allowed to access this part of the site ('.$_SERVER['REQUEST_URI'].')', 'blackfyre'));\n\t }\n } else {\n \tif ( in_array( 'gamer', (array) $user->roles ) ) {\n\t\t\t//is a gamer\n\t\t\tif((strpos($_SERVER['REQUEST_URI'], \"post_type=clan\") === false) && (strpos($referer, \"post_type=clan\") === false)&& (strpos($_SERVER['REQUEST_URI'], \"admin-ajax.php\") === false) && ((strpos($_SERVER['REQUEST_URI'], \"post.php\") !== false) && (strpos($_SERVER['REQUEST_URI'], \"image-editor\") !== false) ) ) {\n\t\t\t\t//default check for rest of shit\n\t\t\t\twp_die( esc_html__('You are not allowed to access this part of the site ('.$_SERVER['REQUEST_URI'].')', 'blackfyre'));\n\t\t\t}\n\t\t}\n }\n}", "title": "" } ]
06ea1df7e601f16ec922125eff2dab12
Index Page for this controller. Maps to the following URL or or Since this controller is set as the default controller in config/routes.php, it's displayed at So any other public methods not prefixed with an underscore will map to /index.php/welcome/
[ { "docid": "7e62d65f241e6b7478d2528c6ebeb21f", "score": "0.0", "text": "public function __construct() {\n\t\tparent::__construct();\n\t\t$this->load->model('M_contact');\n\t\t\n\t\t$this->load->helper(array('url'));\n\t}", "title": "" } ]
[ { "docid": "2e369998f94a25c823fda7659436efa1", "score": "0.74670094", "text": "public function index()\n\t{\n\t\t$this->load->helper('url');\n\t\t$this->load->view('welcome');\n\t}", "title": "" }, { "docid": "641dc28bb3fbacd39be2b06655bbb732", "score": "0.727131", "text": "public function action_index()\n\t{\n $data = array();\n $this->template->title = 'Nikki Babie';\n $this->template->content = View::forge('welcome/index', $data);\n\t}", "title": "" }, { "docid": "8fd95ac788bb01cc96c3958f01e30896", "score": "0.72436875", "text": "public function index() {\n\t\n\t\treturn view('welcome');\n\t\n\t}", "title": "" }, { "docid": "8ba2bad3a25739ea30952c8f105f6775", "score": "0.7227771", "text": "public function index()\n\t{\n\t\treturn view('welcome');\n\t}", "title": "" }, { "docid": "8ba2bad3a25739ea30952c8f105f6775", "score": "0.7227771", "text": "public function index()\n\t{\n\t\treturn view('welcome');\n\t}", "title": "" }, { "docid": "43a34f37ceacf157a26d5f297602c78b", "score": "0.7203047", "text": "public function action_index()\n\t{\n\t\treturn Response::forge(View::forge('welcome/index'));\n\t}", "title": "" }, { "docid": "347d9662737aec3de02efae48e0fab0d", "score": "0.7136212", "text": "public function getIndex(){\n\t\t# and talk to the model, received data from the \n\t\t# model and compile, and pass it to correct view.\n\t\treturn view('pages.welcome');\n\t}", "title": "" }, { "docid": "5253fa01e1657d3501602b3cda0cc2bd", "score": "0.70818853", "text": "public function index()\n\t{\n\t\t//$this->load->view('public/index');\n\t\t$this->load->view('welcome_message');\n\t}", "title": "" }, { "docid": "0288f0cd714bed8a1a7abbd8bf9b6976", "score": "0.7068012", "text": "public function index()\n\t{\n\t\t\n\t\t$this->load->view('index');\n\t}", "title": "" }, { "docid": "e7f8089146dcd0d0d610ae2c72bd1e9a", "score": "0.70298105", "text": "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "title": "" }, { "docid": "e7f8089146dcd0d0d610ae2c72bd1e9a", "score": "0.70298105", "text": "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "title": "" }, { "docid": "e7f8089146dcd0d0d610ae2c72bd1e9a", "score": "0.70298105", "text": "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "title": "" }, { "docid": "e7f8089146dcd0d0d610ae2c72bd1e9a", "score": "0.70298105", "text": "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "title": "" }, { "docid": "f1bf68fea98c27b2dfe997fca8a99ab5", "score": "0.69942784", "text": "public function index() {\n $this->showView('index Page');\n }", "title": "" }, { "docid": "82dc6ae75fc8e133f6d751a5321e6ef3", "score": "0.6966546", "text": "public function index()\n\t{\n\t\t\n\t\t$this->load->view('home');\n\t}", "title": "" }, { "docid": "ea86266330c4f7f098fc6ff3be147c41", "score": "0.69580853", "text": "public function index()\n\t{\n\t\t//load the homepage view //\n\t\t$this->load->view('welcome_message');\n\t}", "title": "" }, { "docid": "f98a1166979aa71dcc6f80a8bf7d6bdd", "score": "0.69476056", "text": "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "title": "" }, { "docid": "f98a1166979aa71dcc6f80a8bf7d6bdd", "score": "0.69476056", "text": "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "title": "" }, { "docid": "f98a1166979aa71dcc6f80a8bf7d6bdd", "score": "0.69476056", "text": "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "title": "" }, { "docid": "f98a1166979aa71dcc6f80a8bf7d6bdd", "score": "0.69476056", "text": "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "title": "" }, { "docid": "f98a1166979aa71dcc6f80a8bf7d6bdd", "score": "0.69476056", "text": "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "title": "" }, { "docid": "f98a1166979aa71dcc6f80a8bf7d6bdd", "score": "0.69476056", "text": "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "title": "" }, { "docid": "f98a1166979aa71dcc6f80a8bf7d6bdd", "score": "0.69476056", "text": "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "title": "" }, { "docid": "f98a1166979aa71dcc6f80a8bf7d6bdd", "score": "0.69476056", "text": "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "title": "" }, { "docid": "f98a1166979aa71dcc6f80a8bf7d6bdd", "score": "0.69476056", "text": "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "title": "" }, { "docid": "f98a1166979aa71dcc6f80a8bf7d6bdd", "score": "0.69476056", "text": "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "title": "" }, { "docid": "f98a1166979aa71dcc6f80a8bf7d6bdd", "score": "0.69476056", "text": "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "title": "" }, { "docid": "f98a1166979aa71dcc6f80a8bf7d6bdd", "score": "0.69476056", "text": "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "title": "" }, { "docid": "f98a1166979aa71dcc6f80a8bf7d6bdd", "score": "0.69476056", "text": "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "title": "" }, { "docid": "f98a1166979aa71dcc6f80a8bf7d6bdd", "score": "0.69476056", "text": "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "title": "" }, { "docid": "f98a1166979aa71dcc6f80a8bf7d6bdd", "score": "0.69476056", "text": "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "title": "" }, { "docid": "e636e8780b058f91e017142cde62dd28", "score": "0.69377965", "text": "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n }", "title": "" }, { "docid": "7b693ad33621bb553322198d699939a0", "score": "0.6936174", "text": "public function index()\n {\n return view(\"welcome\");\n }", "title": "" }, { "docid": "f03c7b6319eca720c5dbd99909f5bc3a", "score": "0.69298464", "text": "public function index()\n {\n require 'views/welcome.php';\n }", "title": "" }, { "docid": "9ab997de03d8de7b7b01a70d4f7b4c61", "score": "0.69262135", "text": "public function index()\n {\n return array('message' => 'This is the default welcome page for the Corus Framework.');\n }", "title": "" }, { "docid": "214930162ee3ccefb4998ace964eade5", "score": "0.6899068", "text": "public function index() {\n\n return view(\"welcome\");\n }", "title": "" }, { "docid": "f6adcef89cf2717c35f073dc0eac3a64", "score": "0.6875148", "text": "public function index()\n\t{\n\t\t$this->load->view('home');\n\t}", "title": "" }, { "docid": "530ad24493cf5c1cca87f857be966790", "score": "0.6868662", "text": "public function welcome(){\n\t\t\t\n\t\t\t$this->index();\n\t\t}", "title": "" }, { "docid": "f55fa0cc1f3bd9e273530fd9c2df4480", "score": "0.68615484", "text": "public function index()\n\t{\n\t\t$this->load->view(\"home\");\n\t}", "title": "" }, { "docid": "eed8aa31f87be4b6f09961684380eb73", "score": "0.6858756", "text": "public function index()\n\t{\n $this->load->view('index');\n }", "title": "" }, { "docid": "368be9f63991831703db53d794c077d0", "score": "0.68376863", "text": "public function index(){\n echo \"This is from home controller\";\n }", "title": "" }, { "docid": "5aa186e758f85f4e6d50137acca61c59", "score": "0.683119", "text": "public function get_index()\n\t{\n\t\t// Home Model\n\t\t$this->loadModel('Home');\n\t\t$home = new \\hasnatMVC\\App\\Models\\Home('Hello World');\n\t\t$data['message'] = $home->message;\n\t\t$this->loadView('home/index',$data);\n\t}", "title": "" }, { "docid": "fe3a0a665f4af64b5445c3797be3a1b4", "score": "0.68244696", "text": "public function index()\n { \n return view('welcome');\n }", "title": "" }, { "docid": "3ebcc11b356cee2009aa2f83170ae639", "score": "0.6817866", "text": "public function index()\n {\n\n return view('welcome');\n }", "title": "" }, { "docid": "8c4dddf74d2d70b70a2bdad88f719e7b", "score": "0.68106544", "text": "public function indexAction()\n {\n View::render('Home/index.php');\n }", "title": "" }, { "docid": "b8554d895ae1a174ee814e91709ca9da", "score": "0.68029803", "text": "public function index()\n {\n $this->load->view('welcome_message');\n }", "title": "" }, { "docid": "68ddd492cb06f7628be4d5607f1461f5", "score": "0.67993426", "text": "public function index()\n\t{\n $this->load->view('index'); \n\t}", "title": "" }, { "docid": "694ec9539ab8476cbf824c8900aebd5e", "score": "0.6791345", "text": "public function index() {\n return view('welcome');\n }", "title": "" }, { "docid": "694ec9539ab8476cbf824c8900aebd5e", "score": "0.6791345", "text": "public function index() {\n return view('welcome');\n }", "title": "" }, { "docid": "1ffeb58467e149d4a537596bb8f471c9", "score": "0.6777675", "text": "public function index() {\r\n\t\t\t$this->showIndex();\r\n\t}", "title": "" }, { "docid": "b9c4b0968d5336a156daaf6cc2bf65fc", "score": "0.6767934", "text": "public function getIndex(){\n # talk to the model\n # receive from the model\n # compile or process data from the model if needed\n # pass that data to the correct view\n return view('pages.welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.6767764", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.6767764", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.6767764", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.6767764", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.6767764", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.6767764", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.6767764", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.6767764", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.6767764", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.6767764", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.6767764", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.6767764", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.6767764", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.6767764", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.6767764", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.6767764", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.6767764", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "5d4e0ccf87bfa1bc7426cd164600e587", "score": "0.6760524", "text": "public function index()\n\t{\n\t\treturn view('home');\n\t}", "title": "" }, { "docid": "5d4e0ccf87bfa1bc7426cd164600e587", "score": "0.6760524", "text": "public function index()\n\t{\n\t\treturn view('home');\n\t}", "title": "" }, { "docid": "5d4e0ccf87bfa1bc7426cd164600e587", "score": "0.6760524", "text": "public function index()\n\t{\n\t\treturn view('home');\n\t}", "title": "" }, { "docid": "5d4e0ccf87bfa1bc7426cd164600e587", "score": "0.6760524", "text": "public function index()\n\t{\n\t\treturn view('home');\n\t}", "title": "" }, { "docid": "807ff1ca3a26a83fcc0b89461193a2a1", "score": "0.67546797", "text": "public function index()\n\t{\n\t\techo 'dsfdsaf';\n\t\t$this->load->view('welcome_message');\n\t}", "title": "" }, { "docid": "15b7358ca120bb77d82f7d6e7926cf4c", "score": "0.6749093", "text": "public function index(){\r\n $data = [\r\n 'title' => 'Welcome'\r\n ];\r\n //Call the view NOTE you dont need to add .php extencion\r\n $this->view('home', $data);\r\n }", "title": "" }, { "docid": "7ebd326831e7a272d791436107e3a294", "score": "0.67329895", "text": "public function indexAction()\n {\n //return $this->jumpTo404('Demo for 404');\n //return $this->jumpToDenied('Demo for denied');\n //return $this->jumpToException('Demo for 503', 503);\n\n //$this->flashMessenger()->addMessage('Test for flash messenger.');\n //$this->flashMessenger('Test for flash messenger.');\n\n // Save statistics\n if (Pi::service('module')->isActive('statistics')) {\n Pi::api('log', 'statistics')->save('system', 'index');\n }\n\n // Set view\n $this->view()->setTemplate('system-home');\n }", "title": "" }, { "docid": "a41954c11fc91d04ddd21e3e4645d449", "score": "0.67148525", "text": "public function getIndex()\n\t{\n\t\treturn view('home');\n\t}", "title": "" }, { "docid": "b085c6b7b9b4ef232288055169e4eeca", "score": "0.67144066", "text": "public function index()\n\t{\n\t\treturn view('pages.home');\n\t}", "title": "" }, { "docid": "6fdbc4a9bba617787f3b600f790cfceb", "score": "0.67123365", "text": "public function index()\n {\t\n \treturn view('home');\n }", "title": "" }, { "docid": "00b012d9326212dcc2f8e0fda5bc3d18", "score": "0.6711406", "text": "public function index()\n\t{\n\t\t$students = $this->Students->read();\n\t\t\n\t\t$data['students'] = $students;\n\t\t\n\t\t$this->load->view('Students_welcome');\n\t}", "title": "" }, { "docid": "0716a9df22e1c53c0cd60eedcd56a344", "score": "0.67025954", "text": "function index() {\n\n // This page cannot be accessed without providing a username\n // the routes.php file will not allow the page to be accessed\n // $route['(:any)'] = 'profile/view/$1';\n redirect('/', 'refresh');\n\n }", "title": "" }, { "docid": "e0e8e55eb67991ee2dc044d452dda520", "score": "0.669968", "text": "public function index() {\n\t\tif (!$this->Auth->loggedIn()) {\n\t\t\treturn $this->redirect(array('controller' => 'pages', 'action' => 'display', 'home', 'admin' => false));\n\t\t}\n\t\treturn $this->redirect(array('controller' => 'pages', 'action' => 'display', 'home', 'admin' => false));\n\t}", "title": "" }, { "docid": "912526c88e9bccdf7ab5684127cd26f7", "score": "0.6697638", "text": "public function index()\n {\n echo \"Index\"; \n }", "title": "" }, { "docid": "580824ca6f9cf172b69dea922f92ec72", "score": "0.6692002", "text": "function index()\n {\n $this->actionNotFound('index');\n }", "title": "" }, { "docid": "a273ed6b694048666d7529f0114e2d55", "score": "0.66835725", "text": "public function index()\n\t{\n // inside redirects to front page\n $this->data['message'] = $this->session->flashdata('message');\n if (!$this->is_authenticated()) {\n return;\n }\n\n $data['title'] = 'Welcome';\n\t\t$this->load->view('welcome', $data);\n\t}", "title": "" }, { "docid": "3bafe9d164e69b907ab9a97b12b6a9b4", "score": "0.6664239", "text": "public function action_index(){\n\t\treturn \\Response::forge(\\View::forge('admin::welcome/index'));\n\t}", "title": "" }, { "docid": "0f28a14f503211d310ddde068cb94816", "score": "0.6662766", "text": "public function index()\n {\n return view('welcome');\n\n }", "title": "" }, { "docid": "dfd0ecfa15afe4b07ab560d0dd2bbeb7", "score": "0.66584975", "text": "public function index() {\n\t\t\n\t\t$this->redirect('home/index');\n\t\t\n\t}", "title": "" }, { "docid": "42cdccc9db8ce3fc354b0fbf539c41d6", "score": "0.6656413", "text": "public function indexAction()\r\n {\r\n\r\n //View::render('home.php');\r\n }", "title": "" }, { "docid": "5188389a30766bee8236b28d497e50fd", "score": "0.66561395", "text": "public function index() {\n return view(\"Home/index\");\n }", "title": "" }, { "docid": "8c77ba0d0c8daa860b5275cd94cff1a4", "score": "0.6649054", "text": "public static function index() {\n\t\t\tView::render('index');\n\t\t}", "title": "" }, { "docid": "5f8ec610bcd70b74ac555cf7bb3e1f5c", "score": "0.66416526", "text": "public function index() {\n $data = array(\n 'title' => 'Welcome to the internet!',\n 'content' => 'Lorem ipsum lorem');\n $this->view('pages/index', $data);\n }", "title": "" }, { "docid": "b05929b013a8204c85651734ab641415", "score": "0.6633421", "text": "public function index()\n {\n $view = new View($this->title);\n $view->render('home/index');\n }", "title": "" }, { "docid": "dc34d38d770d9c63d3790d79b57e764f", "score": "0.66315204", "text": "function index()\n\t{\n\t\t$this->load->view('homepage');\n\t}", "title": "" }, { "docid": "9731df48b61831f7b8b36633dd195254", "score": "0.66290385", "text": "public function index()\n\t{\n\t\t\n\t\t\n\t\t\n\t\t//return view('index');\n\t}", "title": "" }, { "docid": "6caf172ab52ed86e8e8e70029864abb2", "score": "0.66188353", "text": "public function index()\n {\n //return view('pages.self');\n return view('welcome');\n }", "title": "" }, { "docid": "e4287de24340e58e8cbb42c4b2d3239f", "score": "0.66175884", "text": "public function index() {\n // get the views\n $this->getView(\"header\", array(\"pagename\"=>\"welcome\"));\n $this->getView(\"welcome\");\n $this->getView(\"footer\");\n }", "title": "" }, { "docid": "59ea8b9329641e9d7989d1d0d3be0ad1", "score": "0.65902704", "text": "public function index()\n {\n // 会员中心首页\n // return view('Home.Member.index');\n }", "title": "" }, { "docid": "6ae397df0ca92dd27ce44ef195987b19", "score": "0.658744", "text": "public function actionWelcome()\n\t{\n\t\t// renders the view file 'protected/views/site/index.php'\n\t\t// using the default layout 'protected/views/layouts/main.php'\n\t\t$this->render('welcome');\n\t}", "title": "" }, { "docid": "2854f7c4b589f5100c9219e4660b8293", "score": "0.65838426", "text": "public function getIndex()\n {\n //this will return the home page\n return view('pages.home');\n\n }", "title": "" }, { "docid": "f864084ede34ba2d445ac476b644a23d", "score": "0.6575502", "text": "public function index()\n\t{\n\t\treturn view('index');\n\t}", "title": "" }, { "docid": "f864084ede34ba2d445ac476b644a23d", "score": "0.6575502", "text": "public function index()\n\t{\n\t\treturn view('index');\n\t}", "title": "" } ]
d90d65aed6029e75d8e3303989b3a482
Add "publishwithme" class to GridField, if its ModelClass is being managed by PublishWithMe This is used in PublishWithMe.js to determine if deleting items should activate "Save & Publish" button
[ { "docid": "27af2d37a8d6e69db009633566a4d0c2", "score": "0.47534487", "text": "public function updateAttributes(&$attributes){\n\t\tif (singleton($this->owner->getModelClass())->has_extension('PublishWithMe_Child')) {\n\t\t\t$attributes['class'] .= ' publish-with-me';\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "f47d6d02970542b98967a8e50b459bdb", "score": "0.52888614", "text": "public function hook_admin_modify_publishfields(){return;}", "title": "" }, { "docid": "b869e309ca75e588f8f8060bbf53d978", "score": "0.5288748", "text": "public function hasPostedClass() {\n\t\tif(!\\Yii::$app->user->isGuest && YBoardPost::find()->where(\"topic_id = $this->id and user_id = \".\\Yii::$app->user->id)->exists()) {\n\t\t\treturn 'posted';\n\t\t}\n\t\treturn '';\n\t}", "title": "" }, { "docid": "9a1dd4646bd3e730db633b665da0cd8c", "score": "0.5072791", "text": "public function permissionKeyHasCustomClass()\n {\n return !empty($this->pkHasCustomClass);\n }", "title": "" }, { "docid": "4d0da07704c528a43f099ed22c3a1227", "score": "0.49190333", "text": "public function hook_admin_embed_publishfields(){return;}", "title": "" }, { "docid": "2507a0a7eb28be99cce6ae3e24fa785b", "score": "0.4746496", "text": "public function publish($user, $model)\n { \n\t\treturn true;\n\t}", "title": "" }, { "docid": "442120467b5ccae959992615993f0773", "score": "0.47295266", "text": "public function action_form_publish( $form, $post )\n\t{\n\t\t$key = array_search( 'check-change', $form->content->class );\n\t\tif ( $key !== FALSE ) {\n\t\t\tunset( $form->content->class[ $key ] );\n\t\t}\n\t}", "title": "" }, { "docid": "227321768d6b23abb75c788fad36a32e", "score": "0.47159114", "text": "public function getManagedItemsClass()\n {\n return Compte::class;\n }", "title": "" }, { "docid": "61dbf10f7df7a6341105f5b50d2c7bfc", "score": "0.46820652", "text": "function get_publisher_form(){\n return $this->publisher->form->fieldtype;\n }", "title": "" }, { "docid": "1fd4c9943df83e7b7df44b3c0c355ae0", "score": "0.46736518", "text": "public function remove_publish_box_for_membership() {\n remove_meta_box( 'submitdiv', YITH_WCMBS_Membership_Helper()->post_type_name, 'side' );\n }", "title": "" }, { "docid": "e22c8fde16bb7d65c73d43ab975c51c4", "score": "0.46730658", "text": "public function shouldDisplay() {\n \tif (!$this->gridFieldRequest->recordIsPublished() && $this->gridFieldRequest->record->canDelete() && $this->gridFieldRequest->record->ClassName == 'ProspectActionList') {\n \t\treturn true;\n \t}\n\n \treturn false;\n }", "title": "" }, { "docid": "172f76be171dd5de4848d7b578cdb672", "score": "0.46666214", "text": "public function onPublish( $member )\n\t{\n\t\tparent::onPublish( $member );\n\n\t\t/* If last topic/review columns are in the future, reset them or the content will indefinitely show as unread */\n\t\t$this->record_last_review = ( $this->record_last_review > $this->record_publish_date ) ? $this->record_publish_date : $this->record_last_review;\n\t\t$this->record_last_comment = ( $this->record_last_comment > $this->record_publish_date ) ? $this->record_publish_date : $this->record_last_comment;\n\t\t$this->save();\n\n\t\tif ( \\IPS\\Application::appIsEnabled('forums') )\n\t\t{\n\t\t\tif ( $topic = $this->topic() )\n\t\t\t{\n\t\t\t\tif ( $topic->hidden() )\n\t\t\t\t{\n\t\t\t\t\t$topic->unhide( $member );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ( $this->_forum_forum )\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t$this->syncTopic();\n\t\t\t\t}\n\t\t\t\tcatch( \\Exception $ex ) { }\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "a28b2a6be2096378b10497c08850c1dd", "score": "0.46188638", "text": "public function buddypress_email_delivery_class( $class, $email_type, $to, $args ) {\n // But the only one to apply this filter will be buddypress, and we need to declare the override before giving the class name.\n if ( ! defined( 'SENDGRID_DISABLE_BUDDYPRESS' ) ) {\n require_once plugin_dir_path( __FILE__ ) . 'class-buddypress-override.php';\n }\n return 'SendGrid_BuddyPress_Mailer'; \n }", "title": "" }, { "docid": "2de7aad42e04d9961bf1099162074b1e", "score": "0.4610807", "text": "public function baseTransform() {\n parent::baseTransform();\n Requirements::javascript('mysite/javascript/gridfield_betterbuttons_done.js');\n\n return $this\n ->setUseButtonTag(true)\n ->addExtraClass('gridfield-better-buttons-done ss-ui-action-constructive')\n ->setAttribute(\"data-toggletext\", 'Yes. Mark this item done.')\n ->setAttribute(\"data-confirmtext\", 'No. Don\\'t mark it done.');\n }", "title": "" }, { "docid": "fe63365f5542d7cb8cd40e7393fe4678", "score": "0.45820683", "text": "function register_link_content_grid_provider( \\Dekode\\Hogan\\Content_Grid $module ) {\n\trequire_once 'class-link-content-grid-provider.php';\n\tif ( class_exists('\\DSS\\Hogan\\Grid\\Link_Content_Grid_Provider') ) {\n\t\t$module->register_content_grid_provider(new \\DSS\\Hogan\\Grid\\Link_Content_Grid_Provider());\n\t}\n}", "title": "" }, { "docid": "6e8c4f883061eae1b5e70e8cf4dca333", "score": "0.45628056", "text": "public function isRewritedGridBlock(Mage_Adminhtml_Block_Widget_Grid $gridBlock)\n {\n return ($className = get_class($gridBlock))\n ? (bool) preg_match('#^BL_CustomGrid_Block_Rewrite_.+$#', $className)\n : false;\n }", "title": "" }, { "docid": "2d0a24cf06ee418b3b8f4b56f53e7078", "score": "0.4558295", "text": "function canPublish()\r\n\t{\r\n\t\t$db = FabrikWorker::getDbo();\r\n\t\t$form = $this->getForm();\r\n\t\t$nullDate = (method_exists($db, 'getNullDate')) ? $db->getNullDate() : $this->getNullDate();\r\n\t\t$publishup = JFactory::getDate($form->publish_up)->toUnix();\r\n\t\t$publishdown = JFactory::getDate($form->publish_down)->toUnix();\r\n\t\t$now\t\t=& JFactory::getDate()->toUnix();\r\n\t\tif ($form->published == '1') {\r\n\t\t\tif ($now >= $publishup || $form->publish_up == '' || $form->publish_up == $nullDate) {\r\n\t\t\t\tif ($now <= $publishdown || $form->publish_down == '' || $form->publish_down == $nullDate) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "79862d472f729d9eed82334b22936a65", "score": "0.45580077", "text": "private function __getPlugin() {\n\t\t\t$parentName = get_parent_class($this);\n\n\t\t\tif($parentName !== 'AppModel' && $parentName !== 'Model' && strpos($parentName, 'AppModel') !== false) {\n\t\t\t\t$this->plugin = str_replace('AppModel', '', $parentName);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "3a25e034140dce1b7412023876b4348b", "score": "0.45531106", "text": "function sclipowebclass_update_instance($sclipo) {\n\n # You may have to add extra stuff in here #\n\n return update_record('sclipowebclass', $sclipo);\n}", "title": "" }, { "docid": "0b43e89e0d741ad48e3c6f60954b4062", "score": "0.4523661", "text": "public function AddClass() {\r\n\t\t// Check permission\r\n\t\t$this->Permission('Galleries.Items.Manage');\r\n\r\n\t\t// Set up head\r\n\t\t$this->AddJsFile('jquery.alphanumeric.js');\r\n\t\t$this->AddJsFile('categories.js');\r\n\t\t$this->AddJsFile('jquery.gardencheckboxgrid.js');\r\n\t\t$this->Title(T('Add Class'));\r\n\t\t$this->AddSideMenu('galleries/settings/managecategories');\r\n\r\n\t\tif ($this->DeliveryType() == DELIVERY_TYPE_ALL) {\r\n\t\t\t$this->AddSideMenu('galleries/settings/managecategories');\r\n\t\t\t$Session = Gdn::Session();\r\n\t\t\t$permissions = $Session->User->Permissions;\r\n\t\t\t$this->admin = preg_match('/Garden.Settings.Manage/',$permissions);\r\n\r\n\t\t\tif($this->admin) {\r\n\r\n\t\t\t\t// Prep models\r\n\t\t\t\t$this->Form->SetModel($this->GalleryClassModel);\r\n\r\n\r\n\t\t\t\tif ($this->Form->AuthenticatedPostBack() == FALSE) {\r\n\r\n\r\n\t\t\t\t} else { // Form was validly submitted\r\n\t\t\t\t\t$FormValues = $this->Form->FormValues();\r\n\t\t\t\t\t$this->GalleryClassModel->CreateClass($FormValues);\r\n\r\n\t\t\t\t\t// now get the new class and generate a home page for it\r\n\t\t\t\t\t$ClassLabel = $FormValues['ClassLabel'];\r\n\t\t\t\t\t$ClassData = $this->GalleryClassModel->GetClasses($ClassLabel);\r\n\t\t\t\t\t$this->GalleryCategoryModel->GenerateHome($ClassData->ClassKey);\r\n\t\t\t\t\t$this->StatusMessage = T(\"Your settings have been saved.\");\r\n\t\t\t\t\tRedirect('/galleries/settings/managecategories');\r\n\r\n\t\t\t\t}\r\n\t\t\t$this->View = 'classform';\r\n\t\t\t$this->Render();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n }", "title": "" }, { "docid": "1b9e1e57c700d8add071941444d34c3c", "score": "0.45125625", "text": "function rssmi_change_publish_button( $translation, $text ) {\r\n\tif ( 'rssmi_feed' == get_post_type() )\r\n\t\tif ( $text == 'Publish' )\r\n\t\t\treturn 'Add Feed';\r\n\r\n\treturn $translation;\r\n}", "title": "" }, { "docid": "78750ae9ff0294ac4afdc196fbe64886", "score": "0.45084587", "text": "function getPublish( &$row , $type , $ajaxTask )\r\n\t{\r\n\t\r\n\t\t$imgY\t= 'tick.png';\r\n\t\t$imgX\t= 'publish_x.png';\r\n\t\t\r\n\t\t$image\t= $row->$type ? $imgY : $imgX;\r\n\t\t\r\n\t\t$alt\t= $row->$type ? JText::_('CC PUBLISHED') : JText::_('CC UNPUBLISHED');\r\n\t\t\r\n\t\t$href = '<a href=\"javascript:void(0);\" onclick=\"azcommunity.togglePublish(\\'' . $ajaxTask . '\\',\\'' . $row->id . '\\',\\'' . $type . '\\');\">';\r\n\t\t$href .= '<span><img src=\"images/' . $image . '\" border=\"0\" alt=\"' . $alt . '\" /></span></a>';\r\n\t\t\r\n\t\treturn $href;\r\n\t}", "title": "" }, { "docid": "659d740653b317af4d3c80c3a4f35f08", "score": "0.44884977", "text": "function isc_change_post_object()\n{\n global $wp_post_types;\n $labels = &$wp_post_types['post']->labels;\n $labels->name = 'News';\n $labels->blog_display = 'Admins\\' News';\n $labels->singular_name = 'News';\n $labels->add_new = 'Add News';\n $labels->add_new_item = 'Add News';\n $labels->edit_item = 'Edit News';\n $labels->new_item = 'News';\n $labels->view_item = 'View News';\n $labels->search_items = 'Search News';\n $labels->not_found = 'No News found';\n $labels->not_found_in_trash = 'No News found in Trash';\n $labels->all_items = 'All News';\n $labels->menu_name = 'News';\n $labels->name_admin_bar = 'News';\n}", "title": "" }, { "docid": "be478337dba923f0a38013da977ba960", "score": "0.44628325", "text": "public function __construct()\n {\n # unpublishing a listing will soft delete a listing\n # $this->_objectId = 'listing_id';\n $this->_blockGroup = 'chirpify_seller';\n $this->_controller = 'listing';\n parent::__construct();\n\n $model = Mage::registry( 'chirpify_listing' );\n #active - boolean field in chirpify table\n $active = $model->getData( 'active' );\n\n $disabled = $active == 1 ? true : false;\n $this->_addButton( 'publish', array(\n 'label' => Mage::helper( 'chirpify_seller' )->__( 'Save and Publish Listing' ),\n 'onclick' => 'Chirpify_Seller.publishForm()',\n 'class' => 'add',\n 'disabled' => $disabled\n ), 1 );\n\n $disabled = $active == 1 ? false : true;\n\n $this->_addButton( 'unpublish', array(\n 'label' => Mage::helper( 'chirpify_seller' )->__( 'Unpublish Listing' ),\n 'onclick' => 'Chirpify_Seller.unpublishForm()',\n 'class' => 'add',\n 'disabled' => $disabled\n ), 1 );\n\n\n $this->_formScripts[] = '\n var Chirpify_Seller = {};\n Chirpify_Seller.publishForm = function()\n {\n $(\\'listing_publish\\').setValue(1);\n editForm.submit();\n }\n Chirpify_Seller.unpublishForm = function()\n {\n $(\\'listing_unpublish\\').setValue(1);\n editForm.submit();\n } \n ';\n }", "title": "" }, { "docid": "456e23cee4047d13a0f34eb1f793350a", "score": "0.44608426", "text": "public function togglePublish()\n\t{\n\t\tJRequest::checkToken() or jexit( 'Invalid Token' );\n\n\t\t// @task: Check for acl rules.\n\t\t$this->checkAccess( 'trackback' );\n\t\t\n\t\t$trackbacks\t= JRequest::getVar( 'cid' , array(0) , 'POST' );\n\t\t$status\t\t= JRequest::getVar( 'task' ) == 'publish' ? 1 : 0;\n\t\t\n\t\t$message\t= '';\n\t\t$type\t\t= 'message';\n\t\t\n\t\tif( count( $trackbacks ) <= 0 )\n\t\t{\n\t\t\t$message\t= JText::_('COM_EASYBLOG_TRACKBACKS_INVALID_ID');\n\t\t\t$type\t\t= 'error';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$model\t\t= $this->getModel( 'Trackbacks' );\n\t\t\t\n\t\t\tif( $model->publish( $trackbacks , $status ) )\n\t\t\t{\n\t\t\t\t$message\t= $status == 1 ? JText::_('COM_EASYBLOG_TRACKBACKS_PUBLISHED_SUCCESS') : JText::_('COM_EASYBLOG_TRACKBACKS_UNPUBLISHED_SUCCESS');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$message\t= $status == 1 ? JText::_( 'COM_EASYBLOG_TRACKBACKS_PUBLISHED_ERROR' ) : JText::_('COM_EASYBLOG_TRACKBACKS_UNPUBLISHED_ERROR');\n\t\t\t\t$type\t\t= 'error';\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\t$this->setRedirect( 'index.php?option=com_easyblog&view=trackbacks' , $message , $type );\n\t}", "title": "" }, { "docid": "93c4f306da042eecf1fdf79280cfe299", "score": "0.44607186", "text": "public function getPublishableField()\n {\n if (is_null($this->internalPublishableField)) {\n $this->internalPublishableField = (property_exists($this, 'publishableField')) ? $this->publishableField\n : 'published_at';\n }\n\n return $this->internalPublishableField;\n }", "title": "" }, { "docid": "101099917003acb56a6ec77682c1c403", "score": "0.4454233", "text": "public static function getRelatedModelClass(){}", "title": "" }, { "docid": "ff68facb7c01f3834dba90ecc0c80a79", "score": "0.44467503", "text": "function uplift_portfolio_item_class($class) {\n\t\tif ( strpos( $class, 'multi-masonry-item') ) {\n\t\t\t$class .= 'gallery-item';\n\t\t\treturn $class;\n\t\t} else {\n\t\t\treturn $class;\n\t\t}\n\t}", "title": "" }, { "docid": "8bb70a02c49f913b5bb5c648c5636ebc", "score": "0.44454205", "text": "protected function wrap_class() {\n\t\treturn 'wponion-has-nested-fields';\n\t}", "title": "" }, { "docid": "9830361b1664f6b72c3e6448fd878957", "score": "0.44401813", "text": "public function publish()\n\t{\n\t\t// Check for request forgeries.\n\t\t(JSession::checkToken('get') or JSession::checkToken()) or jexit(JText::_('JINVALID_TOKEN'));\n\n\t\t// Initialise variables.\n\t\t$app = JFactory::getApplication();\n\t\t$tjUcmFrontendHelper = new TjucmHelpersTjucm;\n\n\t\t// Checking if the user can remove object\n\t\t$user = JFactory::getUser();\n\t\t$canEdit = $user->authorise('core.type.edititem', 'com_tjucm.type.edititem' . $this->ucmTypeId);\n\t\t$canChange = $user->authorise('core.type.edititemstate', 'com_tjucm.type.' . $this->ucmTypeId);\n\n\t\tif ($canEdit || $canChange)\n\t\t{\n\t\t\t$model = $this->getModel('Item', 'TjucmModel');\n\n\t\t\t// Get the user data.\n\t\t\t$id = $app->input->getInt('id');\n\t\t\t$state = $app->input->getInt('state');\n\n\t\t\t// Attempt to save the data.\n\t\t\t$return = $model->publish($id, $state);\n\n\t\t\t// Check for errors.\n\t\t\tif ($return === false)\n\t\t\t{\n\t\t\t\t$this->setMessage(JText::sprintf('COM_TJUCM_SAVE_FAILED', $model->getError()), 'warning');\n\t\t\t}\n\n\t\t\t// Clear the profile id from the session.\n\t\t\t$app->setUserState('com_tjucm.edit.item.id', null);\n\n\t\t\t// Flush the data from the session.\n\t\t\t$app->setUserState('com_tjucm.edit.item.data', null);\n\n\t\t\t// Redirect to the list screen.\n\t\t\t$this->setMessage(JText::_('COM_TJUCM_ITEM_SAVED_SUCCESSFULLY'));\n\n\t\t\t// If there isn't any menu item active, redirect to list view\n\t\t\t$itemId = $tjUcmFrontendHelper->getItemId('index.php?option=com_tjucm&view=items' . $this->appendUrl);\n\t\t\t$this->setRedirect(JRoute::_('index.php?option=com_tjucm&view=items' . $this->appendUrl . '&Itemid=' . $itemId, false));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// If there isn't any menu item active, redirect to list view\n\t\t\t$link = 'index.php?option=com_tjucm&view=items' . $this->appendUrl;\n\t\t\t$itemId = $tjUcmFrontendHelper->getItemId($link);\n\t\t\t$this->setRedirect(JRoute::_($link . '&Itemid=' . $itemId, false), JText::_('COM_TJUCM_ITEM_SAVED_STATE_ERROR'), 'error');\n\t\t}\n\t}", "title": "" }, { "docid": "3733694091a766307595b51c4e14af80", "score": "0.44392332", "text": "protected function getWrapperClass()\n {\n return SubscriberModel::class;\n }", "title": "" }, { "docid": "436a595a484769f0a86100fd970cc44f", "score": "0.4432899", "text": "protected function SingularName() {\n\treturn 'vcqrSupplierItemType';\n }", "title": "" }, { "docid": "fc6bfd9801f95babc3b58ebbf3a596a4", "score": "0.44254547", "text": "abstract protected function modelClassName();", "title": "" }, { "docid": "fc6bfd9801f95babc3b58ebbf3a596a4", "score": "0.44254547", "text": "abstract protected function modelClassName();", "title": "" }, { "docid": "fc6bfd9801f95babc3b58ebbf3a596a4", "score": "0.44254547", "text": "abstract protected function modelClassName();", "title": "" }, { "docid": "287221d6773e8282fcb695d52782cca9", "score": "0.44246346", "text": "private function setPostType()\n {\n $classnameWithoutNamespace = substr(strrchr(get_class($this), '\\\\'), 1);\n $this->postType = self::NAMESPACE . strtolower($classnameWithoutNamespace);\n }", "title": "" }, { "docid": "618a44afe7a2d3b029f9dcd554f40b4d", "score": "0.4419341", "text": "protected function getManagedClass() : string\n {\n return UnglinRole::class;\n }", "title": "" }, { "docid": "860f5ef74c28d21bbb656c705b687777", "score": "0.44099486", "text": "public function getManagedItemsClass()\n {\n return LatestCreatedAccount::class;\n }", "title": "" }, { "docid": "4982efe3cf4cab5cd377d4d2717348d0", "score": "0.4394385", "text": "public function wpcd_batch_posttypes_author_in_publish() {\n\t\tglobal $post_ID;\n\t\t$post = get_post( $post_ID );\n\n\t\tif ( 'wpcd_server_batch' === $post->post_type || 'wpcd_app_batch' === $post->post_type ) {\n\t\t\techo '<div class=\"misc-pub-section wpcd-author-sec\">' . esc_html( __( 'Author:', 'wpcd' ) );\n\t\t\tpost_author_meta_box( $post );\n\t\t\techo '</div>';\n\t\t}\n\t}", "title": "" }, { "docid": "6c7e0b0cbe16c3e6941e953a86d49473", "score": "0.4386341", "text": "function wpdocs_special_nav_class( $classes, $item ) {\r\n //if ( is_single() && 'Blog' == $item->title ) {\r\n // Notice you can change the conditional from is_single() and $item->title\r\n $classes[] = \"special-class\";\r\n //}\r\n return $classes;\r\n}", "title": "" }, { "docid": "cecec0f9d6710f1c58b41b25d0b04a95", "score": "0.4385978", "text": "public function custom_post_type() {\n\t\t\tregister_post_type( 'amn_' . $this->plugin, array(\n\t\t\t\t'label' => $this->plugin . ' Announcements',\n\t\t\t\t'can_export' => false,\n\t\t\t\t'supports' => false,\n\t\t\t) );\n\t\t}", "title": "" }, { "docid": "889130058392bc18d9205c2530496d30", "score": "0.437236", "text": "protected function onSubmit()\n {\n //$item->parentId = $this->parentId;\n $this->contentType->largeText = $this->comment->getValue();\n $this->contentType->saveType();\n\n }", "title": "" }, { "docid": "190b2573d5b0a4096d9ac7ead4d062b2", "score": "0.43646246", "text": "public function actionCommitClass() {\n $model = Classes::classToLoad(null, null, $_POST['Classes']['level'], $_POST['Classes']['class'], $_POST['Classes']['stream']);\n \n $model->load(Yii::$app->request->post());\n \n $model->isNewRecord ? $model->created_by = Yii::$app->user->identity->name : $model->updated_by = Yii::$app->user->identity->name;\n \n $model->modelSave();\n }", "title": "" }, { "docid": "8b0b11e2918360cae9f4535f0198971a", "score": "0.43586436", "text": "function thim_single_add_button()\n{\n if (get_theme_mod('enable_book', true)) {\n if (is_singular('hb_room')) {\n if (class_exists('WP_Hotel_Booking')) {\n get_template_part('wp-hotel-booking-room/single-search', 'button');\n } else {\n get_template_part('tp-hotel-booking-room/single-search', 'button');\n }\n }\n }\n}", "title": "" }, { "docid": "591a3ff404a7e890ae9c14911591adf5", "score": "0.4356276", "text": "function sclipowebclass_add_instance($sclipo) {\n\n $sclipo->timecreated = time();\n\n # You may have to add extra stuff in here #\n return insert_record('sclipowebclass', $sclipo);\n}", "title": "" }, { "docid": "e987dbb33fa9ed84452f3f2f6eff03fc", "score": "0.43489045", "text": "public function model()\n {\n return ProjectMember::class;\n }", "title": "" }, { "docid": "cd7dc95226b24fc74a37e1158210f311", "score": "0.43478355", "text": "protected function pivotMayEnablePrimary(Model $model, ClassType $class)\n {\n if (! $model->primary->using) {\n if ($model->primary->column) {\n $model->columns->pull($model->primary->column->name);\n }\n return;\n }\n\n if ('id' !== $name = $model->primary->column->getName()) {\n $this->setPrimaryKeyProperty($class, $name);\n }\n\n if ($model->primary->column->isPrimary()) {\n $this->setIncrementingProperty($class, true);\n }\n\n if ('int' !== $type = $model->primary->column->castType()) {\n $this->setTypeProperty($class, $type);\n }\n }", "title": "" }, { "docid": "5ada03eab65a5a691d81dc5e422d8a2d", "score": "0.4346982", "text": "public function publish(){\r\t\t\r\t\t//Het the items picked\r\t\t$pks = JRequest::getVar( 'cid' );\r\r\t\t//Instance a model for each item and delete\r\t\tforeach ( $pks as $id ) {\r\t\t\t\r\t\t\t// Call the model\r\t\t\t$model = $this->getModel( 'plan' );\r\r\t\t\t$args = array(\r\t\t\t\t'id_plan' => $id,\r\t\t\t\t'estado_activo' => 0\r\t\t\t);\r\t\t\t\r\t\t\t$model->instance( $args );\r\r\t\t\t$model->publish();\r\t\t\t\r\t\t}\r\r\t\t$this->setRedirect( JRoute::_( \"index.php?option=com_referidos&view=planes\" , false) );\r\r\t\treturn;\r\t}", "title": "" }, { "docid": "b96e15c9e43cb31e04ab14756f96eb31", "score": "0.43468717", "text": "function course_maker_add_single_post_content_class( $attributes ) {\n\n\tif ( ! is_singular() ) {\n\t\treturn;\n\t}\n\n\t$attributes['class'] = $attributes['class'] . ' entry-content';\n\treturn $attributes;\n\n}", "title": "" }, { "docid": "9ce4446fe37f4140383024d340e39689", "score": "0.43459857", "text": "function getPublishedSubmissionInsertMethod() {\n\t\treturn 'insertObject';\n\t}", "title": "" }, { "docid": "bfafb53ee654db8c82f1a883b3e4a6a2", "score": "0.4343466", "text": "function add_to_post_classes_for_grid_pattern( array $classes ) {\n\tstatic $member_count = 0;\n\n\tif ( is_admin() ) {\n\t\treturn $classes;\n\t}\n\n\tif ( is_tax( 'role', array( 'director', 'narrator', 'tour-support' ) ) ) {\n\t\treturn $classes;\n\t}\n\n\t$classes[] = 'one-half';\n\n\tif ( $member_count % 2 === 0 ) {\n\t\t$classes[] = 'first';\n\t}\n\n\t$member_count ++;\n\n\treturn $classes;\n}", "title": "" }, { "docid": "1f8308f6d4d34d6a58b8ab0cfedab550", "score": "0.4338625", "text": "protected function customGrid(Grid $grid){\n $grid->model()->with(['category']);\n $grid->id('Id');\n $grid->title('标题');\n $grid->column('category.name','类目');\n $grid->on_sale('以上架')->display(function($value){\n return $value?'是':'否';\n });\n $grid->rating('评分');\n $grid->review_count('评论数');\n $grid->sold_count('销量');\n $grid->price('sku最低价格');\n return $grid;\n }", "title": "" }, { "docid": "0704b8d7c70c0a373df4be1f397ef78f", "score": "0.43322214", "text": "function flatsome_product_box_actions_class() {\n\t\treturn 'grid-tools text-center hide-for-small bottom hover-slide-in show-on-hover';\n\t}", "title": "" }, { "docid": "47dba33860037f963548fbcfe279b832", "score": "0.43315068", "text": "public function model()\r\n {\r\n return \\Webkul\\GraphQLAPI\\Contracts\\PushNotificationTranslation::class;\r\n }", "title": "" }, { "docid": "5db430aec42ad2dc5c2e99fa860b3717", "score": "0.4327925", "text": "function custom_button_example($wp_admin_bar){\n $capability = 'publish_posts';\n $post_ID = get_query_var('p');\n if ( current_user_can( $capability ) && is_singular ( 'job_listing' ) && is_preview() ) {\n $args = array(\n 'id' => 'approve-listing',\n 'title' => 'Approve Job',\n 'href' => wp_nonce_url( \"/wp-admin/edit.php?post_type=job_listing&approve_job=\" . $post_ID . \"&\", 'approve_job' ),\n 'meta' => array(\n 'class' => 'custom-button-class'\n )\n );\n $wp_admin_bar->add_node($args); \n }\n}", "title": "" }, { "docid": "f65f6b506941da05e99020c4e797650a", "score": "0.43230414", "text": "function publish() {\r\n\t\tglobal $database;\r\n\t\t$database->setQuery(\"UPDATE #__zoom SET published = 1 WHERE catid = \".$this->_id);\r\n\t\tif ($database->query()) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "9a859d99099c7342c0d460ce5777263d", "score": "0.43205622", "text": "protected function _getClass($mark){\n\t\t$payment = D('Payment');\n\t\t$paymentmap = array(\n\t\t\t'mark'=>array('eq',$mark),\n\t\t\t'status'=>array('eq',1),\n\t\t);\n\t\t$paymentdata = $payment->where($paymentmap)->find();\n\t\tif(empty($paymentdata)){\n\t\t\treturn false;\n\t\t}else{\n\t\t\t$import_status = import(\"@.ORG.{$paymentdata['mark']}\");\n\t\t\tif($import_status){\n\t\t\t\t$pay = new $paymentdata['mark']($paymentdata);\n\t\t\t\treturn $pay;\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "b47c38e9519085c147872feca332af2d", "score": "0.4315099", "text": "protected function isNewItem(){\n if($this->oItem){\n return !($this->viewType == 'form' && $this->oItem->getId());\n }else{\n return TRUE;\n }\n }", "title": "" }, { "docid": "6711c6bdb366a798bc51a7ddaef1aa13", "score": "0.43143752", "text": "function woo2m_add_button() {\r\n\tif ( current_user_can('edit_posts') && current_user_can('edit_pages') ) {\r\n\t add_filter('mce_external_plugins', 'woo2m_add_plugin');\r\n\t add_filter('mce_buttons', 'woo2m_register_button');\r\n\t}\r\n}", "title": "" }, { "docid": "4bcb3e524b58c91ee2ea5276e29043fe", "score": "0.43140927", "text": "public function model()\n {\n return Public::class;\n }", "title": "" }, { "docid": "c3f3e9eedac95b67c5208785150a44e3", "score": "0.43081892", "text": "public function unpublish(){\r\t\t\r\t\t//Het the items picked\r\t\t$pks = JRequest::getVar( 'cid' );\r\r\t\t//Instance a model for each item and delete\r\t\tforeach ( $pks as $id ) {\r\t\t\t\r\t\t\t// Call the model\r\t\t\t$model = $this->getModel( 'plan' );\r\r\t\t\t$args = array(\r\t\t\t\t'id_plan' => $id,\r\t\t\t\t'estado_activo' => 1\r\t\t\t);\r\t\t\t\r\t\t\t$model->instance( $args );\r\r\t\t\t$model->publish();\r\t\t\t\r\t\t}\r\r\t\t$this->setRedirect( \"index.php?option=com_referidos&view=planes\" );\r\r\t\treturn;\r\t}", "title": "" }, { "docid": "51eeed428d872aad57cd09fa3e62c391", "score": "0.4299661", "text": "function magicpi_product_box_actions_class() {\n\t\treturn 'grid-tools text-center hide-for-small bottom hover-slide-in show-on-hover';\n\t}", "title": "" }, { "docid": "4f58ace6d94e3cbd68e36b9d071119ff", "score": "0.42943287", "text": "public abstract function getModelClass();", "title": "" }, { "docid": "58f6b22423b54d06892d9fc62f15634c", "score": "0.4288826", "text": "function the_posts_grid() {\n\tif ( !is_singular() ) {\n\n\t\t// Add grid.\n\t\tbeans_wrap_inner_markup( 'beans_content', 'beans_child_posts_grid', 'div', array(\n\t\t\t'class' => 'uk-grid uk-grid-match',\n\t\t\t'data-uk-grid-margin' => ''\n\t\t) );\n\t\tbeans_wrap_markup( 'beans_post', 'beans_child_post_grid_column', 'div', array(\n\t\t\t'class' => 'uk-width-large-1-2 uk-width-medium-1-2'\n\t\t) );\n\n\t\t// Move the posts pagination after the new grid markup.\n\t\tbeans_modify_action_hook( 'beans_posts_pagination', 'beans_child_posts_grid_after_markup' );\t\t\n\t}\n}", "title": "" }, { "docid": "58f6b22423b54d06892d9fc62f15634c", "score": "0.4288826", "text": "function the_posts_grid() {\n\tif ( !is_singular() ) {\n\n\t\t// Add grid.\n\t\tbeans_wrap_inner_markup( 'beans_content', 'beans_child_posts_grid', 'div', array(\n\t\t\t'class' => 'uk-grid uk-grid-match',\n\t\t\t'data-uk-grid-margin' => ''\n\t\t) );\n\t\tbeans_wrap_markup( 'beans_post', 'beans_child_post_grid_column', 'div', array(\n\t\t\t'class' => 'uk-width-large-1-2 uk-width-medium-1-2'\n\t\t) );\n\n\t\t// Move the posts pagination after the new grid markup.\n\t\tbeans_modify_action_hook( 'beans_posts_pagination', 'beans_child_posts_grid_after_markup' );\t\t\n\t}\n}", "title": "" }, { "docid": "a3c31ec22c18ed28cc4821a250d0fa7a", "score": "0.42880183", "text": "function remove_public_message_button() {\nremove_filter( 'bp_member_header_actions','bp_send_public_message_button', 20);\n}", "title": "" }, { "docid": "7785bb612e4af4a1b07af4ee263e008a", "score": "0.4283129", "text": "public function model()\n {\n return News::class;\n }", "title": "" }, { "docid": "7785bb612e4af4a1b07af4ee263e008a", "score": "0.4283129", "text": "public function model()\n {\n return News::class;\n }", "title": "" }, { "docid": "bfda1500159d3c9434843938f064472a", "score": "0.42791542", "text": "public function publicar(){\r\r\t\t$id = JRequest::getVar(\"id\");\r\r\t\t$model = $this->getModel( 'plan' );\r\r\t\t$model->instance($id);\r\r\r\t\techo $model->publish( 'bool' );\r\r\t\t\r\t\tdie();\r\t}", "title": "" }, { "docid": "1c38536ff2fffd5b75873755ddab5dd1", "score": "0.42756572", "text": "function gcpta_grid_loop_post_class( $grid_classes ) {\n\n\tglobal $_genesis_loop_args, $loop_counter, $post;\n\n\t// Alter this number to change the number of columns - used to add class names\n\t$columns = genesis_get_option( 'gcpta_grid_columns_' . $post->post_type , 'gcpta-settings-' . $post->post_type ) ? genesis_get_option( 'gcpta_grid_columns_' . $post->post_type , 'gcpta-settings-' . $post->post_type ) : 2;\n\t\n\t// Be able to convert the number of columns to the class name in Genesis\n\t$fractions = array( '', 'half', 'third', 'fourth', 'fifth', 'sixth' );\n\n\t// Only want extra classes on grid posts, not feature posts\n\tif ( $loop_counter >= $_genesis_loop_args['features'] ) {\n\t\t// Make a note of which column we're in\n\t\t$column_number = ( ( $loop_counter - $_genesis_loop_args['features'] ) % $columns ) + 1;\n\t\t\n\t\t// Add genesis-grid-column-? class to know how many columns across we are\n\t\t$grid_classes[] = sprintf( 'genesis-grid-column-%d', $column_number );\n\n\t\t// Add one-* class to make it correct width\n\t\t$grid_classes[] = sprintf( 'one-' . $fractions[$columns - 1], $columns );\n\t\t\n\t\t// Add a class to the first column, so we're sure of starting a new row with no padding-left\n\t\tif ( 1 == $column_number )\n\t\t\t$grid_classes[] = 'first';\n\t}\n\n\treturn $grid_classes;\n\n}", "title": "" }, { "docid": "fa79aa35264ad8dc4ca056bc5446e7e9", "score": "0.42735207", "text": "function set_publisher_form($form){\n $this->publisher->form->fieldtype = $form;\n }", "title": "" }, { "docid": "a894565da776a169db882f92ff5f9a55", "score": "0.4272875", "text": "public function setModel()\n {\n return ButtonProduct::class;\n }", "title": "" }, { "docid": "4781c01cb59af1cad165902c4578e516", "score": "0.426903", "text": "protected function applyCreated(BaseModel $object)\n {\n $object->setVisible(['']);\n }", "title": "" }, { "docid": "2e07933df260de3c438238eb41f24ea0", "score": "0.4264963", "text": "function onDisplayField(&$field, &$item)\n\t{\n\t\tif ( !in_array($field->field_type, static::$field_types) ) return;\n\n\t\t$field->label = JText::_($field->label);\n\t\t$use_ingroup = $field->parameters->get('use_ingroup', 0);\n\t\tif (!isset($field->formhidden_grp)) $field->formhidden_grp = $field->formhidden;\n\t\tif ($use_ingroup) $field->formhidden = 3;\n\t\tif ($use_ingroup && empty($field->ingroup)) return;\n\n\t\t// initialize framework objects and other variables\n\t\t$document = JFactory::getDocument();\n\t\t$cparams = JComponentHelper::getParams( 'com_flexicontent' );\n\n\t\t$_MEDIA_ = 'MEDIA';\n\t\t$tooltip_class = 'hasTooltip';\n\t\t$add_on_class = $cparams->get('bootstrap_ver', 2)==2 ? 'add-on' : 'input-group-addon';\n\t\t$input_grp_class = $cparams->get('bootstrap_ver', 2)==2 ? 'input-append input-prepend' : 'input-group';\n\t\t$form_font_icons = $cparams->get('form_font_icons', 1);\n\t\t$font_icon_class = $form_font_icons ? ' fcfont-icon' : '';\n\n\n\t\t// ****************\n\t\t// Number of values\n\t\t// ****************\n\t\t$multiple = $use_ingroup || (int) $field->parameters->get( 'allow_multiple', 0 ) ;\n\t\t$max_values = $use_ingroup ? 0 : (int) $field->parameters->get( 'max_values', 0 ) ;\n\t\t$required = $field->parameters->get( 'required', 0 ) ;\n\t\t$required = $required ? ' required' : '';\n\t\t$add_position = (int) $field->parameters->get( 'add_position', 3 ) ;\n\n\t\t// API key and other form configuration\n\t\t$debug_to_console = (int) $field->parameters->get('debug_to_console', 0);\n\t\t$use_native_apis = (int) $field->parameters->get('use_native_apis', 0);\n\t\t$embedly_key = $field->parameters->get('embedly_key','') ;\n\t\t$youtube_key = $field->parameters->get('youtube_key', '');\n\n\t\t$autostart = $field->parameters->get('autostart', 0);\n\t\t$autostart = $autostart ? 'true' : 'false';\n\t\t$force_ssl = $field->parameters->get('force_ssl', 1);\n\t\t$force_ssl = $force_ssl ? 'true' : 'false';\n\n\t\t$display_api_type_form = $field->parameters->get('display_api_type_form', 0);\n\t\t$display_media_id_form = $field->parameters->get('display_media_id_form', 0);\n\n\t\t$display_title_form = $field->parameters->get('display_title_form', 1);\n\t\t$display_author_form = $field->parameters->get('display_author_form', 1);\n\t\t$display_duration_form = $field->parameters->get('display_duration_form', 0);\n\n\t\t$display_description_form = $field->parameters->get('display_description_form', 1);\n\t\t$display_edit_size_form = $field->parameters->get('display_edit_size_form', 1);\n\t\t$width = (int)$field->parameters->get('width', 960);\n\t\t$height = (int)$field->parameters->get('height', 540);\n\n\n\t\t// Return error message if api keys are missing\n\t\t//if( empty($embedly_key) && !$use_native_apis ) {\n\t\t// $api_key_name = JText::_('PLG_FLEXICONTENT_FIELDS_SHARED'.$_MEDIA_.'_EMBEDLY_API_KEY');\n\t\t//\t$api_key_desc = JText::_('PLG_FLEXICONTENT_FIELDS_SHARED'.$_MEDIA_.'_EMBEDLY_API_KEY_DESC');\n\t\t//\t$error_text = JText::sprintf('PLG_FLEXICONTENT_FIELDS_SHARED'.$_MEDIA_.'_API_KEY_REQUIRED', $api_key_name) .\" <br/> \". $api_key_desc;\n\t\t//}\n\t\tif( empty($youtube_key) && $use_native_apis ) {\n\t\t\t$api_key_name = JText::_('PLG_FLEXICONTENT_FIELDS_SHARED'.$_MEDIA_.'_YOUTUBE_API_KEY');\n\t\t\t$api_key_desc = JText::_('PLG_FLEXICONTENT_FIELDS_SHARED'.$_MEDIA_.'_YOUTUBE_API_KEY_DESC');\n\t\t\t$error_text = JText::sprintf('PLG_FLEXICONTENT_FIELDS_SHARED'.$_MEDIA_.'_API_KEY_REQUIRED', $api_key_name) .\" <br/> \". $api_key_desc;\n\t\t}\n\n\n\t\t// Initialise value property\n\t\tif (empty($field->value))\n\t\t{\n\t\t\t$field->value = array();\n\t\t\t$field->value[0]['url'] = ''; // Actual media URL (enter by user)\n\t\t\t$field->value[0]['embed_url'] = ''; // Direct embed URL (e.g. via embed.ly)\n\t\t\t$field->value[0]['api_type'] = ''; // Native APIs: embed method (e.g. youtube)\n\t\t\t$field->value[0]['media_id'] = ''; // Native APIs: media ID\n\t\t\t$field->value[0]['title'] = '';\n\t\t\t$field->value[0]['author'] = '';\n\t\t\t$field->value[0]['duration'] = '';\n\t\t\t$field->value[0]['description'] = '';\n\t\t\t$field->value[0]['height'] = '';\n\t\t\t$field->value[0]['width'] = '';\n\t\t\t$field->value[0]['thumb'] = '';\n\t\t\t$field->value[0] = serialize($field->value[0]);\n\t\t}\n\n\t\t// CSS classes of value container\n\t\t$value_classes = 'fcfieldval_container valuebox fcfieldval_container_'.$field->id;\n\n\t\t// Field name and HTML TAG id\n\t\t$fieldname = 'custom['.$field->name.']';\n\t\t$elementid = 'custom_'.$field->name;\n\n\t\t$js = \"\";\n\t\t$css = \"\";\n\t\t$field_name_js = str_replace('-', '_', $field->name);\n\n\t\tif ($multiple) // handle multiple records\n\t\t{\n\t\t\t// Add the drag and drop sorting feature\n\t\t\tif (!$use_ingroup) $js .= \"\n\t\t\tjQuery(document).ready(function(){\n\t\t\t\tjQuery('#sortables_\".$field->id.\"').sortable({\n\t\t\t\t\thandle: '.fcfield-drag-handle',\n\t\t\t\t\t/*containment: 'parent',*/\n\t\t\t\t\ttolerance: 'pointer'\n\t\t\t\t\t\".($field->parameters->get('fields_box_placing', 1) ? \"\n\t\t\t\t\t,start: function(e) {\n\t\t\t\t\t\t//jQuery(e.target).children().css('float', 'left');\n\t\t\t\t\t\t//fc_setEqualHeights(jQuery(e.target), 0);\n\t\t\t\t\t}\n\t\t\t\t\t,stop: function(e) {\n\t\t\t\t\t\t//jQuery(e.target).children().css({'float': 'none', 'min-height': '', 'height': ''});\n\t\t\t\t\t}\n\t\t\t\t\t\" : '').\"\n\t\t\t\t});\n\t\t\t});\n\t\t\t\";\n\n\t\t\tif ($max_values) JText::script(\"FLEXI_FIELD_MAX_ALLOWED_VALUES_REACHED\", true);\n\t\t\t$js .= \"\n\t\t\tfunction addField\".$field->id.\"(el, groupval_box, fieldval_box, params)\n\t\t\t{\n\t\t\t\tvar insert_before = (typeof params!== 'undefined' && typeof params.insert_before !== 'undefined') ? params.insert_before : 0;\n\t\t\t\tvar remove_previous = (typeof params!== 'undefined' && typeof params.remove_previous !== 'undefined') ? params.remove_previous : 0;\n\t\t\t\tvar scroll_visible = (typeof params!== 'undefined' && typeof params.scroll_visible !== 'undefined') ? params.scroll_visible : 1;\n\t\t\t\tvar animate_visible = (typeof params!== 'undefined' && typeof params.animate_visible !== 'undefined') ? params.animate_visible : 1;\n\n\t\t\t\tif(!remove_previous && (rowCount\".$field->id.\" >= maxValues\".$field->id.\") && (maxValues\".$field->id.\" != 0)) {\n\t\t\t\t\talert(Joomla.JText._('FLEXI_FIELD_MAX_ALLOWED_VALUES_REACHED') + maxValues\".$field->id.\");\n\t\t\t\t\treturn 'cancel';\n\t\t\t\t}\n\n\t\t\t\tvar lastField = fieldval_box ? fieldval_box : jQuery(el).prev().children().last();\n\t\t\t\tvar newField = lastField.clone();\n\t\t\t\tnewField.find('.fc-has-value').removeClass('fc-has-value');\n\n\t\t\t\t// First, generate new field as HTML\n\t\t\t\t//var newField_HTML = lastField.prop('outerHTML');\n\n\t\t\t\t// replace all field names and ids\n\t\t\t\t//newField_HTML = newField_HTML.replace(/\" . str_replace(array('[', ']'), array('\\[', '\\]'), $fieldname) . \"\\[(\\d*)\\]/g, '\" . $fieldname . \"[' + uniqueRowNum\".$field->id.\" + ']');\n\t\t\t\t//newField_HTML = newField_HTML.replace(/\" . $elementid . \"_(\\d*)/g, '\" . $elementid . \"_' + uniqueRowNum\".$field->id.\");\n\n\t\t\t\t// Convert HTML to DOM element\n\t\t\t\t//var newField = jQuery(newField_HTML);\n\n\t\t\t\tvar elements = ['sm_url', 'sm_fetch_btn', 'sm_clear_btn', 'sm_embed_url', 'sm_api_type', 'sm_media_id', 'sm_title', 'sm_author', 'sm_duration', 'sm_width', 'sm_height', 'sm_description', 'sm_thumb'];\n\t\t\t\tfor\t(var i = 0; i < elements.length; i++) {\n\t\t\t\t\ttheInput = newField.find('.' + elements[i]).first();\n\t\t\t\t\tvar el_name = elements[i].replace(/^sm_/, '');\n\t\t\t\t\ttheInput.attr('name','\".$fieldname.\"['+uniqueRowNum\".$field->id.\"+']['+el_name+']');\n\t\t\t\t\ttheInput.attr('id','\".$elementid.\"_'+uniqueRowNum\".$field->id.\"+'_'+el_name);\n\t\t\t\t}\n\t\t\t\tnewField.find('.sm_preview').attr('id','\".$elementid.\"_'+uniqueRowNum\".$field->id.\"+'_preview');\n\t\t\t\tnewField.find('.sm_fetch_btn').attr('onclick','fetchData_\".$field_name_js.\"(\\'\".$elementid.\"_'+uniqueRowNum\".$field->id.\"+'\\')');\n\t\t\t\tnewField.find('.sm_clear_btn').attr('onclick','clearData_\".$field_name_js.\"(\\'\".$elementid.\"_'+uniqueRowNum\".$field->id.\"+'\\')');\n\t\t\t\tnewField.find('.fcfield_sm_mssg').attr('id','fcfield_sm_mssg_\".$elementid.\"_'+uniqueRowNum\".$field->id.\");\n\t\t\t\t\";\n\n\t\t\t// Add new field to DOM\n\t\t\t$js .= \"\n\t\t\t\tlastField ?\n\t\t\t\t\t(insert_before ? newField.insertBefore( lastField ) : newField.insertAfter( lastField ) ) :\n\t\t\t\t\tnewField.appendTo( jQuery('#sortables_\".$field->id.\"') ) ;\n\t\t\t\tif (remove_previous) lastField.remove();\n\n\t\t\t\t// Attach form validation on new element\n\t\t\t\tfc_validationAttach(newField);\n\t\t\t\t\";\n\n\t\t\t\t// Extra actions after adding element to the DOM\n\t\t\t$js .= \"\n\t\t\t\tvar element_id = '\".$elementid . \"_' + uniqueRowNum\".$field->id.\";\n\n\t\t\t\t// Clear any existing message\n\t\t\t\tjQuery('#fcfield_sm_mssg_' + element_id).html('');\n\n\t\t\t\t// Clear old value (user entered) URL\n\t\t\t\tjQuery('#' + element_id + '_url').val('');\n\n\t\t\t\t// Clear and hide old value fields\n\t\t\t\tclearData_\".$field_name_js.\"(element_id);\n\t\t\t\t\";\n\n\t\t\t// Add new element to sortable objects (if field not in group)\n\t\t\tif (!$use_ingroup) $js .= \"\n\t\t\t\t//jQuery('#sortables_\".$field->id.\"').sortable('refresh'); // Refresh was done appendTo ?\n\t\t\t\t\";\n\n\t\t\t// Show new field, increment counters\n\t\t\t$js .=\"\n\t\t\t\t//newField.fadeOut({ duration: 400, easing: 'swing' }).fadeIn({ duration: 200, easing: 'swing' });\n\t\t\t\tif (scroll_visible) fc_scrollIntoView(newField, 1);\n\t\t\t\tif (animate_visible) newField.css({opacity: 0.1}).animate({ opacity: 1 }, 800, function() { jQuery(this).css('opacity', ''); });\n\n\t\t\t\t// Enable tooltips on new element\n\t\t\t\tnewField.find('.hasTooltip').tooltip({html: true, container: newField});\n\t\t\t\tnewField.find('.hasPopover').popover({html: true, container: newField, trigger : 'hover focus'});\n\n\t\t\t\trowCount\".$field->id.\"++; // incremented / decremented\n\t\t\t\tuniqueRowNum\".$field->id.\"++; // incremented only\n\t\t\t}\n\n\t\t\tfunction deleteField\".$field->id.\"(el, groupval_box, fieldval_box)\n\t\t\t{\n\t\t\t\t// Disable clicks on remove button, so that it is not reclicked, while we do the field value hide effect (before DOM removal of field value)\n\t\t\t\tvar btn = fieldval_box ? false : jQuery(el);\n\t\t\t\tif (btn && rowCount\".$field->id.\" > 1) btn.css('pointer-events', 'none').off('click');\n\n\t\t\t\t// Find field value container\n\t\t\t\tvar row = fieldval_box ? fieldval_box : jQuery(el).closest('li');\n\n\t\t\t\t// Add empty container if last element, instantly removing the given field value container\n\t\t\t\tif(rowCount\".$field->id.\" == 1)\n\t\t\t\t\taddField\".$field->id.\"(null, groupval_box, row, {remove_previous: 1, scroll_visible: 0, animate_visible: 0});\n\n\t\t\t\t// Remove if not last one, if it is last one, we issued a replace (copy,empty new,delete old) above\n\t\t\t\tif (rowCount\".$field->id.\" > 1)\n\t\t\t\t{\n\t\t\t\t\t// Destroy the remove/add/etc buttons, so that they are not reclicked, while we do the field value hide effect (before DOM removal of field value)\n\t\t\t\t\trow.find('.fcfield-delvalue').remove();\n\t\t\t\t\trow.find('.fcfield-expand-view').remove();\n\t\t\t\t\trow.find('.fcfield-insertvalue').remove();\n\t\t\t\t\trow.find('.fcfield-drag-handle').remove();\n\t\t\t\t\t// Do hide effect then remove from DOM\n\t\t\t\t\trow.slideUp(400, function(){ jQuery(this).remove(); });\n\t\t\t\t\trowCount\".$field->id.\"--;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\";\n\n\t\t\t$css .= '';\n\n\t\t\t$remove_button = '<span class=\"' . $add_on_class . ' fcfield-delvalue ' . $font_icon_class . '\" title=\"'.JText::_( 'FLEXI_REMOVE_VALUE' ).'\" onclick=\"deleteField'.$field->id.'(this);\"></span>';\n\t\t\t$move2 = '<span class=\"' . $add_on_class . ' fcfield-drag-handle ' . $font_icon_class . '\" title=\"'.JText::_( 'FLEXI_CLICK_TO_DRAG' ).'\"></span>';\n\t\t\t$add_here = '';\n\t\t\t$add_here .= $add_position==2 || $add_position==3 ? '<span class=\"' . $add_on_class . ' fcfield-insertvalue fc_before ' . $font_icon_class . '\" onclick=\"addField'.$field->id.'(null, jQuery(this).closest(\\'ul\\'), jQuery(this).closest(\\'li\\'), {insert_before: 1});\" title=\"'.JText::_( 'FLEXI_ADD_BEFORE' ).'\"></span> ' : '';\n\t\t\t$add_here .= $add_position==1 || $add_position==3 ? '<span class=\"' . $add_on_class . ' fcfield-insertvalue fc_after ' . $font_icon_class . '\" onclick=\"addField'.$field->id.'(null, jQuery(this).closest(\\'ul\\'), jQuery(this).closest(\\'li\\'), {insert_before: 0});\" title=\"'.JText::_( 'FLEXI_ADD_AFTER' ).'\"></span> ' : '';\n\t\t} else {\n\t\t\t$remove_button = '';\n\t\t\t$move2 = '';\n\t\t\t$add_here = '';\n\t\t\t$js .= '';\n\t\t\t$css .= '';\n\t\t}\n\n\n\t\t// JS CODE to handle fetching media DATA\n\t\t$js .= '\n\t\tvar fc_mediaID_'.$field_name_js.';\n\t\tvar fc_elemID_'.$field_name_js.';\n\n\n\t\tfunction clearData_'.$field_name_js.'(element_id)\n\t\t{\n\t\t\t// Clear embed Data and its preview HTML\n\t\t\tsetEmbedData_'.$field_name_js.'(\"\", \"\", element_id);\n\n\t\t\t// Clear META Data\n\t\t\tsetMetaData_'.$field_name_js.'({title:\"\", author:\"\", duration:\"\", description:\"\", thumb:\"\"}, element_id);\n\n\t\t\t// Clear other data\n\t\t\tjQuery(\"#\" + element_id + \"_height\").val(\"\");\n\t\t\tjQuery(\"#\" + element_id + \"_width\").val(\"\");\n\n\t\t\t// Hide the value rows\n\t\t\ttoggleMETArows_'.$field_name_js.'(element_id, -1);\n\t\t}\n\n\n\t\tfunction fetchData_'.$field_name_js.'(element_id)\n\t\t{\n\t\t\telement_id = typeof element_id === \"undefined\" || !element_id ? \"'.$elementid.'_0\" : element_id;\n\t\t\tvar msg_box = jQuery(\"#fcfield_sm_mssg_\"+element_id);\n\n\t\t\t// Clear any existing message\n\t\t\tmsg_box.html(\"\");\n\n\t\t\t// Clear existing value\n\t\t\tclearData_'.$field_name_js.'(element_id);\n\n\t\t\t// if URL field is empty then nothing to do, else continue with creating the fetch URL\n\t\t\tvar url = jQuery(\"#\"+element_id+\"_url\").val();\n\t\t\tif (url==\"\") return;\n\n\t\t\tmsg_box.html(\"<img src=\\\"components/com_flexicontent/assets/images/ajax-loader.gif\\\" align=\\\"center\\\">\");\n\n\t\t\t'.($debug_to_console ? 'window.console.log(\"Fetching \"+url);' : '').'\n\n\t\t\tvar mediaID = \"\";\n\t\t\tvar apiType = \"\";\n\n\n\t\t\tif ('.$use_native_apis.') {\n\t\t\t\t// try youtube\n\t\t\t\tvar myregexp = /(?:youtube(?:-nocookie)?\\.com\\/(?:[^\\/]+\\/.+\\/|(?:v|e(?:mbed)?)\\/|.*[?&]v=)|youtu\\.be\\/)([^\"&?\\/ ]{11})/i;\n\t\t\t\tif(url.match(myregexp) != null) {\n\t\t\t\t\tmediaID = url.match(myregexp)[1];\n\t\t\t\t\tapiType = \"youtube\";\n\t\t\t\t}\n\n\t\t\t\t// Try vimeo\n\t\t\t\tvar myregexp = /https?:\\/\\/(www\\.)?vimeo.com\\/(\\d+)($|\\/)/;\n\t\t\t\tif(url.match(myregexp) != null) {\n\t\t\t\t\tmediaID = url.match(myregexp)[2];\n\t\t\t\t\tapiType = \"vimeo\";\n\t\t\t\t}\n\n\t\t\t\t// Try dailymotion\n\t\t\t\tvar myregexp = /^.+dailymotion.com\\/(video|hub)\\/([^_]+)[^#]*(#video=([^_&]+))?/;\n\t\t\t\tif(url.match(myregexp) != null) {\n\t\t\t\t\tmediaID = url.match(myregexp)[4]!== undefined ? url.match(myregexp)[4] : url.match(myregexp)[2];\n\t\t\t\t\tapiType = \"dailymotion\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Global variables, needed if set-embed-data functions are called as callbacks, thus these can not be passed as parameters\n\t\t\tfc_elemID_'.$field_name_js.' = element_id;\n\t\t\tfc_mediaID_'.$field_name_js.' = mediaID;\n\n\t\t\t// Create AJAX url\n\t\t\tvar ajax_url;\n\t\t\tvar ajax_type;\n\t\t\tif (mediaID && apiType) {\n\t\t\t\t'.($debug_to_console ? 'window.console.log(\"Media type: \"+apiType);' : '').'\n\t\t\t\t'.($debug_to_console ? 'window.console.log(\"Media ID: \"+mediaID);' : '').'\n\t\t\t\tswitch(apiType)\n\t\t\t\t{\n\t\t\t\t\tcase \"youtube\" : ajax_url = \"https://www.googleapis.com/youtube/v3/videos?id=\"+mediaID+\"&key='.$youtube_key.'&part=snippet,contentDetails,statistics,status\";/*&callback=youtubeCallback_'.$field_name_js.'\";*/ break;\n\t\t\t\t\tcase \"vimeo\" : ajax_url = \"//vimeo.com/api/v2/video/\"+mediaID+\".json\";/*?callback=vimeoCallback_'.$field_name_js.'\";*/ break;\n\t\t\t\t\tcase \"dailymotion\": ajax_url = \"https://api.dailymotion.com/video/\"+mediaID+\"?fields=description,duration,owner.screenname,thumbnail_60_url,title\";/*&callback=dailymotionCallback_'.$field_name_js.'\";*/ break;\n\t\t\t\t}\n\t\t\t\tajax_type = \"json\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// try embed.ly\n\t\t\t\tajax_url = \"https://noembed.com/embed?url=\"+encodeURIComponent(url); // TODO check if needed to add more URL vars\n\t\t\t\tajax_type = \"json\";\n\t\t\t}\n\n\t\t\t// Make AJAX call\n\t\t\tjQuery.ajax({\n\t\t\t\turl: ajax_url,\n\t\t\t\tdataType: ajax_type,\n\t\t\t\tsuccess: function(data) {\n\t\t\t\t\t'.($debug_to_console ? 'window.console.log(\"Received Server response\");' : '').'\n\t\t\t\t\tvar response;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (ajax_type==\"html\") \tdata = data.replace(/_cbfunc_'.$field_name_js.'\\(/, \"\").replace(/\\)?;?$/, \"\");\n\t\t\t\t\t\tresponse = typeof data !== \"object\" ? jQuery.parseJSON( data ) : data;\n\t\t\t\t\t\t'.($debug_to_console ? 'window.console.log(\"Calling callback \"+(apiType ? apiType : \"embedly\")+\" function on data:\");' : '').'\n\t\t\t\t\t\t'.($debug_to_console ? 'window.console.log(response);' : '').'\n\t\t\t\t\t\tif (mediaID && apiType)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tswitch(apiType)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcase \"youtube\" : youtubeCallback_'.$field_name_js.'(response, mediaID, element_id); break;\n\t\t\t\t\t\t\t\tcase \"vimeo\" : vimeoCallback_'.$field_name_js.'(response, mediaID, element_id); break;\n\t\t\t\t\t\t\t\tcase \"dailymotion\" : dailymotionCallback_'.$field_name_js.'(response, mediaID, element_id); break;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tnoembedCallback_'.$field_name_js.'(response, element_id);\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch(err) {\n\t\t\t\t\t\tmsg_box.html(\"<span class=\\\"alert alert-warning fc-iblock\\\">'.JText::_('PLG_FLEXICONTENT_FIELDS_SHARED'.$_MEDIA_.'_RESPONSE_PARSING_FAILED', true).': \"+err.message+\"</span>\");\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\terror: function(jqXHR, textStatus, errorThrown) {\n\t\t\t\t\t'.($debug_to_console ? 'window.console.log(\"Error, responseText is:\");' : '').'\n\t\t\t\t\t'.($debug_to_console ? 'window.console.log(jqXHR.responseText);' : '').'\n\t\t\t\t\tvar response;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tresponse = jQuery.parseJSON( jqXHR.responseText );\n\t\t\t\t\t} catch(err) {\n\t\t\t\t\t\tresponse = jqXHR.responseText;\n\t\t\t\t\t}\n\t\t\t\t\tvar errorText = typeof response !== \"object\" ? response : (mediaID && (apiType==\"dailymotion\" || apiType==\"youtube\") ? response.error.message : response.error_message);\n\t\t\t\t\tif (apiType==\"youtube\" && typeof response == \"object\") errorText += \" Reason: \" +response.error.errors[0].reason;\n\t\t\t\t\tmsg_box.html(\"<span class=\\\"alert alert-warning fc-iblock\\\"><i>'.JText::_('PLG_FLEXICONTENT_FIELDS_SHARED'.$_MEDIA_.'_SERVER_RESPONDED_WITH_ERROR', true).'</i><br/><br/>\"+errorText+\"</span>\");\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\n\t\tfunction youtubeDurationToSeconds_'.$field_name_js.'(duration)\n\t\t{\n\t\t var match = duration.match(/PT(\\d+H)?(\\d+M)?(\\d+S)?/);\n\t\t var hours = (parseInt(match[1]) || 0);\n\t\t var minutes = (parseInt(match[2]) || 0);\n\t\t var seconds = (parseInt(match[3]) || 0);\n\t\t\treturn hours * 3600 + minutes * 60 + seconds;\n\t\t}\n\n\n\t\tfunction youtubeCallback_'.$field_name_js.'(data, mediaID, element_id)\n\t\t{\n\t\t\tmediaID = typeof mediaID === \"undefined\" || !mediaID ? fc_mediaID_'.$field_name_js.' : mediaID; // *** mediaID not set if called as callback\n\t\t\telement_id = typeof element_id === \"undefined\" || !element_id ? fc_elemID_'.$field_name_js.' : element_id; // *** element_id not set if called as callback\n\n\t\t\tif (typeof data === \"object\" && typeof data.error === \"undefined\" ) {\n\t\t\t\tif (data.items.length == 0) {\n\t\t\t\t\tjQuery(\"#fcfield_sm_mssg_\" + element_id).html(\"<span class=\\\"alert alert-warning fc-iblock\\\">Not found</span>\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\ttoggleMETArows_'.$field_name_js.'(element_id, 1);\n\t\t\t\tsetEmbedData_'.$field_name_js.'(\"youtube\", mediaID, element_id);\n\t\t\t\tsetMetaData_'.$field_name_js.'({title: data.items[0].snippet.title, author: data.items[0].snippet.channelTitle, duration: youtubeDurationToSeconds_'.$field_name_js.'(data.items[0].contentDetails.duration), description: data.items[0].snippet.description, thumb: data.items[0].snippet.thumbnails.medium.url}, element_id);\n\t\t\t\tjQuery(\"#fcfield_sm_mssg_\" + element_id).html(\"\");\n\t\t\t} else {\n\t\t\t\tvar errorText = typeof data === \"object\" ? data.error.message : data;\n\t\t\t\tjQuery(\"#fcfield_sm_mssg_\" + element_id).html(\"<span class=\\\"alert alert-warning fc-iblock\\\"><i>'.JText::_('PLG_FLEXICONTENT_FIELDS_SHARED'.$_MEDIA_.'_SERVER_RESPONDED_WITH_ERROR', true).'</i><br/><br/>\"+errorText+\"</span>\");\n\t\t\t}\n\t\t}\n\n\n\t\tfunction vimeoCallback_'.$field_name_js.'(data, mediaID, element_id)\n\t\t{\n\t\t\tmediaID = typeof mediaID === \"undefined\" || !mediaID ? fc_mediaID_'.$field_name_js.' : mediaID; // *** mediaID not set if called as callback\n\t\t\telement_id = typeof element_id === \"undefined\" || !element_id ? fc_elemID_'.$field_name_js.' : element_id; // *** element_id not set if called as callback\n\n\t\t\tif (typeof data === \"object\" && data.type != \"error\") {\n\t\t\t\ttoggleMETArows_'.$field_name_js.'(element_id, 1);\n\t\t\t\tsetEmbedData_'.$field_name_js.'(\"vimeo\", mediaID, element_id);\n\t\t\t\tsetMetaData_'.$field_name_js.'({title: data[0].title, author: data[0].user_name, duration: data[0].duration, description: data[0].description, thumb: data[0].thumbnail_small}, element_id);\n\t\t\t\tjQuery(\"#fcfield_sm_mssg_\" + element_id).html(\"\");\n\t\t\t} else {\n\t\t\t\tvar errorText = typeof data === \"object\" ? data.error_message : data;\n\t\t\t\tjQuery(\"#fcfield_sm_mssg_\" + element_id).html(\"<span class=\\\"alert alert-warning fc-iblock\\\"><i>'.JText::_('PLG_FLEXICONTENT_FIELDS_SHARED'.$_MEDIA_.'_SERVER_RESPONDED_WITH_ERROR', true).'</i><br/><br/>\"+errorText+\"</span>\");\n\t\t\t}\n\t\t}\n\n\n\t\tfunction dailymotionCallback_'.$field_name_js.'(data, mediaID, element_id)\n\t\t{\n\t\t\tmediaID = typeof mediaID === \"undefined\" || !mediaID ? fc_mediaID_'.$field_name_js.' : mediaID; // *** mediaID not set if called as callback\n\t\t\telement_id = typeof element_id === \"undefined\" || !element_id ? fc_elemID_'.$field_name_js.' : element_id; // *** element_id not set if called as callback\n\n\t\t\tif (typeof data === \"object\" && typeof data.error === \"undefined\") {\n\t\t\t\ttoggleMETArows_'.$field_name_js.'(element_id, 1);\n\t\t\t\tsetEmbedData_'.$field_name_js.'(\"dailymotion\", mediaID, element_id);\n\t\t\t\tsetMetaData_'.$field_name_js.'({title: data.title, author: data[\"owner.screenname\"], duration: data.duration, description: data.description, thumb: data.thumbnail_60_url}, element_id);\n\t\t\t\tjQuery(\"#fcfield_sm_mssg_\" + element_id).html(\"\");\n\t\t\t} else {\n\t\t\t\tvar errorText = typeof data === \"object\" ? data.error.message : data;\n\t\t\t\tjQuery(\"#fcfield_sm_mssg_\" + element_id).html(\"<span class=\\\"alert alert-warning fc-iblock\\\"><i>'.JText::_('PLG_FLEXICONTENT_FIELDS_SHARED'.$_MEDIA_.'_SERVER_RESPONDED_WITH_ERROR', true).'</i><br/><br/>\"+errorText+\"</span>\");\n\t\t\t}\n\t\t}\n\n\n\t\tfunction noembedCallback_'.$field_name_js.'(data, element_id)\n\t\t{\n\t\t\telement_id = typeof element_id === \"undefined\" || !element_id ? fc_elemID_'.$field_name_js.' : element_id; // *** element_id not set if called as callback\n\n\t\t\tif (typeof data === \"object\" && typeof data.error == \"undefined\")\n\t\t\t{\n\t\t\t\tif (1) // TODO Possibly add more checks\n\t\t\t\t{\n\t\t\t\t\tvar urlregex = /(http:|ftp:|https:)?\\/\\/[\\w-]+(\\.[\\w-]+)+([\\w.,@?^=%&amp;:\\/~+#-]*[\\w@?^=%&amp;\\/~+#-])?/;\n\t\t\t\t\tif (data.html.match(urlregex) != null)\n\t\t\t\t\t{\n\t\t\t\t\t\ttoggleMETArows_'.$field_name_js.'(element_id, 1);\n\t\t\t\t\t\tvar embed_url = data.html.match(urlregex)[0];\n\t\t\t\t\t\tsetEmbedData_'.$field_name_js.'(\"noembed:\"+data.provider_name.toLowerCase(), embed_url, element_id);\n\t\t\t\t\t\tsetMetaData_'.$field_name_js.'({title: data.title, author: data.author_name, duration: data.duration, description: data.description, thumb: data.thumbnail_url}, element_id);\n\t\t\t\t\t\tjQuery(\"#fcfield_sm_mssg_\" + element_id).html(\"\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tjQuery(\"#fcfield_sm_mssg_\" + element_id).html(\"IFRAME SRC parameter not found in response\");\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\tjQuery(\"#fcfield_sm_mssg_\" + element_id).html(\"<div class=\\\"alert alert-warning\\\"><button type=\\\"button\\\" class=\\\"close\\\" data-dismiss=\\\"alert\\\">?</button>'. JText::_('PLG_FLEXICONTENT_FIELDS_SHARED'.$_MEDIA_.'_URL_NOT_'.$_MEDIA_).'</div>\");\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvar errorText = typeof data === \"object\" ? data.error_message : data;\n\t\t\t\tjQuery(\"#fcfield_sm_mssg_\" + element_id).html(\"<span class=\\\"alert alert-warning fc-iblock\\\"><i>'.JText::_('PLG_FLEXICONTENT_FIELDS_SHARED'.$_MEDIA_.'_SERVER_RESPONDED_WITH_ERROR', true).'</i><br/><br/>\"+errorText+\"</span>\");\n\t\t\t}\n\t\t}\n\n\n\t\tfunction setEmbedData_'.$field_name_js.'(apiType, mediaID, element_id)\n\t\t{\n\t\t\tmediaID = typeof mediaID === \"undefined\" || !mediaID ? fc_mediaID_'.$field_name_js.' : mediaID;\n\t\t\telement_id = typeof element_id === \"undefined\" || !element_id ? fc_elemID_'.$field_name_js.' : element_id;\n\n\t\t\tif (apiType==\"\") mediaID = \"\";\n\t\t\tdocument.getElementById(element_id+\"_api_type\").value = apiType;\n\t\t\tdocument.getElementById(element_id+\"_media_id\").value = mediaID;\n\t\t\tdocument.getElementById(element_id+\"_embed_url\").value = \"\";\n\n\t\t\tif (apiType!=\"\" && mediaID!=\"\")\n\t\t\t{\n\t\t\t\tvar preview_html = \\'<iframe class=\"sharedmedia seamless\" src=\"\\';\n\t\t\t\tswitch(apiType) {\n\t\t\t\t\tcase \"youtube\" : preview_html += \"//www.youtube.com/embed/\"; break;\n\t\t\t\t\tcase \"vimeo\" : preview_html += \"//player.vimeo.com/video/\"; break;\n\t\t\t\t\tcase \"dailymotion\": preview_html += \"//www.dailymotion.com/embed/video/\"; break;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t// Other embed API, e.g. embed.ly , full embed URL is inside mediaID\n\t\t\t\t\t\tdocument.getElementById(element_id+\"_media_id\").value = \"\";\n\t\t\t\t\t\tdocument.getElementById(element_id+\"_embed_url\").value = mediaID;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tpreview_html += mediaID + \\'\" style=\"width:100%; height:100%; border:none; margin:0; padding:0; overflow:hidden;\" allowFullScreen></iframe>\\';\n\t\t\t\tdocument.getElementById(element_id+\"_preview\").innerHTML = preview_html;\n\t\t\t\tsetTimeout(function() { setHeight_'.$field_name_js.'(\"iframe.sharedmedia\", 2/3); }, 200);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdocument.getElementById(element_id+\"_preview\").innerHTML = \"\";\n\t\t\t}\n\t\t}\n\n\n\t\tfunction setMetaData_'.$field_name_js.'(data, element_id)\n\t\t{\n\t\t\telement_id = typeof element_id === \"undefined\" || !element_id ? fc_elemID_'.$field_name_js.' : element_id;\n\n\t\t\tjQuery(\"#\"+element_id+\"_title\").val(data.title);\n\t\t\tjQuery(\"#\"+element_id+\"_author\").val(data.author);\n\t\t\tjQuery(\"#\"+element_id+\"_duration\").val(data.duration);\n\t\t\tjQuery(\"#\"+element_id+\"_description\").val(data.description);\n\t\t\tjQuery(\"#\"+element_id+\"_thumb\").val(data.thumb);\n\t\t}\n\n\t\tfunction toggleMETArows_'.$field_name_js.'(element_id, action)\n\t\t{\n\t\t\taction = typeof action === \"undefined\" ? 0 : action;\n\t\t\tif (action==1)\n\t\t\t\tjQuery(\"#\" + element_id + \"_title, \" + \"#\" + element_id + \"_author, \" + \"#\" + element_id + \"_description, \" + \"#\" + element_id + \"_api_type, \" + \"#\" + element_id + \"_media_id, \" + \"#\" + element_id + \"_preview, \" + \"#\" + element_id + \"_width, \" + \"#\" + element_id + \"_height\").closest(\"tr\").fadeIn(4000); // compatibility ?: show with fade so that the elements size are proper in case some JS code needs them ?\n\t\t\telse if (action==-1)\n\t\t\t\tjQuery(\"#\" + element_id + \"_title, \" + \"#\" + element_id + \"_author, \" + \"#\" + element_id + \"_description, \" + \"#\" + element_id + \"_api_type, \" + \"#\" + element_id + \"_media_id, \" + \"#\" + element_id + \"_preview, \" + \"#\" + element_id + \"_width, \" + \"#\" + element_id + \"_height\").closest(\"tr\").hide(\"fast\");\n\t\t\telse if (action==0)\n\t\t\t\tjQuery(\"#\" + element_id + \"_title, \" + \"#\" + element_id + \"_author, \" + \"#\" + element_id + \"_description, \" + \"#\" + element_id + \"_api_type, \" + \"#\" + element_id + \"_media_id, \" + \"#\" + element_id + \"_preview, \" + \"#\" + element_id + \"_width, \" + \"#\" + element_id + \"_height\").closest(\"tr\").toggle(0); // compatibility ?: toggle instantly\n\t\t}\n\n\t\tfunction setHeight_'.$field_name_js.'(selector, factor)\n\t\t{\n\t\t\tjQuery(selector).each( function() {\n\t \t\tjQuery(this).css(\"height\", parseInt(factor*jQuery(this).width()));\n\t \t});\n\t\t}\n\n\t\tjQuery(window).resize(function() {\n\t\t\tsetHeight_'.$field_name_js.'(\"iframe.sharedmedia\", 2/3);\n\t\t});\n\n\t\tjQuery(document).ready(function(){\n\t\t\tsetHeight_'.$field_name_js.'(\"iframe.sharedmedia\", 2/3);\n\t\t\tjQuery(document).on(\"mouseenter\", \".fcfieldval_container_'.$field->id.'\", function(event) {\n\t\t\t\tsetHeight_'.$field_name_js.'(\"iframe.sharedmedia\", 2/3);\n\t\t\t});\n\t\t});\n\t\t';\n\n\t\t// TODO more\n\t\t//if (!headers_sent()) header(\"Content-Security-Policy: script-src 'unsafe-inline' 'self' ...;\");\n\n\n\t\t// Added field's custom CSS / JS\n\t\tif ($multiple) $js .= \"\n\t\t\tvar uniqueRowNum\".$field->id.\"\t= \".count($field->value).\"; // Unique row number incremented only\n\t\t\tvar rowCount\".$field->id.\"\t= \".count($field->value).\"; // Counts existing rows to be able to limit a max number of values\n\t\t\tvar maxValues\".$field->id.\" = \".$max_values.\";\n\t\t\";\n\t\tif ($js) $document->addScriptDeclaration($js);\n\t\tif ($css) $document->addStyleDeclaration($css);\n\n\n\t\t// *******************\n\t\t// Create field's HTML\n\t\t// *******************\n\n\t\t$field->html = array();\n\t\t$n = 0;\n\n\t\tforeach ($field->value as $n => $value)\n\t\t{\n\t\t\t// Compatibility for non-serialized values (e.g. reload user input after form validation error) or for NULL values in a field group\n\t\t\tif ( !is_array($value) )\n\t\t\t{\n\t\t\t\t$array = $this->unserialize_array($value, $force_array=false, $force_value=false);\n\t\t\t\t$value = $array ?: array();\n\t\t\t}\n\n\t\t\t// Compatibility with deprecated fields\n\t\t\tif (empty($value['api_type'])) $value['api_type'] = isset($value['videotype']) ? $value['videotype'] : (isset($value['audiotype']) ? $value['audiotype'] : '');\n\t\t\tif (empty($value['media_id'])) $value['media_id'] = isset($value['videoid']) ? $value['videoid'] : (isset($value['audioid']) ? $value['audioid'] : '');\n\n\t\t\t$is_empty = (empty($value['api_type']) || empty($value['media_id'])) && empty($value['embed_url']);\n\t\t\tif ( $is_empty && !$use_ingroup && $n) continue; // If at least one added, skip empty if not in field group\n\n\t\t\t$fieldname_n = $fieldname.'['.$n.']';\n\t\t\t$elementid_n = $elementid.'_'.$n;\n\n\t\t\tif (!empty($value['api_type']) && !empty($value['media_id']))\n\t\t\t{\n\t\t\t\t$content_id = $value['media_id'];\n\t\t\t\tswitch($value['api_type'])\n\t\t\t\t{\n\t\t\t\t\tcase 'youtube':\n\t\t\t\t\t\t$value['embed_url'] = '//www.youtube.com/embed/' . $content_id;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'vimeo':\n\t\t\t\t\t\t$value['embed_url'] = '//player.vimeo.com/video/' . $content_id;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'dailymotion':\n\t\t\t\t\t\t$value['embed_url'] = '//www.dailymotion.com/embed/video/' . $content_id;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t// For embed.ly , the full URL is inside content ID\n\t\t\t\t\t\t$value['embed_url'] = $content_id;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!isset($value['embed_url'])) $value['embed_url'] = '';\n\t\t\t$embed_html = '<iframe class=\"sharedmedia seamless\" src=\"'.($value['embed_url'] ? $value['embed_url'] : 'about:blank').'\" style=\"width:100%; height:100%; border:none; margin:0; padding:0; overflow:hidden;\" allowFullScreen></iframe>';\n\n\t\t\tif (!isset($value['url'])) $value['url'] = '';\n\t\t\tif (!isset($value['embed_url'])) $value['embed_url'] = '';\n\t\t\tif (!isset($value['title'])) $value['title'] = '';\n\t\t\tif (!isset($value['author'])) $value['author'] = '';\n\t\t\tif (empty($value['duration'])) $value['duration'] = '';\n\t\t\tif (!isset($value['height'])) $value['height'] = '';\n\t\t\tif (!isset($value['width'])) $value['width'] = '';\n\t\t\tif (!isset($value['description'])) $value['description'] = '';\n\t\t\tif (!isset($value['thumb'])) $value['thumb'] = '';\n\n\t\t\t// Force display of configuration's default dimensions\n\t\t\tif ($display_edit_size_form!=1)\n\t\t\t{\n\t\t\t\t$value['height'] = $height;\n\t\t\t\t$value['width'] = $width;\n\t\t\t}\n\n\t\t\t$html_field = '\n\t\t\t\t'.($use_ingroup || !$multiple ? '' : '\n\t\t\t\t<div class=\"'.$input_grp_class.' fc-xpended-btns\">\n\t\t\t\t\t'.$move2.'\n\t\t\t\t\t'.$remove_button.'\n\t\t\t\t\t'.(!$add_position ? '' : $add_here).'\n\t\t\t\t</div>\n\t\t\t\t').'\n\t\t\t<div class=\"fcclear\"></div>\n\t\t\t<div class=\"fcfield_field_data_box\">\n\t\t\t<table class=\"fc-form-tbl fcfullwidth fcinner fc-sharedmedia-field-tbl\" data-row=\"'.$n.'\">\n\t\t\t<tbody>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=\"key\"><span class=\"flexi label prop_label\">' . JText::_('PLG_FLEXICONTENT_FIELDS_SHARED'.$_MEDIA_.'_MEDIA_URL') . '</span></td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<input type=\"text\" class=\"fcfield_textval' . $required . ' sm_url\" id=\"'.$elementid_n.'_url\" name=\"'.$fieldname_n.'[url]\" value=\"'.htmlspecialchars($value['url'], ENT_COMPAT, 'UTF-8').'\" size=\"60\" />\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td style=\"text-align:right; padding:0 8px 4px 0;\">\n\t\t\t\t\t\t<a href=\"javascript:;\" class=\"btn btn-primary btn-small sm_fetch_btn\" id=\"'.$elementid_n.'_fetch_btn\" title=\"'.JText::_('PLG_FLEXICONTENT_FIELDS_SHARED'.$_MEDIA_.'_FETCH').'\" onclick=\"fetchData_'.$field_name_js.'(\\''.$elementid_n.'\\'); return false;\"><i class=\"icon-loop\"></i>'.JText::_('PLG_FLEXICONTENT_FIELDS_SHARED'.$_MEDIA_.'_FETCH').'</a>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td style=\"text-align:left; padding:0 8px 4px 0;\">\n\t\t\t\t\t\t'.($use_ingroup ? '<a href=\"javascript:;\" class=\"btn btn-warning btn-small sm_clear_btn\" id=\"'.$elementid_n.'_clear_btn\" title=\"'.JText::_('FLEXI_CLEAR').'\" onclick=\"clearData_'.$field_name_js.'(\\''.$elementid_n.'\\'); return false;\" ><i class=\"icon-cancel\"></i>'.JText::_('FLEXI_CLEAR').'</a>' : '').'\n\t\t\t\t\t\t<input type=\"hidden\" class=\"sm_embed_url\" id=\"'.$elementid_n.'_embed_url\" name=\"'.$fieldname_n.'[embed_url]\" value=\"'.htmlspecialchars($value['embed_url'], ENT_COMPAT, 'UTF-8').'\" />\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"2\" style=\"padding:0\"><span class=\"fcfield_sm_mssg\" id=\"fcfield_sm_mssg_'.$elementid_n.'\"></span></td>\n\t\t\t\t</tr>'\n\t\t\t.($display_api_type_form ? '\n\t\t\t\t<tr '.($is_empty ? ' style=\"display:none;\" ' : '').'>\n\t\t\t\t\t<td class=\"key\"><span class=\"flexi label prop_label\">'.JText::_('PLG_FLEXICONTENT_FIELDS_SHARED'.$_MEDIA_.'_EMBED_METHOD').'</span></td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<input type=\"text\" class=\"fcfield_textval sm_api_type\" id=\"'.$elementid_n.'_api_type\" name=\"'.$fieldname_n.'[api_type]\" value=\"'.htmlspecialchars($value['api_type'], ENT_COMPAT, 'UTF-8').'\" size=\"30\" readonly=\"readonly\" />\n\t\t\t\t\t</td>\n\t\t\t\t</tr>' : '\n\t\t\t\t<tr style=\"display:none;\"><td colspan=\"2\"><input type=\"hidden\" class=\"sm_api_type\" id=\"'.$elementid_n.'_api_type\" name=\"'.$fieldname_n.'[api_type]\" value=\"'.htmlspecialchars($value['api_type'], ENT_COMPAT, 'UTF-8').'\" style=\"background-color:#eee\" /></td></tr>')\n\t\t\t.($display_media_id_form ? '\n\t\t\t\t<tr '.($is_empty ? ' style=\"display:none;\" ' : '').'>\n\t\t\t\t\t<td class=\"key\"><span class=\"flexi label prop_label\">'.JText::_('PLG_FLEXICONTENT_FIELDS_SHARED'.$_MEDIA_.'_MEDIA_ID').'</span></td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<input type=\"text\" class=\"fcfield_textval sm_media_id\" id=\"'.$elementid_n.'_media_id\" name=\"'.$fieldname_n.'[media_id]\" value=\"'.htmlspecialchars($value['media_id'], ENT_COMPAT, 'UTF-8').'\" size=\"30\" readonly=\"readonly\" />\n\t\t\t\t\t</td>\n\t\t\t\t</tr>' : '\n\t\t\t\t<tr style=\"display:none;\"><td colspan=\"2\"><input type=\"hidden\" class=\"sm_media_id\" id=\"'.$elementid_n.'_media_id\" name=\"'.$fieldname_n .'[media_id]\" value=\"'.htmlspecialchars($value['media_id'], ENT_COMPAT, 'UTF-8').'\" style=\"background-color:#eee\" /></td></tr>')\n\t\t\t.($display_title_form ? '\n\t\t\t\t<tr '.($is_empty ? ' style=\"display:none;\" ' : '').'>\n\t\t\t\t\t<td class=\"key\"><span class=\"flexi label prop_label\">' . JText::_('PLG_FLEXICONTENT_FIELDS_SHARED'.$_MEDIA_.'_TITLE') . '</span></td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<input type=\"text\" class=\"fcfield_textval sm_title\" id=\"'.$elementid_n.'_title\" name=\"'.$fieldname_n.'[title]\" value=\"'.htmlspecialchars($value['title'], ENT_COMPAT, 'UTF-8').'\" size=\"60\" '.($display_title_form==2 ? 'readonly=\"readonly\"' : '').' />\n\t\t\t\t\t</td>\n\t\t\t\t</tr>' : '\n\t\t\t\t<tr style=\"display:none;\"><td colspan=\"2\"><input type=\"hidden\" class=\"sm_title\" id=\"'.$elementid_n.'_title\" name=\"'.$fieldname_n.'[title]\" value=\"'.htmlspecialchars($value['title'], ENT_COMPAT, 'UTF-8').'\" /></td></tr>')\n\t\t\t.($display_author_form ? '\n\t\t\t\t<tr '.($is_empty ? ' style=\"display:none;\" ' : '').'>\n\t\t\t\t\t<td class=\"key\"><span class=\"flexi label prop_label\">' . JText::_('PLG_FLEXICONTENT_FIELDS_SHARED'.$_MEDIA_.'_AUTHOR') . '</span></td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<input type=\"text\" class=\"fcfield_textval sm_author\" id=\"'.$elementid_n.'_author\" name=\"'.$fieldname_n.'[author]\" value=\"'.htmlspecialchars($value['author'], ENT_COMPAT, 'UTF-8').'\" size=\"60\" '.($display_author_form==2 ? 'readonly=\"readonly\"' : '').' />\n\t\t\t\t\t</td>\n\t\t\t\t</tr>' : '\n\t\t\t\t<tr style=\"display:none;\"><td colspan=\"2\"><input type=\"hidden\" class=\"sm_author\" id=\"'.$elementid_n.'_author\" name=\"'.$fieldname_n.'[author]\" value=\"'.htmlspecialchars($value['author'], ENT_COMPAT, 'UTF-8').'\" /></td></tr>')\n\t\t\t.($display_duration_form ? '\n\t\t\t\t<tr '.($is_empty ? ' style=\"display:none;\" ' : '').'>\n\t\t\t\t\t<td class=\"key\"><span class=\"flexi label prop_label\">' . JText::_('PLG_FLEXICONTENT_FIELDS_SHARED'.$_MEDIA_.'_DURATION') . '</span></td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<input type=\"text\" class=\"fcfield_textval inlineval sm_duration\" id=\"'.$elementid_n.'_duration\" name=\"'.$fieldname_n.'[duration]\" value=\"'.htmlspecialchars($value['duration'], ENT_COMPAT, 'UTF-8').'\" size=\"10\" '.($display_duration_form==2 ? 'readonly=\"readonly\"' : '').' /> '.JText::_('PLG_FLEXICONTENT_FIELDS_SHARED'.$_MEDIA_.'_SECONDS').'\n\t\t\t\t\t</td>\n\t\t\t\t</tr>' : '\n\t\t\t\t<tr style=\"display:none;\"><td colspan=\"2\"><input type=\"hidden\" class=\"sm_duration\" id=\"'.$elementid_n.'_duration\" name=\"'.$fieldname_n.'[duration]\" value=\"'.htmlspecialchars($value['duration'], ENT_COMPAT, 'UTF-8').'\" /></td></tr>')\n\t\t\t.($display_edit_size_form ? '\n\t\t\t\t<tr '.($is_empty ? ' style=\"display:none;\" ' : '').'>\n\t\t\t\t\t<td class=\"key\"><span class=\"flexi label prop_label\">' . JText::_('PLG_FLEXICONTENT_FIELDS_SHARED'.$_MEDIA_.'_PLAYER_DIMENSIONS') . '</span></td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<input type=\"text\" class=\"fcfield_textval inlineval sm_width\" size=\"5\" id=\"'.$elementid_n.'_width\" name=\"'.$fieldname_n.'[width]\" value=\"'.htmlspecialchars($value['width'], ENT_COMPAT, 'UTF-8').'\" '.($display_edit_size_form==2 ? 'readonly=\"readonly\"' : '').' /> x\n\t\t\t\t\t\t<input type=\"text\" class=\"fcfield_textval inlineval sm_height\" size=\"5\" id=\"'.$elementid_n.'_height\" name=\"'.$fieldname_n.'[height]\" value=\"'.htmlspecialchars($value['height'], ENT_COMPAT, 'UTF-8').'\" '.($display_edit_size_form==2 ? 'readonly=\"readonly\"' : '').' /> '.JText::_('PLG_FLEXICONTENT_FIELDS_SHARED'.$_MEDIA_.'_PIXELS').'\n\t\t\t\t\t</td>\n\t\t\t\t</tr>' : '') // no need for hidden width/height fields, server validation will discard them anyway\n\t\t\t.($display_description_form ? '\n\t\t\t\t<tr '.($is_empty ? ' style=\"display:none;\" ' : '').'>\n\t\t\t\t\t<td class=\"key\"><span class=\"flexi label prop_label\">' . JText::_('PLG_FLEXICONTENT_FIELDS_SHARED'.$_MEDIA_.'_DESCRIPTION') . '</span></td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<textarea class=\"fcfield_textareaval sm_description\" id=\"'.$elementid_n.'_description\" name=\"'.$fieldname_n.'[description]\" rows=\"7\" '.($display_description_form==2 ? 'readonly=\"readonly\"' : '').'>' . $value['description'] . '</textarea>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>' : '\n\t\t\t\t<tr style=\"display:none;\"><td colspan=\"2\"><input type=\"hidden\" class=\"sm_description\" id=\"'.$elementid_n.'_description\" name=\"'.$fieldname_n.'[description]\" value=\"'.htmlspecialchars($value['description'], ENT_COMPAT, 'UTF-8').'\" /></td></tr>')\n\t\t\t\t. '\n\t\t\t</tbody>\n\t\t\t</table>\n\t\t\t</div>\n\n\t\t\t<div class=\"fcfield_field_preview_box\">\n\t\t\t<table class=\"fcfield_field_preview_table\">\n\t\t\t<tbody>\n\t\t\t\t<tr '.($is_empty ? ' style=\"display:none;\" ' : '').'>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t' /*<span class=\"flexi label prop_label\">' . JText::_('PLG_FLEXICONTENT_FIELDS_SHARED'.$_MEDIA_.'_PREVIEW') . '</span><br/>*/ .'\n\t\t\t\t\t\t<div class=\"sm_preview\" id=\"'.$elementid_n.'_preview\">\n\t\t\t\t\t\t\t'.$embed_html.'\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type=\"hidden\" class=\"sm_thumb\" id=\"'.$elementid_n.'_thumb\" name=\"'.$fieldname_n.'[thumb]\" value=\"'.htmlspecialchars($value['thumb'], ENT_COMPAT, 'UTF-8').'\" />\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</tbody>\n\t\t\t</table>\n\t\t\t</div>\n\t\t\t';\n\t\t\t$field->html[$n] = $html_field;\n\t\t}\n\n\t\tif ($use_ingroup) { // do not convert the array to string if field is in a group\n\t\t} else if ($multiple) { // handle multiple records\n\t\t\t$field->html = !count($field->html) ? '' :\n\t\t\t\t'<li class=\"'.$value_classes.'\">'.\n\t\t\t\t\timplode('</li><li class=\"'.$value_classes.'\">', $field->html).\n\t\t\t\t'</li>';\n\t\t\t$field->html = '<ul class=\"fcfield-sortables fcprops-boxed\" id=\"sortables_'.$field->id.'\">' .$field->html. '</ul>';\n\t\t\tif (!$add_position) $field->html .= '\n\t\t\t\t<div class=\"input-append input-prepend fc-xpended-btns\">\n\t\t\t\t\t<span class=\"fcfield-addvalue ' . $font_icon_class . ' fccleared\" onclick=\"addField'.$field->id.'(jQuery(this).closest(\\'.fc-xpended-btns\\').get(0));\" title=\"'.JText::_( 'FLEXI_ADD_TO_BOTTOM' ).'\">\n\t\t\t\t\t\t'.JText::_( 'FLEXI_ADD_VALUE' ).'\n\t\t\t\t\t</span>\n\t\t\t\t</div>';\n\t\t} else { // handle single values\n\t\t\t$field->html = '<div class=\"fcfieldval_container valuebox fcfieldval_container_'.$field->id.'\">' . (isset($field->html[-1]) ? $field->html[-1] : '') . $field->html[0] .'</div>';\n\t\t}\n\n\t\t// Add Error message\n\t\tif ( !empty($error_text) )\n\t\t{\n\t\t\t$error_text = '<div class=\"alert alert-warning fc-small fc-iblock\">'.$error_text.'</div>';\n\t\t\tif (!$use_ingroup) {\n\t\t\t\t$field->html = $error_text . $field->html;\n\t\t\t} else {\n\t\t\t\tforeach($field->html as & $html) $html = $error_text . $html;\n\t\t\t\tunset($html);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "371d62a29e89c62e14bc4508f09000c5", "score": "0.4259678", "text": "protected function beforeSave() {\n\t\tif(empty($this->type))\n\t\t\t$this->type = 'purchaseinvoice';\n\t\treturn parent::beforeSave();\n\t}", "title": "" }, { "docid": "c6a9a89856de57d89134c7b2440dc943", "score": "0.4258598", "text": "public function isDisplayAddButton() {\n\n if (CATALOGUE_USE_PRODUCTS_NESTING_MODE){\n\n if (isset($this->cacheParent[$this->typeId])){\n return 0;\n }\n }\n\n if ($this->isModuleInside()){\n return 1;\n } else {\n return 0;\n }\n }", "title": "" }, { "docid": "ac568ed2777109d313d144e652403222", "score": "0.42523187", "text": "public function modelClass(): string\n {\n return property_exists($this, 'model')\n ? $this->model\n : $this->defaultModel();\n }", "title": "" }, { "docid": "975437d900a9f6d1ea225b40311d9299", "score": "0.42402577", "text": "public function getPivotClass()\n {\n return $this->using ?? BasePivotModel::class;\n }", "title": "" }, { "docid": "62d1da9852516713305274505937523c", "score": "0.42374948", "text": "public function column_plugins( $blog ) {\n\t\tif ( has_filter( 'wpmublogsaction' ) ) {\n\t\t\t/**\n\t\t\t * Fires inside the auxiliary 'Actions' column of the Sites list table.\n\t\t\t *\n\t\t\t * By default this column is hidden unless something is hooked to the action.\n\t\t\t *\n\t\t\t * @since MU (3.0.0)\n\t\t\t *\n\t\t\t * @param int $blog_id The site ID.\n\t\t\t */\n\t\t\tdo_action( 'wpmublogsaction', $blog['blog_id'] );\n\t\t}\n\t}", "title": "" }, { "docid": "84b25a796a40535535a1196a81e80438", "score": "0.42359427", "text": "public function displayOnClass( $field_name, $field_config ) {\n\t\t\t$class = '';\n\t\t\tif ( isset( $field_config['display_on'] ) ) {\n\t\t\t\t$class = ' widget-field-display_on';\n\t\t\t}\n\n\t\t\treturn $class;\n\t\t}", "title": "" }, { "docid": "0f4ca2cd752884ea23149b3ba19c3604", "score": "0.42341968", "text": "function unPublish(){\r\n\t\tglobal $database;\r\n\t\t$database->setQuery(\"UPDATE #__zoom SET published = 0 WHERE catid = \".$this->_id);\r\n\t\tif ($database->query()) {\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "da3607d389f6cab98aa64811dd23e9d7", "score": "0.42316368", "text": "protected function filterModel()\n {\n return \\App\\Models\\Aalberts\\Filter\\Externaltubediameterofconnection::class;\n }", "title": "" }, { "docid": "4335ca10b9795320156990b72e3ab66c", "score": "0.42314637", "text": "public function afterSave()\n {\n if (($this->isObjectNew() && $this->isShowOnGrid())\n || (!$this->isObjectNew() && $this->dataHasChangedFor(CheckoutAttributeInterface::SHOW_ON_GRIDS))\n ) {\n $this->_getResource()->addCommitCallback([$this, 'invalidate']);\n }\n\n return parent::afterSave();\n }", "title": "" }, { "docid": "6143338cac4acc44bd0817c541e0a959", "score": "0.42304417", "text": "public function getTrustupMediaModelType(): string\n {\n /** @var Model $this */\n return Str::slug(str_replace('\\\\', '-', $this->getMorphClass()));\n }", "title": "" }, { "docid": "c062e37c15b5a0dc1d0414e24a47538a", "score": "0.42301187", "text": "public function is_publish_and_build_submit()\n {\n if (! $this->show_form)\n {\n return false;\n }\n \n $values = $this->content_object_publication_form->exportValues();\n return ! empty($values[PublicationForm::PROPERTY_PUBLISH_AND_BUILD]);\n }", "title": "" }, { "docid": "aab83d3889dd353ba08fefd2e3bb682d", "score": "0.42198372", "text": "public function container_class()\n\t{\n\t\treturn 'CMS_Fields_Types_AjaxUpload_Container';\n\t}", "title": "" }, { "docid": "6cd00dd3553283395526c8163e8e72aa", "score": "0.42190394", "text": "public function setPublishMethod()\n {\n return $this->setCalendar('method', Calendar::METHOD_PUBLISH);\n }", "title": "" }, { "docid": "6c8b512d99fdd158c5eca27a9d3cdf68", "score": "0.42176482", "text": "function cust_jetpack_pub_fn(){\r\n\t$current_user = wp_get_current_user();\r\n\t$gcmaz_settings = get_option( 'gcmaz_settings' );\r\n\tif( !in_array( $current_user->ID, $gcmaz_settings['gcmaz_publicize'] ) ){\r\n\t // set auto post to unchecked\r\n\t add_filter( 'publicize_checkbox_default', '__return_false' );\r\n\t //echo \"<script> alert('Booo');</script>\";\r\n\t //print_r($gcmaz_settings['gcmaz_publicize']);\r\n\t}\t\r\n}", "title": "" }, { "docid": "1d6bf6f9bfc9200546bde7962cccdb9e", "score": "0.42175022", "text": "public function model()\n {\n return Topic::class;\n }", "title": "" }, { "docid": "1b8928542a9cd34e156161dfdd29189f", "score": "0.42169723", "text": "function wpdocs_special_nav_class( $classes, $item ) {\n if ( 'Movilizarte en Yarumal' == $item->title ) {\n // Notice you can change the conditional from is_single() and $item->title\n $classes[] = \"special-class\";\n }\n return $classes;\n}", "title": "" }, { "docid": "33f8ef352b15b089fcd57e605b633ebc", "score": "0.4214908", "text": "public function supportsClass($class)\n {\n return $class == 'AerialShip\\SteelMqBundle\\Entity\\Project' ||\n is_subclass_of($class, 'AerialShip\\SteelMqBundle\\Entity\\Project');\n }", "title": "" }, { "docid": "70b81d09d0c64363d2794c4b81477995", "score": "0.42140386", "text": "function rc_register_social_posts()\n{\n register_post_type('rc_social_post',\n array(\n 'labels' => array(\n 'name' => __('Social Posts'),\n 'singular_name' => __('Social Post'),\n ),\n 'public' => true,\n 'has_archive' => false,\n 'supports' => array('title','custom-fields'),\n )\n );\n remove_post_type_support('rc_social_post','editor');\n}", "title": "" }, { "docid": "1f2928e45c8c0c4224f0bdd4a81fb8b1", "score": "0.4209577", "text": "function publishTranslation()\r\n\t{\r\n\t\t$catid = $this->_catid;\r\n\t\t$publish = $this->task == \"publish\" ? 1 : 0;\r\n\t\t$cid = JRequest::getVar('cid', array(0));\r\n\t\t$model = $this->view->getModel();\r\n\t\tif (strpos($cid[0], '|') >= 0)\r\n\t\t{\r\n\t\t\tlist($translation_id, $contentid, $language_id) = explode('|', $cid[0]);\r\n\t\t}\r\n\t\tforeach ($cid as $cid_row)\r\n\t\t{\r\n\t\t\tlist($translation_id, $contentid, $language_id) = explode('|', $cid_row);\r\n\r\n\t\t\t$contentElement = $this->_joomfishManager->getContentElement($catid);\r\n\t\t\t$translationClass = $contentElement->getTranslationObjectClass();\r\n\t\t\t$translationObject = new $translationClass( $language_id, $contentElement );\r\n\t\t\t$translationObject->loadFromContentID($contentid);\r\n\t\t\tif ($translationObject->state >= 0)\r\n\t\t\t{\r\n\t\t\t\t$translationObject->setPublished($publish);\r\n\t\t\t\t// This is not saving an updated translation so pass a false here\r\n\t\t\t\t$translationObject->store(false);\r\n\t\t\t\t$model->setState('message', $publish ? JText::_('TRANSLATION_PUBLISHED') : JText::_('TRANSLATION_PUBLISHED'));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// redirect to overview\r\n\t\t$this->showTranslate();\r\n\r\n\t}", "title": "" }, { "docid": "c56f893f4c8c81aa23980244ae5fbd5e", "score": "0.42063597", "text": "public function ChangeFieldTypePostHook()\n {\n $query = 'ALTER TABLE `'.MySqlLegacySupport::getInstance()->real_escape_string($this->sTableName).'`\n ADD `'.MySqlLegacySupport::getInstance()->real_escape_string($this->name).\"_view` VARCHAR(255) NOT NULL DEFAULT 'standard'\";\n $aQuery = array(new LogChangeDataModel($query));\n\n TCMSLogChange::WriteTransaction($aQuery);\n MySqlLegacySupport::getInstance()->query($query);\n }", "title": "" }, { "docid": "4ae3bee081b630fcbc740144088db637", "score": "0.42021048", "text": "public function register()\n {\n\n \\Event::listen('backend.form.extendFields', function ($widget) {\n if (PluginManager::instance()->hasPlugin('RainLab.Blog') && $widget->model instanceof PostModel) {\n $widget->addFields([\n 'user' => [\n 'label' => 'Author',\n 'tab' => 'Details',\n 'type' => 'relation',\n 'select' => 'first_name',\n 'emptyOption' => 'Disable',\n 'span' => 'auto'\n ],\n // 'author' => [\n // 'label' => 'Author',\n // 'tab' => 'Details',\n // 'type' => 'Text',\n // 'span' => 'auto'\n // ],\n 'subtitle' => [\n 'label' => 'Person',\n 'type' => 'text',\n 'tab' => 'Details',\n 'span' => 'auto'\n ],\n 'galerie_images' => [\n 'type' => 'fileupload',\n 'label' => 'Galeria de Imagenes',\n 'mode' => 'image',\n 'span' => 'auto',\n 'tab' => 'Details',\n ],\n 'views' => [\n 'label' => 'Views',\n 'type' => 'text',\n 'tab' => 'Details',\n 'span' => 'auto',\n 'disabled' => true,\n ]\n ], 'secondary');\n }\n });\n }", "title": "" }, { "docid": "62a5ffb7b349b3a1ffea55c039a21e33", "score": "0.41974652", "text": "function after_pm_entity_add($obj) {\n //do nothing here, but allow subclass to override\n }", "title": "" }, { "docid": "c2f5202dd98bb7270cd11e76f7f1b81b", "score": "0.41956133", "text": "public function onAfterUnpublish()\n {\n error_log('---- on after unpublish ----');\n $member = Security::getCurrentUser();\n if (!$member || !$member->exists()) {\n return false;\n }\n\n $arrayData = new ArrayData([\n 'Member' => $member,\n 'Page' => $this->owner\n ]);\n $message = $arrayData->renderWith('OnAfterUnPublish');\n\n $this->notify(\"{$message}\", 'auditor', 'info');\n\n }", "title": "" }, { "docid": "84397dc97e93461ffa4ca85fdef06630", "score": "0.41919643", "text": "public function getModelClass()\n {\n if ($this->modelClassName) {\n return $this->modelClassName;\n }\n\n /** @var DataList|ArrayList $list */\n $list = $this->list;\n if ($list && $list->hasMethod('dataClass')) {\n $class = $list->dataClass();\n\n if ($class) {\n return $class;\n }\n }\n\n throw new LogicException(\n 'GridField doesn\\'t have a modelClassName, so it doesn\\'t know the columns of this grid.'\n );\n }", "title": "" }, { "docid": "f4db82fd6755c4f612eb2878f0f7741b", "score": "0.41873252", "text": "function c4m_user_notifications_new_group_content_published($node) {\n _c4m_user_notifications_notify_on_content($node, 'insert');\n}", "title": "" }, { "docid": "f8cf1a29e2de1a06adc37270ec2ccafc", "score": "0.41872865", "text": "public function model()\n {\n return ProjectTasks::class;\n }", "title": "" }, { "docid": "68096ed088ac0abd006a8eacc9312c3c", "score": "0.41852883", "text": "abstract public function getModelClass();", "title": "" } ]
d9e33dd7bc8dd788650a6db65f08b987
Field value of length greater than this value. Generated from protobuf field int64 length_gte = 52;
[ { "docid": "c5c647d539115a61a8b4cc33ab9d0c1b", "score": "0.67798007", "text": "public function setLengthGte($var)\n {\n GPBUtil::checkInt64($var);\n $this->length_gte = $var;\n\n return $this;\n }", "title": "" } ]
[ { "docid": "23c922984b6791dcec02048c0ee80655", "score": "0.74264586", "text": "public function setLengthGt($var)\n {\n GPBUtil::checkInt64($var);\n $this->length_gt = $var;\n\n return $this;\n }", "title": "" }, { "docid": "4c187682f9e9d34263956cdb4c5cbad4", "score": "0.7302937", "text": "public function getLengthGt()\n {\n return $this->length_gt;\n }", "title": "" }, { "docid": "8363425f56040fc0a2da6d4f4bf4677e", "score": "0.6747498", "text": "public function getLengthGte()\n {\n return $this->length_gte;\n }", "title": "" }, { "docid": "e9b42188b7fd4a27e18dc888e485c127", "score": "0.65778214", "text": "function has_length_greater_than($value, $min) {\n $length = strlen($value);\n return $length > $min;\n }", "title": "" }, { "docid": "1dc6773071c3d69a74603fb8a6643c5b", "score": "0.657525", "text": "function over_min($value, $min_length) {\n return strlen($value) > $min_length;\n }", "title": "" }, { "docid": "e7fa52dd9e9f046578b61fd3de83078e", "score": "0.6460466", "text": "public function getLengthLt()\n {\n return $this->length_lt;\n }", "title": "" }, { "docid": "6959b617361815ac33354c575f54a387", "score": "0.6437331", "text": "function under_max($value, $max_length) {\n return strlen($value) < $max_length;\n }", "title": "" }, { "docid": "3772cffd88202a596a99c0bf933af024", "score": "0.63841796", "text": "function has_length_less_than($value, $max) {\n $length = strlen($value);\n return $length < $max;\n }", "title": "" }, { "docid": "cbe11ec2a3af356d06a6ef4d6b7507e3", "score": "0.63636357", "text": "public function setLengthLte($var)\n {\n GPBUtil::checkInt64($var);\n $this->length_lte = $var;\n\n return $this;\n }", "title": "" }, { "docid": "d7462bf005e0e211aa902f3cd7ac0baf", "score": "0.6345048", "text": "public function setLengthLt($var)\n {\n GPBUtil::checkInt64($var);\n $this->length_lt = $var;\n\n return $this;\n }", "title": "" }, { "docid": "b66ce2ab2e4695ceb613be509d9bee82", "score": "0.6306413", "text": "public function limitLength($field, $length = 40);", "title": "" }, { "docid": "ba811c14ed3361dc395be1f179dbdd80", "score": "0.6222524", "text": "public function getLengthLte()\n {\n return $this->length_lte;\n }", "title": "" }, { "docid": "dc28aa740ebdf4405fbb60714da9dda7", "score": "0.6108927", "text": "function length_greater_than($str, $min) {\n return strlen(trim($str)) >= $min;\n }", "title": "" }, { "docid": "815fe6f041d18b10dcc73ead6c1d90f2", "score": "0.609432", "text": "public function setLengthEq($var)\n {\n GPBUtil::checkInt64($var);\n $this->length_eq = $var;\n\n return $this;\n }", "title": "" }, { "docid": "7ca300d2ea99938b4c78bfe22df9d914", "score": "0.60389143", "text": "function has_length($value, $options=array()) {\n $length = strlen($value);\n return $length >= $options[0] && $length <= $options[1];\n }", "title": "" }, { "docid": "824d329dc99625a70e1a28807044d1ec", "score": "0.6034968", "text": "function underMaxLength($value, $max){\n return strlen($value) <= $max;\n }", "title": "" }, { "docid": "c58d18b8588a7456aee7c9b775548e85", "score": "0.60150474", "text": "public function getLengthEq()\n {\n return $this->length_eq;\n }", "title": "" }, { "docid": "c07cbe98942b801ac2400b3aee54cfc5", "score": "0.5970792", "text": "function has_length($value, $options=array()) {\n $length = strlen($value);\n if(isset($options['max']) && ($length > $options['max'])) {\n return false;\n } elseif(isset($options['min']) && ($length < $options['min'])) {\n return false;\n } elseif(isset($options['exact']) && ($length != $options['exact'])) {\n return false;\n } else {\n return true;\n }\n }", "title": "" }, { "docid": "c07cbe98942b801ac2400b3aee54cfc5", "score": "0.5970792", "text": "function has_length($value, $options=array()) {\n $length = strlen($value);\n if(isset($options['max']) && ($length > $options['max'])) {\n return false;\n } elseif(isset($options['min']) && ($length < $options['min'])) {\n return false;\n } elseif(isset($options['exact']) && ($length != $options['exact'])) {\n return false;\n } else {\n return true;\n }\n }", "title": "" }, { "docid": "c07cbe98942b801ac2400b3aee54cfc5", "score": "0.5970792", "text": "function has_length($value, $options=array()) {\n $length = strlen($value);\n if(isset($options['max']) && ($length > $options['max'])) {\n return false;\n } elseif(isset($options['min']) && ($length < $options['min'])) {\n return false;\n } elseif(isset($options['exact']) && ($length != $options['exact'])) {\n return false;\n } else {\n return true;\n }\n }", "title": "" }, { "docid": "68ea8fc367ef60d10c1f8559d0707488", "score": "0.5903522", "text": "function has_length($value, $options=array()) {\n $min = 0;\n $max = 99999;\n\n if (isset($options['min'])) {\n $min = $options['min'];\n }\n\n if (isset($options['max'])) {\n $max = $options['max'];\n }\n\n return strlen($value) <= $max && strlen($value) >= $min ? true : false;\n }", "title": "" }, { "docid": "108a204b9bec93da3ee4811242d575ae", "score": "0.5869149", "text": "function has_length($value=\"\", $options=array()) {\n\t\t \n\t\treturn strlen($value) >= $options[0] && strlen($value) <= $options[1];\n\t \n\t}", "title": "" }, { "docid": "f6e16204746af710ff4392750b617155", "score": "0.58085287", "text": "public function getLengthNotIn()\n {\n return $this->length_not_in;\n }", "title": "" }, { "docid": "25b78d6fa7d22eb549202841a9c63a4e", "score": "0.5794151", "text": "private static function minLengthMessage($field, $length)\n {\n return \"$field field requires string longer than $length characters.\";\n }", "title": "" }, { "docid": "e90ff1507799163d16b2a10db50f4200", "score": "0.5789175", "text": "public function min(string $value, int $length): bool\n {\n return mb_strlen(trim($value)) >= $length;\n }", "title": "" }, { "docid": "ffc8618c93b4ca1998e4716fa2c81491", "score": "0.5783449", "text": "function has_valid_length($value) {\n return has_length($value, ['min' => 1, 'max' => 255]);\n }", "title": "" }, { "docid": "52951eb55284b57c07828a6dee573066", "score": "0.57715094", "text": "function length_less_than($str, $max) {\n return strlen(trim($str)) <= $max;\n }", "title": "" }, { "docid": "64a497b193ac4436f1d90f1bbec0cf0b", "score": "0.57712626", "text": "public function getMaxLength();", "title": "" }, { "docid": "64a497b193ac4436f1d90f1bbec0cf0b", "score": "0.57712626", "text": "public function getMaxLength();", "title": "" }, { "docid": "64a497b193ac4436f1d90f1bbec0cf0b", "score": "0.57712626", "text": "public function getMaxLength();", "title": "" }, { "docid": "6f68ff222936a892307ed6fcd0bfb1be", "score": "0.5770727", "text": "function msql_field_len($query, $field_offet) {}", "title": "" }, { "docid": "988ebf01067aabfd7722c3bdc1450b0c", "score": "0.5758848", "text": "function has_length($value, $options=[]) {\n\tif(isset($options['max']) && (strlen($value) > (int)$options['max'])) {\n\t\treturn false;\n\t}\n\tif(isset($options['min']) && (strlen($value) < (int)$options['min'])) {\n\t\treturn false;\n\t}\n\tif(isset($options['exact']) && (strlen($value) != (int)$options['exact'])) {\n\t\treturn false;\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "2114954a5568d8adee2a6e656dc79bb8", "score": "0.5740481", "text": "function has_length($value, $options) {\n if(isset($options['min']) && !has_length_greater_than($value, $options['min'] - 1)) {\n return false;\n } elseif(isset($options['max']) && !has_length_less_than($value, $options['max'] + 1)) {\n return false;\n } elseif(isset($options['exact']) && !has_length_exactly($value, $options['exact'])) {\n return false;\n } else {\n return true;\n }\n }", "title": "" }, { "docid": "e797ed490154687cfb43c7a356f2c074", "score": "0.573024", "text": "public function getMaxLength()\n {\n return $this->items->max('length');\n }", "title": "" }, { "docid": "c58f26f9f17645ebff723f56ccfa6f6e", "score": "0.57166106", "text": "function getMaxlength() {\n return $this->_maxlength;\n }", "title": "" }, { "docid": "b36d660ebb6a321e4c25d71508167841", "score": "0.5709796", "text": "public function max(string $value, int $length): bool\n {\n return mb_strlen(trim($value)) <= $length;\n }", "title": "" }, { "docid": "0e1ef8303485eeabfbb7625bbb3ba03d", "score": "0.5694295", "text": "public static function checkLength($value, $length, $nativeType=null) \n {\n if (static::getLength($value, $nativeType) != $length) {\n throw new RestrictionException(\n \"The restriction length with '$length' is not true\", \n RestrictionException::ERROR_CODE_LENGTH,\n $value,\n $length);\n }\n }", "title": "" }, { "docid": "4f61db58c81f975427e0e0e3397a90c6", "score": "0.5680036", "text": "function getMaxlength()\n {\n return $this->_maxlength;\n }", "title": "" }, { "docid": "09e2994d354ea23aaf202ae6200843c2", "score": "0.5655019", "text": "function maxLength($fieldVal,$Val){\n\t if (strlen($fieldVal)>$Val){\n\t\t\treturn true;\t\n\t\t} else {\n\t\t\treturn false;\n\t\t }\n\t }", "title": "" }, { "docid": "d23ab5dedc355d9f487c152fcfab1862", "score": "0.56521094", "text": "public function getMaxLength()\n {\n return $this->_maxLength;\n }", "title": "" }, { "docid": "5d3187e6396d1875888b755a0225df74", "score": "0.56489867", "text": "function has_length($value , $options =[]){\r\n if(isset($options['max']) && (strlen($value) > (int)$options['max'])){\r\n return false;\r\n }\r\n if(isset($options['min']) && (strlen($value) < (int)$options['min'])){\r\n return false;\r\n }\r\n if(isset($options['exact']) && (strlen($value) !== (int)$options['exact'])){\r\n return false;\r\n }\r\n return true;\r\n}", "title": "" }, { "docid": "1b2f5972052ee29fd7e10da3fdf6c1a1", "score": "0.561742", "text": "public function getMaxLength()\n {\n return $this->maxLength;\n }", "title": "" }, { "docid": "0d3a283e2213cdead2db66f2fb99f070", "score": "0.5616023", "text": "public function setMinLen($var)\n {\n GPBUtil::checkUint64($var);\n $this->min_len = $var;\n\n return $this;\n }", "title": "" }, { "docid": "9e2d5fea17e80a1c63c2b98c47e7892e", "score": "0.5608462", "text": "function is_less_than_255($value='') {\n $length = strlen($value);\n if ($length >= 255) {\n return \"String input has to be less than 255 character\";\n }\n return \"null\";\n }", "title": "" }, { "docid": "b3bdfc4a57f9ddb9c4905f40136d6e36", "score": "0.56074524", "text": "function msql_fieldlen($query, $field_offet) {}", "title": "" }, { "docid": "6e03a1adcdbae5536aed1738d17d00e7", "score": "0.5580279", "text": "function hasMaxLength($value, $max) {\r\n\treturn strlen($value) <= $max;\r\n}", "title": "" }, { "docid": "f8d69dc53095f354efcee46c56d81107", "score": "0.55656993", "text": "public static function new_length() {\n if( isset(Excerpt::$types[Excerpt::$length]) )\n return Excerpt::$types[Excerpt::$length];\n else\n return Excerpt::$length;\n }", "title": "" }, { "docid": "f7142ff71a872a377ef8ed32c242c5fb", "score": "0.55482167", "text": "protected function _validate_min_length($minLength = false) {\n\t\treturn (!empty($minLength) AND (mb_strlen($this->value(), \"UTF-8\") >= $minLength));\n\t}", "title": "" }, { "docid": "72048c7a350c1552f86d7dad31d3f36c", "score": "0.55444014", "text": "protected function _validate_max_length($maxLength = false) {\n\t\treturn (!empty($maxLength) AND (mb_strlen($this->value(), \"UTF-8\") <= $maxLength));\n\t}", "title": "" }, { "docid": "194ad6a9458a7ccefdc2bf1e6d300ef1", "score": "0.55386376", "text": "private function checkMaxLength($value, $length)\n {\n return (mb_strlen($value) <= $length);\n }", "title": "" }, { "docid": "8ed3ba3e29c323a3724d980537665f2c", "score": "0.55380964", "text": "public function getMinLen()\n {\n return isset($this->min_len) ? $this->min_len : 0;\n }", "title": "" }, { "docid": "a32a6a64a549147ba2b3e35622bbf7da", "score": "0.55320704", "text": "public function getMaxLength()\r\n\t{\r\n\t\treturn $this->maxLength;\r\n\t}", "title": "" }, { "docid": "625e692c887e0dfa030e164e50f11933", "score": "0.5530885", "text": "public function valueMinLength($valueMinLength)\n {\n return $this->setProperty('valueMinLength', $valueMinLength);\n }", "title": "" }, { "docid": "496356f674bafd0e8283d7dc76ec5df8", "score": "0.5528558", "text": "private function checkMinLength($value, $length)\n {\n return (mb_strlen($value) >= $length);\n }", "title": "" }, { "docid": "582d06fcc8ba5fe0cd9964f947dc5ff9", "score": "0.5500428", "text": "function osc_validate_range ($value, $min = 6, $max = 255) {\n if ( mb_strlen($value, 'utf8')>=$min && mb_strlen($value, 'utf8')<=$max ) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "dfdc40c487ba88881dda049b04675fc0", "score": "0.54918087", "text": "function minLength($fieldVal,$Val){\n\t if (strlen($fieldVal)<$Val){\n\t\t\treturn true;\t\n\t\t} else {\n\t\t\treturn false;\n\t\t }\n\t }", "title": "" }, { "docid": "fd2062d7f623000e42af042bf8b8124e", "score": "0.5485625", "text": "private function hasValidLength(): bool\n {\n return (strlen($this->getValue()) >= $this->minLength && strlen($this->getValue()) <= $this->maxLength);\n }", "title": "" }, { "docid": "e558c3b2ae80747432c792ac8edc6d84", "score": "0.5457106", "text": "public function isMinimumLength(){\r\n\r\n\t\t// TODO - translate from JS\r\n\t}", "title": "" }, { "docid": "58d800c19bcb22fe1e73b09d1b877f55", "score": "0.54503655", "text": "public function testCanBeUsedToImplementTheLengthExample() : void\n {\n $createLimitedLengthType = function ($type, $maxLength) {\n return new class ($type, $maxLength) extends CustomScalarType\n {\n public function __construct(ScalarType $type, int $maxLength)\n {\n parent::__construct([\n 'name' => 'LengthAtMost' . $maxLength,\n 'serialize' => static function ($value) use ($type, $maxLength) {\n $value = $type->serialize($value);\n TestCase::assertTrue(is_string($value));\n\n if (strlen($value) > $maxLength) {\n return reject(\n new Error(sprintf('expected %s to be at most %s', strlen($value), $maxLength))\n );\n }\n\n return resolve($value);\n },\n 'parseValue' => static function ($value) use ($type) {\n return $type->parseValue($value);\n },\n 'parseLiteral' => static function ($ast) use ($type) {\n return $type->parseLiteral($ast);\n },\n ]);\n }\n };\n };\n\n $schema = GraphQLTools::makeExecutableSchema([\n 'typeDefs' => '\n directive @length(max: Int) on FIELD_DEFINITION | INPUT_FIELD_DEFINITION\n type Query {\n books: [Book]\n }\n type Book {\n title: String @length(max: 10)\n }\n type Mutation {\n createBook(book: BookInput): Book\n }\n input BookInput {\n title: String! @length(max: 10)\n }\n ',\n 'schemaDirectives' => [\n 'length' => new class ($createLimitedLengthType) extends SchemaDirectiveVisitor\n {\n /** @var callable */\n private $createLimitedLengthType;\n\n public function __construct(callable $createLimitedLengthType)\n {\n $this->createLimitedLengthType = $createLimitedLengthType;\n }\n\n /**\n * @param mixed[] $details\n */\n public function visitInputFieldDefinition(InputObjectField $field, array $details) : void\n {\n $this->wrapType($field);\n }\n\n /**\n * @param mixed[] $details\n */\n public function visitFieldDefinition(FieldDefinition $field, array $details) : void\n {\n $this->wrapType($field);\n }\n\n /**\n * @param FieldDefinition|InputObjectField $field\n */\n private function wrapType($field) : void\n {\n $createLimitedLengthType = $this->createLimitedLengthType;\n if ($field->getType() instanceof NonNull\n && $field->getType()->getWrappedType() instanceof ScalarType) {\n Utils::forceSet(\n $field,\n 'type',\n new NonNull(\n $createLimitedLengthType($field->getType()->getWrappedType(), $this->args['max'])\n )\n );\n } else {\n if (! ($field->getType() instanceof ScalarType)) {\n throw new Error('Not a scalar type: ' . get_class($field->getType()));\n }\n\n Utils::forceSet(\n $field,\n 'type',\n $createLimitedLengthType($field->getType(), $this->args['max'])\n );\n }\n }\n },\n ],\n 'resolvers' => [\n 'Query' => [\n 'books' => static function () {\n return [\n ['title' => 'abcdefghijklmnopqrstuvwxyz'],\n ];\n },\n ],\n 'Mutation' => [\n 'createBook' => static function ($parent, $args) {\n return $args['book'];\n },\n ],\n ],\n ]);\n\n GraphQL::promiseToExecute(\n new ReactPromiseAdapter(),\n $schema,\n '\n query {\n books {\n title\n }\n }\n '\n )->then(static function ($result) use ($schema) {\n $errors = $result->errors;\n\n static::assertCount(1, $errors);\n static::assertEquals('expected 26 to be at most 10', $errors[0]->getMessage());\n\n return GraphQL::promiseToExecute(\n new ReactPromiseAdapter(),\n $schema,\n '\n mutation {\n createBook(book: { title: \"safe title\" }) {\n title\n }\n }\n '\n );\n })->then(static function ($result) : void {\n static::assertEmpty($result->errors);\n static::assertEquals(\n [\n 'createBook' => ['title' => 'safe title'],\n ],\n $result->data\n );\n });\n }", "title": "" }, { "docid": "fcfa4e06e5e266cd7070e7a7c539224b", "score": "0.54444414", "text": "public function getMaxLengthValidator()\n {\n return $this->maxLength;\n }", "title": "" }, { "docid": "31ffcadbab74a394fc5659c589de1d51", "score": "0.540802", "text": "public function minLength(string $key, int $min);", "title": "" }, { "docid": "351c537ea421c4f463420ea30023a5c3", "score": "0.53967667", "text": "public function testMaxLengthValidationSuccess()\n {\n $textField = new TextField('TestField');\n $textField->setMaxLength(5);\n $textField->setValue(\"John\"); // 4 characters, so should pass\n $result = $textField->validate(new RequiredFields());\n $this->assertTrue($result);\n }", "title": "" }, { "docid": "aa3621989c1de199eda987a1b87cbadc", "score": "0.5388066", "text": "protected function getMaxlength() : int {\r\n return $this->maxlength;\r\n }", "title": "" }, { "docid": "744798c436a5588a69387f6d15716c0e", "score": "0.53758097", "text": "public function getFieldLength();", "title": "" }, { "docid": "5c0d29a4d14926f55cab4c90f364fbca", "score": "0.5358555", "text": "protected function getMinlength() : int {\r\n return (int) $this->minlength;\r\n }", "title": "" }, { "docid": "0b30ad4e95fef154448b2d55f7f1f4e7", "score": "0.53559256", "text": "public function valueMaxLength($valueMaxLength)\n {\n return $this->setProperty('valueMaxLength', $valueMaxLength);\n }", "title": "" }, { "docid": "6b47336ad99777012906cfd7f8b1cea3", "score": "0.53476816", "text": "function osc_validate_min ($value = null, $min = 6) {\n if ( mb_strlen($value, 'utf8') < $min ) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "a295880d5dfb6be5967cf867bf52ba78", "score": "0.5346679", "text": "protected function setLength($_length=4)\n {\n return $this->_length=(is_int($_length) && $_length>0)?$_length:4;\n }", "title": "" }, { "docid": "f4b7a748b6799fbe14e2891aa79db19f", "score": "0.53400034", "text": "private function validateLengthMin()\n {\n if (strlen($this->configuration->checkString()) >= $this->configuration->rules()->get(Plexity::RULE_LENGTH_MIN)) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "5bfc5f1d99a3d32b9de5fc7323e2b12d", "score": "0.53257513", "text": "function is_longer_than($string, $max_length) {\n\t\treturn strlen($string) > $max_length;\n\t}", "title": "" }, { "docid": "9c4e4f9967183aafc6fd2ad21e200d52", "score": "0.5325553", "text": "function limit_length(&$item, $key)\n{\n\t// return only a part of the string if it is longer\n\t$item = substr($item, 0, 253);\n}", "title": "" }, { "docid": "6dba0ab53d0187e71dd558b76be6ac27", "score": "0.53239566", "text": "public function lengthIsMaximum($name, $value, $maxLength, $required = true){\n $field = $this->fields->getField($name);\n\n // If not required and empty, clear errors\n if (!$required && empty($value)) {\n $field->clearErrorMessage();\n return;\n }\n\n if($required && empty($value)){\n $field->setErrorMessage('Required');\n return;\n } else if(strlen(trim($value)) > $maxLength){\n if($field->message == ''){\n $field->message = \"The value should be equal or shorter than $maxLength characters\";\n }\n $field->setErrorMessage($field->message);\n }\n }", "title": "" }, { "docid": "979fceef20930691e7abcdc66ea6d669", "score": "0.531758", "text": "private function validateLength($column, $key, $value)\n {\n if ($column['type'] == 'timestamp' || $column['type'] == 'integer' || \n $column['type'] == 'enum') {\n return true;\n } else if ($column['type'] == 'array' || $column['type'] == 'object') {\n $length = strlen(serialize($value));\n } else {\n $length = strlen($value);\n }\n\n if ($length > $column['length']) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "fde501203d21e48af6491e5b24c7dc1b", "score": "0.53130555", "text": "public static function validateMinLength(TextBase $control, $length)\r\n\t{\r\n\t\treturn count($control->getValue()) >= $length;\r\n\t}", "title": "" }, { "docid": "f74e1302cae01a88b47f04cf2378ebe8", "score": "0.530764", "text": "public function maxLength($length){\n $this->set('maxLength', $length);\n \n return $this;\n }", "title": "" }, { "docid": "6c9ed1d34cf739ffc8d9f2085b912f3a", "score": "0.5305038", "text": "public function length() {\n return strlen($this->value);\n }", "title": "" }, { "docid": "61989a69f418988fa3f01dfb9e8a5935", "score": "0.53017944", "text": "public static function checkMaxLength($value, $maxLength, $nativeType=null) \n {\n if (static::getLength($value, $nativeType) > $maxLength) {\n throw new RestrictionException(\n \"The restriction max length with '$maxLength' is not true\", \n RestrictionException::ERROR_CODE_MAX_LENGTH,\n $value,\n $maxLength);\n }\n }", "title": "" }, { "docid": "a93a7d7850628fe4090fd9f0594336d9", "score": "0.52920467", "text": "public static function validateMaxLength(TextBase $control, $length)\r\n\t{\r\n\t\treturn count($control->getValue()) <= $length;\r\n\t}", "title": "" }, { "docid": "ec6497d228260dd88a3638e3fdb34356", "score": "0.52869904", "text": "public function set_max_length($custom_max);", "title": "" }, { "docid": "28e8dcbcd681deb48309298158ea4714", "score": "0.5278054", "text": "function has_length($value, $options) {\n // * validate string length\n // * combines functions_greater_than, _less_than, _exactly\n // * spaces count towards length\n // * use trim() if spaces should not count\n if (isset($options['min']) && !has_length_greater_than($value, $options['min'] - 1)) {\n return false;\n } elseif (isset($options['max']) && !has_length_less_than($value, $options['max'] + 1)) {\n return false;\n } elseif (isset($options['exact']) && !has_length_exactly($value, $options['exact'])) {\n return false;\n } else {\n return true;\n }\n}", "title": "" }, { "docid": "6227835a90d075f72d636a9885dca008", "score": "0.5272155", "text": "public function isLessThanMaxLength($str) {\n return mb_strlen($str, $this->getEncoding()) <= $this->getMaxLength();\n }", "title": "" }, { "docid": "b8ee929344da45812aaee90297e06323", "score": "0.5263426", "text": "public function longest_field_length($idless=false) {\n $len = 0;\n foreach ($this->fields as $field) {\n if ($len < strlen($idless ? $field->name_idless : $field->name)) {\n $len = strlen($idless ? $field->name_idless : $field->name);\n }\n }\n return $len;\n }", "title": "" }, { "docid": "cbd55347410ddccc79aa716e687e5fb8", "score": "0.5259522", "text": "public function length( $length ) {\n\t\t$this->excerpt_length = $length;\n\t}", "title": "" }, { "docid": "c98eec187b4688ef8d7f3923d202ce89", "score": "0.5252245", "text": "public abstract function setLength($value);", "title": "" }, { "docid": "21a3ab5399bc34716cae484c98dc5f79", "score": "0.5251797", "text": "public function getLength()\n {\n return strlen($this->value);\n\n }", "title": "" }, { "docid": "d4a6bbaeea7fc6abfe71e7e960d77aad", "score": "0.52516943", "text": "public function lengthCheck($field, $data)\n {\n $inputKey = (array_keys($field))[0];\n if (isset($data[$inputKey])) {\n return (strlen($data[$inputKey]) >= $field[$inputKey]['min']);\n }\n return true;\n }", "title": "" }, { "docid": "3a447f742786eb3149e751ddd3f2f0e5", "score": "0.52516294", "text": "public function assertFieldLength($field, $length) {\n $f = field_info_field($field);\n $actual_length = $f['columns']['format']['length'];\n if ($length != $actual_length) {\n throw new \\Exception(sprintf(\"The field '%s' did not have a length of %d.\\nInstead, it was:\\n\\n%d\", $field, $length, $actual_length));\n }\n }", "title": "" }, { "docid": "3bd79f6faf14c5269380a0d9bcb0f598", "score": "0.5251559", "text": "public function getIntGt()\n {\n return $this->int_gt;\n }", "title": "" }, { "docid": "c2f78c75eaa6ced15e516d00edd732c0", "score": "0.52492565", "text": "public static function excerpt_length($length = 8): int\n {\n\t\treturn $length;\n\t}", "title": "" }, { "docid": "ce1b5cc1c3118479b819e6397cca05e6", "score": "0.52453727", "text": "function osc_validate_max ($value = null, $max = 255) {\n if ( mb_strlen($value, 'utf8') > $max ) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "98ad84bb1409cf2f90248abf77d46f14", "score": "0.52394706", "text": "public function setLengthNotIn($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::INT64);\n $this->length_not_in = $arr;\n\n return $this;\n }", "title": "" }, { "docid": "f6b7a671f9b5932561105b5f667c7352", "score": "0.5234374", "text": "public static function length($value)\n {\n return mb_strlen($value);\n }", "title": "" }, { "docid": "f4ea715287ae120f9cfd7d859f26e2a9", "score": "0.52273023", "text": "public function lengthIsInRange($name, $value, $minLength, $maxLength, $required = true){\n $field = $this->fields->getField($name);\n\n // If not required and empty, clear errors\n if (!$required && empty($value)) {\n $field->clearErrorMessage();\n return;\n }\n\n if($required && empty($value)){\n $field->setErrorMessage('Required');\n return;\n } else if(strlen(trim($value)) < $minLength || strlen(trim($value)) > $maxLength){\n if($field->message == ''){\n $field->message = \"The value's length should be between $minLength and $maxLength characters\";\n }\n $field->setErrorMessage($field->message);\n }\n }", "title": "" }, { "docid": "ad8e770678be90405f19ad27a3bfb66d", "score": "0.52169055", "text": "public function excerpt_length( $length ) {\n\n\t\tif ( null !== $this->excerpt_length ) {\n\t\t\t$length = $this->excerpt_length;\n\t\t}\n\n\t\treturn $length;\n\t}", "title": "" }, { "docid": "1c9c2c730a0ce425f8f66f8cc7b4803b", "score": "0.52130157", "text": "public function minLength($length){\n $this->set('minLength', $length);\n \n return $this;\n }", "title": "" }, { "docid": "2e30f4dc227034fc2b6baf432896cb00", "score": "0.52095073", "text": "function zen_field_length($tbl, $fld) {\r\n global $db;\r\n $rs = $db->MetaColumns($tbl);\r\n $length = $rs[strtoupper($fld)]->max_length;\r\n return $length;\r\n}", "title": "" }, { "docid": "c65bc6a4495a6b24cf464d0240056a46", "score": "0.5204233", "text": "public function getMaxLen()\n {\n return isset($this->max_len) ? $this->max_len : 0;\n }", "title": "" }, { "docid": "fd94bb6f6180387f7130efebe2f9335c", "score": "0.51985264", "text": "public function length($length)\n\t{\n\t\t$this->length = $length;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "c8c9d8d7d9aaee15f336bb89da80bbae", "score": "0.519788", "text": "public function validateLength($value, array $field)\n {\n return true;\n }", "title": "" }, { "docid": "d1f8123491b7eede970b6f646d58984e", "score": "0.51963097", "text": "function validate_max_100($field_input, array &$field): bool\n{\n if ($field_input > 100) {\n $field['error'] = 'Įveskite skaičių mažesnį nei 100 !';\n\n return false;\n }\n\n return true;\n}", "title": "" } ]