Index
-
\com\setasign\Konquadrat
-
Field
- AbstractField
- Bitmask
- Boolean
- Callback
- Date
- Datetime
- DefaultValue
- DynamicFieldContainerField
- DynamicMagic
- FieldContainer
- FieldFactory
- File
- FloatField
- Image
- Integer
- InvalidValueException
- Json
- Magic
- MagicWithParam
- Money
- MultiLangString
- MultiLangText
- NullableBoolean
- Password
- Percentage
- Reference
- ResolveableInterface
- Select
- StringField
- Text
- Time
- UnsavedReferenceException
- Xml
-
Field
com\setasign\Konquadrat\Field
Image
File: /Konquadrat/src/Field/Image.php
Class hierarchy
Implements
Summary
Constants
ALLOW_NULL_VALUE
Properties
$directorySettings
protected File::$directorySettings
$externalFileFieldDirectories
protected array File::$externalFileFieldDirectories
$fieldConfig
protected AbstractField::$fieldConfig
$fieldContainer
protected AbstractField::$fieldContainer
$languageManager
protected AbstractField::$languageManager
$messageList
protected AbstractField::$messageList
$temporaryFileContent
protected ?string File::$temporaryFileContent
$value
protected mixed AbstractField::$value
The field value
Static Methods
ensureDataDirectory()
Ensures the data directory exist
Parameters
- $directorySettings : \com\setasign\Konquadrat\DirectorySettings
- $date : ?int
Exceptions
Methods
__construct()
public File::__construct (
\com\setasign\SetaFramework\Application\ApplicationConfig $applicationConfig,
\com\setasign\Konquadrat\DirectorySettings $directorySettings,
\com\setasign\Konquadrat\LanguageManager $languageManager,
\com\setasign\Konquadrat\Object\MessageList $messageList,
FieldContainer\FieldContainerInterface $fieldContainer,
string $name,
array $fieldConfig
)\com\setasign\Konquadrat\DirectorySettings $directorySettings,
\com\setasign\Konquadrat\LanguageManager $languageManager,
\com\setasign\Konquadrat\Object\MessageList $messageList,
FieldContainer\FieldContainerInterface $fieldContainer,
string $name,
array $fieldConfig
File constructor.
Parameters
- $applicationConfig : \com\setasign\SetaFramework\Application\ApplicationConfig
- $directorySettings : \com\setasign\Konquadrat\DirectorySettings
- $languageManager : \com\setasign\Konquadrat\LanguageManager
- $messageList : \com\setasign\Konquadrat\Object\MessageList
- $fieldContainer : FieldContainer\FieldContainerInterface
- $name : string
- $fieldConfig : array
Exceptions
parseValue()
setFile()
public File::setFile (
string $fileName,
string $mimeType,
null|string|resource|\Psr\Http\Message\StreamInterface $fileContent,
bool $instantSave = false,
?string $filePath = null
): stringstring $mimeType,
null|string|resource|\Psr\Http\Message\StreamInterface $fileContent,
bool $instantSave = false,
?string $filePath = null
Set file. Will generate the name of the file in kon2 data directory.
Parameters
- $fileName : string
- $mimeType : string
- $fileContent : null|string|resource|\Psr\Http\Message\StreamInterface
Note: resources will not be closed nor rewinded (before and after)!
- $instantSave : bool
If true the file will be saved instant
- $filePath : ?string
Return Values
The file path of the new file, if instantSave is false will not exist until the next save of the object.
Exceptions
setFileByFileObject()
public File::setFileByFileObject (
\com\setasign\SetaFramework\FileSystem\File $file,
bool $instantSave = false,
?string $filePath = null
): stringbool $instantSave = false,
?string $filePath = null
Will set the file by a file object. If the object is an instance of SavedFile it will share the exact same file!
Parameters
- $file : \com\setasign\SetaFramework\FileSystem\File
- $instantSave : bool
Will be ignored if $file is a SavedFile
- $filePath : ?string
Will only be used if the file is an UnsavedFile.
Return Values
The file path of the new file, if instantSave is false and $file is not a SavedFile the file will not exist until the next save of the object.
