Retorna os dados do boleto

@return ArrayObject
510230
protected function setDadosBoleto(array $data = [])
    {
        $data['Banco'] = $this->convenio->getBanco()->getNumero();
        $data['Moeda'] = $this->moeda;
        $data['Valor'] = $this->getValorFormatado();
        $data['Agencia'] = $this->getAgenciaFormatada();
        $data['Carteira'] = $this->convenio->getCarteira()->getNumero();
        $data['Conta'] = $this->getContaFormatada();
        $data['NossoNumero'] = $this->convenio->getNossoNumero();
        $data['FatorVencimento'] = Number::fatorVencimento($this->getDataVencimento());
        $data['CodigoCedente'] = $this->convenio->getConvenio();

        $data = new ArrayObject($data);

        $data->setFlags(ArrayObject::ARRAY_AS_PROPS);

        return $data;
    }
27230
public function __toArray()
    {
        $dto = array();
        try {
            $reflectionClass = new \ReflectionClass($this);
            $properties = $reflectionClass->getProperties(\ReflectionProperty::IS_PUBLIC);
            if (count($properties) > 0) {
                /** @var \ReflectionProperty $property */
                foreach ($properties as $property) {
                    $value = $property->getValue($this);
                    if(is_object($value) && method_exists($value, 'toArray')) {
                        $dto[$property->getName()] = $value->toArray();
                    } elseif(is_array($value)) {
                        foreach($value as &$arrValue) {
                            if($arrValue instanceof Dto) {
                                $arrValue = $arrValue->toArray();
                            }
                        }
                        $dto[$property->getName()] = $value;
                    } else {
                        $dto[$property->getName()] = $property->getValue($this);
                    }
                }
            }
        } catch (\Exception $e) {
            Logger::log(get_class($this) . ': ' . $e->getMessage(), LOG_ERR);
        }
        return $dto;
    }
794914
public function toArray()
    {
        $ref = new \ReflectionObject($this);
        $export = array();

        foreach ($ref->getProperties() as $property) {
            $property->setAccessible(true);
            $name = strtolower(
                preg_replace('@([A-Z])@', '_\1', $property->getName())
            );
            $export[$name] = $property->getValue($this);

            if ($export[$name] instanceof DataWrapperInterface) {
                $export[$name] = $export[$name]->toArray();
            } elseif ($export[$name] instanceof \DateTime) {
                $export[$name] = $export[$name]->format('Y-m-d');
            }
        }

        return $export;
    }
1285731
protected function gerarCodigoBarras()
    {
        $data = $this->setDadosBoleto();

        $this->getConvenio()->gerarCampoLivre($data);

        $tamanhos = $this->convenio->getTamanhos();

        foreach ($data as $var => $value) {
            if (array_key_exists($var, $tamanhos)) {
                $data[$var] = StringBuilder::normalize($data[$var], $tamanhos[$var]);
            }
        }

        //Chamada do método que ajusta o NossoNumero
        $this->getConvenio()->ajustarNossoNumero($data);

        $this->convenio->setNossoNumero($data['NossoNumero']);

        $cod = $this->aplicarDadosAoLayout($this->convenio->getLayout(), $data);

        $dv = Number::modulo11($cod, 1, 1);

        $codigoBarras = $this->inserirDigitoVerificador($cod, $dv, 4);

        return $codigoBarras;
    }
359330
final public function getArray()
    {
        $res = $this->getArrayInternal();
        if (!$this->isArray($res) && !$this->isArrayObject($res)) {
            $errorMessage = 'AbstractDriver method _getArray() must return array or ArrayObject.';
            $errorMessage .= ' Make sure you have provided a valid config file path with file extension.';
            throw new ConfigException($errorMessage);
        }

        return StdObjectWrapper::toArray($res);
    }
1041996
public function getEnderecoCompleto()
    {
        $dados = array_filter(array($this->getEndereco(), $this->getBairro(), $this->getCidade(), $this->getUf(), $this->getCep()));
        return implode(' - ', $dados);
    }
1052908
public function getValue() : ArrayObject
    {
        $this->value = [];
        foreach ((array)$this as $field) {
            $this->value[$field->getName()] = $field->getElement()->getValue();
        }
        return new ArrayObject($this->value);
    }
1169434
public function toArray()
    {
        $result             = parent::toArray();
        $result['mediaId']  = $this->mediaId;
        $result['format']   = $this->format;

        return $result;
    }
