本文整理汇总了PHP中eZPersistentObject::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP eZPersistentObject::__construct方法的具体用法?PHP eZPersistentObject::__construct怎么用?PHP eZPersistentObject::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eZPersistentObject
的用法示例。
在下文中一共展示了eZPersistentObject::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: eZContentClassNameList
function __construct($row)
{
if (is_array($row)) {
parent::__construct($row);
$this->VersionCount = false;
$this->InGroups = null;
$this->AllGroups = null;
if (isset($row["version_count"])) {
$this->VersionCount = $row["version_count"];
}
$this->NameList = new eZContentClassNameList();
if (isset($row['serialized_name_list'])) {
$this->NameList->initFromSerializedList($row['serialized_name_list']);
} else {
$this->NameList->initDefault();
}
$this->DescriptionList = new eZSerializedObjectNameList();
if (isset($row['serialized_description_list'])) {
$this->DescriptionList->initFromSerializedList($row['serialized_description_list']);
} else {
$this->DescriptionList->initDefault();
}
}
$this->DataMap = false;
}
示例2:
function __construct($row)
{
if (!isset($row['id'])) {
$row['id'] = null;
}
parent::__construct($row);
}
示例3:
/**
* Constructor
*
*/
function __construct($row)
{
if (!isset($row['remote_id']) || !$row['remote_id']) {
$row['remote_id'] = self::generateRemoteID();
}
parent::__construct($row);
}
示例4: array
function __construct($row = array())
{
$this->ContentObjectAttributeArray = false;
$this->DataMap = false;
$this->TempNode = null;
$this->VersionName = null;
$this->VersionNameCache = array();
parent::__construct($row);
}
示例5:
function __construct($row)
{
parent::__construct($row);
$this->Modifier = null;
$this->StatusName = null;
if (isset($row['status_name'])) {
$this->StatusName = $row['status_name'];
}
}
示例6:
function __construct($row)
{
$this->Path = null;
$this->PathArray = null;
if (array_key_exists('always_available', $row)) {
$this->AlwaysAvailable = $row['always_available'];
}
parent::__construct($row);
}
示例7:
function __construct($row)
{
$this->Content = null;
$this->DisplayInfo = null;
$this->HTTPValue = null;
$this->ValidationError = null;
$this->ValidationLog = null;
$this->ContentClassAttributeIdentifier = null;
$this->ContentClassAttributeID = null;
$this->InputParameters = false;
$this->HasValidationError = false;
$this->DataTypeCustom = null;
$this->DataTypeString = null;
parent::__construct($row);
}
示例8: array
function __construct($row = array())
{
parent::__construct($row);
$this->PolicyArray = 0;
$this->LimitIdentifier = false;
$this->LimitValue = false;
if (isset($row['limit_identifier'])) {
$this->LimitIdentifier = $row['limit_identifier'];
}
if (isset($row['limit_value'])) {
$this->LimitValue = $row['limit_value'];
}
if (isset($row['user_role_id'])) {
$this->UserRoleID = $row['user_role_id'];
}
}
示例9: array
/**
* Initializes the object with $row.
*
* If $row is an integer, it will try to fetch it from the database using it as the unique ID.
*
* @param int|array $row
*/
function __construct($row)
{
parent::__construct($row);
$this->ClassIdentifier = false;
if (isset($row['contentclass_identifier'])) {
$this->ClassIdentifier = $row['contentclass_identifier'];
}
if (isset($row['class_identifier'])) {
$this->ClassIdentifier = $row['class_identifier'];
}
$this->ClassName = false;
// Depending on how the information is retrieved, the "serialized_name_list" is sometimes available in "class_serialized_name_list" key
if (isset($row['class_serialized_name_list'])) {
$row['serialized_name_list'] = $row['class_serialized_name_list'];
}
// Depending on how the information is retrieved, the "contentclass_name" is sometimes available in "class_name" key
if (isset($row['class_name'])) {
$row['contentclass_name'] = $row['class_name'];
}
if (isset($row['contentclass_name'])) {
$this->ClassName = $row['contentclass_name'];
}
if (isset($row['serialized_name_list'])) {
$this->ClassName = eZContentClass::nameFromSerializedString($row['serialized_name_list']);
}
$this->CurrentLanguage = false;
if (isset($row['content_translation'])) {
$this->CurrentLanguage = $row['content_translation'];
} else {
if (isset($row['real_translation'])) {
$this->CurrentLanguage = $row['real_translation'];
} else {
if (isset($row['language_mask'])) {
$topPriorityLanguage = eZContentLanguage::topPriorityLanguageByMask($row['language_mask']);
if ($topPriorityLanguage) {
$this->CurrentLanguage = $topPriorityLanguage->attribute('locale');
}
}
}
}
// Initialize the permission array cache
$this->Permissions = array();
}
示例10: __construct
public function __construct($row = array())
{
parent::__construct($row);
if ($this->attribute('id') === null) {
$skipClasses = array('eZProcess', 'eZModule', __CLASS__);
$bt = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
foreach ($bt as $i => $call) {
// remove calls for current class and index.php
if (isset($call['class']) === false || in_array($call['class'], $skipClasses)) {
unset($bt[$i]);
}
}
$bt = array_reverse($bt);
$baseDir = getcwd() . '/';
foreach ($bt as $call) {
$backtrace[] = array('file' => isset($call['file']) ? str_replace($baseDir, '', $call['file']) : null, 'line' => isset($call['line']) ? $call['line'] : null, 'function' => isset($call['function']) ? $call['function'] : null, 'class' => isset($call['class']) ? $call['class'] : null, 'type' => isset($call['type']) ? $call['type'] : null);
}
$this->setAttribute('backtrace', $backtrace);
} else {
$this->setAttribute('backtrace', unserialize($this->attribute('backtrace')));
}
}
示例11: __construct
/**
* @param array $row
*/
public function __construct( $row = null )
{
if( is_array($row) && isset( $row['meta_guid_ms'] ) )
{
parent::__construct( null );
// $row is coming from solr
foreach( array(
'attr_id_l' => 'id',
'attr_language_code_s' => 'language_code',
'attr_concept_id_l' => 'concept_id',
'attr_term_t' => 'term',
'attr_type_s' => 'type_id',
) as $key => $field )
{
$this->setAttribute( $field, $row[$key] );
}
}
else
{
parent::__construct( $row );
}
}
示例12: eZSerializedObjectNameList
function __construct($row)
{
parent::__construct($row);
$this->Content = null;
$this->DisplayInfo = null;
$this->Module = null;
$this->NameList = new eZSerializedObjectNameList();
if (isset($row['serialized_name_list'])) {
$this->NameList->initFromSerializedList($row['serialized_name_list']);
} else {
$this->NameList->initDefault();
}
$this->DescriptionList = new eZSerializedObjectNameList();
if (isset($row['serialized_description_list'])) {
$this->DescriptionList->initFromSerializedList($row['serialized_description_list']);
} else {
$this->DescriptionList->initDefault();
}
$this->DataTextI18nList = new eZSerializedObjectNameList();
if (isset($row['serialized_data_text'])) {
$this->DataTextI18nList->initFromSerializedList($row['serialized_data_text']);
} else {
$this->DataTextI18nList->initDefault();
}
// Make sure datatype gets final say if attribute should be translatable
if (isset($row['can_translate']) && $row['can_translate']) {
$datatype = $this->dataType();
if ($datatype instanceof eZDataType) {
if (!$datatype->isTranslatable()) {
$this->setAttribute('can_translate', 0);
}
} else {
eZDebug::writeError('Could not get instance of datatype: ' . $row['data_type_string'], __METHOD__);
}
}
}
示例13:
function __construct($row)
{
$this->ProductCategories = null;
parent::__construct($row);
}
示例14: array
/**
* Constructor.
*
* \param row Parameter passed to the constructor of eZPersistentObject.
*/
function __construct($row = array())
{
parent::__construct($row);
}
示例15:
function __construct($row)
{
parent::__construct($row);
$this->Status = null;
}