Overview

Namespaces

  • Jyxo
    • Beholder
      • TestCase
    • Gettext
      • Parser
    • Input
      • Chain
      • Filter
      • Validator
    • Mail
      • Email
        • Attachment
      • Parser
      • Sender
    • Rpc
      • Json
      • Xml
    • Shell
    • Spl
    • Svn
    • Time
    • Webdav
  • PHP

Classes

  • Parser
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated

Class Parser

Parses Gettext PO files.

Jyxo\Gettext\Parser implements Iterator, Countable
Namespace: Jyxo\Gettext
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