@@ -23,23 +23,23 @@ discard block |
||
23 | 23 | protected $UserRepository; |
24 | 24 | |
25 | 25 | |
26 | - protected $debugbar; |
|
26 | + protected $debugbar; |
|
27 | 27 | |
28 | 28 | |
29 | - /** |
|
29 | + /** |
|
30 | 30 | * IndexController, constructed by container |
31 | 31 | * |
32 | 32 | * @param Twig_Environment $twig |
33 | 33 | */ |
34 | 34 | public function __construct( |
35 | - Twig_Environment $twig, |
|
36 | - UserRepository $UserRepository, |
|
37 | - StandardDebugBar $debugbar |
|
38 | - ) |
|
35 | + Twig_Environment $twig, |
|
36 | + UserRepository $UserRepository, |
|
37 | + StandardDebugBar $debugbar |
|
38 | + ) |
|
39 | 39 | { |
40 | 40 | $this->twig = $twig; |
41 | 41 | $this->UserRepository = $UserRepository; |
42 | - $this->debugbar = $debugbar; |
|
42 | + $this->debugbar = $debugbar; |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | /** |
@@ -50,9 +50,9 @@ discard block |
||
50 | 50 | */ |
51 | 51 | public function get($args) |
52 | 52 | { |
53 | - $debugbarRenderer = $this->debugbar->getJavascriptRenderer("/assets/debug_bar"); |
|
53 | + $debugbarRenderer = $this->debugbar->getJavascriptRenderer("/assets/debug_bar"); |
|
54 | 54 | |
55 | - $this->debugbar["messages"]->addMessage("hello world!"); |
|
55 | + $this->debugbar["messages"]->addMessage("hello world!"); |
|
56 | 56 | |
57 | 57 | $Users = $this->UserRepository->findMany(); |
58 | 58 | |
@@ -75,8 +75,8 @@ discard block |
||
75 | 75 | |
76 | 76 | return new Response($this->twig->render('pages/index.html.twig', [ |
77 | 77 | "table" => $table->render(), |
78 | - "debugbar_Head" => $debugbarRenderer->renderHead(), |
|
79 | - "debugbar_Body" => $debugbarRenderer->render() |
|
78 | + "debugbar_Head" => $debugbarRenderer->renderHead(), |
|
79 | + "debugbar_Body" => $debugbarRenderer->render() |
|
80 | 80 | ])); |
81 | 81 | } |
82 | 82 | |
@@ -85,14 +85,14 @@ discard block |
||
85 | 85 | |
86 | 86 | |
87 | 87 | |
88 | - // $User = $this->UserRepository->build(); |
|
88 | + // $User = $this->UserRepository->build(); |
|
89 | 89 | //$User->setEmail('email.ru'); |
90 | 90 | //VarDumper::dump($User); |
91 | 91 | |
92 | 92 | try { |
93 | 93 | //$this->UserRepository->save($User); |
94 | 94 | |
95 | - //Faker |
|
95 | + //Faker |
|
96 | 96 | // $generator = \Faker\Factory::create(); |
97 | 97 | // $populator = new \Faker\ORM\Propel2\Populator($generator); |
98 | 98 | // $populator->addEntity('Core\Models\User\User', 5); |
@@ -25,7 +25,7 @@ |
||
25 | 25 | //var_dump($file->getRelativePathname()); |
26 | 26 | |
27 | 27 | if (!copy($file->getRealpath(), $root_path . '/db/' . $file->getRelativePathname())) { |
28 | - echo sprintf("error copy migration %s..." . PHP_EOL, $file->getRelativePathname()); |
|
28 | + echo sprintf("error copy migration %s..." . PHP_EOL, $file->getRelativePathname()); |
|
29 | 29 | } |
30 | 30 | else{ |
31 | 31 | echo sprintf("copy migration %s" . PHP_EOL, $file->getRelativePathname()); |
@@ -58,14 +58,14 @@ |
||
58 | 58 | Propel\Runtime\Propel::getServiceContainer()->setLogger('defaultLogger', $logger); |
59 | 59 | |
60 | 60 | $container->add(DebugBar\StandardDebugBar::class) |
61 | - ->withMethodCall("addCollector",[ |
|
62 | - new DebugBar\Bridge\Twig\TwigCollector( |
|
63 | - new DebugBar\Bridge\Twig\TraceableTwigEnvironment($container->get('Twig_Environment')) |
|
64 | - ) |
|
65 | - ]) |
|
66 | - ->withMethodCall("addCollector",[ |
|
67 | - new DebugBar\Bridge\Propel2Collector(Propel\Runtime\Propel::getConnection()) |
|
68 | - ]); |
|
61 | + ->withMethodCall("addCollector",[ |
|
62 | + new DebugBar\Bridge\Twig\TwigCollector( |
|
63 | + new DebugBar\Bridge\Twig\TraceableTwigEnvironment($container->get('Twig_Environment')) |
|
64 | + ) |
|
65 | + ]) |
|
66 | + ->withMethodCall("addCollector",[ |
|
67 | + new DebugBar\Bridge\Propel2Collector(Propel\Runtime\Propel::getConnection()) |
|
68 | + ]); |
|
69 | 69 | |
70 | 70 | |
71 | 71 | //Ропозиторий |
@@ -49,7 +49,6 @@ |
||
49 | 49 | * @method ChildUser findOneByRememberToken(string $remember_token) Return the first ChildUser filtered by the remember_token column |
50 | 50 | * @method ChildUser findOneByCreatedAt(string $created_at) Return the first ChildUser filtered by the created_at column |
51 | 51 | * @method ChildUser findOneByUpdatedAt(string $updated_at) Return the first ChildUser filtered by the updated_at column * |
52 | - |
|
53 | 52 | * @method ChildUser requirePk($key, ConnectionInterface $con = null) Return the ChildUser by primary key and throws \Propel\Runtime\Exception\EntityNotFoundException when not found |
54 | 53 | * @method ChildUser requireOne(ConnectionInterface $con = null) Return the first ChildUser matching the query and throws \Propel\Runtime\Exception\EntityNotFoundException when not found |
55 | 54 | * |
@@ -668,7 +668,7 @@ discard block |
||
668 | 668 | throw new PropelException('Cannot insert a value for auto-increment primary key (' . TaskTableMap::COL_ID . ')'); |
669 | 669 | } |
670 | 670 | |
671 | - // check the columns in natural order for more readable SQL queries |
|
671 | + // check the columns in natural order for more readable SQL queries |
|
672 | 672 | if ($this->isColumnModified(TaskTableMap::COL_ID)) { |
673 | 673 | $modifiedColumns[':p' . $index++] = 'id'; |
674 | 674 | } |
@@ -900,25 +900,25 @@ discard block |
||
900 | 900 | } |
901 | 901 | } |
902 | 902 | |
903 | - /** |
|
904 | - * Populate the current object from a string, using a given parser format |
|
905 | - * <code> |
|
906 | - * $book = new Book(); |
|
907 | - * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); |
|
908 | - * </code> |
|
909 | - * |
|
910 | - * You can specify the key type of the array by additionally passing one |
|
911 | - * of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME, |
|
912 | - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. |
|
913 | - * The default key type is the column's TableMap::TYPE_PHPNAME. |
|
914 | - * |
|
915 | - * @param mixed $parser A AbstractParser instance, |
|
916 | - * or a format name ('XML', 'YAML', 'JSON', 'CSV') |
|
917 | - * @param string $data The source data to import from |
|
918 | - * @param string $keyType The type of keys the array uses. |
|
919 | - * |
|
920 | - * @return $this|\Core\Models\Task\Task The current object, for fluid interface |
|
921 | - */ |
|
903 | + /** |
|
904 | + * Populate the current object from a string, using a given parser format |
|
905 | + * <code> |
|
906 | + * $book = new Book(); |
|
907 | + * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); |
|
908 | + * </code> |
|
909 | + * |
|
910 | + * You can specify the key type of the array by additionally passing one |
|
911 | + * of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME, |
|
912 | + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. |
|
913 | + * The default key type is the column's TableMap::TYPE_PHPNAME. |
|
914 | + * |
|
915 | + * @param mixed $parser A AbstractParser instance, |
|
916 | + * or a format name ('XML', 'YAML', 'JSON', 'CSV') |
|
917 | + * @param string $data The source data to import from |
|
918 | + * @param string $keyType The type of keys the array uses. |
|
919 | + * |
|
920 | + * @return $this|\Core\Models\Task\Task The current object, for fluid interface |
|
921 | + */ |
|
922 | 922 | public function importFrom($parser, $data, $keyType = TableMap::TYPE_PHPNAME) |
923 | 923 | { |
924 | 924 | if (!$parser instanceof AbstractParser) { |
@@ -365,8 +365,8 @@ |
||
365 | 365 | * @throws PropelException Any exceptions caught during processing will be |
366 | 366 | * rethrown wrapped into a PropelException. |
367 | 367 | */ |
368 | - public static function doDelete($values, ConnectionInterface $con = null) |
|
369 | - { |
|
368 | + public static function doDelete($values, ConnectionInterface $con = null) |
|
369 | + { |
|
370 | 370 | if (null === $con) { |
371 | 371 | $con = Propel::getServiceContainer()->getWriteConnection(UserTableMap::DATABASE_NAME); |
372 | 372 | } |
@@ -851,7 +851,7 @@ discard block |
||
851 | 851 | throw new PropelException('Cannot insert a value for auto-increment primary key (' . UserTableMap::COL_ID . ')'); |
852 | 852 | } |
853 | 853 | |
854 | - // check the columns in natural order for more readable SQL queries |
|
854 | + // check the columns in natural order for more readable SQL queries |
|
855 | 855 | if ($this->isColumnModified(UserTableMap::COL_ID)) { |
856 | 856 | $modifiedColumns[':p' . $index++] = 'id'; |
857 | 857 | } |
@@ -1147,25 +1147,25 @@ discard block |
||
1147 | 1147 | } |
1148 | 1148 | } |
1149 | 1149 | |
1150 | - /** |
|
1151 | - * Populate the current object from a string, using a given parser format |
|
1152 | - * <code> |
|
1153 | - * $book = new Book(); |
|
1154 | - * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); |
|
1155 | - * </code> |
|
1156 | - * |
|
1157 | - * You can specify the key type of the array by additionally passing one |
|
1158 | - * of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME, |
|
1159 | - * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. |
|
1160 | - * The default key type is the column's TableMap::TYPE_PHPNAME. |
|
1161 | - * |
|
1162 | - * @param mixed $parser A AbstractParser instance, |
|
1163 | - * or a format name ('XML', 'YAML', 'JSON', 'CSV') |
|
1164 | - * @param string $data The source data to import from |
|
1165 | - * @param string $keyType The type of keys the array uses. |
|
1166 | - * |
|
1167 | - * @return $this|\Core\Models\User\User The current object, for fluid interface |
|
1168 | - */ |
|
1150 | + /** |
|
1151 | + * Populate the current object from a string, using a given parser format |
|
1152 | + * <code> |
|
1153 | + * $book = new Book(); |
|
1154 | + * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); |
|
1155 | + * </code> |
|
1156 | + * |
|
1157 | + * You can specify the key type of the array by additionally passing one |
|
1158 | + * of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME, |
|
1159 | + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. |
|
1160 | + * The default key type is the column's TableMap::TYPE_PHPNAME. |
|
1161 | + * |
|
1162 | + * @param mixed $parser A AbstractParser instance, |
|
1163 | + * or a format name ('XML', 'YAML', 'JSON', 'CSV') |
|
1164 | + * @param string $data The source data to import from |
|
1165 | + * @param string $keyType The type of keys the array uses. |
|
1166 | + * |
|
1167 | + * @return $this|\Core\Models\User\User The current object, for fluid interface |
|
1168 | + */ |
|
1169 | 1169 | public function importFrom($parser, $data, $keyType = TableMap::TYPE_PHPNAME) |
1170 | 1170 | { |
1171 | 1171 | if (!$parser instanceof AbstractParser) { |
@@ -49,7 +49,6 @@ |
||
49 | 49 | * @method ChildUser findOneByRememberToken(string $remember_token) Return the first ChildUser filtered by the remember_token column |
50 | 50 | * @method ChildUser findOneByCreatedAt(string $created_at) Return the first ChildUser filtered by the created_at column |
51 | 51 | * @method ChildUser findOneByUpdatedAt(string $updated_at) Return the first ChildUser filtered by the updated_at column * |
52 | - |
|
53 | 52 | * @method ChildUser requirePk($key, ConnectionInterface $con = null) Return the ChildUser by primary key and throws \Propel\Runtime\Exception\EntityNotFoundException when not found |
54 | 53 | * @method ChildUser requireOne(ConnectionInterface $con = null) Return the first ChildUser matching the query and throws \Propel\Runtime\Exception\EntityNotFoundException when not found |
55 | 54 | * |
@@ -365,8 +365,8 @@ |
||
365 | 365 | * @throws PropelException Any exceptions caught during processing will be |
366 | 366 | * rethrown wrapped into a PropelException. |
367 | 367 | */ |
368 | - public static function doDelete($values, ConnectionInterface $con = null) |
|
369 | - { |
|
368 | + public static function doDelete($values, ConnectionInterface $con = null) |
|
369 | + { |
|
370 | 370 | if (null === $con) { |
371 | 371 | $con = Propel::getServiceContainer()->getWriteConnection(UserTableMap::DATABASE_NAME); |
372 | 372 | } |