PHP code example of netsilik / struct

1. Go to this page and download the library: Download netsilik/struct 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/ */

    

netsilik / struct example snippets


namespace Nestilik\Example;

use Netsilik\Lib\Struct;

/**
 * Foo class
 */
class Foo extends Struct
{
	/**
	 * @var array $_settableProperties The list of properties that are settable
	 */
	protected $_settableProperties = ['name', 'description'];
	
	/**
	 * @var integer $objectId
	 */
	protected $objectId;

	/**
	 * @var string $name
	 */
	protected $name;

	/**
	 * @var string $description
	 */
	protected $description;
}

$myFoo = new Foo();

$myFoo->name = 'Test';

echo $myFoo->name; // Test