PHPackages                             jorge/cakephp3utilities - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. jorge/cakephp3utilities

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

jorge/cakephp3utilities
=======================

Utilities for CakePHP 3.x

0.1.1(10y ago)0136MITPHP &gt;=5.4.16

Since Jan 13Compare

[ Source](https://github.com/jorgejardim/cakephp-3-utilities)[ Packagist](https://packagist.org/packages/jorge/cakephp3utilities)[ RSS](/packages/jorge-cakephp3utilities/feed)WikiDiscussions Synced today

READMEChangelogDependencies (3)Versions (3)Used By (0)

\#Utilities for CakePHP 3.x

- Gerencianet
- Cpanel XmlApi

Install
-------

[](#install)

Composer:

```
require: "jorge/cakephp3utilities": "dev-master"

```

Configuration
-------------

[](#configuration)

```
'CPanel' => [
    'default' => [
        'domain' => 'tryggu.com.br',
        'username' => 'tryggu',
        'password' => 't4r5zjj',
        'port' => '2082',
        'debug' => true
    ]
],
'Gerencianet' => [
    'token' => 'ADFS7F834KDJULJORGE5993485H5KK3GG2234678',
],

```

Gerencianet Example
-------------------

[](#gerencianet-example)

```
$this->loadComponent('CakePHP3Utilities.Gerencianet');
$this->Gerencianet->item('Produto 1', 1, '1.200,00');
$this->Gerencianet->vencimento('2015-10-30');
$this->Gerencianet->retorno(time(), 'http://www.suaurl.com.br', 'http://www.suaurl.com.br');
$this->Gerencianet->cliente(
    'Maria da Silva',
    'email@teste.com.br',
    '(11) 98549-8123',
    '1980-11-24',
    '120.445.115-00'
);
$this->Gerencianet->endereco(
    '02462-020',
    'Rua Manoel Almeida Santos',
    '524',
    null,
    'V. Paulista',
    'Sao Paulo',
    'SP'
);
$this->Gerencianet->marketplace('3VTV93SFBKHL');
$this->Gerencianet->periodicidade(1);
$return = $this->Gerencianet->enviar();

```

Cpanel XmlApi Example
---------------------

[](#cpanel-xmlapi-example)

```
$this->loadComponent('CakePHP3Utilities.CPanel');
if ($this->CPanel->domainCreatedSub('subdomain', 'yourdomain.com.br')) {
    # code...
} else {
    $this->Flash->error(__($this->CPanel->error));
}

```

Example of Validation of Brazilian data
---------------------------------------

[](#example-of-validation-of-brazilian-data)

Add on Model:

```
