- Seme Framework
- version 4.0.3
- Requirements
- Download & Install
- Configuration
- Tutorials
- URI Routing
- Constants
- Global Variables
- Model
- View
- Controller
- cdn_url
- config
- constructor
- getAdditional
- getAdditionalBefore
- getAdditionalAfter
- getAuthor
- getCanonical
- getContentLanguage
- getDescription
- getIcon
- getJsContent
- getJsFooter
- getJsReady
- getKey
- getKeyword
- getLang
- getRobots
- getShortcutIcon
- getThemeElement
- getTitle
- input
- lib
- load
- loadCss
- loadLayout
- putThemeContent
- putJsContent
- putJsFooter
- putJsReady
- render
- resetThemeContent
- session
- setAuthor
- setCanonical
- setContentLanguage
- setDescription
- setIcon
- setKey
- setKeyword
- setLang
- setShortcutIcon
- setTheme
- setTitle
- Library
- CLI (command line interface)
- Core
- Issue
- Deployment
getAuthor method
The getAuthor
is for retrieving text that set from setAuthor method.
Basic Usage
Here is the basic usage for getAuthor
method from SENE_Controller class.
$this->getAuthor(): string
Parameters
This method does not require any parameter.
Example Usage
Usually this method called inside a layout file. Here is the basic example for getAuthor
method that implemented on col-1.php
layout file.
<!DOCTYPE html>
<html>
<head>
...
<meta name="author" content="<?php echo $this->getAuthor(); ?>">
...
</head>
<body>
...
</body>
</html>
And then, here is the full file and directory structures.
app/
├──controller/
│ └── home.php
└── view/
└── front/
└── page/
└── col-1.php
Here is the content of home.php
controller file.
class Home extends SENE_Controller
{
public function __construct()
{
parent::__construct();
$this->setTheme('front');
}
public function index()
{
...
$this->setAuthor('Daeng R',$data);
$this->loadLayout('col-1',$data);
$this->render();
}
}
The meta author page name will be Daeng R
.