src/Component.php
public function build()
    {
        $lines = [];

        $lines[] = sprintf('BEGIN:%s', $this->getType());

        /** @var $property Property */
        foreach ($this->buildPropertyBag() as $property) {
            foreach ($property->toLines() as $l) {
                $lines[] = $l;
            }
        }

        $this->buildComponents($lines);

        $lines[] = sprintf('END:%s', $this->getType());

        $ret = [];

        foreach ($lines as $line) {
            foreach (ComponentUtil::fold($line) as $l) {
                $ret[] = $l;
            }
        }

        return $ret;
    }
public function build()
    {
        $lines = [];

        $lines[] = sprintf('BEGIN:%s', $this->getType());

        /** @var $property Property */
        foreach ($this->buildPropertyBag() as $property) {
            foreach ($property->toLines() as $l) {
                $lines[] = $l;
            }
        }

        $this->buildComponents($lines);

        $lines[] = sprintf('END:%s', $this->getType());

        $ret = [];

        foreach ($lines as $line) {
            foreach (ComponentUtil::fold($line) as $l) {
                $ret[] = $l;
            }
        }

        return $ret;
    }
public function build ( ) { $ lines = [ ] ; $ lines [ ] = sprintf ( 'BEGIN:%s' , $ this -> getType ( ) ) ; /** @var $property Property */ foreach ( $ this -> buildPropertyBag ( ) as $ property ) { foreach ( $ property -> toLines ( ) as $ l ) { $ lines [ ] = $ l ; } } $ this -> buildComponents ( $ lines ) ; $ lines [ ] = sprintf ( 'END:%s' , $ this -> getType ( ) ) ; $ ret = [ ] ; foreach ( $ lines as $ line ) { foreach ( ComponentUtil :: fold ( $ line ) as $ l ) { $ ret [ ] = $ l ; } } return $ ret ; }
Renders an array containing the lines of the iCal file.

@return array
Renders an array containing the lines of the iCal file .