$name = $callbacks[$name]; } } if ( !isset( $this->doWork ) ) { throw new MWException( "No callback provided for 'doWork' function." ); } $this->cacheable = isset( $this->doCachedWork ); } public function doWork() { return ( $this->doWork )(); } public function getCachedWork() { if ( $this->doCachedWork ) { return ( $this->doCachedWork )(); } return false; } public function fallback() { if ( $this->fallback ) { return ( $this->fallback )(); } return false; } public function error( $status ) { if ( $this->error ) { return ( $this->error )( $status ); } return false; } }