PHP code example of xin / capsule

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

    

xin / capsule example snippets


class Rebot extends Manager {

	/**
	 * @inerhitDoc
	 */
	public function getDefaultDriver()
	{
		return $this->getConfig('defaults.robot', 'default');
	}

	/**
	 * @inerhitDoc
	 */
	public function setDefaultDriver($name)
	{
		$this->setConfig('defaults.robot', $name);
	}

	/**
	 * @inerhitDoc
	 */
	public function getDriverConfig($name)
	{
		$key = 'robots';

		return $this->getConfig($name ? "{$key}.{$name}" : $key);
	}
}