Ratcherio Component is the way to integrate ratchet.io service with our Yii app. NB: Ratchet monitors and analyzes your app's errors and deploys.
-
Put
Ratchetio.php
you got after sign up on the service inside theprotected/extensions/yiiext/components/RatchetioComponent
directory. -
Add ratchetio as a Yii component in the config:
'ratchetio'=>array(
'class' => 'ext.yiiext.components.RatchetioComponent',
'accessToken' => 'your_ratchetio_token'
),
- Make the component preloadable (in most cases log component is also preloaded in Yii app):
'preload'=>array('log', 'ratchetio'),
- Set RatchetioErrorHandler as error handler:
'errorHandler'=>array(
'class'=>'ext.yiiext.components.ratchetio.RatchetioErrorHandler',
'errorAction'=>'site/error', # or some another value
),
You can also pass some additional ratchet.io options in the component config, such as environment
, branch
, maxErrno
or baseApiUrl
etc.