__get() public method

Overloaded method call to give access to the list properties.
public __get ( $p_property ) : mix
return mix - the property value
示例#1
0
	/**
     * Overloaded method call to give access to the list properties.
     *
     * @param string $p_element - the property name
     * @return mix - the property value
     */
	public function __get($p_property)
	{
	    switch (strtolower($p_property)) {
	        case 'item':
                return $this->getItem();
            case 'previous':
	           return $this->start - $this->index;
	        case 'next':
	           return $this->start + $this->index;
	    	case 'has_previous':
	           return $this->hasPreviousElements();
	        case 'has_next':
	           return $this->hasNextElements();
	    }
	    return parent::__get($p_property); 
	}
示例#2
0
 /**
  * Overloaded method call to give access to the list properties.
  *
  * @param string $p_element - the property name
  * @return mix - the property value
  */
 public function __get($p_property)
 {
     if (strtolower($p_property) == 'item') {
         return $this->getItem();
     }
     return parent::__get($p_property);
 }
示例#3
0
	/**
     * Overloaded method call to give access to the list properties.
     *
     * @param string $p_element - the property name
     * @return mix - the property value
     */
	public function __get($p_property)
	{
	    return parent::__get($p_property); 
	}