Overview

Packages

  • akismet
  • None
  • PHP
  • Smarty
    • Cacher
    • Compiler
    • Config
    • Debug
    • plugins
    • PluginsBlock
    • PluginsFilter
    • PluginsFunction
    • PluginsInternal
    • PluginsModifier
    • PluginsModifierCompiler
    • PluginsShared
    • Security
    • Template
    • TemplateResources
  • Swift
    • ByteStream
    • CharacterStream
    • Encoder
    • Events
    • KeyCache
    • Mailer
    • Mime
    • Plugins
    • Signatures
    • Signed
    • Transport
  • wa-apps
    • blog
      • actions
        • backend
        • blog
        • comment
        • cron
        • design
        • frontend
        • page
        • plugin
        • post
      • api
        • v1
      • cli
      • layout
      • model
      • plugin
        • aksimet
        • category
        • emailsubscription
        • favorite
        • gravatar
        • import
        • markdown
        • myposts
        • tag
        • troll
      • settings
    • checklists
      • backend
      • json
    • contacts
      • backend
    • developer
    • dummy
    • guestbook
    • guestbook2
    • photos
      • album
      • api
        • v1
      • backend
      • design
      • dialog
      • frontend
      • page
      • photo
      • plugin
        • comment
        • imageeffects
        • import
        • publicgallery
        • watermark
      • search
      • settings
      • stack
      • tag
      • upload
    • site
      • backend
      • blocks
      • config
      • design
      • domains
      • files
      • frontend
      • helper
      • layout
      • pages
      • routing
      • setting
    • stickies
      • api
        • v1
      • sheet
      • stiky
  • wa-plugin
    • payment
    • shipping
    • sms
  • wa-plugins
    • shipping
      • usps
  • wa-system
    • API
    • Auth
      • Adapters
    • Autoload
    • Cache
      • Adapter
    • Captcha
    • Config
    • Contact
    • controller
    • currency
    • database
    • datetime
    • design
    • event
    • exception
    • files
    • image
    • layout
    • locale
    • log
    • mail
    • page
      • action
      • model
    • payment
    • plugin
    • request
    • response
    • routing
    • shipping
    • sms
    • storage
    • user
    • util
    • validator
    • view
    • webasyst
      • api
      • backend
      • cli
      • config
      • layout
      • login
      • model
      • password
      • payment
      • profile
      • settings
      • shipment
    • widget
    • workflow
  • waPlugins
    • Payment
  • webasyst
    • wa-system
      • helper

Classes

  • waFiles
  • waTheme
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class waTheme

Theme design helper

waTheme implements ArrayAccess
Package: wa-system\files
Copyright: 2011 Webasyst LLC
Author: Webasyst LLC
Located at wa-system/file/waTheme.class.php
Methods summary
public
# __construct( mixed $id, boolean|string $app_id = true, boolean $force = false, boolean $readonly = false )

Get theme instance

Get theme instance

Parameters

$id
mixed
$id
$app_id
boolean|string
$app_id
$force
boolean
$force
$readonly
boolean
$readonly
public static boolean
# exists( string $id, boolean|string $app_id = true, boolean $check_only_path = false )

Parameters

$id
string
$id Theme id
$app_id
boolean|string
$app_id Application id
$check_only_path
boolean
$check_only_path skip verify theme description

Returns

boolean
private
# initPath( mixed $force = false )
private
# init( mixed $param = null )
public waTheme
# addFile( string $path, array|string $description, array $options = array() )

Append file into theme

Append file into theme

Parameters

$path
string
$path
$description
array|string
$description
$options
array
$options

Returns

waTheme

Throws

waException
public waTheme
# removeFile( string $path )

Remove file from theme

Parameters

$path
string
$path

Returns

waTheme

Throws

waException
public
# changeFile( mixed $file, mixed $description )
private DOMDocument|SimpleXMLElement
# getXML( boolean $as_dom = false )

Parameters

$as_dom
boolean
$as_dom

Returns

DOMDocument|SimpleXMLElement

Throws

waException
public
# save( )

Todo

complete code - it's not work properly (DTD fields order)
public
# __destruct( )
public waTheme
# copy( string $id = null, array $params = array() )

Copy existing theme

Copy existing theme

Parameters

$id
string
$id
$params
array
$params

Returns

waTheme

Throws

waException
public
# revertFile( mixed $file )
public waTheme
# fork( string $id, array $params = array() )

Fork theme into custom user theme with current id as theme_parent_id

Parameters

$id
string
$id
$params
array
$params

Returns

waTheme

Throws

waException
public waTheme
# move( string $id, array $params = array() )

Rename existing theme

Rename existing theme

Parameters

