PHP code example of anovsiradj / cutter

1. Go to this page and download the library: Download anovsiradj/cutter library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

anovsiradj / cutter example snippets




$cutter = new anovsiradj\Cutter;
$cutter->set('layout','/layouts/main');

$cutter->data('page_title', 'My Posts'); // set variable

$cutter->view(
	'/pages/home',
	['date_today' => date('Y-m-d')], // set variable(s)
);

<!DOCTYPE html>
<html>
	<head>
		<title><?= $page_title 

 $this->begin('content') 

get( $key ) : void;
set( $key, mixed $val ) : void;

data( mixed $any [, mixed $val] ): mixed;

load( $file [, bool $isob = false] ): void;

view( mixed $name [, array $data = [] [, bool $render = true ] ] ) : void;

render( [array $data = [] ] ) : void;

section( $name ) : bool;

begin( $name ) : void;
end(): void