33523
public function getValue() : ArrayObject
    {
        foreach ((array)$this as $element) {
            if ($element->getElement() instanceof Radio
                && $element->getElement()->checked()
            ) {
                return new class([$element->getElement()->getValue()]) extends ArrayObject {
                    public function __toString() : string
                    {
                        return "{$this[0]}";
                    }
                };
            }
        }
        return new class([$this->value]) extends ArrayObject {
            public function __toString() : string
            {
                return "{$this[0]}";
            }
        };
    }
1012279
public function getInstrucoes()
    {
        return array_slice((array)$this->instrucoes + [null, null, null, null, null, null, null, null], 0, 8);
    }
1335987
public function getCodigoBarras()
    {
        if (!empty($this->campoCodigoBarras)) {
            return $this->campoCodigoBarras;
        }

        if (!$this->isValid($messages)) {
            throw new \Exception('Campos requeridos pelo banco, aparentam estar ausentes ' . $messages);
        }

        $codigo = Util::numberFormatGeral($this->getCodigoBanco(), 3)
            . $this->getMoeda()
            . Util::fatorVencimento($this->getDataVencimento())
            . Util::numberFormatGeral($this->getValor(), 10)
            . $this->getCampoLivre();

        $resto = Util::modulo11($codigo, 2, 9, 0);
        $dv = (in_array($resto, [0, 10, 11])) ? 1 : $resto;

        return $this->campoCodigoBarras = substr($codigo, 0, 4) . $dv . substr($codigo, 4);
    }
1346517
public function toObject()
    {
        $output = array('cols' => array(), 'rows' => array());

        // Column Definitions
        foreach ($this->columns as $inputColumn) {
            $output['cols'][] = $inputColumn->toDefinitionObject();
        }

        // Rows
        foreach ($this->rows as $inputRow) {
            $row = array('c' => array());
            foreach ($inputRow->getCells() as $i => $cell) {
                if (null === $cell) {
                    $row['c'][] = null;
                } else {
                    $colType = $this->columns[$i]->getType();
                    $outputCell = array('v' => $colType->convertToCellValue($cell));
                    $stringVal = $colType->convertToStringVersion($cell);
                    if ($stringVal != null) {
                        $outputCell['f'] = trim($stringVal);
                    }
                    $row['c'][] = (object) $outputCell;
                }
            }

            $output['rows'][] = (object) $row;
        }

        return (object) $output;
    }
1293927
public function toArray()
    {
        $array = array();
        $data  = $this->__options;
        foreach ($data as $key => $value)
        {
            if ($value instanceof KObjectConfig) {
                $array[$key] = $value->toArray();
            } else {
                $array[$key] = $value;
            }
        }

        return $array;
    }
606694
public static function all() : array
    {
        try {

            self::instance();

            $tableStatic = static::$table;

            $stmt        = self::$db->query("SELECT * FROM {$tableStatic}");

            return $stmt->fetchAll(\PDO::FETCH_ASSOC);

        } catch (PDOException $e) {

            $error = new Error();
            $error->errorMessage("Error: não foi possível encontrar os dados. Verifique se os dados estão do banco estão corretos. ".$e->getMessage());

        }
    }
1161453
public function toArray()
    {
        $attr = !empty($this->getWarden()) ? $this->getWarden() : null;
        if (empty($attr)) {
            $attr = empty($this->getVisible()) ? $this->getFillable() : $this->getVisible();
        }
        $returnable = [];

        $f_model = \FormModel::using('plain')->withModel($this);
        foreach ($attr as $old => $new) {
            if (!empty($relations = $f_model->getRelationalDataAndModels($this, $old))) {
                $returnable[$new] = $relations;
            }
            if (stripos($old, '_id') !== false) {
                if (!empty($this->$new)) {
                    $returnable[$new] = $relations;
                }
            } else {
                if (isset($this->$old)) {
                    $returnable[$new] = $this->$old;
                }
            }
        }

        return $returnable;
    }
146945
public function getArrayObject(): ArrayObject
    {
        if ($this->returnType === self::TYPE_ARRAY) {
            return new ArrayObject($this->storage);
        } else {
            /** @var ArrayObject $storageAsArrayObject to silent static code analyzers */
            $storageAsArrayObject = $this->storage;

            return $storageAsArrayObject;
        }
    }
371281
public function toArray()
    {
        return array_merge($this->wrappedObject->toArray(), [
            'created_at'          => $this->created_at(),
            'updated_at'          => $this->updated_at(),
            'lowest_human_status' => $this->lowest_human_status(),
        ]);
    }