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

Breadcrumb

  1. Drupal Core 11.1.x

ExportAllDeclaration.php

Namespace

Peast\Syntax\Node

File

vendor/mck89/peast/lib/Peast/Syntax/Node/ExportAllDeclaration.php

View source
<?php


/**
 * This file is part of the Peast package
 *
 * (c) Marco Marchiò <marco.mm89@gmail.com>
 *
 * For the full copyright and license information refer to the LICENSE file
 * distributed with this source code
 */
namespace Peast\Syntax\Node;


/**
 * A node that represents an "export all" declaration.
 * For example: export * from "test"
 * 
 * @author Marco Marchiò <marco.mm89@gmail.com>
 */
class ExportAllDeclaration extends Node implements ModuleDeclaration {
    
    /**
     * Map of node properties
     * 
     * @var array 
     */
    protected $propertiesMap = array(
        "source" => true,
        "exported" => true,
    );
    
    /**
     * The export source
     *
     * @var Literal
     */
    protected $source;
    
    /**
     * The exported name
     *
     * @var Identifier|StringLiteral
     */
    protected $exported;
    
    /**
     * Returns the export source
     *
     * @return Literal
     */
    public function getSource() {
        return $this->source;
    }
    
    /**
     * Sets the export source
     *
     * @param Literal $source Export source
     *
     * @return $this
     */
    public function setSource(Literal $source) {
        $this->source = $source;
        return $this;
    }
    
    /**
     * Returns the exported name
     *
     * @return Identifier|StringLiteral
     */
    public function getExported() {
        return $this->exported;
    }
    
    /**
     * Sets the exported name
     *W
     * @param Identifier|StringLiteral $exported Exported name
     *
     * @return $this
     */
    public function setExported($exported) {
        $this->assertType($exported, array(
            "Identifier",
            "StringLiteral",
        ), true);
        $this->exported = $exported;
        return $this;
    }

}

Classes

Title Deprecated Summary
ExportAllDeclaration A node that represents an "export all" declaration. For example: export * from "test"

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal