/** * This function does anything we want. * Sometimes we want it to build something. Then, the result will be * returned. * * @access public * @return string * @uses \shiporder\Item for items list * @uses \shiporder\ItemView for the visual part of the list */ public static function start() { require_once dirname(__FILE__) . '/Item.php'; $items = \shiporder\Item::getListOfTypeItem(array()); require_once dirname(__FILE__) . '/ItemView.php'; $itemView = \shiporder\ItemView::buildListOfItems(array('items' => $items)); echo $itemView; }
/** * This function starts the processes with items. * * @access public * @return string the parsed list of items * @uses \shiporder\Item for data * @uses \shiporder\ItemView for the visual part */ public static function start() { //get data require_once dirname(__FILE__) . '/Item.php'; $item = \shiporder\Item::getListOfTypeItem(array()); //get view require_once dirname(__FILE__) . '/ItemView.php'; $itemView = \shiporder\ItemView::buildListOfItems(array('item' => $item)); return $itemView; }
$newOrderPerson->insert(); echo var_dump(\shiporder\OrderPerson::getListOfTypeOrderPerson(array('forAutocompletion' => false))); //Inserting new ShipTo location $newShipTo = new \shiporder\ShipTo(); $newShipTo->setNameOfRecipient('Peeter'); $newShipTo->setCity('Tallinn'); $newShipTo->setCountry('Estonia'); $newShipTo->insert(); echo var_dump(\shiporder\ShipTo::getListOfTypeShipTo(array('forAutocompletion' => false))); //Inserting a new item $newShipTo = new \shiporder\Item(); $newShipTo->setAmount('50'); $newShipTo->setPriece('30'); $newShipTo->setName('Auto'); $newShipTo->insert(); echo var_dump(\shiporder\Item::getListOfTypeItem(array('forAutocompletion' => false))); class OrderPersonController { public static function start() { require_once dirname(__FILE__) . '/OrderPerson.php'; $orderPersons = \shiporder\OrderPerson::getListOfTypeOrderPerson(array()); require_once dirname(__FILE__) . '/OrderPersonView.php'; $orderPersonView = \shiporder\OrderPersonView::buildListOfOrderPersons(array('orderPersons' => $orderPersons)); echo $orderPersonView; } } //\OrderPerson\OrderPersonController::start(); /* $orderPerson->setFirstName('keijo');