{1377} - 3.4.3.1.2 read

read(string $key = 'debug')
  1. read(string $key = 'debug')

Used to read configuration data from the application. Defaults to CakePHP’s important debug value. If a key is supplied, the data is returned. Using our examples from write() above, we can read that data back:

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

{3887} - 3.4.3.1.2 read

read(string $key = 'debug')

Used to read configuration data from the application. Defaults to CakePHP’s important debug value. If a key is supplied, the data is returned. Using our examples from write() above, we can read that data back:

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

Differences

Lines: 1-12Lines: 1-12
 <title>read</title> <title>read</title>
-<pre>read(string $key = 'debug')</pre> +<p class="method"><code>read(string $key = 'debug')</code></p>
 <p>Used to read configuration data from the application. Defaults to CakePHP’s important debug value. If a key is supplied, the data is returned. Using our examples from write() above, we can read that data back:</p> <p>Used to read configuration data from the application. Defaults to CakePHP’s important debug value. If a key is supplied, the data is returned. Using our examples from write() above, we can read that data back:</p>
 <pre> <pre>
 Configure::read('Company.name'); //yields: 'Pizza, Inc.' Configure::read('Company.name'); //yields: 'Pizza, Inc.'
 Configure::read('Company.slogan'); //yields: 'Pizza for your body and soul' Configure::read('Company.slogan'); //yields: 'Pizza for your body and soul'
   
 Configure::read('Company'); Configure::read('Company');
   
 //yields:  //yields:
-array('name' => 'Pizza, Inc.', 'slogan' => 'Pizza for your body and soul'); +array('name' =&amp;gt; 'Pizza, Inc.', 'slogan' =&amp;gt; 'Pizza for your body and soul');
 </pre> </pre>