本文整理汇总了PHP中PSU::cleanKeys方法的典型用法代码示例。如果您正苦于以下问题:PHP PSU::cleanKeys方法的具体用法?PHP PSU::cleanKeys怎么用?PHP PSU::cleanKeys使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PSU
的用法示例。
在下文中一共展示了PSU::cleanKeys方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
*
*/
public function __construct($row = null)
{
if ($row) {
$row = \PSU::cleanKeys('sortest_', '', $row);
}
parent::__construct($row);
}
示例2: load
public static function load()
{
$data = array();
$sql = "SELECT * FROM tbbctrl";
$data = \PSU::db('banner')->GetRow($sql);
$data = \PSU::cleanKeys('tbbctrl_', '', $data);
return $data;
}
示例3: __construct
/**
* constructor
*
* @param $row array Array of row elements
*/
public function __construct($row = null)
{
if ($row) {
// get rid of table name from field names
$row = \PSU::cleanKeys('tbrdepo_', '', $row);
}
//end if
parent::__construct($row);
}
示例4: __construct
/**
* constructor
*
* @param $row array Array of row elements
*/
public function __construct($row = null)
{
if ($row) {
// get rid of table name from field names
$row = \PSU::cleanKeys('tbraccd_', '', $row);
}
//end if
parent::__construct($row);
$this->type_ind = $this->type_ind();
$this->detail_desc = $this->detail_desc();
}
示例5: load
public static function load($term_code = null)
{
$data = array();
if (!$term_code) {
$term_code = \PSU\Student::currentTermCode();
}
//end if
$sql = "SELECT * FROM tbbterm WHERE tbbterm_term_code = :term_code";
$data = \PSU::db('banner')->GetRow($sql, array('term_code' => $term_code));
$data = \PSU::cleanKeys('tbbterm_', '', $data);
return $data;
}
示例6: __construct
/**
* constructor
*
* @param $row array Array of row elements
*/
public function __construct($row = null)
{
if ($row) {
// get rid of table name from field names
$row = \PSU::cleanKeys('gxrdird_', '', $row);
}
//end if
parent::__construct($row);
if (!isset($this->activity_date)) {
$this->activity_date = date('Y-m-d H:i:s');
}
//end if
}
示例7: load
public function load()
{
if ($this->aid_years) {
return;
}
//end if
if ($rows = $this->get_aid_years()) {
foreach ($rows as $row) {
$row = PSU::cleanKeys('robinst_', '', $row);
$aid_year = new PSU_Student_Finaid_AidYear($row);
$this->aid_years[$aid_year->aidy_code] = $aid_year;
}
//end foreach
}
//end if
}
示例8: srSaluteParent
/**
* BannerExitLoans
*
* srSaluteParent gets the student's Parent loan information.
*
* @since version 1.0.0
* @return array
*/
public static function srSaluteParent($id)
{
$data = array();
$query = "SELECT aid_year_key, \n\t\t\t\t\t\t\t\t\t\tstudent_id, \n\t\t\t\t\t\t\t\t\t\tsum(nvl(award_accept_amount,0)) amount_borrowed, \n\t\t\t\t\t\t\t\t\t\tsum(nvl(award_paid_amount,0)) amount_paid, \n\t\t\t\t\t\t\t\t\t\tpidm_key,\n\t\t\t\t\t\t\t\t\t\t'Ten Years' as term\n\t\t\t\t\t\t\tFROM\tbaninst1.ar_award_detail_by_year\n\t\t\t\t\t\t WHERE\tfederal_fund_id = 'PLUS'\n\t\t\t\t\t\t\t AND\tstudent_id=:id\n\t\t\t\t\tGROUP BY\taid_year_key, \n\t\t\t\t\t\t\t\t\t\tstudent_id, \n\t\t\t\t\t\t\t\t\t\tpidm_key\n\t\t\t\t\t\tHAVING\t(sum(award_paid_amount) > 0)\n\t\t\t\t\tORDER BY\taid_year_key desc";
$results = PSU::db('banner')->Execute($query, compact('id'));
if ($results) {
while ($row = $results->FetchRow()) {
$data[] = PSU::cleanKeys('', '', $row);
}
// end while
}
// end if
return $data;
}
示例9: _load_holds
/**
* lazy loads holds
*/
function _load_holds()
{
$this->holds = array();
$args = array('pidm' => $this->pidm);
$sql = "BEGIN :cursorvar := gb_hold.f_query_all(p_pidm => :pidm); END;";
if ($results = \PSU::db('banner')->ExecuteCursor($sql, 'cursorvar', $args)) {
while ($row = $results->FetchRow()) {
$row = \PSU::cleanKeys('sprhold_', '', $row);
unset($row['rowid'], $row['pidm']);
$row['from_date'] = strtotime($row['from_date']);
$row['to_date'] = strtotime($row['to_date']);
$this->data['holds'][] = $row;
}
//end while
}
//end if
}
示例10: _load_courses
/**
* loads section data based on the selection criteria specified in the PSUCourse instantiation
*/
public function _load_courses()
{
$this->data['courses'] = array();
$sql = "SELECT ssbsect.* \n\t\t\t\t\t\t\tFROM ssbsect,\n stvterm \n\t\t\t\t\t\t WHERE ssbsect_subj_code = :subj_code \n\t\t\t\t\t\t\t AND ssbsect_crse_numb = :crse_numb\n AND ssbsect_term_code = stvterm_code\n\t\t\t\t\t\t\t AND stvterm_start_date >= :start_date\n ORDER BY stvterm_code";
$args = array('subj_code' => $this->subj_code, 'crse_numb' => $this->crse_numb, 'start_date' => $this->since ? date('Y-m-d', $this->since) : date('Y-m-d', strtotime('-3 years')));
if ($this->crn) {
$sql .= " AND ssbsect_crn IN (" . implode(',', (array) $this->crn) . ")";
}
//end if
if ($this->term) {
$sql .= " AND ssbsect_term_code IN ('" . implode("','", (array) $this->term) . "')";
}
//end if
if ($this->term_low) {
$sql .= " AND ssbsect_term_code >= :term_low";
$args['term_low'] = $this->term_low;
}
//end if
if ($this->term_high) {
$sql .= " AND ssbsect_term_code <= :term_high";
$args['term_high'] = $this->term_high;
}
//end if
if ($this->until) {
$sql .= " AND stvterm_end_date <= :until";
$args['until'] = date('Y-m-d', $this->until);
}
//end if
if ($results = \PSU::db('banner')->Execute($sql, $args)) {
foreach ($results as $row) {
$row = \PSU::cleanKeys('ssbsect_', '', $row);
$this->data['courses'][$row['term_code']][$row['crn']] = new Course\Section($row['crn'], $row['term_code'], $row);
}
//end foreach
}
//end if
}
示例11: __construct
public function __construct($data = null)
{
$data = \PSU::cleanKeys('sprtele_', '', $data);
parent::__construct($data);
}
示例12: _load_courses_instructor
/**
* load all courses the instructor has been enrolled it
*/
protected function _load_courses_instructor()
{
$this->person->courses_instructor = array();
$sql = "SELECT ssbsect.*\n\t\t FROM sirasgn,ssbsect,stvterm\n\t\t WHERE sirasgn_pidm = :pidm\n\t\t AND sirasgn_term_code = ssbsect_term_code\n\t\t AND sirasgn_crn = ssbsect_crn\n\t\t AND ssbsect_term_code = stvterm_code\n\t\t AND stvterm_start_date >= :start_date\n\t\t ORDER BY ssbsect_term_code";
$args = array('pidm' => $this->person->pidm, 'start_date' => $this->person->data['ranges']['since'] ? date('Y-m-d', $this->person->data['ranges']['since']) : date('Y-m-d', strtotime('-1 years')));
if ($results = PSU::db('banner')->Execute($sql, $args)) {
foreach ($results as $row) {
$row = PSU::cleanKeys('ssbsect_', '', $row);
$this->person->data['courses_instructor'][$row['term_code']][$row['crn']] = new \PSU\Course\Section($row['crn'], $row['term_code'], $row);
}
//end foreach
}
//end if
}
示例13: _load_notes
/**
* lazy loads student notes and comments
*/
protected function _load_notes()
{
$this->notes = array();
$query = "SELECT *\n\t FROM sgrscmt\n\t WHERE sgrscmt_pidm=:pidm\n\t ORDER BY sgrscmt_activity_date DESC";
if ($results = \PSU::db('banner')->Execute($query, array('pidm' => $this->pidm))) {
foreach ($results as $row) {
$row = \PSU::cleanKeys('sgrscmt_', '', $row);
$this->data['notes'][] = $row;
}
//end while
}
//end if
}
示例14: _load_schedule
/**
* load the meeting time information for the course
*/
public function _load_schedule()
{
$this->data['schedule'] = array();
$sql = "SELECT ssrmeet_begin_time,\n\t\t\t\t\t\t\t\t\t ssrmeet_end_time,\n\t\t\t\t\t\t\t\t\t ssrmeet_bldg_code building_code,\n\t\t\t\t\t\t\t\t\t stvbldg_desc building,\n\t\t\t\t\t\t\t\t\t ssrmeet_room_code room_number,\n\t\t\t\t\t\t\t\t\t ssrmeet_start_date,\n\t\t\t\t\t\t\t\t\t ssrmeet_end_date,\n\t\t\t\t\t\t\t\t\t ssrmeet_catagory ssrmeet_category,\n\t\t\t\t\t\t\t\t\t ssrmeet_sun_day sunday,\n\t\t\t\t\t\t\t\t\t ssrmeet_mon_day monday,\n\t\t\t\t\t\t\t\t\t ssrmeet_tue_day tuesday,\n\t\t\t\t\t\t\t\t\t ssrmeet_wed_day wednesday,\n\t\t\t\t\t\t\t\t\t ssrmeet_thu_day thursday,\n\t\t\t\t\t\t\t\t\t ssrmeet_fri_day friday,\n\t\t\t\t\t\t\t\t\t ssrmeet_sat_day saturday,\n\t\t\t\t\t\t\t\t\t ssrmeet_schd_code schedule_type_code,\n\t\t\t\t\t\t\t\t\t stvschd_desc schedule_type,\n\t\t\t\t\t\t\t\t\t ssrmeet_credit_hr_sess session_credit_hours,\n\t\t\t\t\t\t\t\t\t ssrmeet_meet_no num_meeting_times,\n\t\t\t\t\t\t\t\t\t ssrmeet_hrs_week hours_per_week\n\t\t\t\t\t\t\tFROM ssrmeet,\n stvbldg,\n stvschd\n\t\t\t\t\t WHERE ssrmeet_crn = :crn \n\t\t\t\t\t\t\t AND ssrmeet_term_code = :term_code\n AND stvbldg_code = ssrmeet_bldg_code\n\t\t\t\t\t\t\t AND stvschd_code = ssrmeet_schd_code\n ORDER BY ssrmeet_start_date, ssrmeet_end_date, ssrmeet_begin_time";
$args = array('crn' => $this->crn, 'term_code' => $this->term_code);
if ($results = \PSU::db('banner')->Execute($sql, $args)) {
foreach ($results as $row) {
$row = \PSU::cleanKeys('ssrmeet_', '', $row);
$row['begin_time'] = preg_replace('/([0-9]{2})([0-9]{2})/', '\\1:\\2', $row['begin_time']);
$row['end_time'] = preg_replace('/([0-9]{2})([0-9]{2})/', '\\1:\\2', $row['end_time']);
$row['start_date'] = strtotime($row['start_date']);
$row['end_date'] = strtotime($row['end_date']);
$row['days'] = $row['sunday'] . $row['monday'] . $row['tuesday'] . $row['wednesday'] . $row['thursday'] . $row['friday'] . $row['saturday'];
$this->data['schedule'][] = $row;
}
//end foreach
}
//end if
$this->meeting_times = $this->meeting_locations = $this->schedule;
}
示例15: _load_term_controls
/**
* loads Accounts Receivable Term Controls
*/
public function _load_term_controls()
{
$this->data['term_controls'] = array();
$sql = "SELECT * FROM tbbterm WHERE tbbterm_term_code = :term_code";
$this->data['term_controls'] = \PSU::db('banner')->GetRow($sql, array('term_code' => $this->term_code));
$this->data['term_controls'] = \PSU::cleanKeys('tbbterm_', '', $this->data['term_controls']);
}