12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- <?php
- defined('YII_DEBUG') or define('YII_DEBUG', true);
- defined('YII_ENV') or define('YII_ENV', 'dev');
- require __DIR__ . '/api/vendor/autoload.php';
- require __DIR__ . '/api/vendor/yiisoft/yii2/Yii.php';
- $config = require __DIR__ . '/api/config/web.php';
- (new yii\web\Application($config));
- $res = new app\models\LocomotiveModel();
- var_dump(gettype($res));
- defined('YII_DEBUG') or define('YII_DEBUG', true);
- defined('YII_ENV') or define('YII_ENV', 'dev');
- require DIR . '/api/vendor/autoload.php';
- require DIR . '/api/vendor/yiisoft/yii2/Yii.php';
- $config = require DIR . '/api/config/web.php';
- (new yii\web\Application($config));
- //if (!$logged_me_in_successfully234)
- //return;
-
-
-
- /*
- $my = 'hello';
- exit;
- require_once "doctrine/bootstrap.php";
- $product = $entityManager->find('Jobtype',0);
- die();
- foreach ($product->getTasktypesRel()->getValues() as $product) {
- var_dump( $product->getName());
-
- }
- exit;
- $jobtypes = new Jobtypes();
- $jobtypes->setName('мойщик окон');
- $productRepository = $entityManager->getRepository('Accounts')->findOneBy(['id' => 27 ] );
- //var_dump(get_class($productRepository));die();
- $jobtypes->addAcoountJobtypes($productRepository);
- $entityManager->persist($jobtypes);
- $entityManager->flush();
- //foreach ($productRepository as $value) {
-
- //}
- //$jobtypes = new Jobtypes();
- $accounts = new Account();
- $id = 1;//$argv[1];
- //$product = $entityManager->find('Accounts',1);
- // Вывод списка многие ко многим
- //$product = $entityManager->find('Jobtypes',21);
- $productRepository = $entityManager->getRepository('Section');
- $products = $productRepository->findAll();
- var_dump(empty($products));
- foreach ($products as $product) {
- var_dump( $product->getName());
- var_dump($product->getLocomotiveSeries());
- $ty = $product->getDateStartRepair();
- var_dump($ty->getTimestamp());
-
- }
- */
|