# FilePhpReturnInterface

Chevere\Interfaces\Filesystem\FilePhpReturnInterface

view source

# Description

Describes the component in charge of interact with .php files that return a variable.

<?php return 'Hello World!';
```;

## Constants

### PHP_RETURN

Type `string`

```php
'<?php return '

# PHP_RETURN_CHARS

Type integer

13

# Methods

# withStrict()

Return an instance with the strict flag.

# Parameters

  1. bool $strict

RETURN

FilePhpReturnInterface

This method MUST retain the state of the current instance, and return an instance that contains the specified the strict flag.

Strict validation refers to match the beginning of the file contents against FilePhpReturnInterface::PHP_RETURN


# filePhp()

Provides access to the FilePhpInterface instance.


# raw()

Retrieves the file return (as-is).

RETURN

void


# var()

Retrieves a PHP variable, applying unserialize to objects (if any).

RETURN

void


# varType()

Same as var(), but checking the variable $type.

# Parameters

  1. TypeInterface $type

RETURN

void


# put()

Put $var into the file using var_export return and strict format.

# Parameters

  1. VarExportableInterface $varExportable

RETURN

void


Last Updated: 8/2/2020, 1:36:58 AM