src/classes/CCModel.php
public function &__get( $key ) 
	{
		$value = null;

		// check if the modifier exists
		$has_modifier = method_exists( $this, '_get_modifier_'.$key );

		// try getting the item
		if ( array_key_exists( $key, $this->_data_store ) ) 
		{
			$value =& $this->_data_store[$key];

			if ( $has_modifier )
			{
				$tmpvalue = $this->{'_get_modifier_'.$key}( $value ); return $tmpvalue;
			}

			return $value;
		}

		if ( $has_modifier )
		{
			$value = $this->{'_get_modifier_'.$key}(); return $value;
		}

		// when a function extists we forward the call
		if ( method_exists( $this, $key ) )
		{
			$value = $this->__call_property( $key ); return $value;
		}

		throw new \InvalidArgumentException( "CCModel - Invalid or undefined model property '".$key."'." );
	}
public function &__get( $key ) 
	{
		$value = null;

		// check if the modifier exists
		$has_modifier = method_exists( $this, '_get_modifier_'.$key );

		// try getting the item
		if ( array_key_exists( $key, $this->_data_store ) ) 
		{
			$value =& $this->_data_store[$key];

			if ( $has_modifier )
			{
				$tmpvalue = $this->{'_get_modifier_'.$key}( $value ); return $tmpvalue;
			}

			return $value;
		}

		if ( $has_modifier )
		{
			$value = $this->{'_get_modifier_'.$key}(); return $value;
		}

		// when a function extists we forward the call
		if ( method_exists( $this, $key ) )
		{
			$value = $this->__call_property( $key ); return $value;
		}

		throw new \InvalidArgumentException( "CCModel - Invalid or undefined model property '".$key."'." );
	}
public function & __get ( $ key ) { $ value = null ; // check if the modifier exists $ has_modifier = method_exists ( $ this , '_get_modifier_' . $ key ) ; // try getting the item if ( array_key_exists ( $ key , $ this -> _data_store ) ) { $ value = & $ this -> _data_store [ $ key ] ; if ( $ has_modifier ) { $ tmpvalue = $ this -> { '_get_modifier_' . $ key } ( $ value ) ; return $ tmpvalue ; } return $ value ; } if ( $ has_modifier ) { $ value = $ this -> { '_get_modifier_' . $ key } ( ) ; return $ value ; } // when a function extists we forward the call if ( method_exists ( $ this , $ key ) ) { $ value = $ this -> __call_property ( $ key ) ; return $ value ; } throw new \ InvalidArgumentException ( "CCModel - Invalid or undefined model property '" . $ key . "'." ) ; }
Get a value by key from the model data

@param string			$key
@return mixed
Get a value by key from the model data