forked from ezsystems/ezpublish-spi
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master'
- Loading branch information
Showing
2 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
|
||
/** | ||
* File containing the Content LoadStruct struct. | ||
* | ||
* @copyright Copyright (C) eZ Systems AS. All rights reserved. | ||
* @license For full copyright and license information view LICENSE file distributed with this source code. | ||
*/ | ||
namespace eZ\Publish\SPI\Persistence\Content; | ||
|
||
use eZ\Publish\SPI\Persistence\ValueObject; | ||
|
||
/** | ||
* Load struct for mass loading content or specific content versions. | ||
* | ||
* Design implies features such as always available and language logic needs to be done in API layer, so SPI gets | ||
* a specifc query to deal with for the lookup that can be safely cached. | ||
*/ | ||
class LoadStruct extends ValueObject | ||
{ | ||
/** | ||
* Content's unique ID. | ||
* | ||
* @var mixed | ||
*/ | ||
public $id; | ||
|
||
/** | ||
* Version number for version we would like to load, current version will be assumed if null. | ||
* | ||
* TIP: On usage with content load methods, if you need to be 100% sure current version is loaded, then let this | ||
* stay as null. Otherwise there is a corner case possibility someone might have published a new version in-between | ||
* loading content info to get version number and loading content, which can result in strange reports about | ||
* permission errors as most users don't have version read access. | ||
* | ||
* @var int|null | ||
*/ | ||
public $versionNo; | ||
|
||
/** | ||
* List of language code on translated properties of returned object. | ||
* | ||
* *Should* in the future be treated as prioritized languages by storage engine, returning only the first language matched. | ||
* | ||
* @var string[] | ||
*/ | ||
public $languages = []; | ||
} |