Show
Ignore:
Timestamp:
04/07/08 16:38:19 (5 months ago)
Author:
ischommer
Message:

FEATURE Added getSearchQuery(), getObjectQuery(), getObjectsQuery(), getObjectRelationQuery() to RestfulServer?
FEATURE Added $totalSize to DataFormatter? to add useful output for pagination via "limit" and "offset" parameters
API CHANGE Removed RestfulServer?->search()
API CHANGE Changed output format for convertDataObjectSet() in XMLDataFormatter and JSONDataFormatter

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • modules/sapphire/branches/roa/api/DataFormatter.php

    r56976 r57417  
    6262         */ 
    6363        protected $outputContentType = null; 
     64         
     65        /** 
     66         * Used to set totalSize properties on the output 
     67         * of {@link convertDataObjectSet()}, shows the 
     68         * total number of records without the "limit" and "offset" 
     69         * GET parameters. Useful to implement pagination. 
     70         *  
     71         * @var int 
     72         */ 
     73        protected $totalSize; 
    6474         
    6575        /** 
     
    184194         
    185195        /** 
     196         * @param int $size 
     197         */ 
     198        public function setTotalSize($size) { 
     199                $this->totalSize = (int)$size; 
     200        } 
     201         
     202        /** 
     203         * @return int 
     204         */ 
     205        public function getTotalSize() { 
     206                return $this->totalSize; 
     207        } 
     208         
     209        /** 
    186210         * Returns all fields on the object which should be shown 
    187211         * in the output. Can be customised through {@link self::setCustomFields()}.