00001 <?php
00016 abstract class SMWContainerValue extends SMWDataValue {
00017
00025 protected function parseDBkeys( $args ) {
00026 $this->m_data->clear();
00027 if ( count( $args ) > 0 ) {
00028 foreach ( reset( $args ) as $value ) {
00029 if ( is_array( $value ) && ( count( $value ) == 2 ) ) {
00030 $this->m_data->addPropertyStubValue( reset( $value ), end( $value ) );
00031 }
00032 }
00033 }
00034 }
00035
00043 public function getDBkeys() {
00044 $data = array();
00045 foreach ( $this->m_data->getProperties() as $property ) {
00046 foreach ( $this->m_data->getPropertyValues( $property ) as $dv ) {
00047 $data[] = array( $property->getDBkey(), $dv->getDBkeys() );
00048 }
00049 }
00050 return array( $data );
00051 }
00052
00053 public function getHash() {
00054 if ( $this->isValid() ) {
00055 return $this->m_data->getHash();
00056 } else {
00057 return implode( "\t", $this->getErrors() );
00058 }
00059 }
00060
00061
00062
00063
00064
00065
00066
00067
00068
00074 public function getData() {
00075 return $this->m_data;
00076 }
00077
00078 }