示例#1
0
 /**
  * Find an item by name 
  *
  * @param unknown_type $Context
  * @param unknown_type $realmID
  * @param unknown_type $name
  */
 public function findByName($Context, $realmID, $name)
 {
     $IPP = $Context->IPP();
     if ($IPP->flavor() == QuickBooks_IPP_IDS::FLAVOR_DESKTOP) {
         for ($i = 0; $i < 999; $i++) {
             $list = $this->findAll($Context, $realmID, $name, $i, 50);
             foreach ($list as $Item) {
                 if (strtolower($Item->getName()) == strtolower($name)) {
                     return $Item;
                 }
             }
         }
         return false;
     } else {
         $xml = null;
         return parent::_findByName($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_ITEM, $name, $xml);
     }
 }
示例#2
0
 /**
  * Get a customer by name
  * 
  * @param QuickBooks_IPP_Context $Context	
  * @param string $realm					
  * @param string $name						The name of the customer 
  * @return QuickBooks_IPP_Object_Customer	The customer object
  */
 public function findByName($Context, $realm, $name)
 {
     $xml = null;
     return parent::_findByName($Context, $realm, QuickBooks_IPP_IDS::RESOURCE_CUSTOMER, $name, $xml);
 }