取出所有能夠使用的點數項目

@return \Illuminate\Database\Eloquent\Collection|static[]
513728
public function getCanUsePoints()
    {
        $userId = $this->id;
        $nowDataTime = Carbon::now()->toDateTimeString();

        return Point::select('points.*', 'point_rules.id as ruleId', 'point_rules.name as name', 'point_rules.expiry_at')
                    ->join('point_rules', 'points.rule_id', '=', 'point_rules.id')
                    ->where('points.user_id', $userId)
//                    ->where('point_rules.expiry_at', '>=', $nowDataTime)
//                    ->orWhere('point_rules.expiry_at', null)
                    ->orderBy('point_rules.created_at', 'desc')
                    ->get();
    }
1044519
public function getData()
    {
        $return = [];

        foreach ($this->collections as $collection) {
            $return[$collection->name()] = $collection->items();
        }

        if (count($this->dump) != 0) {
            $return['dump'] = $this->dump;
        }

        return $return;
    }
1227874
public static function getList()
    {
        /** @var Model $model */
        $model = new static();
        $fields = [
            trim($model->getPrimaryKey(), '_'),
            trim($model->getDisplayField(), '_')
        ];
        $rows = Sql::createSql($model->getAdapter())
            ->select($model->getTableName(), $fields)
            ->limit(null)
            ->all();
        $list = [];
        list($id, $value) = $fields;
        if (!empty($rows)) {
            foreach ($rows as $row) {
                $list[$row[$id]] = $row[$value];
            }
        }
        return $list;
    }
162017
public static function values()
    {
        $values = array();
        foreach (static::toArray() as $key => $value) {
            $values[$key] = new static($value);
        }
        return $values;
    }
852486
public function getCollectionData()
    {
        $returnList = array();
        switch( $this->ContentObjectAttribute->attribute( 'data_type_string' ) )
        {
            case 'ezobjectrelation':
            {
                $returnList = $this->getBaseList( $this->ContentObjectAttribute->attribute( 'object_version' ) );
            } break;

            case 'ezobjectrelationlist':
            {
                $content = $this->ContentObjectAttribute->content();
                foreach ( $content['relation_list'] as $relationItem )
                {
                    $subObjectID = $relationItem['contentobject_id'];
                    if ( !$subObjectID )
                        continue;
                    $subObject = eZContentObjectVersion::fetchVersion( $relationItem['contentobject_version'], $subObjectID );
                    if ( !$subObject )
                        continue;

                    $returnList = array_merge( $this->getBaseList( $subObject ),
                                               $returnList );
                }
            } break;
        }

        return $returnList;
    }
895256
public function fetchAll()
    {
        if (static::$languages === null) {
            static::$languages = $this->driver()->fetchAll();

            static::$languages = array_map(function ($language) {
                return new Locale($language);
            }, static::$languages);
        }

        return static::$languages;
    }
802827
public function getList()
    {
        return $this->find('list')
            ->order([$this->getDisplayField() => 'ASC'])
            ->cache(sprintf('%s_list', $this->getTable()), $this->getCacheName());
    }
899771
protected function getListCollection()
    {
        $id = $this->getParam(0);

        if (!isset($id)) {
            return $this->collection->getList(array('limit' => $this->getLimit()));
        }

        if ($this->getParam('type')) {
            return $this->collection->getList(array('type' => $id, 'limit' => $this->getLimit()));
        }

        if (!is_numeric($id)) {
            $this->errorAndExit($this->text('Invalid argument'));
        }

        if ($this->getParam('store')) {
            return $this->collection->getList(array('store_id' => $id, 'limit' => $this->getLimit()));
        }

        $result = $this->collection->get($id);

        if (empty($result)) {
            $this->errorAndExit($this->text('Unexpected result'));
        }

        return array($result);
    }
934661
public function all()
    {
        $results = [];
        foreach ($this->collections as $collection) {
            $results[] = array_merge(['name' => $collection->name], $collection->info());
        }

        return $results;
    }
862658
public function fetchAllEntities()
    {
        $select = $this->tableGateway->getSql()->select();

        return $this->tableGateway->fetchCollection($select);
    }
20678
public function getResults()
    {
        $list = (array) $this->parent->getAttributeFromArray($this->localKey);
        $result = [];

        foreach ($list as $index => $item) {
            $result[$index] = $model = $this->related->newInstance([], true);
            $model->setId($index);
        }

        return collect($result);
    }
1220257
public function copy(): Collection
    {
        $items = $this->items;
        $resolver = $this->resolver;

        return new static($items, $resolver);
    }
221660
protected static function _finders() {
		$self = static::_object();

		return [
			'all' => function($params, $next) {
				return $next($params);
			},
			'first' => function($params, $next) {
				$options =& $params['options'];
				$options['limit'] = 1;

				$data = $next($params);

				if (isset($options['return']) && $options['return'] === 'array') {
					$data = is_array($data) ? reset($data) : $data;
				} else {
					$data = is_object($data) ? $data->rewind() : $data;
				}
				return $data ?: null;
			},
			'list' => function($params, $next) use ($self) {
				$result = [];
				$meta = $self::meta();
				$name = $meta['key'];

				foreach ($next($params) as $entity) {
					$key = $entity->{$name};
					$result[is_scalar($key) ? $key : (string) $key] = $entity->title();
				}
				return $result;
			},
			'count' => function($params, $next) use ($self) {
				$options = array_diff_key($params['options'], $self->_query);

				if ($options && !isset($params['options']['conditions'])) {
					$options = ['conditions' => $options];
				} else {
					$options = $params['options'];
				}
				$options += ['type' => 'read', 'model' => $self];
				$query = $self::invokeMethod('_instance', ['query', $options]);
				return $self::connection()->calculation('count', $query, $options);
			}
		];
	}
202735
public function findAll()
    {
        $query = $this->createQueryBuilder();
        //return $this->getResultFromQueryBuilder($query);

        $cacheDriver = new \Doctrine\Common\Cache\ArrayCache();
        if (!$cacheDriver->contains('cache_id')) {
            $array = $this->getResultFromQueryBuilder($query);
            $cacheDriver->save('my_array', $array);
        } else {
            $array = $cacheDriver->fetch('my_array');
        }
        return $array;
    }
842124
public static function all()
    {
        return array(
            self::ENABLED,
            self::DISABLED,
            self::TYPE_NOT_FOUND,
            self::TYPE_NOT_ENABLED,
            self::INVALID,
        );
    }
315891
public function all()
    {
        $this->prepFetch();

        $result = $this->oosql_stmt->fetchAll();

        $collection = new collection();

        $collection->addBulk($result);

        $collection->obj_name = $this->oosql_class;

        self::$oosql_result = clone $collection;

        return $collection;
    }
763155
public function fetchAll(): array
    {
        $sql = $this->builder->buildSql();
        $this->builder = new QueryBuilder($this->pdo);
        return $this->fetchAllBySql($sql);
    }