This is the class expRecord
define |
"BASE" "../../.." |
---|---|
package |
Modules |
__construct(null $params = null, boolean $get_assoc = true, boolean $get_attached = true)
Throws |
|
---|
null
boolean
boolean
afterCreate()
afterDelete()
afterSave()
afterUpdate()
afterValidation()
afterValidationOnCreate()
afterValidationOnUpdate()
associateWith( $datatype, $id)
Type of associations has_and_belongs_to_many
attachItem( $item, string $subtype = '', boolean $replace = true) : boolean
string
boolean
boolean
beforeCreate()
beforeDelete()
beforeSave()
beforeUpdate()
beforeValidation()
beforeValidationOnCreate()
beforeValidationOnUpdate()
build(mixed $params = array())
Loads Table schema data and creates new class properties based upon the fields in given table.
Additionally, if a record ID is given, that record is pulled and field values are also populated into class properties.
category |
db_record |
---|---|
uses |
Builds a data definition from existing table. |
requires |
$db |
access |
protected |
final | |
PHPUnit |
Not Defined |
global |
object $db |
mixed
array or Object for table selection
canCreate(string $dest) : integer
Returns one of the following:
SYS_FILES_NOTWRITABLE - unable to create files in destination
SYS_FILES_SUCCESS - A file or directory can be created in destination
SYS_FILES_FOUNDFILE - Found destination to be a file, not a directory
node |
Model:expFile |
---|
string
Path to the directory to check
integer
canUpload(string $tmp = 'tmp', string $dest = 'files/uploads') : boolean
string
string
boolean
checkForAttachableItems( $params) : boolean
boolean
copyDirectoryStructure(string $src, string $dest, array $exclude_dirs = array())
Any files in the source directory are ignore, and duplicate copies are made (no symlinks).
node |
Model:expFile |
---|---|
string
The directory to copy structure from. This must be a full path.
string
The directory to create duplicate structure in. If this directory is not empty, you may run into some problems, because of file/directory conflicts.
array
An array of directory names to exclude. These names are path-independent. Specifying "dir" will ignore all directories and sub-directories named "dir", regardless of their parent.
copyToDirectory( $destination)
delete(string $where = '') : boolean
string
boolean
download(string $file) : boolean
static | |
---|---|
access |
public |
uses |
download() Built-in PHP method |
PHPUnit |
Not Defined|Implement|Completed |
string
Full path to file to download
boolean
dumpDatabase(\null/array $tables = null, \null/string $type = null, \null/string/array $opts = null) : string
The contents of the string are suitable for storage in a file or other permanent mechanism, and is in the EQL format naively handled by the current implementation.
node |
Model:expFile |
---|
\null/array
\null/string
The type of dump
\null/string/array
Record descimiator
string
The content of export file
exists()
fileSize(boolean|string $_path = false) : integer
static | |
---|---|
access |
public |
uses |
filesize() Built-in PHP method |
PHPUnit |
Not Defined|Implement|Completed |
Throws |
|
boolean|string
Full path to file to pull info from
integer
$_fileSize Size of file in bytes
fileUpload(string $_postName = null, boolean|string $_force = false, boolean|string $_save = true, string $_destFile = null, string $_destDir = null, null $_max_width = null) : object
File UPLOAD is a straight forward uploader and processor. It can accept filename and destination directory overrides as well. It has an additional pair of flags that allow for an upload NOT to be inserted into the database (default to INSERT) and if it previous file, with the same name, should be overwritten (default to NO overwrite)
static | |
---|---|
access |
public |
uses |
description |
requires |
class_name |
PHPUnit |
Not Defined|Implement|Completed |
TODO |
Have file upload overwrite make sure not to duplicate its record in the DB |
string
The name of the _FILE upload array
boolean|string
Force the uploaded to overwrite existing file of same name
boolean|string
Save file info to database, defaults to TRUE
string
Override the uploaded file name
string
Override the default FILE UPLOAD location
null
object
$_objFile expFile Object
fileXHRUpload(null $fileName = null, boolean|string $_force = false, boolean|string $_save = true, string $_destFile = null, string $_destDir = null, null $_max_width = null) : object
File UPLOAD is a straight forward uploader and processor. It can accept filename and destination directory overrides as well. It has an additional pair of flags that allow for an upload NOT to be inserted into the database (default to INSERT) and if it previous file, with the same name, should be overwritten (default to NO overwrite)
static | |
---|---|
access |
public |
uses |
description |
requires |
class_name |
PHPUnit |
Not Defined|Implement|Completed |
TODO |
Have file upload overwrite make sure not to duplicate its record in the DB |
null
boolean|string
Force the uploaded to overwrite existing file of same name
boolean|string
Save file info to database, defaults to TRUE
string
Override the uploaded file name
string
Override the default FILE UPLOAD location
null
object
$_objFile expFile Object
find(string $range = 'all', null $where = null, null $order = null, null $limit = null, integer $limitstart, boolean $get_assoc = true, boolean $get_attached = true, array $except = array(), boolean $cascade_except = false) : array|integer
string
null
null
null
integer
boolean
boolean
array
boolean
array|integer
findBy( $column, $value, boolean $get_assoc = true, boolean $get_attached = true, array $except = array(), boolean $cascade_except = false) : array
boolean
boolean
array
boolean
array
findValue(string $range = 'all', string $column, string $where = null, string $order = null, boolean $distinct = false) : array|boolean
string
string
string
string
boolean
array|boolean
findWhereAttachedTo( $content_type) : array
array
fixName(string $name) : string
static | |
---|---|
access |
public |
uses |
preg_replace built-in PHP Function |
PHPUnit |
Not Defined|Implement|Completed |
Throws |
|
string
File name to 'fix'
string
$name the correct filename
getAssociatedObjects(null $obj = null) : null
Type of associations has_one has_many has_and_belongs_to_many
null
null
getAssociatedObjectsForThisModel(array $except = array(), boolean $cascade_except = false)
Type of associations has_extended_fields has_one has_many has_many_self has_and_belongs_to_many has_and_belongs_to_self
array
boolean
getAttachableItems()
getAttachableItemTables() : array
array
getImageInfo(boolean|string $_path = false) : array
static | |
---|---|
access |
public |
uses |
getimagesize() Built-in PHP function |
PHPUnit |
Not Defined|Implement|Completed |
boolean|string
Full path to file to pull info from
array
$_sizeinfo An array of Image File info
getMimeType(string $filename) : string
string
string
getPoster(null $display = null) : null|string
null
null|string
getTimestamp(integer $type) : mixed
integer
mixed
imageCaptcha( $w, $h, $string) : null|resource
null|resource
imageCopyresized( $dest, $src, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h) : boolean|null
boolean|null
imageCreate(integer $w, integer $h) : null|resource
This is a wrapper around various GD functions, to provide Exponent programmers a single point of entry. It also handles situations where there is no GD support compiled into the server. (In this case, null is returned).
node |
Model:expFile |
---|
integer
Width of the image resource to create (in pixels)
integer
Height of the image resource to create (in pixels)
null|resource
imageFlip( $filename, boolean $is_horizontal = false) : array|null|resource|string
boolean
array|null|resource|string
imageOutput( $img, $sizeinfo, null $filename = null, integer $quality = 75)
null
integer
imageRotate( $filename, $degrees) : array|null|resource|string
array|null|resource|string
imageScaleByPercent(string $filename, float $scale) : array|null|resource|string
node |
Model:expFile |
---|
string
The path/filename of the image to scale.
float
The scaling factor, as a decimal (i.e. 0.5 for 50%)
array|null|resource|string
imageScaleManually(string $filename, integer $width, integer $height) : array|null|resource|string
This is a wrapper around various GD functions, to provide Exponent programmers a single point of entry. It also handles situations where there is no GD support compiled into the server. (In this case, null is returned).
node |
Model:expFile |
---|
string
The path/filename of the image to scale.
integer
The desired width of the scaled image, in pixels.
integer
The desired height of the scaled image, in pixels.
array|null|resource|string
imageScaleToConstraint(string $filename, integer $width, integer $height) : array|null|resource|string
This is a wrapper around various GD functions, to provide Exponent programmers a single point of entry. It also handles situations where there is no GD support compiled into the server. (In this case, null is returned).
node |
Model:expFile |
---|
string
The path/filename of the image to scale.
integer
The maximum width of the scaled image, in pixels.
integer
The maximum height of the scaled image, in pixels.
array|null|resource|string
imageScaleToHeight(string $filename, integer $height) : array|null|resource|string
This is a wrapper around various GD functions, to provide Exponent programmers a single point of entry. It also handles situations where there is no GD support compiled into the server. (In this case, null is returned).
node |
Model:expFile |
---|
string
The path/filename of the image to scale.
integer
The desired height of the scaled image, in pixels.
array|null|resource|string
imageScaleToWidth(string $filename, integer $width) : array|null|resource|string
This is a wrapper around various GD functions, to provide Exponent programmers a single point of entry. It also handles situations where there is no GD support compiled into the server. (In this case, null is returned).
node |
Model:expFile |
---|
string
The path/filename of the image to scale.
integer
The desired width of the scaled image, in pixels.
array|null|resource|string
is_file(string $filename) : boolean
Returns true if the file already exists, and false if it does not.
node |
Model:expFile |
---|
string
The file (with path) to check.
boolean
isSearchable() : boolean
boolean
listFlat(string $dir, boolean $recurse = false, string $ext = null, array $exclude_dirs = array(), string $relative = "") : array
node |
Model:expFile |
---|
string
The path of the directory to look at.
boolean
A boolean dictating whether to descend into subdirectories recursively, and list files and subdirectories.
string
An optional file extension. If specified, only files ending with that file extension will show up in the list. Directories are not affected.
array
An array of directory names to exclude. These names are path-independent. Specifying "dir" will ignore all directories and sub-directories named "dir", regardless of their parent.
string
array
make_expFile( $path) : array|\expFile|integer
makeDirectory(string $dir, null $mode = null, boolean $is_full = false) : integer
node |
Model:expFile |
---|
string
The directory to create. This path must be relative to BASE
null
boolean
integer
makeManyToManyTablename( $assoc_table) : string
string
makeSefUrl()
moveUploadedFile(string $tmp_name, string $dest) : null|string
This function takes into account the default file modes specified in the site configuration.
node |
Model:expFile |
---|
string
The temporary path of the uploaded file.
string
The full path to the destination file (including the destination filename).
null|string
The destination file if it exists, otherwise null
name() : string
string
openImageFile(string $filename, null $sizeinfo = null) : null|resource|string
This is a wrapper around various GD functions, to provide Exponent programmers a single point of entry. It also handles situations where there is no GD support compiled into the server. (In this case, null is returned).
At this point, the user should have called self::getImageInfo on the filename and verified that the file does indeed exist, and is readable. A safeguard check is in place, however.
node |
Model:expFile |
---|
string
The path/filename of the image.
null
null|resource|string
parseDatabase(string $file, array &$errors, \null/string/array $type = null) : \array/bool
node |
Model:expFile |
---|
string
The filename of the EQL file to parse
array
A referenced array that stores errors. Whatever variable is passed in this argument will contain all errors encountered during the parse/restore.
\null/string/array
The list of tables to return, empty = entire file
\array/bool
recurse_copy( $src, $dst) : boolean
boolean
refresh() : boolean
Throws |
|
---|
boolean
removeDirectory(string $dir) : integer
node |
Model:expFile |
---|
string
directory to work with
integer
removeFilesInDirectory(string $dir, boolean $dot_files = false) : array
Optionally can skip dotfiles
string
directory to work with
boolean
should dotfiles be removed?
array
rerank( $direction, string $where = '')
string
resolveDuplicateFilename(string $filepath) : integer
static | |
---|---|
access |
public |
uses |
filesize() Built-in PHP method |
PHPUnit |
Not Defined|Implement|Completed |
Throws |
|
string
direct path of the file to check against
integer
$newFileName Name of the file that isn't a duplicate
restoreDatabase(string $file, array &$errors, null $type = null) : boolean
node |
Model:expFile |
---|---|
Throws |
|
string
The filename of the EQL file to restore from
array
A referenced array that stores errors. Whatever variable is passed in this argument will contain all errors encountered during the parse/restore.
null
boolean
save(boolean $validate = false, boolean $force_no_revisions = false)
boolean
boolean
saveAssociatedObjects()
Type of associations has_one
selectAllFiles()
update(array|object $params = array())
array|object
updateFormbuilderTable( $object) : mixed
static |
---|
mixed
uploadDestinationFileExists(string $dir, string $name) : boolean
Returns true if the file already exists, and false if it does not.
node |
Model:expFile |
---|
string
The directory to contain the existing directory.
string
The name of the file control used to upload the file. The files subsystem will look to the $_FILES array to get the filename of the uploaded file.
boolean
validate() : boolean
boolean
SYS_IMAGE
IMAGE_ERR_NOGD
IMAGE_ERR_NOTSUPPORTED
IMAGE_ERR_FILENOTFOUND
IMAGE_ERR_PERMISSIONDENIED
FILE_MODE_READ
constant |
string FILE_MODE_READ |
---|---|
access |
private |
PHPUnit |
Not Defined |
FILE_MODE_WRITE
constant |
string FILE_MODE_WRITE |
---|---|
access |
private |
PHPUnit |
Not Defined |
FILE_MODE_APPEND
constant |
string FILE_MODE_APPEND |
---|---|
access |
private |
PHPUnit |
Not Defined |
FILE_LOCK_SHARED
This is a "relabel" of the PHP 'LOCK_SH' constant
constant |
string FILE_LOCK_SHARED |
---|---|
access |
private |
PHPUnit |
Not Defined |
FILE_LOCK_EXCLUSIVE
constant |
string FILE_LOCK_EXCLUSIVE |
---|---|
access |
private |
PHPUnit |
Not Defined |
table :
public | |
---|---|
property |
Database Table Name |
attachable_table :
attachable_item_types :
directory :
protected | |
---|---|
property |
Relative OS System File path |
filename :
public | |
---|---|
property |
Name of File to process |
filesize :
protected | |
---|---|
property |
Size of File, in Bytes. |
mimetype :
public | |
---|---|
property |
File MIME Type |
image_width :
public | |
---|---|
property |
Image width in pixels |
image_height :
public | |
---|---|
property |
Image height in pixels |
is_image :
public | |
---|---|
property |
Is this file an image |
fileOverWrite :
Also if it can be "moved" or "renamed" over Default set to FALSE, no it can't
protected |
boolean |
---|---|
property |
Determines if this file be overwritten |
access |
protected |
since | |
url :
public | |
---|---|
property |
Web based Path |
path :
public | |
---|---|
property |
Full File System Path |
path_relative :
public | |
---|---|
property |
Relative File System Path |
classinfo :
classname :
tablename :
identifier :
rank_by_field :
grouping_sql :
has_extended_fields :
has_one :
has_many :
has_many_self :
has_and_belongs_to_many :
has_and_belongs_to_self :
default_sort_field :
default_sort_direction :
get_assoc_for :
attachable_items_to_save :
get_attachable_for :
validate :
do_not_validate :
supports_revisions :
needs_approval :