PHP code example of mfn / cakephp2-magic-properties

1. Go to this page and download the library: Download mfn/cakephp2-magic-properties library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mfn / cakephp2-magic-properties example snippets


AppController extends Controller {
  $uses = ['Foo'];
  $component = ['Bar'];
}

/**
 * @property BarComponent $Bar
 * @property Foo $Foo
 */
AppController extends Controller {
  $uses = ['Foo'];
  $component = ['Bar'];
}

/**
 * @property BarComponent $Bar
 * @property Foo $Foo
 */
AppController extends Controller {
  $component = ['Bar'];
}

/**
 * @property BarComponent $Bar
 */
AppController extends Controller {
  $component = ['Bar'];
}
XML
  <taskdef name="cakephp2-magic-properties" classname="Mfn\CakePHP2\MagicProperty\Runner\PhingTask"/>

  <target name="generate">
    <cakephp2-magic-properties>
      <fileset dir="/path/to/your/cake/app/">
        <