for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Yandex PHP Library
*
* @copyright NIX Solutions Ltd.
* @link https://github.com/nixsolutions/yandex-php-library
*/
* @namespace
namespace Yandex\Dictionary;
* Class DictionaryBaseItem
* @category Yandex
* @package Dictionary
* @author Nikolay Oleynikov <[email protected]>
* @created 07.11.14 20:38
class DictionaryBaseItem
{
* @var
protected $text;
protected $partOfSpeech;
public function __construct($item)
if (isset($item->text)) {
$this->text = $item->text;
}
if (isset($item->pos)) {
$this->partOfSpeech = $item->pos;
* @return string
public function __toString()
return $this->getText();
public function getText()
return $this->text;
public function getPartOfSpeech()
return $this->partOfSpeech;