~stack.php-dev/stackphp/mcdev

« back to all changes in this revision

Viewing changes to StackExchange/StackBase.php

  • Committer: marco-ceppi
  • Date: 2010-09-09 23:24:26 UTC
  • Revision ID: marco.ceppi@seacrow.org-20100909232426-fbft44eclsor4qkn
Migrated stats code and error handling code to StackBase

Show diffs side-by-side

added added

removed removed

Lines of Context:
104
104
                
105
105
                return $data;
106
106
        }
 
107
 
 
108
        /**
 
109
         * Stats
 
110
         * Returns useful information regarding a site
 
111
         * 
 
112
         * @param array $params List of paramaters to execute.
 
113
         * 
 
114
         * @return false|array of statistical information
 
115
         */
 
116
        public function Stats( $params = array() )
 
117
        {
 
118
                return $this->_fetchPage('stats', $params);
 
119
        }
 
120
 
 
121
        /**
 
122
         * Stack Errors
 
123
         * Simulates an error given its code
 
124
         * 
 
125
         * @param int $error_id Error Code
 
126
         * @param array $params List of paramaters to execute.
 
127
         * 
 
128
         * @return false|array of error information
 
129
         */
 
130
        public function stackError( $error_id, $params = array() )
 
131
        {
 
132
                return $this->_fetchPage('errors/' . $error_id,$params);
 
133
        }
107
134
        
108
135
        /**
109
136
         * Rate Limit Max