$id
string
$id
$params
array
$params

Returns

waTheme

Throws

waException
public boolean
# reset( )

Reset overriden theme changes

Returns

boolean
public
# flush( )

Flush template's caches

public
# delete( )

Delete custom theme

protected static
# protect( mixed $app, mixed $custom = true )
public
# getPath( )
private
# getPathCustom( )
private
# getCustom( )
private
# getPathOriginal( )
private
# getOriginal( )
private
# getApp( )
private
# getAppId( )

Todo

app or app_id at theme description?
private
# getId( )
private
# getSlug( )
public
# getUrl( )
protected
# getUsed( )
public
# getCover( )
public
# getType( )
public
# setName( mixed $name )
public
# setVendor( mixed $vendor )
public
# getVendor( )
public
# setDescription( mixed $name )
public
# setAbout( mixed $text )
private static
# prepareSetField( mixed $field, mixed $value )
private static
# prepareField( mixed $field, mixed $full = false )
private static
# preparePath( mixed $path )
public
# getName( mixed $full = false )
public
# getDescription( mixed $full = false )
public
# getAbout( mixed $full = false )
private
# setFiles( array $file )

Hook for offsetSet('files')

Hook for offsetSet('files')

Parameters

$file
array
$file
private
# setSettings( mixed $settings )
public boolean
# offsetExists( mixed $offset )

Parameters

$offset
mixed
$offset

Returns

boolean

Implementation of

ArrayAccess::offsetExists()
public mixed
# offsetGet( mixed $offset )

Parameters

$offset
mixed
$offset

Returns

mixed

Implementation of

ArrayAccess::offsetGet()
public
# __get( mixed $offset )
public
# __set( mixed $offset, mixed $value )
public mixed
# offsetSet( string $offset, mixed $value )

Parameters

$offset
string
$offset
$value
mixed
$value

Returns

mixed

Implementation of

ArrayAccess::offsetSet()
private
# getMethod( mixed $offset, mixed $type = 'get' )
private
# getMethodCallback( mixed $m )
public
# offsetUnset( mixed $offset )

Parameters

$offset
mixed
$offset

Implementation of

ArrayAccess::offsetUnset()
private
# getMtime( )
public
# getFile( mixed $file )
public
# getFiles( mixed $full = false )
public
# getSettings( mixed $values_only = false )
public
# getLocales( )
private static
# getLocale( mixed $data = array() )
public static
# verify( mixed $id )
public static
# sort( mixed & $themes )
private static array|boolean
# getRoutingRules( mixed $domains, mixed $app_id, mixed $theme_id )

Parameters

$domains
mixed
$domains
$app_id
mixed
$app_id
$theme_id
mixed
$theme_id

Returns

array|boolean
private waTheme
# getParentTheme( )

Returns

waTheme
private boolean
# getSystem( )

Returns

boolean
private static
# sortThemesHandler( mixed $theme1, mixed $theme2 )
public static waTheme
# getInstance( string $slug )

Parameters

$slug
string
$slug

Returns

waTheme

Throws

waException
public
# check( )
public waTheme
# brush( )

Returns

waTheme
public
# purge( )
public waTheme
# duplicate( )

Returns

waTheme

Throws

waException
public static waTheme
# extract( string $source_path )

Extract theme from archive

Parameters

$source_path
string
$source_path archive path

Returns

waTheme

Throws

Exception
private static
# throwThemeException( mixed $code, mixed $details = '' )
private static
# throwArchiveException( mixed $code, string $details = '' )

Parameters

$code
mixed
$code
$details
string
$details

Throws

waException
public string
# compress( string $path, string $name = null )

Compress theme into archive file

Parameters

$path
string
$path target archive path
$name
string
$name archive filename

Returns

string
arcive path
public static
# getThemesPath( mixed $app_id = null, mixed $relative = true )
public
# version( )
Constants summary
string ORIGINAL 'original'
#

Original not modified theme

Original not modified theme

string CUSTOM 'custom'
#

User theme

User theme

string OVERRIDDEN 'overridden'
#

Overriden theme

Overriden theme

string NONE 'none'
#

Undefined theme type

string PATH 'theme.xml'
#
Properties summary
protected mixed $app
#
protected mixed $id
#
protected mixed $info
#
protected mixed $extra_info
#
protected mixed $path_original
#
protected mixed $path_custom
#
protected mixed $path
#
protected mixed $type
#
protected mixed $url
#
protected mixed $used
#
protected mixed $system
#
protected mixed $_version
#
protected array $settings
#
protected waTheme $parent_theme
#
private array $changed array()
#
private boolean $readonly false
#
My fork of Webasyst Framework API documentation generated by ApiGen 2.8.0