当前位置: 首页>>代码示例>>PHP>>正文


PHP eZContentObject::hasAttribute方法代码示例

本文整理汇总了PHP中eZContentObject::hasAttribute方法的典型用法代码示例。如果您正苦于以下问题:PHP eZContentObject::hasAttribute方法的具体用法?PHP eZContentObject::hasAttribute怎么用?PHP eZContentObject::hasAttribute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在eZContentObject的用法示例。


在下文中一共展示了eZContentObject::hasAttribute方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __get

    /**
     * Returns the value of the property $name.
     *
     * @throws ezcBasePropertyNotFoundException if the property does not exist.
     * @param string $name
     * @ignore
     */
    public function __get( $name )
    {
        switch ( $name )
        {
            case 'dataMap':
            {
                if ( isset( $this->object ) )
                    return $this->object->dataMap();
                else
                    return array();
            } break;
            default:
            {
                if ( isset( $this->dataMap[$name] ) )
                {
                    return $this->dataMap[$name]->content();
                }

                if ( !$this->object instanceof eZContentObject )
                    throw new ezcBaseInvalidParentClassException( 'eZContentObject', $this->object );

                if ( $this->object->hasAttribute( $name ) )
                    return $this->object->attribute( $name );

                throw new ezcBasePropertyNotFoundException( '->object->attribute( ' . $name . ' )' );
            }
        }
    }
开发者ID:nottavi,项目名称:ezpublish,代码行数:35,代码来源:object.php

示例2: hasAttribute

 function hasAttribute($attr)
 {
     return in_array($attr, $this->LocalAttributeNameList) || eZContentObject::hasAttribute($attr);
 }
开发者ID:brookinsconsulting,项目名称:ezecosystem,代码行数:4,代码来源:ezfindresultobject.php

示例3: __isset

 /**
  * Check if given attribute exists.
  * All "classic" attributes can be used (See {@link eZContentObject::definition()}).
  * @param $name
  * @return bool
  */
 public function __isset($name)
 {
     return $this->contentObject->hasAttribute($name);
 }
开发者ID:nicolasaguenot,项目名称:sqliimport,代码行数:10,代码来源:sqlicontent.php


注:本文中的eZContentObject::hasAttribute方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。