PayU integration by Krzysztof Gzocha
  • Namespace
  • Class

Namespaces

  • Team3
    • PayU
      • Annotation
      • Communication
        • CurlRequestBuilder
        • HttpStatusParser
        • Notification
        • Process
          • NotificationProcess
          • ResponseDeserializer
        • Request
          • Model
        • Response
          • Model
        • Sender
      • Configuration
        • Credentials
      • Order
        • Autocomplete
          • Strategy
        • Model
          • Buyer
          • Money
          • Products
          • ShippingMethods
          • Traits
        • Transformer
          • UserOrder
            • Strategy
              • Product
              • ShippingMethod
      • PropertyExtractor
        • Reader
      • Serializer
      • SignatureCalculator
        • Encoder
          • Algorithms
          • Strategy
        • ParametersSorter
        • Validator
      • ValidatorBuilder

Classes

  • Team3\PayU\ValidatorBuilder\ValidatorBuilder

Interfaces

  • Team3\PayU\ValidatorBuilder\ValidatorBuilderInterface
 1 <?php
 2 /**
 3  * @author Krzysztof Gzocha <krzysztof.gzocha@xsolve.pl>
 4  */
 5 namespace Team3\PayU\Order\Model\ShippingMethods;
 6 
 7 class ShippingMethodCollection implements ShippingMethodCollectionInterface
 8 {
 9     /**
10      * @var ShippingMethodInterface[]
11      */
12     protected $shippingMethods;
13 
14     /**
15      * @param ShippingMethodInterface[] $shippingMethod
16      */
17     public function __construct(array $shippingMethod = [])
18     {
19         $this->shippingMethods = $shippingMethod;
20     }
21 
22     /**
23      * Return true if given object is filled
24      *
25      * @return bool
26      */
27     public function isFilled()
28     {
29         return 0 < count($this->shippingMethods);
30     }
31 
32     /**
33      * @return ShippingMethodInterface[]
34      */
35     public function getShippingMethods()
36     {
37         return $this->shippingMethods;
38     }
39 
40     /**
41      * @inheritdoc
42      */
43     public function addShippingMethod(ShippingMethodInterface $shippingMethod)
44     {
45         $this->shippingMethods[] = $shippingMethod;
46 
47         return $this;
48     }
49 
50     /**
51      * @param ShippingMethodInterface[] $shippingMethods
52      *
53      * @return ShippingMethodCollection
54      */
55     public function setShippingMethods(array $shippingMethods)
56     {
57         $this->shippingMethods = array_values($shippingMethods);
58 
59         return $this;
60     }
61 
62     /**
63      * @inheritdoc
64      */
65     public function getIterator()
66     {
67         return new \ArrayIterator($this->getShippingMethods());
68     }
69 
70     /**
71      * @inheritdoc
72      */
73     public function count()
74     {
75         return count($this->getShippingMethods());
76     }
77 }
78 
PayU integration by Krzysztof Gzocha API documentation generated by ApiGen