Mike42\Escpos\CapabilityProfile::getProfileNames PHP Method

getProfileNames() public static method

public static getProfileNames ( ) : array
return array Names of all profiles that exist.
    public static function getProfileNames()
    {
        self::loadCapabilitiesDataFile();
        return array_keys(self::$profiles);
    }

Usage Example

コード例 #1
0
 public function testNames()
 {
     // Default is on the list
     $names = CapabilityProfile::getProfileNames();
     $this->assertFalse(array_search('simple', $names) === false);
     $this->assertFalse(array_search('default', $names) === false);
     $this->assertTrue(array_search('lalalalala', $names) === false);
 }