package net.sourceforge.phpdt.internal.compiler.parser; import net.sourceforge.phpdt.internal.ui.PHPUiImages; import org.eclipse.jface.resource.ImageDescriptor; /** * A require, require_once, include or include_once declaration strongly inspired by the PHPFunctionDeclaration of Khartlage (:. * @author khartlage, Matthieu Casanova */ public class PHPReqIncDeclaration extends PHPSegment { /** What is required/included. */ private String value; /** * Create an include declaration. * @param parent the parent object (it should be a php class or function) * @param name it should be require, require_once, include or include_once * @param index where the keyword is in the file * @param value what is included */ public PHPReqIncDeclaration(Object parent, String name, int index, String value) { super(parent, name, index); this.value = value; } /** * Create an include declaration. * @param parent the parent object (it should be a php class or function) * @param name it should be require, require_once, include or include_once * @param index where the keyword is in the file */ public PHPReqIncDeclaration(Object parent, String name, int index) { this(parent, name, index,null); } /** * Get the image of a variable. * @return the image that represents a php variable */ public ImageDescriptor getImage() { return PHPUiImages.DESC_INC; } public String toString() { return name + " : " + value; } }