This repository has been archived by the owner on Mar 1, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
// show_product.php <id> | ||
require_once "bootstrap.php"; | ||
|
||
$id = $argv[1]; | ||
$product = $entityManager->find('Product', $id); | ||
|
||
if ($product === null) { | ||
echo "No product found.\n"; | ||
exit(1); | ||
} | ||
|
||
echo sprintf("-%s\n", $product->getName()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
// update_product.php <id> <new-name> | ||
require_once "bootstrap.php"; | ||
|
||
$id = $argv[1]; | ||
$newName = $argv[2]; | ||
|
||
$product = $entityManager->find('Product', $id); | ||
|
||
if ($product === null) { | ||
echo "Product $id does not exist.\n"; | ||
exit(1); | ||
} | ||
|
||
$product->setName($newName); | ||
|
||
$entityManager->flush(); |
4ea14ae
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @beberlei ,
In a project's source code, there are some classes having some methods and variables that are auto-generated by Doctrine ORM Framework, whose body definitions are difficult to find.
Are you having any idea of where are the body definitions of the methods provided by ORM Doctrine Framework and how to edit them ?
Regards,
Megha