Example::__construct PHP Method

__construct() public method

public __construct ( )
    function __construct()
    {
        // Construct the parent class
        parent::__construct();
        // Configure limits on our controller methods
        // Ensure you have created the 'limits' table and enabled 'limits' within application/config/rest.php
        $this->methods['users_get']['limit'] = 500;
        // 500 requests per hour per user/key
        $this->methods['users_post']['limit'] = 100;
        // 100 requests per hour per user/key
        $this->methods['users_delete']['limit'] = 50;
        // 50 requests per hour per user/key
    }

Usage Example

Esempio n. 1
0
 public function __construct($name, ExampleGroup $group = null)
 {
     parent::__construct($name, $group, null);
 }