public function setOrder($order = null)
        {
            if (is_string($order)) {
                $temp = (int) $order;
                if ($temp < 0 || $temp > 0 || $order == '0') {
                    $order = $temp;
                }
            }

            if (null !== $order && !is_int($order)) {
                throw new Exception(
                        'Invalid argument: $order must be an integer or null, ' .
                        'or a string that casts to an integer');
            }

            $this->_order = $order;

            // notify parent, if any
            if (isset($this->_parent)) {
                $this->_parent->notifyOrderUpdated();
            }

            return $this;
        }