Page::__toString()

Proxy for the current object, casted as a string.

Table of Contents
  1. Description
  2. Example

Description

Page::__toString(): string;

This method will be called when you cast a Page instance as a string.

Example

$page = new Page(null, [
    'content' => '<p>Page content.</p>',
    'description' => 'Page description.',
    'title' => 'Page Title'
]);

echo $page->title; // Returns `'Page Title'`
echo $page; /* Returns `'---
description: Page description.
title: Page Title
...

<p>Page content.</p>'` */

Page::__toString()

Proxy for the current object, casted as a string.

Page::size()

Gets the file sizes in human readable string format.