Overview

Packages

  • Jyxo_Beholder
  • Jyxo_Charset
  • Jyxo_Color
  • Jyxo_Css
  • Jyxo_ErrorHandling
  • Jyxo_FirePhp
  • Jyxo_Gettext
    • Parser
  • Jyxo_Html
  • Jyxo_Input
    • Chain
    • Filter
    • Validator
  • Jyxo_Mail
    • Email
    • Parser
    • Sender
  • Jyxo_Rpc
    • Json
    • Xml
  • Jyxo_Shell
  • Jyxo_SpamFilter
  • Jyxo_Spl
  • Jyxo_String
  • Jyxo_Svn
  • Jyxo_Time
  • Jyxo_Timer
  • Jyxo_Webdav
  • Jyxo_XmlReader
  • PHP

Classes

  • Jyxo_Gettext_Parser
  • Jyxo_Gettext_Parser_Header
  • Jyxo_Gettext_Parser_Item

Exceptions

  • Jyxo_Gettext_Parser_Exception
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated

Class Jyxo_Gettext_Parser

Parses Gettext PO files.

Jyxo_Gettext_Parser implements Iterator, Countable
Category: Jyxo
Package: Jyxo_Gettext
Subpackage: Parser
Copyright: Copyright (c) 2005-2011 Jyxo, s.r.o.
License: https://github.com/jyxo/php/blob/master/license.txt
Author: Matěj Humpál
Located at Gettext/Parser.php
Methods summary
public
# __construct( string $file )

Constructor.

Constructor.

Loads and parses the given file.

Parameters

$file
string
Path to the PO file.
protected
# parse( string $file )

The actual parser.

The actual parser.

Walks through the file, splits it on empty lines and tries to parse each fragment using the defined parser class (Jyxo_Gettext_Parser_Item by default).

Does not work with the file header.

Parameters

$file
string
Path to the PO file

See

Jyxo_Gettext_Parser::$items
Jyxo_Gettext_Parser_Item
public boolean
# count( )

Countable interface method

Countable interface method

Returns

boolean

Implementation of

Countable::count
public boolean
# current( )

ArrayIterator interface method.

ArrayIterator interface method.

Returns

boolean

Implementation of

Iterator::current
public boolean
# key( )

ArrayIterator interface method.

ArrayIterator interface method.

Returns

boolean

Implementation of

Iterator::key
public boolean
# next( )

ArrayIterator interface method.

ArrayIterator interface method.

Returns

boolean

Implementation of

Iterator::next
public boolean
# rewind( )

ArrayIterator interface method.

ArrayIterator interface method.

Returns

boolean

Implementation of

Iterator::rewind
public boolean
# valid( )

ArrayIterator interface method.

ArrayIterator interface method.

Returns

boolean

Implementation of

Iterator::valid
public mixed
# __call( string $name, array $args )

Method overloading.

Method overloading.

Makes getProperty methods available for retrieving property values Makes setProperty methods available for setting property values

Parameters

$name
string
Method name
$args
array
Method parameters

Returns

mixed
Value of variable or Jyxo_Gettext_Parser

Throws

Jyxo_Gettext_Parser_Exception
Non-existing method
Properties summary
protected string $file
#

Path to the parsed PO file.

Path to the parsed PO file.

protected string $header
#

PO file header (copyright and other information).

PO file header (copyright and other information).

protected array $items array()
#

Fragments parsed from the PO file.

Fragments parsed from the PO file.

protected integer $current 0
#

Internal pointer to the fragments array.

Internal pointer to the fragments array.

protected string $itemClass 'Jyxo_Gettext_Parser_Item'
#

Parser class name.

Parser class name.

Useful for subclassing.

protected string $headerClass 'Jyxo_Gettext_Parser_Header'
#

Header parser class name.

Header parser class name.

Useful for subclassing.

Jyxo PHP Library API documentation generated by ApiGen 2.3.0