{ID} - 3.4.3.1.1 write

write(string $key, mixed $value)

Gunakan write() untuk menyimpan data di dalam konfigurasi aplikasi anda.

Configure::write('Company.name','Pizza, Inc.');
Configure::write('Company.slogan','Pizza for your body and soul');
  1. Configure::write('Company.name','Pizza, Inc.');
  2. Configure::write('Company.slogan','Pizza for your body and soul');

penggunaan notasi titik di dalam parameter $key. Anda bisa menggunakan notasi ini untuk mengorganisir konfigurasi anda dalam satu gruo logikal.

Contoh di atas juga bisa ditulis dalam satu panggilan :

Configure::write(
    'Company',array('name'=>'Pizza, Inc.','slogan'=>'Pizza for your body and soul')
);
  1. Configure::write(
  2. 'Company',array('name'=>'Pizza, Inc.','slogan'=>'Pizza for your body and soul')
  3. );

Anda bisa menggunakan Configure::write('debug', $int) untuk berpindah antara mode debug dan mode produksi secara langsung (on the fly). Hal ini akan berguna terutama untuk AMF atau interaksi SOAP dimana melakukan debugging informasi bisa menyebabkan masalah parsing.

{EN} - 3.4.3.1.1 write

write(string $key, mixed $value)

Use write() to store data in the application’s configuration.

Configure::write('Company.name','Pizza, Inc.');
Configure::write('Company.slogan','Pizza for your body and soul');
  1. Configure::write('Company.name','Pizza, Inc.');
  2. Configure::write('Company.slogan','Pizza for your body and soul');

the usage of dot notation in the $key parameter. You can use this notation to organize your configuration into logical groups.

The above example could also be written in a single call:

Configure::write(
    'Company',array('name'=>'Pizza, Inc.','slogan'=>'Pizza for your body and soul')
);
  1. Configure::write(
  2. 'Company',array('name'=>'Pizza, Inc.','slogan'=>'Pizza for your body and soul')
  3. );

You can use Configure::write('debug', $int) to switch between debug and production modes on the fly. This is especially handy for AMF or SOAP interactions where debugging information can cause parsing problems.

Differences

Lines: 1-15Lines: 1-16
 <title>write</title> <title>write</title>
 <p class="method"><code>write(string $key, mixed $value)</code></p> <p class="method"><code>write(string $key, mixed $value)</code></p>
-<p>Use <code>write()</code> to store data in the application’s configuration.</p> +<p>Gunakan <code>write()</code> untuk menyimpan data di dalam konfigurasi aplikasi anda.</p>
 <pre> <pre>
 Configure::write('Company.name','Pizza, Inc.'); Configure::write('Company.name','Pizza, Inc.');
 Configure::write('Company.slogan','Pizza for your body and soul'); Configure::write('Company.slogan','Pizza for your body and soul');
 </pre> </pre>
-<p class="note">the usage of dot notation in the <code>$key</code> parameter. You can use this notation to organize your configuration into logical groups.</p>
<p>The above example could also be written in a single call:</p>
+<p class="note"> />penggunaan notasi titik di dalam parameter <code>$key</code>. Anda bisa menggunakan notasi ini untuk mengorganisir konfigurasi anda dalam satu gruo logikal.</p>
<p>Contoh di atas juga bisa ditulis dalam satu panggilan :</p>
 <pre> <pre>
 Configure::write( Configure::write(
  'Company',array('name'=&gt;'Pizza, Inc.','slogan'=&gt;'Pizza for your body and soul')  'Company',array('name'=&gt;'Pizza, Inc.','slogan'=&gt;'Pizza for your body and soul')
 ); );
 </pre> </pre>
-<p>You can use <code>Configure::write('debug', $int)</code> to switch between debug and production modes on the fly. This is especially handy for AMF or SOAP interactions where debugging information can cause parsing problems.</p> +<p>Anda bisa menggunakan <code>Configure::write('debug', $int)</code> untuk berpindah antara mode debug dan mode produksi secara langsung (on the fly). Hal ini akan berguna terutama untuk AMF atau interaksi SOAP dimana melakukan <em>debugging</em> informasi bisa menyebabkan masalah parsing.</p>