Skip to content

Commit

Permalink
[TASK] Add more stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
simonschaufi committed Oct 19, 2023
1 parent 0a32294 commit 4227408
Show file tree
Hide file tree
Showing 6 changed files with 252 additions and 2 deletions.
23 changes: 23 additions & 0 deletions stubs/TYPO3/CMS/Extbase/Domain/Model/Constraint.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

declare(strict_types=1);

namespace TYPO3\CMS\Extbase\Domain\Model;

class Constraint
{
public function getStartTimestamp(): int
{
return 1;
}

public function getEndTimestamp(): int
{
return 2;
}

public function getNumber(): int
{
return 42;
}
}
16 changes: 16 additions & 0 deletions stubs/TYPO3/CMS/Extbase/Domain/Model/Demand.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

declare(strict_types=1);

namespace TYPO3\CMS\Extbase\Domain\Model;

class Demand
{
public function getUserName()
{
}

public function getBackendUserGroup()
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

declare(strict_types=1);

namespace TYPO3\CMS\Extbase\Persistence\Generic\Qom;

if (interface_exists('TYPO3\CMS\Extbase\Persistence\Generic\Qom\ConstraintInterface')) {
return;
}

interface ConstraintInterface
{

}
103 changes: 102 additions & 1 deletion stubs/TYPO3/CMS/Extbase/Persistence/Generic/Query.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,42 @@
<?php
declare(strict_types=1);

declare(strict_types=1);

namespace TYPO3\CMS\Extbase\Persistence\Generic;

use TYPO3\CMS\Extbase\Persistence\Generic\Qom\ConstraintInterface;
use TYPO3\CMS\Extbase\Persistence\QueryInterface;
use TYPO3\CMS\Extbase\Persistence\QueryResultInterface;

if (class_exists('TYPO3\CMS\Extbase\Persistence\Generic\Query')) {
return;
}

final class Query implements QueryInterface
{
/**
* @param bool $returnRawQueryResult
* @return QueryResultInterface|object[]
*/
public function execute($returnRawQueryResult = false)
{
}

public function setOrderings(array $orderings)
{
}

public function setLimit($limit)
{
}

public function setOffset($offset)
{
}

public function matching($constraint)
{
}

public function logicalAnd($constraint1)
{
Expand All @@ -20,4 +45,80 @@ public function logicalAnd($constraint1)
public function logicalOr($constraint1)
{
}

public function logicalNot(ConstraintInterface $constraint)
{
}

public function equals($propertyName, $operand, $caseSensitive = true)
{
}

public function like($propertyName, $operand)
{
}

public function contains($propertyName, $operand)
{
}

public function in($propertyName, $operand)
{
}

public function lessThan($propertyName, $operand)
{
}

public function lessThanOrEqual($propertyName, $operand)
{
}

public function greaterThan($propertyName, $operand)
{
}

public function greaterThanOrEqual($propertyName, $operand)
{
}

public function setType(string $type): void
{
}

public function getType()
{
}

public function setQuerySettings(QuerySettingsInterface $querySettings)
{
}

public function getQuerySettings()
{
}

public function count()
{
}

public function getOrderings()
{
}

public function getLimit()
{
}

public function getOffset()
{
}

public function getConstraint()
{
}

public function getStatement()
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

declare(strict_types=1);

namespace TYPO3\CMS\Extbase\Persistence\Generic;

interface QuerySettingsInterface
{

}
88 changes: 87 additions & 1 deletion stubs/TYPO3/CMS/Extbase/Persistence/QueryInterface.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,102 @@
<?php
declare(strict_types=1);

declare(strict_types=1);

namespace TYPO3\CMS\Extbase\Persistence;

use TYPO3\CMS\Extbase\Persistence\Generic\Qom\ConstraintInterface;
use TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface;

if (interface_exists('TYPO3\CMS\Extbase\Persistence\QueryInterface')) {
return;
}

interface QueryInterface
{
public const OPERATOR_EQUAL_TO = 1;

public const OPERATOR_EQUAL_TO_NULL = 101;

public const OPERATOR_NOT_EQUAL_TO = 2;

public const OPERATOR_NOT_EQUAL_TO_NULL = 202;

public const OPERATOR_LESS_THAN = 3;

public const OPERATOR_LESS_THAN_OR_EQUAL_TO = 4;

public const OPERATOR_GREATER_THAN = 5;

public const OPERATOR_GREATER_THAN_OR_EQUAL_TO = 6;

public const OPERATOR_LIKE = 7;

public const OPERATOR_CONTAINS = 8;

public const OPERATOR_IN = 9;

public const OPERATOR_IS_NULL = 10;

public const OPERATOR_IS_EMPTY = 11;

public const ORDER_ASCENDING = 'ASC';
public const ORDER_DESCENDING = 'DESC';

/**
* Executes the query and returns the result.
*
* @param bool $returnRawQueryResult
* @return QueryResultInterface|object[]
*/
public function execute($returnRawQueryResult = false);

public function setOrderings(array $orderings);

public function setLimit($limit);

public function setOffset($offset);

public function matching($constraint);

public function logicalAnd($constraint1);

public function logicalOr($constraint1);

public function logicalNot(ConstraintInterface $constraint);

public function equals($propertyName, $operand, $caseSensitive = true);

public function like($propertyName, $operand);

public function contains($propertyName, $operand);

public function in($propertyName, $operand);

public function lessThan($propertyName, $operand);

public function lessThanOrEqual($propertyName, $operand);

public function greaterThan($propertyName, $operand);

public function greaterThanOrEqual($propertyName, $operand);

public function setType(string $type): void;

public function getType();

public function setQuerySettings(QuerySettingsInterface $querySettings);

public function getQuerySettings();

public function count();

public function getOrderings();

public function getLimit();

public function getOffset();

public function getConstraint();

public function getStatement();
}

0 comments on commit 4227408

Please sign in to comment.