getAuthor method

getAuthor the current page, this method used only with setAuthor method.

Basic Usage

The basic usage for getAuthor method is:

getAuthor(): string

Parameters

There is no parameter available for getAuthor method.

Example Usage

Usually this method called inside a layout file. Here is the basic example for getAuthor method. Here is the content of col-1.php layout file.

<!DOCTYPE html>
<html>
<head>
  ...
  <meta name="author" content="<?php echo $this->getAuthor(); ?>">
  ...
</head>
<body>
  ...
</body>
</html>

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.