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

Class: Mai_Analyzer_Pattern

Source Location: /Mai/Analyzer/Pattern.php

Class Overview


Mai_Analyzer_Pattern compares a pattern with given sources.


Author(s):

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

Copyright:

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

Implements interfaces:

Variables

Methods



Class Details

[line 51]
Mai_Analyzer_Pattern compares a pattern with given sources.



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

$_patternArray =

[line 61]



Tags:

var:  The pattern (in array) to analyze.
access:  private

Type:   array


[ Top ]

$_patternString =

[line 56]



Tags:

var:  The pattern to analyze.
access:  private

Type:   string


[ Top ]

$_response = array()

[line 72]



Tags:

var:  An array with information about the response.
access:  private

Type:   array


[ Top ]

$_responseType =

[line 77]



Tags:

var:  The type of the response.
access:  private

Type:   int


[ Top ]

$_sources = array()

[line 66]



Tags:

var:  An array with different input sources.
access:  private

Type:   array


[ Top ]



Class Methods


constructor __construct [line 82]

Mai_Analyzer_Pattern __construct( $creator)

Check if Mai has been setup and that the creator is Mai_Analyzer.



Tags:

access:  public


Parameters:

   $creator  

[ Top ]

method addSource [line 178]

void addSource( string $name, $data)

Add a pattern source to the analyzer.



Tags:

access:  public



Implementation of:
Mai_Analyzer_Interface::addSource()

Parameters:

string   $name  
array   $data  

[ Top ]

method compareString [line 132]

array|bool compareString( )

Compare the string version of the pattern.

Fast and easy but success is limited.




Tags:

access:  private


[ Top ]

method removeSource [line 192]

void removeSource( string $name)

Remove source.



Tags:

access:  public



Implementation of:
Mai_Analyzer_Interface::removeSource()

Parameters:

string   $name  

[ Top ]

method run [line 98]

void run( )

Analyze the pattern.



Tags:

access:  public



Implementation of:
Mai_Analyzer_Interface::run()
[ Top ]

method set [line 155]

void set( string $type, $data)

Set data to analyze.



Tags:

access:  public



Implementation of:
Mai_Analyzer_Interface::set()

Parameters:

string   $type   Can be 'pattern-array' or 'pattern-string'.
array   $data  

[ Top ]


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