opensrs\Exception::notDefined PHP Method

notDefined() public static method

public static notDefined ( $propertyName )
    public static function notDefined($propertyName)
    {
        throw new self("oSRS Error - {$propertyName} is not defined.");
    }

Usage Example

 public function _validateObject($dataObject, $requiredFields = null)
 {
     if (!isset($dataObject->attributes->order_id) and !isset($dataObject->attributes->product_id)) {
         Exception::notDefined('order_id or product_id');
     }
     $parent = new parent();
     $parent->_validateObject($dataObject, $this->requiredFields);
 }
All Usage Examples Of opensrs\Exception::notDefined