Elastica\Param::toArray PHP Метод

toArray() публичный Метод

Converts the params to an array. A default implementation exist to create the an array out of the class name (last part of the class name) and the params.
public toArray ( ) : array
Результат array Filter array
    public function toArray()
    {
        $data = [$this->_getBaseName() => $this->getParams()];
        if (!empty($this->_rawParams)) {
            $data = array_merge($data, $this->_rawParams);
        }
        return $this->_convertArrayable($data);
    }

Usage Example

Пример #1
0
 /**
  * @return array
  */
 public function toArray()
 {
     $array = parent::toArray();
     if (isset($this->_text)) {
         $array['text'] = $this->_text;
     }
     return $array;
 }
All Usage Examples Of Elastica\Param::toArray