73 $this->Link =
get_package(
'link' ,
'last' , __FILE__ );
111 function add_owner( $Object1Id , $Object2Id , $Object1Type , $Object2Type )
115 $this->Link->create_link( $Object1Id , $Object2Id , $Object1Type , $Object2Type ,
true );
117 catch( Exception $e )
153 function delete_owner( $Object1Id , $Object2Id , $Object1Type , $Object2Type )
157 $this->Link->delete_link( $Object1Id , $Object2Id , $Object1Type , $Object2Type ,
true );
159 catch( Exception $e )
191 if( $this->Owners ===
false )
193 $this->Owners = array();
196 foreach( $this->Owners as $i => $Owner )
198 if( $Owner[
'id' ] == $OwnerId && $Owner[
'type' ] == $OwnerType )
204 $this->Owners [] = array(
'id' => $OwnerId ,
'type' => $OwnerType );
206 catch( Exception $e )
238 if( $this->Owners ===
false )
240 throw(
new Exception(
"No owners were registered" ) );
243 foreach( $this->Owners as $i => $Owner )
245 if( $this->Link->link_exists( $Owner[
'id' ] , $ObjectId , $Owner[
'type' ] , $ObjectType ) )
253 catch( Exception $e )
289 if( $this->Owners ===
false )
294 foreach( $this->Owners as $i => $Owner )
296 if( $Owner[
'id' ] == $ObjectId && $Owner[
'type' ] == $ObjectType )
304 catch( Exception $e )