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;
        }
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;
        }
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 ; }
Sets page order to use in parent container

@param  int $order                 [optional] page order in container.
Default is null, which sets no
specific order.
@return Page       fluent interface, returns self
@throws Exception  if order is not integer or null
Sets page order to use in parent container