-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
626 additions
and
204 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
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
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,52 @@ | ||
<?php | ||
/** | ||
* Created by PhpStorm. | ||
* @author hashashiyyin [email protected] / [email protected] | ||
* Date: 24/05/24 | ||
* Time: 18:25 | ||
* | ||
*/ | ||
|
||
namespace Matecat\SubFiltering\Utils; | ||
|
||
use ArrayObject; | ||
|
||
class ArrayList extends ArrayObject { | ||
|
||
/** | ||
* @param array $list | ||
*/ | ||
public function __construct( array $list = [] ) { | ||
parent::__construct( $list ); | ||
} | ||
|
||
public static function instance( array $list = [] ) { | ||
return new static( $list ); | ||
} | ||
|
||
/** | ||
* @param $key | ||
* | ||
* @return false|mixed|null | ||
*/ | ||
public function offsetGet( $key ) { | ||
if ( $this->offsetExists( $key ) ) { | ||
return parent::offsetGet( $key ); | ||
} | ||
|
||
return null; | ||
} | ||
|
||
/** | ||
* Returns the element at the specified position in this list. | ||
* | ||
* @param $key | ||
* | ||
* @return false|mixed|null the element at the specified position in this list | ||
*/ | ||
public function get( $key ) { | ||
return $this->offsetGet( $key ); | ||
} | ||
|
||
|
||
} |
Oops, something went wrong.