本文整理汇总了PHP中PSU::params方法的典型用法代码示例。如果您正苦于以下问题:PHP PSU::params方法的具体用法?PHP PSU::params怎么用?PHP PSU::params使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PSU
的用法示例。
在下文中一共展示了PSU::params方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($args = array())
{
$args = PSU::params($args);
$args['type'] = 'radio';
parent::__construct($args);
$this->selected = array();
}
示例2: handleParams
public function handleParams($property, $key = null, $value = null, $defaults = array())
{
if ($defaults) {
$this->handleParams($property, $defaults);
}
//end if
if (is_object($key) && $key instanceof PSUGraphObject) {
$this->{$property}[$key->id] = $key;
} elseif (is_array($key) || strpos($key, '=') !== false) {
$values = PSU::params($key, $defaults);
foreach ($values as $k => $v) {
if ($property == 'options') {
$this->{$property}[$k] = new PSUGraphOption($k, $v);
} else {
$this->{$property}[$k] = $v;
}
//end else
}
//end foreach
return true;
} elseif ($key && $value) {
$this->{$property}[$key] = $value instanceof PSUGraphOption ? $value : new PSUGraphOption($k, $v);
return true;
} elseif ($key) {
return $this->{$property}[$key];
} else {
return $this->{$property};
}
//end else
}
示例3: actions
/**
* get all card access actions
* @param $args \b can include filter, start_date, end_date, id
* @return array
*/
public static function actions($args = '')
{
$args = PSU::params($args);
$where = '';
if ($args['start_date']) {
$where .= " AND x_timestamp >= ?";
$bind['start_date'] = PSU::db('pegasys')->BindTimeStamp(CardAccess::timeStamp($args['start_date']));
}
// end if
if ($args['end_date']) {
$where .= " AND x_timestamp <= ?";
$bind['end_date'] = PSU::db('pegasys')->BindTimeStamp(CardAccess::timeStamp($args['end_date'], false));
}
// end if
if ($args['filter']) {
$where .= " AND x_term_name LIKE '%'+?+'%'";
$bind['filter'] = $args['filter'];
}
// end if
if ($args['id']) {
$args['id'] = (int) $args['id'];
$where .= " AND x_badge_number={$args['id']}";
}
// end if
$sql = "SELECT x_timestamp, x_badge_number, x_fname, x_lname, x_hist_type, x_item_name, x_term_name FROM xaction WHERE 1=1 {$where} ORDER BY x_timestamp DESC";
return PSU::db('pegasys')->GetAll($sql, $bind);
}
示例4: search_tickets
/**
* Filter the ticket list.
*
* Valid $args:
*
* @li $q \b string match text in call history
* @li $group \b int the assigned group
*/
public static function search_tickets($args)
{
$args = PSU::params($args);
extract($args);
$where = array();
$sql_args = array();
if ($q) {
$where[] = 'MATCH (comments) AGAINST (?)';
$sql_args[] = $q;
}
if ($group) {
$where[] = 'its_assigned_group = ?';
$sql_args[] = $group;
}
if ($call_status) {
$where[] = 'call_status = ?';
$sql_args[] = $call_status;
}
if ($current) {
$where[] = 'current = ?';
$sql_args[] = $current;
}
$where_sql = implode(' AND ', $where);
$sql = "\n\t\t\tSELECT *\n\t\t\tFROM call_history\n\t\t\tWHERE\n\t\t\t\t{$where_sql}\n\t\t\tORDER BY\n\t\t\t\tdate_assigned DESC,\n\t\t\t\ttime_assigned DESC\n\t\t";
return PSU::db('calllog')->GetAll($sql, $sql_args);
}
示例5: query
public function query($args = array())
{
$args = \PSU::params($args, $defaults);
$sql = "\n\t\t\tSELECT DISTINCT pidm\n\t\t\t FROM v_account\n\t\t";
$results = \PSU::db('banner')->GetCol($sql, $args);
return $results;
}
示例6: get_collection
/**
* instantiates a group of PSURotation objects and returns them
*/
public static function get_collection($dir, $params = array())
{
$params = PSU::params($params, self::$defaults);
if ($params['type'] == 'image') {
$files = PSUFiles::getImageArray($dir, 0, $params['depth']);
} else {
$files = PSUFiles::getImageArray($dir, 0, $params['depth'], array('txt', 'html'));
}
//end if
foreach ((array) $files as $key => $file) {
if (strpos($file, '/thumbs/') !== false) {
unset($files[$key]);
}
//end if
}
//end foreach
sort($files);
$num_files = count($files);
$collection = array();
$collection_count = 0;
while ($collection_count < $num_files && $collection_count < 4) {
$random_index = rand(0, count($files) - 1);
$params['set'] = $files[$random_index];
$collection[] = new self($dir, $params);
unset($files[$random_index]);
sort($files);
$collection_count = count($collection);
}
//end while
return $collection;
}
示例7: __construct
/**
* constructor
*
* @param $person \b PSUPerson object
* @param $level_or_data \b This can be 1 of two things:
* - if a string, it is the Level code of student data (e.g. ug, gr, etc)
* - if an array, it is an array of sgbstdn data
* @param $term_code \b Effective term code
*/
public function __construct($student, $level_or_data, $max_term_code = null, $term_code_eff = null)
{
parent::__construct();
$data_loaders = array();
$this->data_loaders = \PSU::params($data_loaders, $this->data_loaders);
// make sure this object can access its associated PSU_Student
if ($student instanceof \PSU\Student) {
$this->student = $student;
} else {
$this->student = $person->student;
}
//end if
// store the pidm globally to shorten the bind variables in queries :)
$this->pidm = $this->student->person->pidm;
if (is_array($level_or_data)) {
$this->parse($level_or_data);
$this->term_code = $max_term_code ? $max_term_code : \PSU\Student::getCurrentTerm($this->level_code);
} else {
$this->level_code = $level_or_data;
$this->term_code = $max_term_code ? $max_term_code : \PSU\Student::getCurrentTerm($this->level_code);
$this->term_code_eff = $term_code_eff;
$this->load();
}
//end else
}
示例8: query
public function query($args = array())
{
$defaults = array('full_part' => $this->full_part, 'residential_code' => $this->residential_code, 'rate_code' => $this->rate_code);
$args = \PSU::params($args, $defaults);
$sql = "\n\t\t\tSELECT pidm\n\t\t\t FROM v_prebilling_candidates\n\t\t\t WHERE full_part_ind = :full_part\n\t\t\t\t AND resd_code = :residential_code\n\t\t\t\t AND rate_code = :rate_code\n\t\t";
$results = \PSU::db('banner')->GetCol($sql, $args);
return $results;
}
示例9: query
public function query($args = array())
{
$defaults = array('type_id' => $this->type, 'attribute' => $this->attribute);
$args = \PSU::params($args, $defaults);
$sql = "\n\t\t\tSELECT distinct wp_id\n\t\t\t FROM (\n\t\t\t\t\t\tSELECT wp_id\n\t\t\t\t\t\t\tFROM v_idm_attributes\n\t\t\t\t\t\t WHERE attribute = :attribute\n\t\t\t\t\t\t\t AND type_id = :type_id\n\t\t\t\t\t\t ORDER BY lower(last_name), \n\t\t\t\t\t\t\t\t\t lower(first_name), \n\t\t\t\t\t\t\t\t\t lower(middle_name)\n\t\t\t\t\t\t\t)\n\t\t";
$results = \PSU::db('banner')->GetCol($sql, $args);
return $results;
}
示例10: query
public function query($args = array())
{
$defaults = array('identifier' => 'sourced_id');
$args = PSU::params($args, $defaults);
$sql = "\n\t\t\tSELECT DISTINCT idnt." . $args['identifier'] . " \n\t\t\tFROM psu_identity.person_identifiers idnt,\n\t\t\t\t psu.v_hr_psu_employee_active act \n\t\t\tWHERE idnt.pid = act.pidm\n\t\t";
$matches = PSU::db('banner')->GetCol($sql);
return $matches;
}
示例11: __construct
public function __construct($args = array())
{
$args = PSU::params($args);
$this->fileid = 0;
$this->adodb_type = 'N';
parent::__construct($args);
$this->type->value = 'file';
}
示例12: __construct
public function __construct($id, $procedure, $in = array(), $out = array(), $date_fields = array())
{
$this->id = $id;
$this->procedure = $procedure;
$this->in = PSU::params($in);
$this->out = $out;
$this->date_fields = PSU::params($date_fields);
return $this;
}
示例13: __construct
/**
*
*/
public function __construct($args = array())
{
$args = PSU::params($args);
$args['type'] = 'submit';
// text by default
$args['class'] = 'signoff';
$args['maxlength'] = 75;
parent::__construct($args);
}
示例14: __construct
public function __construct($args = array())
{
$args = PSU::params($args, array('type' => 'text'));
$this->adodb_type = "C";
$this->maxlength = new HTMLAttribute();
$this->size = new HTMLAttribute(20);
$this->value = new HTMLAttribute();
parent::__construct($args);
}
示例15: __construct
function __construct($args = array())
{
$args = \PSU::params($args);
if (!isset($args['size'])) {
// MM/DD/YYYY HH:MM:SS
$args['size'] = 19;
}
parent::__construct($args);
$this->formatting = array($this, 'convert_datetimestring');
}