api_getsectionremarks.php 852 B

1234567891011121314151617181920212223242526
  1. <?php
  2. defined('YII_DEBUG') or define('YII_DEBUG', true);
  3. defined('YII_ENV') or define('YII_ENV', 'dev');
  4. require 'api/vendor/autoload.php';
  5. require 'api/vendor/yiisoft/yii2/Yii.php';
  6. $config = require 'api/config/web.php';
  7. (new yii\web\Application($config));
  8. $locomotiveModel = new app\models\LocomotiveModel();
  9. //$lcontr = new \app\controllers\LocomotiveController();// LocomotiveController();
  10. //$params['number'] = '0460Б';
  11. $params['section_id'] = '3ac3f7e5-4846-11e3-9348-ac162db0b20c';
  12. //$params['subnumber'] = '11384880';
  13. //$url = Yii::$app->params['api']['domain'] . Yii::$app->params['api']['pathListOfSections'];
  14. $result = $locomotiveModel->getSectionRemarks($params);
  15. //echo json_decode($result);
  16. var_dump( $result);
  17. //string(72) "{"error":"Невозможно найти секцию с id undefined"}"
  18. ?>