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

Class: Mai_Container_Input

Source Location: /Mai/Container/Input.php

Class Overview


Mai_Container_Input is a container for input.


Author(s):

  • Wouter Bulten (wouterbulten@mai-ai.org)

Copyright:

  • Copyright (C) 2009 Mai (Me Artificial Intelligence)

Implements interfaces:

Variables

Methods



Class Details

[line 52]
Mai_Container_Input is a container for input.

Input types currently supported:

  • Sentences




Tags:

author:  Wouter Bulten (wouterbulten@mai-ai.org)
copyright:  Copyright (C) 2009 Mai (Me Artificial Intelligence)
link:  http://www.launchpad.net/mai
license:  GNU General Public License version 3 (GPLv3)


[ Top ]


Class Variables

$_inputType =  0

[line 57]



Tags:

var:  Type of input.
access:  private

Type:   int


[ Top ]

$_sentences = array()

[line 62]



Tags:

var:  Storage for sentences.
access:  private

Type:   array


[ Top ]



Class Methods


method getAll [line 134]

array getAll( )

Return all sentences



Tags:

access:  public


[ Top ]

method getIterator [line 143]

ArrayIterator getIterator( )

Function to implement the IteratorAggregate interface.



Tags:

access:  public


[ Top ]

method getSentence [line 111]

Mai_Container_Sentence getSentence( Int $location, [Bool $showError = true])

Return a sentence from storage.



Tags:

access:  public



Implementation of:
Mai_Container_Input_Interface::getSentence()

Parameters:

Int   $location   The location (key) of storage.
Bool   $showError   Set to false to return false if a sentence does not excist.

[ Top ]

method getType [line 83]

int getType( )

Get the type of this container.



Tags:

access:  public



Implementation of:
Mai_Container_Input_Interface::getType()
[ Top ]

method insertSentence [line 93]

void insertSentence( Mai_Container_Sentence $sentence, [$location $location = null])

Insert a word in the storage.



Tags:

access:  public



Implementation of:
Mai_Container_Input_Interface::insertSentence()

Parameters:

Mai_Container_Sentence   $sentence   The sentence to store.
$location   $location   The location (key) where to store.

[ Top ]

method setType [line 68]

void setType( int $type)

Set the input type of this container.



Tags:

access:  public



Implementation of:
Mai_Container_Input_Interface::setType()

Parameters:

int   $type  

[ Top ]


Documentation generated on Mon, 27 Jul 2009 19:55:06 +0200 by phpDocumentor 1.4.1