Translations:Developers/Object oriented programming in PHP/Methods/22/ru

public function saveItem( MShop_Common_Item_Interface $item, $fetch = true ) {   $iface = 'MShop_Product_Item_Interface'; if( !( $item instanceof $iface ) ) { throw new MShop_Product_Exception( sprintf( 'Object is not of required type "%1$s"', $iface ) ); }   // [...]  }