original_string: public function get($order_id)
      {
          $result = null;
          $this->hook->attach('order.get.before', $order_id, $result, $this);
  
          if (isset($result)) {
              return $result;
          }
  
          $conditions = array(
              'limit' => array(0, 1),
              'order_id' => $order_id
          );
  
          $list = (array) $this->getList($conditions);
          $result = empty($list) ? array() : reset($list);
  
          $this->setCart($result);
          $this->hook->attach('order.get.after', $order_id, $result, $this);
          return $result;
      }
code: public function get($order_id)
      {
          $result = null;
          $this->hook->attach('order.get.before', $order_id, $result, $this);
  
          if (isset($result)) {
              return $result;
          }
  
          $conditions = array(
              'limit' => array(0, 1),
              'order_id' => $order_id
          );
  
          $list = (array) $this->getList($conditions);
          $result = empty($list) ? array() : reset($list);
  
          $this->setCart($result);
          $this->hook->attach('order.get.after', $order_id, $result, $this);
          return $result;
      }
code_tokens: public function get ( $ order_id ) { $ result = null ; $ this -> hook -> attach ( 'order.get.before' , $ order_id , $ result , $ this ) ; if ( isset ( $ result ) ) { return $ result ; } $ conditions = array ( 'limit' => array ( 0 , 1 ) , 'order_id' => $ order_id ) ; $ list = ( array ) $ this -> getList ( $ conditions ) ; $ result = empty ( $ list ) ? array ( ) : reset ( $ list ) ; $ this -> setCart ( $ result ) ; $ this -> hook -> attach ( 'order.get.after' , $ order_id , $ result , $ this ) ; return $ result ; }
docstring: Loads an order from the database
  @param integer $order_id
  @return array
docstring_tokens: Loads an order from the database