Permalink
Browse files

supplements

  • Loading branch information...
1 parent 94619df commit 4991281dceddb604a5eba867b2d5462b2f289d37 @peponi committed Jan 26, 2013
Showing with 59 additions and 32 deletions.
  1. +21 −12 index.html
  2. +19 −10 index_en.html
  3. +19 −10 index_fr.html
View
@@ -160,9 +160,16 @@
<p>
<code>sudo apt-get install lamp-server php5 php5-gd php5-mysql php5-curl php5-cli php5-cgi php5-dev</code>
</p>
+ <br>
+ <p>Falls <b>lamp-server</b> nicht über die standard Repositories installieren kann, musst du den MySQL und Apache Server selbst installieren und konfigurieren.</p>
+ <p>
+ <code>sudo apt-get install mysql-server apache2 libapache2-mod-php5 php5 php5-gd php5-mysql php5-curl php5-cli php5-cgi php5-dev</code>
+ </p>
+ <br>
<p>Die einfachte und beste Methode w&auml;re wohl den <a href="http://wiki.ubuntuusers.de/Apache#Benutzerspezifisch">Apache so zu konfigurieren</a> das auf das Home Verzeichnis zugegriffen werden kann, damit der Programmiercode in <b>deinem Homeverzeichnis</b> unter <b>deinen Userrechten</b> liegen kann.</p>
<p>Wer den noch Symfony in <b>/var/www</b> laufen lassen möchte, muss sich um die <a href="http://symfony.com/doc/current/book/installation.html#configuration-and-setup"> Zugriffsrechte k&uuml;mmern</a>. Wir fügen unseren <b>Username</b> der Gruppe <b>www-data</b> hinzu und machen uns zum Owner des Symfony Ordners, damit wir auch in diesem Verzeichnis Schreibzugriff haben mit unser Entwicklungsumgebung.</p>
<pre class="highlight">
+
cd /var/www/Symfony
sudo usermod -aG Username www-data
sudo chown -R Username:www-data *
@@ -280,24 +287,26 @@
Also <a href="http://nubyonrails.com/tools/pluralize">pluralisieren</a> wir den Namen des Propertys -> <b>$ratings</b>.</p>
<p>Erstelle die Relations in deiner neuen Entity Klasse nach folgendem Muster:</p>
<pre class="highlight">
-<span class="sd">
-// Symfony/src/YourCompanyBundle/Restaruant/Entity/<b>Restaurant</b>.php
-
-/**
- * @ORM\<b>OneToMany</b>(targetEntity="Rating", mappedBy="restaurant")
- */
-</span>
-<span class="k">protected</span> $ratings;
+<span class="sd">// Symfony/src/YourCompanyBundle/Restaruant/Entity/<b>Restaurant</b>.php</span>
-<span class="k">public function</span> __construct()
+<span class="k">use</span> Doctrine\Common\Collections\ArrayCollection
+
+<span class="k">class</span> Restaurant
{
- $this<span class="k">-></span>ratings <span class="k">= new</span> ArrayCollection();
+ <span class="sd">/**
+ * @ORM\<b>OneToMany</b>(targetEntity="Rating", mappedBy="restaurant")
+ */ </span>
+ <span class="k">protected</span> $ratings;
+
+ <span class="k">public function</span> __construct()
+ {
+ $this<span class="k">-></span>ratings <span class="k">= new</span> ArrayCollection();
+ }
}
</pre>
<p>Und das selbe umgekehrt in das Rating Entity was von Restaurant abh&auml;ngt:</p>
<pre class="highlight">
-<span class="sd">
-// Symfony/src/YourCompanyBundleName/Restaruant/Entity/<b>Rating</b>.php
+<span class="sd">// Symfony/src/YourCompanyBundleName/Restaruant/Entity/<b>Rating</b>.php
/**
* @ORM\<b>ManyToOne</b>(targetEntity="Restaurant", inversedBy="ratings")
View
@@ -159,6 +159,12 @@
<p>
<code>sudo apt-get install lamp-server php5 php5-gd php5-mysql php5-curl php5-cli php5-cgi php5-dev</code>
</p>
+ <br>
+ <p>If <b>lamp-server</b> can't be found in the repository, you need to install and configure the MySQL and Apache server by self.</p>
+ <p>
+ <code>sudo apt-get install mysql-server apache2 libapache2-mod-php5 php5 php5-gd php5-mysql php5-curl php5-cli php5-cgi php5-dev</code>
+ </p>
+ <br>
<p>The easiest and best way would be to <a href="http://wiki.ubuntuusers.de/Apache#Benutzerspezifisch">configure your apache</a> to accessed your home directory, so that the code can be in <b>your home directory</b> under <b>your user rights</b>.</p>
<p>Who want nevertheless to run Symfony under <b>/var/www</b>, needs to set the <a href="http://symfony.com/doc/current/book/installation.html#configuration-and-setup">access rights</a> by self. We add our <b>Username</b> to group <b>www-data</b> and become the owner of the Symfony folder, to got write access with our develoment environment.</p>
<pre class="highlight">
@@ -278,18 +284,21 @@
<br>So we <a href="http://nubyonrails.com/tools/pluralize">pluralize</a> the name of the property to <b>$ratings</b>.</p>
<p>Create now the relations in your entity class like following pattern:</p>
<pre class="highlight">
-<span class="sd">
-// Symfony/src/YourCompanyBundle/Restaruant/Entity/<b>Restaurant</b>.php
-
-/**
- * @ORM\<b>OneToMany</b>(targetEntity="Rating", mappedBy="restaurant")
- */
-</span>
-<span class="k">protected</span> $ratings;
+<span class="sd">// Symfony/src/YourCompanyBundle/Restaruant/Entity/<b>Restaurant</b>.php</span>
-<span class="k">public function</span> __construct()
+<span class="k">use</span> Doctrine\Common\Collections\ArrayCollection
+
+<span class="k">class</span> Restaurant
{
- $this<span class="k">-></span>ratings = <span class="k">new</span> ArrayCollection();
+ <span class="sd">/**
+ * @ORM\<b>OneToMany</b>(targetEntity="Rating", mappedBy="restaurant")
+ */ </span>
+ <span class="k">protected</span> $ratings;
+
+ <span class="k">public function</span> __construct()
+ {
+ $this<span class="k">-></span>ratings <span class="k">= new</span> ArrayCollection();
+ }
}
</pre>
<p>And the same conversely in the rating entity which depends to the restaurant:</p>
View
@@ -126,6 +126,12 @@
<p>
<code>sudo apt-get install lamp-server php5 php5-gd php5-mysql php5-curl php5-cli php5-cgi php5-dev</code>
</p>
+ <br>
+ <p>Si vous ne trouvez pas <b>lamp-server</b> par les Repositoires standard, vous devez installer et configurer MySQL et Apache Server vous-même.</p>
+ <p>
+ <code>sudo apt-get install mysql-server apache2 libapache2-mod-php5 php5 php5-gd php5-mysql php5-curl php5-cli php5-cgi php5-dev</code>
+ </p>
+ <br>
<p>La méthode la plus simple serait de ainsi configurer <a href="http://wiki.ubuntuusers.de/Apache#Benutzerspezifisch">Apache </a> que c'est possible d' avoir accès au répertoire domestique pour qu'on puisse mettre le code dans <b>ton répertoire domestique</b> sous <b>tes droits d'usager</b>.</p>
<p>Qui aimerait utiliser Symfony dans <b>/var/www</b> doit s'occuper des droits d'accès <a href="http://symfony.com/doc/current/book/installation.html#configuration-and-setup"> </a>. </p>
<pre class="highlight">
@@ -245,18 +251,21 @@
Alors <a href="http://nubyonrails.com/tools/pluralize">nous réproduisons</a> le nom de la propertys -> <b>$ratings</b>.</p>
<p>Réalise les relations dans ta nouvelle classe d'entité par le modèle suivant: </p>
<pre class="highlight">
-<span class="sd">
-// Symfony/src/YourCompanyBundle/Restaruant/Entity/<b>Restaurant</b>.php
-
-/**
- * @ORM\<b>OneToMany</b>(targetEntity="Rating", mappedBy="restaurant")
- */
-</span>
-<span class="k">protected</span> $ratings;
+<span class="sd">// Symfony/src/YourCompanyBundle/Restaruant/Entity/<b>Restaurant</b>.php</span>
-<span class="k">public function</span> __construct()
+<span class="k">use</span> Doctrine\Common\Collections\ArrayCollection
+
+<span class="k">class</span> Restaurant
{
- $this<span class="k">-></span>ratings = <span class="k">new</span> ArrayCollection();
+ <span class="sd">/**
+ * @ORM\<b>OneToMany</b>(targetEntity="Rating", mappedBy="restaurant")
+ */ </span>
+ <span class="k">protected</span> $ratings;
+
+ <span class="k">public function</span> __construct()
+ {
+ $this<span class="k">-></span>ratings <span class="k">= new</span> ArrayCollection();
+ }
}
</pre>
<p>Et la même chose vice versa pour l' entité d'évaluation dépendant du restaurant:</p>

0 comments on commit 4991281

Please sign in to comment.