xplo.re Medusa Core Framework 3.1
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Event
  • Todo
  • Download

Namespaces

  • Core
    • Authentication
      • Auto
        • Driver
      • Driver
    • Cache
      • Driver
    • Charset
      • Driver
    • Configuration
    • Controller
    • Converter
      • Driver
    • Decoder
      • Driver
    • Encoder
      • Driver
    • Env
      • Authentication
      • Locale
      • Proxy
      • Server
        • HTTP
        • Redirect
        • X
    • Exception
    • Exchange
      • Driver
    • Field
    • Filter
      • Driver
    • Formatter
      • Driver
        • coreuimarkup
          • Token
    • Hash
    • Loader
    • Locale
    • Log
      • Driver
    • Module
      • Dependency
        • Requirement
          • Core
          • PHP
      • Linkage
        • Driver
    • PDF
    • Plugin
    • Query
      • Driver
    • Server
      • Driver
    • Session
      • Driver
    • Set
    • Storage
      • Driver
      • Field
        • Element
    • Stream
      • Driver
    • String
    • Translation
      • Driver
      • Language
        • Driver
    • URI
      • Driver
    • Version
    • View
      • Driver
        • coreui
          • Control
            • Button
            • Table
          • Element
        • htmlbuilder
          • Tags
        • yui
          • Modules
  • None
  • PHP

Classes

  • Authentication
  • Authentication_Token
  • Autoloader
  • Cache
  • Charset
  • ClassDescriptor
  • Closure
  • Controller
  • Converter
  • Date
  • Decoder
  • Delegate
  • Dispatcher
  • Encoder
  • Env
  • Env_Field
  • Env_File
  • Env_FileList
  • Env_Request
  • Env_SERVER
  • Exchange
  • Fault
  • Field
  • Filter
  • Filter_Value
  • Formatter
  • Hash
  • IP
  • Loader
  • Locale
  • Locale_Iterator
  • Locale_Node
  • Log
  • Module
  • Module_Iterator
  • Nothing
  • Object
  • OS
  • Plugin
  • Profiler
  • Query
  • Registry
  • Resource
  • Server
  • Session
  • Session_Token
  • Set
  • Storage
  • Storage_Result
  • Storage_Statement
  • Stream
  • String
  • Translation
  • URI
  • URI_Parameters
  • UUID
  • Value
  • Version
  • View

Interfaces

  • Accessor
  • Chainable
  • Comparable
  • Configurable
  • Equality
  • Identity
  • Inquiry
  • Masquerade
  • Mutator
  • SeekableStream
  • Storable
  • Variator

Exceptions

  • Exception

Constants

  • Copyright
  • ProductName
  • UseVersion
  • Version

Functions

  • ns_expand
  • ns_file_exists
  • ns_get_version
  • ns_resolve

Class Resource

Helper class to determine types of resources.

Core\Object implements Core\Chainable
Extended by Core\Set implements Core\Accessor
Extended by Core\Resource
Namespace: Core
Package: Core
Since: 3.0
Requires: PHP 5.3
Version: 1.0
Deprecated: This class is deprecated in favor of the PHP finfo extension.
Located at Resource.inc.php

Methods summary

protected
# __construct( )

Use Core\Resource::createFromFile() to instantiate a resource helper instance for a given file.

Use Core\Resource::createFromFile() to instantiate a resource helper instance for a given file.

Since

3.0
public
# __destruct( )

Since

3.0
protected string
# _readStream( integer $bytes )

Reads a number of bytes from the beginning of the stream.

Reads a number of bytes from the beginning of the stream.

Parameters

$bytes
Number of bytes to read.

Returns

string
Binary string of bytes read from stream.

Remark

Resets the file handle position to the position it had when this resource helper instance was instantiated, if marked as private.


Since

3.0
public static Core\Resource
# createFromFile( string|resource $fileNameOrHandle )

Initialises a new Resource instance from a file resource or filename.

Initialises a new Resource instance from a file resource or filename.

Parameters

$fileNameOrHandle

File name or resource handle to create instance for. If a resource handle is provided, the current file position will be retained at the current position when resource tests are performed. Resource tests will always peek from the beginning of the file.

Returns

Core\Resource

Since

3.0
public boolean|string
# isGIF( )

Tests whether the resource file is a GIF image.

Tests whether the resource file is a GIF image.

Returns

boolean|string
GIF version string if resource if a GIF, otherwise false.
3.0
public boolean|string
# isJPEG( )

Tests whether the resource file is a JPEG image.

Tests whether the resource file is a JPEG image.

Returns

boolean|string
JPEG type string if resource is a GIF, otherwise false.

Since

3.0
public boolean
# isPNG( )

Tests whether the resource file a PNG image.

Tests whether the resource file a PNG image.

Returns

boolean
true, if resource is a PNG, otherwise false.

Since

3.0

Methods inherited from Core\Set

__get(), __isset()

Methods inherited from Core\Object

__autocreateFactory(), __call(), __processParameters(), __toString(), attachMethod(), chain(), getValueForKey(), getValueForKeyPath(), getValueForUndefinedKey(), hash(), issetValueForKey(), setValueForKey(), setValueForKeyPath(), setValueForUndefinedKey(), uuid()

Constants summary

Constants inherited from Core\Object

AnyParameterType, AutochainParameterType, AutocreateParameterType, BooleanParameterType, CharParameterType, EnumParameterType, IntegerParameterType, RealParameterType, StringParameterType, UserParameterType

Properties summary

protected array $_file

Array of file resource properties.

Array of file resource properties.

Since

3.0
#

Magic properties inherited from Core\Object

$hash, $uuid

xplo.re Medusa Core Framework 3.1 API documentation generated by ApiGen