本文整理汇总了PHP中parent类的典型用法代码示例。如果您正苦于以下问题:PHP parent类的具体用法?PHP parent怎么用?PHP parent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了parent类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _validateObject
public function _validateObject($dataObject, $requiredFields = null)
{
$parent = new parent();
$parent->_validateObject($dataObject, $this->requiredFields);
// run validation for change_type
$this->validateChangeType($dataObject->attributes->change_type, $dataObject);
}
示例2: _init_structure
private function _init_structure($data, $user_options, $widget_title)
{
$this->_structure = parent::array_to_object($this->_structure);
$this->_structure->data = $data;
$this->_structure->options = parent::set_array_prop_def($this->_options_map, $user_options);
$uid = parent::create_id(true);
$this->_structure->id = $uid;
// set the id as default id
$this->_uid = $uid;
$ui = new parent();
$this->_structure->widget = $ui->create_widget();
$this->_structure->widget->header('icon', 'fa-table')->header('title', $widget_title)->body("class", "no-padding")->body("editbox", '<input class="form-control" type="text">
<span class="note"><i class="fa fa-check text-success"></i> Change title to update and save instantly!</span>');
if (!$this->_structure->data) {
$col_list = array("No Data");
} else {
$col_list = array_keys(is_object($data[0]) ? get_object_vars($data[0]) : $data[0]);
}
$cols = array_combine($col_list, $col_list);
$cells = array_fill_keys($col_list, array());
$hide = array_fill_keys($col_list, false);
$this->_cells_map = $cells;
$this->_cols_map = $cols;
$this->_hide_map = $hide;
$this->_structure->col = $cols;
$this->_structure->cell = $cells;
$this->_structure->hide = $hide;
$this->_structure->row = array_fill(1, count($data) + 1, array());
$this->_structure->js = array("properties" => array(), "oTable" => 'oTable_' . $this->_uid, "custom" => "");
}
示例3: convertDataObject
public function convertDataObject($dataObject, $newStructure = null)
{
$p = new parent();
if (is_null($newStructure)) {
$newStructure = $this->newStructure;
}
$newDataObject = $p->convertDataObject($dataObject, $newStructure);
$tlds = array();
if (isset($dataObject->data->selected) && $dataObject->data->selected) {
$tlds = explode(';', $dataObject->data->selected);
}
if (empty($tlds) && isset($dataObject->data->defaulttld) && $dataObject->data->defaulttld) {
$tlds = explode(';', $dataObject->data->defaulttld);
}
if (empty($tlds)) {
$tlds = $this->defaultTlds;
}
/*
* setting service_override
*/
$newDataObject->attributes->service_override = new \stdClass();
$service_override = new \stdCLass();
$service_override->tlds = $tlds;
if (isset($dataObject->data->maximum) && $dataObject->data->maximum) {
$service_override->maximum = $dataObject->data->maximum;
}
$newDataObject->attributes->service_override->suggestion = $service_override;
$newDataObject->attributes->services = array('suggestion');
/* end setting service_override **/
return $newDataObject;
}
示例4: convertDataObject
public function convertDataObject($dataObject, $newStructure = null)
{
$p = new parent();
if (is_null($newStructure)) {
$newStructure = $this->newStructure;
}
$newDataObject = $p->convertDataObject($dataObject, $newStructure);
// run customizations required by this particular class
// set custom nameservers to nameserver_list
if (isset($dataObject->data)) {
if ($dataObject->data->custom_nameservers == 1) {
$newDataObject->attributes->nameserver_list = array();
for ($j = 1; $j <= 10; ++$j) {
$tns = 'name' . $j;
$tso = 'sortorder' . $j;
if (isset($dataObject->data->{$tns}) && $dataObject->data->{$tns} != '' && isset($dataObject->data->{$tso}) && $dataObject->data->{$tso}) {
$nameserver = new \stdClass();
$nameserver->name = $dataObject->data->{$tns};
$nameserver->sortorder = $dataObject->data->{$tso};
$newDataObject->attributes->nameserver_list[] = $nameserver;
}
}
}
}
if (isset($dataObject->personal)) {
$newDataObject->attributes->contact_set = new \stdClass();
$newDataObject->attributes->contact_set->owner = $dataObject->personal;
$newDataObject->attributes->contact_set->admin = $dataObject->personal;
$newDataObject->attributes->contact_set->billing = $dataObject->personal;
$newDataObject->attributes->contact_set->tech = $dataObject->personal;
}
// end customizations
return $newDataObject;
}
示例5: convertDataObject
public function convertDataObject($dataObject, $newStructure = null)
{
$p = new parent();
if (is_null($newStructure)) {
$newStructure = $this->newStructure;
}
$newDataObject = $p->convertDataObject($dataObject, $newStructure);
// run customizations required by this particular class
// set custom nameservers to nameserver_list
if (isset($dataObject->data->nameserver_names) && $dataObject->data->nameserver_names != '') {
$nameServers = explode(',', $dataObject->data->nameserver_names);
if (isset($dataObject->data->nameserver_ips) && $dataObject->data->nameserver_ips != '') {
$ipAddresses = explode(',', $dataObject->data->nameserver_ips);
} else {
$ipAddresses = array();
}
$i = 0;
$newDataObject->attributes->nameserver_list = array();
for ($i = 0; $i < count($nameServers); ++$i) {
$nameserver_obj = new \stdClass();
$nameserver_obj->fqdn = $nameServers[$i];
if (isset($ipAddresses[$i])) {
$nameserver_obj->fqdn = $ipAddresses[$i];
}
}
}
// end customizations
return $newDataObject;
}
示例6: _validateObject
public function _validateObject($dataObject, $requiredFields = null)
{
if (empty($dataObject->cookie) && empty($dataObject->attributes->domain)) {
Exception::notDefined('cookie and/or domain.');
}
$parent = new parent();
$parent->_validateObject($dataObject, $this->requiredFields);
}
示例7: _validateObject
public function _validateObject($dataObject, $requiredFields = null)
{
if (!isset($dataObject->attributes->order_id) and !isset($dataObject->attributes->product_id)) {
Exception::notDefined('order_id or product_id');
}
$parent = new parent();
$parent->_validateObject($dataObject, $this->requiredFields);
}
示例8: convertDataObject
public function convertDataObject($dataObject, $newStructure = null)
{
$p = new parent();
if (is_null($newStructure)) {
$newStructure = $this->newStructure;
}
$newDataObject = $p->convertDataObject($dataObject, $newStructure);
return $newDataObject;
}
示例9: _init_structure
private function _init_structure($fields, $user_options = array())
{
$this->_structure = parent::array_to_object($this->_structure);
$this->_structure->options = parent::set_array_prop_def($this->_options_map, $user_options);
$this->_structure->field = $fields;
$ui = new parent();
$widget = $ui->create_widget();
$widget->options('editbutton', false)->body('class', 'no-padding')->header('title', '<h2></h2>');
$this->_structure->widget = $widget;
}
示例10: convertDataObject
public function convertDataObject($dataObject, $newStructure = null)
{
$p = new parent();
if (is_null($newStructure)) {
$newStructure = $this->newStructure;
}
$newDataObject = $p->convertDataObject($dataObject, $newStructure);
$newDataObject->attributes->add_to_all_registry = explode(',', $newDataObject->attributes->add_to_all_registry);
return $newDataObject;
}
示例11: get
/**
* Check for the key in the error manager session else return the messages
* from the message bag
*
* @param string $key
* @param string $format
* @return array
*/
public function get($key, $format = null)
{
if (Session::has('errorManager.errors')) {
$errors = new parent(Session::get('errorManager.errors'));
if ($errors->has($key)) {
return $errors->get($key);
}
}
return parent::get($key);
}
示例12: _validateObject
public function _validateObject($dataObject, $requiredFields = null)
{
if ((!isset($dataObject->cookie) || $dataObject->cookie == '') && (!isset($dataObject->attributes->domain) || $dataObject->attributes->domain == '')) {
Exception::notDefined('cookie or domain');
}
if (isset($dataObject->cookie) && $dataObject->cookie != '' && isset($dataObject->attributes->domain) && $dataObject->attributes->domain != '') {
Exception::cannotSetOneCall('cookie and domain');
}
$parent = new parent();
$parent->_validateObject($dataObject, $this->requiredFields);
}
示例13: _init_structure
private function _init_structure($steps, $user_options = array())
{
$this->_structure = parent::array_to_object($this->_structure);
$this->_structure->options = parent::set_array_prop_def($this->_options_map, $user_options);
$this->_structure->step = $steps;
$this->_structure->id = parent::create_id(true);
$ui = new parent();
$widget = $ui->create_widget();
$widget->options('editbutton', false)->header('title', '<h2></h2>');
$this->_structure->widget = $widget;
}
示例14: convertDataObject
public function convertDataObject($dataObject, $newStructure = null)
{
$p = new parent();
if (is_null($newStructure)) {
$newStructure = $this->newStructure;
}
$newDataObject = $p->convertDataObject($dataObject, $newStructure);
if (!is_array($newDataObject->attributes->change_items)) {
$newDataObject->attributes->change_items = explode(',', $newDataObject->attributes->change_items);
}
return $newDataObject;
}
示例15: convertDataObject
public function convertDataObject($dataObject, $newStructure = null)
{
$p = new parent();
if (is_null($newStructure)) {
$newStructure = $this->newStructure;
}
$newDataObject = $p->convertDataObject($dataObject, $newStructure);
// run old 'getTlds' method (now called 'getServiceOverride') to get
// info that should be part of service override entries
$newDataObject->attributes->service_override = $this->getServiceOverride($dataObject);
$newDataObject->attributes->services = array('lookup', 'suggestion');
/* end setting service_override **/
return $newDataObject;
}