PhpOffice\PhpPresentation\HashTable::getByHashCode PHP Method

getByHashCode() public method

Get by hashcode
public getByHashCode ( string $pHashCode = '' ) : PhpOffice\PhpPresentation\ComparableInterface
$pHashCode string
return PhpOffice\PhpPresentation\ComparableInterface
    public function getByHashCode($pHashCode = '')
    {
        if (isset($this->items[$pHashCode])) {
            return $this->items[$pHashCode];
        }
        return null;
    }

Usage Example

Example #1
0
 /**
  */
 public function testConstructNull()
 {
     $object = new HashTable();
     $this->assertEquals(0, $object->count());
     $this->assertNull($object->getByIndex());
     $this->assertNull($object->getByHashCode());
     $this->assertInternalType('array', $object->toArray());
     $this->assertEmpty($object->toArray());
 }