-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathEntry.php
More file actions
executable file
·66 lines (61 loc) · 1.83 KB
/
Entry.php
File metadata and controls
executable file
·66 lines (61 loc) · 1.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?php
/**
* An entry is the actual piece of content that you want to publish.
* Entries can be created for one of the available content types.
*
* PHP version 5
*
* @category PHP
* @package Contentstack
* @author Uttam K Ukkoji <[email protected]>
* @author Rohit Mishra <[email protected]>
* @copyright 2012-2021 Contentstack. All Rights Reserved
* @license https://github.com/contentstack/contentstack-php/blob/master/LICENSE.txt MIT Licence
* @link https://pear.php.net/package/contentstack
* */
namespace Contentstack\Stack\ContentType;
use Contentstack\Stack\BaseQuery;
use Contentstack\Support\Utility;
/**
* Entry
*
* @category PHP
* @package Contentstack
* @author Uttam K Ukkoji <[email protected]>
* @author Rohit Mishra <[email protected]>
* @copyright 2012-2021 Contentstack. All Rights Reserved
* @license https://github.com/contentstack/contentstack-php/blob/master/LICENSE.txt MIT Licence
* @link https://pear.php.net/package/contentstack
* */
#[\AllowDynamicProperties]
class Entry extends BaseQuery
{
var $operation;
var $_query;
var $entryUid;
var $contentType = array();
/**
* Entry Class to initalize your Entry
*
* @param string $entryUid - Entry to be fetched.
* @param string $contentType - contentType of Entry to be fetched.
* */
public function __construct($entryUid = '', $contentType = '')
{
$this->entryUid = $entryUid;
parent::__construct($contentType, $this);
if (!Utility::isEmpty($entryUid)) {
return $this;
}
}
/**
* Fetch the specified entry
*
* @return Request
* */
public function fetch()
{
$this->operation = __FUNCTION__;
return Utility::contentstackRequest($this->contentType->stack, $this);
}
}