Skip to content

Commit

Permalink
update Config
Browse files Browse the repository at this point in the history
  • Loading branch information
vzuburlis committed Nov 15, 2020
1 parent 4a39eeb commit 3f95952
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 11 deletions.
23 changes: 16 additions & 7 deletions source/api-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ Config::amenu_child('item', ['Child Item','controller/action','icon'=>'item-icon
- $pass:string The string to be hashed.


### option ()
### getOption ()
(static) Gets an option value.

**Parameters**
Expand All @@ -148,18 +148,27 @@ Config::amenu_child('item', ['Child Item','controller/action','icon'=>'item-icon
- $path:string Folder path.


### make_url ()
(static) Generates a url. Return the full url path to print.
### url ()
(static) Generates a url. Return the url path to print.

**Parameters**
- $c:string The controller.
- $action:string The action.
- $str:string The path.
- $args:Array (optional) The query parameters in array.

Examples:
```
$url1 = Config::make_url('blog','post',[1]);`` returns mysite.com/blog/post/1
$url1 = Config::make_url('blog','',['page1']);`` returns mysite.com/blog/page1
$url = Config::url('blog/post',['id'=>1]);`` returns mysite.com/blog/post?id=1
```

### base ()
(static) Generates a url. Returns the full url path to print.

**Parameters**
- $str:string The path.

Examples:
```
$url = Config::base('blog/post?id=1');`` returns https://mysite.com/blog/post?id=1
```


Expand Down
9 changes: 5 additions & 4 deletions source/api-router.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,9 @@ Router::onAction('blog', 'topics', function(){ View::set('new_variable', 'value'
- $action:string The action
- $fn:function Callback

Example:
```
Router::action('blog', 'topics', function(){ blog::tagsAction(); });
```
### getController ()
(static) Returns the name of the controller that runs. Default: as set in the settings

### getAction ()
(static) Returns the name of the action that runs. Default: 'index'

0 comments on commit 3f95952

Please sign in to comment.