File_Therion
[ class tree: File_Therion ] [ index: File_Therion ] [ all elements ]

Class: File_Therion_Scrap

Source Location: /File_Therion-0.4.1/File/Therion/Scrap.php

Class Overview

File_Therion_BasicObject
   |
   --File_Therion_Scrap

Class representing a therion scrap object.


Author(s):

Copyright:

  • 2016 Benedikt Hallinger

Variables

Methods


Inherited Variables

Inherited Methods

Class: File_Therion_BasicObject

File_Therion_BasicObject::addComment()
Add a comment.
File_Therion_BasicObject::getData()
Get some simple data of this object.
File_Therion_BasicObject::getOption()
Get option of this object.
File_Therion_BasicObject::getOptionsString()
Generate basic options string.
File_Therion_BasicObject::handleCommonOption()
Handle known options supported by several objects.
File_Therion_BasicObject::setData()
Set some simple data of this object.
File_Therion_BasicObject::setOption()
Set options of this object.
File_Therion_BasicObject::_verify()
Verify basic compliance of item.

Class Details

[line 27]
Class representing a therion scrap object.

A scrap is a digital vectorized sketch with enriched cave data.



[ Top ]


Class Variables

$_data = array(
        'join' => array(),)

[line 64]

Basic data elements.
  • Access: protected

Type:   array


[ Top ]

$_joins = array()

[line 73]

Scrap joins.
  • Access: protected

Type:   array


[ Top ]

$_name =  null

[line 37]

Scrap name (ID)
  • Access: protected

Type:   array


[ Top ]

$_objects = array()

[line 85]

Objects of this scrap.

will be populated by parse() or addObject(). Order of objects matters for later rendering.

  • Var: of data (File_Therion_Scrap* objects)
  • Access: protected

Type:   array


[ Top ]

$_options = array(
        'title'         => "",
        'scale'         => "", // 4 forms possible
        'projection'    => "",
        'author'        => array(),// array of arrays(<date>,<persons>)
'flip'=>"",'cs'=>"",// coord system
'stations'=>array(),// list of station names (to be plotted)
'scetch'=>array(),// <filename> <x> <y>
'walls'=>"",'station-names'=>array(),// <prefix> <suffix> (like in centreline)
'copyright'=>array()// <date> <string>
)

[line 44]

Scrap options (title, ...).
  • Var: assoc array
  • Access: protected

Type:   array
Overrides:   Array


[ Top ]



Method Detail

__construct (Constructor)   [line 94]

File_Therion_Scrap __construct( string $id, [ $options = array()])

Create a new therion Scrap object.
  • Todo: Restrict naming convention, not all characters are allowed!
  • Access: public

Parameters:

string   $id   —  Name/ID of the scrap
   $options   — 

[ Top ]

addJoin   [line 419]

void addJoin( File_Therion_Join $join)

Add a scrap join.

Example:

  1.  $join = new File_Therion_Join($someScrapLine$otherScrapLinePoint);
  2.  $scrap->addJoin($join);

  • Access: public

Parameters:

File_Therion_Join|array   $join   —  Single or multiple joins.

[ Top ]

addObject   [line 299]

void addObject( object $scrapObj)

Add an File_Therion_Scrap* data model object to this scrap.

Accepted types are:

  • File_Therion_ScrapPoint
  • File_Therion_ScrapLine
  • File_Therion_ScrapScrapArea
Note that for later rendering, object ordering matters.

  • Access: public

Parameters:

object   $scrapObj   —  File_Therion_Scrap* object to add

[ Top ]

clearJoins   [line 427]

void clearJoins( )

Clean existing scrap joins.
  • Access: public

[ Top ]

clearObjects   [line 282]

void clearObjects( )

Clear associated objects.

This will unassociate all registered objects. You probably want to call clearLines() hereafter to also clean the calculated line content.

  • Access: public

[ Top ]

count   [line 260]

int count( )

Count number of elements of this scrap (SPL Countable).
  • Return: number of elements
  • Access: public

[ Top ]

getAllObjects   [line 372]

array getAllObjects( )

Get all associated objects of this scrap.

Example:

  1.  $allObjects $scrap->getObjects()// get all

  • Return: of File_Therion_Scrap* objects (empty array if no such objects)
  • Access: public

[ Top ]

getAreas   [line 402]

array getAreas( )

Get all Area objects of this scrap.
  • Return: File_Therion_ScrapArea objects
  • Access: public

[ Top ]

getJoins   [line 437]

array getJoins( )

Get existing scrap joins.
  • Return: File_Therion_Join objects describing the joins
  • Access: public

[ Top ]

getLines   [line 392]

array getLines( )

Get all Line objects of this scrap.
  • Return: File_Therion_ScrapLine objects
  • Access: public

[ Top ]

getName   [line 238]

string getName( )

Get name (id) of this scrap.
  • Access: public

[ Top ]

getObjects   [line 329]

array getObjects( [string $filter = null])

Get all associated objects of this file.

You can optionaly query for specific types using $filter. You may ommit the prefix 'File_Therion_' from the filter.

Example:

  1.  $allObjects $scrap->getObjects()// get all
  2.  $surveys    $scrap->getObjects('File_Therion_ScrapLine')// get lines
  3.  $surveys    $scrap->getObjects('Line')// get lines

  • Return: of File_Therion_Scrap* objects (empty array if no such objects)
  • Throws: InvalidArgumentException
  • Access: protected

Parameters:

string   $filter   —  File_Therion_Scrap* class name, retrieve only objects of that kind

[ Top ]

getPoints   [line 382]

array getPoints( )

Get all Point objects of this scrap.
  • Return: File_Therion_ScrapPoint objects
  • Access: public

[ Top ]

parse   [line 110]

File_Therion_Scrap parse( array $lines)

Parses given Therion_Line-objects into internal data structures.
  • Return: Scrap object
  • Todo: implement me better/more complete
  • Throws: File_Therion_SyntaxException
  • Throws: InvalidArgumentException
  • Access: public

Parameters:

array   $lines   —  File_Therion_Line objects forming a scrap

[ Top ]

setName   [line 249]

string setName( $id)

Change name (id) of this scrap.
  • Todo: implement parameter checks
  • Access: public

Parameters:

   $id   — 

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:09:45 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.