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

Class: ArQuery

Source Location: /sub/ArQuery.class.php

Class Overview


This PHP class build WHERE condition for SQL statement using MySQL REGEXP and Arabic lexical rules


Author(s):

Copyright:

  • 2009 Khaled Al-Shamaa

Methods



Class Details

[line 187]
This PHP class build WHERE condition for SQL statement using MySQL REGEXP and Arabic lexical rules



Tags:

author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
copyright:  2009 Khaled Al-Shamaa
link:  http://www.ar-php.org
license:  LGPL


[ Top ]


Class Methods


method allForms [line 684]

string allForms( string $arg, [string $inputCharset = null], [string $outputCharset = null], [object $main = null])

Get most possible Arabic lexical forms of user search keywords



Tags:

return:  list of most possible Arabic lexical forms for given keywords
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

string   $arg   String that user search for
string   $inputCharset   (optional) Input charset [utf-8|windows-1256|iso-8859-6] default value is NULL (use set input charset)
string   $outputCharset   (optional) Output charset [utf-8|windows-1256|iso-8859-6] default value is NULL (use set output charset)
object   $main   Main Ar-PHP object to access charset converter options

[ Top ]

method getArrFields [line 283]

array getArrFields( )

Getting values of $fields Array in array format



Tags:

return:  Value of $fields array in Array format
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


[ Top ]

method getMode [line 271]

integer getMode( )

Getting $mode propority value that refer to search mode [0 for OR logic | 1 for AND logic]



Tags:

return:  Value of $mode properity
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


[ Top ]

method getOrderBy [line 424]

string getOrderBy( string $arg, [string $inputCharset = null], [string $outputCharset = null], [object $main = null])

Get more relevant order by section related to the user search keywords



Tags:

return:  sub SQL ORDER BY section
author:  Saleh AlMatrafe <saleh@saleh.cc>
access:  public


Parameters:

string   $arg   String that user search for in the database table
string   $inputCharset   (optional) Input charset [utf-8|windows-1256|iso-8859-6] default value is NULL (use set input charset)
string   $outputCharset   (optional) Output charset [utf-8|windows-1256|iso-8859-6] default value is NULL (use set output charset)
object   $main   Main Ar-PHP object to access charset converter options

[ Top ]

method getStrFields [line 296]

string getStrFields( )

Getting values of $fields array in String format (comma delimated)



Tags:

return:  Values of $fields array in String format (comma delimated)
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


[ Top ]

method getWhereCondition [line 318]

string getWhereCondition( string $arg, [string $inputCharset = null], [string $outputCharset = null], [object $main = null])

Build WHERE section of the SQL statement using defind lex's rules, search mode [AND | OR], and handle also phrases (inclosed by "") using normal LIKE condition to match it as it is.



Tags:

return:  The WHERE section in SQL statement (MySQL database engine format)
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

string   $arg   String that user search for in the database table
string   $inputCharset   (optional) Input charset [utf-8|windows-1256|iso-8859-6] default value is NULL (use set input charset)
string   $outputCharset   (optional) Output charset [utf-8|windows-1256|iso-8859-6] default value is NULL (use set output charset)
object   $main   Main Ar-PHP object to access charset converter options

[ Top ]

method setArrFields [line 200]

boolean setArrFields( array $arrConfig)

Setting value for $fields array



Tags:

return:  TRUE if success, or FALSE if fail
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

array   $arrConfig   Name of the fields that SQL statement will search them (in array format where items are those fields names)

[ Top ]

method setMode [line 250]

boolean setMode( integer $mode)

Setting $mode propority value that refer to search mode [0 for OR logic | 1 for AND logic]



Tags:

return:  TRUE if success, or FALSE if fail
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

integer   $mode   Setting value to be saved in the $mode propority

[ Top ]

method setStrFields [line 228]

boolean setStrFields( string $strConfig)

Setting value for $fields array



Tags:

return:  TRUE if success, or FALSE if fail
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

string   $strConfig   Name of the fields that SQL statement will search them (in string format using comma as delimated)

[ Top ]


Documentation generated on Tue, 18 Aug 2009 00:12:50 +0300 by phpDocumentor 1.4.0