service/models/StoredContent.php
/**
     * Creates new stored content chunk
     *
     * @param  boolean   $lock
     * @return service\models\StoredContentChunk
     */
Creates new stored content chunk
@param  boolean   $lock
@return service\models\StoredContentChunk
Creates new stored content chunk @param boolean $lock @return service \ models \ StoredContentChunk
public function createChunk($lock = false)
    {
        if (!$this->isNewRecord) {
            $chunk = new StoredContentChunk();
            $chunk->setScenario(StoredContentChunk::SCENARIO_CREATE);
            $chunk->start = 0;
            $chunk->end = 0;
            $chunk->length = 0;
            if ($lock) {
                $chunk->lock();
            }
            $chunk->link('storedContent', $this);
            return $chunk;
        } else {
            throw new Exception('Stored content should be saved before chunks can be created.');
        }
    }
public function createChunk ( $ lock = false ) { if ( ! $ this -> isNewRecord ) { $ chunk = new StoredContentChunk ( ) ; $ chunk -> setScenario ( StoredContentChunk :: SCENARIO_CREATE ) ; $ chunk -> start = 0 ; $ chunk -> end = 0 ; $ chunk -> length = 0 ; if ( $ lock ) { $ chunk -> lock ( ) ; } $ chunk -> link ( 'storedContent' , $ this ) ; return $ chunk ; } else { throw new Exception ( 'Stored content should be saved before chunks can be created.' ) ; } }
Creates new stored content chunk
 @param  boolean   $lock
 @return service\models\StoredContentChunk
Creates new stored content chunk @param boolean $lock @return service \ models \ StoredContentChunk