Returns the elements of a CSV line.

@param resource $handle File handle.

@return string[] Array of columns.
973670
protected function getCsv($handle)
    {
        return fgetcsv($handle, 0, $this->delimiter, $this->enclosure, $this->escape);
    }
879157
public function get()
    {
        return [
            'type' => $this->operator,
            'left' => $this->leftExpression->get(),
            'right' => $this->rightExpression->get(),
            'file' => $this->file,
            'line' => $this->line,
            'char' => $this->char,
        ];
    }
193354
public function getAssociation($handle)
    {
        if ($handle instanceof Association) {
            return $this->getEntryAssociation($handle);
        }

        /**
         * @var EntryAssociation $entryAssociation
         */
        foreach ($this->associations as $entryAssociation) {
            if ($entryAssociation->getAssociation()->getTargetPropertyName() === $handle) {
                return $entryAssociation;
            }
        }
    }
834970
public function readFileHandle($file_handle)
    {
        if (!is_resource($file_handle))
            throw new \InvalidArgumentException("No file handle was provided");

        $contents = "";
        while (!feof($file_handle))
            $contents .= fread($file_handle, 8192);

        return $this->readString($contents);
    }
974366
public static function getFieldByHandleContext($handle, $context)
    {
        $fields = Craft::$app->fields->getAllFields(null, $context);
        foreach ($fields as $field) {
            if ($field->handle == $handle) {
                return $field;
            }
        }

        return false;
    }
576758
private static function fputcsv($handle, $fields, $options)
    {
        if (self::supportsCsvEscapeChar()) {
            return fputcsv($handle, $fields, $options['delimiter'], $options['enclosure'], $options['escape_char']);
        }

        return fputcsv($handle, $fields, $options['delimiter'], $options['enclosure']);
    }
314002
def csv_line_items(self):
        '''
        

        '''
        if not hasattr(self, '_csv_line_items'):
            url = '{}/{}'.format(self.base_url, self.id)
            self._csv_line_items = self.harvest._get_element_values(url, self.element_name).next().get('csv-line-items', '')
        return self._csv_line_items
732246
public function fgetcsv($handle, $length = null, $delimiter = null, $enclosure = null)
    {
        return fgetcsv($handle, $length, $delimiter, $enclosure);
    }
22378
protected function readNext($handle, $chunkSize)
    {
        if (feof($handle)) {
            return null;
        }

        $row = $this->readRow($handle, $chunkSize);

        if (!$this->startAtRow && $this->hasHeader && !$this->headerRowSkipped) {
            $this->headerRowSkipped = true;
            return $this->readNext($handle, $chunkSize);
        }

        return $row === [] ? $this->readNext($handle, $chunkSize) : $row;
    }
273258
private function getRecordsByHandle(array $records): array
    {
        $recordsByHandle = [];
        foreach ($records as $record) {
            $modelClass = get_class($record);
            $converter = Craft::$app->controller->module->getConverter($modelClass);
            $index = $converter->getRecordIndex($record);
            $recordsByHandle[$index] = $record;
        }

        return $recordsByHandle;
    }
907869
protected function readNext($handle, $chunkSize)
    {
        if (feof($handle)) {
            return null;
        }

        $line = $this->readLine($handle, $chunkSize);

        return $line === '' ? $this->readNext($handle, $chunkSize) : $line;
    }
835478
def get_lines(handle, line):
    
    for i, l in enumerate(handle):
        if i == line:
            return l
211426
public function findRequest($handle) {
        foreach($this->requests as $request) {
            if($handle === $request->getHandle()) {
                return $request;
            }
        }

        return false;
    }
1331272
private function _getProviderRecordByHandle($handle)
    {
        $providerRecord = Oauth_ProviderInfosRecord::model()->find(

            // conditions
            'class=:provider',

            // params
            array(
                ':provider' => $handle
            )
        );

        if($providerRecord)
        {
            return $providerRecord;
        }

        return null;
    }
139594
public static function eagerLoadingMap(array $sourceElements, string $handle)
    {
        // Get the block type
        $supertableFieldId = ArrayHelper::firstValue($sourceElements)->fieldId;
        $blockTypes = SuperTable::$plugin->getService()->getBlockTypesByFieldId($supertableFieldId);

        if (!isset($blockTypes[0])) {
            // Not a valid block type handle (assuming all $sourceElements are blocks from the same SuperTable field)
            return false;
        }

        $blockType = $blockTypes[0];

        // Set the field context
        $contentService = Craft::$app->getContent();
        $originalFieldContext = $contentService->fieldContext;
        $contentService->fieldContext = 'superTableBlockType:' . $blockType->uid;

        $map = parent::eagerLoadingMap($sourceElements, $handle);

        $contentService->fieldContext = $originalFieldContext;

        return $map;
    }
970414
private function readCsv($fullPath)
    {
        $result = [];
        $entries = $this->hlpCsv->read($fullPath);
        foreach ($entries as $one) {
            $i=0;
            $fromId = $one[$i++];
            $fromName = $one[$i++];
            $toId = $one[$i++];
            $toName = $one[$i++];
            $volume = $one[$i++];

            $item = new DItem();
            $item->from = $fromId;
            $item->to = $toId;
            $item->value = $volume;
            $result[] = $item;
        }
        return $result;
    }
1051870
private function getSenders(Envelope $envelope, &$handle, ?RedeliveryStamp $redeliveryStamp): iterable
    {
        if (null !== $redeliveryStamp) {
            return [
                $redeliveryStamp->getSenderClassOrAlias() => $this->sendersLocator->getSenderByAlias($redeliveryStamp->getSenderClassOrAlias()),
            ];
        }

        return $this->sendersLocator->getSenders($envelope, $handle);
    }