本文整理汇总了PHP中PSU::createSlug方法的典型用法代码示例。如果您正苦于以下问题:PHP PSU::createSlug方法的具体用法?PHP PSU::createSlug怎么用?PHP PSU::createSlug使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PSU
的用法示例。
在下文中一共展示了PSU::createSlug方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _prep_args
/**
* prepares arguments for DML
*/
protected function _prep_args()
{
// this is the data prepared for binding.
// these fields are ordered as they are in the table
$args = array('the_id' => $this->id, 'gate_id' => $this->gate_id, 'name' => $this->name, 'slug' => $this->slug ?: \PSU::createSlug($this->name), 'legacy_code' => $this->legacy_code);
return $args;
}
示例2: _prep_args
/**
* prepares arguments for DML
*/
protected function _prep_args()
{
// this is the data prepared for binding.
// these fields are ordered as they are in the table
$args = array('the_id' => $this->id, 'sau_id' => $this->sau_id, 'district_id' => $this->district_id, 'school_type_id' => $this->school_type_id, 'school_approval_level_id' => $this->school_approval_level_id, 'name' => $this->name, 'slug' => $this->slug ?: \PSU::createSlug($this->name), 'grade_span' => $this->grade_span, 'enrollment' => $this->enrollment, 'street_line1' => $this->street_line1, 'street_line2' => $this->street_line2, 'city' => $this->city, 'state' => $this->state, 'zip' => $this->zip, 'phone' => $this->phone, 'fax' => $this->fax, 'legacy_code' => $this->legacy_code);
return $args;
}
示例3: _prep_args
/**
* prepares arguments for DML
*/
protected function _prep_args()
{
// this is the data prepared for binding.
// these fields are ordered as they are in the table
$args = array('the_id' => $this->id, 'name' => $this->name, 'slug' => $this->slug ?: \PSU::createSlug($this->name), 'street_line1' => $this->street_line1, 'street_line2' => $this->street_line2, 'city' => $this->city, 'state' => $this->state, 'zip' => $this->zip, 'phone' => $this->phone, 'fax' => $this->fax, 'legacy_code' => $this->legacy_code);
return $args;
}
示例4: types
public function types($search = null)
{
$types = array();
foreach (self::items($search) as $item) {
$types[\PSU::createSlug($item['type'])] = $item['type'];
}
//end foreach
return $types;
}
示例5: getReceivableNetAmount
public function getReceivableNetAmount($params = '')
{
$params = \PSU::params($params);
$token = '';
if (count($params) == 0) {
$token = 'total';
} else {
ksort($params);
foreach ($params as $key => $param) {
$token .= $key . $param;
}
//end foreach
}
//end else
$token = \PSU::createSlug($token);
if (isset($this->data['receivable_net_amount'][$token])) {
$total = $this->data['receivable_net_amount'][$token];
} else {
$total = 0;
$sql = "BEGIN :val := tb_receivable.f_sum_net_amount(p_pidm => :pidm";
foreach ($params as $key => $p) {
if ($key == 'bill_date' || $key == 'as_of_date') {
$sql .= ", p_" . $key . " => to_date('" . $p . "', 'RRRR-MM-DD')";
} else {
$sql .= ", p_" . $key . " => :" . $key;
}
}
//end foreach
$sql .= "); END;";
$stmt = \PSU::db('banner')->PrepareSP($sql);
\PSU::db('banner')->InParameter($stmt, $this->pidm, 'pidm');
foreach ($params as $key => $p) {
if ($key != 'bill_date' && $key != 'as_of_date') {
\PSU::db('banner')->InParameter($stmt, $p, $key);
}
}
//end foreach
\PSU::db('banner')->OutParameter($stmt, $total, 'val');
\PSU::db('banner')->Execute($stmt);
$this->data['receivable_net_amount'][$token] = $total ? $total : 0;
}
//end else
return $total;
}