Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Program.php

function Program::setBody

Sets the program's body

Parameters

Statement[]|ModuleDeclaration[] $body Program's body:

Return value

$this

File

vendor/mck89/peast/lib/Peast/Syntax/Node/Program.php, line 88

Class

Program
Root node for scripts and modules.

Namespace

Peast\Syntax\Node

Code

public function setBody($body) {
    $this->assertArrayOf($body, array(
        "Statement",
        "ModuleDeclaration",
    ));
    $this->body = $body;
    return $this;
}
RSS feed
Powered by Drupal