Skip to content

Commit 5863c09

Browse files
authored
Merge pull request #1 from wearenolte/update-namespace
Update namespace
2 parents 18507ef + 59b54a4 commit 5863c09

File tree

6 files changed

+39
-33
lines changed

6 files changed

+39
-33
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@ the process of define a new endpoint pretty straightforward.
1515
The easiest way to install this package is by using composer from your terminal:
1616

1717
```bash
18-
composer require moxie-lean/wp-endpoint
18+
composer require nolte/wp-endpoint
1919
```
2020

2121
Or by adding the following lines on your `composer.json` file
2222

2323
```json
2424
"require": {
25-
"moxie-lean/wp-endpoint": "dev-master"
25+
"nolte/wp-endpoint": "dev-master"
2626
}
2727
```
2828

29-
This will download the files from the [packagist site](https://packagist.org/packages/moxie-lean/wp-endpoint)
29+
This will download the files from the [packagist site](https://packagist.org/packages/nolte/wp-endpoint)
3030
and set you up with the latest version located on master branch of the repository.
3131

3232
After that you can include the `autoload.php` file in order to
@@ -42,7 +42,7 @@ After you added the dependency on your module you need to create a new class tha
4242

4343
```php
4444
<?php
45-
use Lean\AbstractEndpoint;
45+
use Nolte\AbstractEndpoint;
4646

4747
class customEndpoint extends AbstractEndpoint {
4848

@@ -98,9 +98,9 @@ For instance to define a new slug parameter with a different HTTP verb and reuse
9898
There is also an abstract class available for collections.
9999

100100
```php
101-
<?php namespace Lean\Endpoints;
101+
<?php namespace Nolte\Endpoints;
102102

103-
use Lean\AbstractCollectionEndpoint;
103+
use Nolte\AbstractCollectionEndpoint;
104104

105105
class MyCollection extends AbstractCollectionEndpoint {
106106

@@ -130,7 +130,7 @@ class MyCollection extends AbstractCollectionEndpoint {
130130

131131
### Filters
132132

133-
- `ln_endpoints_api_namespace`, This allow you to overwrite the default namespace used on the API definition.
134-
- `ln_endpoints_api_version`, This filter allow you to change the version number of the API.
135-
- `ln_endpoints_data_${api}`, where `${api}` is the name of your endpoint for instance in the case above: `ln_endpoints_data_customEndpoint`.
136-
- `ln_endpoints_collection_item`, to do custom formatting for collection items.
133+
- `nolte_endpoints_api_namespace`, This allow you to overwrite the default namespace used on the API definition.
134+
- `nolte_endpoints_api_version`, This filter allow you to change the version number of the API.
135+
- `nolte_endpoints_data_${api}`, where `${api}` is the name of your endpoint for instance in the case above: `nolte_endpoints_data_customEndpoint`.
136+
- `nolte_endpoints_collection_item`, to do custom formatting for collection items.

composer.json

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,28 @@
11
{
2-
"name": "moxie-lean/wp-endpoint",
2+
"name": "nolte/wp-endpoint",
33
"description": "wp-endpoint",
44
"keywords": [],
5-
"homepage": "https://github.com/moxie-lean/wp-endpoints-post/",
5+
"homepage": "https://github.com/wearenolte/wp-endpoint",
66
"type": "library",
77
"license": "MIT",
88
"authors": [
99
{
10-
"name": "Moxie Developers",
11-
"email": "developer@getmoxied.net"
10+
"name": "Nolte",
11+
"email": "developer@wearenolte.com",
12+
"homepage": "https://wearenolte.com/"
13+
},
14+
{
15+
"name": "Crisoforo Gaspar Hernandez",
16+
"email": "hello@crisoforo.com",
17+
"homepage": "https://crisoforo.com/"
1218
}
1319
],
1420
"require": {
1521
"php": ">=5.4"
1622
},
1723
"autoload": {
1824
"psr-4": {
19-
"Lean\\": "src/"
25+
"Nolte\\": "src/"
2026
}
2127
},
2228
"require-dev": {

licence

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2016 Lean
3+
Copyright (c) 2016 Nolte
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

src/AbstractCollectionEndpoint.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
<?php namespace Lean;
1+
<?php namespace Nolte;
22

3-
use Lean\AbstractEndpoint;
4-
use Lean\Endpoints\Filters;
3+
use Nolte\AbstractEndpoint;
4+
use Nolte\Endpoints\Filters;
55

66
/**
77
* Class that implements the behaviour of a collection of posts.
88
*
9-
* @package Lean;
9+
* @package Nolte;
1010
*/
1111
abstract class AbstractCollectionEndpoint extends AbstractEndpoint {
1212

src/AbstractEndpoint.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
<?php namespace Lean;
1+
<?php namespace Nolte;
22

3-
use Lean\Endpoints\Filters;
4-
use Lean\Endpoints\Contract;
3+
use Nolte\Endpoints\Filters;
4+
use Nolte\Endpoints\Contract;
55

66
/**
77
* Class that creates the default behavior used to register a new endpoint and
8-
* also the same logic that is used across all lean PHP modules.
8+
* also the same logic that is used across all Nolte PHP modules.
99
*
10-
* @package Lean;
10+
* @package Nolte;
1111
*/
1212
abstract class AbstractEndpoint {
1313

@@ -16,7 +16,7 @@ abstract class AbstractEndpoint {
1616
*
1717
* @var string
1818
*/
19-
protected $endpoint = '/lean';
19+
protected $endpoint = '/nolte';
2020

2121
/**
2222
* Static method as user interface for the class that creates a new object
@@ -46,7 +46,7 @@ public function create() {
4646
* @since 0.1.0
4747
*/
4848
private function set_variables() {
49-
$this->namespace = apply_filters( Filters::API_NAMESPACE, 'lean', $this->endpoint );
49+
$this->namespace = apply_filters( Filters::API_NAMESPACE, 'nolte', $this->endpoint );
5050
$this->version = apply_filters( Filters::API_VERSION, 'v2', $this->endpoint );
5151
}
5252

src/Endpoints/Filters.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
<?php namespace Lean\Endpoints;
1+
<?php namespace Nolte\Endpoints;
22

33
/**
44
* Defines the filters used on the Endpoint class.
55
*
6-
* @package Lean/Endpoints
6+
* @package Nolte/Endpoints
77
*/
88
class Filters {
9-
const API_NAMESPACE = 'ln_endpoints_api_namespace';
10-
const API_VERSION = 'ln_endpoints_api_version';
11-
const API_DATA = 'ln_endpoints_data';
12-
const ITEM_FORMAT = 'ln_endpoints_collection_item';
9+
const API_NAMESPACE = 'nolte_endpoints_api_namespace';
10+
const API_VERSION = 'nolte_endpoints_api_version';
11+
const API_DATA = 'nolte_endpoints_data';
12+
const ITEM_FORMAT = 'nolte_endpoints_collection_item';
1313
}

0 commit comments

Comments
 (0)