# FilePhpReturnInterface

Chevere\Interfaces\Filesystem\FilePhpReturnInterface

view source (opens new window)

# 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

  • strict: bool

Return

self

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

Return

void


# put

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

Parameters

Return

void


Last Updated: 5/1/2021, 2:31:10 PM