Permalink
Browse files

initial commit of PricingElement

  • Loading branch information...
1 parent 380c8f3 commit ab8297420c7b81a05831e01af9ba58b665a64647 @iampersistent iampersistent committed Nov 26, 2012
View
32 lib/Vespolina/Entity/Pricing/PricingElement.php
@@ -0,0 +1,32 @@
+<?php
+/**
+ * (c) 2012 Vespolina Project http://www.vespolina-project.org
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+namespace Vespolina\Entity\Pricing;
+
+use Vespolina\Entity\Pricing\PricingElementInterface;
+
+class PricingElement implements PricingElementInterface
+{
+ /** @var integer */
+ protected $order;
+
+ /**
+ * @inheritdoc
+ */
+ public function setOrder($order)
+ {
+ $this->order = $order;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function getOrder()
+ {
+ return $this->order;
+ }
+}
View
26 lib/Vespolina/Entity/Pricing/PricingElementInterface.php
@@ -0,0 +1,26 @@
+<?php
+/**
+ * (c) 2012 Vespolina Project http://www.vespolina-project.org
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+namespace Vespolina\Entity\Pricing;
+
+interface PricingElementInterface
+{
+ /**
+ * Set the order of this element being processed. If the order is not set, it is saved until the end of the
+ * processing to be executed. The higher the number, the later it is executed.
+ *
+ * @param int $order
+ */
+ function setOrder($order);
+
+ /**
+ * Return the order of this element's execution
+ *
+ * @return int
+ */
+ function getOrder();
+}

0 comments on commit ab82974

Please sign in to comment.