本文整理汇总了PHP中parent类的典型用法代码示例。如果您正苦于以下问题:PHP parent类的具体用法?PHP parent怎么用?PHP parent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了parent类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
}
开发者ID:opensrs,项目名称:osrs-toolkit-php,代码行数:7,代码来源:BulkChange.php
示例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" => "");
}
开发者ID:runningjack,项目名称:auctionsite,代码行数:30,代码来源:class.smartui-datatable.php
示例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;
}
开发者ID:opensrs,项目名称:osrs-toolkit-php,代码行数:31,代码来源:SuggestDomain.php
示例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;
}
开发者ID:opensrs,项目名称:osrs-toolkit-php,代码行数:34,代码来源:SWRegister.php
示例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;
}
开发者ID:opensrs,项目名称:osrs-toolkit-php,代码行数:29,代码来源:ProvisioningUpdateAllInfo.php
示例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);
}
开发者ID:opensrs,项目名称:osrs-toolkit-php,代码行数:8,代码来源:ProvisioningModify.php
示例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);
}
开发者ID:opensrs,项目名称:osrs-toolkit-php,代码行数:8,代码来源:RequestOnDemandScan.php
示例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;
}
开发者ID:opensrs,项目名称:osrs-toolkit-php,代码行数:9,代码来源:ProvisioningRenew.php
示例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;
}
开发者ID:mtrindade92,项目名称:assets,代码行数:10,代码来源:class.smartui-smartform.php
示例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;
}
开发者ID:opensrs,项目名称:osrs-toolkit-php,代码行数:10,代码来源:NameserverCreate.php
示例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);
}
开发者ID:michaeljennings,项目名称:errormanager,代码行数:18,代码来源:ErrorManager.php
示例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);
}
开发者ID:opensrs,项目名称:osrs-toolkit-php,代码行数:11,代码来源:NameserverAdvancedUpdate.php
示例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;
}
开发者ID:mtrindade92,项目名称:assets,代码行数:11,代码来源:class.smartui-wizard.php
示例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;
}
开发者ID:opensrs,项目名称:osrs-toolkit-php,代码行数:12,代码来源:BulkSubmit.php
示例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;
}
开发者ID:opensrs,项目名称:osrs-toolkit-php,代码行数:14,代码来源:NameSuggest.php
示例16: convertDataObject
public function convertDataObject($dataObject, $newStructure = null)
{
$p = new parent();
if (is_null($newStructure)) {
$newStructure = $this->newStructure;
}
$newDataObject = $p->convertDataObject($dataObject, $newStructure);
// make sure attributes->reg_domain is set, even if it's
// an empty string
if (!isset($newDataObject->attributes->reg_domain)) {
$newDataObject->attributes->reg_domain = '';
}
return $newDataObject;
}
开发者ID:opensrs,项目名称:osrs-toolkit-php,代码行数:14,代码来源:AuthenticationChangeOwnership.php
示例17: convertDataObject
public function convertDataObject($dataObject, $newStructure = null)
{
$p = new parent();
if (is_null($newStructure)) {
$newStructure = $this->newStructure;
}
$newDataObject = $p->convertDataObject($dataObject, $newStructure);
// set attributes->domain_list
if (!is_object($newDataObject->attributes)) {
$newDataObject->attributes = new \stdClass();
}
$newDataObject->attributes->domain_list = explode(',', $dataObject->data->domain_list);
return $newDataObject;
}
开发者ID:opensrs,项目名称:osrs-toolkit-php,代码行数:14,代码来源:GetDomainsContacts.php
示例18: add
public function add()
{
$tabelas = array_intersect(parent::$dev['tabelas'], parent::$homolog['tabelas']);
$string = $stringResult = "";
if (!empty($tabelas)) {
$propriedade = new PropriedadeBO();
parent::$fase = FaseQuery::ADD;
foreach ($tabelas as $tabelaInput) {
list(parent::$schema, parent::$tabela) = explode(".", $tabelaInput);
$schema = parent::$schema;
$tabela = parent::$tabela;
if (isset(parent::$dev['schema'][$schema]['tabela'][$tabela]['coluna'])) {
$dev = array_keys(parent::$dev['schema'][$schema]['tabela'][$tabela]['coluna']);
}
if (isset(parent::$homolog['schema'][$schema]['tabela'][$tabela]['coluna'])) {
$homolog = array_keys(parent::$homolog['schema'][$schema]['tabela'][$tabela]['coluna']);
}
$colunas = array_diff($dev, $homolog);
if (!empty($colunas)) {
$stringResult = "\n\n\n" . str_pad(" ADD COLUMN ", 100, "-", STR_PAD_BOTH);
foreach ($colunas as $coluna) {
parent::$coluna = $coluna;
$string .= "\n\nALTER TABLE {$schema}.{$tabela} ADD COLUMN {$coluna} ";
$string .= $propriedade->construct() . ";";
}
}
}
}
return $stringResult . $string;
}
开发者ID:rtakauti,项目名称:Galileu,代码行数:30,代码来源:ColunaBO.php
示例19: getInstance
public static function getInstance()
{
if (!parent::$_instance instanceof self) {
parent::$_instance = new self();
}
return parent::$_instance;
}
开发者ID:jpmschuler,项目名称:cooluri,代码行数:7,代码来源:DB.php
示例20: alter
public function alter()
{
$constraints = array_intersect(parent::$dev['constraints'], parent::$homolog['constraints']);
$string = $stringResult = "";
if (!empty($constraints)) {
$restricao = new RestricaoBO();
foreach ($constraints as $constraintInput) {
list(parent::$schema, parent::$tabela, $constraint) = explode(".", $constraintInput);
$schema = parent::$schema;
$tabela = parent::$tabela;
$dev = parent::$dev['schema'][$schema]['tabela'][$tabela]['constraint'][$constraint];
$homolog = parent::$homolog['schema'][$schema]['tabela'][$tabela]['constraint'][$constraint];
if ($dev != $homolog) {
parent::$constraint = $constraint;
$restricoes = $restricao->construct();
if ($restricoes != "") {
$stringResult = "\n\n\n" . str_pad(" ALTER DE CONSTRAINT ", 100, "-", STR_PAD_BOTH);
$string .= "\n\nALTER TABLE IF EXISTS {$schema}.{$tabela}";
$string .= "\n\tDROP CONSTRAINT IF EXISTS {$constraint};";
$string .= "\n\nALTER TABLE {$schema}.{$tabela}";
$string .= "\n\tADD CONSTRAINT {$constraint} {$restricoes};";
}
}
}
}
return $stringResult . $string;
}
开发者ID:rtakauti,项目名称:Galileu,代码行数:27,代码来源:ConstraintBO.php
注:本文中的parent类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论